Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 543ba52c13f984411079edf2f128465a9c3d700d
https://github.com/WebKit/WebKit/commit/543ba52c13f984411079edf2f128465a9c3d700d
Author: Karl Dubost <[email protected]>
Date: 2026-09-10 (Thu, 10 Sep 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-06-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-06.html
M
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-07-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-07.html
Log Message:
-----------
WPT getBBox tests wrongly expect a zero bbox for a non-rendered ancestor
https://bugs.webkit.org/show_bug.cgi?id=323707
rdar://186965141
Reviewed by Nikolas Zimmermann.
Seven subtests asserted that a graphics element inside defs, clipPath,
mask, a display:none <g> or a <symbol> returns a zero bounding box. SVG
2 coords.html says it returns the rectangle it would have had if
rendered, and that only the non-rendered ancestor reports zero, because
a non-rendered element does not contribute to the bounding box of any
ancestor. WebKit follows both sentences and was marked failing; Gecko
returns zero for the children and was marked passing.
The comment in getBBox-06 attributes the zero to svgwg issue #1018. That
resolution is about an element whose own geometric attributes are
missing or invalid, and the phrase "non-rendered element" carried over
from the InvalidStateError sentence the resolution deleted. Every
element here has valid geometry.
Each test in getBBox-06 asserted the container and its child together.
Split into one subtest each, because measurement in all three engines
showed Chrome and Firefox breaking different sentences: Chrome returns
the container's box as its child's rectangle, and Firefox returns zero
for the child. One subtest asserting both hid that. Safari goes from 7
failures to 0, Chrome from 7 to 2, Gecko from 0 to 7.
Values measured 2026-09-08 in Safari 26.4, Safari 27.0, Firefox 157.0
and Chrome 155.0.0.0, controls passing in all four and the two Safari
builds identical, so the baselines come from measurement rather than
from the one coordinate each failing assertion printed.
none_rect is left asserting zero. coords.html asks for its real
rectangle too, but all three engines return zero, so that one is a
question for the WG and is now named in a comment instead of being
silent.
All ten subtests pass. This will be exported to WPT.
*
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-06.html:
*
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-06-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-07.html:
*
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-07-expected.txt:
Canonical link: https://commits.webkit.org/320886@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications