| 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 dd84f953839c970cc8e999537fac743accb38708..09d54551d638bcea1668241d2af8e2c7a494eb8c 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
|
| @@ -809,4 +809,21 @@ TEST_P(PaintLayerTest, ColumnSpanLayerUnderExtraLayerScrolled) {
|
| EXPECT_EQ(LayoutPoint(-150, 50), spanner->visualOffsetFromAncestor(columns));
|
| }
|
|
|
| +TEST_P(PaintLayerTest, PaintLayerTransformUpdatedOnStyleTransformAnimation) {
|
| + setBodyInnerHTML("<div id='target' style='will-change: transform'></div>");
|
| +
|
| + LayoutObject* targetObject =
|
| + document().getElementById("target")->layoutObject();
|
| + PaintLayer* targetPaintLayer = toLayoutBoxModelObject(targetObject)->layer();
|
| + EXPECT_EQ(nullptr, targetPaintLayer->transform());
|
| +
|
| + RefPtr<ComputedStyle> oldStyle =
|
| + ComputedStyle::clone(targetObject->styleRef());
|
| + ComputedStyle* newStyle = targetObject->mutableStyle();
|
| + newStyle->setHasCurrentTransformAnimation();
|
| + targetPaintLayer->updateTransform(oldStyle.get(), *newStyle);
|
| +
|
| + EXPECT_NE(nullptr, targetPaintLayer->transform());
|
| +}
|
| +
|
| } // namespace blink
|
|
|