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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 } | 243 } |
244 | 244 |
245 void SVGPathElement::removedFrom(ContainerNode* rootParent) | 245 void SVGPathElement::removedFrom(ContainerNode* rootParent) |
246 { | 246 { |
247 SVGGeometryElement::removedFrom(rootParent); | 247 SVGGeometryElement::removedFrom(rootParent); |
248 invalidateMPathDependencies(); | 248 invalidateMPathDependencies(); |
249 } | 249 } |
250 | 250 |
251 void SVGPathElement::pathSegListChanged(ListModification listModification) | 251 void SVGPathElement::pathSegListChanged(ListModification listModification) |
252 { | 252 { |
253 SVGElement::InvalidationGuard invalidationGuard(this); | |
fs
2015/05/13 12:35:21
Move this down a bit. (After invalidateSVGAttribut
Shanmuga Pandi
2015/05/13 13:00:40
Done.
| |
253 m_pathSegList->baseValue()->clearByteStream(); | 254 m_pathSegList->baseValue()->clearByteStream(); |
254 | 255 |
255 invalidateSVGAttributes(); | 256 invalidateSVGAttributes(); |
256 | 257 |
257 LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject()); | 258 LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject()); |
258 if (!layoutObject) | 259 if (!layoutObject) |
259 return; | 260 return; |
260 | 261 |
261 layoutObject->setNeedsShapeUpdate(); | 262 layoutObject->setNeedsShapeUpdate(); |
262 markForLayoutAndParentResourceInvalidation(layoutObject); | 263 markForLayoutAndParentResourceInvalidation(layoutObject); |
263 } | 264 } |
264 | 265 |
265 FloatRect SVGPathElement::getBBox() | 266 FloatRect SVGPathElement::getBBox() |
266 { | 267 { |
267 // By default, getBBox() returns objectBoundingBox but that will include | 268 // By default, getBBox() returns objectBoundingBox but that will include |
268 // markers so we override it to return just the path's bounding rect. | 269 // markers so we override it to return just the path's bounding rect. |
269 | 270 |
270 document().updateLayoutIgnorePendingStylesheets(); | 271 document().updateLayoutIgnorePendingStylesheets(); |
271 | 272 |
272 // FIXME: Eventually we should support getBBox for detached elements. | 273 // FIXME: Eventually we should support getBBox for detached elements. |
273 if (!layoutObject()) | 274 if (!layoutObject()) |
274 return FloatRect(); | 275 return FloatRect(); |
275 | 276 |
276 LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject()); | 277 LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject()); |
277 return layoutObject->path().boundingRect(); | 278 return layoutObject->path().boundingRect(); |
278 } | 279 } |
279 | 280 |
280 } // namespace blink | 281 } // namespace blink |
OLD | NEW |