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

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

Issue 2854493002: Store previous painting clip rects on FragmentData. (Closed)
Patch Set: none Created 3 years, 8 months 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
Index: third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp b/third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp
index 7a6d42cbb392cecabfb45d04beb2968c4bc8b3ed..b80806467fcc7fbcb6912a4a0f5fd81adc26ed0e 100644
--- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp
@@ -290,22 +290,30 @@ TEST_P(PrePaintTreeWalkTest, ClipRects) {
" </div>"
"</div>");
- auto* parent = GetPaintLayerByElementId("parent");
- auto* child = GetPaintLayerByElementId("child");
- auto* grandchild = GetPaintLayerByElementId("grandchild");
+ auto* parent = GetLayoutObjectByElementId("parent");
+ auto* child = GetLayoutObjectByElementId("child");
+ auto* grandchild = GetLayoutObjectByElementId("grandchild");
- EXPECT_TRUE(parent->PreviousPaintingClipRects());
- EXPECT_FALSE(child->PreviousPaintingClipRects());
- EXPECT_TRUE(grandchild->PreviousPaintingClipRects());
+ EXPECT_TRUE(parent->GetMutableForPainting()
+ .FirstFragment()
+ ->PreviousPaintingClipRects());
+ EXPECT_FALSE(child->PaintProperties());
+ EXPECT_TRUE(grandchild->GetMutableForPainting()
+ .FirstFragment()
+ ->PreviousPaintingClipRects());
- grandchild->ClearPreviousPaintingClipRects();
+ PrePaintTreeWalk::ClearPreviousPaintingClipRectsForTesting(*grandchild);
GetDocument().View()->UpdateAllLifecyclePhases();
// Still no rects, because the walk early-outed at the LayoutView.
- EXPECT_FALSE(grandchild->PreviousPaintingClipRects());
+ EXPECT_FALSE(grandchild->GetMutableForPainting()
+ .FirstFragment()
+ ->PreviousPaintingClipRects());
- grandchild->GetLayoutObject().SetNeedsPaintPropertyUpdate();
+ grandchild->SetNeedsPaintPropertyUpdate();
GetDocument().View()->UpdateAllLifecyclePhases();
- EXPECT_TRUE(grandchild->PreviousPaintingClipRects());
+ EXPECT_TRUE(grandchild->GetMutableForPainting()
+ .FirstFragment()
+ ->PreviousPaintingClipRects());
}
TEST_P(PrePaintTreeWalkTest, VisualRectClipForceSubtree) {

Powered by Google App Engine
This is Rietveld 408576698