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

  1. SVG DOMPointInit

    SVG geometry methods accept DOMPointInit dictionaries instead of legacy SVGPoint factories. Cleaner DOM API ergonomics.

  2. Hit-test overlay

    Live mousemove handler calling isPointInFill / isPointInStroke with plain {x, y} object literals — no SVGPoint factory ceremony.

  3. Method Explorer

    All three updated methods fed off one cursor — isPointInFill, isPointInStroke, and getCharNumAtPosition — with per-result badges and shape presets to verify each method's behaviour.

  4. Coordinate Transform Lab

    The key challenge: DOMPointInit coordinates 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.

references