Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintLayerTest.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp |
| index 3341e981fd596ea4b88693315bfe66f40a99fd81..7b0f5bb6c7afcbb9ffabb023ebd933a2b349ded1 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp |
| @@ -516,7 +516,7 @@ TEST_P(PaintLayerTest, PaintInvalidationOnCompositedScroll) { |
| EXPECT_EQ(LayoutRect(0, 30, 50, 5), content->visualRect()); |
| } |
| -TEST_P(PaintLayerTest, CompositingContainerFloat) { |
| +TEST_P(PaintLayerTest, CompositingContainerFloatUnderInline) { |
| enableCompositing(); |
| setBodyInnerHTML( |
| "<div id='compositedContainer' style='position: relative;" |
| @@ -547,6 +547,39 @@ TEST_P(PaintLayerTest, CompositingContainerFloat) { |
| } |
| } |
| +TEST_P(PaintLayerTest, CompositingContainerUnderFloatUnderInline) { |
|
Xianzhu
2017/03/30 22:23:12
This test also passes without any real code change
|
| + enableCompositing(); |
| + setBodyInnerHTML( |
| + "<div id='compositedContainer' style='position: relative;" |
| + " will-change: transform'>" |
| + " <div id='containingBlock' style='position: relative; z-index: 0'>" |
| + " <div style='backface-visibility: hidden'></div>" |
| + " <span id='span'" |
| + " style='clip-path: polygon(0px 15px, 0px 54px, 100px 0px)'>" |
| + " <div style='float: right'>" |
| + " <div id='target' style='position: relative'></div>" |
| + " </div>" |
| + " </span>" |
| + " </div>" |
| + "</div>"); |
| + |
| + PaintLayer* target = |
| + toLayoutBoxModelObject(getLayoutObjectByElementId("target"))->layer(); |
| + PaintLayer* span = |
| + toLayoutBoxModelObject(getLayoutObjectByElementId("span"))->layer(); |
| + EXPECT_EQ(span, target->compositingContainer()); |
| + PaintLayer* compositedContainer = |
| + toLayoutBoxModelObject(getLayoutObjectByElementId("compositedContainer")) |
| + ->layer(); |
| + |
| + // enclosingLayerWithCompositedLayerMapping is not needed or applicable to |
| + // SPv2. |
| + if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| + EXPECT_EQ(compositedContainer, |
| + target->enclosingLayerWithCompositedLayerMapping(ExcludeSelf)); |
| + } |
| +} |
| + |
| TEST_P(PaintLayerTest, FloatLayerAndAbsoluteUnderInlineLayer) { |
| setBodyInnerHTML( |
| "<div id='container' style='position: absolute; top: 20px; left: 20px'>" |