fune/testing/web-platform/tests/css/css-flexbox/dynamic-baseline-change-ref.html
Ian Kilpatrick f0bd5a9328 Bug 1675227 [wpt PR 26345] - [layout] Abort simplified layout if baselines shift., a=testonly
Automatic update from web-platform-tests
[layout] Abort simplified layout if baselines shift.

If we ran simplified layout, or triggered layout from a subtree-root
the baseline of the fragment may have changed. While most of the time
this doesn't have any visible side-effect, there may be an arbitrary
ancestor which relies on this baseline, causing elements to be baseline
aligned incorrectly.

This patch does two things:
1) When simplified layout is triggered from simplified layout, check if
   the Baseline shifted, and return nullptr.
2) When we are being laid out as a subtree root (as an inflow element),
   check if the Baseline shifted, and mark our containing block chain
   for layout.

Bug: 1137905
Change-Id: I8c8fa2c981e9001cf6ec7f685d4451e1fe13c848
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2509644
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823197}

--

wpt-commits: e7374c79537d3afbab2e643dbb37e6a280af9028
wpt-pr: 26345
2020-11-06 12:14:07 +00:00

10 lines
512 B
HTML

<!DOCTYPE html>
<div style="display: flex; width: 100px; border: solid; align-items: baseline;">
<div style="width: 50px; height: 50px;">
<div style="width: 50px; height: 50px; position: relative; overflow: auto;">
<canvas width=10 height=10 style="width: 80%; background: green;"></canvas>
<div id="target" style="position: absolute; width: 10px; height: 10px; background: red; top: 100px;"></div>
</div>
</div>
<div style="width: 50px; height: 50px; background: green;"></div>
</div>