Title: [111357] trunk/Source/WebCore
Revision
111357
Author
[email protected]
Date
2012-03-19 22:21:20 -0700 (Mon, 19 Mar 2012)

Log Message

A quick early-out for Region::contains() test
https://bugs.webkit.org/show_bug.cgi?id=81625

Patch by Dana Jansens <[email protected]> on 2012-03-19
Reviewed by Anders Carlsson.

If the bounds of region B include a row/column that is outside the bounds of
region A, then region B contains a pixel within that row/column that is
outside of region A.

* platform/graphics/Region.cpp:
(WebCore::Region::contains):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (111356 => 111357)


--- trunk/Source/WebCore/ChangeLog	2012-03-20 05:20:04 UTC (rev 111356)
+++ trunk/Source/WebCore/ChangeLog	2012-03-20 05:21:20 UTC (rev 111357)
@@ -1,3 +1,17 @@
+2012-03-19  Dana Jansens  <[email protected]>
+
+        A quick early-out for Region::contains() test
+        https://bugs.webkit.org/show_bug.cgi?id=81625
+
+        Reviewed by Anders Carlsson.
+
+        If the bounds of region B include a row/column that is outside the bounds of
+        region A, then region B contains a pixel within that row/column that is
+        outside of region A.
+
+        * platform/graphics/Region.cpp:
+        (WebCore::Region::contains):
+
 2012-03-19  Eric Seidel  <[email protected]>
 
         Unreviewed attempt to fix the EFL build.

Modified: trunk/Source/WebCore/platform/graphics/Region.cpp (111356 => 111357)


--- trunk/Source/WebCore/platform/graphics/Region.cpp	2012-03-20 05:20:04 UTC (rev 111356)
+++ trunk/Source/WebCore/platform/graphics/Region.cpp	2012-03-20 05:21:20 UTC (rev 111357)
@@ -67,6 +67,9 @@
 
 bool Region::contains(const Region& region) const
 {
+    if (!m_bounds.contains(region.m_bounds))
+        return false;
+
     return WebCore::intersect(region, *this) == region;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to