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

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

Issue 2591883002: Apply both phsical bounding box and clip to composited bounds. (Closed)
Patch Set: none Created 4 years 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 aa3d293a52bb1e73c5251e9081c6f6abcf280cb4..cc0840951200ca5aa445f08b7997aaa6a021be85 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
@@ -58,6 +58,26 @@ TEST_P(PaintLayerTest, CompositedBoundsAbsPosGrandchild) {
parentLayer->boundingBoxForCompositing());
}
+TEST_P(PaintLayerTest, CompositedBoundsTransformedChild) {
+ // TODO(chrishtr): fix this test for SPv2
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ return;
+
+ setBodyInnerHTML(
+ "<div id=parent style='overflow: scroll; will-change: transform'>"
+ " <div class='target'"
+ " style='position: relative; transform: skew(-15deg);'>"
+ " </div>"
+ " <div style='width: 1000px; height: 500px; background: lightgray'>"
+ " </div>"
+ "</div>");
+
+ PaintLayer* parentLayer =
+ toLayoutBoxModelObject(getLayoutObjectByElementId("parent"))->layer();
+ EXPECT_EQ(LayoutRect(0, 0, 784, 500),
+ parentLayer->boundingBoxForCompositing());
+}
+
TEST_P(PaintLayerTest, PaintingExtentReflection) {
setBodyInnerHTML(
"<div id='target' style='background-color: blue; position: absolute;"
« 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