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

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,
84 &SVGNames::viewBoxAttr, 88 &SVGNames::viewBoxAttr,
89 &SVGNames::zAttr,
85 &XLinkNames::hrefAttr, 90 &XLinkNames::hrefAttr,
86 }; 91 };
87 for (size_t i = 0; i < WTF_ARRAY_LENGTH(attributes); i++) 92 for (size_t i = 0; i < WTF_ARRAY_LENGTH(attributes); i++)
88 supportedAttributes.set(*attributes[i], attributes[i]); 93 supportedAttributes.set(*attributes[i], attributes[i]);
89 } 94 }
90 95
91 if (isSVGSMILElement(*svgElement)) 96 if (isSVGSMILElement(*svgElement))
92 return nullptr; 97 return nullptr;
93 98
94 QualifiedName attributeName = svgAttributeName(property); 99 QualifiedName attributeName = svgAttributeName(property);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c onst AnimationEffectOrDictionarySequence& effectInput, ExceptionState& exception State) 204 PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c onst AnimationEffectOrDictionarySequence& effectInput, ExceptionState& exception State)
200 { 205 {
201 if (effectInput.isAnimationEffect()) 206 if (effectInput.isAnimationEffect())
202 return effectInput.getAsAnimationEffect(); 207 return effectInput.getAsAnimationEffect();
203 if (effectInput.isDictionarySequence()) 208 if (effectInput.isDictionarySequence())
204 return convert(element, effectInput.getAsDictionarySequence(), exception State); 209 return convert(element, effectInput.getAsDictionarySequence(), exception State);
205 return nullptr; 210 return nullptr;
206 } 211 }
207 212
208 } // namespace blink 213 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698