OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } | 229 } |
230 | 230 |
231 if (renderer) | 231 if (renderer) |
232 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); | 232 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); |
233 } | 233 } |
234 | 234 |
235 void SVGPathElement::invalidateMPathDependencies() | 235 void SVGPathElement::invalidateMPathDependencies() |
236 { | 236 { |
237 // <mpath> can only reference <path> but this dependency is not handled in | 237 // <mpath> can only reference <path> but this dependency is not handled in |
238 // markForLayoutAndParentResourceInvalidation so we update any mpath depende
ncies manually. | 238 // markForLayoutAndParentResourceInvalidation so we update any mpath depende
ncies manually. |
239 if (HashSet<SVGElement*>* dependencies = document().accessSVGExtensions().se
tOfElementsReferencingTarget(this)) { | 239 if (SVGElementSet* dependencies = document().accessSVGExtensions().setOfElem
entsReferencingTarget(this)) { |
240 HashSet<SVGElement*>::iterator end = dependencies->end(); | 240 SVGElementSet::iterator end = dependencies->end(); |
241 for (HashSet<SVGElement*>::iterator it = dependencies->begin(); it != en
d; ++it) { | 241 for (SVGElementSet::iterator it = dependencies->begin(); it != end; ++it
) { |
242 if (isSVGMPathElement(**it)) | 242 if (isSVGMPathElement(**it)) |
243 toSVGMPathElement(*it)->targetPathChanged(); | 243 toSVGMPathElement(*it)->targetPathChanged(); |
244 } | 244 } |
245 } | 245 } |
246 } | 246 } |
247 | 247 |
248 Node::InsertionNotificationRequest SVGPathElement::insertedInto(ContainerNode* r
ootParent) | 248 Node::InsertionNotificationRequest SVGPathElement::insertedInto(ContainerNode* r
ootParent) |
249 { | 249 { |
250 SVGGeometryElement::insertedInto(rootParent); | 250 SVGGeometryElement::insertedInto(rootParent); |
251 invalidateMPathDependencies(); | 251 invalidateMPathDependencies(); |
(...skipping 29 matching lines...) Expand all Loading... |
281 | 281 |
282 // FIXME: Eventually we should support getBBox for detached elements. | 282 // FIXME: Eventually we should support getBBox for detached elements. |
283 if (!renderer()) | 283 if (!renderer()) |
284 return FloatRect(); | 284 return FloatRect(); |
285 | 285 |
286 RenderSVGPath* renderer = toRenderSVGPath(this->renderer()); | 286 RenderSVGPath* renderer = toRenderSVGPath(this->renderer()); |
287 return renderer->path().boundingRect(); | 287 return renderer->path().boundingRect(); |
288 } | 288 } |
289 | 289 |
290 } | 290 } |
OLD | NEW |