Bug 1705526 [wpt PR 28526] - Always add consumed block-size when calculating legacy static pos., a=testonly

Automatic update from web-platform-tests
Always add consumed block-size when calculating legacy static pos.

We used to do it only when the parent of an OOF was a fragmentainer, but
this is always needed for any descendant as well. The legacy code in
LayoutBox::ComputeInlineStaticDistance() expects the block-offset to be
relative to the parent in the flow thread coordinate space.

Also initialize previous_break_token_ to nullptr. This was a mistake
during oilpan conversion, which suddenly became a problem (it may have
been safe-ish before, but not anymore).

The new test abspos-autopos-contained-by-viewport-001.html would fail
without this fix.

Bug: 1199258
Change-Id: I7520cad9112485e908df3be33b354aec58332db8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2826460
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#873069}

--

wpt-commits: ac12ed34d2b923cac8af08055036679c3a080afb
wpt-pr: 28526
This commit is contained in:
Morten Stenshorne 2021-04-23 10:20:10 +00:00 коммит произвёл moz-wptsync-bot
Родитель 6942ac90f9
Коммит 37051bf2f2
2 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/">
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-height">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="columns:2; column-gap:0; column-fill:auto; width:100px; height:100px; background:red;">
<div style="height:120px; background:green;"></div>
<div style="position:absolute; width:50px; height:80px; background:green;"></div>
</div>

Просмотреть файл

@ -0,0 +1,12 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/">
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-height">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="columns:2; column-gap:0; column-fill:auto; width:100px; height:100px; background:red;">
<div>
<div style="height:120px; background:green;"></div>
<div style="position:absolute; width:50px; height:80px; background:green;"></div>
</div>
</div>