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

Side by Side Diff: Source/WebCore/svg/SVGViewSpec.cpp

Issue 12562002: Merge 145013 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | no next file » | 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, 2010 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007, 2010 Rob Buis <buis@kde.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 String SVGViewSpec::preserveAspectRatioString() const 136 String SVGViewSpec::preserveAspectRatioString() const
137 { 137 {
138 return SVGPropertyTraits<SVGPreserveAspectRatio>::toString(preserveAspectRat ioBaseValue()); 138 return SVGPropertyTraits<SVGPreserveAspectRatio>::toString(preserveAspectRat ioBaseValue());
139 } 139 }
140 140
141 SVGElement* SVGViewSpec::viewTarget() const 141 SVGElement* SVGViewSpec::viewTarget() const
142 { 142 {
143 if (!m_contextElement) 143 if (!m_contextElement)
144 return 0; 144 return 0;
145 return static_cast<SVGElement*>(m_contextElement->treeScope()->getElementByI d(m_viewTargetString)); 145 Element* element = m_contextElement->treeScope()->getElementById(m_viewTarge tString);
146 if (!element || !element->isSVGElement())
147 return 0;
148 return static_cast<SVGElement*>(element);
146 } 149 }
147 150
148 SVGTransformListPropertyTearOff* SVGViewSpec::transform() 151 SVGTransformListPropertyTearOff* SVGViewSpec::transform()
149 { 152 {
150 if (!m_contextElement) 153 if (!m_contextElement)
151 return 0; 154 return 0;
152 // Return the animVal here, as its readonly by default - which is exactly wh at we want here. 155 // Return the animVal here, as its readonly by default - which is exactly wh at we want here.
153 return static_cast<SVGTransformListPropertyTearOff*>(static_pointer_cast<SVG AnimatedTransformList>(lookupOrCreateTransformWrapper(this))->animVal()); 156 return static_cast<SVGTransformListPropertyTearOff*>(static_pointer_cast<SVG AnimatedTransformList>(lookupOrCreateTransformWrapper(this))->animVal());
154 } 157 }
155 158
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 293
291 if (currViewSpec >= end || *currViewSpec != ')') 294 if (currViewSpec >= end || *currViewSpec != ')')
292 return false; 295 return false;
293 296
294 return true; 297 return true;
295 } 298 }
296 299
297 } 300 }
298 301
299 #endif // ENABLE(SVG) 302 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698