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

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

Issue 206133005: Remove 3-args |SVGAnimatedLength::baseValueToString()| impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/SVGTextPathElement.cpp ('k') | no next file » | 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, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 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 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
6 * Copyright (C) 2012 University of Szeged 6 * Copyright (C) 2012 University of Szeged
7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // #define DUMP_INSTANCE_TREE 47 // #define DUMP_INSTANCE_TREE
48 48
49 // Dump the deep-expanded shadow tree (where the renderers are built from) 49 // Dump the deep-expanded shadow tree (where the renderers are built from)
50 // #define DUMP_SHADOW_TREE 50 // #define DUMP_SHADOW_TREE
51 51
52 namespace WebCore { 52 namespace WebCore {
53 53
54 inline SVGUseElement::SVGUseElement(Document& document, bool wasInsertedByParser ) 54 inline SVGUseElement::SVGUseElement(Document& document, bool wasInsertedByParser )
55 : SVGGraphicsElement(SVGNames::useTag, document) 55 : SVGGraphicsElement(SVGNames::useTag, document)
56 , SVGURIReference(this) 56 , SVGURIReference(this)
57 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len gthModeWidth))) 57 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len gthModeWidth), AllowNegativeLengths))
58 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len gthModeHeight))) 58 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len gthModeHeight), AllowNegativeLengths))
59 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(LengthModeWidth))) 59 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(LengthModeWidth), ForbidNegativeLengths))
60 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(LengthModeHeight))) 60 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(LengthModeHeight), ForbidNegativeLengths))
61 , m_wasInsertedByParser(wasInsertedByParser) 61 , m_wasInsertedByParser(wasInsertedByParser)
62 , m_haveFiredLoadEvent(false) 62 , m_haveFiredLoadEvent(false)
63 , m_needsShadowTreeRecreation(false) 63 , m_needsShadowTreeRecreation(false)
64 , m_svgLoadEventTimer(this, &SVGElement::svgLoadEventTimerFired) 64 , m_svgLoadEventTimer(this, &SVGElement::svgLoadEventTimerFired)
65 { 65 {
66 ASSERT(hasCustomStyleCallbacks()); 66 ASSERT(hasCustomStyleCallbacks());
67 ScriptWrappable::init(this); 67 ScriptWrappable::init(this);
68 68
69 addToPropertyMap(m_x); 69 addToPropertyMap(m_x);
70 addToPropertyMap(m_y); 70 addToPropertyMap(m_y);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); 118 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
119 } 119 }
120 120
121 void SVGUseElement::parseAttribute(const QualifiedName& name, const AtomicString & value) 121 void SVGUseElement::parseAttribute(const QualifiedName& name, const AtomicString & value)
122 { 122 {
123 SVGParsingError parseError = NoError; 123 SVGParsingError parseError = NoError;
124 124
125 if (!isSupportedAttribute(name)) { 125 if (!isSupportedAttribute(name)) {
126 SVGGraphicsElement::parseAttribute(name, value); 126 SVGGraphicsElement::parseAttribute(name, value);
127 } else if (name == SVGNames::xAttr) { 127 } else if (name == SVGNames::xAttr) {
128 m_x->setBaseValueAsString(value, AllowNegativeLengths, parseError); 128 m_x->setBaseValueAsString(value, parseError);
129 } else if (name == SVGNames::yAttr) { 129 } else if (name == SVGNames::yAttr) {
130 m_y->setBaseValueAsString(value, AllowNegativeLengths, parseError); 130 m_y->setBaseValueAsString(value, parseError);
131 } else if (name == SVGNames::widthAttr) { 131 } else if (name == SVGNames::widthAttr) {
132 m_width->setBaseValueAsString(value, ForbidNegativeLengths, parseError); 132 m_width->setBaseValueAsString(value, parseError);
133 } else if (name == SVGNames::heightAttr) { 133 } else if (name == SVGNames::heightAttr) {
134 m_height->setBaseValueAsString(value, ForbidNegativeLengths, parseError) ; 134 m_height->setBaseValueAsString(value, parseError);
135 } else if (SVGURIReference::parseAttribute(name, value, parseError)) { 135 } else if (SVGURIReference::parseAttribute(name, value, parseError)) {
136 } else { 136 } else {
137 ASSERT_NOT_REACHED(); 137 ASSERT_NOT_REACHED();
138 } 138 }
139 139
140 reportAttributeParsingError(parseError, name, value); 140 reportAttributeParsingError(parseError, name, value);
141 } 141 }
142 142
143 #if !ASSERT_DISABLED 143 #if !ASSERT_DISABLED
144 static inline bool isWellFormedDocument(Document* document) 144 static inline bool isWellFormedDocument(Document* document)
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 963
964 if (m_resource) 964 if (m_resource)
965 m_resource->removeClient(this); 965 m_resource->removeClient(this);
966 966
967 m_resource = resource; 967 m_resource = resource;
968 if (m_resource) 968 if (m_resource)
969 m_resource->addClient(this); 969 m_resource->addClient(this);
970 } 970 }
971 971
972 } 972 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGTextPathElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698