Bug 237698

Summary: Fix WebContent jetsam that occurs when selecting text in a large e-mail
Product: WebKit Reporter: Ben Nham <nham>
Component: ScrollingAssignee: Ben Nham <nham>
Status: RESOLVED FIXED    
Severity: Normal CC: nham, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: iPhone / iPad   
OS: iOS 15   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch none

Description Ben Nham 2022-03-09 21:40:03 PST
WebContent often jetsams when selecting text in a large e-mail in MobileMail.
Comment 1 Ben Nham 2022-03-09 21:40:31 PST
rdar://88549631
Comment 2 Ben Nham 2022-03-09 21:41:20 PST
Created attachment 454314 [details]
Patch
Comment 3 Simon Fraser (smfr) 2022-03-09 21:50:39 PST
Comment on attachment 454314 [details]
Patch

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

> Source/WebCore/page/FrameView.cpp:2735
> +#if PLATFORM(IOS_FAMILY)
> +        tiledBacking->prepopulateRect(FloatRect(position, exposedContentRect().size()));
> +#else
> +        auto rect = FloatRect(position, visibleContentRect().size());
> +        if (auto exposedRect = viewExposedRect()) {
> +            exposedRect->setLocation(position);
> +            rect.intersect(*exposedRect);
> +        }
> +        tiledBacking->prepopulateRect(rect);
> +#endif

I generally prefer the #ifdef to just surround the argument computation, so there's only one line that calls tiledBacking->prepopulateRect().

Are you sure you want to change the macOS behavior at this time?
Comment 4 Ben Nham 2022-03-09 21:54:45 PST
It's probably better to leave the macOS path alone since content rects work differently on that platform and we don't have evidence of this bug on macOS.

I'll submit a newer version of the patch.
Comment 5 Ben Nham 2022-03-09 21:59:05 PST
Created attachment 454315 [details]
Patch
Comment 6 EWS 2022-03-11 09:40:53 PST
Committed r291175 (248335@main): <https://commits.webkit.org/248335@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 454315 [details].