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

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

Issue 109433003: SVGLangSpace interface should be removed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Avoid running into ASSERT for Debug Created 7 years 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
« no previous file with comments | « Source/core/svg/SVGRectElement.cpp ('k') | Source/core/svg/SVGTextContentElement.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 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 else if (name == HTMLNames::onerrorAttr) 249 else if (name == HTMLNames::onerrorAttr)
250 document().setWindowAttributeEventListener(EventTypeNames::error, create AttributeEventListener(document().frame(), name, value)); 250 document().setWindowAttributeEventListener(EventTypeNames::error, create AttributeEventListener(document().frame(), name, value));
251 else if (name == SVGNames::xAttr) 251 else if (name == SVGNames::xAttr)
252 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 252 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
253 else if (name == SVGNames::yAttr) 253 else if (name == SVGNames::yAttr)
254 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)) ; 254 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)) ;
255 else if (name == SVGNames::widthAttr) 255 else if (name == SVGNames::widthAttr)
256 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseErro r, ForbidNegativeLengths)); 256 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseErro r, ForbidNegativeLengths));
257 else if (name == SVGNames::heightAttr) 257 else if (name == SVGNames::heightAttr)
258 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseEr ror, ForbidNegativeLengths)); 258 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseEr ror, ForbidNegativeLengths));
259 else if (SVGLangSpace::parseAttribute(name, value) 259 else if (SVGExternalResourcesRequired::parseAttribute(name, value)
260 || SVGExternalResourcesRequired::parseAttribute(name, value)
261 || SVGFitToViewBox::parseAttribute(this, name, value) 260 || SVGFitToViewBox::parseAttribute(this, name, value)
262 || SVGZoomAndPan::parseAttribute(this, name, value)) { 261 || SVGZoomAndPan::parseAttribute(this, name, value)) {
263 } else 262 } else
264 SVGGraphicsElement::parseAttribute(name, value); 263 SVGGraphicsElement::parseAttribute(name, value);
265 264
266 reportAttributeParsingError(parseError, name, value); 265 reportAttributeParsingError(parseError, name, value);
267 } 266 }
268 267
269 void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) 268 void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName)
270 { 269 {
(...skipping 18 matching lines...) Expand all
289 288
290 if (SVGFitToViewBox::isKnownAttribute(attrName)) { 289 if (SVGFitToViewBox::isKnownAttribute(attrName)) {
291 updateRelativeLengthsOrViewBox = true; 290 updateRelativeLengthsOrViewBox = true;
292 if (RenderObject* object = renderer()) 291 if (RenderObject* object = renderer())
293 object->setNeedsTransformUpdate(); 292 object->setNeedsTransformUpdate();
294 } 293 }
295 294
296 SVGElementInstance::InvalidationGuard invalidationGuard(this); 295 SVGElementInstance::InvalidationGuard invalidationGuard(this);
297 296
298 if (updateRelativeLengthsOrViewBox 297 if (updateRelativeLengthsOrViewBox
299 || SVGLangSpace::isKnownAttribute(attrName)
300 || SVGExternalResourcesRequired::isKnownAttribute(attrName) 298 || SVGExternalResourcesRequired::isKnownAttribute(attrName)
301 || SVGZoomAndPan::isKnownAttribute(attrName)) { 299 || SVGZoomAndPan::isKnownAttribute(attrName)) {
302 if (renderer()) 300 if (renderer())
303 RenderSVGResource::markForLayoutAndParentResourceInvalidation(render er()); 301 RenderSVGResource::markForLayoutAndParentResourceInvalidation(render er());
304 return; 302 return;
305 } 303 }
306 304
307 SVGGraphicsElement::svgAttributeChanged(attrName); 305 SVGGraphicsElement::svgAttributeChanged(attrName);
308 } 306 }
309 307
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 continue; 770 continue;
773 771
774 Element* element = toElement(node); 772 Element* element = toElement(node);
775 if (element->getIdAttribute() == id) 773 if (element->getIdAttribute() == id)
776 return element; 774 return element;
777 } 775 }
778 return 0; 776 return 0;
779 } 777 }
780 778
781 } 779 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGRectElement.cpp ('k') | Source/core/svg/SVGTextContentElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698