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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!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.
2
3 <style>
4 div>div{background:lime;width:300px;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 <!-- Wider blocks inside the right-aligned LTR block should be left-aligned -->
12 <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.
13 <div dir="rtl" id="rtl_in_ltr_right"></div>
14 <div dir="ltr" id="ltr_in_ltr_right"></div>
15 </div>
16
17 <!-- Wider blocks inside the left-aligned RTL block should be right-aligned -->
18 <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.
19 <div dir="rtl" id="rtl_in_rtl_left"></div>
20 <div dir="ltr" id="ltr_in_rtl_left"></div>
21 </div>
22
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.
23 <script>
24 rtl_in_right = document.getElementById("rtl_in_ltr_right");
25 ltr_in_right = document.getElementById("ltr_in_ltr_right");
26 shouldBe("rtl_in_ltr_right.getBoundingClientRect().left","0");
27 shouldBe("ltr_in_ltr_right.getBoundingClientRect().left","0");
28
29 rtl_in_rtl = document.getElementById("rtl_in_rtl_left");
30 ltr_in_rtl = document.getElementById("ltr_in_rtl_left");
31 shouldBe("rtl_in_rtl_left.getBoundingClientRect().right","100");
32 shouldBe("ltr_in_rtl_left.getBoundingClientRect().right","100");
33 </script>
34
35 </body>
OLDNEW
« 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