diff options
| author | Cary Clark <cary@android.com> | 2010-11-30 10:24:15 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-11-30 10:24:15 -0800 |
| commit | 21bca2af9251ca60b9b7aa6b36b422160deeb23f (patch) | |
| tree | 847648ce7e05516c4b75b431ef5887ac706c8e93 /WebKit | |
| parent | 3f4a1ac72d3e079f00c5d6cec3d163c7c7448abc (diff) | |
| parent | 3bd6ae434ca872f56161160f7825f535c2f39b8f (diff) | |
| download | external_webkit-21bca2af9251ca60b9b7aa6b36b422160deeb23f.zip external_webkit-21bca2af9251ca60b9b7aa6b36b422160deeb23f.tar.gz external_webkit-21bca2af9251ca60b9b7aa6b36b422160deeb23f.tar.bz2 | |
Merge "hit test complete node even if partially visible"
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)", |
