| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 | |
| 3 <style> | |
| 4 div>div{background:lime;width:100px;height:20px;border:1px solid green} | |
| 5 </style> | |
| 6 | |
| 7 <script src="../../resources/js-test.js"></script> | |
| 8 | |
| 9 <body style="width:700px;margin:0px"> | |
| 10 | |
| 11 <!-- Boxes inside the left-aligned LTR block should be left-aligned --> | |
| 12 <div> | |
| 13 <div dir="rtl" id="rtl_in_ltr"></div> | |
| 14 <div dir="ltr" id="ltr_in_ltr"></div> | |
| 15 </div> | |
| 16 | |
| 17 <!-- Boxes inside the right-aligned RTL block should be right-aligned --> | |
| 18 <div dir="rtl"> | |
| 19 <div dir="rtl" id="rtl_in_rtl"></div> | |
| 20 <div dir="ltr" id="ltr_in_rtl"></div> | |
| 21 </div> | |
| 22 | |
| 23 <!-- Boxes inside the right-aligned LTR block should be right-aligned --> | |
| 24 <div align="right"> | |
| 25 <div dir="rtl" id="rtl_in_ltr_r"></div> | |
| 26 <div dir="ltr" id="ltr_in_ltr_r"></div> | |
| 27 </div> | |
| 28 | |
| 29 <!-- Boxes inside the left-aligned RTL block should be left-aligned --> | |
| 30 <div dir="rtl" align="left"> | |
| 31 <div dir="rtl" id="rtl_in_rtl_l"></div> | |
| 32 <div dir="ltr" id="ltr_in_rtl_l"></div> | |
| 33 </div> | |
| 34 | |
| 35 <script> | |
| 36 rtl_in_ltr = document.getElementById("rtl_in_ltr"); | |
| 37 ltr_in_ltr = document.getElementById("ltr_in_ltr"); | |
| 38 shouldBe("rtl_in_ltr.getBoundingClientRect().left","0"); | |
| 39 shouldBe("ltr_in_ltr.getBoundingClientRect().left","0"); | |
| 40 | |
| 41 rtl_in_rtl = document.getElementById("rtl_in_rtl"); | |
| 42 ltr_in_rtl = document.getElementById("ltr_in_rtl"); | |
| 43 shouldBe("rtl_in_rtl.getBoundingClientRect().right","700"); | |
| 44 shouldBe("ltr_in_rtl.getBoundingClientRect().right","700"); | |
| 45 | |
| 46 rtl_in_ltr_r = document.getElementById("rtl_in_ltr_r"); | |
| 47 ltr_in_ltr_r = document.getElementById("ltr_in_ltr_r"); | |
| 48 shouldBe("rtl_in_ltr_r.getBoundingClientRect().right","700"); | |
| 49 shouldBe("ltr_in_ltr_r.getBoundingClientRect().right","700"); | |
| 50 | |
| 51 rtl_in_rtl_l = document.getElementById("rtl_in_rtl_l"); | |
| 52 ltr_in_rtl_l = document.getElementById("ltr_in_rtl_l"); | |
| 53 shouldBe("rtl_in_rtl_l.getBoundingClientRect().left","0"); | |
| 54 shouldBe("ltr_in_rtl_l.getBoundingClientRect().left","0"); | |
| 55 </script> | |
| 56 | |
| 57 </body> | |
| OLD | NEW |