scrollable-overflow-vertical-rl-dynamic.html (814B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://drafts.csswg.org/css-overflow/#scrollbar-layout"> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 6 <div id="container" style="width:600px; height:400px; writing-mode:vertical-rl; overflow:auto;"> 7 <div id="target" style="width:1000px; height:500px; background:lime;"></div> 8 </div> 9 10 <script> 11 promise_test(async () => { 12 await new Promise(resolve => requestAnimationFrame(resolve)); 13 await new Promise(resolve => requestAnimationFrame(resolve)); 14 // Remove the vertical scrollbar. 15 document.querySelector('#target').style.height = '200px'; 16 assert_equals(document.querySelector('#container').scrollLeft, 0); 17 }, 'Removing the vertical scrollbar of a vertical-rl container should keep scrollLeft'); 18 </script>