mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 21:58:41 +02:00
Automatic update from web-platform-tests Revert "[Animation Worklet] Remove unnecessary force composition" This reverts commit b9fdefc5712d3ec3b2482ad9c2af1c2e6fa6b25a. Reason for revert: Removing compositing caused flaky on Mac Original change's description: > [Animation Worklet] Remove unnecessary force composition > > We used to have will-change: transform in test reference but they are > no longer needed. > > Change-Id: Ib6870863760e32de201a0560fa59f43634c72da8 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504711 > Commit-Queue: Yi Gu <yigu@chromium.org> > Reviewed-by: Xida Chen <xidachen@chromium.org> > Cr-Commit-Position: refs/heads/master@{#638107} TBR=xidachen@chromium.org,yigu@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I1350b6c5e53e35fd0fb5de035e33c9f44528a4c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1510077 Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Yi Gu <yigu@chromium.org> Cr-Commit-Position: refs/heads/master@{#638867} -- wpt-commits: 4371a004caa7771794a31109bc019e001799f8e2 wpt-pr: 15734
45 lines
No EOL
957 B
HTML
45 lines
No EOL
957 B
HTML
<!DOCTYPE html>
|
|
<title>Scroll timeline with WorkletAnimation using a scroller with overflow hidden</title>
|
|
<style>
|
|
#box {
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: green;
|
|
transform: translate(0, 100px);
|
|
opacity: 0.5;
|
|
will-change: transform; /* force compositing */
|
|
}
|
|
|
|
#covered {
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: red;
|
|
}
|
|
|
|
#scroller {
|
|
overflow: hidden;
|
|
height: 100px;
|
|
width: 100px;
|
|
will-change: transform; /* force compositing */
|
|
}
|
|
|
|
#contents {
|
|
height: 1000px;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
|
|
<div id="box"></div>
|
|
<div id="covered"></div>
|
|
<div id="scroller">
|
|
<div id="contents"></div>
|
|
</div>
|
|
|
|
<script>
|
|
window.addEventListener('load', function() {
|
|
// Move the scroller to halfway.
|
|
const scroller = document.getElementById("scroller");
|
|
const maxScroll = scroller.scrollHeight - scroller.clientHeight;
|
|
scroller.scrollTop = 0.5 * maxScroll;
|
|
});
|
|
</script> |