forked from mirrors/gecko-dev
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
15 lines
937 B
HTML
15 lines
937 B
HTML
<!DOCTYPE html>
|
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#baseline-participation">
|
|
<link rel="match" href="dynamic-baseline-change-ref.html">
|
|
<meta name="assert" content="This test ensures proper baseline alignment for a sub-tree which adds a scrollbar.">
|
|
<div style="display: flex; width: 100px; border: solid; align-items: baseline;">
|
|
<div style="width: 50px; height: 50px; position: relative; overflow: auto;">
|
|
<canvas width=10 height=10 style="width: 80%; background: green;"></canvas> <!-- Baseline of the canvas will move when a scrollbar is added. -->
|
|
<div id="target" style="position: absolute; width: 10px; height: 10px; background: red; top: 0;"></div>
|
|
</div>
|
|
<div style="width: 50px; height: 50px; background: green;"></div> <!-- Baseline is synthesized at the block-end edge. -->
|
|
</div>
|
|
<script>
|
|
document.body.offsetTop;
|
|
document.getElementById('target').style.top = '100px';
|
|
</script>
|