Changeset 226471 in webkit
- Timestamp:
- Jan 5, 2018, 4:05:00 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r226470 r226471 1 2018-01-05 Alex Christensen <achristensen@webkit.org> 2 3 Add WKBundleFrameCreateFrameHandle 4 https://bugs.webkit.org/show_bug.cgi?id=181232 5 <rdar://problem/35926696> 6 7 Reviewed by Tim Horton. 8 9 InjectedBundle clients wanting to sent a _WKFrameHandle cannot without this function. 10 Before, they would just send the WKBundleFrameRef which would be changed into a WKFrameRef 11 in the UIProcess by WebProcessProxy::transformHandlesToObjects, but there is no ObjC equivalent 12 of WKFrameRef, so we were just getting a WKObject when we wanted a _WKFrameHandle. 13 We can't change WebProcessProxy::transformHandlesToObjects without being incompatible with the 14 existing C API, so let's add a way for clients to say "I want a _WKFrameHandle". 15 16 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: 17 (WKBundleFrameCreateFrameHandle): 18 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 19 1 20 2018-01-05 Wenson Hsieh <wenson_hsieh@apple.com> 2 21 -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
r223934 r226471 29 29 30 30 #include "APIArray.h" 31 #include "APIFrameHandle.h" 31 32 #include "APIString.h" 32 33 #include "APIURL.h" … … 171 172 } 172 173 174 WKFrameHandleRef WKBundleFrameCreateFrameHandle(WKBundleFrameRef bundleFrameRef) 175 { 176 return toAPI(&API::FrameHandle::create(toImpl(bundleFrameRef)->frameID()).leakRef()); 177 } 178 173 179 void WKBundlePageClickMenuItem(WKBundlePageRef pageRef, WKContextMenuItemRef item) 174 180 { -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.h
r211744 r226471 68 68 WK_EXPORT WKBundlePageGroupRef WKBundlePageGetPageGroup(WKBundlePageRef page); 69 69 WK_EXPORT WKBundleFrameRef WKBundlePageGetMainFrame(WKBundlePageRef page); 70 WK_EXPORT WKFrameHandleRef WKBundleFrameCreateFrameHandle(WKBundleFrameRef); 70 71 71 72 WK_EXPORT WKBundleBackForwardListRef WKBundlePageGetBackForwardList(WKBundlePageRef page); -
trunk/Tools/ChangeLog
r226450 r226471 1 2018-01-05 Alex Christensen <achristensen@webkit.org> 2 3 Add WKBundleFrameCreateFrameHandle 4 https://bugs.webkit.org/show_bug.cgi?id=181232 5 <rdar://problem/35926696> 6 7 Reviewed by Tim Horton. 8 9 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 10 * TestWebKitAPI/Tests/WebKitCocoa/FrameHandleSerialization.mm: Added. 11 (mouseDidMoveOverElement): 12 (-[FrameHandleSerialization webProcessPlugIn:didCreateBrowserContextController:]): 13 * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: 14 (-[MouseMoveOverElementDelegate _webView:mouseDidMoveOverElement:withFlags:userInfo:]): 15 (TEST): 16 1 17 2018-01-05 Chris Fleizach <cfleizach@apple.com> 2 18 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r226412 r226471 257 257 5CB3CE391FA1697F00C3A2D6 /* WKWebViewConfiguration.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CB3CE381FA1691700C3A2D6 /* WKWebViewConfiguration.mm */; }; 258 258 5CB40B4E1F4B98D3007DC7B9 /* UIDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CB40B4D1F4B98BE007DC7B9 /* UIDelegate.mm */; }; 259 5CB5B3C21FFC55CF00C27BB0 /* FrameHandleSerialization.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CB5B3BD1FFC517E00C27BB0 /* FrameHandleSerialization.mm */; }; 259 260 5CE354D91E70DA5C00BEFE3B /* WKContentExtensionStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CE354D81E70D9C300BEFE3B /* WKContentExtensionStore.mm */; }; 260 261 5CEAB5E11FA939F400A77FAA /* _WKInputDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CEAB5DF1FA937CB00A77FAA /* _WKInputDelegate.mm */; }; … … 1418 1419 5CB3CE381FA1691700C3A2D6 /* WKWebViewConfiguration.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewConfiguration.mm; sourceTree = "<group>"; }; 1419 1420 5CB40B4D1F4B98BE007DC7B9 /* UIDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIDelegate.mm; sourceTree = "<group>"; }; 1421 5CB5B3BD1FFC517E00C27BB0 /* FrameHandleSerialization.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FrameHandleSerialization.mm; sourceTree = "<group>"; }; 1420 1422 5CE354D81E70D9C300BEFE3B /* WKContentExtensionStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKContentExtensionStore.mm; sourceTree = "<group>"; }; 1421 1423 5CEAB5DF1FA937CB00A77FAA /* _WKInputDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKInputDelegate.mm; sourceTree = "<group>"; }; … … 2070 2072 2D8104CB1BEC13E70020DA46 /* FindInPage.mm */, 2071 2073 2D1FE0AF1AD465C1006CD9E6 /* FixedLayoutSize.mm */, 2074 5CB5B3BD1FFC517E00C27BB0 /* FrameHandleSerialization.mm */, 2072 2075 CD78E11A1DB7EA360014A2DE /* FullscreenDelegate.mm */, 2073 2076 3F1B52681D3D7129008D60C4 /* FullscreenLayoutConstraints.mm */, … … 3695 3698 5CB18BA81F5645E300EE23C4 /* ClickAutoFillButton.mm in Sources */, 3696 3699 A14FC58B1B89927100D107EB /* ContentFilteringPlugIn.mm in Sources */, 3700 5CB5B3C21FFC55CF00C27BB0 /* FrameHandleSerialization.mm in Sources */, 3697 3701 A13EBBAB1B87434600097110 /* PlatformUtilitiesCocoa.mm in Sources */, 3698 3702 1A4F81CF1BDFFD53004E672E /* RemoteObjectRegistryPlugIn.mm in Sources */, -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm
r226189 r226471 475 475 EXPECT_STREQ(hitTestResult.linkTitle.UTF8String, "link title"); 476 476 EXPECT_EQ(flags, NSEventModifierFlagShift); 477 EXPECT_STREQ(NSStringFromClass([(NSObject *)userInfo class]).UTF8String, "_WKFrameHandle"); 477 478 done = true; 478 479 } … … 482 483 TEST(WebKit, MouseMoveOverElement) 483 484 { 484 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 800, 600)]); 485 WKWebViewConfiguration *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"FrameHandleSerialization"]; 486 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 800, 600) configuration:configuration]); 485 487 [webView setUIDelegate:[[[MouseMoveOverElementDelegate alloc] init] autorelease]]; 486 488 [webView synchronouslyLoadHTMLString:@"<a href='http://example.com/path' title='link title'>link label</a>"];
Note:
See TracChangeset
for help on using the changeset viewer.