Bug 1705238 [wpt PR 28494] - [LayoutNG] OOF positioned offset in a nested multicol, a=testonly
authorAlison Maher <almaher@microsoft.com>
Fri, 23 Apr 2021 10:20:26 +0000
changeset 577269 a6d746e60eac0eddfe844c23ce265332c2bdefaa
parent 577268 eb555499a65824cd7ee0c340c744c56458e12d7a
child 577270 98d55c60fd3ef3a9489d0ec4ce965eb7564a4e83
push id141827
push userwptsync@mozilla.com
push dateSat, 24 Apr 2021 02:11:12 +0000
treeherderautoland@3a7d9d49c316 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1705238, 28494, 2680070, 2827892, 1198578, 2822985, 873126
milestone90.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 1705238 [wpt PR 28494] - [LayoutNG] OOF positioned offset in a nested multicol, a=testonly Automatic update from web-platform-tests [LayoutNG] OOF positioned offset in a nested multicol OOF positioned elements (abspos or fixedpos) in a nested multicol could get the wrong offset if the containing block started in a column that was not the first in a given multicol fragment. The reason being that we had adjusted the containing block offset in CL:2680070 to take into account columns from previous fragments. However, if the containing block was not in the first column in a multicol fragment, we would have already adjusted for this in NGContainerFragmentBuilder (given that its column's builder would have access to the previous column break token). To fix this, utilize the previous_break_token_ stored in NGBoxFragmentBuilder (which is available in both cases above) to determine the correct offset for the containing block. Instead of passing both this adjustment for the containing block and a bool to determine if we should propagate OOFs, a new base::Optional<LayoutUnit> variable is passed into PropagateOOFPositionedInfo() to determine both (credit: CL:2827892). This containing block adjustment is determined in NGBoxFragmentBuilder::BlockOffsetAdjustmentForFragmentainer(). Bug: 1198578 Change-Id: I3c183dd83ed45e240fb9f62347dd388e370b1510 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2822985 Commit-Queue: Alison Maher <almaher@microsoft.com> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#873126} -- wpt-commits: 16e47e623385c2ff468cd10fcb9d42b78d2b8e80 wpt-pr: 28494
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-037.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-037.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>
+  Nested fixedpos in a nested multicol with transform container.
+</title>
+<link rel="help" href="https://www.w3.org/TR/css-position-3/#abspos-breaking">
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+<style>
+  .multicol {
+    column-count: 2;
+    column-fill: auto;
+    column-gap: 0px;
+  }
+  #outer {
+    height: 100px;
+    width: 100px;
+  }
+  #inner {
+    width: 50px;
+    margin-left: -100px;
+  }
+  .abs {
+    position: absolute;
+    width: 25px;
+    height: 400px;
+    top: 0px;
+  }
+  .fixed {
+    position: fixed;
+    width: 25px;
+    height: 400px;
+    background: green;
+    top: 0px;
+  }
+</style>
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div class="multicol" id="outer">
+  <div class="multicol" id="inner">
+    <div style="height: 400px;"></div>
+    <div style="transform: translateX(0);">
+      <div style="height: 400px;"></div>
+      <div class="abs">
+        <div style="height: 400px; background-color: red;"></div>
+          <div class="fixed"></div>
+      </div>
+    </div>
+  </div>
+</div>