Bug 216452 - Add a key to the text manipulation userInfo dictionary indicating whether the translated item is on-screen
Summary: Add a key to the text manipulation userInfo dictionary indicating whether the...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-12 19:23 PDT by Wenson Hsieh
Modified: 2020-09-13 08:44 PDT (History)
6 users (show)

See Also:


Attachments
Patch (12.39 KB, patch)
2020-09-12 19:56 PDT, Wenson Hsieh
darin: review+
Details | Formatted Diff | Diff
Patch for landing (12.49 KB, patch)
2020-09-13 08:07 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

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