summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-11-30 10:24:15 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-11-30 10:24:15 -0800
commit21bca2af9251ca60b9b7aa6b36b422160deeb23f (patch)
tree847648ce7e05516c4b75b431ef5887ac706c8e93 /WebKit
parent3f4a1ac72d3e079f00c5d6cec3d163c7c7448abc (diff)
parent3bd6ae434ca872f56161160f7825f535c2f39b8f (diff)
downloadexternal_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.cpp8
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)",