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

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

Issue 2570463004: [SPInvalidation] Update paint properties on css clip change (Closed)
Patch Set: Rebase Created 4 years 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/PaintPropertyTreeBuilderTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
index d54efdb864f21e8c1135f1ca87e8739836eede18..bd9a0b02a5482e7e10b465f4cb14ae36c4504171 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -3138,4 +3138,15 @@ TEST_P(PaintPropertyTreeBuilderTest,
!div->layoutObject()->paintProperties()->overflowClip());
}
+// A basic sanity check for over-invalidation of paint properties.
+TEST_P(PaintPropertyTreeBuilderTest, NoPaintPropertyUpdateOnBackgroundChange) {
+ setBodyInnerHTML("<div id='div' style='background-color: blue'>DIV</div>");
+ auto* div = document().getElementById("div");
+
+ document().view()->updateAllLifecyclePhases();
+ div->setAttribute(HTMLNames::styleAttr, "background-color: green");
+ document().view()->updateLifecycleToLayoutClean();
+ EXPECT_FALSE(div->layoutObject()->needsPaintPropertyUpdate());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698