Chromium Code Reviews| Index: LayoutTests/fast/block/align-bigger-child.html |
| diff --git a/LayoutTests/fast/block/align-bigger-child.html b/LayoutTests/fast/block/align-bigger-child.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3bfef2f760c8d0e6ae24db2f725766725687d66e |
| --- /dev/null |
| +++ b/LayoutTests/fast/block/align-bigger-child.html |
| @@ -0,0 +1,76 @@ |
| +<!DOCTYPE html> |
| + |
| +<style> |
| +body{margin:0px} |
| +.narrow_block{width:100px} |
| +.narrow_block>div{background:lime;width:200px;height:20px;border:1px solid black} |
| +</style> |
| + |
| +<script src="../../resources/js-test.js"></script> |
| + |
| +<body> |
|
mstensho (USE GERRIT)
2014/12/10 23:27:00
No need for the BODY tag, then.
Kyungtae Kim
2014/12/11 03:32:46
Done.
|
| +<!-- Wider blocks inside the LTR block should be left-aligned regardless of align attribute --> |
| +<div class="narrow_block"> |
|
mstensho (USE GERRIT)
2014/12/10 23:27:00
How about an align="left" here?
Kyungtae Kim
2014/12/11 03:32:46
Done.
|
| + <div dir="rtl" id="rtl_in_ltr_left"></div> |
| + <div dir="ltr" id="ltr_in_ltr_left"></div> |
| +</div> |
| + |
| +<div align="right" class="narrow_block"> |
| + <div dir="rtl" id="rtl_in_ltr_right"></div> |
| + <div dir="ltr" id="ltr_in_ltr_right"></div> |
| +</div> |
| + |
| +<div align="center" class="narrow_block"> |
| + <div dir="rtl" id="rtl_in_ltr_center"></div> |
| + <div dir="ltr" id="ltr_in_ltr_center"></div> |
| +</div> |
| + |
| +<!-- Wider blocks inside the RTL block should be left-aligned regardless of align attribute --> |
|
mstensho (USE GERRIT)
2014/12/10 23:27:00
"left-aligned" -> "right-aligned"
Kyungtae Kim
2014/12/11 03:32:47
Done.
|
| +<div dir="rtl" class="narrow_block"> |
|
mstensho (USE GERRIT)
2014/12/10 23:27:00
How about an align="right" here?
Kyungtae Kim
2014/12/11 03:32:46
Done.
|
| + <div dir="rtl" id="rtl_in_rtl_right"></div> |
| + <div dir="ltr" id="ltr_in_rtl_right"></div> |
| +</div> |
| + |
| +<div dir="rtl" align="left" class="narrow_block"> |
| + <div dir="rtl" id="rtl_in_rtl_left"></div> |
| + <div dir="ltr" id="ltr_in_rtl_left"></div> |
| +</div> |
| + |
| +<div dir="rtl" align="center" class="narrow_block"> |
| + <div dir="rtl" id="rtl_in_rtl_center"></div> |
| + <div dir="ltr" id="ltr_in_rtl_center"></div> |
| +</div> |
| + |
| +<script> |
| + rtl_in_ltr_left = document.getElementById("rtl_in_ltr_left"); |
| + ltr_in_ltr_left = document.getElementById("ltr_in_ltr_left"); |
| + shouldBe("rtl_in_ltr_left.getBoundingClientRect().left","0"); |
| + shouldBe("ltr_in_ltr_left.getBoundingClientRect().left","0"); |
| + |
| + rtl_in_ltr_right = document.getElementById("rtl_in_ltr_right"); |
| + ltr_in_ltr_right = document.getElementById("ltr_in_ltr_right"); |
| + shouldBe("rtl_in_ltr_right.getBoundingClientRect().left","0"); |
| + shouldBe("ltr_in_ltr_right.getBoundingClientRect().left","0"); |
| + |
| + rtl_in_ltr_center = document.getElementById("rtl_in_ltr_center"); |
| + ltr_in_ltr_center = document.getElementById("ltr_in_ltr_center"); |
| + shouldBe("rtl_in_ltr_center.getBoundingClientRect().left","0"); |
| + shouldBe("ltr_in_ltr_center.getBoundingClientRect().left","0"); |
| + |
| + rtl_in_rtl_right = document.getElementById("rtl_in_rtl_right"); |
| + ltr_in_rtl_right = document.getElementById("ltr_in_rtl_right"); |
| + shouldBe("rtl_in_rtl_right.getBoundingClientRect().right","100"); |
| + shouldBe("ltr_in_rtl_right.getBoundingClientRect().right","100"); |
| + |
| + rtl_in_rtl_left = document.getElementById("rtl_in_rtl_left"); |
| + ltr_in_rtl_left = document.getElementById("ltr_in_rtl_left"); |
| + shouldBe("rtl_in_rtl_left.getBoundingClientRect().right","100"); |
| + shouldBe("ltr_in_rtl_left.getBoundingClientRect().right","100"); |
| + |
| + rtl_in_rtl_center = document.getElementById("rtl_in_rtl_center"); |
| + ltr_in_rtl_center = document.getElementById("ltr_in_rtl_center"); |
| + shouldBe("rtl_in_rtl_center.getBoundingClientRect().right","100"); |
| + shouldBe("ltr_in_rtl_center.getBoundingClientRect().right","100"); |
| +</script> |
| + |
| +</body> |