diff options
Diffstat (limited to 'WebKit/android/nav/WebView.cpp')
| -rw-r--r-- | WebKit/android/nav/WebView.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 0b1a4cf..8fff1b9 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) { @@ -1232,7 +1231,7 @@ void sendMoveMouseIfLatest(bool disableFocusController) void sendMotionUp( WebCore::Frame* framePtr, WebCore::Node* nodePtr, int x, int y) { - m_viewImpl->m_touchGeneration = m_viewImpl->m_generation = ++m_generation; + m_viewImpl->m_touchGeneration = ++m_generation; DBG_NAV_LOGD("m_generation=%d framePtr=%p nodePtr=%p x=%d y=%d", m_generation, framePtr, nodePtr, x, y); LOG_ASSERT(m_javaGlue.m_obj, "A WebView was not associated with this WebViewNative!"); @@ -1566,6 +1565,12 @@ static bool nativeCursorIsAnchor(JNIEnv *env, jobject obj) return node ? node->isAnchor() : false; } +static bool nativeCursorIsReadOnly(JNIEnv *env, jobject obj) +{ + const CachedNode* node = getCursorNode(env, obj); + return node ? node->isReadOnly() : false; +} + static bool nativeCursorIsTextInput(JNIEnv *env, jobject obj) { const CachedNode* node = getCursorNode(env, obj); @@ -2099,6 +2104,8 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeCursorIntersects }, { "nativeCursorIsAnchor", "()Z", (void*) nativeCursorIsAnchor }, + { "nativeCursorIsReadOnly", "()Z", + (void*) nativeCursorIsReadOnly }, { "nativeCursorIsTextInput", "()Z", (void*) nativeCursorIsTextInput }, { "nativeCursorPosition", "()Landroid/graphics/Point;", |
