WebKit should allow `mouseDidMoveOverElement` delegate callbacks on iOS. These callbacks are currently guarded to be macOS only in WKUIDelegatePrivate.h.
<rdar://problem/85318451>
Do you have a reason for wanting them?
Created attachment 451476 [details] Patch
We should be able to write a quick API test to exercise this codepath.
Comment on attachment 451476 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=451476&action=review > Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.h:28 > +#if PLATFORM(MAC) || HAVE(UIKIT_WITH_MOUSE_SUPPORT) This header is used outside WebKIt, and thus it can’t use PLATFORM() and HAVE() includes.
Comment on attachment 451476 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=451476&action=review >> Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.h:28 >> +#if PLATFORM(MAC) || HAVE(UIKIT_WITH_MOUSE_SUPPORT) > > This header is used outside WebKIt, and thus it can’t use PLATFORM() and HAVE() includes. Can’t use PLATFORM() and HAVE() macros.
Created attachment 451480 [details] Patch
Created attachment 451495 [details] Simple test case example (Example of an API test case that could be used to exercise the new API on iOS)
Comment on attachment 451480 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=451480&action=review > Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.h:28 > +#if TARGET_OS_OSX || TARGET_OS_IPHONE I'm pretty sure this condition is true everywhere that this file exists (IPHONE includes all of the iOS-derivatives), so maybe you can just delete it instead? Or maybe you meant TARGET_OS_IOS > Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:74 > +#if !PLATFORM(MAC) Why the inverted condition? Should be PLATFORM(IOS_FAMILY) or maybe the HAVE
(and yes, a test would be lovely)
Created attachment 451628 [details] Patch
Comment on attachment 451628 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=451628&action=review > Tools/TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:356 > + EXPECT_TRUE(hitTestResult != nullptr); Nit - ideally, this would be `EXPECT_NOT_NULL(hitTestResult);`
Created attachment 451763 [details] Patch
Created attachment 451765 [details] Patch
Committed r289694 (247179@main): <https://commits.webkit.org/247179@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 451765 [details].