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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); | 236 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); |
237 } | 237 } |
238 | 238 |
239 void SVGPathElement::invalidateMPathDependencies() | 239 void SVGPathElement::invalidateMPathDependencies() |
240 { | 240 { |
241 // <mpath> can only reference <path> but this dependency is not handled in | 241 // <mpath> can only reference <path> but this dependency is not handled in |
242 // markForLayoutAndParentResourceInvalidation so we update any mpath depende
ncies manually. | 242 // markForLayoutAndParentResourceInvalidation so we update any mpath depende
ncies manually. |
243 if (HashSet<SVGElement*>* dependencies = document().accessSVGExtensions().se
tOfElementsReferencingTarget(this)) { | 243 if (HashSet<SVGElement*>* dependencies = document().accessSVGExtensions().se
tOfElementsReferencingTarget(this)) { |
244 HashSet<SVGElement*>::iterator end = dependencies->end(); | 244 HashSet<SVGElement*>::iterator end = dependencies->end(); |
245 for (HashSet<SVGElement*>::iterator it = dependencies->begin(); it != en
d; ++it) { | 245 for (HashSet<SVGElement*>::iterator it = dependencies->begin(); it != en
d; ++it) { |
246 if ((*it)->hasTagName(SVGNames::mpathTag)) | 246 if (isSVGMPathElement(**it)) |
247 toSVGMPathElement(*it)->targetPathChanged(); | 247 toSVGMPathElement(*it)->targetPathChanged(); |
248 } | 248 } |
249 } | 249 } |
250 } | 250 } |
251 | 251 |
252 Node::InsertionNotificationRequest SVGPathElement::insertedInto(ContainerNode* r
ootParent) | 252 Node::InsertionNotificationRequest SVGPathElement::insertedInto(ContainerNode* r
ootParent) |
253 { | 253 { |
254 SVGGeometryElement::insertedInto(rootParent); | 254 SVGGeometryElement::insertedInto(rootParent); |
255 invalidateMPathDependencies(); | 255 invalidateMPathDependencies(); |
256 return InsertionDone; | 256 return InsertionDone; |
(...skipping 28 matching lines...) Expand all Loading... |
285 | 285 |
286 // FIXME: Eventually we should support getBBox for detached elements. | 286 // FIXME: Eventually we should support getBBox for detached elements. |
287 if (!renderer()) | 287 if (!renderer()) |
288 return FloatRect(); | 288 return FloatRect(); |
289 | 289 |
290 RenderSVGPath* renderer = toRenderSVGPath(this->renderer()); | 290 RenderSVGPath* renderer = toRenderSVGPath(this->renderer()); |
291 return renderer->path().boundingRect(); | 291 return renderer->path().boundingRect(); |
292 } | 292 } |
293 | 293 |
294 } | 294 } |
OLD | NEW |