[wpt-sync] Sync PR 49458 - Refactor AbsoluteAxisSolver
Categories
(Core :: Layout, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 49458 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/49458
Details from upstream follow.
Oriol Brufau <obrufau@igalia.com> wrote:
Refactor AbsoluteAxisSolver
AbsoluteAxisSolver::solve()
would compute, among other things, the position of the absolute positioned element if it had start alignment. Then,AbsoluteAxisSolver::origin_for_alignment_or_justification()
could optionally opt into modifying that alignment if needed.This was quite convoluted and not easy to follow. It's simpler to not compute the position in
AbsoluteAxisSolver::solve()
, and instead do it always inAbsoluteAxisSolver::origin_for_alignment_or_justification()
, which I'm renaming toAbsoluteAxisSolver::origin_for_margin_box()
because it aligns the margin box of the abspos within its alignment container.Then the
Anchor
struct becomes useless and can be removed.<!-- Please describe your changes on the following line: -->
Reviewed in servo/servo#34443
Assignee | ||
Updated•3 months ago
|
Assignee | ||
Updated•3 months ago
|
Description
•