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

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

Issue 21042009: [SVG2] Merge SVGStyledElement into SVGElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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/SVGAElement.cpp ('k') | Source/core/svg/SVGAnimationElement.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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 ASSERT(m_data.number); 243 ASSERT(m_data.number);
244 return String::number(*m_data.number); 244 return String::number(*m_data.number);
245 case AnimatedRect: 245 case AnimatedRect:
246 ASSERT(m_data.rect); 246 ASSERT(m_data.rect);
247 return String::number(m_data.rect->x()) + ' ' + String::number(m_data.re ct->y()) + ' ' 247 return String::number(m_data.rect->x()) + ' ' + String::number(m_data.re ct->y()) + ' '
248 + String::number(m_data.rect->width()) + ' ' + String::number(m_dat a.rect->height()); 248 + String::number(m_data.rect->width()) + ' ' + String::number(m_dat a.rect->height());
249 case AnimatedString: 249 case AnimatedString:
250 ASSERT(m_data.string); 250 ASSERT(m_data.string);
251 return *m_data.string; 251 return *m_data.string;
252 252
253 // These types don't appear in the table in SVGStyledElement::cssPropertyToT ypeMap() and thus don't need valueAsString() support. 253 // These types don't appear in the table in SVGElement::cssPropertyToTypeMap () and thus don't need valueAsString() support.
254 case AnimatedAngle: 254 case AnimatedAngle:
255 case AnimatedBoolean: 255 case AnimatedBoolean:
256 case AnimatedEnumeration: 256 case AnimatedEnumeration:
257 case AnimatedInteger: 257 case AnimatedInteger:
258 case AnimatedIntegerOptionalInteger: 258 case AnimatedIntegerOptionalInteger:
259 case AnimatedNumberList: 259 case AnimatedNumberList:
260 case AnimatedNumberOptionalNumber: 260 case AnimatedNumberOptionalNumber:
261 case AnimatedPath: 261 case AnimatedPath:
262 case AnimatedPoints: 262 case AnimatedPoints:
263 case AnimatedPreserveAspectRatio: 263 case AnimatedPreserveAspectRatio:
(...skipping 30 matching lines...) Expand all
294 break; 294 break;
295 case AnimatedRect: 295 case AnimatedRect:
296 ASSERT(m_data.rect); 296 ASSERT(m_data.rect);
297 parseRect(value, *m_data.rect); 297 parseRect(value, *m_data.rect);
298 break; 298 break;
299 case AnimatedString: 299 case AnimatedString:
300 ASSERT(m_data.string); 300 ASSERT(m_data.string);
301 *m_data.string = value; 301 *m_data.string = value;
302 break; 302 break;
303 303
304 // These types don't appear in the table in SVGStyledElement::cssPropertyToT ypeMap() and thus don't need setValueAsString() support. 304 // These types don't appear in the table in SVGElement::cssPropertyToTypeMap () and thus don't need setValueAsString() support.
305 case AnimatedAngle: 305 case AnimatedAngle:
306 case AnimatedBoolean: 306 case AnimatedBoolean:
307 case AnimatedEnumeration: 307 case AnimatedEnumeration:
308 case AnimatedInteger: 308 case AnimatedInteger:
309 case AnimatedIntegerOptionalInteger: 309 case AnimatedIntegerOptionalInteger:
310 case AnimatedNumberList: 310 case AnimatedNumberList:
311 case AnimatedNumberOptionalNumber: 311 case AnimatedNumberOptionalNumber:
312 case AnimatedPath: 312 case AnimatedPath:
313 case AnimatedPoints: 313 case AnimatedPoints:
314 case AnimatedPreserveAspectRatio: 314 case AnimatedPreserveAspectRatio:
315 case AnimatedTransformList: 315 case AnimatedTransformList:
316 case AnimatedUnknown: 316 case AnimatedUnknown:
317 // Only SVG DOM animations use these property types - that means setValu eAsString() is never used for those. 317 // Only SVG DOM animations use these property types - that means setValu eAsString() is never used for those.
318 ASSERT_NOT_REACHED(); 318 ASSERT_NOT_REACHED();
319 break; 319 break;
320 } 320 }
321 return true; 321 return true;
322 } 322 }
323 323
324 bool SVGAnimatedType::supportsAnimVal(AnimatedPropertyType type) 324 bool SVGAnimatedType::supportsAnimVal(AnimatedPropertyType type)
325 { 325 {
326 // AnimatedColor is only used for CSS property animations. 326 // AnimatedColor is only used for CSS property animations.
327 return type != AnimatedUnknown && type != AnimatedColor; 327 return type != AnimatedUnknown && type != AnimatedColor;
328 } 328 }
329 329
330 } // namespace WebCore 330 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAElement.cpp ('k') | Source/core/svg/SVGAnimationElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698