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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 void RenderSVGInline::addChild(RenderObject* child, RenderObject* beforeChild) | 123 void RenderSVGInline::addChild(RenderObject* child, RenderObject* beforeChild) |
124 { | 124 { |
125 RenderInline::addChild(child, beforeChild); | 125 RenderInline::addChild(child, beforeChild); |
126 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor
(this)) | 126 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor
(this)) |
127 textRenderer->subtreeChildWasAdded(child); | 127 textRenderer->subtreeChildWasAdded(child); |
128 } | 128 } |
129 | 129 |
130 void RenderSVGInline::removeChild(RenderObject* child) | 130 void RenderSVGInline::removeChild(RenderObject* child) |
131 { | 131 { |
132 RenderSVGText* textRenderer = child->isSVGInlineText() ? RenderSVGText::loca
teRenderSVGTextAncestor(this) : 0; | 132 RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(thi
s); |
133 if (!textRenderer) { | 133 if (!textRenderer) { |
134 RenderInline::removeChild(child); | 134 RenderInline::removeChild(child); |
135 return; | 135 return; |
136 } | 136 } |
137 | |
138 RenderSVGInlineText* text = toRenderSVGInlineText(child); | |
139 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; | 137 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; |
140 textRenderer->subtreeChildWillBeRemoved(text, affectedAttributes); | 138 textRenderer->subtreeChildWillBeRemoved(child, affectedAttributes); |
141 RenderInline::removeChild(child); | 139 RenderInline::removeChild(child); |
142 textRenderer->subtreeChildWasRemoved(affectedAttributes); | 140 textRenderer->subtreeChildWasRemoved(affectedAttributes); |
143 } | 141 } |
144 | 142 |
145 } | 143 } |
146 | 144 |
147 #endif // ENABLE(SVG) | 145 #endif // ENABLE(SVG) |
OLD | NEW |