DescriptionWeb Animations API: Implement step-middle and steps(x, middle) timing functions.
step-middle and steps(x, middle) need to work in the Web Animations API but not in CSS. To achieve that we check for step-middle and steps(x, middle) in CSSToStyleMap::mapAnimationTimingFunction, where CSS-land timing functions are set. Step middle functions won’t behave like other invalid inputs; when an animation is made with timing-function: step-middle, or the timing function is set to step-middle after creating the animation, the timing-function value is set to “ease”.
In AbstractPropertySetCSSStyleDeclaration::setPropertyInternal (in PropertySetCSSStyleDeclaration.cpp) there is no good way to check the value of the property to be set, so we just don’t. This means that if you do
element.style.animationTimingFunction = 'step-middle';
then element.style.animationTimingFunciton will return “step-middle”, but “ease” is used as the actual timing function. This issue is partially mitigated by the fact that we also check RuntimeEnabledFeatures::webAnimationsAPIEnabled at the parsing layer, and don’t parse step middle functions if it’s false.
This CL also removes TimingFunctionTestHelper and TimingFunctionTestHelperTest and adds TimingFunctionTest.
BUG=327564
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168500
Patch Set 1 #Patch Set 2 : Remove class in BisonCSSParserTest and change to new license text #
Total comments: 2
Patch Set 3 : Rebase #Patch Set 4 : Add comment to timing-functions test re. invalidity of step-middle in CSS #
Total comments: 12
Patch Set 5 : Upload after rebase #Patch Set 6 : Remove bool argument from parseAnimationTimingFunctionValue #
Total comments: 2
Patch Set 7 : Fix TimingFunctionTestHelperTest #
Total comments: 10
Patch Set 8 : Rebase. Change handling of step-middle in CSS. See issue description. #Patch Set 9 : Remove TimingFunctionTestHelper #Patch Set 10 : Fix comment on macro #Patch Set 11 : Rebased. (Still need to test TimingFunction::evaluate, and layout-test step-middle). #Patch Set 12 : Add unit test cases for TimingFunction::evaluate methods #Patch Set 13 : Small change to timing-functions.html. See code comment. #Patch Set 14 : Fix comment typo #
Total comments: 4
Patch Set 15 : Synced and Rebased #Patch Set 16 : Export equals operators #Patch Set 17 : Merged patch into fresh branch (to avoid scary rebase) #Messages
Total messages: 47 (0 generated)
|