| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 RenderObject::willBeDestroyed(); | 84 RenderObject::willBeDestroyed(); |
| 85 | 85 |
| 86 destroyLayer(); | 86 destroyLayer(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS
tyle& newStyle) | 89 void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS
tyle& newStyle) |
| 90 { | 90 { |
| 91 s_wasFloating = isFloating(); | 91 s_wasFloating = isFloating(); |
| 92 | 92 |
| 93 // If our z-index changes value or our visibility changes, | |
| 94 // we need to dirty our stacking context's z-order list. | |
| 95 RenderStyle* oldStyle = style(); | 93 RenderStyle* oldStyle = style(); |
| 96 if (oldStyle) { | 94 if (oldStyle) { |
| 97 // Do a repaint with the old style first through RenderLayerRepainter. | 95 // Mark layer for invalidation with the old style first. |
| 98 // RenderObject::styleWillChange takes care of repainting objects withou
t RenderLayers. | 96 // RenderObject::styleWillChange and RenderObject::setStyle take care of |
| 97 // invalidating objects without RenderLayers and invalidating layers wit
h the |
| 98 // new style. |
| 99 if (parent() && diff.needsRepaintLayer()) { | 99 if (parent() && diff.needsRepaintLayer()) { |
| 100 // This is currently need to make non-layout-requiring updates work
that impact descendant layers, | 100 layer()->setShouldDoFullPaintInvalidationIncludingNonCompositingDesc
endants(); |
| 101 // such as changes to opacity or transform. | |
| 102 layer()->repainter().repaintIncludingNonCompositingDescendants(); | |
| 103 if (oldStyle->hasClip() != newStyle.hasClip() | 101 if (oldStyle->hasClip() != newStyle.hasClip() |
| 104 || oldStyle->clip() != newStyle.clip()) | 102 || oldStyle->clip() != newStyle.clip()) |
| 105 layer()->clipper().clearClipRectsIncludingDescendants(); | 103 layer()->clipper().clearClipRectsIncludingDescendants(); |
| 106 } | 104 } |
| 107 } | 105 } |
| 108 | 106 |
| 109 RenderObject::styleWillChange(diff, newStyle); | 107 RenderObject::styleWillChange(diff, newStyle); |
| 110 } | 108 } |
| 111 | 109 |
| 112 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt
yle* oldStyle) | 110 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt
yle* oldStyle) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // savings. | 172 // savings. |
| 175 layer()->addLayerHitTestRects(rects); | 173 layer()->addLayerHitTestRects(rects); |
| 176 } | 174 } |
| 177 } else { | 175 } else { |
| 178 RenderObject::addLayerHitTestRects(rects, currentLayer, layerOffset, con
tainerRect); | 176 RenderObject::addLayerHitTestRects(rects, currentLayer, layerOffset, con
tainerRect); |
| 179 } | 177 } |
| 180 } | 178 } |
| 181 | 179 |
| 182 } // namespace blink | 180 } // namespace blink |
| 183 | 181 |
| OLD | NEW |