Title: [191136] trunk/Source/WebKit2
Revision
191136
Author
ander...@apple.com
Date
2015-10-15 14:16:03 -0700 (Thu, 15 Oct 2015)

Log Message

Add -[WKFrameInfo _handle]
https://bugs.webkit.org/show_bug.cgi?id=150185
rdar://problem/23132371

Reviewed by Tim Horton.

* UIProcess/API/APIFrameInfo.cpp:
(API::FrameInfo::FrameInfo):
* UIProcess/API/APIFrameInfo.h:
* UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo _handle]):
* UIProcess/API/Cocoa/WKFrameInfoInternal.h:
* UIProcess/API/Cocoa/WKFrameInfoPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPopupMenuProxy.h:
(WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
* WebKit2.xcodeproj/project.pbxproj:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (191135 => 191136)


--- trunk/Source/WebKit2/ChangeLog	2015-10-15 20:50:02 UTC (rev 191135)
+++ trunk/Source/WebKit2/ChangeLog	2015-10-15 21:16:03 UTC (rev 191136)
@@ -1,5 +1,27 @@
 2015-10-15  Anders Carlsson  <ander...@apple.com>
 
+        Add -[WKFrameInfo _handle]
+        https://bugs.webkit.org/show_bug.cgi?id=150185
+        rdar://problem/23132371
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/APIFrameInfo.cpp:
+        (API::FrameInfo::FrameInfo):
+        * UIProcess/API/APIFrameInfo.h:
+        * UIProcess/API/Cocoa/WKFrameInfo.mm:
+        (-[WKFrameInfo _handle]):
+        * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
+        * UIProcess/API/Cocoa/WKFrameInfoPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::showPopupMenu):
+        (WebKit::WebPageProxy::internalShowContextMenu):
+        * UIProcess/WebPopupMenuProxy.h:
+        (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
+        * WebKit2.xcodeproj/project.pbxproj:
+
+2015-10-15  Anders Carlsson  <ander...@apple.com>
+
         The menu location and menu items should be part of ContextMenuContextData
         https://bugs.webkit.org/show_bug.cgi?id=150182
 

Modified: trunk/Source/WebKit2/UIProcess/API/APIFrameInfo.cpp (191135 => 191136)


--- trunk/Source/WebKit2/UIProcess/API/APIFrameInfo.cpp	2015-10-15 20:50:02 UTC (rev 191135)
+++ trunk/Source/WebKit2/UIProcess/API/APIFrameInfo.cpp	2015-10-15 21:16:03 UTC (rev 191136)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "APIFrameInfo.h"
 
+#include "APIFrameHandle.h"
 #include "WebFrameProxy.h"
 
 namespace API {
@@ -35,6 +36,7 @@
     : m_isMainFrame(frame.isMainFrame())
     , m_request(WebCore::ResourceRequest(frame.url()))
     , m_securityOrigin(adoptRef(*SecurityOrigin::create(securityOrigin).leakRef()))
+    , m_handle(API::FrameHandle::create(frame.frameID()))
 {
 }
 

Modified: trunk/Source/WebKit2/UIProcess/API/APIFrameInfo.h (191135 => 191136)


--- trunk/Source/WebKit2/UIProcess/API/APIFrameInfo.h	2015-10-15 20:50:02 UTC (rev 191135)
+++ trunk/Source/WebKit2/UIProcess/API/APIFrameInfo.h	2015-10-15 21:16:03 UTC (rev 191136)
@@ -37,6 +37,8 @@
 
 namespace API {
 
+class FrameHandle;
+
 class FrameInfo final : public ObjectImpl<Object::Type::FrameInfo> {
 public:
     static Ref<FrameInfo> create(const WebKit::WebFrameProxy& frame, const WebCore::SecurityOrigin& securityOrigin)
@@ -49,11 +51,13 @@
     bool isMainFrame() const { return m_isMainFrame; }
     const WebCore::ResourceRequest& request() const { return m_request; }
     SecurityOrigin& securityOrigin() { return m_securityOrigin.get(); }
+    API::FrameHandle& handle() { return m_handle.get(); }
 
 private:
     bool m_isMainFrame;
     WebCore::ResourceRequest m_request;
     Ref<SecurityOrigin> m_securityOrigin;
+    Ref<FrameHandle> m_handle;
 };
 
 } // namespace API

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm (191135 => 191136)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm	2015-10-15 20:50:02 UTC (rev 191135)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm	2015-10-15 21:16:03 UTC (rev 191136)
@@ -29,6 +29,7 @@
 #if WK_API_ENABLED
 
 #import "WKSecurityOriginInternal.h"
+#import "_WKFrameHandleInternal.h"
 
 @implementation WKFrameInfo
 
@@ -73,5 +74,13 @@
 
 @end
 
+@implementation WKFrameInfo (WKPrivate)
+
+- (_WKFrameHandle *)_handle
+{
+    return WebKit::wrapper(_frameInfo->handle());
+}
+
+@end
 #endif
 

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h (191135 => 191136)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h	2015-10-15 20:50:02 UTC (rev 191135)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h	2015-10-15 21:16:03 UTC (rev 191136)
@@ -23,7 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import "WKFrameInfo.h"
+#import "WKFrameInfoPrivate.h"
 
 #if WK_API_ENABLED
 

Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoPrivate.h (from rev 191131, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h) (0 => 191136)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoPrivate.h	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoPrivate.h	2015-10-15 21:16:03 UTC (rev 191136)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebKit/WKFrameInfo.h>
+
+#if WK_API_ENABLED
+
+@class _WKFrameHandle;
+
+@interface WKFrameInfo (WKPrivate)
+
+@property (nonatomic, readonly, strong) _WKFrameHandle *_handle WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
+
+@end
+
+#endif

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (191135 => 191136)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2015-10-15 20:50:02 UTC (rev 191135)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2015-10-15 21:16:03 UTC (rev 191136)
@@ -292,6 +292,7 @@
 		1A66BF8F18A052ED002071B4 /* WKWebViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */; };
 		1A6F9F9011E13EFC00DB1371 /* CommandLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */; };
 		1A6F9FB711E1408500DB1371 /* CommandLinePOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6F9FB611E1408500DB1371 /* CommandLinePOSIX.cpp */; };
