[Gecko Bug 1733952] When computing inline intrinsic sizes, resolve with a 0 percentage basis rather than just resolving to zero if there's a percentage. #31098
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.
This matches other browsers, the spec
(https://drafts.csswg.org/css-sizing/#cyclic-percentage-contribution):
For the min size properties, as well as for margins and paddings (and
gutters), a cyclic percentage is resolved against zero for determining
intrinsic size contributions.
And also what we do in SizeComputationInput::Compute{Margin,Padding}:
https://searchfox.org/mozilla-central/rev/75e9d727ce5ba2c14653cf8fb0f1367f085271b7/layout/generic/ReflowInput.cpp#2811-2832
https://searchfox.org/mozilla-central/rev/75e9d727ce5ba2c14653cf8fb0f1367f085271b7/layout/generic/ReflowInput.cpp#2861-2868
This fixes a compat issue with the menu alignment in lume.io:
webcompat/web-bugs#88484 (comment)
It's also simpler.
Differential Revision: https://phabricator.services.mozilla.com/D127441
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1733952
gecko-commit: 1fd26f24025c3dcb4de967ee8bdc8a0ca9079e78
gecko-reviewers: jfkthame