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

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

Issue 2624843002: Return the enclosing composited PaintLayer rather than containingBlock for floats. (Closed)
Patch Set: none Created 3 years, 11 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 410c2cb5ad80094e7979b3464cd533870349375c..0a8bd310fe5481d2de08595e24ca883d3f04a5bd 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
@@ -501,11 +501,14 @@ TEST_P(PaintLayerTest, PaintInvalidationOnCompositedScroll) {
TEST_P(PaintLayerTest, CompositingContainerFloat) {
enableCompositing();
setBodyInnerHTML(
- "<div id='containingBlock' style='position: relative; z-index: 0'>"
- " <div style='backface-visibility: hidden'></div>"
- " <span style='clip-path: polygon(0px 15px, 0px 54px, 100px 0px)'>"
- " <div id='target' style='float: right; position: relative'></div>"
- " </span>"
+ "<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 style='clip-path: polygon(0px 15px, 0px 54px, 100px 0px)'>"
+ " <div id='target' style='float: right; position: relative'></div>"
+ " </span>"
+ " </div>"
"</div>");
PaintLayer* target =
@@ -514,6 +517,16 @@ TEST_P(PaintLayerTest, CompositingContainerFloat) {
toLayoutBoxModelObject(getLayoutObjectByElementId("containingBlock"))
->layer();
EXPECT_EQ(containingBlock, 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));
+ }
}
} // namespace blink
« 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