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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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/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(const QualifiedName& tagName, Document& do cument)
49 : SVGGraphicsElement(tagName, document) 49 : SVGGraphicsElement(tagName, 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)); 55 ASSERT(hasTagName(SVGNames::lineTag));
56 ScriptWrappable::init(this); 56 ScriptWrappable::init(this);
57 registerAnimatedPropertiesForSVGLineElement(); 57 registerAnimatedPropertiesForSVGLineElement();
58 } 58 }
59 59
60 PassRefPtr<SVGLineElement> SVGLineElement::create(const QualifiedName& tagName, Document* document) 60 PassRefPtr<SVGLineElement> SVGLineElement::create(const QualifiedName& tagName, Document& document)
61 { 61 {
62 return adoptRef(new SVGLineElement(tagName, document)); 62 return adoptRef(new SVGLineElement(tagName, document));
63 } 63 }
64 64
65 bool SVGLineElement::isSupportedAttribute(const QualifiedName& attrName) 65 bool SVGLineElement::isSupportedAttribute(const QualifiedName& attrName)
66 { 66 {
67 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 67 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
68 if (supportedAttributes.isEmpty()) { 68 if (supportedAttributes.isEmpty()) {
69 SVGLangSpace::addSupportedAttributes(supportedAttributes); 69 SVGLangSpace::addSupportedAttributes(supportedAttributes);
70 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes ); 70 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes );
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 bool SVGLineElement::selfHasRelativeLengths() const 136 bool SVGLineElement::selfHasRelativeLengths() const
137 { 137 {
138 return x1CurrentValue().isRelative() 138 return x1CurrentValue().isRelative()
139 || y1CurrentValue().isRelative() 139 || y1CurrentValue().isRelative()
140 || x2CurrentValue().isRelative() 140 || x2CurrentValue().isRelative()
141 || y2CurrentValue().isRelative(); 141 || y2CurrentValue().isRelative();
142 } 142 }
143 143
144 } 144 }
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