[@container] Resolve logical units against element's writing-mode #32410
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.
Previously the unit 'qi' (for example) would resolve against the
nearest inline-axis container. However, according to a recent
resolution [1] writing-mode sensitive units resolve to a physical
axis based on the target element's writing mode.
This simplifies the container-relative unit resolution a bit, since
can always use PhysicalAxes when searching for the correct container.
Being able to resolve logical units in CSSToLengthConversionData also
prepares for implementation of the new viewport units [2], which
include a number of new logical variants as well. (They also resolve
to physical in the same way).
This CL should only affect code behind the CSSContainerRelativeUnits
runtime flag (status:test).
[1] w3c/csswg-drafts#6873
[2] https://crbug.com/1093055
Bug: 1223030, 1093055
Change-Id: I548a613609b46a38262d5de48e294dab1131853b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/ /3387159
Reviewed-by: Xiaocheng Hu <[email protected]>
Commit-Queue: Anders Hartvoll Ruud <[email protected]>
Cr-Commit-Position: refs/heads/main@{#961390}