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

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

Issue 1544673003: Refactor propagation of parsing errors for SVG attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // CSS properties animation code-path. 92 // CSS properties animation code-path.
93 // Create a basic instance of the corresponding SVG property. 93 // Create a basic instance of the corresponding SVG property.
94 // The instance will not have full context info. (e.g. SVGLengthMode) 94 // The instance will not have full context info. (e.g. SVGLengthMode)
95 95
96 switch (m_type) { 96 switch (m_type) {
97 case AnimatedColor: 97 case AnimatedColor:
98 return SVGColorProperty::create(value); 98 return SVGColorProperty::create(value);
99 case AnimatedNumber: { 99 case AnimatedNumber: {
100 RefPtrWillBeRawPtr<SVGNumber> property = SVGNumber::create(); 100 RefPtrWillBeRawPtr<SVGNumber> property = SVGNumber::create();
101 property->setValueAsString(value, IGNORE_EXCEPTION); 101 property->setValueAsString(value);
102 return property.release(); 102 return property.release();
103 } 103 }
104 case AnimatedLength: { 104 case AnimatedLength: {
105 RefPtrWillBeRawPtr<SVGLength> property = SVGLength::create(); 105 RefPtrWillBeRawPtr<SVGLength> property = SVGLength::create();
106 property->setValueAsString(value, IGNORE_EXCEPTION); 106 property->setValueAsString(value);
107 return property.release(); 107 return property.release();
108 } 108 }
109 case AnimatedLengthList: { 109 case AnimatedLengthList: {
110 RefPtrWillBeRawPtr<SVGLengthList> property = SVGLengthList::create(); 110 RefPtrWillBeRawPtr<SVGLengthList> property = SVGLengthList::create();
111 property->setValueAsString(value, IGNORE_EXCEPTION); 111 property->setValueAsString(value);
112 return property.release(); 112 return property.release();
113 } 113 }
114 case AnimatedString: { 114 case AnimatedString: {
115 RefPtrWillBeRawPtr<SVGString> property = SVGString::create(); 115 RefPtrWillBeRawPtr<SVGString> property = SVGString::create();
116 property->setValueAsString(value, IGNORE_EXCEPTION); 116 property->setValueAsString(value);
117 return property.release(); 117 return property.release();
118 } 118 }
119 119
120 // These types don't appear in the table in SVGElement::animatedPropertyType ForCSSAttribute() and thus don't need support. 120 // These types don't appear in the table in SVGElement::animatedPropertyType ForCSSAttribute() and thus don't need support.
121 case AnimatedAngle: 121 case AnimatedAngle:
122 case AnimatedBoolean: 122 case AnimatedBoolean:
123 case AnimatedEnumeration: 123 case AnimatedEnumeration:
124 case AnimatedInteger: 124 case AnimatedInteger:
125 case AnimatedIntegerOptionalInteger: 125 case AnimatedIntegerOptionalInteger:
126 case AnimatedNumberList: 126 case AnimatedNumberList:
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 259 }
260 260
261 DEFINE_TRACE(SVGAnimatedTypeAnimator) 261 DEFINE_TRACE(SVGAnimatedTypeAnimator)
262 { 262 {
263 visitor->trace(m_animationElement); 263 visitor->trace(m_animationElement);
264 visitor->trace(m_contextElement); 264 visitor->trace(m_contextElement);
265 visitor->trace(m_animatedProperty); 265 visitor->trace(m_animatedProperty);
266 } 266 }
267 267
268 } 268 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698