Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: Source/core/svg/SVGPathElement.cpp

Issue 192143002: Use isSVG*Element() helpers more in SVG code (Part 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGMPathElement.cpp ('k') | Source/core/svg/SVGPatternElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGMPathElement.cpp ('k') | Source/core/svg/SVGPatternElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698