Commit 1e8c9578 authored by szager's avatar szager Committed by Commit bot

RootLayerScrolling: update PaintControllerPaintTest expectations.

When RLS is enabled, the LayoutView gets the size of the FrameView, and no clipping to the FrameView is done.

BUG=490942
R=skobes@chromium.org,chrishtr@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2566223003
Cr-Commit-Position: refs/heads/master@{#438010}
parent 085fd952
...@@ -32,17 +32,26 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, ...@@ -32,17 +32,26 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2,
*toLayoutText(div.firstChild()->layoutObject())->firstTextBox(); *toLayoutText(div.firstChild()->layoutObject())->firstTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
EXPECT_DISPLAY_LIST( if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
rootPaintController().getDisplayItemList(), 6, EXPECT_DISPLAY_LIST(
TestDisplayItem(layoutView(), rootPaintController().getDisplayItemList(), 4,
DisplayItem::kClipFrameToVisibleContentRect), TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(layoutView(), documentBackgroundType), TestDisplayItem(textInlineBox, foregroundType),
TestDisplayItem(textInlineBox, foregroundType), TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), } else {
TestDisplayItem(layoutView(), EXPECT_DISPLAY_LIST(
DisplayItem::clipTypeToEndClipType( rootPaintController().getDisplayItemList(), 6,
DisplayItem::kClipFrameToVisibleContentRect))); TestDisplayItem(layoutView(),
DisplayItem::kClipFrameToVisibleContentRect),
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(textInlineBox, foregroundType),
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
TestDisplayItem(layoutView(),
DisplayItem::clipTypeToEndClipType(
DisplayItem::kClipFrameToVisibleContentRect)));
}
} else { } else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2, EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType), TestDisplayItem(layoutView(), documentBackgroundType),
...@@ -53,19 +62,30 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, ...@@ -53,19 +62,30 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2,
document().view()->updateAllLifecyclePhases(); document().view()->updateAllLifecyclePhases();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
EXPECT_DISPLAY_LIST( if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
rootPaintController().getDisplayItemList(), 7, EXPECT_DISPLAY_LIST(
TestDisplayItem(layoutView(), rootPaintController().getDisplayItemList(), 5,
DisplayItem::kClipFrameToVisibleContentRect), TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(layoutView(), documentBackgroundType), TestDisplayItem(textInlineBox, foregroundType),
TestDisplayItem(textInlineBox, foregroundType), TestDisplayItem(*document().frame()->selection().m_frameCaret,
TestDisplayItem(*document().frame()->selection().m_frameCaret, DisplayItem::kCaret), // New!
DisplayItem::kCaret), // New! TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), } else {
TestDisplayItem(layoutView(), EXPECT_DISPLAY_LIST(
DisplayItem::clipTypeToEndClipType( rootPaintController().getDisplayItemList(), 7,
DisplayItem::kClipFrameToVisibleContentRect))); TestDisplayItem(layoutView(),
DisplayItem::kClipFrameToVisibleContentRect),
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(textInlineBox, foregroundType),
TestDisplayItem(*document().frame()->selection().m_frameCaret,
DisplayItem::kCaret), // New!
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
TestDisplayItem(layoutView(),
DisplayItem::clipTypeToEndClipType(
DisplayItem::kClipFrameToVisibleContentRect)));
}
} else { } else {
EXPECT_DISPLAY_LIST( EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 3, rootPaintController().getDisplayItemList(), 3,
...@@ -87,17 +107,26 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) { ...@@ -87,17 +107,26 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) {
InlineTextBox& firstTextBox = *text.firstTextBox(); InlineTextBox& firstTextBox = *text.firstTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
EXPECT_DISPLAY_LIST( if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
rootPaintController().getDisplayItemList(), 6, EXPECT_DISPLAY_LIST(
TestDisplayItem(layoutView(), rootPaintController().getDisplayItemList(), 4,
DisplayItem::kClipFrameToVisibleContentRect), TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(layoutView(), documentBackgroundType), TestDisplayItem(firstTextBox, foregroundType),
TestDisplayItem(firstTextBox, foregroundType), TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), } else {
TestDisplayItem(layoutView(), EXPECT_DISPLAY_LIST(
DisplayItem::clipTypeToEndClipType( rootPaintController().getDisplayItemList(), 6,
DisplayItem::kClipFrameToVisibleContentRect))); TestDisplayItem(layoutView(),
DisplayItem::kClipFrameToVisibleContentRect),
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(firstTextBox, foregroundType),
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
TestDisplayItem(layoutView(),
DisplayItem::clipTypeToEndClipType(
DisplayItem::kClipFrameToVisibleContentRect)));
}
} else { } else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2, EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType), TestDisplayItem(layoutView(), documentBackgroundType),
...@@ -112,18 +141,28 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) { ...@@ -112,18 +141,28 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) {
InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox(); InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
EXPECT_DISPLAY_LIST( if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
rootPaintController().getDisplayItemList(), 7, EXPECT_DISPLAY_LIST(
TestDisplayItem(layoutView(), rootPaintController().getDisplayItemList(), 5,
DisplayItem::kClipFrameToVisibleContentRect), TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(layoutView(), documentBackgroundType), TestDisplayItem(newFirstTextBox, foregroundType),
TestDisplayItem(newFirstTextBox, foregroundType), TestDisplayItem(secondTextBox, foregroundType),
TestDisplayItem(secondTextBox, foregroundType), TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), } else {
TestDisplayItem(layoutView(), EXPECT_DISPLAY_LIST(
DisplayItem::clipTypeToEndClipType( rootPaintController().getDisplayItemList(), 7,
DisplayItem::kClipFrameToVisibleContentRect))); TestDisplayItem(layoutView(),
DisplayItem::kClipFrameToVisibleContentRect),
TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
TestDisplayItem(layoutView(), documentBackgroundType),
TestDisplayItem(newFirstTextBox, foregroundType),
TestDisplayItem(secondTextBox, foregroundType),
TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
TestDisplayItem(layoutView(),
DisplayItem::clipTypeToEndClipType(
DisplayItem::kClipFrameToVisibleContentRect)));
}
} else { } else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3, EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3,
TestDisplayItem(layoutView(), documentBackgroundType), TestDisplayItem(layoutView(), documentBackgroundType),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment