| 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 10952bab3ae53cfdca33cc675723a82626873dbc..808575bb52fd7126e3acb80ec4d4cd9db0f78e55 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| @@ -360,6 +360,7 @@ TEST_P(PaintPropertyTreeBuilderTest, Transform) {
|
| Element* transform = document().getElementById("transform");
|
| const ObjectPaintProperties* transformProperties =
|
| transform->layoutObject()->paintProperties();
|
| +
|
| EXPECT_EQ(TransformationMatrix().translate3d(123, 456, 789),
|
| transformProperties->transform()->matrix());
|
| EXPECT_EQ(FloatPoint3D(200, 150, 0),
|
| @@ -394,6 +395,43 @@ TEST_P(PaintPropertyTreeBuilderTest, Transform) {
|
| transform->layoutObject()->paintProperties()->transform()->matrix());
|
| }
|
|
|
| +TEST_P(PaintPropertyTreeBuilderTest, Preserve3D3DTransformedDescendant) {
|
| + setBodyInnerHTML(
|
| + "<style> body { margin: 0 } </style>"
|
| + "<div id='preserve' style='transform-style: preserve-3d'>"
|
| + "<div id='transform' style='margin-left: 50px; margin-top: 100px;"
|
| + " width: 400px; height: 300px;"
|
| + " transform: translate3d(123px, 456px, 789px)'>"
|
| + "</div>"
|
| + "</div>");
|
| +
|
| + Element* preserve = document().getElementById("preserve");
|
| + const ObjectPaintProperties* preserveProperties =
|
| + preserve->layoutObject()->paintProperties();
|
| +
|
| + EXPECT_TRUE(preserveProperties->transform());
|
| + EXPECT_TRUE(preserveProperties->transform()->hasDirectCompositingReasons());
|
| +}
|
| +
|
| +TEST_P(PaintPropertyTreeBuilderTest, Perspective3DTransformedDescendant) {
|
| + setBodyInnerHTML(
|
| + "<style> body { margin: 0 } </style>"
|
| + "<div id='perspective' style='perspective: 800px;'>"
|
| + "<div id='transform' style='margin-left: 50px; margin-top: 100px;"
|
| + " width: 400px; height: 300px;"
|
| + " transform: translate3d(123px, 456px, 789px)'>"
|
| + "</div>"
|
| + "</div>");
|
| +
|
| + Element* perspective = document().getElementById("perspective");
|
| + const ObjectPaintProperties* perspectiveProperties =
|
| + perspective->layoutObject()->paintProperties();
|
| +
|
| + EXPECT_TRUE(perspectiveProperties->transform());
|
| + EXPECT_TRUE(
|
| + perspectiveProperties->transform()->hasDirectCompositingReasons());
|
| +}
|
| +
|
| TEST_P(PaintPropertyTreeBuilderTest,
|
| TransformNodeWithActiveAnimationHasDirectCompositingReason) {
|
| setBodyInnerHTML(
|
|
|