haikuwebkit/LayoutTests/animations/fill-forwards-auto-height.html

44 lines
767 B
HTML
Raw Permalink Normal View History

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: Canonical link: https://commits.webkit.org/170060@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-07 05:14:30 +00:00
<!DOCTYPE html>
<html>
<head>
<style>
@keyframes reveal {
0%, 50% {
height: 0;
}
100% {
height: auto;
}
}
.landing {
width: 300px;
overflow: hidden;
border: 1px solid black;
animation: reveal 0.01s forwards;
}
.contents {
height: 300px;
background-color: gray;
}
</style>
</head>
<body>
<div id="animated" class="landing">
<div class="contents"></div>
</div>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
document.getElementById('animated').addEventListener('animationend', function() {
if (window.testRunner)
testRunner.notifyDone();
})
</script>
</body>
</html>