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

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

Issue 217973002: Remove duplicated invalidation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined change for landing (TM) Created 6 years, 9 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/platform/win/virtual/softwarecompositing/repaint/invalidations-on-composited-layers-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/RenderLayerModelObject.cpp
diff --git a/Source/core/rendering/RenderLayerModelObject.cpp b/Source/core/rendering/RenderLayerModelObject.cpp
index aae53878e6fabc959c8d939dcd9bf5bc178ee454..0d59c08e7c11cf5dd3c81c43514f828ae2e24542 100644
--- a/Source/core/rendering/RenderLayerModelObject.cpp
+++ b/Source/core/rendering/RenderLayerModelObject.cpp
@@ -96,15 +96,12 @@ void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS
// we need to dirty our stacking context's z-order list.
RenderStyle* oldStyle = style();
if (oldStyle) {
- if (parent()) {
- // Do a repaint with the old style first, e.g., for example if we go from
- // having an outline to not having an outline.
- if (diff == StyleDifferenceRepaintLayer) {
- layer()->repainter().repaintIncludingDescendants();
- if (oldStyle->clip() != newStyle.clip())
- layer()->clipper().clearClipRectsIncludingDescendants();
- } else if (diff == StyleDifferenceRepaint || newStyle.outlineSize() < oldStyle->outlineSize())
- repaint();
+ // Do a repaint with the old style first through RenderLayerRepainter.
+ // RenderObject::styleWillChange takes care of repainting objects without RenderLayers.
+ if (parent() && diff == StyleDifferenceRepaintLayer) {
+ layer()->repainter().repaintIncludingDescendants();
+ if (oldStyle->clip() != newStyle.clip())
+ layer()->clipper().clearClipRectsIncludingDescendants();
}
if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLayout) {
« no previous file with comments | « LayoutTests/platform/win/virtual/softwarecompositing/repaint/invalidations-on-composited-layers-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698