Introduce new SPI for context menus on iOS
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jun 2019 02:10:51 +0000 (02:10 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jun 2019 02:10:51 +0000 (02:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=198590

Reviewed by Tim Horton.

Also introduce WKContextMenuElementInfo which is API.
This is part of <rdar://problem/51003503>

* Shared/API/APIObject.h:
* Shared/API/Cocoa/WebKit.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* Sources.txt:
* SourcesCocoa.txt:
* UIProcess/API/APIContextMenuElementInfo.cpp: Added.
(API::ContextMenuElementInfo::ContextMenuElementInfo):
* UIProcess/API/APIContextMenuElementInfo.h: Added.
* UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
* UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added.
(-[WKContextMenuElementInfo linkURL]):
(-[WKContextMenuElementInfo _apiObject]):
(-[WKContextMenuElementInfo _activatedElementInfo]):
* UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
* UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
* UIProcess/API/Cocoa/WKPreviewElementInfo.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
* UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
(-[_WKActivatedElementInfo isAnimatedImage]):
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentViewInteraction.mm:
* WebKit.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246137 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 files changed:
Source/WebKit/ChangeLog
Source/WebKit/Shared/API/APIObject.h
Source/WebKit/Shared/API/Cocoa/WebKit.h
Source/WebKit/Shared/Cocoa/APIObject.mm
Source/WebKit/Sources.txt
Source/WebKit/SourcesCocoa.txt
Source/WebKit/UIProcess/API/APIContextMenuElementInfo.cpp [new file with mode: 0644]
Source/WebKit/UIProcess/API/APIContextMenuElementInfo.h [new file with mode: 0644]
Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfo.h [new file with mode: 0644]
Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfo.mm [new file with mode: 0644]
Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h [new file with mode: 0644]
Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h [new file with mode: 0644]
Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.h
Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.h
Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm
Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit/UIProcess/ios/WKActionSheetAssistant.h
Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm
Source/WebKit/UIProcess/ios/WKContentView.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/WebKit.xcodeproj/project.pbxproj

index 5546bd7..65f0c10 100644 (file)
@@ -1,3 +1,43 @@
+2019-06-05  Alex Christensen  <achristensen@webkit.org>
+
+        Introduce new SPI for context menus on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=198590
+
+        Reviewed by Tim Horton.
+
+        Also introduce WKContextMenuElementInfo which is API.
+        This is part of <rdar://problem/51003503>
+
+        * Shared/API/APIObject.h:
+        * Shared/API/Cocoa/WebKit.h:
+        * Shared/Cocoa/APIObject.mm:
+        (API::Object::newObject):
+        * Sources.txt:
+        * SourcesCocoa.txt:
+        * UIProcess/API/APIContextMenuElementInfo.cpp: Added.
+        (API::ContextMenuElementInfo::ContextMenuElementInfo):
+        * UIProcess/API/APIContextMenuElementInfo.h: Added.
+        * UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
+        * UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added.
+        (-[WKContextMenuElementInfo linkURL]):
+        (-[WKContextMenuElementInfo _apiObject]):
+        (-[WKContextMenuElementInfo _activatedElementInfo]):
+        * UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
+        * UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
+        * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
+        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
+        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
+        * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
+        (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
+        (-[_WKActivatedElementInfo isAnimatedImage]):
+        * UIProcess/ios/WKActionSheetAssistant.h:
+        * UIProcess/ios/WKActionSheetAssistant.mm:
+        (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
+        (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
+        * UIProcess/ios/WKContentView.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        * WebKit.xcodeproj/project.pbxproj:
+
 2019-06-05  Jer Noble  <jer.noble@apple.com>
 
         -[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
index de208c4..be8c78b 100644 (file)
@@ -109,6 +109,9 @@ public:
         ContentRuleList,
         ContentRuleListAction,
         ContentRuleListStore,
+#if PLATFORM(IOS_FAMILY)
+        ContextMenuElementInfo,
+#endif
         ContextMenuListener,
         CookieManager,
         CustomHeaderFields,
index 4b48a40..9a27b81 100644 (file)
@@ -27,6 +27,7 @@
 #import <WebKit/WKBackForwardListItem.h>
 #import <WebKit/WKContentRuleList.h>
 #import <WebKit/WKContentRuleListStore.h>
+#import <WebKit/WKContextMenuElementInfo.h>
 #import <WebKit/WKError.h>
 #import <WebKit/WKFoundation.h>
 #import <WebKit/WKFrameInfo.h>
index ee98ca3..d017e6f 100644 (file)
@@ -33,6 +33,7 @@
 #import "WKConnectionInternal.h"
 #import "WKContentRuleListInternal.h"
 #import "WKContentRuleListStoreInternal.h"
+#import "WKContextMenuElementInfoInternal.h"
 #import "WKFrameInfoInternal.h"
 #import "WKHTTPCookieStoreInternal.h"
 #import "WKNSArray.h"
@@ -313,6 +314,12 @@ void* Object::newObject(size_t size, Type type)
         wrapper = [WKContentRuleListStore alloc];
         break;
 
+#if PLATFORM(IOS_FAMILY)
+    case Type::ContextMenuElementInfo:
+        wrapper = [WKContextMenuElementInfo alloc];
+        break;
+#endif
+
     case Type::CustomHeaderFields:
         wrapper = [_WKCustomHeaderFields alloc];
         break;
index 75982f7..4a6ab5e 100644 (file)
@@ -300,6 +300,7 @@ UIProcess/API/APIAttachment.cpp
 UIProcess/API/APIContentRuleList.cpp
 UIProcess/API/APIContentRuleListAction.cpp
 UIProcess/API/APIContentRuleListStore.cpp
+UIProcess/API/APIContextMenuElementInfo.cpp
 UIProcess/API/APIExperimentalFeature.cpp
 UIProcess/API/APIFrameInfo.cpp
 UIProcess/API/APIHTTPCookieStore.cpp
index 3268933..46617be 100644 (file)
@@ -284,6 +284,7 @@ UIProcess/API/Cocoa/WKBrowsingContextGroup.mm
 UIProcess/API/Cocoa/WKConnection.mm
 UIProcess/API/Cocoa/WKContentRuleList.mm
 UIProcess/API/Cocoa/WKContentRuleListStore.mm
+UIProcess/API/Cocoa/WKContextMenuElementInfo.mm
 UIProcess/API/Cocoa/WKError.mm
 UIProcess/API/Cocoa/WKFrameInfo.mm
 UIProcess/API/Cocoa/WKHTTPCookieStore.mm
diff --git a/Source/WebKit/UIProcess/API/APIContextMenuElementInfo.cpp b/Source/WebKit/UIProcess/API/APIContextMenuElementInfo.cpp
new file mode 100644 (file)
index 0000000..0c092e6
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#include "config.h"
+#include "APIContextMenuElementInfo.h"
+
+#if PLATFORM(IOS_FAMILY)
+
+namespace API {
+
+ContextMenuElementInfo::ContextMenuElementInfo(const WebKit::InteractionInformationAtPosition& info)
+    : m_interactionInformation(info)
+{
+}
+
+} // namespace API
+
+#endif // PLATFORM(IOS_FAMILY)
diff --git a/Source/WebKit/UIProcess/API/APIContextMenuElementInfo.h b/Source/WebKit/UIProcess/API/APIContextMenuElementInfo.h
new file mode 100644 (file)
index 0000000..3488ec5
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#pragma once
+
+#if PLATFORM(IOS_FAMILY)
+
+#include "APIObject.h"
+#include "InteractionInformationAtPosition.h"
+
+namespace API {
+
+class ContextMenuElementInfo final : public ObjectImpl<Object::Type::ContextMenuElementInfo> {
+public:
+    template<typename... Args> static Ref<ContextMenuElementInfo> create(Args&&... args)
+    {
+        return adoptRef(*new ContextMenuElementInfo(std::forward<Args>(args)...));
+    }
+    
+    const WTF::URL& url() const { return m_interactionInformation.url; }
+
+    const WebKit::InteractionInformationAtPosition& interactionInformation() const { return m_interactionInformation; }
+
+private:
+    ContextMenuElementInfo(const WebKit::InteractionInformationAtPosition&);
+    
+    WebKit::InteractionInformationAtPosition m_interactionInformation;
+};
+
+} // namespace API
+
+#endif
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfo.h b/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfo.h
new file mode 100644 (file)
index 0000000..423ca59
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2019 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/WKFoundation.h>
+
+#if TARGET_OS_IPHONE
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+WK_CLASS_AVAILABLE(ios(WK_IOS_TBA))
+@interface WKContextMenuElementInfo : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+
+@property (nonatomic, readonly, nullable) NSURL *linkURL;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfo.mm b/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfo.mm
new file mode 100644 (file)
index 0000000..730d068
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2019 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 "config.h"
+#import "WKContextMenuElementInfoInternal.h"
+
+#if PLATFORM(IOS_FAMILY)
+
+#import "_WKActivatedElementInfoInternal.h"
+
+@implementation WKContextMenuElementInfo
+
+- (NSURL *)linkURL
+{
+    return _elementInfo->url();
+}
+
+- (API::Object&)_apiObject
+{
+    return *_elementInfo;
+}
+
+@end
+
+@implementation WKContextMenuElementInfo (WKPrivate)
+
+- (_WKActivatedElementInfo *)_activatedElementInfo
+{
+    return [_WKActivatedElementInfo activatedElementInfoWithInteractionInformationAtPosition:_elementInfo->interactionInformation()];
+}
+
+@end
+
+#endif
+
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h b/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h
new file mode 100644 (file)
index 0000000..e3f5ea3
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2019 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 "APIContextMenuElementInfo.h"
+#import "WKContextMenuElementInfo.h"
+#import "WKObject.h"
+
+#if PLATFORM(IOS_FAMILY)
+
+namespace WebKit {
+
+template<> struct WrapperTraits<API::ContextMenuElementInfo> {
+    using WrapperClass = WKContextMenuElementInfo;
+};
+
+}
+
+@interface WKContextMenuElementInfo () <WKObject> {
+@package
+    API::ObjectStorage<API::ContextMenuElementInfo> _elementInfo;
+}
+@end
+
+#endif // PLATFORM(IOS_FAMILY)
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h
new file mode 100644 (file)
index 0000000..0924839
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2019 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/WKContextMenuElementInfo.h>
+
+@class _WKActivatedElementInfo;
+
+@interface WKContextMenuElementInfo (WKPrivate)
+
+@property (nonatomic, copy, readonly) _WKActivatedElementInfo *_activatedElementInfo;
+
+@end
index 0573b22..e5d1196 100644 (file)
@@ -31,7 +31,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-WK_CLASS_AVAILABLE(ios(10.0))
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKContextMenuElementInfo", ios(10.0, WK_IOS_TBA))
 @interface WKPreviewElementInfo : NSObject <NSCopying>
 
 @property (nonatomic, readonly, nullable) NSURL *linkURL;
index bec2d64..e952ea8 100644 (file)
 @class _WKFrameHandle;
 
 #if TARGET_OS_IOS
+@class UIContextMenuConfiguration;
 @class UIDragItem;
 @class UITargetedDragPreview;
+@class WKContextMenuElementInfo;
+@protocol UIContextMenuInteractionCommitAnimating;
 @protocol UIDragSession;
 @protocol UIDropSession;
 #else
@@ -135,24 +138,33 @@ struct UIEdgeInsets;
 - (void)_webView:(WKWebView *)webView didNotHandleTapAsClickAtPoint:(CGPoint)point;
 - (BOOL)_webView:(WKWebView *)webView shouldRequestGeolocationAuthorizationForURL:(NSURL *)url isMainFrame:(BOOL)isMainFrame mainFrameURL:(NSURL *)mainFrameURL;
 - (void)_webView:(WKWebView *)webView requestGeolocationAuthorizationForURL:(NSURL *)url frame:(WKFrameInfo *)frame decisionHandler:(void (^)(BOOL authorized))decisionHandler WK_API_AVAILABLE(ios(11.0));
-- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url WK_API_AVAILABLE(ios(9.0));
-- (void)_webView:(WKWebView *)webView commitPreviewedViewController:(UIViewController *)previewedViewController WK_API_AVAILABLE(ios(9.0));
-- (void)_webView:(WKWebView *)webView willPreviewImageWithURL:(NSURL *)imageURL WK_API_AVAILABLE(ios(9.0));
-- (void)_webView:(WKWebView *)webView commitPreviewedImageWithURL:(NSURL *)imageURL WK_API_AVAILABLE(ios(9.0));
-- (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController committing:(BOOL)committing WK_API_AVAILABLE(ios(9.0));
-- (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController WK_API_AVAILABLE(ios(9.0));
+- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:completionHandler:", ios(9.0, WK_IOS_TBA));
+- (void)_webView:(WKWebView *)webView commitPreviewedViewController:(UIViewController *)previewedViewController WK_API_DEPRECATED_WITH_REPLACEMENT("webView:commitContextMenu:", ios(9.0, WK_IOS_TBA));
+- (void)_webView:(WKWebView *)webView willPreviewImageWithURL:(NSURL *)imageURL WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:completionHandler:", ios(9.0, WK_IOS_TBA));
+- (void)_webView:(WKWebView *)webView commitPreviewedImageWithURL:(NSURL *)imageURL WK_API_DEPRECATED_WITH_REPLACEMENT("webView:commitContextMenu:", ios(9.0, WK_IOS_TBA));
+- (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController committing:(BOOL)committing WK_API_DEPRECATED_WITH_REPLACEMENT("webView:dismissContextMenu:", ios(9.0, WK_IOS_TBA));
+- (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController WK_API_DEPRECATED_WITH_REPLACEMENT("webView:dismissContextMenu:", ios(9.0, WK_IOS_TBA));
+
+// This needs to be kept once there is an API version to continue to do callbacks for image element context menus.
+- (void)_webView:(WKWebView *)webView contextMenuConfigurationForElement:(WKContextMenuElementInfo *)elementInfo completionHandler:(void(^)(UIContextMenuConfiguration *))completionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA));
+
+// These can be removed once there is an API version.
+- (void)_webView:(WKWebView *)webView contextMenuForElement:(WKContextMenuElementInfo *)elementInfo willCommitWithAnimator:(id<UIContextMenuInteractionCommitAnimating>)animator WK_API_AVAILABLE(ios(WK_IOS_TBA));
+- (void)_webView:(WKWebView *)webView contextMenuWillPresentForElement:(WKContextMenuElementInfo *)elementInfo WK_API_AVAILABLE(ios(WK_IOS_TBA));
+- (void)_webView:(WKWebView *)webView contextMenuDidEndForElement:(WKContextMenuElementInfo *)elementInfo WK_API_AVAILABLE(ios(WK_IOS_TBA));
+
 - (BOOL)_webView:(WKWebView *)webView showCustomSheetForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(10.0));
 - (void)_webView:(WKWebView *)webView alternateActionForURL:(NSURL *)url WK_API_AVAILABLE(ios(10.0));
 - (NSArray *)_attachmentListForWebView:(WKWebView *)webView WK_API_AVAILABLE(ios(10.0));
 - (NSArray *)_attachmentListForWebView:(WKWebView *)webView sourceIsManaged:(BOOL*)sourceIsManaged WK_API_AVAILABLE(ios(10.3));
 - (NSUInteger)_webView:(WKWebView *)webView indexIntoAttachmentListForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(10.3));
 - (UIEdgeInsets)_webView:(WKWebView *)webView finalObscuredInsetsForScrollView:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset WK_API_AVAILABLE(ios(9.0));
-- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_API_AVAILABLE(ios(9.0));
-- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForAnimatedImageAtURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo imageSize:(CGSize)imageSize WK_API_AVAILABLE(ios(9.0));
+- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:", ios(9.0, WK_IOS_TBA));
+- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForAnimatedImageAtURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo imageSize:(CGSize)imageSize WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:", ios(9.0, WK_IOS_TBA));
 - (UIViewController *)_presentingViewControllerForWebView:(WKWebView *)webView WK_API_AVAILABLE(ios(10.0));
 - (void)_webView:(WKWebView *)webView getAlternateURLFromImage:(UIImage *)image completionHandler:(void (^)(NSURL *alternateURL, NSDictionary *userInfo))completionHandler WK_API_AVAILABLE(ios(11.0));
 - (NSURL *)_webView:(WKWebView *)webView alternateURLFromImage:(UIImage *)image userInfo:(NSDictionary **)userInfo WK_API_AVAILABLE(ios(11.0));
-- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForImage:(UIImage *)image alternateURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_API_AVAILABLE(ios(11.0));
+- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForImage:(UIImage *)image alternateURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:", ios(11.0, WK_IOS_TBA));
 - (NSArray *)_webView:(WKWebView *)webView adjustedDataInteractionItemProviders:(NSArray *)originalItemProviders WK_API_AVAILABLE(ios(11.0));
 - (NSArray *)_webView:(WKWebView *)webView adjustedDataInteractionItemProvidersForItemProvider:(id)itemProvider representingObjects:(NSArray *)representingObjects additionalData:(NSDictionary *)additionalData WK_API_AVAILABLE(ios(11.0));
 - (BOOL)_webView:(WKWebView *)webView performDataInteractionOperationWithItemProviders:(NSArray *)itemProviders WK_API_AVAILABLE(ios(11.0));
index 6a566db..f5875c2 100644 (file)
@@ -47,6 +47,7 @@ WK_CLASS_AVAILABLE(macos(10.10), ios(8.0))
 @property (nonatomic, readonly) _WKActivatedElementType type;
 @property (nonatomic, readonly) CGRect boundingRect;
 @property (nonatomic, readonly) NSString *ID WK_API_AVAILABLE(macos(10.12), ios(10.0));
+@property (nonatomic, readonly) BOOL isAnimatedImage WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
 #if TARGET_OS_IPHONE
 @property (nonatomic, readonly) NSDictionary *userInfo WK_API_AVAILABLE(ios(11.0));
 @property (nonatomic, readonly, copy) UIImage *image;
index 5430403..24615bd 100644 (file)
@@ -51,6 +51,7 @@
 #if PLATFORM(MAC)
     RetainPtr<NSImage> _nsImage;
 #endif
+    BOOL _animatedImage;
 }
 
 #if PLATFORM(IOS_FAMILY)
@@ -81,6 +82,7 @@
     
     _image = information.image;
     _ID = information.idAttribute;
+    _animatedImage = information.isAnimatedImage;
     
     return self;
 }
     return _interactionLocation;
 }
 
+- (BOOL)isAnimatedImage
+{
+    return _animatedImage;
+}
+
 #if PLATFORM(IOS_FAMILY)
 - (NSDictionary *)userInfo
 {
index dfa37ab..e40fd90 100644 (file)
@@ -140,6 +140,7 @@ class WebEditCommandProxy;
 class WebFrameProxy;
 class WebPageProxy;
 class WebProcessPool;
+class WebProcessProxy;
 struct ColorSpaceData;
 struct WebHitTestResultData;
 
index 08a3d30..254aef9 100644 (file)
@@ -1569,7 +1569,7 @@ void WebViewImpl::takeFocus(WebCore::FocusDirection direction)
 {
     NSView *webView = m_view.getAutoreleased();
 
-    if (direction == FocusDirectionForward) {
+    if (direction == WebCore::FocusDirectionForward) {
         // Since we're trying to move focus out of m_webView, and because
         // m_webView may contain subviews within it, we ask it for the next key
         // view of the last view in its key view loop. This makes m_webView
@@ -3611,7 +3611,7 @@ id WebViewImpl::accessibilityAttributeValue(NSString *attribute, id parameter)
     if ([attribute isEqualToString:@"AXConvertRelativeFrame"]) {
         if ([parameter isKindOfClass:[NSValue class]]) {
             NSRect rect = [(NSValue *)parameter rectValue];
-            return [NSValue valueWithRect:m_pageClient->rootViewToScreen(IntRect(rect))];
+            return [NSValue valueWithRect:m_pageClient->rootViewToScreen(WebCore::IntRect(rect))];
         }
     }
     
index cbb6e8a..17c1f3b 100644 (file)
@@ -38,6 +38,7 @@ struct InteractionInformationAtPosition;
 
 @class WKActionSheetAssistant;
 @class _WKActivatedElementInfo;
+@class _WKElementAction;
 @protocol WKActionSheetDelegate;
 
 @protocol WKActionSheetAssistantDelegate <NSObject>
@@ -76,8 +77,8 @@ struct InteractionInformationAtPosition;
 - (void)showDataDetectorsSheet;
 - (void)cleanupSheet;
 - (void)updateSheetPosition;
-- (RetainPtr<NSArray>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo;
-- (RetainPtr<NSArray>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo;
+- (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo;
+- (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo;
 - (BOOL)isShowingSheet;
 - (void)interactionDidStartWithPositionInformation:(const WebKit::InteractionInformationAtPosition&)information;
 - (NSArray *)currentAvailableActionTitles;
index b1d3dd8..ad0f41b 100644 (file)
@@ -529,7 +529,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
     [defaultActions addObject:[_WKElementAction _elementActionWithType:_WKElementActionTypeOpen assistant:self]];
 }
 
-- (RetainPtr<NSArray>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo
+- (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo
 {
     NSURL *targetURL = [elementInfo URL];
     if (!targetURL)
@@ -556,7 +556,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
     return defaultActions;
 }
 
-- (RetainPtr<NSArray>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo
+- (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo
 {
     NSURL *targetURL = [elementInfo URL];
 
index 2d5101b..421967a 100644 (file)
@@ -54,7 +54,7 @@ class WebProcessPool;
 @interface WKContentView : WKApplicationStateTrackingView {
 @package
     RefPtr<WebKit::WebPageProxy> _page;
-    WKWebView *_webView;
+    WKWebView *_webView; // FIXME: This should be made a WeakObjCPtr once everything that refers to it is moved to OpenSource.
 }
 
 #pragma clang diagnostic push
index 9a6d214..b68a1f5 100644 (file)
@@ -42,6 +42,7 @@
 #import "TextInputSPI.h"
 #import "UIKitSPI.h"
 #import "WKActionSheetAssistant.h"
+#import "WKContextMenuElementInfoInternal.h"
 #import "WKDatePickerViewController.h"
 #import "WKDrawingCoordinator.h"
 #import "WKError.h"
@@ -7515,7 +7516,9 @@ static NSString *previewIdentifierForElementAction(_WKElementAction *action)
 
             if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForAnimatedImageAtURL:defaultActions:elementInfo:imageSize:)]) {
                 RetainPtr<NSArray> actions = [_actionSheetAssistant defaultActionsForImageSheet:animatedImageElementInfo.get()];
+                ALLOW_DEPRECATED_DECLARATIONS_BEGIN
                 return [uiDelegate _webView:_webView previewViewControllerForAnimatedImageAtURL:targetURL defaultActions:actions.get() elementInfo:animatedImageElementInfo.get() imageSize:_positionInformation.image->size()];
+                ALLOW_DEPRECATED_DECLARATIONS_END
             }
         }
 
@@ -7537,11 +7540,14 @@ static NSString *previewIdentifierForElementAction(_WKElementAction *action)
             ALLOW_DEPRECATED_DECLARATIONS_END
         }
 
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForURL:defaultActions:elementInfo:)])
             return [uiDelegate _webView:_webView previewViewControllerForURL:targetURL defaultActions:actions.get() elementInfo:elementInfo.get()];
 
         if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForURL:)])
             return [uiDelegate _webView:_webView previewViewControllerForURL:targetURL];
+        ALLOW_DEPRECATED_DECLARATIONS_END
+
         return nil;
     }
 
@@ -7562,12 +7568,16 @@ static NSString *previewIdentifierForElementAction(_WKElementAction *action)
         RetainPtr<_WKActivatedElementInfo> elementInfo = adoptNS([[_WKActivatedElementInfo alloc] _initWithType:_WKActivatedElementTypeImage URL:alternateURL.get() imageURL:nil location:_positionInformation.request.point title:_positionInformation.title ID:_positionInformation.idAttribute rect:_positionInformation.bounds image:_positionInformation.image.get() userInfo:imageInfo.get()]);
         _page->startInteractionWithElementAtPosition(_positionInformation.request.point);
 
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         if ([uiDelegate respondsToSelector:@selector(_webView:willPreviewImageWithURL:)])
             [uiDelegate _webView:_webView willPreviewImageWithURL:targetURL];
+        ALLOW_DEPRECATED_DECLARATIONS_END
 
         auto defaultActions = [_actionSheetAssistant defaultActionsForImageSheet:elementInfo.get()];
         if (imageInfo && [uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForImage:alternateURL:defaultActions:elementInfo:)]) {
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             UIViewController *previewViewController = [uiDelegate _webView:_webView previewViewControllerForImage:uiImage.get() alternateURL:alternateURL.get() defaultActions:defaultActions.get() elementInfo:elementInfo.get()];
+            ALLOW_DEPRECATED_DECLARATIONS_END
             if (previewViewController)
                 return previewViewController;
         }
@@ -7586,7 +7596,9 @@ static NSString *previewIdentifierForElementAction(_WKElementAction *action)
             const URL& imageURL = _positionInformation.imageURL;
             if (imageURL.isEmpty() || !(imageURL.protocolIsInHTTPFamily() || imageURL.protocolIs("data")))
                 return;
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             [uiDelegate _webView:_webView commitPreviewedImageWithURL:(NSURL *)imageURL];
+            ALLOW_DEPRECATED_DECLARATIONS_END
             return;
         }
         return;
@@ -7600,7 +7612,9 @@ static NSString *previewIdentifierForElementAction(_WKElementAction *action)
     }
 
     if ([uiDelegate respondsToSelector:@selector(_webView:commitPreviewedViewController:)]) {
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         [uiDelegate _webView:_webView commitPreviewedViewController:viewController];
+        ALLOW_DEPRECATED_DECLARATIONS_END
         return;
     }
 
