OLD | NEW |
| (Empty) |
1 <!-- Based on fast/repaint/fixed-descendant-of-transformed-scrolled.html --> | |
2 <!DOCTYPE html> | |
3 <script src="resources/paint-invalidation-test.js"></script> | |
4 <script> | |
5 function paintInvalidationTest() { | |
6 document.getElementById('fixed').style.backgroundColor = 'green'; | |
7 } | |
8 onload = function() { | |
9 document.getElementById('transformed').scrollTop = 50; | |
10 runPaintInvalidationTest(); | |
11 } | |
12 </script> | |
13 <style> | |
14 #transformed { | |
15 position: absolute; | |
16 top: 50px; | |
17 left: 100px; | |
18 transform: translateX(0); | |
19 overflow: scroll; | |
20 width: 300px; | |
21 height: 300px; | |
22 } | |
23 #fixed { | |
24 position: fixed; | |
25 top: 150px; | |
26 left: 100px; | |
27 width: 100px; | |
28 height: 100px; | |
29 background-color: red; | |
30 } | |
31 #relative { | |
32 position: relative; | |
33 top: 50px; | |
34 left: 50px; | |
35 } | |
36 /* to make the transformed container scrollable */ | |
37 #content { | |
38 width: 1000px; | |
39 height: 1000px; | |
40 } | |
41 </style> | |
42 Tests invalidation of a fixed-position descendant of a transformed scrolled elem
ent. | |
43 Passes if there is a green box at the center of the scrollable area. | |
44 <div id="transformed"> | |
45 <div id="relative"> | |
46 <div id="fixed"></div> | |
47 <div id="content"></div> | |
48 </div> | |
49 </div> | |
OLD | NEW |