Bug 231985 - Do GraphicsContext and EventRegion clipping-related save/restore via RAII objects
Summary: Do GraphicsContext and EventRegion clipping-related save/restore via RAII obj...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-19 14:45 PDT by Simon Fraser (smfr)
Modified: 2021-10-22 08:51 PDT (History)
12 users (show)

See Also:


Attachments
Patch (23.32 KB, patch)
2021-10-19 14:47 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) 2021-10-19 14:45:02 PDT
Do GrpahicsContext and EventRegion clipping-related save/restore via RAII objects
Comment 1 Simon Fraser (smfr) 2021-10-19 14:47:07 PDT
Created attachment 441802 [details]
Patch
Comment 2 Antti Koivisto 2021-10-19 21:39:19 PDT
Comment on attachment 441802 [details]
Patch

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

> Source/WebCore/rendering/RenderLayer.cpp:3846
> +        GraphicsContextStateSaver stateSaver(context, false);
> +        EventRegionContextStateSaver eventRegionStateSaver(localPaintingInfo.eventRegionContext);

This seems bit error-prone. Maybe we should have another class (ClipStateSaver?) that owns both of these?
Comment 3 EWS 2021-10-22 08:50:29 PDT
Committed r284684 (243404@main): <https://commits.webkit.org/243404@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 441802 [details].
Comment 4 Radar WebKit Bug Importer 2021-10-22 08:51:14 PDT
<rdar://problem/84550921>