| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |