RESOLVED FIXED 237342
Mousemove events double-firing in Safari
https://bugs.webkit.org/show_bug.cgi?id=237342
Summary Mousemove events double-firing in Safari
Chris Dumez
Reported 2022-03-01 13:34:05 PST
Mousemove events double-firing in Safari
Attachments
WIP Patch (8.99 KB, patch)
2022-03-01 13:35 PST, Chris Dumez
no flags
WIP Patch (10.98 KB, patch)
2022-03-01 15:50 PST, Chris Dumez
no flags
Patch (15.23 KB, patch)
2022-03-02 07:57 PST, Chris Dumez
no flags
Patch (15.59 KB, patch)
2022-03-02 09:10 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2022-03-01 13:34:16 PST
Chris Dumez
Comment 2 2022-03-01 13:35:53 PST
Created attachment 453536 [details] WIP Patch
Chris Dumez
Comment 3 2022-03-01 15:50:33 PST
Created attachment 453544 [details] WIP Patch
Chris Dumez
Comment 4 2022-03-02 07:57:38 PST
Wenson Hsieh
Comment 5 2022-03-02 08:36:10 PST
Comment on attachment 453612 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453612&action=review > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:696 > +- (void)_simulateMouseMove:(NSEvent *)event; Let's move this to WKWebViewPrivateForTestingMac.h instead. > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:185 > + WebKit::WebViewImpl* _impl; In modern code, ObjC ivars should go into the @implementation. I think ideally, this would also be a WeakPtr instead of a raw pointer. > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:191 > +- (instancetype)initWithViewImpl:(WebKit::WebViewImpl *)impl I think we would prefer to take WebKit::WebViewImpl& here if we don't expect to pass `nullptr`.
Chris Dumez
Comment 6 2022-03-02 09:10:46 PST
EWS
Comment 7 2022-03-02 11:41:11 PST
Committed r290743 (247987@main): <https://commits.webkit.org/247987@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 453622 [details].
Darin Adler
Comment 8 2022-03-02 11:42:54 PST
Comment on attachment 453622 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453622&action=review > Tools/WebKitTestRunner/mac/EventSenderProxy.mm:617 > + [static_cast<WKWebView*>(targetView) _simulateMouseMove:event]; In new code we should make a habit of using checked_objc_cast instead of static_cast.
Chris Dumez
Comment 9 2022-03-02 12:10:53 PST
(In reply to Darin Adler from comment #8) > Comment on attachment 453622 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=453622&action=review > > > Tools/WebKitTestRunner/mac/EventSenderProxy.mm:617 > > + [static_cast<WKWebView*>(targetView) _simulateMouseMove:event]; > > In new code we should make a habit of using checked_objc_cast instead of > static_cast. Nice, I'll fix.
Chris Dumez
Comment 10 2022-03-02 15:09:38 PST
(In reply to Chris Dumez from comment #9) > (In reply to Darin Adler from comment #8) > > Comment on attachment 453622 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=453622&action=review > > > > > Tools/WebKitTestRunner/mac/EventSenderProxy.mm:617 > > > + [static_cast<WKWebView*>(targetView) _simulateMouseMove:event]; > > > > In new code we should make a habit of using checked_objc_cast instead of > > static_cast. > > Nice, I'll fix. Fixed in <https://commits.webkit.org/r290757>, thanks!
Note You need to log in before you can comment on or make changes to this bug.