Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: third_party/WebKit/Source/platform/geometry/LayoutRect.h

Issue 1817693002: Support edge-inclusive intersections in mapToVisibleRectInAncestorSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer-idle-callback
Patch Set: more tests Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/geometry/LayoutRect.h
diff --git a/third_party/WebKit/Source/platform/geometry/LayoutRect.h b/third_party/WebKit/Source/platform/geometry/LayoutRect.h
index 0964d2559f32c2b2a0dd155cdad4c73b0706bce3..6811d62a80ecb1dc5258783ace3f021f806e728b 100644
--- a/third_party/WebKit/Source/platform/geometry/LayoutRect.h
+++ b/third_party/WebKit/Source/platform/geometry/LayoutRect.h
@@ -164,6 +164,15 @@ public:
void unite(const LayoutRect&);
void uniteIfNonZero(const LayoutRect&);
+ // Set this rect to be the intersection of itself and the argument rect
+ // using edge-inclusive geometry. If the two rectangles overlap but the
+ // overlap region is zero-area (either because one of the two rectangles
+ // is zero-area, or because the rectangles overlap at an edge or a corner),
+ // the result is the zero-area intersection. The return value indicates
+ // whether the two rectangle actually have an intersection, since checking
+ // the result for isEmpty() is not conclusive.
+ bool inclusiveIntersect(const LayoutRect&);
+
// Besides non-empty rects, this method also unites empty rects (as points or line segments).
// For example, union of (100, 100, 0x0) and (200, 200, 50x0) is (100, 100, 150x100).
void uniteEvenIfEmpty(const LayoutRect&);

Powered by Google App Engine
This is Rietveld 408576698