Bug 203687

Summary: SVGGeometryElement.getPointAtLength should clamp its argument to [0, length]
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: SVGAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, dino, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, kondapallykalyan, krit, pdr, schenney, sergio, simon.fraser, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 200143    
Attachments:
Description Flags
Patch
none
Patch none

Said Abou-Hallawa
Reported 2019-10-31 11:16:31 PDT
Attachments
Patch (13.09 KB, patch)
2019-10-31 11:23 PDT, Said Abou-Hallawa
no flags
Patch (13.82 KB, patch)
2019-10-31 13:33 PDT, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2019-10-31 11:23:04 PDT
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
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
Note You need to log in before you can comment on or make changes to this bug.