Closed longsonr closed 5 years ago
I'm actually not even sure it should be a mixin. According to WebIDL:
Interface mixins allow the sharing of attributes, constants, and operations across multiple interfaces. If you’re only planning to extend a single interface, you might consider using a partial interface instead. https://heycam.github.io/webidl/#using-mixins-and-partials
As It is only included on SVGSVGElement, the WebIDL advice is to make it a partial. But as they're both in SVG, they should probably just be added to SVGSVGElement directly (assuming we want to keep them)
@dstorey SVGZoomAndPan is not just on SVGSVGElement, it's on SVGViewElement too.
Oh yes, I was confused by the comment above. I spotted that after commenting when scrolling up. Ignore the previous comment :D
As far as is if it is useful. The docs I've found for Edge say "The zoomAndPan attribute is not supported, except for the default magnify operation". A quick look at the code, I saw a comment that says zoomAndPan isn't implemented, so it looks like we have a very barebones implementation that doesn't do anything.
Which makes sense, as disabling zooming sounds like an accessibility issue and we don't respect that in the viewport meta either.
Not blocking updated 2.0 CR publication - assigning 2.1 WD milestone
The SVG Working Group just discussed Values in SVGZoomAndPan and SVGUnitTypes should be accessible to javascript
, and agreed to the following:
RESOLUTION: Change SVGUnitTypes interface from NoInterface to an actual interface to match UA implementation behavior
Oops. Looks like our resolution above was redundant. The change to SVGUnitTypes already went through in https://github.com/w3c/svgwg/pull/415, the issue was staying open because of SVGZoomAndPan.
But since the decision in #56 was to drop the zoom and pan attribute & its IDL reflection, the constants will be dropped too, so this issue can be closed.
Please: The SVG 2 specification
Makes it impossible to write var x = ZoomAndPan.SVG_ZOOMANDPAN_UNKNOWN as ZoomAndPan is [NoInterfaceObject].
Similarly with SVGUnitTypes.
This is not what either Chrome or Firefox do (both support accessing the ZoomAndPan interface values directly). In fact Firefox has tests that contain SVGUnitTypes so it's certainly likely that there's also usage of this in the wild.
I propose changing the ZoomAndPan interface to
Then having this as SVGZoomAndPanValues
And all existing users of ZoomAndPan i.e. SVGSVGElement and SVGViewElement would then implement SVGZoomAndPanValues
This would mean that an SVGSVGElement would not be an SVGZoomAndPan but you would be able to access its contents.
Similarly for SVGUnitTypes.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1241899 and https://bugzilla.mozilla.org/show_bug.cgi?id=1241898 for the Firefox implementation which is landing now. This will align Firefox with Chrome's implementation.