[webkit-reviews] review granted: [Bug 203687] SVGGeometryElement.getPointAtLength should clamp its argument to [0, length] : [Attachment 382481] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 31 12:37:20 PDT 2019
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 203687: SVGGeometryElement.getPointAtLength should clamp its argument to
[0, length]
https://bugs.webkit.org/show_bug.cgi?id=203687
Attachment 382481: Patch
https://bugs.webkit.org/attachment.cgi?id=382481&action=review
--- Comment #2 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 382481
--> https://bugs.webkit.org/attachment.cgi?id=382481
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=382481&action=review
> Source/WebCore/svg/SVGGeometryElement.cpp:64
> + // Sepc: If current element is a non-rendered element, throw an
InvalidStateError.
"Sepc"
> Source/WebCore/svg/SVGGeometryElement.cpp:68
> + // Sepc: Clamp distance to [0, length].
"Sepc"
> Source/WebCore/svg/SVGGeometryElement.cpp:69
> + distance = std::min<float>(std::max<float>(distance, 0),
getTotalLength());
We have a clampTo() function
> Source/WebCore/svg/SVGGeometryElement.cpp:71
> + // Sepc: Return a newly created, detached SVGPoint object.
"Sepc"
> Source/WebCore/svg/SVGPathElement.cpp:117
> + // Sepc: Clamp distance to [0, length].
> + distance = std::min<float>(std::max<float>(distance, 0),
getTotalLength());
> +
> + // Sepc: Return a newly created, detached SVGPoint object.
Ditto.
More information about the webkit-reviews
mailing list