Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp

Issue 2888253002: Skip both paint and raster invalidation for LayoutSVGHiddenContainer subtree (Closed)
Patch Set: Rebaseline-cl Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp
index bb81647a22feaa082fc2445e440f71236e95386e..e113b963c586c7431832c9a890286cd89e6210bc 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp
@@ -217,7 +217,7 @@ TEST_P(PaintInvalidationTest, SVGHiddenContainer) {
// mask_rect's visual rect is in coordinates of the mask.
auto* mask_rect = GetLayoutObjectByElementId("mask-rect");
- EXPECT_EQ(LayoutRect(22, 44, 66, 88), mask_rect->VisualRect());
+ EXPECT_EQ(LayoutRect(), mask_rect->VisualRect());
// real_rect's visual rect is in coordinates of its paint invalidation
// container (the view).
@@ -227,7 +227,7 @@ TEST_P(PaintInvalidationTest, SVGHiddenContainer) {
GetDocument().View()->SetTracksPaintInvalidations(true);
ToElement(mask_rect->GetNode())->setAttribute("x", "20");
GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
- EXPECT_EQ(LayoutRect(40, 44, 66, 88), mask_rect->VisualRect());
+ EXPECT_EQ(LayoutRect(), mask_rect->VisualRect());
EXPECT_EQ(LayoutRect(155, 166, 7, 8), real_rect->VisualRect());
// Should invalidate raster for real_rect only.
@@ -239,9 +239,10 @@ TEST_P(PaintInvalidationTest, SVGHiddenContainer) {
EXPECT_EQ(PaintInvalidationReason::kFull,
real_rect->GetPaintInvalidationReason());
- // Should still invalidate DisplayItemClient of mask_rect.
- EXPECT_EQ(PaintInvalidationReason::kFull,
+ // Should not invalidate DisplayItemClient of mask_rect.
+ EXPECT_EQ(PaintInvalidationReason::kNone,
mask_rect->GetPaintInvalidationReason());
+
GetDocument().View()->SetTracksPaintInvalidations(false);
}

Powered by Google App Engine
This is Rietveld 408576698