WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
226721
SVGSVGElement's currentView + useCurrentView are non-standard
https://bugs.webkit.org/show_bug.cgi?id=226721
Summary
SVGSVGElement's currentView + useCurrentView are non-standard
Philip Jägenstedt
Reported
2021-06-07 03:40:02 PDT
These two attributes on SVGSVGElement are gone from the spec:
https://github.com/w3c/svgwg/commit/4c26fd36937a65192024208d85c144a21071b057
https://www.w3.org/Graphics/SVG/WG/track/actions/3800?changelog
They were removed from Chromium here:
https://bugs.chromium.org/p/chromium/issues/detail?id=629445
Gecko doesn't have currentView, but the bug for removing useCurrentView is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1174097
Attachments
Patch
(2.76 KB, patch)
2022-09-24 10:04 PDT
,
Rob Buis
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
testcase-probe.html
(7.65 KB, text/html)
2026-08-16 18:50 PDT
,
Karl Dubost
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Cameron McCormack (:heycam)
Comment 1
2021-06-07 16:22:27 PDT
(In reply to Philip Jägenstedt from
comment #0
)
> Gecko doesn't have currentView, but the bug for removing useCurrentView is > here: >
https://bugzilla.mozilla.org/show_bug.cgi?id=1174097
That has a patch I wrote 6 years ago and didn't land. :-) Anyway, yes these are a straightforward removal.
Radar WebKit Bug Importer
Comment 2
2021-06-14 03:40:15 PDT
<
rdar://problem/79281167
>
Rob Buis
Comment 3
2022-09-24 10:04:14 PDT
Created
attachment 462585
[details]
Patch
Ahmad Saleem
Comment 4
2023-02-28 05:20:59 PST
https://wpt.fyi/results/svg/historical.html?label=experimental&label=master&aligned
Ahmad Saleem
Comment 5
2023-08-24 14:56:31 PDT
We have following as well:
https://github.com/w3c/svgwg/issues/747
To revert these changes, I tried to do this PR:
https://github.com/WebKit/WebKit/pull/13851
but now will look for input before proceeding. @Said - any input on above GitHub issue.
Karl Dubost
Comment 6
2026-08-16 18:50:47 PDT
Created
attachment 481069
[details]
testcase-probe.html 1. SVG 2 removed the SVGViewSpec interface and the currentView / useCurrentView properties in 2015. 2. Blink and Gecko removed them. 3. WebKit is the only engine that still exposes all three, and it fails the three WPT subtests that check for their absence.
https://wpt.fyi/results/svg/historical.html?label=master&label=experimental&aligned&q=svgviewSpec%20
Nobody is implementing the revert that svgwg#747 asks for.
https://github.com/w3c/svgwg/issues/747
The issue has been dormant since October 2019. The working group asked, aka "what real use case breaks?" and there was never an answer. * Deleting the two IDL lines (
bug 226721
) is genuinely two lines. * Deleting the SVGViewSpec class (
bug 260677
) is not, because WebKit uses that class as the live storage for the view-override state that the renderer reads. There is no useCounter because Chrome cannot count what it is not implementing. SVG 2 Removed: * The SVGViewSpec interface (the JavaScript object). * SVGSVGElement.currentView and SVGSVGElement.useCurrentView. * viewTarget on SVGViewElement, and zoomAndPan(...) from the fragment grammar. SVG 2 Kept (for now): * The SVGViewSpec grammar rule (a name in the fragment syntax description, not an object.) * The whole #svgView(...) feature, fully specified in §16.3.2.
https://w3c.github.io/svgwg/svg2-draft/linking.html#SVGFragmentIdentifiersDefinitions
* The <view> element, in §16.3.3.
https://w3c.github.io/svgwg/svg2-draft/linking.html#ViewElement
So MyDrawing.svg#svgView(viewBox(0,200,1000,1000)) is still a live, specified feature. What went away is the way to read the resulting view back out from script.
Karl Dubost
Comment 7
2026-08-16 18:52:37 PDT
Blink: removed in 2016, class kept out of reach svg_svg_element.idl declares neither property. Removed via crbug 629445. svg_view_spec.h:36 still declares class SVGViewSpec final : public GarbageCollected<SVGViewSpec>. That marking only means Blink's memory manager owns the object's lifetime. It is not marked as something JavaScript can hold a reference to, and it has no .idl file, so no page can reach it. The parsing machinery survives; the API does not. Gecko: never had currentView; removed useCurrentView in 2022 dom/webidl/SVGSVGElement.webidl declares only currentScale and currentTranslate. No SVGViewSpec in any .webidl file at all. The fragment arguments live in an internal-only class, SVGView at dom/svg/SVGSVGElement.h:36, whose own comment says "Stores svgView arguments of SVG fragment identifiers." useCurrentView was removed on 2022-10-12. Mozilla bug 1174097, commit 2c05875c25de, r=emilio. That was heycam's patch from 2015 finally landing, seven years later.
Karl Dubost
Comment 8
2026-08-16 18:55:08 PDT
The other part
bug 260677
is not trivial. WebKit uses SVGViewSpec as the live storage for the view-override state. Blink and Gecko use a throwaway internal object for the same job. So in WebKit the class is not a leftover wrapper sitting on top of the real implementation. It is the real implementation, and it happens to carry a web-exposed name.
Karl Dubost
Comment 9
2026-08-16 18:57:48 PDT
I think we should remove it and carry on with Ahmad PR.
https://github.com/WebKit/WebKit/pull/13851
I will propose to close the issue on the SVG WG.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug