| Index: third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp
|
| index bb56f435d5862a0abba2947ac96aa6c2fd99f839..7f1813a79f01171485112ce714329664827187a1 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp
|
| @@ -36,9 +36,12 @@
|
| *toLayoutText(div.firstChild()->layoutObject())->firstTextBox();
|
|
|
| if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| - EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
|
| - TestDisplayItem(layoutView(), documentBackgroundType),
|
| - TestDisplayItem(textInlineBox, foregroundType));
|
| + EXPECT_DISPLAY_LIST(
|
| + rootPaintController().getDisplayItemList(), 4,
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
|
| + TestDisplayItem(layoutView(), documentBackgroundType),
|
| + TestDisplayItem(textInlineBox, foregroundType),
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
|
| } else {
|
| EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
|
| TestDisplayItem(layoutView(), documentBackgroundType),
|
| @@ -50,12 +53,14 @@
|
|
|
| if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| EXPECT_DISPLAY_LIST(
|
| - rootPaintController().getDisplayItemList(), 3,
|
| + rootPaintController().getDisplayItemList(), 5,
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
|
| TestDisplayItem(layoutView(), documentBackgroundType),
|
| TestDisplayItem(textInlineBox, foregroundType),
|
| TestDisplayItem(
|
| document().frame()->selection().caretDisplayItemClientForTesting(),
|
| - DisplayItem::kCaret)); // New!
|
| + DisplayItem::kCaret), // New!
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
|
| } else {
|
| EXPECT_DISPLAY_LIST(
|
| rootPaintController().getDisplayItemList(), 3,
|
| @@ -78,9 +83,12 @@
|
| InlineTextBox& firstTextBox = *text.firstTextBox();
|
|
|
| if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| - EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
|
| - TestDisplayItem(layoutView(), documentBackgroundType),
|
| - TestDisplayItem(firstTextBox, foregroundType));
|
| + EXPECT_DISPLAY_LIST(
|
| + rootPaintController().getDisplayItemList(), 4,
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
|
| + TestDisplayItem(layoutView(), documentBackgroundType),
|
| + TestDisplayItem(firstTextBox, foregroundType),
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
|
| } else {
|
| EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
|
| TestDisplayItem(layoutView(), documentBackgroundType),
|
| @@ -95,10 +103,13 @@
|
| InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox();
|
|
|
| if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| - EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3,
|
| - TestDisplayItem(layoutView(), documentBackgroundType),
|
| - TestDisplayItem(newFirstTextBox, foregroundType),
|
| - TestDisplayItem(secondTextBox, foregroundType));
|
| + EXPECT_DISPLAY_LIST(
|
| + rootPaintController().getDisplayItemList(), 5,
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
|
| + TestDisplayItem(layoutView(), documentBackgroundType),
|
| + TestDisplayItem(newFirstTextBox, foregroundType),
|
| + TestDisplayItem(secondTextBox, foregroundType),
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
|
| } else {
|
| EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3,
|
| TestDisplayItem(layoutView(), documentBackgroundType),
|
| @@ -115,13 +126,21 @@
|
| " <div style='width: 100px; height: 100px; background-color: "
|
| "blue'></div>"
|
| "</div>");
|
| + PaintLayer& htmlLayer =
|
| + *toLayoutBoxModelObject(document().documentElement()->layoutObject())
|
| + ->layer();
|
| LayoutBlock& div = *toLayoutBlock(getLayoutObjectByElementId("div"));
|
| LayoutObject& subDiv = *div.firstChild();
|
| LayoutObject& subDiv2 = *subDiv.nextSibling();
|
| - EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3,
|
| - TestDisplayItem(layoutView(), documentBackgroundType),
|
| - TestDisplayItem(subDiv, backgroundType),
|
| - TestDisplayItem(subDiv2, backgroundType));
|
| + EXPECT_DISPLAY_LIST(
|
| + rootPaintController().getDisplayItemList(), 7,
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
|
| + TestDisplayItem(layoutView(), documentBackgroundType),
|
| + TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
|
| + TestDisplayItem(subDiv, backgroundType),
|
| + TestDisplayItem(subDiv2, backgroundType),
|
| + TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
|
|
|
| // Verify that the background does not scroll.
|
| const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0];
|
| @@ -149,12 +168,20 @@
|
| " <div style='width: 100px; height: 100px; background-color: "
|
| "blue'></div>"
|
| "</div>");
|
| + PaintLayer& htmlLayer =
|
| + *toLayoutBoxModelObject(document().documentElement()->layoutObject())
|
| + ->layer();
|
| LayoutBlock& div = *toLayoutBlock(getLayoutObjectByElementId("div"));
|
| LayoutObject& subDiv = *div.firstChild();
|
|
|
| - EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
|
| - TestDisplayItem(layoutView(), documentBackgroundType),
|
| - TestDisplayItem(subDiv, backgroundType));
|
| + EXPECT_DISPLAY_LIST(
|
| + rootPaintController().getDisplayItemList(), 6,
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
|
| + TestDisplayItem(layoutView(), documentBackgroundType),
|
| + TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
|
| + TestDisplayItem(subDiv, backgroundType),
|
| + TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
|
| + TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
|
| }
|
|
|
| } // namespace blink
|
|
|