Add WKBundleFrameCreateFrameHandle
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Jan 2018 00:05:00 +0000 (00:05 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Jan 2018 00:05:00 +0000 (00:05 +0000)
commitca490a5c9cb377a9161c511baf119e194a517001
tree9cac9829272a041aba538d3848800d3c678ec492
parentfe8e6d92bf64e83c9cc84d9518ee77bc163a39f3
Add WKBundleFrameCreateFrameHandle
https://bugs.webkit.org/show_bug.cgi?id=181232
<rdar://problem/35926696>

Reviewed by Tim Horton.

Source/WebKit:

InjectedBundle clients wanting to sent a _WKFrameHandle cannot without this function.
Before, they would just send the WKBundleFrameRef which would be changed into a WKFrameRef
in the UIProcess by WebProcessProxy::transformHandlesToObjects, but there is no ObjC equivalent
of WKFrameRef, so we were just getting a WKObject when we wanted a _WKFrameHandle.
We can't change WebProcessProxy::transformHandlesToObjects without being incompatible with the
existing C API, so let's add a way for clients to say "I want a _WKFrameHandle".

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundleFrameCreateFrameHandle):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/FrameHandleSerialization.mm: Added.
(mouseDidMoveOverElement):
(-[FrameHandleSerialization webProcessPlugIn:didCreateBrowserContextController:]):
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[MouseMoveOverElementDelegate _webView:mouseDidMoveOverElement:withFlags:userInfo:]):
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.h
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKitCocoa/FrameHandleSerialization.mm [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm