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

Unified Diff: Source/core/layout/LayoutObject.cpp

Issue 1320553004: LayoutObject::adjustStyleDifference doesn't check backgroundColor when repainting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: With fixed layout test Created 5 years, 4 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: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index 6ddea1c970ff66b203ede634690f88b51eb529ca..98972d6e17d3747c857071eeccedc0fcaeb9adbb 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1690,8 +1690,9 @@ StyleDifference LayoutObject::adjustStyleDifference(StyleDifference diff) const
// If opacity or zIndex changed, and the layer does not paint into its own separate backing, then we need to invalidate paints (also
// ignoring text nodes)
if (diff.opacityChanged() || diff.zIndexChanged()) {
- if (!isText() && (!hasLayer() || !toLayoutBoxModelObject(this)->layer()->hasStyleDeterminedDirectCompositingReasons()))
+ if (!isText() && (!hasLayer() || !toLayoutBoxModelObject(this)->layer()->hasStyleDeterminedDirectCompositingReasons())) {
Timothy Loh 2015/08/28 04:48:44 Don't add unrelated changes like these, it just ma
nainar1 2015/08/28 05:02:40 Done
diff.setNeedsPaintInvalidationLayer();
+ }
}
// If filter changed, and the layer does not paint into its own separate backing or it paints with filters, then we need to invalidate paints.
@@ -1703,8 +1704,10 @@ StyleDifference LayoutObject::adjustStyleDifference(StyleDifference diff) const
if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) {
if (style()->hasBorder() || style()->hasOutline()
- || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace()))
+ || style()->isBackgroundColorCurrentColor()
+ || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace())) {
diff.setNeedsPaintInvalidationObject();
+ }
}
// The answer to layerTypeRequired() for plugins, iframes, and canvas can change without the actual

Powered by Google App Engine
This is Rietveld 408576698