REGRESSION (r187121): Can't get to the main content of the page at https://theinterce...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Dec 2015 05:14:30 +0000 (05:14 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Dec 2015 05:14:30 +0000 (05:14 +0000)
commited0f1f5820141c0873fbc07e357cdec669ed5748
treee7887d7c1bf3e16911226e9391036382df88ccff
parentfce1298dcd2336ffea4d31f973f73399f2b9302a
REGRESSION (r187121): Can't get to the main content of the page at https://theintercept.com/drone-papers/
https://bugs.webkit.org/show_bug.cgi?id=151849
rdar://problem/23132828

Reviewed by Zalan Bujtas.

Source/WebCore:

This page uses a fill-forwards animation where the last keyframe has height: auto.
After r187121, we tried to blend the height Length value from the last keyframe to the
first keyframe with progress=0 (which should pick up the 'auto' from the last keyframe).

However, Length::blend() just considered both 0 and 'auto' to be zero, and returned
the 0 length.

So fix Length::blend() to return the "from" length if progress is zero.

Test: animations/fill-forwards-auto-height.html

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc): Length::blend takes a double, so don't narrow to float.
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): Declare two variables
at first use.
* platform/Length.h:
(WebCore::Length::blend):

LayoutTests:

New ref test.

The behavior of imported/blink/transitions/transition-not-interpolable.html changed
with this patch, but that test is trying to determine if transitions run to/from
'auto' values, and doing it wrong. The current patch doesn't change the user-visible
behavior of transitions with 'auto' endpoints (covered by http://webkit.org/b/38243).

* animations/fill-forwards-auto-height-expected.html: Added.
* animations/fill-forwards-auto-height.html: Added.
* imported/blink/transitions/transition-not-interpolable-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/animations/fill-forwards-auto-height-expected.html [new file with mode: 0644]
LayoutTests/animations/fill-forwards-auto-height.html [new file with mode: 0644]
LayoutTests/imported/blink/transitions/transition-not-interpolable-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/page/animation/CSSPropertyAnimation.cpp
Source/WebCore/page/animation/KeyframeAnimation.cpp
Source/WebCore/platform/Length.h