Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 | |
| 3 <html> | |
| 4 <head> | |
| 5 <style> | |
| 6 #overflow { | |
| 7 width: 600px; | |
| 8 height: 600px; | |
| 9 overflow: hidden; /* Still scrollable with JS */ | |
| 10 border: 1px solid black; | |
| 11 } | |
| 12 | |
| 13 .group { | |
| 14 position: relative; | |
| 15 width: 500px; | |
| 16 height: 200px; | |
| 17 } | |
| 18 | |
| 19 .container { | |
| 20 width: 400px; | |
| 21 height: 180px; | |
| 22 outline: 2px solid black; | |
| 23 direction: rtl; | |
| 24 } | |
| 25 | |
| 26 .box { | |
| 27 width: 200px; | |
| 28 height: 180px; | |
| 29 } | |
| 30 | |
| 31 .sticky { | |
| 32 position: absolute; | |
| 33 background-color: green; | |
| 34 } | |
| 35 | |
| 36 .indicator { | |
| 37 position: absolute; | |
| 38 top: 0; | |
| 39 left: 0; | |
| 40 background-color: red; | |
| 41 } | |
| 42 </style> | |
| 43 <script> | |
| 44 function doTest() | |
| 45 { | |
| 46 document.getElementById('overflow').scrollLeft = 100; | |
| 47 } | |
| 48 window.addEventListener('load', doTest, false); | |
| 49 </script> | |
| 50 </head> | |
| 51 <body> | |
| 52 This test checks that left offset is ignored with overconstrained sticky positio ning and rtl text direction. | |
| 53 There should be no red. | |
| 54 <div id="overflow"> | |
|
Julien - ping for review
2014/05/22 15:49:02
This overflows the viewport (set to 800x600 in DRT
ostap
2014/05/22 23:13:11
Done.
| |
| 55 <div class="group" style="left: 400px"> | |
| 56 <div class="indicator box" style="left: 0;"></div> | |
| 57 <div class="container"> | |
| 58 <div class="sticky box" style="left: 0"></div> | |
| 59 </div> | |
| 60 </div> | |
| 61 | |
| 62 <div class="group" style="left: 300px"> | |
| 63 <div class="indicator box" style="left: 100px;"></div> | |
| 64 <div class="container"> | |
| 65 <div class="sticky box" style="left: 100px"></div> | |
| 66 </div> | |
| 67 </div> | |
| 68 | |
| 69 <div class="group" style="left: 200px"> | |
| 70 <div class="indicator box" style="left: 200px;"></div> | |
| 71 <div class="container"> | |
| 72 <div class="sticky box" style="left: 200px"></div> | |
| 73 </div> | |
| 74 </div> | |
| 75 </div> | |
| 76 </body> | |
| 77 </html> | |
| OLD | NEW |