summaryrefslogtreecommitdiffstats
path: root/layout/reftests/invalidation/fast-scrolling.html
blob: c78456fad5dc146c4e3e74a58b030fa17fb54bd4 (plain)
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
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang="en" class="reftest-wait" reftest-async-scroll>
<meta charset="utf-8">
<title>Bug 1164227 - Testcase for the invalid region simplification bug</title>

<style>

#scrollbox {
  width: 400px;
  height: 500px;
  overflow: auto;
  margin: 80px;
  border: 1px solid black;
}

.contents {
  height: 600px;
  background: white;
  padding: 20px;
  position: relative;
}

.boxes > div {
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border: 1px solid black;
  float: left;
  margin-left: -2px;
}

.boxes > div:nth-child(odd) {
  transform: translateY(500px);
}

.reftest-no-paint {
  position: absolute;
  top: 250px;
  left: 30px;
  width: 200px;
  height: 50px;
  border: 1px solid red;
}
</style>

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

  <div class="contents">

    <div class="boxes">
      <div style="margin-top: 0px"></div>
      <div style="margin-top: 1px"></div>
      <div style="margin-top: 2px"></div>
      <div style="margin-top: 3px"></div>
      <div style="margin-top: 4px"></div>
      <div style="margin-top: 5px"></div>
      <div style="margin-top: 6px"></div>
      <div style="margin-top: 7px"></div>
      <div style="margin-top: 8px"></div>
      <div style="margin-top: 9px"></div>
      <div style="margin-top: 10px"></div>
      <div style="margin-top: 11px"></div>
      <div style="margin-top: 12px"></div>
      <div style="margin-top: 13px"></div>
      <div style="margin-top: 14px"></div>
      <div style="margin-top: 15px"></div>
      <div style="margin-top: 16px"></div>
      <div style="margin-top: 17px"></div>
      <div style="margin-top: 18px"></div>
      <div style="margin-top: 19px"></div>
      <div style="margin-top: 20px"></div>
      <div style="margin-top: 21px"></div>
      <div style="margin-top: 22px"></div>
      <div style="margin-top: 23px"></div>
      <div style="margin-top: 24px"></div>
      <div style="margin-top: 25px"></div>
      <div style="margin-top: 26px"></div>
      <div style="margin-top: 27px"></div>
      <div style="margin-top: 28px"></div>
      <div style="margin-top: 29px"></div>
      <div style="margin-top: 30px"></div>
      <div style="margin-top: 31px"></div>
      <div style="margin-top: 32px"></div>
      <div style="margin-top: 33px"></div>
      <div style="margin-top: 34px"></div>
      <div style="margin-top: 35px"></div>
      <div style="margin-top: 36px"></div>
      <div style="margin-top: 37px"></div>
      <div style="margin-top: 38px"></div>
      <div style="margin-top: 39px"></div>
    </div>

    <div class="reftest-no-paint"></div>

  </div>

</div>

<script>

var scrollbox = document.querySelector("#scrollbox");
scrollbox.scrollTop = 100;

window.addEventListener("MozReftestInvalidate", function (e) {
  scrollbox.scrollTop = 0;
  document.documentElement.removeAttribute("class");
});

</script>