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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 } | 89 } |
90 | 90 |
91 void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS tyle* newStyle) | 91 void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS tyle* newStyle) |
92 { | 92 { |
93 s_wasFloating = isFloating(); | 93 s_wasFloating = isFloating(); |
94 | 94 |
95 // If our z-index changes value or our visibility changes, | 95 // If our z-index changes value or our visibility changes, |
96 // we need to dirty our stacking context's z-order list. | 96 // we need to dirty our stacking context's z-order list. |
97 RenderStyle* oldStyle = style(); | 97 RenderStyle* oldStyle = style(); |
98 if (oldStyle && newStyle) { | 98 if (oldStyle && newStyle) { |
99 if (parent()) { | 99 // Do a repaint with the old style first, e.g., for example if we go fro m |
100 // Do a repaint with the old style first, e.g., for example if we go from | 100 // having an outline to not having an outline. |
esprehn
2014/03/31 17:19:50
This comment is now stale. Please remove it.
Julien - ping for review
2014/03/31 18:04:04
We still generate an invalidation with the old sty
| |
101 // having an outline to not having an outline. | 101 if (parent() && diff == StyleDifferenceRepaintLayer) { |
102 if (diff == StyleDifferenceRepaintLayer) { | 102 layer()->repainter().repaintIncludingDescendants(); |
103 layer()->repainter().repaintIncludingDescendants(); | 103 if (oldStyle->clip() != newStyle->clip()) |
104 if (oldStyle->clip() != newStyle->clip()) | 104 layer()->clipper().clearClipRectsIncludingDescendants(); |
105 layer()->clipper().clearClipRectsIncludingDescendants(); | |
106 } else if (diff == StyleDifferenceRepaint || newStyle->outlineSize() < oldStyle->outlineSize()) | |
107 repaint(); | |
108 } | 105 } |
109 | 106 |
110 if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLa yout) { | 107 if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLa yout) { |
111 // When a layout hint happens, we go ahead and do a repaint of the l ayer, since the layer could | 108 // When a layout hint happens, we go ahead and do a repaint of the l ayer, since the layer could |
112 // end up being destroyed. | 109 // end up being destroyed. |
113 if (hasLayer()) { | 110 if (hasLayer()) { |
114 if (oldStyle->hasClip() != newStyle->hasClip() | 111 if (oldStyle->hasClip() != newStyle->hasClip() |
115 || oldStyle->clip() != newStyle->clip()) { | 112 || oldStyle->clip() != newStyle->clip()) { |
116 // Composited layers don't need to be repainted when a paren t's clip changes. | 113 // Composited layers don't need to be repainted when a paren t's clip changes. |
117 layer()->repainter().repaintIncludingNonCompositingDescendan ts(containerForRepaint()); | 114 layer()->repainter().repaintIncludingNonCompositingDescendan ts(containerForRepaint()); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 return m_layer ? m_layer->hasCompositedLayerMapping() : false; | 219 return m_layer ? m_layer->hasCompositedLayerMapping() : false; |
223 } | 220 } |
224 | 221 |
225 CompositedLayerMapping* RenderLayerModelObject::groupedMapping() const | 222 CompositedLayerMapping* RenderLayerModelObject::groupedMapping() const |
226 { | 223 { |
227 return m_layer ? m_layer->groupedMapping() : 0; | 224 return m_layer ? m_layer->groupedMapping() : 0; |
228 } | 225 } |
229 | 226 |
230 } // namespace WebCore | 227 } // namespace WebCore |
231 | 228 |
OLD | NEW |