OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 #container { | 3 #container { |
4 height: 4000px; | 4 height: 4000px; |
5 background-color: red; | 5 background-color: red; |
6 } | 6 } |
7 .noScroll { | 7 .noScroll { |
8 overflow-y: hidden; | 8 overflow-y: hidden; |
9 } | 9 } |
10 #overlay { | 10 #overlay { |
11 bottom: 0; | 11 bottom: 0; |
12 left: 0; | 12 left: 0; |
13 position: fixed; | 13 position: fixed; |
| 14 opacity: 0.99; /* Using 99% opacity on fixed pos elements to ensure they are
not automatically promoted. */ |
14 right: 0; | 15 right: 0; |
15 top: 0; | 16 top: 0; |
16 background-color: green; | 17 background-color: green; |
17 } | 18 } |
18 .hidden { | 19 .hidden { |
19 display: none; | 20 display: none; |
20 } | 21 } |
21 input { | 22 input { |
22 position: fixed; | 23 position: fixed; |
| 24 opacity: 0.99; /* Using 99% opacity on fixed pos elements to ensure they are
not automatically promoted. */ |
23 z-index: 10; | 25 z-index: 10; |
24 bottom: 0; | 26 bottom: 0; |
25 } | 27 } |
26 </style> | 28 </style> |
27 <script src="../../../resources/run-after-layout-and-paint.js"></script> | 29 <script src="../../../resources/run-after-layout-and-paint.js"></script> |
28 <script src="text-based-repaint.js"></script> | 30 <script src="text-based-repaint.js"></script> |
29 <body> | 31 <body> |
30 <div id="container"> | 32 <div id="container"> |
31 <div id="overlay" class="hidden"></div> | 33 <div id="overlay" class="hidden"></div> |
32 </div> | 34 </div> |
33 </body> | 35 </body> |
34 <script> | 36 <script> |
35 function repaintTest() { | 37 function repaintTest() { |
36 var overlay = document.getElementById("overlay"); | 38 var overlay = document.getElementById("overlay"); |
37 overlay.classList.toggle('hidden'); | 39 overlay.classList.toggle('hidden'); |
38 document.body.classList.toggle('noScroll'); | 40 document.body.classList.toggle('noScroll'); |
39 } | 41 } |
40 | 42 |
41 if (window.testRunner) | 43 if (window.testRunner) |
42 window.testRunner.waitUntilDone(); | 44 window.testRunner.waitUntilDone(); |
43 | 45 |
44 window.scrollTo(0, 4000); | 46 window.scrollTo(0, 4000); |
45 runAfterLayoutAndPaint(runRepaintTest); | 47 runAfterLayoutAndPaint(runRepaintTest); |
46 </script> | 48 </script> |
OLD | NEW |