wpt / css / css-will-change / will-change-transform-huge-offset-scrolled.html

Status: PASS | Duration: 5ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-will-change/will-change-transform-huge-offset-scrolled.html

<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://drafts.csswg.org/css-will-change/#will-change">
<link rel="match" href="will-change-transform-huge-offset-scrolled-ref.html">
<div style="width: 20px; height: 20px; margin-top: 10000px; background: green; will-change: transform"></div>
<script>
// Incrementally scroll to the bottom.
var lastScrollY = 0;
function scroll() {
  window.scrollBy(0, 200);
  if (window.scrollY > lastScrollY) {
    lastScrollY = window.scrollY;
    requestAnimationFrame(scroll);
  } else {
    document.documentElement.classList.remove('reftest-wait');
  }
}
requestAnimationFrame(scroll);
</script>

/css/css-will-change/will-change-transform-huge-offset-scrolled-ref.html

<!DOCTYPE html>
<div style="width: 20px; height: 20px; margin-top: 10000px; background: green"></div>
<script>window.scrollTo(0, 10000);</script>