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/SVGSymbolElement.cpp

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix tests build 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 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 23 matching lines...) Expand all
34 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGSymbolElement, SVGNames::preserveAspectRa tioAttr, PreserveAspectRatio, preserveAspectRatio) 34 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGSymbolElement, SVGNames::preserveAspectRa tioAttr, PreserveAspectRatio, preserveAspectRatio)
35 DEFINE_ANIMATED_RECT(SVGSymbolElement, SVGNames::viewBoxAttr, ViewBox, viewBox) 35 DEFINE_ANIMATED_RECT(SVGSymbolElement, SVGNames::viewBoxAttr, ViewBox, viewBox)
36 36
37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGSymbolElement) 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGSymbolElement)
38 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 38 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
39 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox) 39 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox)
40 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio) 40 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) 41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
42 END_REGISTER_ANIMATED_PROPERTIES 42 END_REGISTER_ANIMATED_PROPERTIES
43 43
44 inline SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document * document) 44 inline SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document & document)
45 : SVGElement(tagName, document) 45 : SVGElement(tagName, document)
46 { 46 {
47 ASSERT(hasTagName(SVGNames::symbolTag)); 47 ASSERT(hasTagName(SVGNames::symbolTag));
48 ScriptWrappable::init(this); 48 ScriptWrappable::init(this);
49 registerAnimatedPropertiesForSVGSymbolElement(); 49 registerAnimatedPropertiesForSVGSymbolElement();
50 } 50 }
51 51
52 PassRefPtr<SVGSymbolElement> SVGSymbolElement::create(const QualifiedName& tagNa me, Document* document) 52 PassRefPtr<SVGSymbolElement> SVGSymbolElement::create(const QualifiedName& tagNa me, Document& document)
53 { 53 {
54 return adoptRef(new SVGSymbolElement(tagName, document)); 54 return adoptRef(new SVGSymbolElement(tagName, document));
55 } 55 }
56 56
57 bool SVGSymbolElement::isSupportedAttribute(const QualifiedName& attrName) 57 bool SVGSymbolElement::isSupportedAttribute(const QualifiedName& attrName)
58 { 58 {
59 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 59 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
60 if (supportedAttributes.isEmpty()) { 60 if (supportedAttributes.isEmpty()) {
61 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes ); 61 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes );
62 SVGFitToViewBox::addSupportedAttributes(supportedAttributes); 62 SVGFitToViewBox::addSupportedAttributes(supportedAttributes);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 { 97 {
98 return hasAttribute(SVGNames::viewBoxAttr); 98 return hasAttribute(SVGNames::viewBoxAttr);
99 } 99 }
100 100
101 RenderObject* SVGSymbolElement::createRenderer(RenderStyle*) 101 RenderObject* SVGSymbolElement::createRenderer(RenderStyle*)
102 { 102 {
103 return new RenderSVGHiddenContainer(this); 103 return new RenderSVGHiddenContainer(this);
104 } 104 }
105 105
106 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698