Bug 1636834 [wpt PR 23497] - [FlexNG] Make simplified layout algorithm use static-position from layer, a=testonly
authorIan Kilpatrick <ikilpatrick@chromium.org>
Wed, 13 May 2020 09:49:44 +0000
changeset 531192 66fc6d279696f0eb9af21432929448deb4b738e9
parent 531191 d9b59df1cd6754401852e73e101875167b5c457a
child 531193 8d27c5ce5d6fb6aac7f1d74f47b8c90f697142cc
push id116503
push userwptsync@mozilla.com
push dateWed, 20 May 2020 10:37:27 +0000
treeherderautoland@135acd548abf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1636834, 23497, 845235, 2185513, 767206
milestone78.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 1636834 [wpt PR 23497] - [FlexNG] Make simplified layout algorithm use static-position from layer, a=testonly Automatic update from web-platform-tests [FlexNG] Make simplified layout algorithm use static-position from layer Step 2/4 in getting flex to use the simplified layout pass. Instead of re-calculating the static-position within the simplified layout pass, store this on the paint-layer, and read it back during the simplified pass. This isn't ideal. A better way of doing this would be to add "placeholder" fragments which contain this information instead. Bug: 845235 Change-Id: I1e8af7f2c487f22c72d657eb1a20b3022329899e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2185513 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#767206} -- wpt-commits: c313d1fe582d0361f3c2165799e0e4ded109f327 wpt-pr: 23497
testing/web-platform/tests/css/css-position/position-absolute-dynamic-static-position-flex.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-position/position-absolute-dynamic-static-position-flex.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+<link rel="help" href="https://www.w3.org/TR/css-position-3/" />
+<meta name="assert" content="This test checks that a dynamic change in constraints calculates the static position correctly for flex children."/>
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div style="display: flex; position: relative; width: 100px; height: 100px; background: red; align-items: flex-end;">
+  <div id="target" style="position: absolute; width: 100px; height: 100px; background: green; bottom: 100px;"></div>
+</div>
+<script>
+  document.body.offsetTop;
+  document.getElementById('target').style.bottom = 'initial';
+</script>