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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/SlowTests ('k') | LayoutTests/css3/flexbox/overflow-auto-resizes-correctly-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html
diff --git a/LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html b/LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html
new file mode 100644
index 0000000000000000000000000000000000000000..fba0716229e34ea0929c9ffce632691ea6a260b3
--- /dev/null
+++ b/LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style>
+.vflex {
+ display: flex;
+ flex-direction: column;
+ max-width: 200px;
+ margin: 10px 0 10px 0;
+}
+.hflex {
+ display: flex;
+ flex-direction: box;
+ max-height: 200px;
+ margin: 10px 0 10px 0;
+}
+.hbox {
+ overflow-x: auto;
+ white-space: nowrap;
+}
+.vbox {
+ overflow-y: auto;
+}
+.intrinsic-height-box {
+ min-height: -webkit-min-content;
+ overflow: auto;
+ flex-basis: 0;
+}
+.rect {
+ min-height: 100px;
+ min-width: 100px;
+ background-color: green;
+ display: inline-block;
+}
+</style>
+<div class="vflex">
+ <div class="hbox">
+ <div class="rect"></div>
+ <div class="rect"></div>
+ </div>
+</div>
+
+<div class="vflex">
+ <div class="intrinsic-height-box">
+ <div class="rect" style="min-width: 300px"></div>
+ </div>
+</div>
+
+<div class="hflex">
+ <div class="vbox">
+ <div class="rect" style="min-height: 300px;"></div>
+ </div>
+</div>
+
+<script>
+ description("When a block inside a flexbox adds scrollbars due to overflow, the parent flexbox should re-flex based on the child size including scrollbars.");
+
+ var hbox = document.querySelector('.hbox');
+ shouldBe("hbox.clientHeight", "hbox.scrollHeight");
+
+ var intrinsicHeightBox = document.querySelector('.intrinsic-height-box');
+ shouldBe("intrinsicHeightBox.clientHeight", "intrinsicHeightBox.scrollHeight");
+
+ // This is expected to fail; see:
+ // https://codereview.chromium.org/1295933003/#msg1
+ var vbox = document.querySelector('.vbox');
+ shouldBe("vbox.clientWidth", "vbox.scrollWidth");
+</script>
« 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