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 height: 400px; | |
12 overflow: scroll; | |
13 width: 300px; | |
14 will-change: transform; | |
15 } | |
16 #block { | |
17 background-color: #cef; | |
18 height: 50px; | |
19 left: 50px; | |
20 position: absolute; | |
21 top: 200px; | |
22 width: 200px; | |
23 } | |
24 | |
25 </style> | |
26 </head> | |
27 <body onload="runRepaintAndPixelTest()"> | |
28 | |
29 This tests that an element which is moved by the synchronous layout in | |
30 Element::setScrollTop, and again by the scroll itself, has its original | |
31 location correctly invalidated. | |
32 | |
33 <div id="scroller"> | |
34 <div style="height: 900px"></div> | |
35 <div id="block"></div> | |
36 </div> | |
37 <script> | |
38 | |
39 function repaintTest() | |
40 { | |
41 document.querySelector("#block").style.top = '310px'; | |
42 document.querySelector("#scroller").scrollTop = 150; | |
43 } | |
44 | |
45 </script> | |
46 </body> | |
47 </html> | |
OLD | NEW |