WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 203687
SVGGeometryElement.getPointAtLength should clamp its argument to [0, length]
https://bugs.webkit.org/show_bug.cgi?id=203687
Summary
SVGGeometryElement.getPointAtLength should clamp its argument to [0, length]
Said Abou-Hallawa
Reported
2019-10-31 11:16:31 PDT
The spec link is:
https://svgwg.org/svg2-draft/types.html#__svg__SVGGeometryElement__getPointAtLength
Attachments
Patch
(13.09 KB, patch)
2019-10-31 11:23 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Patch
(13.82 KB, patch)
2019-10-31 13:33 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2019-10-31 11:23:04 PDT
Created
attachment 382481
[details]
Patch
Simon Fraser (smfr)
Comment 2
2019-10-31 12:37:20 PDT
Comment on
attachment 382481
[details]
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.
Said Abou-Hallawa
Comment 3
2019-10-31 13:33:34 PDT
Created
attachment 382493
[details]
Patch
WebKit Commit Bot
Comment 4
2019-10-31 14:09:07 PDT
Comment on
attachment 382493
[details]
Patch Clearing flags on attachment: 382493 Committed
r251877
: <
https://trac.webkit.org/changeset/251877
>
WebKit Commit Bot
Comment 5
2019-10-31 14:09:09 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2019-10-31 14:10:13 PDT
<
rdar://problem/56794713
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug