← Back to release summary
Use DOMPointInit for getCharNumAtPosition, isPointInFill, isPointInStroke
- Category
- Miscellaneous
- Type
- Chromium catches up
- Status
- Enabled by default (Chrome 136)
- Intent stage
- None
Summary
This change brings Chromium code in line with the latest W3C spec
for SVGGeometryElement and SVGPathElement in terms of usage of
DOMPointInit over SVGPoint for getCharNumAtPosition, isPointInFill,
isPointInStroke.
The change has already landed: https://chromium-review.googlesource.com/c/chromium/src/+/6284886
Firefox and Safari already have this live making this a fairly safe change to land. Details for both added under Signals for both.
Motivation
To bring Chromium code in line with the latest W3C spec
for SVGGeometryElement and SVGPathElement in terms of usage of
DOMPointInit over SVGPoint for getCharNumAtPosition, isPointInFill,
isPointInStroke.
Standards & signals
- Specification: https://svgwg.org/svg2-draft
- Firefox: Shipped/Shipping — Firefox uses DOMPointInit already in the corresponding API: https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInFill
Also, WPT has been passing for Firefox indicating that they have implemented this already: https://wpt.fyi/results/svg/types/scripted/SVGGeometryElement.isPointInFill-01.svg
- Safari: Shipped/Shipping — Webkit (Safari) already uses DOMPointInit in these APIs.
Here is the commit link for one of the APIs:
https://github.com/WebKit/WebKit/commit/7589919c57641e1e3dac86872171d4d681e3f2d0
Also, WPT has been passing for Safari indicating that they have implemented this already: https://wpt.fyi/results/svg/types/scripted/SVGGeometryElement.isPointInFill-01.svg
- Web developers: No signals
- Tracking bug: https://issues.chromium.org/issues/40572887
View on chromestatus.com