Bug 1452283 [wpt PR 10304] - Out-of-flow descendants may still be part of the flow thread., a=testonly
authorMorten Stenshorne <mstensho@chromium.org>
Mon, 09 Apr 2018 22:10:15 +0000
changeset 467281 f6383fc3805613678892a7636e33bf5a4005c704
parent 467280 b77aba04cf62213ee8c9800f3725a99d7fc63f4e
child 467282 b41dda24827687462fef6c89dc212f5242e39897
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1452283, 10304, 827424, 995439, 548354
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 1452283 [wpt PR 10304] - Out-of-flow descendants may still be part of the flow thread., a=testonly Automatic update from web-platform-testsOut-of-flow descendants may still be part of the flow thread. When changing a layout object from in-flow to out-of-flow positioned, we used to just remove it from the flow thread, risking that there'd no longer be a column set to associate it with. However, an out-of-flow positioned descendant may be contained by something that's inside the flow thread, e.g. if the containing block of an absolutely positioned object is a relatively positioned object, and that relatively positioned object is contained by the flow thread. Since it's hard to detect what the new containing block of an object is going to be before it has actually gone out of flow, we'll still remove it from the flow thread, but we'll now detect that we need to re-insert it when computed style has updated. Bug: 827424 Change-Id: I413348b0d3ecd0c4b5051e6e9d2a4526863bef60 Reviewed-on: https://chromium-review.googlesource.com/995439 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#548354} wpt-commits: 297db81150f9a96a0d4582a9fed93f86c8e56a36 wpt-pr: 10304 wpt-commits: 297db81150f9a96a0d4582a9fed93f86c8e56a36 wpt-pr: 10304
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-multicol/going-out-of-flow-after-spanner.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -314947,16 +314947,22 @@
     ]
    ],
    "css/css-multicol/extremely-tall-multicol-with-extremely-tall-child-crash.html": [
     [
      "/css/css-multicol/extremely-tall-multicol-with-extremely-tall-child-crash.html",
      {}
     ]
    ],
+   "css/css-multicol/going-out-of-flow-after-spanner.html": [
+    [
+     "/css/css-multicol/going-out-of-flow-after-spanner.html",
+     {}
+    ]
+   ],
    "css/css-multicol/multicol-gap-animation-001.html": [
     [
      "/css/css-multicol/multicol-gap-animation-001.html",
      {}
     ]
    ],
    "css/css-multicol/multicol-gap-animation-002.html": [
     [
@@ -505238,16 +505244,20 @@
   "css/css-multicol/extremely-tall-multicol-with-extremely-tall-child-crash.html": [
    "43a6f9e055b908a42b5811d6ce5e48acf8c9ed08",
    "testharness"
   ],
   "css/css-multicol/float-and-block.html": [
    "435614e6d5dcdbd8325687f70014bea0e3dea5f7",
    "reftest"
   ],
+  "css/css-multicol/going-out-of-flow-after-spanner.html": [
+   "d76366e15dd552c4c013c98e2de70ce6b38f0202",
+   "testharness"
+  ],
   "css/css-multicol/multicol-basic-001.html": [
    "7cb568d75ea3fec9046ec69770fe59b8539beb02",
    "reftest"
   ],
   "css/css-multicol/multicol-basic-002.html": [
    "ebbb17ad93e23c81e7ddf899d7e7b13b8bed193a",
    "reftest"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-multicol/going-out-of-flow-after-spanner.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>Taking the sole box after a spanner out of flow, then remove it</title>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="http://www.w3.org/TR/css3-multicol/" title="CSS Multi-column Layout Module Level 1">
+<meta name="assert" content="An absolutely positioned box is still contained by the multicol container if its containing block is inside the multicol container">
+<div id="multicol" style="columns:3;">
+  <div style="position:relative;">
+    <div style="column-span:all;"></div>
+    <div id="victim" style="width:100%; height:300px;"></div>
+  </div>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+test(() => {
+  var multicol = document.getElementById("multicol");
+  var victim = document.getElementById("victim");
+  assert_equals(multicol.getBoundingClientRect().height, 100);
+  victim.style.position = "absolute";
+  assert_equals(multicol.getBoundingClientRect().height, 100);
+  victim.style.display = "none";
+  assert_equals(multicol.getBoundingClientRect().height, 0);
+}, "Going out of flow and still fragmented");
+</script>