diff options
Diffstat (limited to 'WebKit/android/nav/WebView.cpp')
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index a6e0d37..57c5a95 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -458,6 +458,16 @@ void drawCursorRing(SkCanvas* canvas) root->getSimulatedMousePosition(&m_viewImpl->m_cursorLocation); m_viewImpl->m_cursorNode = node->nodePointer(); m_viewImpl->gCursorBoundsMutex.unlock(); + + WTF::Vector<WebCore::IntRect> oneRing; + bool useHitBounds = node->useHitBounds(); + if (useHitBounds) { + bounds = node->hitBounds(); + } + if (useHitBounds || node->useBounds()) { + oneRing.append(bounds); + rings = &oneRing; + } bounds.inflate(SkScalarCeil(CURSOR_RING_OUTER_DIAMETER)); if (canvas->quickReject(bounds, SkCanvas::kAA_EdgeType)) { DBG_NAV_LOGD("canvas->quickReject cursorNode=%d (nodePointer=%p)" @@ -467,7 +477,6 @@ void drawCursorRing(SkCanvas* canvas) return; } CursorRing::Flavor flavor = CursorRing::NORMAL_FLAVOR; - WTF::Vector<WebCore::IntRect> oneRing; if (!isButton) { flavor = node->type() != NORMAL_CACHEDNODETYPE ? CursorRing::FAKE_FLAVOR : CursorRing::NORMAL_FLAVOR; @@ -479,11 +488,6 @@ void drawCursorRing(SkCanvas* canvas) flavor = static_cast<CursorRing::Flavor> (flavor + CursorRing::NORMAL_ANIMATING); } - bool useHitBounds = node->useHitBounds(); - if (useHitBounds || node->useBounds()) { - oneRing.append(useHitBounds ? node->hitBounds() : node->bounds()); - rings = &oneRing; - } #if DEBUG_NAV_UI const WebCore::IntRect& ring = (*rings)[0]; DBG_NAV_LOGD("cursorNode=%d (nodePointer=%p) flavor=%s rings=%d" |