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

Side by Side Diff: Source/core/svg/SVGSVGElement.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/SVGSVGElement.h ('k') | Source/core/svg/SVGScriptElement.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 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 REGISTER_LOCAL_ANIMATED_PROPERTY(x) 74 REGISTER_LOCAL_ANIMATED_PROPERTY(x)
75 REGISTER_LOCAL_ANIMATED_PROPERTY(y) 75 REGISTER_LOCAL_ANIMATED_PROPERTY(y)
76 REGISTER_LOCAL_ANIMATED_PROPERTY(width) 76 REGISTER_LOCAL_ANIMATED_PROPERTY(width)
77 REGISTER_LOCAL_ANIMATED_PROPERTY(height) 77 REGISTER_LOCAL_ANIMATED_PROPERTY(height)
78 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 78 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
79 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox) 79 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox)
80 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio) 80 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
81 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) 81 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
82 END_REGISTER_ANIMATED_PROPERTIES 82 END_REGISTER_ANIMATED_PROPERTIES
83 83
84 inline SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document& doc) 84 inline SVGSVGElement::SVGSVGElement(Document& doc)
85 : SVGGraphicsElement(tagName, doc) 85 : SVGGraphicsElement(SVGNames::svgTag, doc)
86 , m_x(LengthModeWidth) 86 , m_x(LengthModeWidth)
87 , m_y(LengthModeHeight) 87 , m_y(LengthModeHeight)
88 , m_width(LengthModeWidth, "100%") 88 , m_width(LengthModeWidth, "100%")
89 , m_height(LengthModeHeight, "100%") 89 , m_height(LengthModeHeight, "100%")
90 , m_useCurrentView(false) 90 , m_useCurrentView(false)
91 , m_zoomAndPan(SVGZoomAndPanMagnify) 91 , m_zoomAndPan(SVGZoomAndPanMagnify)
92 , m_timeContainer(SMILTimeContainer::create(this)) 92 , m_timeContainer(SMILTimeContainer::create(this))
93 { 93 {
94 ASSERT(hasTagName(SVGNames::svgTag));
95 ScriptWrappable::init(this); 94 ScriptWrappable::init(this);
96 registerAnimatedPropertiesForSVGSVGElement(); 95 registerAnimatedPropertiesForSVGSVGElement();
97 96
98 UseCounter::count(doc, UseCounter::SVGSVGElement); 97 UseCounter::count(doc, UseCounter::SVGSVGElement);
99 } 98 }
100 99
101 PassRefPtr<SVGSVGElement> SVGSVGElement::create(const QualifiedName& tagName, Do cument& document) 100 PassRefPtr<SVGSVGElement> SVGSVGElement::create(Document& document)
102 { 101 {
103 return adoptRef(new SVGSVGElement(tagName, document)); 102 return adoptRef(new SVGSVGElement(document));
104 } 103 }
105 104
106 SVGSVGElement::~SVGSVGElement() 105 SVGSVGElement::~SVGSVGElement()
107 { 106 {
108 if (m_viewSpec) 107 if (m_viewSpec)
109 m_viewSpec->resetContextElement(); 108 m_viewSpec->resetContextElement();
110 // There are cases where removedFromDocument() is not called. 109 // There are cases where removedFromDocument() is not called.
111 // see ContainerNode::removeAllChildren, called by its destructor. 110 // see ContainerNode::removeAllChildren, called by its destructor.
112 document().accessSVGExtensions()->removeTimeContainer(this); 111 document().accessSVGExtensions()->removeTimeContainer(this);
113 112
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 continue; 776 continue;
778 777
779 Element* element = toElement(node); 778 Element* element = toElement(node);
780 if (element->getIdAttribute() == id) 779 if (element->getIdAttribute() == id)
781 return element; 780 return element;
782 } 781 }
783 return 0; 782 return 0;
784 } 783 }
785 784
786 } 785 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGSVGElement.h ('k') | Source/core/svg/SVGScriptElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698