| Index: third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
|
| index e1beee33b14b9205bb0303130927983f8bf7d375..b099b184c4eea2c1a24966d16e0c048565b21fdb 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
|
| @@ -198,10 +198,11 @@ TEST_F(LayoutObjectTest, MutableForPaintingClearPaintFlags) {
|
| EXPECT_TRUE(object->BackgroundChangedSinceLastPaintInvalidation());
|
| object->SetNeedsPaintPropertyUpdate();
|
| EXPECT_TRUE(object->NeedsPaintPropertyUpdate());
|
| + EXPECT_TRUE(object->Parent()->DescendantNeedsPaintPropertyUpdate());
|
| object->bitfields_.SetDescendantNeedsPaintPropertyUpdate(true);
|
| EXPECT_TRUE(object->DescendantNeedsPaintPropertyUpdate());
|
|
|
| - ScopedSlimmingPaintV2ForTest enable_s_pv2(true);
|
| + ScopedSlimmingPaintInvalidationForTest enable_sp_invalidation(true);
|
| GetDocument().Lifecycle().AdvanceTo(DocumentLifecycle::kInPrePaint);
|
| object->GetMutableForPainting().ClearPaintFlags();
|
|
|
| @@ -215,6 +216,21 @@ TEST_F(LayoutObjectTest, MutableForPaintingClearPaintFlags) {
|
| EXPECT_FALSE(object->DescendantNeedsPaintPropertyUpdate());
|
| }
|
|
|
| +TEST_F(LayoutObjectTest, SubtreeNeedsPaintPropertyUpdate) {
|
| + LayoutObject* object = GetDocument().body()->GetLayoutObject();
|
| + object->SetSubtreeNeedsPaintPropertyUpdate();
|
| + EXPECT_TRUE(object->SubtreeNeedsPaintPropertyUpdate());
|
| + EXPECT_TRUE(object->NeedsPaintPropertyUpdate());
|
| + EXPECT_TRUE(object->Parent()->DescendantNeedsPaintPropertyUpdate());
|
| +
|
| + ScopedSlimmingPaintInvalidationForTest enable_sp_invalidation(true);
|
| + GetDocument().Lifecycle().AdvanceTo(DocumentLifecycle::kInPrePaint);
|
| + object->GetMutableForPainting().ClearPaintFlags();
|
| +
|
| + EXPECT_FALSE(object->SubtreeNeedsPaintPropertyUpdate());
|
| + EXPECT_FALSE(object->NeedsPaintPropertyUpdate());
|
| +}
|
| +
|
| TEST_F(LayoutObjectTest, NeedsPaintOffsetAndVisualRectUpdate) {
|
| LayoutObject* object = GetDocument().body()->GetLayoutObject();
|
| LayoutObject* parent = object->Parent();
|
|
|