[Webkit-unassigned] [Bug 257615] Fix getBBox() returning (0, 0) bug when width or height is zero
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jun 4 22:16:18 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=257615
--- Comment #2 from Karl Dubost <karlcow at apple.com> ---
In addition to what Alex mentioned
there are a number of issues around
https://wpt.fyi/results/svg/types/scripted?label=master&label=experimental&aligned&q=getbbox
Also
https://bugs.webkit.org/buglist.cgi?quicksearch=getbbox
Probably it would be worth to open an issue on
https://github.com/w3c/svgwg/issues?q=is%3Aissue+is%3Aopen+getbbox
with a pointer to the thread Alex found.
https://lists.w3.org/Archives/Public/www-svg/2012Aug/thread.html#msg14
Gecko/WebKit at the time were aligned on ignoring the shape and consider it as a display: none.
The state of implementations was described in
https://lists.w3.org/Archives/Public/www-svg/2012Aug/0043.html
On SVG 2 current Editor Draft
https://svgwg.org/svg2-draft/types.html#__svg__SVGGraphicsElement__getBBox
> The getBBox method is used to compute the bounding box of
> the current element. When the getBBox(options) method is
> called, the bounding box algorithm is invoked for the
> current element, with fill, stroke, markers and clipped
> members of the options dictionary argument used to control
> which parts of the element are included in the bounding
> box, using the element's user coordinate system as the
> coordinate system to return the bounding box in. A newly
> created DOMRect object that defines the computed bounding
> box is returned.
And the paragraph ends with:
> If getBBox gets called on a non-rendered element, and
> the UA is not able to compute the geometry of the element,
> then throw an InvalidStateError.
So at least it should throw an InvalidStateError.
(If I understood correctly.)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230605/a2f8ebfd/attachment.htm>
More information about the webkit-unassigned
mailing list