| 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, &element, styleSheetCon
tents); | 86 keyframe.setCSSPropertyValue(cssProperty, value, styleSheetContents); |
| 87 return; | 87 return; |
| 88 } | 88 } |
| 89 cssProperty = AnimationInputHelpers::keyframeAttributeToPresentationAttribut
e(property, element); | 89 cssProperty = AnimationInputHelpers::keyframeAttributeToPresentationAttribut
e(property, element); |
| 90 if (cssProperty != CSSPropertyInvalid) { | 90 if (cssProperty != CSSPropertyInvalid) { |
| 91 keyframe.setPresentationAttributeValue(cssProperty, value, &element, sty
leSheetContents); | 91 keyframe.setPresentationAttributeValue(cssProperty, value, styleSheetCon
tents); |
| 92 return; | 92 return; |
| 93 } | 93 } |
| 94 const QualifiedName* svgAttribute = AnimationInputHelpers::keyframeAttribute
ToSVGAttribute(property, element); | 94 const QualifiedName* svgAttribute = AnimationInputHelpers::keyframeAttribute
ToSVGAttribute(property, element); |
| 95 if (svgAttribute) | 95 if (svgAttribute) |
| 96 keyframe.setSVGAttributeValue(*svgAttribute, value); | 96 keyframe.setSVGAttributeValue(*svgAttribute, value); |
| 97 } | 97 } |
| 98 | 98 |
| 99 EffectModel* createEffectModelFromKeyframes(Element& element, const StringKeyfra
meVector& keyframes, ExceptionState& exceptionState) | 99 EffectModel* createEffectModelFromKeyframes(Element& element, const StringKeyfra
meVector& keyframes, ExceptionState& exceptionState) |
| 100 { | 100 { |
| 101 StringKeyframeEffectModel* keyframeEffectModel = StringKeyframeEffectModel::
create(keyframes, LinearTimingFunction::shared()); | 101 StringKeyframeEffectModel* keyframeEffectModel = StringKeyframeEffectModel::
create(keyframes, LinearTimingFunction::shared()); |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 } | 316 } |
| 317 | 317 |
| 318 std::sort(keyframes.begin(), keyframes.end(), compareKeyframes); | 318 std::sort(keyframes.begin(), keyframes.end(), compareKeyframes); |
| 319 | 319 |
| 320 DCHECK(!exceptionState.hadException()); | 320 DCHECK(!exceptionState.hadException()); |
| 321 | 321 |
| 322 return createEffectModelFromKeyframes(element, keyframes, exceptionState); | 322 return createEffectModelFromKeyframes(element, keyframes, exceptionState); |
| 323 } | 323 } |
| 324 | 324 |
| 325 } // namespace blink | 325 } // namespace blink |
| OLD | NEW |