Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 | |
| 3 <style> | |
| 4 div>div{background:lime;width:100px;height:20px} | |
| 5 div>table{width:50px;height:20px} | |
| 6 </style> | |
| 7 | |
| 8 <script src="../../resources/js-test.js"></script> | |
| 9 | |
| 10 <body style="width:700px;margin:0px"> | |
| 11 | |
| 12 <!-- Boxes inside the left-aligned LTR block should be left-aligned --> | |
| 13 <div align="left"> | |
| 14 <table dir="rtl" border="1" id="rtl_table_in_ltr"><tr><td></td><td></td></tr>< /table> | |
| 15 <div dir="rtl" id="rtl_div_in_ltr"></div> | |
| 16 <table dir="ltr" border="1" id="ltr_table_in_ltr"><tr><td></td><td></td></tr>< /table> | |
| 17 <div dir="ltr" id="ltr_div_in_ltr"></div> | |
| 18 </div> | |
| 19 | |
| 20 <!-- Boxes inside the right-aligned RTL block should be right-aligned --> | |
| 21 <div dir="rtl" align="right"> | |
| 22 <table dir="rtl" border="1" id="rtl_table_in_rtl"><tr><td></td><td></td></tr>< /table> | |
| 23 <div dir="rtl" id="rtl_div_in_rtl"></div> | |
| 24 <table dir="ltr" border="1" id="ltr_table_in_rtl"><tr><td></td><td></td></tr>< /table> | |
| 25 <div dir="ltr" id="ltr_div_in_rtl"></div> | |
| 26 </div> | |
| 27 | |
| 28 <!-- Boxes inside the right-aligned LTR block should be right-aligned --> | |
|
mstensho (USE GERRIT)
2014/12/09 09:54:41
This file is getting big. I suggest splitting it.
Kyungtae Kim
2014/12/09 11:36:32
I split the auto margin cases to new file.
| |
| 29 <div align="right"> | |
| 30 <table dir="rtl" border="1" id="rtl_table_in_ltr_r"><tr><td></td><td></td></tr ></table> | |
| 31 <div dir="rtl" id="rtl_div_in_ltr_r"></div> | |
| 32 <table dir="ltr" border="1" id="ltr_table_in_ltr_r"><tr><td></td><td></td></tr ></table> | |
| 33 <div dir="ltr" id="ltr_div_in_ltr_r"></div> | |
| 34 </div> | |
| 35 | |
| 36 <!-- Boxes inside the left-aligned RTL block should be left-aligned --> | |
| 37 <div dir="rtl" align="left"> | |
| 38 <table dir="rtl" border="1" id="rtl_table_in_rtl_l"><tr><td></td><td></td></tr ></table> | |
| 39 <div dir="rtl" id="rtl_div_in_rtl_l"></div> | |
| 40 <table dir="ltr" border="1" id="ltr_table_in_rtl_l"><tr><td></td><td></td></tr ></table> | |
| 41 <div dir="ltr" id="ltr_div_in_rtl_l"></div> | |
| 42 </div> | |
| 43 | |
| 44 <!-- Boxes with margin-left:auto inside the left-aligned LTR block should be rig ht-aligned --> | |
| 45 <div dir="ltr" align="left"> | |
| 46 <table dir="rtl" border="1" id="rtl_ml_table_in_ltr" style="margin-left:auto"> <tr><td></td><td></td></tr></table> | |
| 47 <div dir="rtl" id="rtl_ml_div_in_ltr" style="margin-left:auto"></div> | |
| 48 <table dir="ltr" border="1" id="ltr_ml_table_in_ltr" style="margin-left:auto"> <tr><td></td><td></td></tr></table> | |
| 49 <div dir="ltr" id="ltr_ml_div_in_ltr" style="margin-left:auto"></div> | |
| 50 </div> | |
| 51 | |
| 52 <!-- Boxes with margin-right:auto inside the left-aligned LTR block should be le ft-aligned --> | |
| 53 <div dir="ltr" align="left"> | |
| 54 <table dir="rtl" border="1" id="rtl_mr_table_in_ltr" style="margin-right:auto" ><tr><td></td><td></td></tr></table> | |
| 55 <div dir="rtl" id="rtl_mr_div_in_ltr" style="margin-right:auto"></div> | |
| 56 <table dir="ltr" border="1" id="ltr_mr_table_in_ltr" style="margin-right:auto" ><tr><td></td><td></td></tr></table> | |
| 57 <div dir="ltr" id="ltr_mr_div_in_ltr" style="margin-right:auto"></div> | |
| 58 </div> | |
| 59 | |
| 60 <!-- Boxes with margin-left:auto inside the right-aligned RTL block should be ri ght-aligned --> | |
| 61 <div dir="rtl" align="right"> | |
| 62 <table dir="rtl" border="1" id="rtl_ml_table_in_rtl" style="margin-left:auto"> <tr><td></td><td></td></tr></table> | |
| 63 <div dir="rtl" id="rtl_ml_div_in_rtl" style="margin-left:auto"></div> | |
| 64 <table dir="ltr" border="1" id="ltr_ml_table_in_rtl" style="margin-left:auto"> <tr><td></td><td></td></tr></table> | |
| 65 <div dir="ltr" id="ltr_ml_div_in_rtl" style="margin-left:auto"></div> | |
| 66 </div> | |
| 67 | |
| 68 <!-- Boxes with margin-right:auto inside the right-aligned RTL block should be l eft-aligned --> | |
| 69 <div dir="rtl" align="right"> | |
| 70 <table dir="rtl" border="1" id="rtl_mr_table_in_rtl" style="margin-right:auto" ><tr><td></td><td></td></tr></table> | |
| 71 <div dir="rtl" id="rtl_mr_div_in_rtl" style="margin-right:auto"></div> | |
| 72 <table dir="ltr" border="1" id="ltr_mr_table_in_rtl" style="margin-right:auto" ><tr><td></td><td></td></tr></table> | |
| 73 <div dir="ltr" id="ltr_mr_div_in_rtl" style="margin-right:auto"></div> | |
| 74 </div> | |
| 75 | |
| 76 | |
| 77 <!-- Boxes with margin-left:auto inside the right-aligned LTR block should be ri ght-aligned --> | |
| 78 <div dir="ltr" align="left"> | |
| 79 <table dir="rtl" border="1" id="rtl_ml_table_in_ltr_r" style="margin-right:aut o"><tr><td></td><td></td></tr></table> | |
| 80 <div dir="rtl" id="rtl_ml_div_in_ltr_r" style="margin-right:auto"></div> | |
| 81 <table dir="ltr" border="1" id="ltr_ml_table_in_ltr_r" style="margin-right:aut o"><tr><td></td><td></td></tr></table> | |
| 82 <div dir="ltr" id="ltr_ml_div_in_ltr_r" style="margin-right:auto"></div> | |
| 83 </div> | |
| 84 | |
| 85 <!-- Boxes with margin-right:auto inside the right-aligned LTR block should be r ight-aligned --> | |
| 86 <div dir="ltr" align="left"> | |
| 87 <table dir="rtl" border="1" id="rtl_mr_table_in_ltr_r" style="margin-right:aut o"><tr><td></td><td></td></tr></table> | |
| 88 <div dir="rtl" id="rtl_mr_div_in_ltr_r" style="margin-right:auto"></div> | |
| 89 <table dir="ltr" border="1" id="ltr_mr_table_in_ltr_r" style="margin-right:aut o"><tr><td></td><td></td></tr></table> | |
| 90 <div dir="ltr" id="ltr_mr_div_in_ltr_r" style="margin-right:auto"></div> | |
| 91 </div> | |
| 92 | |
| 93 <!-- Boxes with margin-left:auto inside the left-aligned RTL block should be rig ht-aligned --> | |
| 94 <div dir="rtl" align="right"> | |
| 95 <table dir="rtl" border="1" id="rtl_ml_table_in_rtl_l" style="margin-left:auto "><tr><td></td><td></td></tr></table> | |
| 96 <div dir="rtl" id="rtl_ml_div_in_rtl_l" style="margin-left:auto"></div> | |
| 97 <table dir="ltr" border="1" id="ltr_ml_table_in_rtl_l" style="margin-left:auto "><tr><td></td><td></td></tr></table> | |
| 98 <div dir="ltr" id="ltr_ml_div_in_rtl_l" style="margin-left:auto"></div> | |
| 99 </div> | |
| 100 | |
| 101 | |
| 102 <!-- Boxes with margin-right:auto inside the left-aligned RTL block should be le ft-aligned --> | |
| 103 <div dir="rtl" align="right"> | |
| 104 <table dir="rtl" border="1" id="rtl_mr_table_in_rtl_l" style="margin-right:aut o"><tr><td></td><td></td></tr></table> | |
| 105 <div dir="rtl" id="rtl_mr_div_in_rtl_l" style="margin-right:auto"></div> | |
| 106 <table dir="ltr" border="1" id="ltr_mr_table_in_rtl_l" style="margin-right:aut o"><tr><td></td><td></td></tr></table> | |
| 107 <div dir="ltr" id="ltr_mr_div_in_rtl_l" style="margin-right:auto"></div> | |
| 108 </div> | |
| 109 | |
| 110 <script> | |
| 111 rtl_table_in_ltr = document.getElementById("rtl_table_in_ltr"); | |
| 112 rtl_div_in_ltr = document.getElementById("rtl_div_in_ltr"); | |
| 113 ltr_table_in_ltr = document.getElementById("ltr_table_in_ltr"); | |
| 114 ltr_div_in_ltr = document.getElementById("ltr_div_in_ltr"); | |
| 115 shouldBe("rtl_table_in_ltr.getBoundingClientRect().left","0"); | |
| 116 shouldBe("rtl_div_in_ltr.getBoundingClientRect().left","0"); | |
| 117 shouldBe("ltr_table_in_ltr.getBoundingClientRect().left","0"); | |
| 118 shouldBe("ltr_div_in_ltr.getBoundingClientRect().left","0"); | |
| 119 | |
| 120 rtl_table_in_rtl = document.getElementById("rtl_table_in_rtl"); | |
| 121 rtl_div_in_rtl = document.getElementById("rtl_div_in_rtl"); | |
| 122 ltr_table_in_rtl = document.getElementById("ltr_table_in_rtl"); | |
| 123 ltr_div_in_rtl = document.getElementById("ltr_div_in_rtl"); | |
| 124 shouldBe("rtl_table_in_rtl.getBoundingClientRect().right","700"); | |
| 125 shouldBe("rtl_div_in_rtl.getBoundingClientRect().right","700"); | |
| 126 shouldBe("ltr_table_in_rtl.getBoundingClientRect().right","700"); | |
| 127 shouldBe("ltr_div_in_rtl.getBoundingClientRect().right","700"); | |
| 128 | |
| 129 | |
| 130 rtl_table_in_ltr_r = document.getElementById("rtl_table_in_ltr_r"); | |
| 131 rtl_div_in_ltr_r = document.getElementById("rtl_div_in_ltr_r"); | |
| 132 ltr_table_in_ltr_r = document.getElementById("ltr_table_in_ltr_r"); | |
| 133 ltr_div_in_ltr_r = document.getElementById("ltr_div_in_ltr_r"); | |
| 134 shouldBe("rtl_table_in_ltr_r.getBoundingClientRect().right","700"); | |
| 135 shouldBe("rtl_div_in_ltr_r.getBoundingClientRect().right","700"); | |
| 136 shouldBe("ltr_table_in_ltr_r.getBoundingClientRect().right","700"); | |
| 137 shouldBe("ltr_div_in_ltr_r.getBoundingClientRect().right","700"); | |
| 138 | |
| 139 rtl_table_in_rtl_l = document.getElementById("rtl_table_in_rtl_l"); | |
| 140 rtl_div_in_rtl_l = document.getElementById("rtl_div_in_rtl_l"); | |
| 141 ltr_table_in_rtl_l = document.getElementById("ltr_table_in_rtl_l"); | |
| 142 ltr_div_in_rtl_l = document.getElementById("ltr_div_in_rtl_l"); | |
| 143 shouldBe("rtl_table_in_rtl_l.getBoundingClientRect().left","0"); | |
| 144 shouldBe("rtl_div_in_rtl_l.getBoundingClientRect().left","0"); | |
| 145 shouldBe("ltr_table_in_rtl_l.getBoundingClientRect().left","0"); | |
| 146 shouldBe("ltr_div_in_rtl_l.getBoundingClientRect().left","0"); | |
| 147 | |
| 148 rtl_ml_table_in_ltr = document.getElementById("rtl_ml_table_in_ltr"); | |
| 149 rtl_ml_div_in_ltr = document.getElementById("rtl_ml_div_in_ltr"); | |
| 150 ltr_ml_table_in_ltr = document.getElementById("ltr_ml_table_in_ltr"); | |
| 151 ltr_ml_div_in_ltr = document.getElementById("ltr_ml_div_in_ltr"); | |
| 152 shouldBe("rtl_ml_table_in_ltr.getBoundingClientRect().right","700"); | |
| 153 shouldBe("rtl_ml_div_in_ltr.getBoundingClientRect().right","700"); | |
| 154 shouldBe("ltr_ml_table_in_ltr.getBoundingClientRect().right","700"); | |
| 155 shouldBe("ltr_ml_div_in_ltr.getBoundingClientRect().right","700"); | |
| 156 | |
| 157 rtl_mr_table_in_ltr = document.getElementById("rtl_mr_table_in_ltr"); | |
| 158 rtl_mr_div_in_ltr = document.getElementById("rtl_mr_div_in_ltr"); | |
| 159 ltr_mr_table_in_ltr = document.getElementById("ltr_mr_table_in_ltr"); | |
| 160 ltr_mr_div_in_ltr = document.getElementById("ltr_mr_div_in_ltr"); | |
| 161 shouldBe("rtl_mr_table_in_ltr.getBoundingClientRect().left","0"); | |
| 162 shouldBe("rtl_mr_div_in_ltr.getBoundingClientRect().left","0"); | |
| 163 shouldBe("ltr_mr_table_in_ltr.getBoundingClientRect().left","0"); | |
| 164 shouldBe("ltr_mr_div_in_ltr.getBoundingClientRect().left","0"); | |
| 165 | |
| 166 rtl_ml_table_in_rtl = document.getElementById("rtl_ml_table_in_rtl"); | |
| 167 rtl_ml_div_in_rtl = document.getElementById("rtl_ml_div_in_rtl"); | |
| 168 ltr_ml_table_in_rtl = document.getElementById("ltr_ml_table_in_rtl"); | |
| 169 ltr_ml_div_in_rtl = document.getElementById("ltr_ml_div_in_rtl"); | |
| 170 shouldBe("rtl_ml_table_in_rtl.getBoundingClientRect().right","700"); | |
| 171 shouldBe("rtl_ml_div_in_rtl.getBoundingClientRect().right","700"); | |
| 172 shouldBe("ltr_ml_table_in_rtl.getBoundingClientRect().right","700"); | |
| 173 shouldBe("ltr_ml_div_in_rtl.getBoundingClientRect().right","700"); | |
| 174 | |
| 175 rtl_mr_table_in_rtl = document.getElementById("rtl_mr_table_in_rtl"); | |
| 176 rtl_mr_div_in_rtl = document.getElementById("rtl_mr_div_in_rtl"); | |
| 177 ltr_mr_table_in_rtl = document.getElementById("ltr_mr_table_in_rtl"); | |
| 178 ltr_mr_div_in_rtl = document.getElementById("ltr_mr_div_in_rtl"); | |
| 179 shouldBe("rtl_mr_table_in_rtl.getBoundingClientRect().left","0"); | |
| 180 shouldBe("rtl_mr_div_in_rtl.getBoundingClientRect().left","0"); | |
| 181 shouldBe("ltr_mr_table_in_rtl.getBoundingClientRect().left","0"); | |
| 182 shouldBe("ltr_mr_div_in_rtl.getBoundingClientRect().left","0"); | |
| 183 | |
| 184 | |
| 185 rtl_ml_table_in_ltr_r = document.getElementById("rtl_ml_table_in_ltr_r"); | |
| 186 rtl_ml_div_in_ltr_r = document.getElementById("rtl_ml_div_in_ltr_r"); | |
| 187 ltr_ml_table_in_ltr_r = document.getElementById("ltr_ml_table_in_ltr_r"); | |
| 188 ltr_ml_div_in_ltr_r = document.getElementById("ltr_ml_div_in_ltr_r"); | |
| 189 shouldBe("rtl_ml_table_in_ltr_r.getBoundingClientRect().left","0"); | |
| 190 shouldBe("rtl_ml_div_in_ltr_r.getBoundingClientRect().left","0"); | |
| 191 shouldBe("ltr_ml_table_in_ltr_r.getBoundingClientRect().left","0"); | |
| 192 shouldBe("ltr_ml_div_in_ltr_r.getBoundingClientRect().left","0"); | |
| 193 | |
| 194 rtl_mr_table_in_ltr_r = document.getElementById("rtl_mr_table_in_ltr_r"); | |
| 195 rtl_mr_div_in_ltr_r = document.getElementById("rtl_mr_div_in_ltr_r"); | |
| 196 ltr_mr_table_in_ltr_r = document.getElementById("ltr_mr_table_in_ltr_r"); | |
| 197 ltr_mr_div_in_ltr_r = document.getElementById("ltr_mr_div_in_ltr_r"); | |
| 198 shouldBe("rtl_mr_table_in_ltr_r.getBoundingClientRect().left","0"); | |
| 199 shouldBe("rtl_mr_div_in_ltr_r.getBoundingClientRect().left","0"); | |
| 200 shouldBe("ltr_mr_table_in_ltr_r.getBoundingClientRect().left","0"); | |
| 201 shouldBe("ltr_mr_div_in_ltr_r.getBoundingClientRect().left","0"); | |
| 202 | |
| 203 rtl_ml_table_in_rtl_l = document.getElementById("rtl_ml_table_in_rtl_l"); | |
| 204 rtl_ml_div_in_rtl_l = document.getElementById("rtl_ml_div_in_rtl_l"); | |
| 205 ltr_ml_table_in_rtl_l = document.getElementById("ltr_ml_table_in_rtl_l"); | |
| 206 ltr_ml_div_in_rtl_l = document.getElementById("ltr_ml_div_in_rtl_l"); | |
| 207 shouldBe("rtl_ml_table_in_rtl_l.getBoundingClientRect().right","700"); | |
| 208 shouldBe("rtl_ml_div_in_rtl_l.getBoundingClientRect().right","700"); | |
| 209 shouldBe("ltr_ml_table_in_rtl_l.getBoundingClientRect().right","700"); | |
| 210 shouldBe("ltr_ml_div_in_rtl_l.getBoundingClientRect().right","700"); | |
| 211 | |
| 212 rtl_mr_table_in_rtl_l = document.getElementById("rtl_mr_table_in_rtl_l"); | |
| 213 rtl_mr_div_in_rtl_l = document.getElementById("rtl_mr_div_in_rtl_l"); | |
| 214 ltr_mr_table_in_rtl_l = document.getElementById("ltr_mr_table_in_rtl_l"); | |
| 215 ltr_mr_div_in_rtl_l = document.getElementById("ltr_mr_div_in_rtl_l"); | |
| 216 shouldBe("rtl_mr_table_in_rtl_l.getBoundingClientRect().left","0"); | |
| 217 shouldBe("rtl_mr_div_in_rtl_l.getBoundingClientRect().left","0"); | |
| 218 shouldBe("ltr_mr_table_in_rtl_l.getBoundingClientRect().left","0"); | |
| 219 shouldBe("ltr_mr_div_in_rtl_l.getBoundingClientRect().left","0"); | |
| 220 </script> | |
| 221 | |
| 222 </body> | |
| OLD | NEW |