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

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

Issue 398343003: Use unified invalidation path for repaint-only style changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Also handle layers Created 6 years, 5 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 | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerModelObject.cpp
diff --git a/Source/core/rendering/RenderLayerModelObject.cpp b/Source/core/rendering/RenderLayerModelObject.cpp
index 16587ac73d9a3e1ee351f496c70c48d4c96923d5..0820cbd735449fc4f3a6d7574ab106cd31916293 100644
--- a/Source/core/rendering/RenderLayerModelObject.cpp
+++ b/Source/core/rendering/RenderLayerModelObject.cpp
@@ -90,16 +90,14 @@ void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS
{
s_wasFloating = isFloating();
- // If our z-index changes value or our visibility changes,
- // we need to dirty our stacking context's z-order list.
RenderStyle* oldStyle = style();
if (oldStyle) {
- // Do a repaint with the old style first through RenderLayerRepainter.
- // RenderObject::styleWillChange takes care of repainting objects without RenderLayers.
+ // Mark layer for invalidation with the old style first.
+ // RenderObject::styleWillChange and RenderObject::setStyle take care of
+ // invalidating objects without RenderLayers and invalidating layers with the
+ // new style.
if (parent() && diff.needsRepaintLayer()) {
- // This is currently need to make non-layout-requiring updates work that impact descendant layers,
- // such as changes to opacity or transform.
- layer()->repainter().repaintIncludingNonCompositingDescendants();
+ layer()->setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
if (oldStyle->hasClip() != newStyle.hasClip()
|| oldStyle->clip() != newStyle.clip())
layer()->clipper().clearClipRectsIncludingDescendants();
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698