2 <html class=
"reftest-wait"
3 reftest-displayport-x=
"0" reftest-displayport-y=
"0"
4 reftest-displayport-w=
"800" reftest-displayport-h=
"1500">
6 <title>Test for bug
1546856: When the first painted item in a layer is removed, invalidation takes the wrong last paint offset because it hasn't initialized the last paint offset for that layer yet for this paint
</title>
9 background: linear-gradient(white, white)
0 0 /
100vw
100vh no-repeat fixed;
20 box-sizing: border-box;
21 margin-bottom: -
200px;
25 background-color: rgba(
255,
0,
0,
0.9);
32 #layerBoundsMaintainer {
34 border:
1px solid black;
40 <div id=
"layerBoundsMaintainer"></div>
44 const mainElement
= document
.querySelector('#main');
46 document
.scrollingElement
.scrollTop
= 0;
47 document
.addEventListener('MozReftestInvalidate', () => {
48 requestAnimationFrame(() => {
49 document
.scrollingElement
.scrollTop
= 200;
50 mainElement
.className
= 'fill';
51 requestAnimationFrame(() => {
52 mainElement
.className
= 'fill ownLayer';
53 requestAnimationFrame(() => {
54 mainElement
.className
= '';
55 document
.documentElement
.className
= '';