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

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

Issue 114373004: Remove the SVGColor and SVGPaint DOM interfaces (were deprecated). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: text diff fix Created 7 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
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/svg/SVGColor.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) Research In Motion Limited 2011. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 OwnPtr<SVGAnimatedType> animatedType = adoptPtr(new SVGAnimatedType(Animated NewProperty)); 236 OwnPtr<SVGAnimatedType> animatedType = adoptPtr(new SVGAnimatedType(Animated NewProperty));
237 animatedType->m_newProperty = newProperty; 237 animatedType->m_newProperty = newProperty;
238 return animatedType.release(); 238 return animatedType.release();
239 } 239 }
240 240
241 String SVGAnimatedType::valueAsString() 241 String SVGAnimatedType::valueAsString()
242 { 242 {
243 switch (m_type) { 243 switch (m_type) {
244 case AnimatedColor: 244 case AnimatedColor:
245 ASSERT(m_data.color); 245 ASSERT(m_data.color);
246 return m_data.color->serialized(); 246 return m_data.color->serializedAsCSSComponentValue();
247 case AnimatedLength: 247 case AnimatedLength:
248 ASSERT(m_data.length); 248 ASSERT(m_data.length);
249 return m_data.length->valueAsString(); 249 return m_data.length->valueAsString();
250 case AnimatedLengthList: 250 case AnimatedLengthList:
251 ASSERT(m_data.lengthList); 251 ASSERT(m_data.lengthList);
252 return m_data.lengthList->valueAsString(); 252 return m_data.lengthList->valueAsString();
253 case AnimatedNumber: 253 case AnimatedNumber:
254 ASSERT(m_data.number); 254 ASSERT(m_data.number);
255 return String::number(*m_data.number); 255 return String::number(*m_data.number);
256 case AnimatedRect: 256 case AnimatedRect:
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 return true; 337 return true;
338 } 338 }
339 339
340 bool SVGAnimatedType::supportsAnimVal(AnimatedPropertyType type) 340 bool SVGAnimatedType::supportsAnimVal(AnimatedPropertyType type)
341 { 341 {
342 // AnimatedColor is only used for CSS property animations. 342 // AnimatedColor is only used for CSS property animations.
343 return type != AnimatedUnknown && type != AnimatedColor; 343 return type != AnimatedUnknown && type != AnimatedColor;
344 } 344 }
345 345
346 } // namespace WebCore 346 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/svg/SVGColor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698