-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}
wpt-pr-bot
approved these changes
Apr 30, 2025
There was a problem hiding this 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.
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.)
lando-prod-mozilla bot
pushed a commit
to mozilla-firefox/firefox
that referenced
this pull request
May 12, 2025
…hem., Automatic update from web-platform-tests Fix a test to declare line-height with Ahem. (#52313) This fixes the test align-self-static-position-005.html and its reference from recent PR web-platform-tests/wpt#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.) -- wpt-commits: dd8bc79937cc33e720381c68b37af6254e301e8a wpt-pr: 52313 Differential Revision: https://phabricator.services.mozilla.com/D248816
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
May 12, 2025
…hem., Automatic update from web-platform-tests Fix a test to declare line-height with Ahem. (#52313) This fixes the test align-self-static-position-005.html and its reference from recent PR web-platform-tests/wpt#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.) -- wpt-commits: dd8bc79937cc33e720381c68b37af6254e301e8a wpt-pr: 52313 Differential Revision: https://phabricator.services.mozilla.com/D248816
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
May 14, 2025
…hem., Automatic update from web-platform-tests Fix a test to declare line-height with Ahem. (#52313) This fixes the test align-self-static-position-005.html and its reference from recent PR web-platform-tests/wpt#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.) -- wpt-commits: dd8bc79937cc33e720381c68b37af6254e301e8a wpt-pr: 52313 Differential Revision: https://phabricator.services.mozilla.com/D248816 UltraBlame original commit: 723741c630a6a017e0ee543da6899d1abd78fe0d
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
May 14, 2025
…hem., Automatic update from web-platform-tests Fix a test to declare line-height with Ahem. (#52313) This fixes the test align-self-static-position-005.html and its reference from recent PR web-platform-tests/wpt#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.) -- wpt-commits: dd8bc79937cc33e720381c68b37af6254e301e8a wpt-pr: 52313 Differential Revision: https://phabricator.services.mozilla.com/D248816 UltraBlame original commit: 723741c630a6a017e0ee543da6899d1abd78fe0d
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
May 14, 2025
…hem., Automatic update from web-platform-tests Fix a test to declare line-height with Ahem. (#52313) This fixes the test align-self-static-position-005.html and its reference from recent PR web-platform-tests/wpt#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.) -- wpt-commits: dd8bc79937cc33e720381c68b37af6254e301e8a wpt-pr: 52313 Differential Revision: https://phabricator.services.mozilla.com/D248816 UltraBlame original commit: 723741c630a6a017e0ee543da6899d1abd78fe0d
i3roly
pushed a commit
to i3roly/firefox-dynasty
that referenced
this pull request
May 15, 2025
…hem., Automatic update from web-platform-tests Fix a test to declare line-height with Ahem. (#52313) This fixes the test align-self-static-position-005.html and its reference from recent PR web-platform-tests/wpt#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.) -- wpt-commits: dd8bc79937cc33e720381c68b37af6254e301e8a wpt-pr: 52313 Differential Revision: https://phabricator.services.mozilla.com/D248816
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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}