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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerTest.cpp

Issue 2690633002: Fix PaintLayer::compositingContainer for self-painting non-stacked layers (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698