Bug 240157

Summary: Cache the viewport size inside SVGLengthContext
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: SVGAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, dino, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, kondapallykalyan, pdr, sabouhallawa, schenney, sergio, simon.fraser, webkit-bug-importer, zalan, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Simon Fraser (smfr) 2022-05-05 23:01:09 PDT
Cache the viewport size inside SVGLengthContext
Comment 1 Simon Fraser (smfr) 2022-05-05 23:02:38 PDT
Created attachment 458933 [details]
Patch
Comment 2 Nikolas Zimmermann 2022-05-06 00:09:21 PDT
Ok, with me. In LBSE downstream we directly cache the whole SVGLengthContext in SVGElement, for the same reason... (some FIXMES already present in the code regarding that)
Comment 3 Simon Fraser (smfr) 2022-05-06 14:12:27 PDT
Created attachment 458972 [details]
Patch
Comment 4 zalan 2022-05-09 12:29:46 PDT
Comment on attachment 458972 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458972&action=review

> Source/WebCore/svg/SVGLengthContext.cpp:290
> -        return false;
> +        return std::nullopt;

return { };

> Source/WebCore/svg/SVGLengthContext.cpp:314
> +        return std::nullopt;

here too
Comment 5 EWS 2022-05-09 13:57:27 PDT
Committed r293989 (250426@main): <https://commits.webkit.org/250426@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458972 [details].
Comment 6 Radar WebKit Bug Importer 2022-05-09 13:58:13 PDT
<rdar://problem/92984418>