| Index: third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp
 | 
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp
 | 
| index 5baf95d771fbbd586797a19b11eb4f5d8372ecdc..d6f6d767beaf30ac3e87263c9b018161556ff631 100644
 | 
| --- a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp
 | 
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp
 | 
| @@ -158,8 +158,8 @@ TEST_P(PaintControllerTest, NestedRecorders)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(LayoutRect::infiniteIntRect())));
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -186,8 +186,8 @@ TEST_P(PaintControllerTest, UpdateBasic)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(LayoutRect::infiniteIntRect())));
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
|  
 | 
|          getPaintController().updateCurrentPaintChunkProperties(&m_rootPaintChunkId, PaintChunkProperties());
 | 
|      }
 | 
| @@ -210,8 +210,8 @@ TEST_P(PaintControllerTest, UpdateBasic)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 200, 200))); // |second| disappeared from the chunk.
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 200, 200), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -268,8 +268,9 @@ TEST_P(PaintControllerTest, UpdateSwapOrder)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 50, 200))); // Bounds of |second|.
 | 
| +
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 50, 200), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Bounds of |second|.
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -328,9 +329,9 @@ TEST_P(PaintControllerTest, UpdateSwapOrderWithInvalidation)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 100, 100), // Old bounds of |first|.
 | 
| -            FloatRect(100, 100, 100, 100))); // New bounds of |first|.
 | 
| +        EXPECT_EQ(2u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Old bounds of |first|.
 | 
| +        EXPECT_EQ(IntRect(100, 100, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[1].rect); // New bounds of |first|.
 | 
|          // No need to invalidate raster of |second| because the client (|first|) which swapped order
 | 
|          // with it has been invalidated.
 | 
|      }
 | 
| @@ -376,8 +377,8 @@ TEST_P(PaintControllerTest, UpdateNewItemInMiddle)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(125, 100, 200, 50))); // |third| newly appeared in the chunk.
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(125, 100, 200, 50), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -436,9 +437,9 @@ TEST_P(PaintControllerTest, UpdateInvalidationWithPhases)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 50, 200), // Old bounds of |second|.
 | 
| -            FloatRect(100, 100, 50, 200))); // New bounds of |second|.
 | 
| +        EXPECT_EQ(2u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 50, 200), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Old bounds of |second|.
 | 
| +        EXPECT_EQ(IntRect(100, 100, 50, 200), getPaintController().paintChunks()[0].rasterInvalidationRects[1].rect); // New bounds of |second|.
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -479,10 +480,10 @@ TEST_P(PaintControllerTest, UpdateAddFirstOverlap)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 150, 150), // |first| newly appeared in the chunk.
 | 
| -            FloatRect(200, 200, 50, 50), // Old bounds of |second|.
 | 
| -            FloatRect(150, 150, 100, 100))); // New bounds of |second|.
 | 
| +        EXPECT_EQ(3u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(200, 200, 50, 50), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Old bounds of |second|.
 | 
| +        EXPECT_EQ(IntRect(100, 100, 150, 150), getPaintController().paintChunks()[0].rasterInvalidationRects[1].rect); // |first| newly appeared in the chunk.
 | 
| +        EXPECT_EQ(IntRect(150, 150, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[2].rect); // New bounds of |second|.
 | 
|  
 | 
|          getPaintController().updateCurrentPaintChunkProperties(&m_rootPaintChunkId, PaintChunkProperties());
 | 
|      }
 | 
| @@ -505,8 +506,8 @@ TEST_P(PaintControllerTest, UpdateAddFirstOverlap)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 150, 150))); // |first| disappeared from the chunk.
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 150, 150), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // |first| disappeared from the chunk.
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -547,10 +548,10 @@ TEST_P(PaintControllerTest, UpdateAddLastOverlap)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 150, 150), // Old bounds of |first|.
 | 
| -            FloatRect(150, 150, 100, 100), // New bounds of |first|.
 | 
| -            FloatRect(200, 200, 50, 50))); // |second| newly appeared in the chunk.
 | 
| +        EXPECT_EQ(3u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 150, 150), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Old bounds of |first|.
 | 
| +        EXPECT_EQ(IntRect(150, 150, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[1].rect); // New bounds of |first|.
 | 
| +        EXPECT_EQ(IntRect(200, 200, 50, 50), getPaintController().paintChunks()[0].rasterInvalidationRects[2].rect); // |second| newly appeared in the chunk.
 | 
|  
 | 
|          getPaintController().updateCurrentPaintChunkProperties(&m_rootPaintChunkId, PaintChunkProperties());
 | 
|      }
 | 
| @@ -569,10 +570,11 @@ TEST_P(PaintControllerTest, UpdateAddLastOverlap)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(150, 150, 100, 100), // Old bounds of |first|.
 | 
| -            FloatRect(100, 100, 150, 150), // New bounds of |first|.
 | 
| -            FloatRect(200, 200, 50, 50))); // |second| disappeared from the chunk.
 | 
| +
 | 
