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 1340715] Change SVG max-content size for webcompat. #35755

Merged
merged 1 commit into from Sep 1, 2022

Conversation

moz-wptsync-bot
Copy link
Collaborator

The goal of this patch is to change the SVG max-content size to match blink and
webkit to fix the webcompat issues in bug 1521882 and bug 1651754.

If a percentage width/height attribute on inline axis is explicitly set, we fall
back to the default replaced element size to avoid regressing bug 1162418.
Otherwise, we use 0 as SVG's max-content size in order to be compatible with
blink and webkit.

When computing replaced elements's max-content inline-size, its preferred
aspect-ratio and block-size can transfer to inline axis. The logic is the same
as if the element has an 'auto' inline-size. Hence the modification in
ComputeSizeWithIntrinsicDimensions().

This patch also removes the SVG's intrinsic size dependency on an arbitrary
container from the previous layout result in SVGOuterSVGFrame::GetPrefISize().
bug 1340715 comment 1 explains why the code is unsound.

Differential Revision: https://phabricator.services.mozilla.com/D155998

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1340715
gecko-commit: 76c1fb5130dcd9f4562826d42194ebf74ca268c8
gecko-reviewers: emilio

The goal of this patch is to change the SVG max-content size to match blink and
webkit to fix the webcompat issues in bug 1521882 and bug 1651754.

If a percentage width/height attribute on inline axis is explicitly set, we fall
back to the default replaced element size to avoid regressing bug 1162418.
Otherwise, we use 0 as SVG's max-content size in order to be compatible with
blink and webkit.

When computing replaced elements's max-content inline-size, its preferred
aspect-ratio and block-size can transfer to inline axis. The logic is the same
as if the element has an 'auto' inline-size. Hence the modification in
ComputeSizeWithIntrinsicDimensions().

This patch also removes the SVG's intrinsic size dependency on an arbitrary
container from the previous layout result in `SVGOuterSVGFrame::GetPrefISize()`.
bug 1340715 comment 1 explains why the code is unsound.

Differential Revision: https://phabricator.services.mozilla.com/D155998

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1340715
gecko-commit: 76c1fb5130dcd9f4562826d42194ebf74ca268c8
gecko-reviewers: emilio
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.

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