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

Side by Side Diff: Source/core/animation/EffectInput.cpp

Issue 1068973004: Web Animations: Support animation of SVG number attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 DEFINE_STATIC_LOCAL(AttributeNameMap, supportedAttributes, ()); 71 DEFINE_STATIC_LOCAL(AttributeNameMap, supportedAttributes, ());
72 if (supportedAttributes.isEmpty()) { 72 if (supportedAttributes.isEmpty()) {
73 // Fill the set for the first use. 73 // Fill the set for the first use.
74 // Animatable attributes from http://www.w3.org/TR/SVG/attindex.html 74 // Animatable attributes from http://www.w3.org/TR/SVG/attindex.html
75 const QualifiedName* attributes[] = { 75 const QualifiedName* attributes[] = {
76 // FIXME: Support all the animatable attributes. 76 // FIXME: Support all the animatable attributes.
77 &HTMLNames::classAttr, 77 &HTMLNames::classAttr,
78 &SVGNames::clipPathUnitsAttr, 78 &SVGNames::clipPathUnitsAttr,
79 &SVGNames::edgeModeAttr, 79 &SVGNames::edgeModeAttr,
80 &SVGNames::filterResAttr, 80 &SVGNames::filterResAttr,
81 &SVGNames::offsetAttr,
81 &SVGNames::orderAttr, 82 &SVGNames::orderAttr,
82 &SVGNames::orientAttr, 83 &SVGNames::orientAttr,
84 &SVGNames::pathLengthAttr,
83 &SVGNames::pointsAttr, 85 &SVGNames::pointsAttr,
86 &SVGNames::tableValuesAttr,
87 &SVGNames::valuesAttr,
88 &SVGNames::zAttr,
84 &XLinkNames::hrefAttr, 89 &XLinkNames::hrefAttr,
85 }; 90 };
86 for (size_t i = 0; i < WTF_ARRAY_LENGTH(attributes); i++) 91 for (size_t i = 0; i < WTF_ARRAY_LENGTH(attributes); i++)
87 supportedAttributes.set(*attributes[i], attributes[i]); 92 supportedAttributes.set(*attributes[i], attributes[i]);
88 } 93 }
89 94
90 if (isSVGSMILElement(*svgElement)) 95 if (isSVGSMILElement(*svgElement))
91 return nullptr; 96 return nullptr;
92 97
93 QualifiedName attributeName = svgAttributeName(property); 98 QualifiedName attributeName = svgAttributeName(property);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c onst AnimationEffectOrDictionarySequence& effectInput, ExceptionState& exception State) 203 PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c onst AnimationEffectOrDictionarySequence& effectInput, ExceptionState& exception State)
199 { 204 {
200 if (effectInput.isAnimationEffect()) 205 if (effectInput.isAnimationEffect())
201 return effectInput.getAsAnimationEffect(); 206 return effectInput.getAsAnimationEffect();
202 if (effectInput.isDictionarySequence()) 207 if (effectInput.isDictionarySequence())
203 return convert(element, effectInput.getAsDictionarySequence(), exception State); 208 return convert(element, effectInput.getAsDictionarySequence(), exception State);
204 return nullptr; 209 return nullptr;
205 } 210 }
206 211
207 } // namespace blink 212 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698