Chromium Code Reviews| Index: Source/core/rendering/RenderLayerModelObject.cpp |
| diff --git a/Source/core/rendering/RenderLayerModelObject.cpp b/Source/core/rendering/RenderLayerModelObject.cpp |
| index 82b423b6d1e9e948e10fed043cf89f8d26c50929..ba76efc4e46b45760408a5f60aadffa31c9b9b46 100644 |
| --- a/Source/core/rendering/RenderLayerModelObject.cpp |
| +++ b/Source/core/rendering/RenderLayerModelObject.cpp |
| @@ -111,16 +111,21 @@ void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS |
| // 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->position() != newStyle->position() |
| - || oldStyle->zIndex() != newStyle->zIndex() |
| - || oldStyle->hasAutoZIndex() != newStyle->hasAutoZIndex() |
| - || !(oldStyle->clip() == newStyle->clip()) |
| - || oldStyle->hasClip() != newStyle->hasClip() |
| - || oldStyle->opacity() != newStyle->opacity() |
| - || oldStyle->transform() != newStyle->transform() |
| - || oldStyle->filter() != newStyle->filter() |
| - ) |
| - layer()->repainter().repaintIncludingDescendants(); |
| + if (!(oldStyle->clip() == newStyle->clip()) |
|
esprehn
2014/03/05 00:09:49
Use != instead
|
| + || oldStyle->hasClip() != newStyle->hasClip()) { |
| + // Composited layers don't need to be repainted when |
| + // a parent's clip changes. |
|
esprehn
2014/03/05 00:09:49
Don't wrap the comment.
|
| + layer()->repainter().repaintIncludingNonCompositingDescendants(this); |
| + } else if (!layer()->hasCompositedLayerMapping()) { |
|
esprehn
2014/03/05 00:09:49
How do we know this is safe? The other properties
|
| + 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() |
| + ) |
|
esprehn
2014/03/05 00:09:49
paren should be in the previous line
|
| + layer()->repainter().repaintIncludingDescendants(); |
| + } |
| } 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. |