no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / layout / reftests / bugs / 1546856-1.html
blob1a503498994465bbc37a5f347fbee9c7f2684970
1 <!DOCTYPE html>
2 <html class="reftest-wait"
3 reftest-displayport-x="0" reftest-displayport-y="0"
4 reftest-displayport-w="800" reftest-displayport-h="1500">
5 <meta charset="utf-8">
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>
7 <style>
8 html {
9 background: linear-gradient(white, white) 0 0 / 100vw 100vh no-repeat fixed;
12 body {
13 height: 4000px;
14 padding: 200px 0;
17 div {
18 width: 600px;
19 height: 200px;
20 box-sizing: border-box;
21 margin-bottom: -200px;
24 #main.fill {
25 background-color: rgba(255, 0, 0, 0.9);
28 #main.ownLayer {
29 will-change: opacity;
32 #layerBoundsMaintainer {
33 position: relative;
34 border: 1px solid black;
37 </style>
39 <div id="main"></div>
40 <div id="layerBoundsMaintainer"></div>
42 <script>
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 = '';
56 });
57 });
58 });
59 });
61 </script>