Skip to content
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

[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

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

moz-wptsync-bot
Copy link
Collaborator

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

…sis rather than just resolving to zero if there's a percentage.

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
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a 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 Firefox project.

@moz-wptsync-bot moz-wptsync-bot merged commit 7cef9f0 into master Oct 4, 2021
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1733952 branch October 4, 2021 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants