DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (409f3966645a)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
<!DOCTYPE html>
<html lang="en" class="reftest-wait" reftest-async-scroll>
<meta charset="utf-8">
<title>Bug 1266161 - Black boxes during scrolling</title>

<style type="text/css">

html, body {
  margin: 0;
  height: 100%;
}

body {
  outline: 2px solid white;
}

#scrollbox {
  overflow: auto;
  will-change: transform, scroll-position;
  height: 500px;
  width: 500px;
}

#scrolled {
  padding-top: 1px;
  height: 1200px;
}

p {
  height: 20px;
  background: white;
  margin-top: 16px;
}

span, em {
  display: block;
  background: white;
  width: 134px;
  height: 14px;
  margin-top: 32px;
}

em {
  width: 10px;
}

</style>

<div id="scrollbox"
   reftest-displayport-x="0"
   reftest-displayport-y="0"
   reftest-displayport-w="500"
   reftest-displayport-h="500">

  <div id="scrolled">
    <p></p>
    <p></p>
    <p></p>
    <span style="margin-top: 48px"></span>
    <span style="margin-top: 64px"></span>
    <span style="margin-top: 96px"></span>
    <span style="margin-top: 96px"></span>
    <em></em>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
  </div>

</div>

<script>

var scrollbox = document.getElementById("scrollbox");

var pos = [ 170, 100, 248, 182, 130, 80 ];

var i = 0;
function scrollToNextPos() {
  scrollbox.scrollTop = pos[i++];
}

scrollToNextPos();

window.addEventListener("MozReftestInvalidate", function () {
  requestAnimationFrame(function scrollAndScheduleNext() {
    scrollToNextPos();
    if (i < pos.length) {
      requestAnimationFrame(scrollAndScheduleNext);
    } else {
      document.documentElement.className = "";
    }
  });
});

</script>