| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 | 3 |
| 4 <head> | 4 <head> |
| 5 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | |
| 6 <style> | 5 <style> |
| 7 | 6 |
| 8 .compositedBehind { | 7 .compositedBehind { |
| 9 width: 500px; | 8 width: 500px; |
| 10 height: 500px; | 9 height: 500px; |
| 11 transform: translatez(0); | 10 transform: translatez(0); |
| 12 background-color: cyan; | 11 background-color: cyan; |
| 13 } | 12 } |
| 14 | 13 |
| 15 .containerOverlapsComposited { | 14 .containerOverlapsComposited { |
| 16 position: absolute; | 15 position: absolute; |
| 17 z-index: 2; /* Creates a stacking context so that the fixed-pos layer is conta
ined instead of a sibling */ | 16 z-index: 2; /* Creates a stacking context so that the fixed-pos layer is conta
ined instead of a sibling */ |
| 18 top: 20px; | 17 top: 20px; |
| 19 left: 20px; | 18 left: 20px; |
| 20 width: 100px; | 19 width: 100px; |
| 21 height: 30000px; | 20 height: 30000px; |
| 22 background-color: green; | 21 background-color: green; |
| 23 } | 22 } |
| 24 | 23 |
| 25 .fixed { | 24 .absolute { |
| 26 position: fixed; | 25 position: absolute; |
| 27 top: 45px; | 26 top: 145px; |
| 28 left: 45px; | 27 left: 45px; |
| 29 background-color: lime; | 28 background-color: lime; |
| 30 width: 50px; | 29 width: 50px; |
| 31 height: 50px; | 30 height: 50px; |
| 31 z-index: 3; |
| 32 } | 32 } |
| 33 | 33 |
| 34 </style> | 34 </style> |
| 35 | 35 |
| 36 <script> | 36 <script> |
| 37 if (window.internals) { | 37 if (window.internals) { |
| 38 /* Note carefully, compositing for fixed position is _disabled_ here
*/ | 38 /* Note carefully, compositing for fixed position is _disabled_ here
*/ |
| 39 internals.settings.setPreferCompositingToLCDTextEnabled(false); | 39 internals.settings.setPreferCompositingToLCDTextEnabled(false); |
| 40 } | 40 } |
| 41 | 41 |
| 42 function repaintTest() { | 42 onload = function() { |
| 43 window.scrollTo(0, 100); | 43 window.scrollTo(0, 100); |
| 44 } | 44 } |
| 45 </script> | 45 </script> |
| 46 | 46 |
| 47 </head> | 47 </head> |
| 48 | 48 |
| 49 | 49 |
| 50 | 50 |
| 51 <body onload="runRepaintTest()"> | 51 <body> |
| 52 <!-- | 52 <!-- |
| 53 Among other duplicate bugs: https://code.google.com/p/chromium/issues/det
ail?id=128375 | 53 Among other duplicate bugs: https://code.google.com/p/chromium/issues/det
ail?id=128375 |
| 54 A non-composited fixed-position element can get grouped into a composited
container. | 54 A non-composited fixed-position element can get grouped into a composited
container. |
| 55 In this case, repaint invalidations were incorrectly going to the LayoutV
iew instead | 55 In this case, repaint invalidations were incorrectly going to the LayoutV
iew instead |
| 56 of the composited container. The incorrect result was that the fixed-pos
ition element | 56 of the composited container. The incorrect result was that the fixed-pos
ition element |
| 57 never repainted, and it appeared to scroll along with the composited cont
ainer. | 57 never repainted, and it appeared to scroll along with the composited cont
ainer. |
| 58 --> | 58 --> |
| 59 <div class="compositedBehind"> </div> | 59 <div class="compositedBehind"> </div> |
| 60 | 60 |
| 61 <div class="containerOverlapsComposited"> | 61 <div class="containerOverlapsComposited"></div> |
| 62 <div class="fixed"></div> | 62 |
| 63 </div> | 63 <div class="absolute"></div> |
| 64 </body> | 64 </body> |
| 65 | 65 |
| 66 </html> | 66 </html> |
| OLD | NEW |