Re: [svgwg] Shouldn't getCharNumAtPosition take an argument of type DOMPointReadOnly rather than DOMPoint

The Working Group just discussed `Shouldn't getCharNumAtPosition take an argument of type DOMPointReadOnly rather than DOMPoint`, and agreed to the following resolutions:

* `RESOLUTION: For SVG2 update getCharNumAtPosition  to take an argument of type DOMPointInit`
* `RESOLUTION: In addition to getCharNumAtPosition - all new methods that currently take DOMPoint should take DOMPointInit as an argument`

<details><summary>The full IRC log of that discussion</summary>
&lt;BogdanBrinza> topic: Shouldn't getCharNumAtPosition take an argument of type DOMPointReadOnly rather than DOMPoint<br>
&lt;BogdanBrinza> GitHub: https://github.com/w3c/svgwg/issues/389<br>
&lt;krit> ScribeNick: krit<br>
&lt;krit> krit: WG already agreed to replace DOMPoint with DomPointReadOnly. Request was to replace DOMPoiintReadOnly with DOMPointInit which relaxes the requirements even more.<br>
&lt;krit> dstorey: DOMPointInit is a dictionary with the properties x, y, z, w.<br>
&lt;krit> krit: DOMPointInit would allow users to use either DOMPointReadOnly, DOMPoint or a dictionary. Easier for users.<br>
&lt;krit> BogdanBrinza: Let me check for usage<br>
&lt;krit> BogdanBrinza: for low usage I wouldn't bother changing the code too much.<br>
&lt;krit> krit: SVGPoint was the argument before and it was not easy to figure out how to create it.<br>
&lt;krit> dstorey: IIRC SVGPoint is an alias to DOMPoint now.<br>
&lt;krit> krit: correct<br>
&lt;krit> krit: implementation wise it would be easier in WebKit and Blink at least to support DOMPointInit. Thought SVGPoint is an alias to DOMPoint, it currently isn't implemented that way.<br>
&lt;krit> krit: so more changes in this code path are required anyway for those two implementations.<br>
&lt;krit> BogdanBrinza: I would rather go with option 2 DOMPointReadOnly<br>
&lt;krit> krit: That requires changes to the implementation too. If you want to keep status quo we would need to keep DOMPoint.<br>
&lt;krit> BogdanBrinza: We should be fine if we have 2 implementation one of them being a browser<br>
&lt;krit> krit: InkScape and Adobe Illustrator do not support JS engine<br>
&lt;krit> BogdanBrinza: From our side we know it is implementable. Since we don't implement either version (DOMPointReadOnly or DOMPointInit) we should go with the better option.<br>
&lt;TabAtkins> Note that DOMPointInit means you can just pass in `{x:1, y:1}`, or any other point-like interface, rather than being limited to DOMPoints specifically.<br>
&lt;TabAtkins> (And thus, it's better.)<br>
&lt;TabAtkins> (Because there's nothing about DOMPoint *itself* that is required here, you just need to specify an x/y pair.)<br>
&lt;TabAtkins> Yeah, sure.<br>
&lt;BogdanBrinza> RESOLUTION: For SVG2 update getCharNumAtPosition  to take an argument of type DOMPointInit<br>
&lt;BogdanBrinza> RESOLUTION: In addition to getCharNumAtPosition - all new methods that currently take DOMPoint should take DOMPointInit as an argument<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/389#issuecomment-385493710 using your GitHub account

Received on Monday, 30 April 2018 18:52:16 UTC