OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 /* Avoid padding on the sides that have a scrollbar, since our current |
| 4 behavior is inconsistent. */ |
| 5 .scrollable { overflow:scroll; width:2px; height:2px; border:solid; border-w
idth:1px 2px 2px 1px; padding:1px 2px 0; } |
| 6 .ltr { direction:ltr; padding-right:0; } |
| 7 .rtl { direction:rtl; padding-left:0; } |
| 8 .scrollable > div { width:500px; height:600px; } |
| 9 .scrollable > div.inline-block { display:inline-block; vertical-align:top; } |
| 10 </style> |
| 11 <div class="scrollable ltr" id="ltrWithBlockLevel"> |
| 12 <div></div> |
| 13 </div> |
| 14 <div class="scrollable rtl" id="rtlWithBlockLevel"> |
| 15 <div></div> |
| 16 </div> |
| 17 <div class="scrollable ltr" id="ltrWithInlineLevel"> |
| 18 <div class="inline-block"></div> |
| 19 </div> |
| 20 <div class="scrollable rtl" id="rtlWithInlineLevel"> |
| 21 <div class="inline-block"></div> |
| 22 </div> |
| 23 <script src="../../resources/testharness.js"></script> |
| 24 <script src="../../resources/testharnessreport.js"></script> |
| 25 <script> |
| 26 test(function() { |
| 27 var elm = document.getElementById("ltrWithBlockLevel"); |
| 28 assert_equals(elm.scrollWidth, 502); |
| 29 assert_equals(elm.scrollHeight, 601); |
| 30 }, "LTR scrollable with block-level child"); |
| 31 test(function() { |
| 32 var elm = document.getElementById("rtlWithBlockLevel"); |
| 33 assert_equals(elm.scrollWidth, 502); |
| 34 assert_equals(elm.scrollHeight, 601); |
| 35 }, "RTL scrollable with block-level child"); |
| 36 test(function() { |
| 37 var elm = document.getElementById("ltrWithInlineLevel"); |
| 38 assert_equals(elm.scrollWidth, 502); |
| 39 assert_equals(elm.scrollHeight, 601); |
| 40 }, "LTR scrollable with inline-level child"); |
| 41 test(function() { |
| 42 var elm = document.getElementById("rtlWithInlineLevel"); |
| 43 assert_equals(elm.scrollWidth, 502); |
| 44 assert_equals(elm.scrollHeight, 601); |
| 45 }, "RTL scrollable with inline-level child"); |
| 46 </script> |
OLD | NEW |