Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Alignment for inline statically positioned OOF elements #52260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2025

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

Similar to CL:6450252, pass up the alignment block/inline edge within
the static position of OOFs, but in the inline layout algorithm.

This will result in statically positioned insets taking self alignment
into account [1]

This change also moves the helper methods added to get these edges in
CL:6450252 to a more common location (BlockLayoutAlgorithmUtils) for
reuse in both cases.

These helpers were missing handling of some ItemPositions, like
'flex-start', 'flex-end', etc. This change addresses this, and adds
additional tests for these plus how 'align-items' and 'justify-items'
are handled for inline/block layout for OOFs.

[1] https://drafts.csswg.org/css-position-3/#staticpos-rect

Bug: 409806799
Change-Id: Id6f7fc8597400bb2e838785510d30caad634d7a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6451494
Commit-Queue: Alison Maher <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1453672}

Similar to CL:6450252, pass up the alignment block/inline edge within
the static position of OOFs, but in the inline layout algorithm.

This will result in statically positioned insets taking self alignment
into account [1]

This change also moves the helper methods added to get these edges in
CL:6450252 to a more common location (BlockLayoutAlgorithmUtils) for
reuse in both cases.

These helpers were missing handling of some ItemPositions, like
'flex-start', 'flex-end', etc. This change addresses this, and adds
additional tests for these plus how 'align-items' and 'justify-items'
are handled for inline/block layout for OOFs.

[1] https://drafts.csswg.org/css-position-3/#staticpos-rect

Bug: 409806799
Change-Id: Id6f7fc8597400bb2e838785510d30caad634d7a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6451494
Commit-Queue: Alison Maher <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1453672}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 638746e into master Apr 30, 2025
19 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-3ea8d2af66 branch April 30, 2025 03:16
dholbert added a commit to dholbert/wpt that referenced this pull request May 2, 2025
This fixes the test align-self-static-position-005.html and its reference
from recent PR web-platform-tests#52260 to declare
a line-height of `1` when specifying the Ahem font, per best practices at
https://web-platform-tests.org/writing-tests/ahem.html

Per that documentation: when using Ahem in a WPT, "An explicit (i.e., not
normal) line-height should also always be used")

This is needed in order for the test to pass in Firefox, since Gecko uses a
larger-than-1 value as the "normal" line-height for Ahem.)
dholbert added a commit that referenced this pull request May 3, 2025
This fixes the test align-self-static-position-005.html and its reference
from recent PR #52260 to declare
a line-height of `1` when specifying the Ahem font, per best practices at
https://web-platform-tests.org/writing-tests/ahem.html

Per that documentation: when using Ahem in a WPT, "An explicit (i.e., not
normal) line-height should also always be used")

This is needed in order for the test to pass in Firefox, since Gecko uses a
larger-than-1 value as the "normal" line-height for Ahem.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants