Bug 1523562 [wpt PR 14853] - [LayoutNG] Fix bug in resolving flex-basis:auto, a=testonly
authorDavid Grogan <dgrogan@chromium.org>
Thu, 31 Jan 2019 18:55:15 +0000
changeset 457986 249c9bd6e304a687a2edec887489b24a637610da
parent 457985 244ed10a92a7bf154bd848da57ff952f7cee838e
child 457987 93e8279ba244f9c3ecab9dc2a5c69468b59070fd
push id35518
push useropoprus@mozilla.com
push dateFri, 08 Feb 2019 09:55:14 +0000
treeherdermozilla-central@3a3e393396f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1523562, 14853, 845235, 1409810, 622688
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1523562 [wpt PR 14853] - [LayoutNG] Fix bug in resolving flex-basis:auto, a=testonly Automatic update from web-platform-tests [LayoutNG] Fix bug in resolving flex-basis:auto When a column flexbox and an item had orthogonal writing modes (meaning the child's inline direction matches the container's main axis), we were using the item's max content size in the parent's writing mode to resolve its flex-basis, but we should have been using it in the child's writing mode. Bug: 845235 Change-Id: I53bd5ba39f9c8cb4ac84dc4638c8abc57e38f974 Reviewed-on: https://chromium-review.googlesource.com/c/1409810 Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Commit-Queue: David Grogan <dgrogan@chromium.org> Cr-Commit-Position: refs/heads/master@{#622688} -- wpt-commits: cb5b7dca248814309cb145b43ba2a3c5f2c27ae1 wpt-pr: 14853
testing/web-platform/tests/css/css-flexbox/flex-basis-009.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/flex-basis-009.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<script src='/resources/testharness.js'></script>
+<script src='/resources/testharnessreport.js'></script>
+<script src='/resources/check-layout-th.js'></script>
+<link rel="author" title="David Grogan" href="dgrogan@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#valdef-flex-basis-auto">
+<meta name="flags" content="" />
+<meta name="assert" content="flex-basis:auto on orthogonal item in horizontal column flexbox is calculated correctly" />
+
+<style>
+x-word-h {
+  display: inline-block;
+  height: 10px;
+  width: 20px;
+  background: blue;
+}
+
+x-word-v {
+  display: inline-block;
+  height: 20px;
+  width: 10px;
+  background: blue;
+}
+
+* {
+  /* This is for easier manual calculations, not necessary to demonstrate behavior. */
+  line-height: 0;
+}
+</style>
+
+<div id=flexbox style="width:150px; background:green; height:400px; display:flex; flex-direction:column">
+  <div style="writing-mode: vertical-rl;background:orange; flex:1 1 auto" data-expected-height=225>
+    <x-word-v></x-word-v><x-word-v></x-word-v><x-word-v></x-word-v>
+  </div>
+  <div style="background:lightblue; flex: 1 1 auto">
+    <x-word-h></x-word-h><x-word-h></x-word-h><x-word-h></x-word-h>
+  </div>
+</div>
+
+<script>
+checkLayout('#flexbox');
+</script>