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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp

Issue 1817693002: Support edge-inclusive intersections in mapToVisibleRectInAncestorSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer-idle-callback
Patch Set: Address comments, add mapToVisibleRectInContainerSpace test 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/core/layout/LayoutObjectTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
index ca38e7dbde378cc0ca7de8fdf33e9bedec7527f2..7f471a7409afa566e75e4bd84c8ca87956e57542 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
@@ -118,8 +118,12 @@ TEST_F(LayoutObjectTest, MapToVisibleRectInAncestorSpace)
container->setScrollTop(LayoutUnit(50));
LayoutRect rect(0, 60, 20, 20);
- text->mapToVisibleRectInAncestorSpace(container, rect, nullptr);
+ EXPECT_TRUE(text->mapToVisibleRectInAncestorSpace(container, rect, nullptr));
EXPECT_TRUE(rect == LayoutRect(0, 10, 20, 20));
+
+ rect = LayoutRect(0, 60, 20, 0);
+ EXPECT_TRUE(text->mapToVisibleRectInAncestorSpace(container, rect, nullptr, EdgeInclusive));
+ EXPECT_TRUE(rect == LayoutRect(0, 10, 20, 0));
chrishtr 2016/03/22 19:54:26 Why does this example yield a zero-area rect? Isn'
szager1 2016/03/23 23:26:59 No; the input rect has zero height, so the result
chrishtr 2016/03/24 21:18:43 ?
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698