Mousemove events double-firing in Safari
<rdar://88025610>
Created attachment 453536 [details] WIP Patch
Created attachment 453544 [details] WIP Patch
Created attachment 453612 [details] Patch
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`.
Created attachment 453622 [details] Patch
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].
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.
(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.
(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!