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

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

Issue 2521033003: Reland: Don't early out recursion into PaintLayerChildren when computing composited bounds. (Closed)
Patch Set: none Created 4 years, 1 month 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
Index: third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp
index f8f5b6e3176bff24244369cacd9bb208c743d212..65a57b663409e43ad82bb08d7b8a27a5f508e229 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp
@@ -116,4 +116,28 @@ TEST_F(PaintLayerClipperTest, NestedContainPaintClip) {
EXPECT_EQ(LayoutRect(0, 0, 200, 400), layerBounds);
}
+TEST_F(PaintLayerClipperTest, LocalClipRectFixedUnderTransform) {
+ setBodyInnerHTML(
+ "<div id='transformed'"
+ " style='will-change: transform; width: 100px; height: 100px;"
+ " overflow: hidden'>"
+ " <div id='fixed' "
+ " style='position: fixed; width: 100px; height: 100px;"
+ " top: -50px'>"
+ " </div>"
+ "</div>");
+
+ LayoutRect infiniteRect(LayoutRect::infiniteIntRect());
+ PaintLayer* transformed =
+ toLayoutBoxModelObject(getLayoutObjectByElementId("transformed"))
+ ->layer();
+ PaintLayer* fixed =
+ toLayoutBoxModelObject(getLayoutObjectByElementId("fixed"))->layer();
+
+ EXPECT_EQ(LayoutRect(0, 0, 100, 100),
+ transformed->clipper().localClipRect(transformed));
+ EXPECT_EQ(LayoutRect(0, 50, 100, 100),
+ fixed->clipper().localClipRect(transformed));
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698