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

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

Issue 62083002: Remove support for the externalResourcesRequired attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "platform/transforms/AffineTransform.h" 59 #include "platform/transforms/AffineTransform.h"
60 #include "wtf/StdLibExtras.h" 60 #include "wtf/StdLibExtras.h"
61 61
62 namespace WebCore { 62 namespace WebCore {
63 63
64 // Animated property definitions 64 // Animated property definitions
65 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::xAttr, X, x) 65 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::xAttr, X, x)
66 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::yAttr, Y, y) 66 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::yAttr, Y, y)
67 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::widthAttr, Width, width) 67 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::widthAttr, Width, width)
68 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::heightAttr, Height, height) 68 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::heightAttr, Height, height)
69 DEFINE_ANIMATED_BOOLEAN(SVGSVGElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired)
70 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGSVGElement, SVGNames::preserveAspectRatio Attr, PreserveAspectRatio, preserveAspectRatio) 69 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGSVGElement, SVGNames::preserveAspectRatio Attr, PreserveAspectRatio, preserveAspectRatio)
71 DEFINE_ANIMATED_RECT(SVGSVGElement, SVGNames::viewBoxAttr, ViewBox, viewBox) 70 DEFINE_ANIMATED_RECT(SVGSVGElement, SVGNames::viewBoxAttr, ViewBox, viewBox)
72 71
73 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGSVGElement) 72 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGSVGElement)
74 REGISTER_LOCAL_ANIMATED_PROPERTY(x) 73 REGISTER_LOCAL_ANIMATED_PROPERTY(x)
75 REGISTER_LOCAL_ANIMATED_PROPERTY(y) 74 REGISTER_LOCAL_ANIMATED_PROPERTY(y)
76 REGISTER_LOCAL_ANIMATED_PROPERTY(width) 75 REGISTER_LOCAL_ANIMATED_PROPERTY(width)
77 REGISTER_LOCAL_ANIMATED_PROPERTY(height) 76 REGISTER_LOCAL_ANIMATED_PROPERTY(height)
78 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
79 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox) 77 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox)
80 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio) 78 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
81 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) 79 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
82 END_REGISTER_ANIMATED_PROPERTIES 80 END_REGISTER_ANIMATED_PROPERTIES
83 81
84 inline SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document& doc) 82 inline SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document& doc)
85 : SVGGraphicsElement(tagName, doc) 83 : SVGGraphicsElement(tagName, doc)
86 , m_x(LengthModeWidth) 84 , m_x(LengthModeWidth)
87 , m_y(LengthModeHeight) 85 , m_y(LengthModeHeight)
88 , m_width(LengthModeWidth, "100%") 86 , m_width(LengthModeWidth, "100%")
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 document().setWindowAttributeEventListener(EventTypeNames::error, create AttributeEventListener(document().frame(), name, value)); 253 document().setWindowAttributeEventListener(EventTypeNames::error, create AttributeEventListener(document().frame(), name, value));
256 else if (name == SVGNames::xAttr) 254 else if (name == SVGNames::xAttr)
257 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 255 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
258 else if (name == SVGNames::yAttr) 256 else if (name == SVGNames::yAttr)
259 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)) ; 257 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)) ;
260 else if (name == SVGNames::widthAttr) 258 else if (name == SVGNames::widthAttr)
261 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseErro r, ForbidNegativeLengths)); 259 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseErro r, ForbidNegativeLengths));
262 else if (name == SVGNames::heightAttr) 260 else if (name == SVGNames::heightAttr)
263 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseEr ror, ForbidNegativeLengths)); 261 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseEr ror, ForbidNegativeLengths));
264 else if (SVGLangSpace::parseAttribute(name, value) 262 else if (SVGLangSpace::parseAttribute(name, value)
265 || SVGExternalResourcesRequired::parseAttribute(name, value)
266 || SVGFitToViewBox::parseAttribute(this, name, value) 263 || SVGFitToViewBox::parseAttribute(this, name, value)
267 || SVGZoomAndPan::parseAttribute(this, name, value)) { 264 || SVGZoomAndPan::parseAttribute(this, name, value)) {
268 } else 265 } else
269 SVGGraphicsElement::parseAttribute(name, value); 266 SVGGraphicsElement::parseAttribute(name, value);
270 267
271 reportAttributeParsingError(parseError, name, value); 268 reportAttributeParsingError(parseError, name, value);
272 } 269 }
273 270
274 void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) 271 void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName)
275 { 272 {
(...skipping 19 matching lines...) Expand all
295 if (SVGFitToViewBox::isKnownAttribute(attrName)) { 292 if (SVGFitToViewBox::isKnownAttribute(attrName)) {
296 updateRelativeLengthsOrViewBox = true; 293 updateRelativeLengthsOrViewBox = true;
297 if (RenderObject* object = renderer()) 294 if (RenderObject* object = renderer())
298 object->setNeedsTransformUpdate(); 295 object->setNeedsTransformUpdate();
299 } 296 }
300 297
301 SVGElementInstance::InvalidationGuard invalidationGuard(this); 298 SVGElementInstance::InvalidationGuard invalidationGuard(this);
302 299
303 if (updateRelativeLengthsOrViewBox 300 if (updateRelativeLengthsOrViewBox
304 || SVGLangSpace::isKnownAttribute(attrName) 301 || SVGLangSpace::isKnownAttribute(attrName)
305 || SVGExternalResourcesRequired::isKnownAttribute(attrName)
306 || SVGZoomAndPan::isKnownAttribute(attrName)) { 302 || SVGZoomAndPan::isKnownAttribute(attrName)) {
307 if (renderer()) 303 if (renderer())
308 RenderSVGResource::markForLayoutAndParentResourceInvalidation(render er()); 304 RenderSVGResource::markForLayoutAndParentResourceInvalidation(render er());
309 return; 305 return;
310 } 306 }
311 307
312 SVGGraphicsElement::svgAttributeChanged(attrName); 308 SVGGraphicsElement::svgAttributeChanged(attrName);
313 } 309 }
314 310
315 unsigned SVGSVGElement::suspendRedraw(unsigned /* maxWaitMilliseconds */) 311 unsigned SVGSVGElement::suspendRedraw(unsigned /* maxWaitMilliseconds */)
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 continue; 775 continue;
780 776
781 Element* element = toElement(node); 777 Element* element = toElement(node);
782 if (element->getIdAttribute() == id) 778 if (element->getIdAttribute() == id)
783 return element; 779 return element;
784 } 780 }
785 return 0; 781 return 0;
786 } 782 }
787 783
788 } 784 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698