summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/CachedNode.cpp
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2011-02-14 14:26:57 -0500
committerCary Clark <cary@android.com>2011-02-14 14:26:57 -0500
commit99a3d689283e80afdfb9e7711900dd9906f4c1f4 (patch)
treecf96c198600efde0591b274d8f61769071e4ce19 /WebKit/android/nav/CachedNode.cpp
parente5c90f700f64667817813fbb2e8478ddb7a6927b (diff)
downloadexternal_webkit-99a3d689283e80afdfb9e7711900dd9906f4c1f4.zip
external_webkit-99a3d689283e80afdfb9e7711900dd9906f4c1f4.tar.gz
external_webkit-99a3d689283e80afdfb9e7711900dd9906f4c1f4.tar.bz2
don't combine single image bitmaps
Anchors and other links often contain multiple bitmaps, which must be stitched together when analyzing the picture data to determine if the anchor is fully visible, partially occluded, or fully hidden. For instance, nine-patches in WebKit appear as adjacent bitmaps. If a website design has two or more bitmaps adjacent to each other, these may be mistakenly joined. By tracking whether the original node contained exactly one img element, combining bitmaps based on their location is avoided unncessarily. bug:3373743 Change-Id: I5bcbdaec3097a2b839ee2444e512a0def6a016d0
Diffstat (limited to 'WebKit/android/nav/CachedNode.cpp')
-rw-r--r--WebKit/android/nav/CachedNode.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/WebKit/android/nav/CachedNode.cpp b/WebKit/android/nav/CachedNode.cpp
index 4ba7b48..e3ba34d 100644
--- a/WebKit/android/nav/CachedNode.cpp
+++ b/WebKit/android/nav/CachedNode.cpp
@@ -110,7 +110,7 @@ void CachedNode::fixUpCursorRects(const CachedFrame* frame)
mFixedUpCursorRects = true;
// if the hit-test rect doesn't intersect any other rect, use it
if (mHitBounds != mBounds && mHitBounds.contains(mBounds) &&
- frame->checkRings(this, mCursorRing, mBounds, mHitBounds)) {
+ frame->checkRings(this, mHitBounds)) {
DBG_NAV_LOGD("use mHitBounds (%d,%d,%d,%d)", mHitBounds.x(),
mHitBounds.y(), mHitBounds.width(), mHitBounds.height());
mUseHitBounds = true;
@@ -122,7 +122,7 @@ void CachedNode::fixUpCursorRects(const CachedFrame* frame)
// any other cursor ring bounds, use it
IntRect sloppyBounds = mBounds;
sloppyBounds.inflate(2); // give it a couple of extra pixels
- if (frame->checkRings(this, mCursorRing, mBounds, sloppyBounds)) {
+ if (frame->checkRings(this, sloppyBounds)) {
DBG_NAV_LOGD("use mBounds (%d,%d,%d,%d)", mBounds.x(),
mBounds.y(), mBounds.width(), mBounds.height());
mUseBounds = true;
@@ -424,6 +424,7 @@ void CachedNode::Debug::print() const
DEBUG_PRINT_BOOL(mLast);
DEBUG_PRINT_BOOL(mUseBounds);
DEBUG_PRINT_BOOL(mUseHitBounds);
+ DEBUG_PRINT_BOOL(mSingleImage);
}
#endif