Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp |
index dfc4dd7649571825a77990f8fc470fb8793b69ca..81feedf39484dfd5558427b612fbe63cc87a7ded 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp |
@@ -958,16 +958,16 @@ TEST_P(PaintPropertyTreeBuilderTest, BorderRadiusClip) { |
} |
TEST_P(PaintPropertyTreeBuilderTest, TransformNodesAcrossSubframes) { |
+ setChildFrameHTML( |
+ "<style>body { margin: 0; }</style><div id='transform' style='transform: " |
+ "translate3d(4px, 5px, 6px); width: 100px; height: 200px'></div>"); |
+ |
setBodyInnerHTML( |
"<style>body { margin: 0; }</style>" |
"<div id='divWithTransform' style='transform: translate3d(1px, 2px, " |
"3px);'>" |
- " <iframe style='border: 7px solid black' id='frame'></iframe>" |
+ " <iframe style='border: 7px solid black'></iframe>" |
"</div>"); |
- Document& frameDocument = setupChildIframe( |
- "frame", |
- "<style>body { margin: 0; }</style><div id='transform' style='transform: " |
- "translate3d(4px, 5px, 6px); width: 100px; height: 200px'></div>"); |
FrameView* frameView = document().view(); |
frameView->updateAllLifecyclePhases(); |
@@ -980,47 +980,46 @@ TEST_P(PaintPropertyTreeBuilderTest, TransformNodesAcrossSubframes) { |
CHECK_EXACT_VISUAL_RECT(LayoutRect(1, 2, 800, 164), divWithTransform, |
frameView->layoutView()); |
- LayoutObject* innerDivWithTransform = |
- frameDocument.getElementById("transform")->layoutObject(); |
- const ObjectPaintProperties* innerDivWithTransformProperties = |
- innerDivWithTransform->paintProperties(); |
- auto* innerDivTransform = innerDivWithTransformProperties->transform(); |
- EXPECT_EQ(TransformationMatrix().translate3d(4, 5, 6), |
- innerDivTransform->matrix()); |
- CHECK_EXACT_VISUAL_RECT(LayoutRect(12, 14, 100, 145), innerDivWithTransform, |
- frameView->layoutView()); |
+ LayoutObject* innerDivWithTransform = |
+ childDocument().getElementById("transform")->layoutObject(); |
+ const ObjectPaintProperties* innerDivWithTransformProperties = |
+ innerDivWithTransform->paintProperties(); |
+ auto* innerDivTransform = innerDivWithTransformProperties->transform(); |
+ EXPECT_EQ(TransformationMatrix().translate3d(4, 5, 6), |
+ innerDivTransform->matrix()); |
+ CHECK_EXACT_VISUAL_RECT(LayoutRect(12, 14, 100, 145), innerDivWithTransform, |
+ frameView->layoutView()); |
- // Ensure that the inner div's transform is correctly rooted in the root |
- // frame's transform tree. |
- // This asserts that we have the following tree structure: |
- // ... |
- // Transform transform=translation=1.000000,2.000000,3.000000 |
- // PreTranslation transform=translation=7.000000,7.000000,0.000000 |
- // ScrollTranslation transform=translation=0.000000,0.000000,0.000000 |
- // Transform transform=translation=4.000000,5.000000,6.000000 |
- auto* innerDocumentScrollTranslation = innerDivTransform->parent(); |
- EXPECT_EQ(TransformationMatrix().translate3d(0, 0, 0), |
- innerDocumentScrollTranslation->matrix()); |
- auto* iframePreTranslation = innerDocumentScrollTranslation->parent(); |
- EXPECT_EQ(TransformationMatrix().translate3d(7, 7, 0), |
- iframePreTranslation->matrix()); |
- EXPECT_EQ(divWithTransformProperties->transform(), |
- iframePreTranslation->parent()); |
+ // Ensure that the inner div's transform is correctly rooted in the root |
+ // frame's transform tree. |
+ // This asserts that we have the following tree structure: |
+ // ... |
+ // Transform transform=translation=1.000000,2.000000,3.000000 |
+ // PreTranslation transform=translation=7.000000,7.000000,0.000000 |
+ // ScrollTranslation transform=translation=0.000000,0.000000,0.000000 |
+ // Transform transform=translation=4.000000,5.000000,6.000000 |
+ auto* innerDocumentScrollTranslation = innerDivTransform->parent(); |
+ EXPECT_EQ(TransformationMatrix().translate3d(0, 0, 0), |
+ innerDocumentScrollTranslation->matrix()); |
+ auto* iframePreTranslation = innerDocumentScrollTranslation->parent(); |
+ EXPECT_EQ(TransformationMatrix().translate3d(7, 7, 0), |
+ iframePreTranslation->matrix()); |
+ EXPECT_EQ(divWithTransformProperties->transform(), |
+ iframePreTranslation->parent()); |
} |
TEST_P(PaintPropertyTreeBuilderTest, TransformNodesInTransformedSubframes) { |
+ setChildFrameHTML( |
+ "<style>body { margin: 31px; }</style><div " |
+ "id='transform' style='transform: translate3d(7px, 8px, " |
+ "9px); width: 100px; height: 200px'></div>"); |
setBodyInnerHTML( |
"<style>body { margin: 0; }</style>" |
"<div id='divWithTransform' style='transform: translate3d(1px, 2px, " |
"3px);'>" |
- " <iframe id='frame' style='transform: translate3d(4px, 5px, 6px); " |
+ " <iframe style='transform: translate3d(4px, 5px, 6px); " |
"border: 42px solid; margin: 7px;'></iframe>" |
"</div>"); |
- Document& frameDocument = |
- setupChildIframe("frame", |
- "<style>body { margin: 31px; }</style><div " |
- "id='transform' style='transform: translate3d(7px, 8px, " |
- "9px); width: 100px; height: 200px'></div>"); |
FrameView* frameView = document().view(); |
frameView->updateAllLifecyclePhases(); |
@@ -1035,7 +1034,7 @@ TEST_P(PaintPropertyTreeBuilderTest, TransformNodesInTransformedSubframes) { |
// Transform transform=translation=7.000000,8.000000,9.000000 |
LayoutObject* innerDivWithTransform = |
- frameDocument.getElementById("transform")->layoutObject(); |
+ childDocument().getElementById("transform")->layoutObject(); |
auto* innerDivTransform = |
innerDivWithTransform->paintProperties()->transform(); |
EXPECT_EQ(TransformationMatrix().translate3d(7, 8, 9), |