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

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

Issue 1118133003: Rename rendering in core/svg. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/SVGMaskElement.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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 PassRefPtrWillBeRawPtr<SVGPathSegCurvetoQuadraticSmoothRel> SVGPathElement::crea teSVGPathSegCurvetoQuadraticSmoothRel(float x, float y) 198 PassRefPtrWillBeRawPtr<SVGPathSegCurvetoQuadraticSmoothRel> SVGPathElement::crea teSVGPathSegCurvetoQuadraticSmoothRel(float x, float y)
199 { 199 {
200 return SVGPathSegCurvetoQuadraticSmoothRel::create(0, x, y); 200 return SVGPathSegCurvetoQuadraticSmoothRel::create(0, x, y);
201 } 201 }
202 202
203 void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName) 203 void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName)
204 { 204 {
205 if (attrName == SVGNames::dAttr || attrName == SVGNames::pathLengthAttr) { 205 if (attrName == SVGNames::dAttr || attrName == SVGNames::pathLengthAttr) {
206 SVGElement::InvalidationGuard invalidationGuard(this); 206 SVGElement::InvalidationGuard invalidationGuard(this);
207 207
208 LayoutSVGShape* renderer = toLayoutSVGShape(this->layoutObject()); 208 LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject());
209 209
210 if (attrName == SVGNames::dAttr) { 210 if (attrName == SVGNames::dAttr) {
211 if (renderer) 211 if (layoutObject)
212 renderer->setNeedsShapeUpdate(); 212 layoutObject->setNeedsShapeUpdate();
213 213
214 invalidateMPathDependencies(); 214 invalidateMPathDependencies();
215 } 215 }
216 216
217 if (renderer) 217 if (layoutObject)
218 markForLayoutAndParentResourceInvalidation(renderer); 218 markForLayoutAndParentResourceInvalidation(layoutObject);
219 219
220 return; 220 return;
221 } 221 }
222 222
223 SVGGeometryElement::svgAttributeChanged(attrName); 223 SVGGeometryElement::svgAttributeChanged(attrName);
224 } 224 }
225 225
226 void SVGPathElement::invalidateMPathDependencies() 226 void SVGPathElement::invalidateMPathDependencies()
227 { 227 {
228 // <mpath> can only reference <path> but this dependency is not handled in 228 // <mpath> can only reference <path> but this dependency is not handled in
(...skipping 18 matching lines...) Expand all
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 m_pathSegList->baseValue()->clearByteStream(); 253 m_pathSegList->baseValue()->clearByteStream();
254 254
255 invalidateSVGAttributes(); 255 invalidateSVGAttributes();
256 256
257 LayoutSVGShape* renderer = toLayoutSVGShape(this->layoutObject()); 257 LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject());
258 if (!renderer) 258 if (!layoutObject)
259 return; 259 return;
260 260
261 renderer->setNeedsShapeUpdate(); 261 layoutObject->setNeedsShapeUpdate();
262 markForLayoutAndParentResourceInvalidation(renderer); 262 markForLayoutAndParentResourceInvalidation(layoutObject);
263 } 263 }
264 264
265 FloatRect SVGPathElement::getBBox() 265 FloatRect SVGPathElement::getBBox()
266 { 266 {
267 // By default, getBBox() returns objectBoundingBox but that will include 267 // By default, getBBox() returns objectBoundingBox but that will include
268 // markers so we override it to return just the path's bounding rect. 268 // markers so we override it to return just the path's bounding rect.
269 269
270 document().updateLayoutIgnorePendingStylesheets(); 270 document().updateLayoutIgnorePendingStylesheets();
271 271
272 // FIXME: Eventually we should support getBBox for detached elements. 272 // FIXME: Eventually we should support getBBox for detached elements.
273 if (!layoutObject()) 273 if (!layoutObject())
274 return FloatRect(); 274 return FloatRect();
275 275
276 LayoutSVGShape* renderer = toLayoutSVGShape(this->layoutObject()); 276 LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject());
277 return renderer->path().boundingRect(); 277 return layoutObject->path().boundingRect();
278 } 278 }
279 279
280 } // namespace blink 280 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGMaskElement.cpp ('k') | Source/core/svg/SVGPatternElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698