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

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

Issue 2794633002: [SPv2] Fix logic for blending effect nodes due to non-isolated children of SVG. (Closed)
Patch Set: none Created 3 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/paint/PaintPropertyTreeBuilderTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
index 092fefa73b8a9de19d77828b29584d6d27ff62bd..518232196fb2c1acba50429c2719506f2876a5de 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -3394,4 +3394,19 @@ TEST_P(PaintPropertyTreeBuilderTest, SVGHiddenResource) {
transformOutsideUseProperties->transform()->parent());
}
+TEST_P(PaintPropertyTreeBuilderTest, SVGRootBlending) {
+ setBodyInnerHTML(
+ "<svg id='svgroot' 'width=100' height='100'"
+ " style='position: relative; z-index: 0'>"
+ " <rect width='100' height='100' fill='#00FF00'"
+ " style='mix-blend-mode: difference'/>"
+ "</svg>");
+
+ LayoutObject& svgRoot = *document().getElementById("svgroot")->layoutObject();
+ const ObjectPaintProperties* svgRootProperties = svgRoot.paintProperties();
+ EXPECT_TRUE(svgRootProperties->effect());
+ EXPECT_EQ(EffectPaintPropertyNode::root(),
+ svgRootProperties->effect()->parent());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698