haikuwebkit/LayoutTests/animations/z-index-in-keyframe.html

60 lines
1.3 KiB
HTML
Raw Permalink Normal View History

REGRESSION (r252724): Unable to tap on play button on google video 'See the top search trends of 2019' https://bugs.webkit.org/show_bug.cgi?id=205694 <rdar://problem/58062987> Reviewed by Zalan Bujtas. Source/WebCore: After r252724, which separated 'used' from 'specified' z-index in style, we need to copy the specified to the used z-index in animated styles, while preserving the existing 'forceStackingContext' behavior which set the used z-index to 0. Do so by creating Adjuster::adjustAnimatedStyle(), which is called from TreeResolver::createAnimatedElementUpdate() if any animations could have affected the style. We need to pass back information about whether the animation should force stacking context. Test: animations/z-index-in-keyframe.html * animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::apply): * animation/KeyframeEffect.h: (WebCore::KeyframeEffect::triggersStackingContext const): * dom/Element.cpp: (WebCore::Element::applyKeyframeEffects): * dom/Element.h: * page/animation/CSSAnimationController.h: (): Deleted. * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::animate): * style/StyleAdjuster.cpp: (WebCore::Style::Adjuster::adjustAnimatedStyle): * style/StyleAdjuster.h: * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::createAnimatedElementUpdate): LayoutTests: * animations/z-index-in-keyframe-expected.html: Added. * animations/z-index-in-keyframe.html: Added. Canonical link: https://commits.webkit.org/218929@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-06 16:44:32 +00:00
<!DOCTYPE html>
<html>
<head>
<style>
.container {
position: absolute;
width: 300px;
height: 300px;
border: 1px solid black;
}
.box {
position: absolute;
width: 200px;
height: 200px;
}
.bottom {
left: 0px;
top: 0px;
background-color: orange;
}
.top {
left: 100px;
top: 100px;
background-color: green;
animation: fade-out 30ms forwards;
}
@keyframes fade-out {
0% {
opacity: 1;
}
100% {
z-index: -1;
opacity: 0.8;
}
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', () => {
document.getElementById('tester').addEventListener('animationend', () => {
if (window.testRunner)
testRunner.notifyDone();
}, false);
}, false);
</script>
</head>
<body>
<div class="container">
<div class="bottom box"></div>
<div id="tester" class="top box"></div>
</div>
</body>
</html>