Bug 231985

Summary: Do GraphicsContext and EventRegion clipping-related save/restore via RAII objects
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, changseok, esprehn+autocc, ews-watchlist, fred.wang, glenn, koivisto, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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>