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

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

Issue 1224223003: Fold CSSParser::colorFromRGBColorString into only user (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/SVGAnimatedColor.cpp ('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) Research In Motion Limited 2011-2012. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #include "config.h" 21 #include "config.h"
22 #include "core/svg/SVGAnimatedTypeAnimator.h" 22 #include "core/svg/SVGAnimatedTypeAnimator.h"
23 23
24 #include "core/css/parser/CSSParser.h"
25 #include "core/svg/SVGAnimateTransformElement.h" 24 #include "core/svg/SVGAnimateTransformElement.h"
26 #include "core/svg/SVGAnimatedColor.h" 25 #include "core/svg/SVGAnimatedColor.h"
27 #include "core/svg/SVGAnimationElement.h" 26 #include "core/svg/SVGAnimationElement.h"
28 #include "core/svg/SVGLength.h" 27 #include "core/svg/SVGLength.h"
29 #include "core/svg/SVGLengthList.h" 28 #include "core/svg/SVGLengthList.h"
30 #include "core/svg/SVGNumber.h" 29 #include "core/svg/SVGNumber.h"
31 #include "core/svg/SVGPointList.h" 30 #include "core/svg/SVGPointList.h"
32 #include "core/svg/SVGString.h" 31 #include "core/svg/SVGString.h"
33 #include "core/svg/SVGTransformList.h" 32 #include "core/svg/SVGTransformList.h"
34 33
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 89 }
91 90
92 ASSERT(isAnimatingCSSProperty()); 91 ASSERT(isAnimatingCSSProperty());
93 92
94 // CSS properties animation code-path. 93 // CSS properties animation code-path.
95 // Create a basic instance of the corresponding SVG property. 94 // Create a basic instance of the corresponding SVG property.
96 // The instance will not have full context info. (e.g. SVGLengthMode) 95 // The instance will not have full context info. (e.g. SVGLengthMode)
97 96
98 switch (m_type) { 97 switch (m_type) {
99 case AnimatedColor: 98 case AnimatedColor:
100 return SVGColorProperty::create(value.isEmpty() ? StyleColor::currentCol or() : CSSParser::colorFromRGBColorString(value)); 99 return SVGColorProperty::create(value);
101 case AnimatedNumber: { 100 case AnimatedNumber: {
102 RefPtrWillBeRawPtr<SVGNumber> property = SVGNumber::create(); 101 RefPtrWillBeRawPtr<SVGNumber> property = SVGNumber::create();
103 property->setValueAsString(value, IGNORE_EXCEPTION); 102 property->setValueAsString(value, IGNORE_EXCEPTION);
104 return property.release(); 103 return property.release();
105 } 104 }
106 case AnimatedLength: { 105 case AnimatedLength: {
107 RefPtrWillBeRawPtr<SVGLength> property = SVGLength::create(); 106 RefPtrWillBeRawPtr<SVGLength> property = SVGLength::create();
108 property->setValueAsString(value, IGNORE_EXCEPTION); 107 property->setValueAsString(value, IGNORE_EXCEPTION);
109 return property.release(); 108 return property.release();
110 } 109 }
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 262 }
264 263
265 DEFINE_TRACE(SVGAnimatedTypeAnimator) 264 DEFINE_TRACE(SVGAnimatedTypeAnimator)
266 { 265 {
267 visitor->trace(m_animationElement); 266 visitor->trace(m_animationElement);
268 visitor->trace(m_contextElement); 267 visitor->trace(m_contextElement);
269 visitor->trace(m_animatedProperty); 268 visitor->trace(m_animatedProperty);
270 } 269 }
271 270
272 } 271 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAnimatedColor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698