| 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 b5f81f798f767d368b26c32d322d6359d050fbd7..47d1a939a3e7f30ee88c93e2e45167d84c69739b 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
|
| @@ -137,11 +137,12 @@ TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange)
|
| LayoutObject& container2 = *document().getElementById("container2")->layoutObject();
|
| PaintLayer& container2Layer = *toLayoutBoxModelObject(container2).layer();
|
| LayoutObject& content2a = *document().getElementById("content2a")->layoutObject();
|
| + LayoutObject& content2b = *document().getElementById("content2b")->layoutObject();
|
| LayoutObject& container3 = *document().getElementById("container3")->layoutObject();
|
| PaintLayer& container3Layer = *toLayoutBoxModelObject(container3).layer();
|
| LayoutObject& content3 = *document().getElementById("content3")->layoutObject();
|
|
|
| - LayoutRect interestRect(0, 0, 400, 300);
|
| + IntRect interestRect(0, 0, 400, 300);
|
| document().view()->updateAllLifecyclePhases(&interestRect);
|
|
|
| // Container1 is fully in the interest rect;
|
| @@ -186,7 +187,7 @@ TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange)
|
| TestDisplayItem(rootLayer, endSubsequenceType));
|
| }
|
|
|
| - LayoutRect newInterestRect(0, 100, 300, 300);
|
| + IntRect newInterestRect(0, 100, 300, 1000);
|
| document().view()->updateAllLifecyclePhases(&newInterestRect);
|
|
|
| // Container1 becomes partly in the interest rect, but uses cached subsequence
|
| @@ -195,7 +196,7 @@ TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange)
|
| // Content2b is out of the interest rect and outputs nothing;
|
| // Container3 becomes out of the interest rect and outputs nothing.
|
| if (rootLayerScrolls) {
|
| - EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 11,
|
| + EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 12,
|
| TestDisplayItem(layoutView(), backgroundType),
|
| TestDisplayItem(rootLayer, subsequenceType),
|
| TestDisplayItem(container1, backgroundType),
|
| @@ -205,10 +206,11 @@ TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange)
|
| TestDisplayItem(container2, backgroundType),
|
| TestDisplayItem(container2Layer, subsequenceType),
|
| TestDisplayItem(content2a, backgroundType),
|
| + TestDisplayItem(content2b, backgroundType),
|
| TestDisplayItem(container2Layer, endSubsequenceType),
|
| TestDisplayItem(rootLayer, endSubsequenceType));
|
| } else {
|
| - EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 13,
|
| + EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 14,
|
| TestDisplayItem(layoutView(), backgroundType),
|
| TestDisplayItem(rootLayer, subsequenceType),
|
| TestDisplayItem(htmlLayer, subsequenceType),
|
| @@ -219,6 +221,7 @@ TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange)
|
| TestDisplayItem(container2, backgroundType),
|
| TestDisplayItem(container2Layer, subsequenceType),
|
| TestDisplayItem(content2a, backgroundType),
|
| + TestDisplayItem(content2b, backgroundType),
|
| TestDisplayItem(container2Layer, endSubsequenceType),
|
| TestDisplayItem(htmlLayer, endSubsequenceType),
|
| TestDisplayItem(rootLayer, endSubsequenceType));
|
| @@ -295,6 +298,7 @@ TEST_F(PaintLayerPainterTestForSlimmingPaintV2, CachedSubsequence)
|
|
|
| // Repeated painting should just generate a CachedDisplayItemList item.
|
| updateLifecyclePhasesToPaintClean();
|
| +
|
| EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 1,
|
| TestDisplayItem(*rootLayer.compositedLayerMapping(), DisplayItem::CachedDisplayItemList));
|
|
|
| @@ -339,11 +343,12 @@ TEST_F(PaintLayerPainterTestForSlimmingPaintV2, CachedSubsequenceOnInterestRectC
|
| LayoutObject& container2 = *document().getElementById("container2")->layoutObject();
|
| PaintLayer& container2Layer = *toLayoutBoxModelObject(container2).layer();
|
| LayoutObject& content2a = *document().getElementById("content2a")->layoutObject();
|
| + LayoutObject& content2b = *document().getElementById("content2b")->layoutObject();
|
| LayoutObject& container3 = *document().getElementById("container3")->layoutObject();
|
| PaintLayer& container3Layer = *toLayoutBoxModelObject(container3).layer();
|
| LayoutObject& content3 = *document().getElementById("content3")->layoutObject();
|
|
|
| - LayoutRect interestRect(0, 0, 400, 300);
|
| + IntRect interestRect(0, 0, 400, 300);
|
| document().view()->updateAllLifecyclePhases(&interestRect);
|
|
|
| // Container1 is fully in the interest rect;
|
| @@ -372,12 +377,12 @@ TEST_F(PaintLayerPainterTestForSlimmingPaintV2, CachedSubsequenceOnInterestRectC
|
| // Container1 becomes partly in the interest rect, but uses cached subsequence
|
| // because it was fully painted before;
|
| // Container2's intersection with the interest rect changes;
|
| - // Content2b is out of the interest rect and outputs nothing;
|
| + // Content2b is in the interest rect;
|
| // Container3 becomes out of the interest rect and outputs nothing.
|
| - LayoutRect newInterestRect(0, 100, 300, 300);
|
| + IntRect newInterestRect(0, 100, 300, 1000);
|
| updateLifecyclePhasesToPaintClean(&newInterestRect);
|
|
|
| - EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 11,
|
| + EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 12,
|
| TestDisplayItem(layoutView(), cachedBackgroundType),
|
| TestDisplayItem(rootLayer, subsequenceType),
|
| TestDisplayItem(htmlLayer, subsequenceType),
|
| @@ -386,13 +391,14 @@ TEST_F(PaintLayerPainterTestForSlimmingPaintV2, CachedSubsequenceOnInterestRectC
|
| TestDisplayItem(container2, cachedBackgroundType),
|
| TestDisplayItem(container2Layer, subsequenceType),
|
| TestDisplayItem(content2a, cachedBackgroundType),
|
| + TestDisplayItem(content2b, backgroundType),
|
| TestDisplayItem(container2Layer, endSubsequenceType),
|
| TestDisplayItem(htmlLayer, endSubsequenceType),
|
| TestDisplayItem(rootLayer, endSubsequenceType));
|
|
|
| compositeForSlimmingPaintV2();
|
|
|
| - EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 13,
|
| + EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 14,
|
| TestDisplayItem(layoutView(), backgroundType),
|
| TestDisplayItem(rootLayer, subsequenceType),
|
| TestDisplayItem(htmlLayer, subsequenceType),
|
| @@ -403,6 +409,7 @@ TEST_F(PaintLayerPainterTestForSlimmingPaintV2, CachedSubsequenceOnInterestRectC
|
| TestDisplayItem(container2, backgroundType),
|
| TestDisplayItem(container2Layer, subsequenceType),
|
| TestDisplayItem(content2a, backgroundType),
|
| + TestDisplayItem(content2b, backgroundType),
|
| TestDisplayItem(container2Layer, endSubsequenceType),
|
| TestDisplayItem(htmlLayer, endSubsequenceType),
|
| TestDisplayItem(rootLayer, endSubsequenceType));
|
|
|