2 <html class=
"reftest-wait">
4 <meta name=
"viewport" content=
"width=device-width"/>
5 <title>The Grid in an overflowing div
</title>
6 <style type=
"text/css">
11 scrollbar-width: none
;
18 border-right: 1px solid black
;
19 border-bottom: 1px solid black
;
27 /* top border counts as part of height, but
28 left border doesn't count as part of width.
38 border-left: 1px solid black
;
39 border-top: 1px solid black
;
46 font-family: monospace
;
51 <div style=
"color: red">this text is above the scrolling div. the div below is
300x400
</div>
52 <div id=
"nest" style=
"overflow: scroll; scrollbar-width: none; height: 400px; width: 300px">
53 <table cellspacing=
"0" cellpadding=
"0" border=
"0">
54 <script type=
"text/javascript">
58 var cnt
= (PAGE_SIZE
/ GRID_SIZE
);
59 for (var y
= 0; y
< cnt
; y
++) {
60 document
.writeln( "<tr>" );
61 for (var x
= 0; x
< cnt
; x
++) {
62 var color
= ((x
+ y
) % 2) ? "blue" : "red";
63 document
.writeln( "<td style='background-color: " + color
+ "'></td>" );
65 document
.writeln( "</tr>" );
70 <div style=
"color: red">this text is below the scrolling div
</div>
72 if (location
.search
== "?ref") {
73 // In the reference case we use a CSS transform so that we don't use
74 // the async-zoom codepath (which is handled differently by WR).
75 document
.documentElement
.setAttribute("style", "transform: scale(1.1); transform-origin: top left");
76 document
.documentElement
.classList
.remove("reftest-wait");
78 // In the test case, we want to first paint the unscaled content, so that
79 // WR populates the picture cache. Then we apply an async zoom and paint
80 // again for the final snapshot. The bug in this case was that WR wasn't
81 // properly invalidating the picture cache tiles and so things would
82 // appear incorrectly.
83 window
.addEventListener("MozAfterPaint", () => {
84 document
.documentElement
.setAttribute("reftest-async-zoom", "1.1");
85 document
.documentElement
.classList
.remove("reftest-wait");