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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintPropertyTreeBuilderTest.h" 5 #include "core/paint/PaintPropertyTreeBuilderTest.h"
6 6
7 #include "core/html/HTMLIFrameElement.h" 7 #include "core/html/HTMLIFrameElement.h"
8 #include "core/layout/LayoutTreeAsText.h" 8 #include "core/layout/LayoutTreeAsText.h"
9 #include "core/paint/ObjectPaintProperties.h" 9 #include "core/paint/ObjectPaintProperties.h"
10 #include "core/paint/PaintPropertyTreePrinter.h" 10 #include "core/paint/PaintPropertyTreePrinter.h"
(...skipping 3376 matching lines...) Expand 10 before | Expand all | Expand 10 after
3387 // The <marker> object resets to a new paint property tree, so the 3387 // The <marker> object resets to a new paint property tree, so the
3388 // transform within it should have the root as parent. 3388 // transform within it should have the root as parent.
3389 EXPECT_EQ(TransformPaintPropertyNode::root(), 3389 EXPECT_EQ(TransformPaintPropertyNode::root(),
3390 transformInsideSymbolProperties->transform()->parent()); 3390 transformInsideSymbolProperties->transform()->parent());
3391 3391
3392 // Whereas this is not true of the transform above the path. 3392 // Whereas this is not true of the transform above the path.
3393 EXPECT_EQ(svgProperties->svgLocalToBorderBoxTransform(), 3393 EXPECT_EQ(svgProperties->svgLocalToBorderBoxTransform(),
3394 transformOutsideUseProperties->transform()->parent()); 3394 transformOutsideUseProperties->transform()->parent());
3395 } 3395 }
3396 3396
3397 TEST_P(PaintPropertyTreeBuilderTest, SVGRootBlending) {
3398 setBodyInnerHTML(
3399 "<svg id='svgroot' 'width=100' height='100'"
3400 " style='position: relative; z-index: 0'>"
3401 " <rect width='100' height='100' fill='#00FF00'"
3402 " style='mix-blend-mode: difference'/>"
3403 "</svg>");
3404
3405 LayoutObject& svgRoot = *document().getElementById("svgroot")->layoutObject();
3406 const ObjectPaintProperties* svgRootProperties = svgRoot.paintProperties();
3407 EXPECT_TRUE(svgRootProperties->effect());
3408 EXPECT_EQ(EffectPaintPropertyNode::root(),
3409 svgRootProperties->effect()->parent());
3410 }
3411
3397 } // namespace blink 3412 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698