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

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

Issue 1909033003: Add FrameView::updateAllLifecyclePhasesExceptPaint and use it in a few cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/PaintLayerPainterTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
index 3ff56a1a50d338d786a12badc5b414b429f3e855..ac246847bb7898ba8371feac905740669a1ac2c1 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
@@ -53,7 +53,7 @@ TEST_P(PaintLayerPainterTest, CachedSubsequence)
TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence));
toHTMLElement(content1.node())->setAttribute(HTMLNames::styleAttr, "position: absolute; width: 100px; height: 100px; background-color: green");
- updateLifecyclePhasesBeforePaint();
+ document().view()->updateAllLifecyclePhasesExceptPaint();
bool needsCommit = paintWithoutCommit();
EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 8,
@@ -110,7 +110,7 @@ TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange)
PaintLayer& container3Layer = *toLayoutBoxModelObject(container3).layer();
LayoutObject& content3 = *document().getElementById("content3")->layoutObject();
- updateLifecyclePhasesBeforePaint();
+ document().view()->updateAllLifecyclePhasesExceptPaint();
IntRect interestRect(0, 0, 400, 300);
paint(&interestRect);
@@ -135,7 +135,7 @@ TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange)
TestDisplayItem(container3Layer, DisplayItem::EndSubsequence),
TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence));
- updateLifecyclePhasesBeforePaint();
+ document().view()->updateAllLifecyclePhasesExceptPaint();
IntRect newInterestRect(0, 100, 300, 1000);
bool needsCommit = paintWithoutCommit(&newInterestRect);
@@ -186,7 +186,7 @@ TEST_P(PaintLayerPainterTest, CachedSubsequenceOnStyleChangeWithInterestRectClip
"<div id='container2' style='position: relative; z-index: 1; width: 200px; height: 200px; background-color: blue'>"
" <div id='content2' style='position: absolute; width: 100px; height: 100px; background-color: green'></div>"
"</div>");
- updateLifecyclePhasesBeforePaint();
+ document().view()->updateAllLifecyclePhasesExceptPaint();
IntRect interestRect(0, 0, 50, 300); // PaintResult of all subsequences will be MayBeClippedByPaintDirtyRect.
paint(&interestRect);
@@ -212,7 +212,7 @@ TEST_P(PaintLayerPainterTest, CachedSubsequenceOnStyleChangeWithInterestRectClip
TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence));
toHTMLElement(content1.node())->setAttribute(HTMLNames::styleAttr, "position: absolute; width: 100px; height: 100px; background-color: green");
- updateLifecyclePhasesBeforePaint();
+ document().view()->updateAllLifecyclePhasesExceptPaint();
bool needsCommit = paintWithoutCommit(&interestRect);
EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 8,
@@ -277,7 +277,7 @@ TEST_P(PaintLayerPainterTest, PaintPhaseOutline)
// needsPaintPhaseDescendantOutlines should be set when any descendant on the same layer has outline.
toHTMLElement(outlineDiv.node())->setAttribute(HTMLNames::styleAttr, styleWithOutline);
- updateLifecyclePhasesBeforePaint();
+ document().view()->updateAllLifecyclePhasesExceptPaint();
EXPECT_TRUE(selfPaintingLayer.needsPaintPhaseDescendantOutlines());
EXPECT_FALSE(nonSelfPaintingLayer.needsPaintPhaseDescendantOutlines());
paint();
@@ -312,7 +312,7 @@ TEST_P(PaintLayerPainterTest, PaintPhaseFloat)
// needsPaintPhaseFloat should be set when any descendant on the same layer has float.
toHTMLElement(floatDiv.node())->setAttribute(HTMLNames::styleAttr, styleWithFloat);
- updateLifecyclePhasesBeforePaint();
+ document().view()->updateAllLifecyclePhasesExceptPaint();
EXPECT_TRUE(selfPaintingLayer.needsPaintPhaseFloat());
EXPECT_FALSE(nonSelfPaintingLayer.needsPaintPhaseFloat());
paint();
@@ -354,7 +354,7 @@ TEST_P(PaintLayerPainterTest, PaintPhaseBlockBackground)
// needsPaintPhaseDescendantBlockBackgrounds should be set when any descendant on the same layer has Background.
toHTMLElement(backgroundDiv.node())->setAttribute(HTMLNames::styleAttr, styleWithBackground);
- updateLifecyclePhasesBeforePaint();
+ document().view()->updateAllLifecyclePhasesExceptPaint();
EXPECT_TRUE(selfPaintingLayer.needsPaintPhaseDescendantBlockBackgrounds());
EXPECT_FALSE(nonSelfPaintingLayer.needsPaintPhaseDescendantBlockBackgrounds());
paint();

Powered by Google App Engine
This is Rietveld 408576698