| +        EXPECT_EQ(3u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(150, 150, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Old bounds of |first|.
 | 
| +        EXPECT_EQ(IntRect(200, 200, 50, 50), getPaintController().paintChunks()[0].rasterInvalidationRects[1].rect); // |second| disappeared from the chunk.
 | 
| +        EXPECT_EQ(IntRect(100, 100, 150, 150), getPaintController().paintChunks()[0].rasterInvalidationRects[2].rect); // New bounds of |first|.
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -623,9 +625,9 @@ TEST_P(PaintControllerTest, UpdateClip)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(LayoutRect::infiniteIntRect()))); // This is a new chunk.
 | 
|  
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // This is a new chunk.
 | 
|          getPaintController().updateCurrentPaintChunkProperties(&m_rootPaintChunkId, PaintChunkProperties());
 | 
|      }
 | 
|  
 | 
| @@ -651,10 +653,11 @@ TEST_P(PaintControllerTest, UpdateClip)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(2u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 200, 200))); // |second| disappeared from the first chunk.
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[1].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(LayoutRect::infiniteIntRect()))); // This is a new chunk.
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 200, 200), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // |second| disappeared from the first chunk.
 | 
| +
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[1].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[1].rasterInvalidationRects[0].rect); // This is a new chunk.
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -756,9 +759,9 @@ TEST_P(PaintControllerTest, UpdateSwapOrderWithChildren)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 200, 100, 100), // Bounds of |container2| which was moved behind |container1|.
 | 
| -            FloatRect(100, 200, 50, 200))); // Bounds of |content2| which was moved along with |container2|.
 | 
| +        EXPECT_EQ(2u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 200, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Bounds of |container2| which was moved behind |container1|.
 | 
| +        EXPECT_EQ(IntRect(100, 200, 50, 200), getPaintController().paintChunks()[0].rasterInvalidationRects[1].rect); // Bounds of |content2| which was moved along with |container2|.
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -820,11 +823,11 @@ TEST_P(PaintControllerTest, UpdateSwapOrderWithChildrenAndInvalidation)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 100, 100), // Old bounds of |container1|.
 | 
| -            FloatRect(100, 100, 100, 100), // New bounds of |container1|.
 | 
| -            FloatRect(100, 200, 100, 100), // Bounds of |container2| which was moved behind |container1|.
 | 
| -            FloatRect(100, 200, 50, 200))); // Bounds of |content2| which was moved along with |container2|.
 | 
| +        EXPECT_EQ(4u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Old bounds of |container1|.
 | 
| +        EXPECT_EQ(IntRect(100, 200, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[1].rect); // Bounds of |container2| which was moved behind |container1|.
 | 
| +        EXPECT_EQ(IntRect(100, 200, 50, 200), getPaintController().paintChunks()[0].rasterInvalidationRects[2].rect); // Bounds of |content2| which was moved along with |container2|.
 | 
| +        EXPECT_EQ(IntRect(100, 100, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[3].rect); // New bounds of |container1|.
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -884,10 +887,11 @@ TEST_P(PaintControllerTest, CachedSubsequenceSwapOrder)
 | 
|          EXPECT_EQ(2u, getPaintController().paintChunks().size());
 | 
|          EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType), getPaintController().paintChunks()[0].id);
 | 
|          EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType), getPaintController().paintChunks()[1].id);
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(LayoutRect::infiniteIntRect())));
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[1].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(LayoutRect::infiniteIntRect())));
 | 
| +
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Old bounds of |container1|.
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[1].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[1].rasterInvalidationRects[0].rect); // Old bounds of |container1|.
 | 
|      }
 | 
|  
 | 
|      // Simulate the situation when container1 e.g. gets a z-index that is now greater than container2.
 | 
| @@ -1002,10 +1006,11 @@ TEST_P(PaintControllerTest, UpdateSwapOrderCrossingChunks)
 | 
|          EXPECT_EQ(2u, getPaintController().paintChunks().size());
 | 
|          EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType), getPaintController().paintChunks()[0].id);
 | 
|          EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType), getPaintController().paintChunks()[1].id);
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(LayoutRect::infiniteIntRect())));
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[1].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(LayoutRect::infiniteIntRect())));
 | 
| +
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[1].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[1].rasterInvalidationRects[0].rect);
 | 
|      }
 | 
|  
 | 
|      // Move content2 into container1, without invalidation.
 | 
| @@ -1042,10 +1047,10 @@ TEST_P(PaintControllerTest, UpdateSwapOrderCrossingChunks)
 | 
|          EXPECT_EQ(PaintChunk::Id(container1, backgroundDrawingType), getPaintController().paintChunks()[0].id);
 | 
|          EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType), getPaintController().paintChunks()[1].id);
 | 
|          // |content2| is invalidated raster on both the old chunk and the new chunk.
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 200, 50, 200)));
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[1].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 200, 50, 200)));
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 200, 50, 200), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[1].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 200, 50, 200), getPaintController().paintChunks()[1].rasterInvalidationRects[0].rect);
 | 
|      }
 | 
|  }
 | 
|  
 | 
| @@ -1157,11 +1162,17 @@ TEST_P(PaintControllerTest, CachedNestedSubsequenceUpdate)
 | 
