Bug 236344 - SVG getEnclosureList is effected by page zoom.
Summary: SVG getEnclosureList is effected by page zoom.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-08 18:48 PST by halifirien
Modified: 2022-02-14 19:58 PST (History)
7 users (show)

See Also:


Attachments
demo of issue (1.13 KB, text/html)
2022-02-08 18:48 PST, halifirien
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description halifirien 2022-02-08 18:48:17 PST
Created attachment 451334 [details]
demo of issue

SVG getEnclosureList is effected by page zoom.

Attached is an html file with an svg element with 2 rectangles. The large rectangle entirely encloses a small rectangle. Calling `getBBox` on the large rectangle returns an SVGRect (box). Calling svg.getEnclosureList(box, svg) correctly returns the smaller rect.

Now when you use ⌘+ to Page zoom, getEnclosureList no longer returns any elements.

this effects safari 15, but I can confirm it also effect safari 13 (could not test 14)

thank you.
Comment 1 halifirien 2022-02-09 06:54:23 PST
chromium keeps svg.currentScale at 1; even at different page zoom levels. While webkits svg.currentScale tracks the page zoom.

however, you can manually set svg.currentScale - and adjusting it has no effect on svg.getEnclosureList on chromium.
Comment 2 halifirien 2022-02-09 08:08:52 PST
getEnclosureList (from svg/SVGSVGElement.cpp) appears to route to LegacyRenderSVGModelObject::checkEnclosure, even though a (modern?) RenderSVGModelObject::checkEnclosure exists.
Comment 3 halifirien 2022-02-09 09:09:55 PST
ah, I see that RenderSVGModelObject::checkEnclosure is very new (https://trac.webkit.org/changeset/287538/webkit) - and not even used anywhere yet
Comment 4 halifirien 2022-02-09 12:11:21 PST
maybe related to https://bugs.webkit.org/show_bug.cgi?id=194903
Comment 5 Radar WebKit Bug Importer 2022-02-14 19:58:23 PST
<rdar://problem/88943590>