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

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

Issue 2682933002: Fix PaintLayer::compositingContainer for self-painting non-stacked layers (Closed)
Patch Set: Fix PaintLayer::compositingContainer for self-painting non-stacked layers 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e0fd7c42fcc8036eb677214af75f1d7c28b67929..d952793ee852dbeee877c93564e003484e9b61cc 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
@@ -663,6 +663,28 @@ TEST_P(PaintLayerTest, CompositingContainerFloatingIframe) {
}
}
+TEST_P(PaintLayerTest, CompositingContainerSelfPaintingNonStackedFloat) {
+ setBodyInnerHTML(
+ "<div id='container' style='position: relative'>"
+ " <span id='span' style='opacity: 0.9'>"
+ " <div id='target' style='columns: 1; float: left'></div>"
+ " </span>"
+ "</div>");
+
+ // The target layer is self-painting, but not stacked.
+ PaintLayer* target =
+ toLayoutBoxModelObject(getLayoutObjectByElementId("target"))->layer();
+ EXPECT_TRUE(target->isSelfPaintingLayer());
+ EXPECT_FALSE(target->stackingNode()->isStacked());
+
+ PaintLayer* container =
+ toLayoutBoxModelObject(getLayoutObjectByElementId("container"))->layer();
+ PaintLayer* span =
+ toLayoutBoxModelObject(getLayoutObjectByElementId("span"))->layer();
+ EXPECT_EQ(container, target->containingLayer());
+ EXPECT_EQ(span, target->compositingContainer());
+}
+
TEST_P(PaintLayerTest, ColumnSpanLayerUnderExtraLayerScrolled) {
setBodyInnerHTML(
"<div id='columns' style='overflow: hidden; width: 80px; height: 80px; "
« 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