diff options
| author | Cary Clark <cary@android.com> | 2010-01-13 08:30:03 -0500 |
|---|---|---|
| committer | Cary Clark <cary@android.com> | 2010-01-13 08:53:23 -0500 |
| commit | 3bbaa0e0bda36b5a555a55d744d8f1b287b1df37 (patch) | |
| tree | 453b65716a19b963e8fa03aeba415233634debfc /WebKit/android/nav | |
| parent | 281327f5e60fa56769d50a55d9dd6b96f5ea5ffb (diff) | |
| download | external_webkit-3bbaa0e0bda36b5a555a55d744d8f1b287b1df37.zip external_webkit-3bbaa0e0bda36b5a555a55d744d8f1b287b1df37.tar.gz external_webkit-3bbaa0e0bda36b5a555a55d744d8f1b287b1df37.tar.bz2 | |
clip the cursor rings if occluded
Also, if a smaller object, like text, is drawn over a occluding rectangle,
ignore it, and don't reset the occluded state.
fixes http://b/2319610
Diffstat (limited to 'WebKit/android/nav')
| -rw-r--r-- | WebKit/android/nav/CachedRoot.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/WebKit/android/nav/CachedRoot.cpp b/WebKit/android/nav/CachedRoot.cpp index d9669bd..5805e5f 100644 --- a/WebKit/android/nav/CachedRoot.cpp +++ b/WebKit/android/nav/CachedRoot.cpp @@ -154,11 +154,11 @@ public: } if (interestingType == false) return false; - if (mBoundsSlop.contains(rect) || + if (!mDrawnOver.contains(rect) && (mBoundsSlop.contains(rect) || (mBounds.fLeft == rect.fLeft && mBounds.fRight == rect.fRight && mBounds.fTop >= rect.fTop && mBounds.fBottom <= rect.fBottom) || (mBounds.fTop == rect.fTop && mBounds.fBottom == rect.fBottom && - mBounds.fLeft >= rect.fLeft && mBounds.fRight <= rect.fRight)) { + mBounds.fLeft >= rect.fLeft && mBounds.fRight <= rect.fRight))) { mDrawnOver.setEmpty(); mAllDrawnIn.join(rect); DBG_NAV_LOGD("BoundsCheck (contains) rect={%d,%d,%d,%d}" @@ -1125,8 +1125,8 @@ bool CachedRoot::maskIfHidden(BestData* best) const checker.drawPicture(*mPicture); boundsCheck.checkLast(); // was it not drawn or clipped out? + CachedNode* node = const_cast<CachedNode*>(best->mNode); if (boundsCheck.hidden()) { // if hidden, return false so that nav can try again - CachedNode* node = const_cast<CachedNode*>(best->mNode); #if DEBUG_NAV_UI const SkIRect& m = boundsCheck.mBounds; const SkIRect& s = boundsCheck.mBoundsSlop; @@ -1177,12 +1177,14 @@ bool CachedRoot::maskIfHidden(BestData* best) const #if DEBUG_NAV_UI const SkIRect& modded = boundsCheck.mBounds; DBG_NAV_LOGD("partially occluded node:%p (%d) old:{%d,%d,%d,%d}" - " new:{%d,%d,%d,%d}", best->mNode, best->mNode->index(), + " new:{%d,%d,%d,%d}", node, node->index(), orig.fLeft, orig.fTop, orig.fRight, orig.fBottom, base.fLeft, base.fTop, base.fRight, base.fBottom); #endif best->mMouseBounds = WebCore::IntRect(bounds.x() + base.fLeft - kMargin, bounds.y() + base.fTop - kMargin, base.width(), base.height()); + node->clip(best->mMouseBounds); + return true; } return false; } |
