Closed Bug 1778530 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 34725 - Position fragmented cell with bottom padding+alignment correctly.

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 34725 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/34725
Details from upstream follow.

Morten Stenshorne <mstensho@chromium.org> wrote:

Position fragmented cell with bottom padding+alignment correctly.

Since layout algorithms always add block-end border/padding to the final
fragment size, and then let the fragmentation machinery decide whether
to keep it, or break, we need to notice if it gets removed. Otherwise,
the table-cell alignment code will think that the contents of the cell
are taller than the containing row, and will therefore move bottom (and
center) aligned cells upwards.

To fix this, update intrinsic block-size when trailing border/padding is
removed, and have the algorithms read it back, before applying
table-cell alignment.

I ended up renaming a variable from intrinsic_block_size to
desired_intrinsic_block_size (because FinishFragmentation() still needs
the original intrinsic block-size in some cases). This made the
is_past_end code look strange (it would reset
"desired_intrinsic_block_size" ... so much for desires). So I just
removed that part. It was probably added there for good measure
initially, along with resetting final_block_size (which we have to), but
it doesn't seem necessary.

Bug: 1336024
Change-Id: Ie44e6c47fed196999692bf1608c031237795ddef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3747766
Reviewed-by: Alison Maher \<almaher@microsoft.com>
Commit-Queue: Morten Stenshorne \<mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1021558}

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, and Chrome on GitHub CI

Total 1 tests

Status Summary

Firefox

FAIL: 1

Chrome

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/774a9e1f8071 [wpt PR 34725] - Position fragmented cell with bottom padding+alignment correctly., a=testonly https://hg.mozilla.org/integration/autoland/rev/ada8d6bd77e4 [wpt PR 34725] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.