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

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

Issue 2826273005: Don't include descendants into LocalVisualRect if a box has both mask and overflow clip (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp
index 8bba370c01edf701daf86cde8d0e6dfff6295433..0b6c93be89dd7563d402c3c1698fb33ec0dceb5c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp
@@ -232,4 +232,35 @@ TEST_F(LayoutBoxTest, ControlClip) {
#endif
}
+TEST_F(LayoutBoxTest, LocalVisualRectWithMask) {
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ return;
+
+ SetBodyInnerHTML(
+ "<div id='target' style='-webkit-mask-image: url(#a);"
+ " width: 100px; height: 100px; background: blue'>"
+ " <div style='width: 300px; height: 10px; background: green'></div>"
+ "</div>");
+
+ LayoutBox* target = ToLayoutBox(GetLayoutObjectByElementId("target"));
+ EXPECT_TRUE(target->HasMask());
+ EXPECT_EQ(LayoutRect(0, 0, 300, 100), target->LocalVisualRect());
+}
+
+TEST_F(LayoutBoxTest, LocalVisualRectWithMaskAndOverflowClip) {
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ return;
+
+ SetBodyInnerHTML(
+ "<div id='target' style='-webkit-mask-image: url(#a); overflow: hidden;"
+ " width: 100px; height: 100px; background: blue'>"
+ " <div style='width: 300px; height: 10px; background: green'></div>"
+ "</div>");
+
+ LayoutBox* target = ToLayoutBox(GetLayoutObjectByElementId("target"));
+ EXPECT_TRUE(target->HasMask());
+ EXPECT_TRUE(target->HasOverflowClip());
+ EXPECT_EQ(LayoutRect(0, 0, 100, 100), target->LocalVisualRect());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698