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

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp

Issue 2343673003: SVG root viewport clip in paint property tree (Closed)
Patch Set: - Created 4 years, 3 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/paint/PaintPropertyTreeBuilderTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
index 7e76f0b58f6883d1ff383362b7f37421cabb867e..57954451d1ed31b1c25eacfa6e9fcc962a0dc4a4 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -1987,4 +1987,26 @@ TEST_P(PaintPropertyTreeBuilderTest, NestedPositionedScrollProperties)
EXPECT_TRUE(overflowBScrollProperties->scroll()->userScrollableVertical());
}
+TEST_P(PaintPropertyTreeBuilderTest, SVGRootClip)
+{
+ setBodyInnerHTML(
+ "<svg id='svg' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px'>"
+ " <rect width='200' height='200' fill='red' />"
+ "</svg>");
+
+ const ClipPaintPropertyNode* clip = getLayoutObjectByElementId("svg")->objectPaintProperties()->overflowClip();
+ EXPECT_EQ(frameContentClip(), clip->parent());
+ EXPECT_EQ(FloatRoundedRect(8, 8, 100, 100), clip->clipRect());
+}
+
+TEST_P(PaintPropertyTreeBuilderTest, SVGRootNoClip)
+{
+ setBodyInnerHTML(
+ "<svg id='svg' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' style='overflow: visible'>"
+ " <rect width='200' height='200' fill='red' />"
+ "</svg>");
+
+ EXPECT_FALSE(getLayoutObjectByElementId("svg")->objectPaintProperties()->overflowClip());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698