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

Side by Side Diff: LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html

Issue 1295933003: Add overflow:auto scrollbars to child flex basis. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add entries to SlowTests Created 5 years, 3 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <style>
4 .vflex {
5 display: flex;
6 flex-direction: column;
7 max-width: 200px;
8 margin: 10px 0 10px 0;
9 }
10 .hflex {
11 display: flex;
12 flex-direction: box;
13 max-height: 200px;
14 margin: 10px 0 10px 0;
15 }
16 .hbox {
17 overflow-x: auto;
18 white-space: nowrap;
19 }
20 .vbox {
21 overflow-y: auto;
22 }
23 .intrinsic-height-box {
24 min-height: -webkit-min-content;
25 overflow: auto;
26 flex-basis: 0;
27 }
28 .rect {
29 min-height: 100px;
30 min-width: 100px;
31 background-color: green;
32 display: inline-block;
33 }
34 </style>
35 <div class="vflex">
36 <div class="hbox">
37 <div class="rect"></div>
38 <div class="rect"></div>
39 </div>
40 </div>
41
42 <div class="vflex">
43 <div class="intrinsic-height-box">
44 <div class="rect" style="min-width: 300px"></div>
45 </div>
46 </div>
47
48 <div class="hflex">
49 <div class="vbox">
50 <div class="rect" style="min-height: 300px;"></div>
51 </div>
52 </div>
53
54 <script>
55 description("When a block inside a flexbox adds scrollbars due to overflow, th e parent flexbox should re-flex based on the child size including scrollbars.");
56
57 var hbox = document.querySelector('.hbox');
58 shouldBe("hbox.clientHeight", "hbox.scrollHeight");
59
60 var intrinsicHeightBox = document.querySelector('.intrinsic-height-box');
61 shouldBe("intrinsicHeightBox.clientHeight", "intrinsicHeightBox.scrollHeight") ;
62
63 // This is expected to fail; see:
64 // https://codereview.chromium.org/1295933003/#msg1
65 var vbox = document.querySelector('.vbox');
66 shouldBe("vbox.clientWidth", "vbox.scrollWidth");
67 </script>
OLDNEW
« no previous file with comments | « LayoutTests/SlowTests ('k') | LayoutTests/css3/flexbox/overflow-auto-resizes-correctly-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698