@@ -7624,11 +7638,13 @@ static NSString *previewIdentifierForElementAction(_WKElementAction *action)
 - (void)_previewItemController:(UIPreviewItemController *)controller didDismissPreview:(UIViewController *)viewController committing:(BOOL)committing
 {
     id<WKUIDelegatePrivate> uiDelegate = static_cast<id <WKUIDelegatePrivate>>([_webView UIDelegate]);
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     if ([uiDelegate respondsToSelector:@selector(_webView:didDismissPreviewViewController:committing:)])
         [uiDelegate _webView:_webView didDismissPreviewViewController:viewController committing:committing];
     else if ([uiDelegate respondsToSelector:@selector(_webView:didDismissPreviewViewController:)])
         [uiDelegate _webView:_webView didDismissPreviewViewController:viewController];
-    
+    ALLOW_DEPRECATED_DECLARATIONS_END
+
     [_webView _didDismissForcePressPreview];
 }
 
index fe4b216..4bd2d8e 100644 (file)
                5C4B9D8B210A8CCF008F14D1 /* UndoOrRedo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C4B9D8A210A8C46008F14D1 /* UndoOrRedo.h */; };
                5C5D238C227A2CDA000B9BDA /* _WKCustomHeaderFields.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C5D2389227A1892000B9BDA /* _WKCustomHeaderFields.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5C62FDF91EFC271C00CE072E /* WKURLSchemeTaskPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C62FDF81EFC263C00CE072E /* WKURLSchemeTaskPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               5C795D70229F373F003FF1C4 /* WKContextMenuElementInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE0C369229F2D4A003695F0 /* WKContextMenuElementInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
+               5C795D71229F3757003FF1C4 /* WKContextMenuElementInfoPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE0C36A229F2D4A003695F0 /* WKContextMenuElementInfoPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5C7FB47021E97DC5009E3241 /* WebCookieJar.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C7FB46F21E97C0C009E3241 /* WebCookieJar.h */; };
                5C8BC797218CBB4800813886 /* SafeBrowsing.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5C8BC796218CB58A00813886 /* SafeBrowsing.xcassets */; };
                5C8DD3801FE4521600F2A556 /* WebsiteAutoplayPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C8DD37F1FE4519200F2A556 /* WebsiteAutoplayPolicy.h */; };
                5CD2864E1E722F440094FDC8 /* WKContentRuleListStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKContentRuleListStore.mm; sourceTree = "<group>"; };
                5CD2864F1E722F440094FDC8 /* WKContentRuleListStoreInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentRuleListStoreInternal.h; sourceTree = "<group>"; };
                5CD286501E722F440094FDC8 /* WKContentRuleListStorePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentRuleListStorePrivate.h; sourceTree = "<group>"; };
+               5CE0C366229F2D3D003695F0 /* APIContextMenuElementInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIContextMenuElementInfo.cpp; sourceTree = "<group>"; };
+               5CE0C367229F2D3E003695F0 /* APIContextMenuElementInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIContextMenuElementInfo.h; sourceTree = "<group>"; };
+               5CE0C368229F2D4A003695F0 /* WKContextMenuElementInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKContextMenuElementInfo.mm; sourceTree = "<group>"; };
+               5CE0C369229F2D4A003695F0 /* WKContextMenuElementInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuElementInfo.h; sourceTree = "<group>"; };
+               5CE0C36A229F2D4A003695F0 /* WKContextMenuElementInfoPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuElementInfoPrivate.h; sourceTree = "<group>"; };
+               5CE0C36B229F2D4B003695F0 /* WKContextMenuElementInfoInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuElementInfoInternal.h; sourceTree = "<group>"; };
                5CE85B1F1C88E6430070BFCE /* PingLoad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PingLoad.h; sourceTree = "<group>"; };
                5CE9120B2293C1E0005BEC78 /* WKMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKMain.h; sourceTree = "<group>"; };
                5CE9120C2293C1E0005BEC78 /* WKMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKMain.mm; sourceTree = "<group>"; };
                                5CD2864E1E722F440094FDC8 /* WKContentRuleListStore.mm */,
                                5CD2864F1E722F440094FDC8 /* WKContentRuleListStoreInternal.h */,
                                5CD286501E722F440094FDC8 /* WKContentRuleListStorePrivate.h */,
