Don't run transitions to/from 'auto' values
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 May 2016 03:39:51 +0000 (03:39 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 May 2016 03:39:51 +0000 (03:39 +0000)
commit2045ca7d0e64b2bff41caeaac695b9ed487eaef7
treedc2c2cc4e74723e8d0b49e959f38d886cba57740
parenta243c3533888757a90ea20095ba254df25d3ee4c
Don't run transitions to/from 'auto' values
https://bugs.webkit.org/show_bug.cgi?id=38243
rdar://problem/20904225

Reviewed by Dean Jackson.
Source/WebCore:

The specified behavior of transitions and animations is to not animate when either endpoint is 'auto'.
Previously, we were treating 'auto' as zero and interpolating, which caused unwanted animations
on fandango.com, airbnb.com and others.

Fix by having blend() return the from value if progress is 0, otherwise the to value. The
isZero() check can be removed, since this was effectively picking up auto value for one endpoint.

Tests: transitions/lengthsize-transition-to-from-auto.html
       transitions/transition-to-from-auto.html

* platform/Length.cpp:
(WebCore::blend):

LayoutTests:

* platform/mac-wk2/transitions/default-timing-function-expected.txt: New baseline.
* transitions/default-timing-function.html: Set explicit start value.
* transitions/interrupted-all-transition.html: Set explicit start value.
* transitions/lengthsize-transition-to-from-auto-expected.txt: Added.
* transitions/lengthsize-transition-to-from-auto.html: Added.
* transitions/transition-to-from-auto-expected.txt: Added.
* transitions/transition-to-from-auto.html: Added.
* transitions/zero-duration-in-list.html: Set explicit start value.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/transitions/default-timing-function-expected.txt
LayoutTests/transitions/default-timing-function.html
LayoutTests/transitions/interrupted-all-transition.html
LayoutTests/transitions/lengthsize-transition-to-from-auto-expected.txt [new file with mode: 0644]
LayoutTests/transitions/lengthsize-transition-to-from-auto.html [new file with mode: 0644]
LayoutTests/transitions/transition-to-from-auto-expected.txt [new file with mode: 0644]
LayoutTests/transitions/transition-to-from-auto.html [new file with mode: 0644]
LayoutTests/transitions/zero-duration-in-list.html
Source/WebCore/ChangeLog
Source/WebCore/platform/Length.cpp