Bug 240157 - Cache the viewport size inside SVGLengthContext
Summary: Cache the viewport size inside SVGLengthContext
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-05 23:01 PDT by Simon Fraser (smfr)
Modified: 2022-05-09 13:58 PDT (History)
16 users (show)

See Also:


Attachments
Patch (10.41 KB, patch)
2022-05-05 23:02 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (9.63 KB, patch)
2022-05-06 14:12 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>