[Web Animations] Interpolation between lengths with an "auto" value should be discrete
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2018 18:54:05 +0000 (18:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2018 18:54:05 +0000 (18:54 +0000)
commit76de78e33698b09778d6697ec6588987c5db6e60
tree9f2b28c8be326f960e75268d712bc084b147bdd0
parent4a256468e8eaff6f351d9fabe75204080bfbb5db
[Web Animations] Interpolation between lengths with an "auto" value should be discrete
https://bugs.webkit.org/show_bug.cgi?id=187721

Patch by Antoine Quint <graouts@apple.com> on 2018-07-17
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 2 new WPT progressions.

* web-platform-tests/web-animations/animation-model/animation-types/discrete-expected.txt:

Source/WebCore:

When interpolating between two Length values, if one is "auto", we should use the from-value
from 0 and up to (but excluding) 0.5, and use the to-value from 0.5 to 1.

This change caused a regression in the legacy animation engine since it would create a CSS
transition even when the underlying and target values were non-interpolable. As such, the
underlying value would be used until the transition's mid-point and the tests at
legacy-animation-engine/imported/blink/transitions/transition-not-interpolable.html and
legacy-animation-engine/fast/animation/height-auto-transition-computed-value.html would fail
expecting the target value to be used immediately. We now ensure that no transition is actually
started if two values for a given property cannot be interpolated.

* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions):
* platform/Length.cpp:
(WebCore::blend):

LayoutTests:

Make two more tests opt into the new animation engine since they pass and they're not in the legacy-animation-engine directory.
A third test now has some logging due to transitions not actually running, which is expected and correct.

* fast/animation/height-auto-transition-computed-value.html:
* imported/blink/transitions/transition-not-interpolable.html:
* legacy-animation-engine/transitions/transition-to-from-auto-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/animation/height-auto-transition-computed-value.html
LayoutTests/imported/blink/transitions/transition-not-interpolable.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/discrete-expected.txt
LayoutTests/legacy-animation-engine/transitions/transition-to-from-auto-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/page/animation/CompositeAnimation.cpp
Source/WebCore/platform/Length.cpp