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,6 +32,14 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, ...@@ -32,6 +32,14 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2,
*toLayoutText(div.firstChild()->layoutObject())->firstTextBox(); *toLayoutText(div.firstChild()->layoutObject())->firstTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
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( EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 6, rootPaintController().getDisplayItemList(), 6,
TestDisplayItem(layoutView(), TestDisplayItem(layoutView(),
...@@ -43,6 +51,7 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, ...@@ -43,6 +51,7 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2,
TestDisplayItem(layoutView(), TestDisplayItem(layoutView(),
DisplayItem::clipTypeToEndClipType( DisplayItem::clipTypeToEndClipType(
DisplayItem::kClipFrameToVisibleContentRect))); DisplayItem::kClipFrameToVisibleContentRect)));
}
} else { } else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2, EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType), TestDisplayItem(layoutView(), documentBackgroundType),
...@@ -53,6 +62,16 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, ...@@ -53,6 +62,16 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2,
document().view()->updateAllLifecyclePhases(); document().view()->updateAllLifecyclePhases();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 5,
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));
} else {
EXPECT_DISPLAY_LIST( EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 7, rootPaintController().getDisplayItemList(), 7,
TestDisplayItem(layoutView(), TestDisplayItem(layoutView(),
...@@ -66,6 +85,7 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, ...@@ -66,6 +85,7 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2,
TestDisplayItem(layoutView(), TestDisplayItem(layoutView(),
DisplayItem::clipTypeToEndClipType( DisplayItem::clipTypeToEndClipType(
DisplayItem::kClipFrameToVisibleContentRect))); DisplayItem::kClipFrameToVisibleContentRect)));
}
} else { } else {
EXPECT_DISPLAY_LIST( EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 3, rootPaintController().getDisplayItemList(), 3,
...@@ -87,6 +107,14 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) { ...@@ -87,6 +107,14 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) {
InlineTextBox& firstTextBox = *text.firstTextBox(); InlineTextBox& firstTextBox = *text.firstTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
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( EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 6, rootPaintController().getDisplayItemList(), 6,
TestDisplayItem(layoutView(), TestDisplayItem(layoutView(),
...@@ -98,6 +126,7 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) { ...@@ -98,6 +126,7 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) {
TestDisplayItem(layoutView(), TestDisplayItem(layoutView(),
DisplayItem::clipTypeToEndClipType( DisplayItem::clipTypeToEndClipType(
DisplayItem::kClipFrameToVisibleContentRect))); DisplayItem::kClipFrameToVisibleContentRect)));
}
} else { } else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2, EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType), TestDisplayItem(layoutView(), documentBackgroundType),
...@@ -112,6 +141,15 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) { ...@@ -112,6 +141,15 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) {
InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox(); InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
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( EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 7, rootPaintController().getDisplayItemList(), 7,
TestDisplayItem(layoutView(), TestDisplayItem(layoutView(),
...@@ -124,6 +162,7 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) { ...@@ -124,6 +162,7 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) {
TestDisplayItem(layoutView(), TestDisplayItem(layoutView(),
DisplayItem::clipTypeToEndClipType( DisplayItem::clipTypeToEndClipType(
DisplayItem::kClipFrameToVisibleContentRect))); 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