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

Side by Side Diff: Source/core/svg/SVGForeignObjectElement.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/SVGForeignObjectElement.h ('k') | Source/core/svg/SVGGElement.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) 2006 Apple Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGForeignObjectElement) 42 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGForeignObjectElement)
43 REGISTER_LOCAL_ANIMATED_PROPERTY(x) 43 REGISTER_LOCAL_ANIMATED_PROPERTY(x)
44 REGISTER_LOCAL_ANIMATED_PROPERTY(y) 44 REGISTER_LOCAL_ANIMATED_PROPERTY(y)
45 REGISTER_LOCAL_ANIMATED_PROPERTY(width) 45 REGISTER_LOCAL_ANIMATED_PROPERTY(width)
46 REGISTER_LOCAL_ANIMATED_PROPERTY(height) 46 REGISTER_LOCAL_ANIMATED_PROPERTY(height)
47 REGISTER_LOCAL_ANIMATED_PROPERTY(href) 47 REGISTER_LOCAL_ANIMATED_PROPERTY(href)
48 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 48 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
49 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) 49 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
50 END_REGISTER_ANIMATED_PROPERTIES 50 END_REGISTER_ANIMATED_PROPERTIES
51 51
52 inline SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tag Name, Document& document) 52 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document)
53 : SVGGraphicsElement(tagName, document) 53 : SVGGraphicsElement(SVGNames::foreignObjectTag, document)
54 , m_x(LengthModeWidth) 54 , m_x(LengthModeWidth)
55 , m_y(LengthModeHeight) 55 , m_y(LengthModeHeight)
56 , m_width(LengthModeWidth) 56 , m_width(LengthModeWidth)
57 , m_height(LengthModeHeight) 57 , m_height(LengthModeHeight)
58 { 58 {
59 ASSERT(hasTagName(SVGNames::foreignObjectTag));
60 ScriptWrappable::init(this); 59 ScriptWrappable::init(this);
61 registerAnimatedPropertiesForSVGForeignObjectElement(); 60 registerAnimatedPropertiesForSVGForeignObjectElement();
62 } 61 }
63 62
64 PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(const Qualif iedName& tagName, Document& document) 63 PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(Document& do cument)
65 { 64 {
66 return adoptRef(new SVGForeignObjectElement(tagName, document)); 65 return adoptRef(new SVGForeignObjectElement(document));
67 } 66 }
68 67
69 bool SVGForeignObjectElement::isSupportedAttribute(const QualifiedName& attrName ) 68 bool SVGForeignObjectElement::isSupportedAttribute(const QualifiedName& attrName )
70 { 69 {
71 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 70 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
72 if (supportedAttributes.isEmpty()) { 71 if (supportedAttributes.isEmpty()) {
73 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes ); 72 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes );
74 supportedAttributes.add(SVGNames::xAttr); 73 supportedAttributes.add(SVGNames::xAttr);
75 supportedAttributes.add(SVGNames::yAttr); 74 supportedAttributes.add(SVGNames::yAttr);
76 supportedAttributes.add(SVGNames::widthAttr); 75 supportedAttributes.add(SVGNames::widthAttr);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 155
157 bool SVGForeignObjectElement::selfHasRelativeLengths() const 156 bool SVGForeignObjectElement::selfHasRelativeLengths() const
158 { 157 {
159 return xCurrentValue().isRelative() 158 return xCurrentValue().isRelative()
160 || yCurrentValue().isRelative() 159 || yCurrentValue().isRelative()
161 || widthCurrentValue().isRelative() 160 || widthCurrentValue().isRelative()
162 || heightCurrentValue().isRelative(); 161 || heightCurrentValue().isRelative();
163 } 162 }
164 163
165 } 164 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGForeignObjectElement.h ('k') | Source/core/svg/SVGGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698