+		1A6FA21E1BD0435B00AAA650 /* WKFrameInfoPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6FA21D1BD0435B00AAA650 /* WKFrameInfoPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1A6FB7AE11E64B6800DB1371 /* PluginView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6FB7AC11E64B6800DB1371 /* PluginView.cpp */; };
 		1A6FB7AF11E64B6800DB1371 /* PluginView.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6FB7AD11E64B6800DB1371 /* PluginView.h */; };
 		1A6FB7D211E651E200DB1371 /* Plugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6FB7D011E651E200DB1371 /* Plugin.cpp */; };
@@ -2403,6 +2404,7 @@
 		1A6D14211B01681600785FF0 /* PluginService.32-64-10.9-10.10.Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "PluginService.32-64-10.9-10.10.Info.plist"; path = "PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist"; sourceTree = SOURCE_ROOT; };
 		1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = "<group>"; };
 		1A6F9FB611E1408500DB1371 /* CommandLinePOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLinePOSIX.cpp; sourceTree = "<group>"; };
+		1A6FA21D1BD0435B00AAA650 /* WKFrameInfoPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFrameInfoPrivate.h; sourceTree = "<group>"; };
 		1A6FB7AC11E64B6800DB1371 /* PluginView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginView.cpp; sourceTree = "<group>"; };
 		1A6FB7AD11E64B6800DB1371 /* PluginView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginView.h; sourceTree = "<group>"; };
 		1A6FB7D011E651E200DB1371 /* Plugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Plugin.cpp; sourceTree = "<group>"; };
@@ -5350,6 +5352,7 @@
 				37B5045119EEF31300CE2CF8 /* WKErrorPrivate.h */,
 				1A4D664A18A3030E00D82E21 /* WKFrameInfo.h */,
 				1A4D664918A3030E00D82E21 /* WKFrameInfo.mm */,
+				1A6FA21D1BD0435B00AAA650 /* WKFrameInfoPrivate.h */,
 				2DF9EEE71A78245500B6CFBE /* WKFrameInfoInternal.h */,
 				1A422F8A18B29B5400D8CD96 /* WKHistoryDelegatePrivate.h */,
 				1A5B1C4F1898606F004FCF9B /* WKNavigation.h */,
@@ -8024,6 +8027,7 @@
 				BC032D8F10F437A00058C15A /* WebPage.h in Headers */,
 				93A88B331BC6E9CD00ABA5C2 /* WebHitTestResultData.h in Headers */,
 				8372DB291A67562800C697C5 /* WebPageDiagnosticLoggingClient.h in Headers */,
+				1A6FA21E1BD0435B00AAA650 /* WKFrameInfoPrivate.h in Headers */,
 				BC7B6206129A0A6700D174A4 /* WebPageGroup.h in Headers */,
 				BC7B625212A43C9600D174A4 /* WebPageGroupData.h in Headers */,
 				BC7B621512A4219A00D174A4 /* WebPageGroupProxy.h in Headers */,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to