| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/PaintLayer.h" | 5 #include "core/paint/PaintLayer.h" |
| 6 | 6 |
| 7 #include "core/html/HTMLIFrameElement.h" | 7 #include "core/html/HTMLIFrameElement.h" |
| 8 #include "core/layout/LayoutBoxModelObject.h" | 8 #include "core/layout/LayoutBoxModelObject.h" |
| 9 #include "core/layout/LayoutTestHelper.h" | 9 #include "core/layout/LayoutTestHelper.h" |
| 10 #include "core/layout/LayoutView.h" | 10 #include "core/layout/LayoutView.h" |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 ->layer(); | 619 ->layer(); |
| 620 | 620 |
| 621 // enclosingLayerWithCompositedLayerMapping is not needed or applicable to | 621 // enclosingLayerWithCompositedLayerMapping is not needed or applicable to |
| 622 // SPv2. | 622 // SPv2. |
| 623 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 623 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 624 EXPECT_EQ(compositedContainer, | 624 EXPECT_EQ(compositedContainer, |
| 625 target->enclosingLayerWithCompositedLayerMapping(ExcludeSelf)); | 625 target->enclosingLayerWithCompositedLayerMapping(ExcludeSelf)); |
| 626 } | 626 } |
| 627 } | 627 } |
| 628 | 628 |
| 629 TEST_P(PaintLayerTest, CompositingContainerSelfPaintingNonStackedFloat) { |
| 630 setBodyInnerHTML( |
| 631 "<div id='container' style='position: relative'>" |
| 632 " <span id='span' style='opacity: 0.9'>" |
| 633 " <div id='target' style='columns: 1; float: left'></div>" |
| 634 " </span>" |
| 635 "</div>"); |
| 636 |
| 637 // The target layer is self-painting, but not stacked. |
| 638 PaintLayer* target = |
| 639 toLayoutBoxModelObject(getLayoutObjectByElementId("target"))->layer(); |
| 640 EXPECT_TRUE(target->isSelfPaintingLayer()); |
| 641 EXPECT_FALSE(target->stackingNode()->isStacked()); |
| 642 |
| 643 PaintLayer* span = |
| 644 toLayoutBoxModelObject(getLayoutObjectByElementId("span"))->layer(); |
| 645 EXPECT_EQ(span, target->compositingContainer()); |
| 646 } |
| 647 |
| 629 } // namespace blink | 648 } // namespace blink |
| OLD | NEW |