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

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

Issue 68643007: Remove QualifiedName argument from SVGElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGLineElement.h ('k') | Source/core/svg/SVGLinearGradientElement.h » ('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 27 matching lines...) Expand all
38 38
39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGLineElement) 39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGLineElement)
40 REGISTER_LOCAL_ANIMATED_PROPERTY(x1) 40 REGISTER_LOCAL_ANIMATED_PROPERTY(x1)
41 REGISTER_LOCAL_ANIMATED_PROPERTY(y1) 41 REGISTER_LOCAL_ANIMATED_PROPERTY(y1)
42 REGISTER_LOCAL_ANIMATED_PROPERTY(x2) 42 REGISTER_LOCAL_ANIMATED_PROPERTY(x2)
43 REGISTER_LOCAL_ANIMATED_PROPERTY(y2) 43 REGISTER_LOCAL_ANIMATED_PROPERTY(y2)
44 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 44 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
45 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) 45 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
46 END_REGISTER_ANIMATED_PROPERTIES 46 END_REGISTER_ANIMATED_PROPERTIES
47 47
48 inline SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document& do cument) 48 inline SVGLineElement::SVGLineElement(Document& document)
49 : SVGGeometryElement(tagName, document) 49 : SVGGeometryElement(SVGNames::lineTag, document)
50 , m_x1(LengthModeWidth) 50 , m_x1(LengthModeWidth)
51 , m_y1(LengthModeHeight) 51 , m_y1(LengthModeHeight)
52 , m_x2(LengthModeWidth) 52 , m_x2(LengthModeWidth)
53 , m_y2(LengthModeHeight) 53 , m_y2(LengthModeHeight)
54 { 54 {
55 ASSERT(hasTagName(SVGNames::lineTag));
56 ScriptWrappable::init(this); 55 ScriptWrappable::init(this);
57 registerAnimatedPropertiesForSVGLineElement(); 56 registerAnimatedPropertiesForSVGLineElement();
58 } 57 }
59 58
60 PassRefPtr<SVGLineElement> SVGLineElement::create(const QualifiedName& tagName, Document& document) 59 PassRefPtr<SVGLineElement> SVGLineElement::create(Document& document)
61 { 60 {
62 return adoptRef(new SVGLineElement(tagName, document)); 61 return adoptRef(new SVGLineElement(document));
63 } 62 }
64 63
65 bool SVGLineElement::isSupportedAttribute(const QualifiedName& attrName) 64 bool SVGLineElement::isSupportedAttribute(const QualifiedName& attrName)
66 { 65 {
67 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 66 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
68 if (supportedAttributes.isEmpty()) { 67 if (supportedAttributes.isEmpty()) {
69 SVGLangSpace::addSupportedAttributes(supportedAttributes); 68 SVGLangSpace::addSupportedAttributes(supportedAttributes);
70 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes ); 69 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes );
71 supportedAttributes.add(SVGNames::x1Attr); 70 supportedAttributes.add(SVGNames::x1Attr);
72 supportedAttributes.add(SVGNames::x2Attr); 71 supportedAttributes.add(SVGNames::x2Attr);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 134
136 bool SVGLineElement::selfHasRelativeLengths() const 135 bool SVGLineElement::selfHasRelativeLengths() const
137 { 136 {
138 return x1CurrentValue().isRelative() 137 return x1CurrentValue().isRelative()
139 || y1CurrentValue().isRelative() 138 || y1CurrentValue().isRelative()
140 || x2CurrentValue().isRelative() 139 || x2CurrentValue().isRelative()
141 || y2CurrentValue().isRelative(); 140 || y2CurrentValue().isRelative();
142 } 141 }
143 142
144 } 143 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGLineElement.h ('k') | Source/core/svg/SVGLinearGradientElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698