haikuwebkit/LayoutTests/fast/overflow/animation-recompute-overflo...

47 lines
1.1 KiB
HTML
Raw Permalink Normal View History

REGRESSION (r254054): finance.google.com watch list renders initially then disappears for 5+ seconds before reappearing https://bugs.webkit.org/show_bug.cgi?id=208972 <rdar://problem/59727171> Reviewed by Zalan Bujtas. Source/WebCore: After r254054 we could get a style change in which opacity was unchanged, but hasAutoUsedZIndex() in the style changed (because Adjuster::adjustAnimatedStyle() can set it). In this case we failed to trigger layout, which means that we failed to recompute visual overflow when a layer changed from being self-painting to non-self-painting (which affects visual overflow computation and has hasAutoUsedZIndex() as input). We'd thus fail to paint some renderers because their visual overflow didn't intersect the paint dirty rect. Fix by having RenderStyle::changeRequiresLayout() return true if hasAutoUsedZIndex() differs between the styles. This has minimal performance impact; rareNonInheritedDataChangeRequiresLayout() already returns true if opacity, filters and other stacking-context-affecting properties change. Test: fast/overflow/animation-recompute-overflow.html * rendering/RenderBox.cpp: (WebCore::RenderBox::addOverflowFromChild): (WebCore::RenderBox::addLayoutOverflow): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::changeRequiresLayout const): LayoutTests: Ref test, and some rebaselines where repaint order changed. * css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt: * fast/overflow/animation-recompute-overflow-expected.html: Added. * fast/overflow/animation-recompute-overflow.html: Added. * platform/ios/css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt: Canonical link: https://commits.webkit.org/221904@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-12 17:09:34 +00:00
<!DOCTYPE html>
<html>
<head>
<title>The green box should not disappear</title>
<style>
.box {
width: 400px;
background-color: green;
height: 0px;
opacity: 0.8;
transition: opacity 0.1s;
}
body.changed .box {
opacity: 1;
}
.content {
height: 200px;
width: 200px;
background-color: green;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', () => {
let box = document.getElementsByClassName('box')[0];
box.addEventListener('transitionend', () => {
if (window.testRunner)
testRunner.notifyDone();
}, false);
setTimeout(() => {
document.body.classList.add('changed');
}, 0);
}, false);
</script>
</head>
<body>
<div class="box">
<div class="content"></div>
</div>
</body>
</html>