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

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

Issue 2324963003: Store custom properties specified in element.animate() (Closed)
Patch Set: Rebased Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/core/animation/AnimationInputHelpersTest.cpp ('k') | no next file » | 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) 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 return true; 78 return true;
79 } 79 }
80 80
81 void setKeyframeValue(Element& element, StringKeyframe& keyframe, const String& property, const String& value) 81 void setKeyframeValue(Element& element, StringKeyframe& keyframe, const String& property, const String& value)
82 { 82 {
83 StyleSheetContents* styleSheetContents = element.document().elementSheet().c ontents(); 83 StyleSheetContents* styleSheetContents = element.document().elementSheet().c ontents();
84 CSSPropertyID cssProperty = AnimationInputHelpers::keyframeAttributeToCSSPro perty(property, element.document()); 84 CSSPropertyID cssProperty = AnimationInputHelpers::keyframeAttributeToCSSPro perty(property, element.document());
85 if (cssProperty != CSSPropertyInvalid) { 85 if (cssProperty != CSSPropertyInvalid) {
86 keyframe.setCSSPropertyValue(cssProperty, value, styleSheetContents); 86 if (cssProperty == CSSPropertyVariable)
87 keyframe.setCSSPropertyValue(AtomicString(property), value, styleShe etContents);
88 else
89 keyframe.setCSSPropertyValue(cssProperty, value, styleSheetContents) ;
87 return; 90 return;
88 } 91 }
89 cssProperty = AnimationInputHelpers::keyframeAttributeToPresentationAttribut e(property, element); 92 cssProperty = AnimationInputHelpers::keyframeAttributeToPresentationAttribut e(property, element);
90 if (cssProperty != CSSPropertyInvalid) { 93 if (cssProperty != CSSPropertyInvalid) {
91 keyframe.setPresentationAttributeValue(cssProperty, value, styleSheetCon tents); 94 keyframe.setPresentationAttributeValue(cssProperty, value, styleSheetCon tents);
92 return; 95 return;
93 } 96 }
94 const QualifiedName* svgAttribute = AnimationInputHelpers::keyframeAttribute ToSVGAttribute(property, element); 97 const QualifiedName* svgAttribute = AnimationInputHelpers::keyframeAttribute ToSVGAttribute(property, element);
95 if (svgAttribute) 98 if (svgAttribute)
96 keyframe.setSVGAttributeValue(*svgAttribute, value); 99 keyframe.setSVGAttributeValue(*svgAttribute, value);
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 319 }
317 320
318 std::sort(keyframes.begin(), keyframes.end(), compareKeyframes); 321 std::sort(keyframes.begin(), keyframes.end(), compareKeyframes);
319 322
320 DCHECK(!exceptionState.hadException()); 323 DCHECK(!exceptionState.hadException());
321 324
322 return createEffectModelFromKeyframes(element, keyframes, exceptionState); 325 return createEffectModelFromKeyframes(element, keyframes, exceptionState);
323 } 326 }
324 327
325 } // namespace blink 328 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/AnimationInputHelpersTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698