diff options
| author | Cary Clark <cary@android.com> | 2010-11-29 16:28:22 -0500 |
|---|---|---|
| committer | Cary Clark <cary@android.com> | 2010-11-29 16:40:21 -0500 |
| commit | 3bd6ae434ca872f56161160f7825f535c2f39b8f (patch) | |
| tree | 2b76d154dba23d1ad271f9524be7cc5e796c7f60 /WebKit | |
| parent | 6bd88008bc13895cca3e78ccb0460a61d3be331f (diff) | |
| download | external_webkit-3bd6ae434ca872f56161160f7825f535c2f39b8f.zip external_webkit-3bd6ae434ca872f56161160f7825f535c2f39b8f.tar.gz external_webkit-3bd6ae434ca872f56161160f7825f535c2f39b8f.tar.bz2 | |
hit test complete node even if partially visible
An older test incorrectly discards nodes if they are partially
off the screen. The test was attempting to ignore nodes that
were fully invisible, so change the test to do that.
bug:3198707
Change-Id: I3cb13de3c86b43d3388849161bdfc44f84d93b3d
Diffstat (limited to 'WebKit')
| -rw-r--r-- | WebKit/android/nav/CachedRoot.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/WebKit/android/nav/CachedRoot.cpp b/WebKit/android/nav/CachedRoot.cpp index 1a31c15..7d5f3d9 100644 --- a/WebKit/android/nav/CachedRoot.cpp +++ b/WebKit/android/nav/CachedRoot.cpp @@ -1112,10 +1112,12 @@ void CachedRoot::calcBitBounds(const IntRect& nodeBounds, IntRect* bitBounds) co IntRect contentBounds = IntRect(0, 0, mPicture->width(), mPicture->height()); IntRect overBounds = nodeBounds; overBounds.inflate(kMargin); - *bitBounds = mScrolledBounds; - bitBounds->unite(mViewBounds); - bitBounds->intersect(contentBounds); + IntRect viewableBounds = mScrolledBounds; + viewableBounds.unite(mViewBounds); + *bitBounds = contentBounds; bitBounds->intersect(overBounds); + if (!bitBounds->intersects(viewableBounds)) + *bitBounds = IntRect(0, 0, 0, 0); DBG_NAV_LOGD("contentBounds=(%d,%d,r=%d,b=%d) overBounds=(%d,%d,r=%d,b=%d)" " mScrolledBounds=(%d,%d,r=%d,b=%d) mViewBounds=(%d,%d,r=%d,b=%d)" " bitBounds=(%d,%d,r=%d,b=%d)", |
