| 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 } |
| 104 } | 113 } |
| 105 } | 114 } |
| 106 | 115 |
| 107 RenderObject::styleWillChange(diff, newStyle); | 116 RenderObject::styleWillChange(diff, newStyle); |
| 108 } | 117 } |
| 109 | 118 |
| 110 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt
yle* oldStyle) | 119 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt
yle* oldStyle) |
| 111 { | 120 { |
| 112 bool hadTransform = hasTransform(); | 121 bool hadTransform = hasTransform(); |
| 113 | 122 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // savings. | 181 // savings. |
| 173 layer()->addLayerHitTestRects(rects); | 182 layer()->addLayerHitTestRects(rects); |
| 174 } | 183 } |
| 175 } else { | 184 } else { |
| 176 RenderObject::addLayerHitTestRects(rects, currentLayer, layerOffset, con
tainerRect); | 185 RenderObject::addLayerHitTestRects(rects, currentLayer, layerOffset, con
tainerRect); |
| 177 } | 186 } |
| 178 } | 187 } |
| 179 | 188 |
| 180 } // namespace WebCore | 189 } // namespace WebCore |
| 181 | 190 |
| OLD | NEW |