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