Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: LayoutTests/fast/dom/margin-for-inverted-direction.html

Issue 766223004: Blocks should be aligned by style of parents (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: consider ltr in rtl Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/dom/margin-for-inverted-direction.html
diff --git a/LayoutTests/fast/dom/margin-for-inverted-direction.html b/LayoutTests/fast/dom/margin-for-inverted-direction.html
new file mode 100644
index 0000000000000000000000000000000000000000..b3416042a649e793922df51fff7e5805723de2ff
--- /dev/null
+++ b/LayoutTests/fast/dom/margin-for-inverted-direction.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+
+<style>
+div>div,div>table{border:1px black solid;width:50px;height:20px}
+</style>
+
+<script src="../../resources/js-test.js"></script>
+
+<div align="right">
+ <table dir="rtl" border="1" id="rtl_table_in_ltr"><tr><td></td><td></td></tr></table>
+ <div dir="rtl" id="rtl_div_in_ltr"></div>
+ <table dir="ltr" border="1" id="ltr_table_in_ltr"><tr><td></td><td></td></tr></table>
+ <div dir="ltr" id="ltr_div_in_ltr"></div>
+</div>
+
+<div dir="rtl" align="left">
+ <table dir="rtl" border="1" id="rtl_table_in_rtl"><tr><td></td><td></td></tr></table>
+ <div dir="rtl" id="rtl_div_in_rtl"></div>
+ <table dir="ltr" border="1" id="ltr_table_in_rtl"><tr><td></td><td></td></tr></table>
+ <div dir="ltr" id="ltr_div_in_rtl"></div>
+</div>
+
+<script>
+ rtl_table_in_ltr = document.getElementById("rtl_table_in_ltr");
+ rtl_div_in_ltr = document.getElementById("rtl_div_in_ltr");
+ ltr_table_in_ltr = document.getElementById("ltr_table_in_ltr");
+ ltr_div_in_ltr = document.getElementById("ltr_div_in_ltr");
+ shouldBe("rtl_table_in_ltr.getBoundingClientRect().right","792");
mstensho (USE GERRIT) 2014/12/08 10:01:21 Could you set a width on BODY or something, so tha
Kyungtae Kim 2014/12/09 04:53:08 Done. Set a width on BODY.
mstensho (USE GERRIT) 2014/12/09 09:54:41 Acknowledged.
+ shouldBe("rtl_div_in_ltr.getBoundingClientRect().right","792");
+ shouldBe("ltr_table_in_ltr.getBoundingClientRect().right","792");
+ shouldBe("ltr_div_in_ltr.getBoundingClientRect().right","792");
+
+ rtl_table_in_rtl = document.getElementById("rtl_table_in_rtl");
+ rtl_div_in_rtl = document.getElementById("rtl_div_in_rtl");
+ ltr_table_in_rtl = document.getElementById("ltr_table_in_rtl");
+ ltr_div_in_rtl = document.getElementById("ltr_div_in_rtl");
+ shouldBe("rtl_table_in_rtl.getBoundingClientRect().left","8");
+ shouldBe("rtl_div_in_rtl.getBoundingClientRect().left","8");
+ shouldBe("ltr_table_in_rtl.getBoundingClientRect().left","8");
+ shouldBe("ltr_div_in_rtl.getBoundingClientRect().left","8");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/margin-for-inverted-direction-expected.txt » ('j') | Source/core/rendering/RenderBox.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698