OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 | 3 |
4 <head> | 4 <head> |
5 <style> | 5 <style> |
6 | 6 |
7 #parent { | 7 #parent { |
8 position: absolute; | 8 position: absolute; |
9 z-index: 1; | 9 z-index: 1; |
10 top: 50px; | 10 top: 50px; |
11 left: 50px; | 11 left: 50px; |
12 width: 100px; | 12 width: 100px; |
13 height: 100px; | 13 height: 100px; |
14 overflow: auto; | 14 overflow: auto; |
15 background-color: lime; | 15 background-color: lime; |
16 } | 16 } |
17 | 17 |
18 <!-- hover to see how the test works/breaks when testing interactively --> | 18 <!-- hover to see how the test works/breaks when testing interactively --> |
19 #parent:hover { | 19 #parent:hover { |
20 top: 40px; | 20 top: 40px; |
21 } | 21 } |
22 | 22 |
23 #child { | 23 #child { |
24 background-color: cyan; | 24 background-color: cyan; |
25 width: 50px; | 25 width: 50px; |
26 height: 50px; | 26 height: 50px; |
27 -webkit-transform: translateZ(0); | 27 transform: translateZ(0); |
28 } | 28 } |
29 </style> | 29 </style> |
30 | 30 |
31 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 31 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
32 <script> | 32 <script> |
33 function repaintTest() { | 33 function repaintTest() { |
34 document.getElementById('parent').style.top = "10px"; | 34 document.getElementById('parent').style.top = "10px"; |
35 } | 35 } |
36 | 36 |
37 runRepaintTest(); | 37 runRepaintTest(); |
38 </script> | 38 </script> |
39 </head> | 39 </head> |
40 | 40 |
41 <body> | 41 <body> |
42 <!-- | 42 <!-- |
43 https://code.google.com/p/chromium/issues/detail?id=256200 | 43 https://code.google.com/p/chromium/issues/detail?id=256200 |
44 The parent element is set up uniquely such that it is composited, but it | 44 The parent element is set up uniquely such that it is composited, but it |
45 still paints into its composited ancestor. When it works correctly, the | 45 still paints into its composited ancestor. When it works correctly, the |
46 parent element should repaint correctly when its position is changed. | 46 parent element should repaint correctly when its position is changed. |
47 --> | 47 --> |
48 <div id="parent"> | 48 <div id="parent"> |
49 <div id="child"></div> | 49 <div id="child"></div> |
50 </div> | 50 </div> |
51 </body> | 51 </body> |
52 | 52 |
53 </html> | 53 </html> |
OLD | NEW |