Bug 278591
| Summary: | Align 'SVGGeometryElement::getPointAtLength' as per web specification order | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | SVG | Assignee: | Ahmad Saleem <ahmad.saleem792> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | sabouhallawa, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
Hi Team,
Based on feedback from Anne on this PR: https://github.com/WebKit/WebKit/pull/32623#pullrequestreview-2257548433
I noticed that this is applicable on another function as well.
In the spec (https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement), it is as follow:
1. If current element is a non-rendered element, and the UA is not able to compute the total length of the path, then throw an InvalidStateError.
2. Let length be the user agent's computed value for the total length of the path, in user units.
As with getTotalLength, this does not take into account the ‘pathLength’ attribute.
3. Clamp distance to [0, length].
4. Let (x, y) be the point on the path at distance distance.
5. Return a newly created, detached DOMPoint object representing the point (x, y).
__
So clamping come after 'if the current element...' case, so this bug is to change that and it does not affect anything else.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/134596316>
Ahmad Saleem
Pull request: https://github.com/WebKit/WebKit/pull/32656
EWS
Committed 282698@main (f2291919b015): <https://commits.webkit.org/282698@main>
Reviewed commits have been landed. Closing PR #32656 and removing active labels.