Bug 1437045 [wpt PR 9442] - [LayoutNG] Improve min/max calculation wrt. floats., a=testonly
authorMorten Stenshorne <mstensho@chromium.org>
Mon, 26 Mar 2018 11:27:24 +0000
changeset 467020 8263aedb061dbe5ed69772bcd5852fd133304243
parent 467019 bea91c360eba0375d3105bb8fcefa789e4c54755
child 467021 9677004ae3e3c2bf2a71f3f428fac483bb4be625
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1437045, 810370, 908753, 536044
milestone61.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 1437045 [wpt PR 9442] - [LayoutNG] Improve min/max calculation wrt. floats., a=testonly Automatic update from web-platform-tests[LayoutNG] Improve min/max calculation wrt. floats. The presence of floats complicate min/max intrinsic inline size calculation. They affect lines and child blocks in the same block formatting context. Therefore, when calculating min/max sizes of a child, we need to pass along information about floats adjacent to the current "virtual" block position. This change actually makes NG slightly "better" than legacy Blink layout, Edge and Firefox. This may be an issue for compatibility. It should be fairly easy to "dumb down" the machinery to be compatible with the others, though, if this should become an issue. Two tests regressed because of this. Reported bug 810370. This change also caused grid-item-margins-not-collapse-expected.html to make room for the floats to fit beside each other, so I modified it. Also removed bogus "margin" attributes. Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng Change-Id: I59730d7333fa7699a42ab93d2c4674c267d834aa Reviewed-on: https://chromium-review.googlesource.com/908753 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#536044} wpt-commits: 84696c45e08c43b0e26888ac0a4823769c067228 wpt-pr: 9442 wpt-commits: 84696c45e08c43b0e26888ac0a4823769c067228 wpt-pr: 9442
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/CSS2/floats/intrinsic-size-float-and-line.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -48448,16 +48448,28 @@
       [
        "/css/CSS2/floats/floats-zero-height-wrap-001-ref.xht",
        "=="
       ]
      ],
      {}
     ]
    ],
+   "css/CSS2/floats/intrinsic-size-float-and-line.html": [
+    [
+     "/css/CSS2/floats/intrinsic-size-float-and-line.html",
+     [
+      [
+       "/css/reference/ref-filled-green-200px-square.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/CSS2/fonts/font-003.xht": [
     [
      "/css/CSS2/fonts/font-003.xht",
      [
       [
        "/css/CSS2/fonts/font-003-ref.html",
        "=="
       ]
@@ -436207,16 +436219,20 @@
   "css/CSS2/floats/floats-zero-height-wrap-001.xht": [
    "be27ea2642d2afc01772f200bacda28b2d671580",
    "reftest"
   ],
   "css/CSS2/floats/floats-zero-height-wrap-002.xht": [
    "3018403438b780cbebec6f22ecc6b18cca8358a6",
    "reftest"
   ],
+  "css/CSS2/floats/intrinsic-size-float-and-line.html": [
+   "7287e2ce42cab8fda1f63e97c98b664f0b49e9fb",
+   "reftest"
+  ],
   "css/CSS2/fonts/font-001.xht": [
    "c255355156c612be7aef42ea77d8f0f37f779c68",
    "visual"
   ],
   "css/CSS2/fonts/font-002.xht": [
    "84e66a65c0d04bed27936beb71df221166b68628",
    "visual"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/floats/intrinsic-size-float-and-line.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<title>Put float next to line in shrink-to-fit container</title>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#float-width" title="10.3.5 Floating, non-replaced elements">
+<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div style="float:left; min-width:150px; background:red;">
+  <div style="float:right; width:100px; height:200px; background:green;"></div>
+  <div style="vertical-align:top; display:inline-block; width:100px; height:200px; background:green;"></div>
+</div>