| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 if (oldStyle->clip() != newStyle->clip()) | 104 if (oldStyle->clip() != newStyle->clip()) |
| 105 layer()->clipper().clearClipRectsIncludingDescendants(); | 105 layer()->clipper().clearClipRectsIncludingDescendants(); |
| 106 } else if (diff == StyleDifferenceRepaint || newStyle->outlineSize()
< oldStyle->outlineSize()) | 106 } else if (diff == StyleDifferenceRepaint || newStyle->outlineSize()
< oldStyle->outlineSize()) |
| 107 repaint(); | 107 repaint(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLa
yout) { | 110 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 | 111 // 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. | 112 // end up being destroyed. |
| 113 if (hasLayer()) { | 113 if (hasLayer()) { |
| 114 if (oldStyle->position() != newStyle->position() | 114 if (oldStyle->hasClip() != newStyle->hasClip() |
| 115 || oldStyle->zIndex() != newStyle->zIndex() | 115 || oldStyle->clip() != newStyle->clip()) { |
| 116 || oldStyle->hasAutoZIndex() != newStyle->hasAutoZIndex() | 116 // Composited layers don't need to be repainted when a paren
t's clip changes. |
| 117 || !(oldStyle->clip() == newStyle->clip()) | 117 layer()->repainter().repaintIncludingNonCompositingDescendan
ts(this); |
| 118 || oldStyle->hasClip() != newStyle->hasClip() | 118 } else if (!layer()->hasCompositedLayerMapping()) { |
| 119 || oldStyle->opacity() != newStyle->opacity() | 119 if (oldStyle->position() != newStyle->position() |
| 120 || oldStyle->transform() != newStyle->transform() | 120 || oldStyle->zIndex() != newStyle->zIndex() |
| 121 || oldStyle->filter() != newStyle->filter() | 121 || oldStyle->hasAutoZIndex() != newStyle->hasAutoZIndex(
) |
| 122 ) | 122 || oldStyle->opacity() != newStyle->opacity() |
| 123 layer()->repainter().repaintIncludingDescendants(); | 123 || oldStyle->transform() != newStyle->transform() |
| 124 || oldStyle->filter() != newStyle->filter()) |
| 125 layer()->repainter().repaintIncludingDescendants(); |
| 126 } |
| 124 } else if (newStyle->hasTransform() || newStyle->opacity() < 1 || ne
wStyle->hasFilter()) { | 127 } else if (newStyle->hasTransform() || newStyle->opacity() < 1 || ne
wStyle->hasFilter()) { |
| 125 // If we don't have a layer yet, but we are going to get one bec
ause of transform or opacity, | 128 // If we don't have a layer yet, but we are going to get one bec
ause of transform or opacity, |
| 126 // then we need to repaint the old position of the object. | 129 // then we need to repaint the old position of the object. |
| 127 repaint(); | 130 repaint(); |
| 128 } | 131 } |
| 129 } | 132 } |
| 130 } | 133 } |
| 131 | 134 |
| 132 RenderObject::styleWillChange(diff, newStyle); | 135 RenderObject::styleWillChange(diff, newStyle); |
| 133 } | 136 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 return m_layer ? m_layer->hasCompositedLayerMapping() : false; | 217 return m_layer ? m_layer->hasCompositedLayerMapping() : false; |
| 215 } | 218 } |
| 216 | 219 |
| 217 CompositedLayerMapping* RenderLayerModelObject::groupedMapping() const | 220 CompositedLayerMapping* RenderLayerModelObject::groupedMapping() const |
| 218 { | 221 { |
| 219 return m_layer ? m_layer->groupedMapping() : 0; | 222 return m_layer ? m_layer->groupedMapping() : 0; |
| 220 } | 223 } |
| 221 | 224 |
| 222 } // namespace WebCore | 225 } // namespace WebCore |
| 223 | 226 |
| OLD | NEW |