|          EXPECT_EQ(PaintChunk::Id(container1, foregroundDrawingType), getPaintController().paintChunks()[2].id);
 | 
|          EXPECT_EQ(PaintChunk::Id(container2, backgroundDrawingType), getPaintController().paintChunks()[3].id);
 | 
|          EXPECT_EQ(PaintChunk::Id(content2, backgroundDrawingType), getPaintController().paintChunks()[4].id);
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect())));
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[1].rasterInvalidationRects, UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect())));
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[2].rasterInvalidationRects, UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect())));
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[3].rasterInvalidationRects, UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect())));
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[4].rasterInvalidationRects, UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect())));
 | 
| +
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[1].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[2].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[3].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[4].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
|      }
 | 
|  
 | 
|      // Invalidate container1 but not content1.
 | 
| @@ -1236,15 +1247,17 @@ TEST_P(PaintControllerTest, CachedNestedSubsequenceUpdate)
 | 
|          EXPECT_EQ(PaintChunk::Id(content2, foregroundDrawingType), getPaintController().paintChunks()[0].id);
 | 
|          EXPECT_EQ(PaintChunk::Id(content1, backgroundDrawingType), getPaintController().paintChunks()[1].id);
 | 
|          EXPECT_EQ(PaintChunk::Id(container1, foregroundDrawingType), getPaintController().paintChunks()[2].id);
 | 
| +
 | 
|          // This is a new chunk.
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(LayoutRect::infiniteIntRect())));
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
| +
 | 
|          // This chunk didn't change.
 | 
|          EXPECT_THAT(getPaintController().paintChunks()[1].rasterInvalidationRects, UnorderedElementsAre());
 | 
|          // |container1| is invalidated.
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[2].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 100, 100), // Old bounds of |container1|.
 | 
| -            FloatRect(100, 100, 100, 100))); // New bounds of |container1|.
 | 
| +        EXPECT_EQ(2u, getPaintController().paintChunks()[2].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 100, 100), getPaintController().paintChunks()[2].rasterInvalidationRects[0].rect); // Old bounds of |container1|.
 | 
| +        EXPECT_EQ(IntRect(100, 100, 100, 100), getPaintController().paintChunks()[2].rasterInvalidationRects[1].rect); // New bounds of |container1|.
 | 
|      }
 | 
|  
 | 
|  #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
 | 
| @@ -1283,7 +1296,8 @@ TEST_P(PaintControllerTest, SkipCache)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(FloatRect(LayoutRect::infiniteIntRect())));
 | 
| +        EXPECT_EQ(1u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(LayoutRect::infiniteIntRect(), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect);
 | 
|  
 | 
|          getPaintController().updateCurrentPaintChunkProperties(&m_rootPaintChunkId, PaintChunkProperties());
 | 
|      }
 | 
| @@ -1315,9 +1329,9 @@ TEST_P(PaintControllerTest, SkipCache)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 100, 100), // Old bounds of |content|.
 | 
| -            FloatRect(100, 100, 100, 100))); // New bounds of |content|.
 | 
| +        EXPECT_EQ(2u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Old bounds of |content|.
 | 
| +        EXPECT_EQ(IntRect(100, 100, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[1].rect); // New bounds of |content|.
 | 
|  
 | 
|          getPaintController().updateCurrentPaintChunkProperties(&m_rootPaintChunkId, PaintChunkProperties());
 | 
|      }
 | 
| @@ -1345,11 +1359,11 @@ TEST_P(PaintControllerTest, SkipCache)
 | 
|  
 | 
|      if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
 | 
|          EXPECT_EQ(1u, getPaintController().paintChunks().size());
 | 
| -        EXPECT_THAT(getPaintController().paintChunks()[0].rasterInvalidationRects, UnorderedElementsAre(
 | 
| -            FloatRect(100, 100, 200, 200), // Old bounds of |multicol|.
 | 
| -            FloatRect(100, 100, 200, 200), // New bounds of |multicol|.
 | 
| -            FloatRect(100, 100, 100, 100), // Old bounds of |content|.
 | 
| -            FloatRect(100, 100, 100, 100))); // New bounds of |content|.
 | 
| +        EXPECT_EQ(4u, getPaintController().paintChunks()[0].rasterInvalidationRects.size());
 | 
| +        EXPECT_EQ(IntRect(100, 100, 200, 200), getPaintController().paintChunks()[0].rasterInvalidationRects[0].rect); // Old bounds of |multicol|.
 | 
| +        EXPECT_EQ(IntRect(100, 100, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[1].rect); // Old bounds of |content|.
 | 
| +        EXPECT_EQ(IntRect(100, 100, 200, 200), getPaintController().paintChunks()[0].rasterInvalidationRects[2].rect); // New bounds of |multicol|.
 | 
| +        EXPECT_EQ(IntRect(100, 100, 100, 100), getPaintController().paintChunks()[0].rasterInvalidationRects[3].rect); // New bounds of |content|.
 | 
|      }
 | 
|  }
 | 
|  
 | 
| 
 |