github web-platform-tests/wpt merge_pr_48034

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
12 months ago

[layout] Implement new anchor-center behaviour.

This patch implements the new anchor-center behaviour specified in:
https://drafts.csswg.org/css-anchor-position-1/#anchor-center
https://drafts.csswg.org/css-align-3/#auto-safety-position

Previously anchor-center would adjust the insets such that it was
centered on the anchor. This meant the available space would change
and have an affect on sizing the anchored element.

This adjustment no longer takes place. The available size is static.
The centering happens when alignment happens.

Additionally this implements the new default overflow behaviour for
abspos. This new behaviour will let the target overflow the inset
modified containing block, but be "safe" by shifting the target
within the containing-block (not the IMCB), with a bias towards the
start edge.

This patch also fixes an issue where auto-margins were incorrectly
applied for anchor-center, etc.

Outside of:

  • The new default overflow behaviour for non-normal alignment, when
    both insets are set.
  • The new anchor-center behaviour.
  • The fixed auto margin behaviour.

There should be no other behaviour change.

Fixed: 343517018
Change-Id: Ibb2062b59c81413efa137987a55c3663a6677e3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5824748
Auto-Submit: Ian Kilpatrick ikilpatrick@chromium.org
Reviewed-by: David Grogan dgrogan@chromium.org
Commit-Queue: David Grogan dgrogan@chromium.org
Cr-Commit-Position: refs/heads/main@{#1353099}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.