Repository navigation
Conversation
This branch has not been deployed
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
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.
When stretch sizing derives a child's main dimension from its aspect ratio, the computed border-box dimension is passed into an available-size parameter that includes margins. The child then subtracts main-axis margins again.
Include the main-axis margins in the two stretch/aspect-ratio assignments, matching the adjacent non-stretch aspect-ratio calculations. For the reported 400-wide root with 24-point margins and a 16:9 child, the child now measures 352×198 instead of 267×150.
Fixes #1788. This changes only the margin-box arithmetic in these branches, without changing Yoga's broader aspect-ratio semantics.
Test plan
-Wno-error=character-conversion); no build-system workaround is included.Changelog:
[General][Fixed] - Preserve main-axis margins when stretching items with an aspect ratio