Index: Source/core/rendering/RenderLayerModelObject.cpp |
diff --git a/Source/core/rendering/RenderLayerModelObject.cpp b/Source/core/rendering/RenderLayerModelObject.cpp |
index c413fd2466fd060d5c557839a9a922859af09942..38f807c884577e9398c504f8f02858e85bb9dfd0 100644 |
--- a/Source/core/rendering/RenderLayerModelObject.cpp |
+++ b/Source/core/rendering/RenderLayerModelObject.cpp |
@@ -98,35 +98,16 @@ void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS |
if (oldStyle) { |
// Do a repaint with the old style first through RenderLayerRepainter. |
// RenderObject::styleWillChange takes care of repainting objects without RenderLayers. |
- if (parent() && diff == StyleDifferenceRepaintLayer) { |
+ if (parent() && diff.needsRepaintLayer()) { |
layer()->repainter().repaintIncludingNonCompositingDescendants(containerForRepaint()); |
if (oldStyle->hasClip() != newStyle.hasClip() |
|| oldStyle->clip() != newStyle.clip()) |
layer()->clipper().clearClipRectsIncludingDescendants(); |
- } |
- |
- if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLayout) { |
eseidel
2014/04/17 20:03:34
Presumably this is the behavior change, correct?
|
- // When a layout hint happens, we go ahead and do a repaint of the layer, since the layer could |
- // end up being destroyed. |
- 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. |
- 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. |
- repaint(); |
- } |
+ } else if (!hasLayer() && diff.needsLayout() |
+ && (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. |
+ repaint(); |
} |
} |