Bug 1499542 part 3: Give test_flex_items.html an item that's trivially clamped to small max-size. r=bradwerth
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 17 Oct 2018 19:15:15 +0000
changeset 500473 2ce0ac92bee586c4e67a302929e1532ec8831505
parent 500472 3ea646bde4de4772a439a31798406287d2be685e
child 500474 c096376198dfd61024c75345b94c9674b403988b
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbradwerth
bugs1499542
milestone64.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 1499542 part 3: Give test_flex_items.html an item that's trivially clamped to small max-size. r=bradwerth Depends on D9018 Differential Revision: https://phabricator.services.mozilla.com/D9019
dom/flex/test/chrome/test_flex_items.html
--- a/dom/flex/test/chrome/test_flex_items.html
+++ b/dom/flex/test/chrome/test_flex_items.html
@@ -121,16 +121,24 @@ function runTests() {
     { mainBaseSize: lbElemBoundingRect.width,
       mainDeltaSize: 0 },
     { crossMinSize: 40,
       crossMaxSize: 120,
       mainDeltaSize: 0 },
     { mainMinSize: 120,
       mainMaxSize: 500,
       mainDeltaSize: 0 },
+    { mainBaseSize:  5, /* XXXdholbert should be 10, fixing in bug 1498281 */
+      mainMaxSize:   5,
+      mainDeltaSize: 0 },
+    { mainBaseSize: 15, /* XXXdholbert should be 10, fixing in bug 1498281 */
+      mainMinSize:  15,
+      mainDeltaSize: 0 },
+    { mainBaseSize: 50,
+      mainMaxSize: 10 },
     { mainDeltaSize: 0 },
     { /* final item is anonymous flex item */ },
   ];
 
   let items = line.getItems();
   is(items.length, expectedValues.length,
      "Line should have expected number of items.");
   is(items.length, container.children.length + 1,
@@ -168,15 +176,25 @@ function runTests() {
 </head>
 
 <body onLoad="runTests();">
   <div id="wrapper" class="container">
     <div class="lime base flexGrow">one line (first)</div>
     <div class="yellow lastbase" style="width: 100px">one line (last)</div>
     <div class="orange offset lastbase crossMinMax">two<br/>lines and offset (last)</div>
     <div class="pink offset base mainMinMax">offset (first)</div>
+    <!-- Inflexible item that is trivially clamped to smaller max-width: -->
+    <div style="flex: 0 0 10px; max-width: 5px"></div>
+    <!-- Inflexible item that is trivially clamped to larger min-width: -->
+    <div style="flex: 0 0 10px; min-width: 15px"></div>
+    <!-- XXXdholbert should create a second container here w/ specific
+         hardcoded flex base sizes so we can predict & check mainDeltaSize
+         for this item: -->
+    <!-- Item that wants to grow but is trivially clamped to max-width
+         below base size: -->
+    <div style="flex: 1 1 50px; max-width: 10px"></div>
     <div style="display:contents">
       <div class="white">replaced</div>
     </div>
     anonymous text node
   </div>
 </body>
 </html>