Bug 1804406 - Prevent internal SVG elements from becoming query containers for size features. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D164045
This commit is contained in:
Oriol Brufau 2022-12-07 12:25:34 +00:00
parent f08c01b802
commit e88cac7142
3 changed files with 7 additions and 7 deletions

View File

@ -3729,6 +3729,13 @@ ContainSizeAxes nsStyleDisplay::GetContainSizeAxes(
return ContainSizeAxes(false, false);
}
// Internal SVG elements do not use the standard CSS box model, and wouldn't
// be affected by size containment. By disabling it we prevent them from
// becoming query containers for size features.
if (aFrame.HasAnyStateBits(NS_FRAME_SVG_LAYOUT)) {
return ContainSizeAxes(false, false);
}
// https://drafts.csswg.org/css-contain-2/#content-visibility
// If this content skips its content via content-visibility, it always has
// size containment.

View File

@ -1,3 +0,0 @@
[never-match-container.html]
[Size @container query against svg element never matches]
expected: FAIL

View File

@ -1,4 +0,0 @@
[svg-foreignobject-no-size-container.html]
expected:
if (os == "android") and not debug: TIMEOUT
FAIL