Commit 18e85cdf authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

[SPV2] Run more fragmented paint property tree builder tests

These tests can be run now that SPV2 clips work with fragmentation.

The results for CompositedUnderMultiColumn have been updated.

Bug: 796768
Change-Id: I3a77348fa7875c076098c0ad4b785b381ca311b9
Reviewed-on: https://chromium-review.googlesource.com/c/1298125
Commit-Queue: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602382}
parent 556b6e31
...@@ -4389,12 +4389,6 @@ TEST_P(PaintPropertyTreeBuilderTest, ...@@ -4389,12 +4389,6 @@ TEST_P(PaintPropertyTreeBuilderTest,
} }
TEST_P(PaintPropertyTreeBuilderTest, CompositedUnderMultiColumn) { TEST_P(PaintPropertyTreeBuilderTest, CompositedUnderMultiColumn) {
// TODO(crbug.com/796768): Currently this test crashes for SPv2 when mapping
// layer clip rects from one fragment to another. May need to adjust fragment
// clip hierarchy to fix the crash.
if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled())
return;
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style>body { margin: 0; }</style> <style>body { margin: 0; }</style>
<div id='multicol' style='columns:3; column-fill:auto; column-gap: 0; <div id='multicol' style='columns:3; column-fill:auto; column-gap: 0;
...@@ -4433,31 +4427,32 @@ TEST_P(PaintPropertyTreeBuilderTest, CompositedUnderMultiColumn) { ...@@ -4433,31 +4427,32 @@ TEST_P(PaintPropertyTreeBuilderTest, CompositedUnderMultiColumn) {
EXPECT_EQ(LayoutPoint(100, 100), FragmentAt(composited, 0).PaintOffset()); EXPECT_EQ(LayoutPoint(100, 100), FragmentAt(composited, 0).PaintOffset());
EXPECT_EQ(LayoutPoint(100, -200), EXPECT_EQ(LayoutPoint(100, -200),
FragmentAt(composited, 0).PaginationOffset()); FragmentAt(composited, 0).PaginationOffset());
EXPECT_EQ(LayoutUnit(), FragmentAt(composited, 0).LogicalTopInFlowThread()); EXPECT_EQ(LayoutUnit(200),
FragmentAt(composited, 0).LogicalTopInFlowThread());
EXPECT_EQ(LayoutPoint(200, -100), FragmentAt(composited, 1).PaintOffset()); EXPECT_EQ(LayoutPoint(200, -100), FragmentAt(composited, 1).PaintOffset());
EXPECT_EQ(LayoutPoint(200, -400), EXPECT_EQ(LayoutPoint(200, -400),
FragmentAt(composited, 1).PaginationOffset()); FragmentAt(composited, 1).PaginationOffset());
EXPECT_EQ(LayoutUnit(200), EXPECT_EQ(LayoutUnit(400),
FragmentAt(composited, 1).LogicalTopInFlowThread()); FragmentAt(composited, 1).LogicalTopInFlowThread());
EXPECT_EQ(2u, NumFragments(non_composited_child)); EXPECT_EQ(2u, NumFragments(non_composited_child));
EXPECT_EQ(LayoutPoint(100, 100), EXPECT_EQ(LayoutPoint(100, 100),
FragmentAt(non_composited_child, 0).PaintOffset()); FragmentAt(non_composited_child, 0).PaintOffset());
EXPECT_EQ(LayoutPoint(100, -200), EXPECT_EQ(LayoutPoint(100, -200),
FragmentAt(non_composited_child, 0).PaginationOffset()); FragmentAt(non_composited_child, 0).PaginationOffset());
EXPECT_EQ(LayoutUnit(), EXPECT_EQ(LayoutUnit(200),
FragmentAt(non_composited_child, 0).LogicalTopInFlowThread()); FragmentAt(non_composited_child, 0).LogicalTopInFlowThread());
EXPECT_EQ(LayoutPoint(200, -100), EXPECT_EQ(LayoutPoint(200, -100),
FragmentAt(non_composited_child, 1).PaintOffset()); FragmentAt(non_composited_child, 1).PaintOffset());
EXPECT_EQ(LayoutPoint(200, -400), EXPECT_EQ(LayoutPoint(200, -400),
FragmentAt(non_composited_child, 1).PaginationOffset()); FragmentAt(non_composited_child, 1).PaginationOffset());
EXPECT_EQ(LayoutUnit(200), EXPECT_EQ(LayoutUnit(400),
FragmentAt(non_composited_child, 1).LogicalTopInFlowThread()); FragmentAt(non_composited_child, 1).LogicalTopInFlowThread());
EXPECT_EQ(1u, NumFragments(composited_child)); EXPECT_EQ(1u, NumFragments(composited_child));
EXPECT_EQ(LayoutPoint(200, 50), EXPECT_EQ(LayoutPoint(200, 50),
FragmentAt(composited_child, 0).PaintOffset()); FragmentAt(composited_child, 0).PaintOffset());
EXPECT_EQ(LayoutPoint(200, -400), EXPECT_EQ(LayoutPoint(200, -400),
FragmentAt(composited_child, 0).PaginationOffset()); FragmentAt(composited_child, 0).PaginationOffset());
EXPECT_EQ(LayoutUnit(), EXPECT_EQ(LayoutUnit(400),
FragmentAt(composited_child, 0).LogicalTopInFlowThread()); FragmentAt(composited_child, 0).LogicalTopInFlowThread());
} else { } else {
// SPv1 forces single fragment for composited layers. // SPv1 forces single fragment for composited layers.
...@@ -4485,12 +4480,6 @@ TEST_P(PaintPropertyTreeBuilderTest, CompositedUnderMultiColumn) { ...@@ -4485,12 +4480,6 @@ TEST_P(PaintPropertyTreeBuilderTest, CompositedUnderMultiColumn) {
} }
TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedY) { TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedY) {
// TODO(crbug.com/796768): Currently this test crashes for SPv2 when mapping
// layer clip rects from one fragment to another. May need to adjust fragment
// clip hierarchy to fix the crash.
if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled())
return;
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<div id='paged' style='overflow: -webkit-paged-y; column-gap: 0; <div id='paged' style='overflow: -webkit-paged-y; column-gap: 0;
width: 100px; height: 100px'> width: 100px; height: 100px'>
...@@ -4512,12 +4501,6 @@ TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedY) { ...@@ -4512,12 +4501,6 @@ TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedY) {
} }
TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedYWithGap) { TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedYWithGap) {
// TODO(crbug.com/796768): Currently this test crashes for SPv2 when mapping
// layer clip rects from one fragment to another. May need to adjust fragment
// clip hierarchy to fix the crash.
if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled())
return;
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<div id='paged' style='overflow: -webkit-paged-y; column-gap: 10px; <div id='paged' style='overflow: -webkit-paged-y; column-gap: 10px;
width: 100px; height: 100px'> width: 100px; height: 100px'>
...@@ -4539,12 +4522,6 @@ TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedYWithGap) { ...@@ -4539,12 +4522,6 @@ TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedYWithGap) {
} }
TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedX) { TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedX) {
// TODO(crbug.com/796768): Currently this test crashes for SPv2 when mapping
// layer clip rects from one fragment to another. May need to adjust fragment
// clip hierarchy to fix the crash.
if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled())
return;
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<div id='paged' style='overflow: -webkit-paged-x; column-gap: 0; <div id='paged' style='overflow: -webkit-paged-x; column-gap: 0;
width: 100px; height: 100px'> width: 100px; height: 100px'>
...@@ -4566,12 +4543,6 @@ TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedX) { ...@@ -4566,12 +4543,6 @@ TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedX) {
} }
TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedYVerticalRL) { TEST_P(PaintPropertyTreeBuilderTest, FragmentsInPagedYVerticalRL) {
// TODO(crbug.com/796768): Currently this test crashes for SPv2 when mapping
// layer clip rects from one fragment to another. May need to adjust fragment
// clip hierarchy to fix the crash.
if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled())
return;
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<div id='paged' style='overflow: -webkit-paged-y; column-gap: 0; <div id='paged' style='overflow: -webkit-paged-y; column-gap: 0;
width: 100px; height: 100px; writing-mode: vertical-rl'> width: 100px; height: 100px; writing-mode: vertical-rl'>
...@@ -4645,12 +4616,6 @@ TEST_P(PaintPropertyTreeBuilderTest, FrameUnderMulticol) { ...@@ -4645,12 +4616,6 @@ TEST_P(PaintPropertyTreeBuilderTest, FrameUnderMulticol) {
} }
TEST_P(PaintPropertyTreeBuilderTest, CompositedMulticolFrameUnderMulticol) { TEST_P(PaintPropertyTreeBuilderTest, CompositedMulticolFrameUnderMulticol) {
// TODO(crbug.com/796768): Currently this test crashes for SPv2 when mapping
// layer clip rects from one fragment to another. May need to adjust fragment
// clip hierarchy to fix the crash.
if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled())
return;
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style>body { margin: 0 }</style> <style>body { margin: 0 }</style>
<div style='columns: 3; column-gap: 0; column-fill: auto; <div style='columns: 3; column-gap: 0; column-fill: auto;
......
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