[svgwg] Review implementation support - Basic Data Types and Interfaces

AmeliaBR has just created a new issue for https://github.com/w3c/svgwg:

== Review implementation support - Basic Data Types and Interfaces ==
- [Chapter 4, Basic Data Types and Interfaces, in SVG2 ED](https://svgwg.org/svg2-draft/types.html)
- Compare with [SVG 1.1 chapter 4](https://www.w3.org/TR/SVG11/types.html)
- [WPT tests](https://github.com/web-platform-tests/wpt/tree/master/svg/types)
- [Changes log](https://svgwg.org/svg2-draft/changes.html#types)

## Status of Changes Requiring Implementation

There are actually a lot of tests for this chapter, but I'm not sure how many of them have been updated for SVG 2.  So I'm listing the testable changes here, but if someone else can go through and cross-reference existing tests to see if any of them are already covered, that would help.

Regardless, it doesn't look like there are tests for some of the major interface reorganization work.

- [ ] All appearance of SVGMatrix were replaced by DOMMatrix or DOMMatrixReadOnly.
      All appearance of SVGRect were replaced by DOMRect or DOMRectReadOnly.
      All appearance of SVGPoint were replaced by DOMPoint or DOMPointReadOnly.

    Core tests for DOM interface support is in [css/geometry](https://github.com/web-platform-tests/wpt/tree/master/css/geometry).

    So we only need to test that the specific SVG DOM properties that use the interfaces have been updated to use the newer versions.

   Supported in Chrome/Firefox/maybe WebKit.

- [ ] Removed the SVGStylable and SVGLangSpace interfaces and moved all of their members on to SVGElement.

    [Test results for removed interfaces](https://wpt.fyi/results/svg/historical.html)  Passes in Chrome, Edge, Firefox, and Safari

    May need to confirm that the relevant properties are exposed via `SVGElement` interface.

- [ ] Turned SVGLocatable and SVGTransformable into SVGGraphicsElement, which directly inherits from SVGElement.
       Added an SVGGraphicsElement interface.

    May need to test that properties/methods are exposed on relevant elements via the new interface.

    Test that the old interfaces are not directly exposed [pass in all browsers](https://wpt.fyi/results/svg/historical.html)

- [ ] Added an SVGGeometryElement interface with isPointInFill and isPointInStroke methods.
    Specify DOMPointInit as argument type for isPointInFill() and isPointInStroke() instead of DOMPoint.

   Needs tests for the new methods. May need to be deferred, not sure if there are any implementations and we have an open issue (#456).

- [x] Removed the SVGExternalResourcesRequired interface.

   [Test result](https://wpt.fyi/results/svg/historical.html) Passes in Chrome, Edge, Firefox, and Safari

- [ ] <del>Added getStrokeBBox on SVGGraphicsElement to get the tight stroke bounding box.</del>
       Removed getStrokeBBox from SVGGraphicsElement and extended getBBox with a dictionary argument that controls which parts of the element are included in the returned bounding box.

    I think we agreed to defer this to 2.1 when we reviewed all IDL changes, but I don't see any open issues/PRs to make the edits.

- [ ] Allow leading and trailing whitespace in `<length>`, `<angle>`, `<number>` and `<integer>`.
      Make whitespace include form feed (U+000C) to align with CSS and HTML.
      Allow a single trailing comma-wsp in various list-typed attributes.

   Needs tests. I think these were all spec'd to match implementations (and CSS parsing), so I'm hoping support will be good.

- [x] Removed the xmlbase, xmllang and xmlspace attributes from the SVGElement interface.

   [Test results](https://wpt.fyi/results/svg/historical.html) each passes in 3/4 browsers.

- [x] Removed the SVGViewSpec interface.

   [Test result](https://wpt.fyi/results/svg/historical.html), passes in 3/4 browsers.

- [ ] Removed the getTransformToElement method on SVGGraphicsElement.

   Only Chrome has removed it: [Test result](https://wpt.fyi/results/svg/historical.html)

   I would personally be very, very happy if this method was _un_-removed, at least until it can be replaced by a CSSOM method that applies to all CSS-transformable elements! So many cool demos broke when Chrome removed it. (You can replace it with multiple getCTM/getScreenCTM + matrix invert method calls, but it's such a bother and that doesn't help existing code!)

- [ ] Defined that getCTM on an outermost svg element should work, and listed which transforms it should include.

   Needs tests.

- [ ] Defined attribute reflection in more depth, including the effect it has on SVG DOM object liveness.

   May need tests.

- [ ] animVal IDL attributes on all interfaces now alias baseVal

   Needs tests; I suspect results would be similar to the [SVGAnimatedPoints](https://github.com/web-platform-tests/wpt/pull/11847) test, which showed that no browsers have made the change.

- [ ] Added the dataset IDL attribute to SVGElement.

   Needs tests. I think we've got at least some implementations.

- [ ] Moved the pathLength attribute, getTotalLength(), and getPointAtLength() methods from SVGPathElement onto SVGGeometryElement.

   Needs tests. Implemented in Chrome and Firefox.

- [x] SVGUnitTypes is no longer NoInterfaceObject.

   There are passing tests on all browsers showing that it is [no longer exposed as a mixin](https://wpt.fyi/results/svg/historical.html), and pass or timeout for [SVGUnitTypes being exposed directly](https://wpt.fyi/results/svg/interfaces.html)

- [ ] Made SVGElement include the DocumentAndElementEventHandlers interface from HTML

   [Test pull request](https://github.com/web-platform-tests/wpt/pull/10249)

(PS, apologies for all the links to the same test results file, there's an open issue on wpt.fyi to add anchors for individual subtests: https://github.com/web-platform-tests/wpt.fyi/issues/270)

(Part of #487 Master issue)


Please view or discuss this issue at https://github.com/w3c/svgwg/issues/494 using your GitHub account

Received on Tuesday, 10 July 2018 04:54:53 UTC