OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
3 * Copyright (C) 2006 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006 Apple Inc. All rights reserved. |
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 setNeedsBoundariesUpdate(); | 107 setNeedsBoundariesUpdate(); |
108 RenderInline::styleWillChange(diff, newStyle); | 108 RenderInline::styleWillChange(diff, newStyle); |
109 } | 109 } |
110 | 110 |
111 void RenderSVGInline::styleDidChange(StyleDifference diff, const RenderStyle* ol
dStyle) | 111 void RenderSVGInline::styleDidChange(StyleDifference diff, const RenderStyle* ol
dStyle) |
112 { | 112 { |
113 RenderInline::styleDidChange(diff, oldStyle); | 113 RenderInline::styleDidChange(diff, oldStyle); |
114 SVGResourcesCache::clientStyleChanged(this, diff, style()); | 114 SVGResourcesCache::clientStyleChanged(this, diff, style()); |
115 } | 115 } |
116 | 116 |
117 void RenderSVGInline::updateFromElement() | |
118 { | |
119 RenderInline::updateFromElement(); | |
120 SVGResourcesCache::clientUpdatedFromElement(this, style()); | |
121 } | |
122 | |
123 void RenderSVGInline::addChild(RenderObject* child, RenderObject* beforeChild) | 117 void RenderSVGInline::addChild(RenderObject* child, RenderObject* beforeChild) |
124 { | 118 { |
125 RenderInline::addChild(child, beforeChild); | 119 RenderInline::addChild(child, beforeChild); |
| 120 SVGResourcesCache::clientWasAddedToTree(child, child->style()); |
| 121 |
126 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor
(this)) | 122 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor
(this)) |
127 textRenderer->subtreeChildWasAdded(child); | 123 textRenderer->subtreeChildWasAdded(child); |
128 } | 124 } |
129 | 125 |
130 void RenderSVGInline::removeChild(RenderObject* child) | 126 void RenderSVGInline::removeChild(RenderObject* child) |
131 { | 127 { |
| 128 SVGResourcesCache::clientWillBeRemovedFromTree(child); |
| 129 |
132 RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(thi
s); | 130 RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(thi
s); |
133 if (!textRenderer) { | 131 if (!textRenderer) { |
134 RenderInline::removeChild(child); | 132 RenderInline::removeChild(child); |
135 return; | 133 return; |
136 } | 134 } |
137 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; | 135 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; |
138 textRenderer->subtreeChildWillBeRemoved(child, affectedAttributes); | 136 textRenderer->subtreeChildWillBeRemoved(child, affectedAttributes); |
139 RenderInline::removeChild(child); | 137 RenderInline::removeChild(child); |
140 textRenderer->subtreeChildWasRemoved(affectedAttributes); | 138 textRenderer->subtreeChildWasRemoved(affectedAttributes); |
141 } | 139 } |
142 | 140 |
143 } | 141 } |
144 | 142 |
145 #endif // ENABLE(SVG) | 143 #endif // ENABLE(SVG) |
OLD | NEW |