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

Unified Diff: LayoutTests/fast/dom/margin-for-aligning-bigger-child.html

Issue 790943004: An align attribute should not be applied for wider children (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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-aligning-bigger-child.html
diff --git a/LayoutTests/fast/dom/margin-for-aligning-bigger-child.html b/LayoutTests/fast/dom/margin-for-aligning-bigger-child.html
new file mode 100644
index 0000000000000000000000000000000000000000..47e9baafac8850cbed2185e10b44199d82d78fe9
--- /dev/null
+++ b/LayoutTests/fast/dom/margin-for-aligning-bigger-child.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
mstensho (USE GERRIT) 2014/12/10 10:45:05 Uh-oh - you put this in fast/dom/ ? Sorry, I didn'
Kyungtae Kim 2014/12/10 11:50:38 Done.
+
+<style>
+div>div{background:lime;width:300px;height:20px;border:1px solid green}
+</style>
+
+<script src="../../resources/js-test.js"></script>
+
+<body style="width:700px;margin:0px">
+
+<!-- Wider blocks inside the right-aligned LTR block should be left-aligned -->
+<div align="right" style="width:100px">
mstensho (USE GERRIT) 2014/12/10 10:45:05 Could you move the width declarations to the style
Kyungtae Kim 2014/12/10 11:50:38 Done.
+ <div dir="rtl" id="rtl_in_ltr_right"></div>
+ <div dir="ltr" id="ltr_in_ltr_right"></div>
+</div>
+
+<!-- Wider blocks inside the left-aligned RTL block should be right-aligned -->
+<div dir="rtl" align="left" style="width:100px">
mstensho (USE GERRIT) 2014/12/10 10:45:05 Nice and important to test RTL, but it would be us
Kyungtae Kim 2014/12/10 11:50:38 Done.
+ <div dir="rtl" id="rtl_in_rtl_left"></div>
+ <div dir="ltr" id="ltr_in_rtl_left"></div>
+</div>
+
mstensho (USE GERRIT) 2014/12/10 10:45:05 Should fix and add a test for align="center" too.
Kyungtae Kim 2014/12/10 11:50:38 Done.
+<script>
+ rtl_in_right = document.getElementById("rtl_in_ltr_right");
+ ltr_in_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_rtl = document.getElementById("rtl_in_rtl_left");
+ ltr_in_rtl = document.getElementById("ltr_in_rtl_left");
+ shouldBe("rtl_in_rtl_left.getBoundingClientRect().right","100");
+ shouldBe("ltr_in_rtl_left.getBoundingClientRect().right","100");
+</script>
+
+</body>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/margin-for-aligning-bigger-child-expected.txt » ('j') | Source/core/rendering/RenderBox.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698