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

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

Issue 247713003: Separate repaint and layout requirements of StyleDifference (Step 3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments; Rebase on RAL Created 6 years, 8 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/fast/repaint/layer-visibility-expected.txt ('k') | Source/core/rendering/RenderObject.cpp » ('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 68fae90ce821862cb9c067829c8591983af19c4b..ce728d95341d91bafed60c584b5b168657f91c4d 100644
--- a/Source/core/rendering/RenderLayerModelObject.cpp
+++ b/Source/core/rendering/RenderLayerModelObject.cpp
@@ -103,25 +103,10 @@ void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS
if (oldStyle->hasClip() != newStyle.hasClip()
|| oldStyle->clip() != newStyle.clip())
layer()->clipper().clearClipRectsIncludingDescendants();
- }
-
- if (diff.needsFullLayout()) {
- // When a layout hint happens, we go ahead and do a repaint of the layer, since the layer could
- // end up being destroyed.
+ } else if (diff.needsFullLayout()) {
if (hasLayer()) {
- if (oldStyle->hasClip() != newStyle.hasClip()
- || oldStyle->clip() != newStyle.clip()) {
- // Composited layers don't need to be repainted when a parent's clip changes.
+ if (!layer()->hasCompositedLayerMapping() && oldStyle->position() != newStyle.position())
layer()->repainter().repaintIncludingNonCompositingDescendants(containerForRepaint());
- } else if (!layer()->hasCompositedLayerMapping()) {
- if (oldStyle->position() != newStyle.position()
- || oldStyle->zIndex() != newStyle.zIndex()
- || oldStyle->hasAutoZIndex() != newStyle.hasAutoZIndex()
- || oldStyle->opacity() != newStyle.opacity()
- || oldStyle->transform() != newStyle.transform()
- || oldStyle->filter() != newStyle.filter())
- layer()->repainter().repaintIncludingNonCompositingDescendants(containerForRepaint());
- }
} else if (newStyle.hasTransform() || newStyle.opacity() < 1 || newStyle.hasFilter()) {
// If we don't have a layer yet, but we are going to get one because of transform or opacity,
// then we need to repaint the old position of the object.
« no previous file with comments | « LayoutTests/fast/repaint/layer-visibility-expected.txt ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698