| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // we need to dirty our stacking context's z-order list. | 94 // we need to dirty our stacking context's z-order list. |
| 95 RenderStyle* oldStyle = style(); | 95 RenderStyle* oldStyle = style(); |
| 96 if (oldStyle) { | 96 if (oldStyle) { |
| 97 // Do a repaint with the old style first through RenderLayerRepainter. | 97 // Do a repaint with the old style first through RenderLayerRepainter. |
| 98 // RenderObject::styleWillChange takes care of repainting objects withou
t RenderLayers. | 98 // RenderObject::styleWillChange takes care of repainting objects withou
t RenderLayers. |
| 99 if (parent() && diff.needsRepaintLayer()) { | 99 if (parent() && diff.needsRepaintLayer()) { |
| 100 layer()->repainter().repaintIncludingNonCompositingDescendants(); | 100 layer()->repainter().repaintIncludingNonCompositingDescendants(); |
| 101 if (oldStyle->hasClip() != newStyle.hasClip() | 101 if (oldStyle->hasClip() != newStyle.hasClip() |
| 102 || oldStyle->clip() != newStyle.clip()) | 102 || oldStyle->clip() != newStyle.clip()) |
| 103 layer()->clipper().clearClipRectsIncludingDescendants(); | 103 layer()->clipper().clearClipRectsIncludingDescendants(); |
| 104 } else if (diff.needsFullLayout()) { | |
| 105 if (hasLayer()) { | |
| 106 if (!layer()->hasCompositedLayerMapping() && oldStyle->position(
) != newStyle.position()) | |
| 107 layer()->repainter().repaintIncludingNonCompositingDescendan
ts(); | |
| 108 } else if (newStyle.hasTransform() || newStyle.opacity() < 1 || newS
tyle.hasFilter()) { | |
| 109 // If we don't have a layer yet, but we are going to get one bec
ause of transform or opacity, | |
| 110 // then we need to repaint the old position of the object. | |
| 111 paintInvalidationForWholeRenderer(); | |
| 112 } | |
| 113 } | 104 } |
| 114 } | 105 } |
| 115 | 106 |
| 116 RenderObject::styleWillChange(diff, newStyle); | 107 RenderObject::styleWillChange(diff, newStyle); |
| 117 } | 108 } |
| 118 | 109 |
| 119 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt
yle* oldStyle) | 110 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt
yle* oldStyle) |
| 120 { | 111 { |
| 121 bool hadTransform = hasTransform(); | 112 bool hadTransform = hasTransform(); |
| 122 | 113 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // savings. | 172 // savings. |
| 182 layer()->addLayerHitTestRects(rects); | 173 layer()->addLayerHitTestRects(rects); |
| 183 } | 174 } |
| 184 } else { | 175 } else { |
| 185 RenderObject::addLayerHitTestRects(rects, currentLayer, layerOffset, con
tainerRect); | 176 RenderObject::addLayerHitTestRects(rects, currentLayer, layerOffset, con
tainerRect); |
| 186 } | 177 } |
| 187 } | 178 } |
| 188 | 179 |
| 189 } // namespace WebCore | 180 } // namespace WebCore |
| 190 | 181 |
| OLD | NEW |