Bug 240030 - Right click using trackpad crashes Safari
Summary: Right click using trackpad crashes Safari
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kate Cheney
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-03 11:38 PDT by Kate Cheney
Modified: 2022-05-05 08:37 PDT (History)
6 users (show)

See Also:


Attachments
Patch (11.18 KB, patch)
2022-05-03 11:40 PDT, Kate Cheney
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (11.40 KB, patch)
2022-05-03 15:05 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (11.42 KB, patch)
2022-05-04 08:22 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Cheney 2022-05-03 11:38:18 PDT
Right click using trackpad crashes Safari
Comment 1 Kate Cheney 2022-05-03 11:40:09 PDT
Created attachment 458751 [details]
Patch
Comment 2 Chris Dumez 2022-05-03 13:20:02 PDT
Comment on attachment 458751 [details]
Patch

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

> Source/WebCore/page/EventHandler.cpp:572
> +    if (!m_frame.selection().selection().isContentEditable() && (!result.targetNode() || !result.targetNode()->isTextNode()))

nit: `!result.targetNode() || !result.targetNode()->isTextNode())` could be written as:
`!is<Text>(result.targetNode())`
Comment 3 Kate Cheney 2022-05-03 14:40:27 PDT
Nice! will fix that. Also looks like I might need to add #import <pal/spi/cocoa/RevealSPI.h> to make iOS sim happy.
Comment 4 Kate Cheney 2022-05-03 15:05:04 PDT
Created attachment 458759 [details]
Patch
Comment 5 Wenson Hsieh 2022-05-04 08:18:10 PDT
Comment on attachment 458759 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:179
> +    [webView synchronouslyLoadTestPageNamed:@"empty"];

I think you meant to rename this to "emptyTable" too.
Comment 6 Kate Cheney 2022-05-04 08:19:26 PDT
(In reply to Wenson Hsieh from comment #5)
> Comment on attachment 458759 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=458759&action=review
> 
> > Tools/TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:179
> > +    [webView synchronouslyLoadTestPageNamed:@"empty"];
> 
> I think you meant to rename this to "emptyTable" too.

I did indeed!
Comment 7 Kate Cheney 2022-05-04 08:22:25 PDT
Created attachment 458796 [details]
Patch
Comment 8 Kate Cheney 2022-05-05 08:17:14 PDT
rdar://91786269
Comment 9 Kate Cheney 2022-05-05 08:17:29 PDT
Comment on attachment 458796 [details]
Patch

API iOS test failures are unrelated.
Comment 10 EWS 2022-05-05 08:37:19 PDT
Committed r293835 (250308@main): <https://commits.webkit.org/250308@main>

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