Bug 216452

Summary: Add a key to the text manipulation userInfo dictionary indicating whether the translated item is on-screen
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebKit2Assignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ews-watchlist, mifenton, sihui_liu, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
darin: review+
Patch for landing none

Description Wenson Hsieh 2020-09-12 19:23:34 PDT
SSIA
Comment 1 Wenson Hsieh 2020-09-12 19:56:20 PDT
Created attachment 408631 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2020-09-12 19:56:46 PDT
<rdar://problem/68785397>
Comment 3 Darin Adler 2020-09-12 23:16:35 PDT
Comment on attachment 408631 [details]
Patch

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

> Source/WebCore/editing/TextManipulationController.cpp:300
> +        if (auto frame = makeRefPtr(node->document().frame()); frame->view() && element->renderer()) {

This doesn’t null check the frame. I think you want:

    ... frame()); frame && frame->view() && ...
Comment 4 Wenson Hsieh 2020-09-13 08:04:04 PDT
Comment on attachment 408631 [details]
Patch

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

>> Source/WebCore/editing/TextManipulationController.cpp:300
>> +        if (auto frame = makeRefPtr(node->document().frame()); frame->view() && element->renderer()) {
> 
> This doesn’t null check the frame. I think you want:
> 
>     ... frame()); frame && frame->view() && ...

Fixed! Good catch.
Comment 5 Wenson Hsieh 2020-09-13 08:07:32 PDT
Created attachment 408647 [details]
Patch for landing
Comment 6 EWS 2020-09-13 08:44:02 PDT
Committed r266993: <https://trac.webkit.org/changeset/266993>

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