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

Side by Side Diff: LayoutTests/fast/css/auto-min-size.html

Issue 988523003: Reimplement min-width: auto (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 8 months 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src='../../resources/js-test.js'></script> 2 <script src='../../resources/js-test.js'></script>
3 <div id=foo></div> 3 <div id=foo></div>
4 <script> 4 <script>
5 div = document.getElementById('foo'); 5 div = document.getElementById('foo');
6 shouldBe('div.style.minWidth', '""'); 6 shouldBe('div.style.minWidth', '""');
7 shouldBe('getComputedStyle(div)["min-width"]', '"0px"'); 7 shouldBe('getComputedStyle(div)["min-width"]', '"0px"');
8 8
9 div.style.minWidth = 'auto';
10 div.style.maxWidth = 'auto';
11 shouldBe('div.style.minWidth', '""');
12 shouldBe('div.style.maxWidth', '""');
13 shouldBe('getComputedStyle(div).minWidth', '"0px"');
14
15 div.style.minWidth = 0; 9 div.style.minWidth = 0;
16 shouldBe('div.style.minWidth', '"0px"'); 10 shouldBe('div.style.minWidth', '"0px"');
17 shouldBe('getComputedStyle(div)["min-width"]', '"0px"'); 11 shouldBe('getComputedStyle(div)["min-width"]', '"0px"');
Julien - ping for review 2015/04/06 17:06:47 Why was this code moved? It doesn't seem any more
cbiesinger 2015/04/06 21:34:16 Hmm good question. I started out with this patch b
18 12
13 div.style.minWidth = 'auto';
14 div.style.maxWidth = 'auto';
15 shouldBe('div.style.minWidth', '"auto"');
16 shouldBe('div.style.maxWidth', '""');
17 shouldBe('getComputedStyle(div).minWidth', '"0px"');
18
19 shouldBe('div.style.minHeight', '""'); 19 shouldBe('div.style.minHeight', '""');
20 shouldBe('getComputedStyle(div)["min-height"]', '"0px"'); 20 shouldBe('getComputedStyle(div)["min-height"]', '"0px"');
21 21
22 div.style.minHeight = 'auto';
23 div.style.maxHeight = 'auto';
24 shouldBe('div.style.minHeight', '""');
25 shouldBe('div.style.maxHeight', '""');
26 shouldBe('getComputedStyle(div).minHeight', '"0px"');
27
28 div.style.minHeight = 0; 22 div.style.minHeight = 0;
29 shouldBe('div.style.minHeight', '"0px"'); 23 shouldBe('div.style.minHeight', '"0px"');
30 shouldBe('getComputedStyle(div)["min-height"]', '"0px"'); 24 shouldBe('getComputedStyle(div)["min-height"]', '"0px"');
31 25
26 div.style.minHeight = 'auto';
27 div.style.maxHeight = 'auto';
28 shouldBe('div.style.minHeight', '"auto"');
29 shouldBe('div.style.maxHeight', '""');
Julien - ping for review 2015/04/06 17:06:47 This is surprising as max-height should be 'auto'
cbiesinger 2015/04/06 21:34:16 auto is not a valid value for max-height/max-width
30 shouldBe('getComputedStyle(div).minHeight', '"0px"');
32 </script> 31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698