| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } | 227 } |
| 228 | 228 |
| 229 if (renderer) | 229 if (renderer) |
| 230 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); | 230 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void SVGPathElement::invalidateMPathDependencies() | 233 void SVGPathElement::invalidateMPathDependencies() |
| 234 { | 234 { |
| 235 // <mpath> can only reference <path> but this dependency is not handled in | 235 // <mpath> can only reference <path> but this dependency is not handled in |
| 236 // markForLayoutAndParentResourceInvalidation so we update any mpath depende
ncies manually. | 236 // markForLayoutAndParentResourceInvalidation so we update any mpath depende
ncies manually. |
| 237 if (HashSet<SVGElement*>* dependencies = document().accessSVGExtensions().se
tOfElementsReferencingTarget(this)) { | 237 if (SVGElementSet* dependencies = document().accessSVGExtensions().setOfElem
entsReferencingTarget(this)) { |
| 238 HashSet<SVGElement*>::iterator end = dependencies->end(); | 238 SVGElementSet::iterator end = dependencies->end(); |
| 239 for (HashSet<SVGElement*>::iterator it = dependencies->begin(); it != en
d; ++it) { | 239 for (SVGElementSet::iterator it = dependencies->begin(); it != end; ++it
) { |
| 240 if (isSVGMPathElement(**it)) | 240 if (isSVGMPathElement(**it)) |
| 241 toSVGMPathElement(*it)->targetPathChanged(); | 241 toSVGMPathElement(*it)->targetPathChanged(); |
| 242 } | 242 } |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 | 245 |
| 246 Node::InsertionNotificationRequest SVGPathElement::insertedInto(ContainerNode* r
ootParent) | 246 Node::InsertionNotificationRequest SVGPathElement::insertedInto(ContainerNode* r
ootParent) |
| 247 { | 247 { |
| 248 SVGGeometryElement::insertedInto(rootParent); | 248 SVGGeometryElement::insertedInto(rootParent); |
| 249 invalidateMPathDependencies(); | 249 invalidateMPathDependencies(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 279 | 279 |
| 280 // FIXME: Eventually we should support getBBox for detached elements. | 280 // FIXME: Eventually we should support getBBox for detached elements. |
| 281 if (!renderer()) | 281 if (!renderer()) |
| 282 return FloatRect(); | 282 return FloatRect(); |
| 283 | 283 |
| 284 RenderSVGPath* renderer = toRenderSVGPath(this->renderer()); | 284 RenderSVGPath* renderer = toRenderSVGPath(this->renderer()); |
| 285 return renderer->path().boundingRect(); | 285 return renderer->path().boundingRect(); |
| 286 } | 286 } |
| 287 | 287 |
| 288 } | 288 } |
| OLD | NEW |