[svgwg] Issue: Revert change from SVGRect/SVGPoint/SVGMatrix to DOM equivalents (#706) marked as Agenda+

AmeliaBR has just labeled an issue for https://github.com/w3c/svgwg as "Agenda+":

== Revert change from SVGRect/SVGPoint/SVGMatrix to DOM equivalents ==
https://www.w3.org/TR/SVG2/types.html#SVGDOMOverview

SVG 1.1. had types SVGRect, SVGPoint and SVGMatrix.
In SVG2 these have been replaced by DOMRect, DOMPoint and DOMMatrix (or in some cases DOMRectReadOnly or DOMRectInit etc)

Unfortunately I don't think this is going to work. viewBox.animVal and viewBox.baseVal are live, if you change them the viewBox attribute changes. That means you need to have something derived from DOMRect/DOMRectReadOnly to model that and have DOMRect and DOMRectReadOnly methods be virtual.

The same is true of various DOMPoint, DOMMatrix things in the SVG2 spec too.

No browser has dropped SVGPoint etc and I suspect the above is the reason why. I don't think I can make the change in Firefox for instance because of performance concerns over having virtual functions.

So I'd like to propose that the specification reverts to SVGPoint, SVGMatrix and SVGRect except for inputs to methods (e.g. IsPointInFill), which can stay as DOMPointInit, DOMMatrixInit and DOMPointInit because those dictionaries merely want something with the appropriate properties so they will take an SVGPoint, SVGMatrix or SVGRect.

Note that some methods still don't take Init input argument e.g. getEnclosureList but perhaps I should raise that as a separate issue.


See https://github.com/w3c/svgwg/issues/706

Received on Tuesday, 15 October 2019 22:08:10 UTC