diff options
| author | Leon Scroggins <scroggo@google.com> | 2009-06-24 13:44:25 -0400 |
|---|---|---|
| committer | Leon Scroggins <scroggo@google.com> | 2009-06-25 17:01:57 -0400 |
| commit | 846dd02baeb22227f22c9fda72e48f6810568c14 (patch) | |
| tree | 4b231b2b94acbe4e681e952760b1c881ed45acd9 /WebKit | |
| parent | bdea3628828014f50d540d825722081f9116a837 (diff) | |
| download | external_webkit-846dd02baeb22227f22c9fda72e48f6810568c14.zip external_webkit-846dd02baeb22227f22c9fda72e48f6810568c14.tar.gz external_webkit-846dd02baeb22227f22c9fda72e48f6810568c14.tar.bz2 | |
Invalidate the full rectangle of the highlight when clearing it.
In drawCursorRing, we potentially use a different value than bounds
for the cursor ring. If we use that other value, also use it for
the invalidation to clear it later.
Diffstat (limited to 'WebKit')
| -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" |
