summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android')
-rw-r--r--WebKit/android/nav/CacheBuilder.cpp13
-rw-r--r--WebKit/android/nav/CachedNode.h3
-rw-r--r--WebKit/android/nav/WebView.cpp11
3 files changed, 12 insertions, 15 deletions
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp
index b7a650b..39f0053 100644
--- a/WebKit/android/nav/CacheBuilder.cpp
+++ b/WebKit/android/nav/CacheBuilder.cpp
@@ -94,14 +94,11 @@ Frame* CacheBuilder::FrameAnd(const CacheBuilder* cacheBuilder) {
#if DUMP_NAV_CACHE
static bool hasEventListener(Node* node, const AtomicString& eventType) {
- const RegisteredEventListenerVector& listeners = node->eventListeners();
- size_t size = listeners.size();
- for (size_t i = 0; i < size; ++i) {
- const RegisteredEventListener& r = *listeners[i];
- if (r.eventType() == eventType)
- return true;
- }
- return false;
+ if (!node->isElementNode())
+ return false;
+ Element* element = static_cast<Element*>(node);
+ EventListener* listener = element->getAttributeEventListener(eventType);
+ return 0 != listener;
}
#define DEBUG_BUFFER_SIZE 256
diff --git a/WebKit/android/nav/CachedNode.h b/WebKit/android/nav/CachedNode.h
index 540ba49..f5f5787 100644
--- a/WebKit/android/nav/CachedNode.h
+++ b/WebKit/android/nav/CachedNode.h
@@ -102,7 +102,7 @@ public:
const WebCore::IntRect& getBounds() const { return mBounds; }
void getBounds(WebCore::IntRect* bounds) const { *bounds = mBounds; }
const WebCore::String& getExport() const { return mExport; }
- bool hasCursorRing() const { return !mIsHidden && mHasCursorRing; }
+ bool hasCursorRing() const { return mHasCursorRing; }
bool hasMouseOver() const { return mHasMouseOver; }
void hideCursor(CachedFrame* );
const WebCore::IntRect& hitBounds() const { return mHitBounds; }
@@ -113,6 +113,7 @@ public:
bool isArea() const { return mIsArea; }
bool isFocus() const { return mIsFocus; }
bool isFrame() const { return mChildFrameIndex >= 0 ; }
+ bool isHidden() const { return mIsHidden; }
bool isNavable(const WebCore::IntRect& clip) const {
return clip.intersects(mBounds);
}
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index 0b1a4cf..9793ed4 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -437,8 +437,8 @@ void drawCursorRing(SkCanvas* canvas)
resetCursorRing();
return;
}
- if (!node->hasCursorRing()) {
- DBG_NAV_LOG("!node->hasCursorRing()");
+ if (node->isHidden()) {
+ DBG_NAV_LOG("node->isHidden()");
m_viewImpl->m_hasCursorBounds = false;
return;
}
@@ -486,13 +486,12 @@ void drawCursorRing(SkCanvas* canvas)
setPluginReceivesEvents(false);
return;
}
+ if (!node->hasCursorRing() || (m_pluginReceivesEvents && node->isPlugin()))
+ return;
CursorRing::Flavor flavor = CursorRing::NORMAL_FLAVOR;
if (!isButton) {
flavor = node->type() != NORMAL_CACHEDNODETYPE ?
CursorRing::FAKE_FLAVOR : CursorRing::NORMAL_FLAVOR;
- if (m_pluginReceivesEvents && node->isPlugin()) {
- return;
- }
if (m_followedLink) {
flavor = static_cast<CursorRing::Flavor>
(flavor + CursorRing::NORMAL_ANIMATING);
@@ -737,7 +736,7 @@ void updateCursorBounds(const CachedRoot* root, const CachedFrame* cachedFrame,
LOG_ASSERT(cachedNode, "updateCursorBounds: cachedNode cannot be null");
LOG_ASSERT(cachedFrame, "updateCursorBounds: cachedFrame cannot be null");
m_viewImpl->gCursorBoundsMutex.lock();
- m_viewImpl->m_hasCursorBounds = cachedNode->hasCursorRing();
+ m_viewImpl->m_hasCursorBounds = !cachedNode->isHidden();
// If m_viewImpl->m_hasCursorBounds is false, we never look at the other
// values, so do not bother setting them.
if (m_viewImpl->m_hasCursorBounds) {