OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="resources/text-based-repaint.js"></script> | |
5 <style> | |
6 | |
7 #scroller { | |
8 position: absolute; | |
9 left: 10px; | |
10 top: 60px; | |
11 width: 700px; | |
12 height: 400px; | |
13 overflow: scroll; | |
14 will-change: transform; | |
15 } | |
16 #block { | |
17 background-color: #cef; | |
18 position: absolute; | |
19 left: 300px; | |
20 top: 200px; | |
21 width: 120px; | |
22 height: 50px; | |
23 text-align: center; | |
24 } | |
25 | |
26 </style> | |
27 </head> | |
28 <body onload="runRepaintAndPixelTest()"> | |
29 | |
30 This tests that a scroll updates an element's previous paint invalidation rect | |
31 even if the element's position relative to the parent blink::Layer is unchanged. | |
32 | |
33 <div id="scroller" class="scroller"> | |
34 <div style="height: 600px"></div> | |
35 <div style="position: absolute; top: 0"> | |
36 <div id="block"></div> | |
37 </div> | |
38 </div> | |
39 <script> | |
40 | |
41 function repaintTest() | |
42 { | |
43 document.querySelector("#scroller").scrollTop = 100; | |
44 document.querySelector("#block").style.left = '50px'; | |
45 } | |
46 | |
47 </script> | |
48 </body> | |
49 </html> | |
OLD | NEW |