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

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 443123003: Unified invalidation for repaint-only style changes (non-layers) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More rebaselines Created 6 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
« no previous file with comments | « LayoutTests/svg/filters/filter-refresh-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index dd49e1196d6f569a1a74a77d79594879cccfd4d9..b250c4e7146cf844000a6aa49ba3a3533fd18e22 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -2063,19 +2063,10 @@ void RenderObject::setStyle(PassRefPtr<RenderStyle> style)
container->setNeedsOverflowRecalcAfterStyleChange();
}
- if (updatedDiff.needsRepaintLayer()) {
+ if (updatedDiff.needsRepaintLayer())
toRenderLayerModelObject(this)->layer()->setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
- } else if (updatedDiff.needsRepaint()) {
- // Invalidate paints with the new style, e.g., for example if we go from not having
- // an outline to having an outline.
-
- // The paintInvalidationForWholeRenderer() call is needed for non-layout changes to style. See the corresponding
- // comment in RenderObject::styleWillChange for why.
- if (needsLayout())
- setShouldDoFullPaintInvalidation(true);
- else if (!selfNeedsLayout())
- paintInvalidationForWholeRenderer();
- }
+ else if (diff.needsRepaintObject() || updatedDiff.needsRepaintObject())
+ setShouldDoFullPaintInvalidation(true);
}
static inline bool rendererHasBackground(const RenderObject* renderer)
@@ -2109,14 +2100,6 @@ void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle& newS
}
}
- // For style-only changes that need paint invalidation, we currently need to issue a paint invalidation before and after the style
- // change. The paint invalidation before style change is accomplished here. The paint invalidation after style change is accomplished
- // in RenderObject::setStyle.
- if (m_parent && diff.needsRepaintObject()) {
- if (!diff.needsLayout() && !needsLayout())
- paintInvalidationForWholeRenderer();
- }
-
if (isFloating() && (m_style->floating() != newStyle.floating()))
// For changes in float styles, we need to conceivably remove ourselves
// from the floating objects list.
« no previous file with comments | « LayoutTests/svg/filters/filter-refresh-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698