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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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/SVGPatternElement.cpp ('k') | Source/core/svg/SVGRadialGradientElement.cpp » ('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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void SVGPolyElement::parseAttribute(const QualifiedName& name, const AtomicStrin g& value) 75 void SVGPolyElement::parseAttribute(const QualifiedName& name, const AtomicStrin g& value)
76 { 76 {
77 if (!isSupportedAttribute(name)) { 77 if (!isSupportedAttribute(name)) {
78 SVGGraphicsElement::parseAttribute(name, value); 78 SVGGraphicsElement::parseAttribute(name, value);
79 return; 79 return;
80 } 80 }
81 81
82 if (name == SVGNames::pointsAttr) { 82 if (name == SVGNames::pointsAttr) {
83 SVGPointList newList; 83 SVGPointList newList;
84 if (!pointsListFromSVGData(newList, value)) 84 if (!pointsListFromSVGData(newList, value))
85 document()->accessSVGExtensions()->reportError("Problem parsing poin ts=\"" + value + "\""); 85 document().accessSVGExtensions()->reportError("Problem parsing point s=\"" + value + "\"");
86 86
87 if (SVGAnimatedProperty* wrapper = SVGAnimatedProperty::lookupWrapper<SV GPolyElement, SVGAnimatedPointList>(this, pointsPropertyInfo())) 87 if (SVGAnimatedProperty* wrapper = SVGAnimatedProperty::lookupWrapper<SV GPolyElement, SVGAnimatedPointList>(this, pointsPropertyInfo()))
88 static_cast<SVGAnimatedPointList*>(wrapper)->detachListWrappers(newL ist.size()); 88 static_cast<SVGAnimatedPointList*>(wrapper)->detachListWrappers(newL ist.size());
89 89
90 m_points.value = newList; 90 m_points.value = newList;
91 return; 91 return;
92 } 92 }
93 93
94 if (SVGLangSpace::parseAttribute(name, value)) 94 if (SVGLangSpace::parseAttribute(name, value))
95 return; 95 return;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cas t<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->baseVal()); 149 return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cas t<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->baseVal());
150 } 150 }
151 151
152 SVGListPropertyTearOff<SVGPointList>* SVGPolyElement::animatedPoints() 152 SVGListPropertyTearOff<SVGPointList>* SVGPolyElement::animatedPoints()
153 { 153 {
154 m_points.shouldSynchronize = true; 154 m_points.shouldSynchronize = true;
155 return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cas t<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->animVal()); 155 return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cas t<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->animVal());
156 } 156 }
157 157
158 } 158 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPatternElement.cpp ('k') | Source/core/svg/SVGRadialGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698