OSDN Git Service

use text slop for ring test
authorCary Clark <cary@android.com>
Thu, 23 Dec 2010 19:47:34 +0000 (14:47 -0500)
committerCary Clark <cary@android.com>
Thu, 23 Dec 2010 19:47:34 +0000 (14:47 -0500)
The mTextSlop contains the cursor ring test area.
The mTestBounds contains the total test area.

Use the former when checking to see if text is
drawn outside of the cursor rings, but inside
the bounds.

bug:3307120
Change-Id: Ice69ce3d70aabb435890a0fd8848ef3fe2de9796

WebKit/android/nav/CachedRoot.cpp

index 7bedd4f..0c92498 100644 (file)
@@ -876,11 +876,11 @@ public:
                 layers->getBounds().fRight, layers->getBounds().fBottom,
                 collectGlyphs ? "true" : "false",
                 mTestBounds.intersects(*layers) ? "true" : "false",
-                mTestBounds.contains(*layers) ? "true" : "false");
+                mTextSlop.contains(*layers) ? "true" : "false");
             if (collectGlyphs && layerType == kDrawGlyph_Type) {
                 if (!mTestBounds.intersects(*layers))
                     continue;
-                if (!mTestBounds.contains(*layers))
+                if (!mTextSlop.contains(*layers))
                     return false;
                 foundGlyph = true;
             }