[webkit-changes] [WebKit/WebKit] 9e1dc1: Fix ancestor bounding box for "disabled" <foreignO...
Ahmad Saleem
noreply at github.com
Thu Mar 20 02:48:58 PDT 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9e1dc10d3cc5f72394aebbad1b1edb1701eab5aa
https://github.com/WebKit/WebKit/commit/9e1dc10d3cc5f72394aebbad1b1edb1701eab5aa
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2025-03-20 (Thu, 20 Mar 2025)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-01-expected.txt
M Source/WebCore/rendering/svg/SVGRenderSupport.cpp
M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGForeignObject.h
M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGImage.h
Log Message:
-----------
Fix ancestor bounding box for "disabled" <foreignObject> and <image>
https://bugs.webkit.org/show_bug.cgi?id=290077
rdar://problem/147455573
Reviewed by Antoine Quint.
This patch aligns WebKit with Gecko / Firefox, Blink / Chromium and Web Specification.
Inspired by: https://chromium.googlesource.com/chromium/src/+/e47e6e98afe2de2d737ac7827e9309430e68b60b
Per Web Specification [1] & [2]:
[1] https://svgwg.org/svg2-draft/embedded.html#Placement
"A value of zero for either width or height disables rendering of the
element and its embedded content."
[2] https://svgwg.org/svg2-draft/coords.html#BoundingBoxes
"For each descendant graphics element child of parent:
* If child is not rendered then continue to the next descendant
graphics element."
<foreignObject> / <image> with 'width' or 'height' zero should not
contribute to an ancestor container's bounding box.
* Source/WebCore/rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGForeignObject.h:
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGImage.h:
* LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-01-expected.txt: Rebaselined
Canonical link: https://commits.webkit.org/292411@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list