Alignment for inline statically positioned OOF elements #52260
Merged
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}