Re: [svgwg] Update SVG interfaces to use mixins where possible in all SVG specs. Issue #353

In general, I'm supportive of the change. My main concern for reviewing is to make sure that you've caught all the relevant references. Below I summarize the changes made & the checks I made against them:

The following have been converted from `NoInterfaceObject` interfaces to Mixins:

- `SVGTests` (included in `SVGGraphicsElement`, and in `SVGAnimationElement` in the animation module)

- `SVGFitToViewBox` (included in `SVGSVGElement`, `SVGSymbolElement`, `SVGMarkerElement`, `SVGPatternElement`, `SVGViewElement`)

- `SVGZoomAndPan` (included in `SVGSVGElement`, `SVGViewElement`)

- `SVGURIReference` (included in `SVGUseElement`, `SVGMeshElement`, `SVGTextPathElement`, `SVGImageElement`, `SVGGradientElement`, `SVGPatternElement`, `SVGCursorElement`, `SVGScriptElement`, `SVGAElement`, and `SVGMPathElement` in the animation module)

- `SVGElementInstance` (included in `SVGElement`)

- `GetSVGDocument` (designed to be compatible with `HTMLIframeElement` and `HTMLObjectElement`, but [those interfaces currently define the method directly](https://html.spec.whatwg.org/multipage/iframe-embed-object.html) instead of implementing the interface, so we're not breaking anything there, although a follow-up PR could suggest they switch to the mixin structure)
 
- `SVGAnimatedPoints` (included in `SVGPolylineElement` and `SVGPolygonElement`)

- `SVGPathData` in the Paths Level 3 module

Those are all the eligible `NoInterfaceObject` interfaces in SVG 2, and all the interfaces that currently implement. I haven't checked the other modules myself, but I'm less worried about those since we're not asking anyone to implement them yet.

In addition, the following mixins defined in the HTML standard are now references as `includes` not `implements`:

- `GlobalEventHandlers` (included in `SVGElement`)
- `WindowEventHandlers` (included in `SVGSVGElement`)
- `HTMLHyperlinkElementUtils` (included in `SVGAElement`)

_However_, those interfaces are still being linked to W3C HTML 5.1 definitions, which used the `NoInterfaceObject` syntax (as does HTML 5.3 ED).  The link URLs are defined in [definitions.xml](https://github.com/w3c/svgwg/blob/master/master/definitions.xml), but there should be a WG resolution before switching from W3C to WHATWG as the definitive reference for HTML (we're not consistent throughout the spec prose, linking to either/both, but IDL is more formal).

Also note that [there is an open issue about conflicts implementing `HTMLHyperlinkElementUtils` in SVG elements](https://github.com/w3c/svgwg/issues/312) (although nothing in this PR makes that a bigger or smaller conflict).

The only other potentially-mixin interface implemented in SVG is `LinkStyle` (but that would need edits to [CSSOM](https://drafts.csswg.org/cssom-1/#the-linkstyle-interface) first, and then an update to SVG's reference definition URL to point to CSSOM instead of CSS 2).

Final comment: There should be an edit made to the changes appendix describing these changes (one line in the "changes to the entire spec" section should be fine).

That & a WG decision on cross-linking to the HTML specs, and I'd be able to sign off on this PR.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/svgwg/pull/376#issuecomment-372154459 using your GitHub account

Received on Sunday, 11 March 2018 22:15:19 UTC