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

Side by Side Diff: Source/core/svg/SVGMPathElement.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/SVGMPathElement.h ('k') | Source/core/svg/SVGMarkerElement.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) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 21 matching lines...) Expand all
32 32
33 // Animated property definitions 33 // Animated property definitions
34 DEFINE_ANIMATED_STRING(SVGMPathElement, XLinkNames::hrefAttr, Href, href) 34 DEFINE_ANIMATED_STRING(SVGMPathElement, XLinkNames::hrefAttr, Href, href)
35 DEFINE_ANIMATED_BOOLEAN(SVGMPathElement, SVGNames::externalResourcesRequiredAttr , ExternalResourcesRequired, externalResourcesRequired) 35 DEFINE_ANIMATED_BOOLEAN(SVGMPathElement, SVGNames::externalResourcesRequiredAttr , ExternalResourcesRequired, externalResourcesRequired)
36 36
37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGMPathElement) 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGMPathElement)
38 REGISTER_LOCAL_ANIMATED_PROPERTY(href) 38 REGISTER_LOCAL_ANIMATED_PROPERTY(href)
39 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 39 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
40 END_REGISTER_ANIMATED_PROPERTIES 40 END_REGISTER_ANIMATED_PROPERTIES
41 41
42 inline SVGMPathElement::SVGMPathElement(const QualifiedName& tagName, Document* document) 42 inline SVGMPathElement::SVGMPathElement(const QualifiedName& tagName, Document& document)
43 : SVGElement(tagName, document) 43 : SVGElement(tagName, document)
44 { 44 {
45 ASSERT(hasTagName(SVGNames::mpathTag)); 45 ASSERT(hasTagName(SVGNames::mpathTag));
46 ScriptWrappable::init(this); 46 ScriptWrappable::init(this);
47 registerAnimatedPropertiesForSVGMPathElement(); 47 registerAnimatedPropertiesForSVGMPathElement();
48 } 48 }
49 49
50 PassRefPtr<SVGMPathElement> SVGMPathElement::create(const QualifiedName& tagName , Document* document) 50 PassRefPtr<SVGMPathElement> SVGMPathElement::create(const QualifiedName& tagName , Document& document)
51 { 51 {
52 return adoptRef(new SVGMPathElement(tagName, document)); 52 return adoptRef(new SVGMPathElement(tagName, document));
53 } 53 }
54 54
55 SVGMPathElement::~SVGMPathElement() 55 SVGMPathElement::~SVGMPathElement()
56 { 56 {
57 clearResourceReferences(); 57 clearResourceReferences();
58 } 58 }
59 59
60 void SVGMPathElement::buildPendingResource() 60 void SVGMPathElement::buildPendingResource()
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 notifyParentOfPathChange(parentNode()); 162 notifyParentOfPathChange(parentNode());
163 } 163 }
164 164
165 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) 165 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent)
166 { 166 {
167 if (parent && parent->hasTagName(SVGNames::animateMotionTag)) 167 if (parent && parent->hasTagName(SVGNames::animateMotionTag))
168 static_cast<SVGAnimateMotionElement*>(parent)->updateAnimationPath(); 168 static_cast<SVGAnimateMotionElement*>(parent)->updateAnimationPath();
169 } 169 }
170 170
171 } // namespace WebCore 171 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/svg/SVGMPathElement.h ('k') | Source/core/svg/SVGMarkerElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698