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

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

Issue 2634613002: Revert of Remove obsolete code that invalidates document element on LayoutView resize (Closed)
Patch Set: - Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/BoxPaintInvalidatorTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPaintInvalidatorTest.cpp b/third_party/WebKit/Source/core/paint/BoxPaintInvalidatorTest.cpp
index 975a31a4deea2ee16052814e6be63c7ce72bfd62..d4f4992456ebac2af04b2e2100615940021a59bb 100644
--- a/third_party/WebKit/Source/core/paint/BoxPaintInvalidatorTest.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxPaintInvalidatorTest.cpp
@@ -238,14 +238,22 @@ TEST_P(BoxPaintInvalidatorTest, CompositedLayoutViewResize) {
// is clipped.
// TODO(skobes): Treat LayoutView in the same way as normal objects having
// background-attachment: local. crbug.com/568847.
- EXPECT_FALSE(layoutView()
- .layer()
- ->graphicsLayerBacking()
- ->getRasterInvalidationTracking());
+ // TODO(wangxianzhu): Temporary for crbug.com/680745.
+ // EXPECT_FALSE(layoutView()
+ // .layer()
+ // ->graphicsLayerBacking()
+ // ->getRasterInvalidationTracking());
+ EXPECT_EQ(1u, layoutView()
+ .layer()
+ ->graphicsLayerBacking()
+ ->getRasterInvalidationTracking()
+ ->trackedRasterInvalidations.size());
} else {
const auto& rasterInvalidations =
getRasterInvalidationTracking()->trackedRasterInvalidations;
- ASSERT_EQ(1u, rasterInvalidations.size());
+ // TODO(wangxianzhu): Temporary for crbug.com/680745.
+ // ASSERT_EQ(1u, rasterInvalidations.size());
+ ASSERT_EQ(2u, rasterInvalidations.size());
EXPECT_EQ(IntRect(0, 2000, 800, 1000), rasterInvalidations[0].rect);
EXPECT_EQ(static_cast<const DisplayItemClient*>(&layoutView()),
rasterInvalidations[0].client);
@@ -292,7 +300,9 @@ TEST_P(BoxPaintInvalidatorTest, CompositedLayoutViewGradientResize) {
} else {
const auto& rasterInvalidations =
getRasterInvalidationTracking()->trackedRasterInvalidations;
- ASSERT_EQ(1u, rasterInvalidations.size());
+ // TODO(wangxianzhu): Temporary for crbug.com/680745.
+ // ASSERT_EQ(1u, rasterInvalidations.size());
+ ASSERT_EQ(2u, rasterInvalidations.size());
EXPECT_EQ(IntRect(0, 0, 800, 3000), rasterInvalidations[0].rect);
EXPECT_EQ(static_cast<const DisplayItemClient*>(&layoutView()),
rasterInvalidations[0].client);
@@ -333,7 +343,10 @@ TEST_P(BoxPaintInvalidatorTest, NonCompositedLayoutViewResize) {
content->setAttribute(HTMLNames::styleAttr, "height: 500px");
document().view()->updateAllLifecyclePhases();
// No invalidation because the changed part of layout overflow is clipped.
- EXPECT_FALSE(getRasterInvalidationTracking());
+ // TODO(wangxianzhu): Temporary for crbug.com/680745.
+ // EXPECT_FALSE(getRasterInvalidationTracking());
+ EXPECT_EQ(1u,
+ getRasterInvalidationTracking()->trackedRasterInvalidations.size());
document().view()->setTracksPaintInvalidations(false);
// Resize the iframe.
@@ -392,7 +405,9 @@ TEST_P(BoxPaintInvalidatorTest, NonCompositedLayoutViewGradientResize) {
document().view()->updateAllLifecyclePhases();
const auto* rasterInvalidations =
&getRasterInvalidationTracking()->trackedRasterInvalidations;
- ASSERT_EQ(1u, rasterInvalidations->size());
+ // TODO(wangxianzhu): Temporary for crbug.com/680745.
+ // ASSERT_EQ(1u, rasterInvalidations->size());
+ ASSERT_EQ(2u, rasterInvalidations->size());
EXPECT_EQ(IntRect(0, 0, 100, 100), (*rasterInvalidations)[0].rect);
EXPECT_EQ(static_cast<const DisplayItemClient*>(frameLayoutView),
(*rasterInvalidations)[0].client);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698