v136 · miscellaneous
Use DOMPointInit for getCharNumAtPosition, isPointInFill, isPointInStroke
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.
concepts
-
SVG DOMPointInit
SVG geometry methods accept DOMPointInit dictionaries instead of legacy SVGPoint factories. Cleaner DOM API ergonomics.
-
Hit-test overlay
Live mousemove handler calling
isPointInFill / isPointInStrokewith plain{x, y}object literals — no SVGPoint factory ceremony. -
Method Explorer
All three updated methods fed off one cursor —
isPointInFill,isPointInStroke, andgetCharNumAtPosition— with per-result badges and shape presets to verify each method's behaviour. -
Coordinate Transform Lab
The key challenge:
DOMPointInitcoordinates must be in element-local space, not screen space. Click anywhere on a transformed SVG group to see the CTM-inverse conversion applied live, then watch all three methods (isPointInFill,isPointInStroke,getCharNumAtPosition) called with plain{x, y}literals.
why it shipped
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.