+                               5CE0C369229F2D4A003695F0 /* WKContextMenuElementInfo.h */,
+                               5CE0C368229F2D4A003695F0 /* WKContextMenuElementInfo.mm */,
+                               5CE0C36B229F2D4B003695F0 /* WKContextMenuElementInfoInternal.h */,
+                               5CE0C36A229F2D4A003695F0 /* WKContextMenuElementInfoPrivate.h */,
                                1AF4592D19464B2000F9D4A2 /* WKError.h */,
                                1AF4592C19464B2000F9D4A2 /* WKError.mm */,
                                1A2D252A194688FD004537B0 /* WKErrorInternal.h */,
                                7C3A06A51AAB903E009D74BA /* APIContentRuleListStore.cpp */,
                                7C3A06A61AAB903E009D74BA /* APIContentRuleListStore.h */,
                                076E884D1A13CADF005E90FC /* APIContextMenuClient.h */,
+                               5CE0C366229F2D3D003695F0 /* APIContextMenuElementInfo.cpp */,
+                               5CE0C367229F2D3E003695F0 /* APIContextMenuElementInfo.h */,
                                5C5D238A227A1D9B000B9BDA /* APICustomHeaderFields.h */,
                                7A821F4F1E2F7A5C00604577 /* APICustomProtocolManagerClient.h */,
                                83891B621A68B3420030F386 /* APIDiagnosticLoggingClient.h */,
                                1A445BA3184D5FCF004B3414 /* WKContextDownloadClient.h in Headers */,
                                1A445BA1184D5FC1004B3414 /* WKContextHistoryClient.h in Headers */,
                                1A445B9F184D5FB5004B3414 /* WKContextInjectedBundleClient.h in Headers */,
+                               5C795D70229F373F003FF1C4 /* WKContextMenuElementInfo.h in Headers */,
+                               5C795D71229F3757003FF1C4 /* WKContextMenuElementInfoPrivate.h in Headers */,
                                51A555F6128C6C47009ABCEC /* WKContextMenuItem.h in Headers */,
                                51A55601128C6D92009ABCEC /* WKContextMenuItemTypes.h in Headers */,
                                A1EA02381DABFF7E0096021F /* WKContextMenuListener.h in Headers */,