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

Unified Diff: third_party/WebKit/LayoutTests/css3/flexbox/definite-main-size.html

Issue 1807653002: [css-flexbox] Correctly handle percentage sizing in the main axis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary brackets Created 4 years, 9 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
Index: third_party/WebKit/LayoutTests/css3/flexbox/definite-main-size.html
diff --git a/third_party/WebKit/LayoutTests/css3/flexbox/definite-main-size.html b/third_party/WebKit/LayoutTests/css3/flexbox/definite-main-size.html
new file mode 100644
index 0000000000000000000000000000000000000000..4827a280f11bc34b7f3c6121a2f3cbc7d0df3452
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/css3/flexbox/definite-main-size.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+
+<title>CSS Flexbox: Definite main sizes</title>
+
+<style>
+.rect {
+ width: 50px;
+ height: 50px;
+ background-color: green;
+}
+
+.flexbox {
+ border: 3px solid black;
+}
+
+.flexbox > div > div {
+ overflow: hidden;
+}
+
+</style>
+
+<link rel="stylesheet" href="resources/flexbox.css">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#definite-sizes">
+<link rel="author" title="Google Inc." href="https://www.google.com/">
+
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/check-layout-th.js"></script>
+
+<body onload="checkLayout('.flexbox')" style="height: 800px;">
+<div id=log></div>
+
+<p>Simple case of percentage resolution:</p>
+<div class="flexbox" style="width: 300px;">
+ <div class="flex-one" data-expected-width="250">
+ <div style="width: 50%;" data-expected-width="125">
+ <div class="rect"></div>
+ </div>
+ </div>
+ <div class="rect flex-none"></div>
+</div>
+
+<p>auto flex-basis. However, as this is a width, we follow regular width
+rules and resolve the percentage:</p>
+<div class="flexbox" style="width: 300px;">
+ <div data-expected-width="50">
+ <div style="width: 50%;" data-expected-width="25">
+ <div class="rect"></div>
+ </div>
+ </div>
+ <div class="rect flex-none"></div>
+</div>
+
+<p>Simple case of percentage resolution, columns:</p>
+<div class="flexbox column" style="height: 300px;">
+ <div class="flex-one" data-expected-height="250">
+ <div style="height: 50%;" data-expected-height="125">
+ <div class="rect"></div>
+ </div>
+ </div>
+ <div class="rect flex-none"></div>
+</div>
+
+<p>auto flex-basis, we should ignore the percentage height here:</p>
+<div class="flexbox column" style="height: 300px;">
+ <div data-expected-height="50">
+ <div style="height: 50%;" data-expected-height="50">
+ <div class="rect"></div>
+ </div>
+ </div>
+ <div class="rect flex-none"></div>
+</div>

Powered by Google App Engine
This is Rietveld 408576698