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

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

Issue 2337503002: Don't automatically paint clipped backgrounds into scrolling contents layer. (Closed)
Patch Set: Turn off scrolling contents layer background painting when we have a CSS clip Created 4 years, 3 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/layout/LayoutBoxModelObject.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/PaintLayerScrollableAreaTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp
index b4e369f36dc4b8d0030bb6c9a6db099649cdc6be..a63b89e7b0df76b3acf8df2e19fab9c7839d5763 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp
@@ -35,6 +35,7 @@ TEST_F(PaintLayerScrollableAreaTest, ShouldPaintBackgroundOntoScrollingContentsL
"<div id='scroller14' class='scroller' style='background: white; border: 1px solid black; outline: 1px solid blue; outline-offset: -1px;'><div class='spacer'></div></div>"
"<div id='scroller15' class='scroller' style='background: white; border: 1px solid black; outline: 1px solid blue; outline-offset: -2px;'><div class='spacer'></div></div>"
"<div id='scroller16' class='scroller' style='background: white; border 1px solid black; border-radius: 2px;'><div class='spacer'></div></div>"
+ "<div id='scroller17' class='scroller' style='background: white; clip: rect(0px,10px,10px,0px);'><div class='spacer'></div></div>"
);
// #scroller1 cannot paint background into scrolling contents layer because it has a negative z-index child.
@@ -95,6 +96,10 @@ TEST_F(PaintLayerScrollableAreaTest, ShouldPaintBackgroundOntoScrollingContentsL
// #scroller16 cannot paint background into scrolling contents layer because it has a
// border radius.
EXPECT_FALSE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller16"));
+
+ // #scroller17 cannot paint background into scrolling contents layer because the scroller has a clip which
+ // would not be respected by the scrolling contents layer.
+ EXPECT_FALSE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller17"));
}
TEST_F(PaintLayerScrollableAreaTest, OpaqueLayersPromoted)
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698