Chromium Code Reviews| Index: sky/engine/core/rendering/RenderObject.cpp |
| diff --git a/sky/engine/core/rendering/RenderObject.cpp b/sky/engine/core/rendering/RenderObject.cpp |
| index 67626e7434aef20a824d508c279455c47dfe8b03..53dd7c2c0a687a4d1561e88b6efb2cfd8d4ecbab 100644 |
| --- a/sky/engine/core/rendering/RenderObject.cpp |
| +++ b/sky/engine/core/rendering/RenderObject.cpp |
| @@ -1199,30 +1199,18 @@ void RenderObject::selectionStartEnd(int& spos, int& epos) const |
| StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff) const |
| { |
| - // If transform changed, and the layer does not paint into its own separate backing, then we need to invalidate paints. |
| - if (diff.transformChanged()) { |
| - // Text nodes share style with their parents but transforms don't apply to them, |
| - // hence the !isText() check. |
| - if (!isText()) |
| - diff.setNeedsPaintInvalidationLayer(); |
| + // If transform, opacity or zIndex changed, then we need to invalidate paints. |
| + // Text nodes share style with their parents but transform/opacity/z-index don't apply to them, |
| + if (!isText() && |
|
ojan
2015/01/15 01:56:42
This is the same as the old code, except I merged
|
| + (diff.transformChanged() || diff.opacityChanged() || diff.zIndexChanged())) { |
| + diff.setNeedsPaintInvalidation(); |
| } |
| - // If opacity or zIndex changed, and the layer does not paint into its own separate backing, then we need to invalidate paints (also |
| - // ignoring text nodes) |
| - if (diff.opacityChanged() || diff.zIndexChanged()) { |
| - if (!isText()) |
| - diff.setNeedsPaintInvalidationLayer(); |
| - } |
| - |
| - // If filter changed, and the layer does not paint into its own separate backing or it paints with filters, then we need to invalidate paints. |
| + // If filter changed and it paints with filters, then we need to invalidate paints. |
| if (diff.filterChanged() && hasLayer()) { |
| - diff.setNeedsPaintInvalidationLayer(); |
| + diff.setNeedsPaintInvalidation(); |
| } |
| - if (diff.textOrColorChanged() && !diff.needsPaintInvalidation() |
|
ojan
2015/01/15 01:56:42
I believe we don't need this anymore. If text or c
|
| - && hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor()) |
| - diff.setNeedsPaintInvalidationObject(); |
| - |
| // The answer to layerTypeRequired() for plugins, iframes, and canvas can change without the actual |
| // style changing, since it depends on whether we decide to composite these elements. When the |
| // layer status of one of these elements changes, we need to force a layout. |
| @@ -1232,12 +1220,6 @@ StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff) const |
| diff.setNeedsFullLayout(); |
| } |
| - // If we have no layer(), just treat a PaintInvalidationLayer hint as a normal paint invalidation. |
| - if (diff.needsPaintInvalidationLayer() && !hasLayer()) { |
| - diff.clearNeedsPaintInvalidation(); |
| - diff.setNeedsPaintInvalidationObject(); |
| - } |
| - |
| return diff; |
| } |