Changeset 246252 in webkit
- Timestamp:
- Jun 9, 2019, 11:25:36 PM (7 years ago)
- Location:
- branches/safari-608.1.27-branch/Source/WebKit
- Files:
-
- 17 edited
- 6 copied
-
ChangeLog (modified) (1 diff)
-
Shared/API/APIObject.h (modified) (1 diff)
-
Shared/API/Cocoa/WebKit.h (modified) (1 diff)
-
Shared/Cocoa/APIObject.mm (modified) (2 diffs)
-
Sources.txt (modified) (1 diff)
-
SourcesCocoa.txt (modified) (1 diff)
-
UIProcess/API/APIContextMenuElementInfo.cpp (copied) (copied from branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.h ) (2 diffs)
-
UIProcess/API/APIContextMenuElementInfo.h (copied) (copied from branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.h ) (2 diffs)
-
UIProcess/API/Cocoa/WKContextMenuElementInfo.h (copied) (copied from branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.h ) (3 diffs)
-
UIProcess/API/Cocoa/WKContextMenuElementInfo.mm (copied) (copied from branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.h ) (2 diffs)
-
UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h (copied) (copied from branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.h ) (2 diffs)
-
UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h (copied) (copied from branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.h ) (2 diffs)
-
UIProcess/API/Cocoa/WKPreviewElementInfo.h (modified) (1 diff)
-
UIProcess/API/Cocoa/WKUIDelegatePrivate.h (modified) (3 diffs)
-
UIProcess/API/Cocoa/_WKActivatedElementInfo.h (modified) (1 diff)
-
UIProcess/API/Cocoa/_WKActivatedElementInfo.mm (modified) (3 diffs)
-
UIProcess/Cocoa/WebViewImpl.h (modified) (1 diff)
-
UIProcess/Cocoa/WebViewImpl.mm (modified) (2 diffs)
-
UIProcess/ios/WKActionSheetAssistant.h (modified) (2 diffs)
-
UIProcess/ios/WKActionSheetAssistant.mm (modified) (2 diffs)
-
UIProcess/ios/WKContentView.h (modified) (1 diff)
-
UIProcess/ios/WKContentViewInteraction.mm (modified) (8 diffs)
-
WebKit.xcodeproj/project.pbxproj (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608.1.27-branch/Source/WebKit/ChangeLog
r246251 r246252 1 2019-06-09 Babak Shafiei <bshafiei@apple.com> 2 3 Cherry-pick r246224. rdar://problem/51462498 4 5 Introduce new SPI for context menus on iOS 6 https://bugs.webkit.org/show_bug.cgi?id=198590 7 8 Reviewed by Tim Horton. 9 10 Also introduce WKContextMenuElementInfo which is API. 11 This is part of <rdar://problem/51003503> 12 13 * Shared/API/APIObject.h: 14 * Shared/API/Cocoa/WebKit.h: 15 * Shared/Cocoa/APIObject.mm: 16 (API::Object::newObject): 17 * Sources.txt: 18 * SourcesCocoa.txt: 19 * UIProcess/API/APIContextMenuElementInfo.cpp: Added. 20 (API::ContextMenuElementInfo::ContextMenuElementInfo): 21 * UIProcess/API/APIContextMenuElementInfo.h: Added. 22 * UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added. 23 * UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added. 24 (-[WKContextMenuElementInfo linkURL]): 25 (-[WKContextMenuElementInfo _apiObject]): 26 (-[WKContextMenuElementInfo _activatedElementInfo]): 27 * UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added. 28 * UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added. 29 * UIProcess/API/Cocoa/WKPreviewElementInfo.h: 30 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: 31 * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: 32 * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm: 33 (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]): 34 (-[_WKActivatedElementInfo isAnimatedImage]): 35 * UIProcess/ios/WKActionSheetAssistant.h: 36 * UIProcess/ios/WKActionSheetAssistant.mm: 37 (-[WKActionSheetAssistant defaultActionsForLinkSheet:]): 38 (-[WKActionSheetAssistant defaultActionsForImageSheet:]): 39 * UIProcess/ios/WKContentView.h: 40 * UIProcess/ios/WKContentViewInteraction.mm: 41 * WebKit.xcodeproj/project.pbxproj: 42 43 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246224 268f45cc-cd09-0410-ab3c-d52691b4dbfc 44 45 2019-06-05 Alex Christensen <achristensen@webkit.org> 46 47 Introduce new SPI for context menus on iOS 48 https://bugs.webkit.org/show_bug.cgi?id=198590 49 50 Reviewed by Tim Horton. 51 52 Also introduce WKContextMenuElementInfo which is API. 53 This is part of <rdar://problem/51003503> 54 55 * Shared/API/APIObject.h: 56 * Shared/API/Cocoa/WebKit.h: 57 * Shared/Cocoa/APIObject.mm: 58 (API::Object::newObject): 59 * Sources.txt: 60 * SourcesCocoa.txt: 61 * UIProcess/API/APIContextMenuElementInfo.cpp: Added. 62 (API::ContextMenuElementInfo::ContextMenuElementInfo): 63 * UIProcess/API/APIContextMenuElementInfo.h: Added. 64 * UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added. 65 * UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added. 66 (-[WKContextMenuElementInfo linkURL]): 67 (-[WKContextMenuElementInfo _apiObject]): 68 (-[WKContextMenuElementInfo _activatedElementInfo]): 69 * UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added. 70 * UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added. 71 * UIProcess/API/Cocoa/WKPreviewElementInfo.h: 72 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: 73 * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: 74 * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm: 75 (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]): 76 (-[_WKActivatedElementInfo isAnimatedImage]): 77 * UIProcess/ios/WKActionSheetAssistant.h: 78 * UIProcess/ios/WKActionSheetAssistant.mm: 79 (-[WKActionSheetAssistant defaultActionsForLinkSheet:]): 80 (-[WKActionSheetAssistant defaultActionsForImageSheet:]): 81 * UIProcess/ios/WKContentView.h: 82 * UIProcess/ios/WKContentViewInteraction.mm: 83 * WebKit.xcodeproj/project.pbxproj: 84 1 85 2019-06-09 Babak Shafiei <bshafiei@apple.com> 2 86 -
branches/safari-608.1.27-branch/Source/WebKit/Shared/API/APIObject.h
r245481 r246252 110 110 ContentRuleListAction, 111 111 ContentRuleListStore, 112 #if PLATFORM(IOS_FAMILY) 113 ContextMenuElementInfo, 114 #endif 112 115 ContextMenuListener, 113 116 CookieManager, -
branches/safari-608.1.27-branch/Source/WebKit/Shared/API/Cocoa/WebKit.h
r243787 r246252 28 28 #import <WebKit/WKContentRuleList.h> 29 29 #import <WebKit/WKContentRuleListStore.h> 30 #import <WebKit/WKContextMenuElementInfo.h> 30 31 #import <WebKit/WKError.h> 31 32 #import <WebKit/WKFoundation.h> -
branches/safari-608.1.27-branch/Source/WebKit/Shared/Cocoa/APIObject.mm
r245481 r246252 34 34 #import "WKContentRuleListInternal.h" 35 35 #import "WKContentRuleListStoreInternal.h" 36 #import "WKContextMenuElementInfoInternal.h" 36 37 #import "WKFrameInfoInternal.h" 37 38 #import "WKHTTPCookieStoreInternal.h" … … 314 315 break; 315 316 317 #if PLATFORM(IOS_FAMILY) 318 case Type::ContextMenuElementInfo: 319 wrapper = [WKContextMenuElementInfo alloc]; 320 break; 321 #endif 322 316 323 case Type::CustomHeaderFields: 317 324 wrapper = [_WKCustomHeaderFields alloc]; -
branches/safari-608.1.27-branch/Source/WebKit/Sources.txt
r245540 r246252 301 301 UIProcess/API/APIContentRuleListAction.cpp 302 302 UIProcess/API/APIContentRuleListStore.cpp 303 UIProcess/API/APIContextMenuElementInfo.cpp 303 304 UIProcess/API/APIExperimentalFeature.cpp 304 305 UIProcess/API/APIFrameInfo.cpp -
branches/safari-608.1.27-branch/Source/WebKit/SourcesCocoa.txt
r245540 r246252 283 283 UIProcess/API/Cocoa/WKContentRuleList.mm 284 284 UIProcess/API/Cocoa/WKContentRuleListStore.mm 285 UIProcess/API/Cocoa/WKContextMenuElementInfo.mm 285 286 UIProcess/API/Cocoa/WKError.mm 286 287 UIProcess/API/Cocoa/WKFrameInfo.mm -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/APIContextMenuElementInfo.cpp
r246251 r246252 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All rights reserved.2 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <WebKit/WKFoundation.h> 26 #include "config.h" 27 #include "APIContextMenuElementInfo.h" 27 28 28 #if TARGET_OS_IPHONE29 #if PLATFORM(IOS_FAMILY) 29 30 30 #import <Foundation/Foundation.h> 31 namespace API { 31 32 32 NS_ASSUME_NONNULL_BEGIN 33 ContextMenuElementInfo::ContextMenuElementInfo(const WebKit::InteractionInformationAtPosition& info) 34 : m_interactionInformation(info) 35 { 36 } 33 37 34 WK_CLASS_AVAILABLE(ios(10.0)) 35 @interface WKPreviewElementInfo : NSObject <NSCopying> 38 } // namespace API 36 39 37 @property (nonatomic, readonly, nullable) NSURL *linkURL; 38 39 @end 40 41 NS_ASSUME_NONNULL_END 42 43 #endif 40 #endif // PLATFORM(IOS_FAMILY) -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/APIContextMenuElementInfo.h
r246251 r246252 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All rights reserved.2 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 # import <WebKit/WKFoundation.h>26 #pragma once 27 27 28 #if TARGET_OS_IPHONE28 #if PLATFORM(IOS_FAMILY) 29 29 30 #import <Foundation/Foundation.h> 30 #include "APIObject.h" 31 #include "InteractionInformationAtPosition.h" 31 32 32 NS_ASSUME_NONNULL_BEGIN 33 namespace API { 33 34 34 WK_CLASS_AVAILABLE(ios(10.0)) 35 @interface WKPreviewElementInfo : NSObject <NSCopying> 35 class ContextMenuElementInfo final : public ObjectImpl<Object::Type::ContextMenuElementInfo> { 36 public: 37 template<typename... Args> static Ref<ContextMenuElementInfo> create(Args&&... args) 38 { 39 return adoptRef(*new ContextMenuElementInfo(std::forward<Args>(args)...)); 40 } 41 42 const WTF::URL& url() const { return m_interactionInformation.url; } 36 43 37 @property (nonatomic, readonly, nullable) NSURL *linkURL; 44 const WebKit::InteractionInformationAtPosition& interactionInformation() const { return m_interactionInformation; } 38 45 39 @end 46 private: 47 ContextMenuElementInfo(const WebKit::InteractionInformationAtPosition&); 48 49 WebKit::InteractionInformationAtPosition m_interactionInformation; 50 }; 40 51 41 NS_ASSUME_NONNULL_END 52 } // namespace API 42 53 43 54 #endif -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfo.h
r246251 r246252 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All rights reserved.2 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 32 32 NS_ASSUME_NONNULL_BEGIN 33 33 34 WK_CLASS_AVAILABLE(ios(10.0)) 35 @interface WKPreviewElementInfo : NSObject <NSCopying> 34 WK_CLASS_AVAILABLE(ios(WK_IOS_TBA)) 35 @interface WKContextMenuElementInfo : NSObject 36 37 - (instancetype)init NS_UNAVAILABLE; 36 38 37 39 @property (nonatomic, readonly, nullable) NSURL *linkURL; … … 42 44 43 45 #endif 46 -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfo.mm
r246251 r246252 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All rights reserved.2 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <WebKit/WKFoundation.h> 26 #import "config.h" 27 #import "WKContextMenuElementInfoInternal.h" 27 28 28 #if TARGET_OS_IPHONE29 #if PLATFORM(IOS_FAMILY) 29 30 30 #import <Foundation/Foundation.h>31 #import "_WKActivatedElementInfoInternal.h" 31 32 32 NS_ASSUME_NONNULL_BEGIN 33 @implementation WKContextMenuElementInfo 33 34 34 WK_CLASS_AVAILABLE(ios(10.0)) 35 @interface WKPreviewElementInfo : NSObject <NSCopying> 35 - (NSURL *)linkURL 36 { 37 return _elementInfo->url(); 38 } 36 39 37 @property (nonatomic, readonly, nullable) NSURL *linkURL; 40 - (API::Object&)_apiObject 41 { 42 return *_elementInfo; 43 } 38 44 39 45 @end 40 46 41 NS_ASSUME_NONNULL_END 47 @implementation WKContextMenuElementInfo (WKPrivate) 48 49 - (_WKActivatedElementInfo *)_activatedElementInfo 50 { 51 return [_WKActivatedElementInfo activatedElementInfoWithInteractionInformationAtPosition:_elementInfo->interactionInformation()]; 52 } 53 54 @end 42 55 43 56 #endif 57 -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h
r246251 r246252 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All rights reserved.2 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <WebKit/WKFoundation.h> 26 #import "APIContextMenuElementInfo.h" 27 #import "WKContextMenuElementInfo.h" 28 #import "WKObject.h" 27 29 28 #if TARGET_OS_IPHONE30 #if PLATFORM(IOS_FAMILY) 29 31 30 #import <Foundation/Foundation.h> 32 namespace WebKit { 31 33 32 NS_ASSUME_NONNULL_BEGIN 34 template<> struct WrapperTraits<API::ContextMenuElementInfo> { 35 using WrapperClass = WKContextMenuElementInfo; 36 }; 33 37 34 WK_CLASS_AVAILABLE(ios(10.0)) 35 @interface WKPreviewElementInfo : NSObject <NSCopying> 38 } 36 39 37 @property (nonatomic, readonly, nullable) NSURL *linkURL; 38 40 @interface WKContextMenuElementInfo () <WKObject> { 41 @package 42 API::ObjectStorage<API::ContextMenuElementInfo> _elementInfo; 43 } 39 44 @end 40 45 41 NS_ASSUME_NONNULL_END 42 43 #endif 46 #endif // PLATFORM(IOS_FAMILY) -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h
r246251 r246252 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All rights reserved.2 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <WebKit/WK Foundation.h>26 #import <WebKit/WKContextMenuElementInfo.h> 27 27 28 #if TARGET_OS_IPHONE 28 @class _WKActivatedElementInfo; 29 29 30 #import <Foundation/Foundation.h> 30 @interface WKContextMenuElementInfo (WKPrivate) 31 31 32 NS_ASSUME_NONNULL_BEGIN 33 34 WK_CLASS_AVAILABLE(ios(10.0)) 35 @interface WKPreviewElementInfo : NSObject <NSCopying> 36 37 @property (nonatomic, readonly, nullable) NSURL *linkURL; 32 @property (nonatomic, copy, readonly) _WKActivatedElementInfo *_activatedElementInfo; 38 33 39 34 @end 40 41 NS_ASSUME_NONNULL_END42 43 #endif -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.h
r242339 r246252 32 32 NS_ASSUME_NONNULL_BEGIN 33 33 34 WK_CLASS_ AVAILABLE(ios(10.0))34 WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKContextMenuElementInfo", ios(10.0, WK_IOS_TBA)) 35 35 @interface WKPreviewElementInfo : NSObject <NSCopying> 36 36 -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
r245294 r246252 41 41 42 42 #if TARGET_OS_IOS 43 @class UIContextMenuConfiguration; 43 44 @class UIDragItem; 44 45 @class UITargetedDragPreview; 46 @class WKContextMenuElementInfo; 47 @protocol UIContextMenuInteractionCommitAnimating; 45 48 @protocol UIDragSession; 46 49 @protocol UIDropSession; … … 136 139 - (BOOL)_webView:(WKWebView *)webView shouldRequestGeolocationAuthorizationForURL:(NSURL *)url isMainFrame:(BOOL)isMainFrame mainFrameURL:(NSURL *)mainFrameURL; 137 140 - (void)_webView:(WKWebView *)webView requestGeolocationAuthorizationForURL:(NSURL *)url frame:(WKFrameInfo *)frame decisionHandler:(void (^)(BOOL authorized))decisionHandler WK_API_AVAILABLE(ios(11.0)); 138 - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url WK_API_AVAILABLE(ios(9.0)); 139 - (void)_webView:(WKWebView *)webView commitPreviewedViewController:(UIViewController *)previewedViewController WK_API_AVAILABLE(ios(9.0)); 140 - (void)_webView:(WKWebView *)webView willPreviewImageWithURL:(NSURL *)imageURL WK_API_AVAILABLE(ios(9.0)); 141 - (void)_webView:(WKWebView *)webView commitPreviewedImageWithURL:(NSURL *)imageURL WK_API_AVAILABLE(ios(9.0)); 142 - (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController committing:(BOOL)committing WK_API_AVAILABLE(ios(9.0)); 143 - (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController WK_API_AVAILABLE(ios(9.0)); 141 142 - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:completionHandler:", ios(9.0, WK_IOS_TBA)); 143 - (void)_webView:(WKWebView *)webView commitPreviewedViewController:(UIViewController *)previewedViewController WK_API_DEPRECATED_WITH_REPLACEMENT("webView:commitContextMenu:", ios(9.0, WK_IOS_TBA)); 144 - (void)_webView:(WKWebView *)webView willPreviewImageWithURL:(NSURL *)imageURL WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:completionHandler:", ios(9.0, WK_IOS_TBA)); 145 - (void)_webView:(WKWebView *)webView commitPreviewedImageWithURL:(NSURL *)imageURL WK_API_DEPRECATED_WITH_REPLACEMENT("webView:commitContextMenu:", ios(9.0, WK_IOS_TBA)); 146 - (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController committing:(BOOL)committing WK_API_DEPRECATED_WITH_REPLACEMENT("webView:dismissContextMenu:", ios(9.0, WK_IOS_TBA)); 147 - (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController WK_API_DEPRECATED_WITH_REPLACEMENT("webView:dismissContextMenu:", ios(9.0, WK_IOS_TBA)); 148 149 #if TARGET_OS_IOS 150 // This needs to be removed once there is an API version to continue to do callbacks for image element context menus. 151 - (void)_webView:(WKWebView *)webView contextMenuConfigurationForElement:(WKContextMenuElementInfo *)elementInfo completionHandler:(void(^)(UIContextMenuConfiguration *))completionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA)); 152 153 // These can be removed once there is an API version. 154 - (void)_webView:(WKWebView *)webView contextMenuForElement:(WKContextMenuElementInfo *)elementInfo willCommitWithAnimator:(id<UIContextMenuInteractionCommitAnimating>)animator WK_API_AVAILABLE(ios(WK_IOS_TBA)); 155 - (void)_webView:(WKWebView *)webView contextMenuWillPresentForElement:(WKContextMenuElementInfo *)elementInfo WK_API_AVAILABLE(ios(WK_IOS_TBA)); 156 - (void)_webView:(WKWebView *)webView contextMenuDidEndForElement:(WKContextMenuElementInfo *)elementInfo WK_API_AVAILABLE(ios(WK_IOS_TBA)); 157 #endif 158 144 159 - (BOOL)_webView:(WKWebView *)webView showCustomSheetForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(10.0)); 145 160 - (void)_webView:(WKWebView *)webView alternateActionForURL:(NSURL *)url WK_API_AVAILABLE(ios(10.0)); … … 148 163 - (NSUInteger)_webView:(WKWebView *)webView indexIntoAttachmentListForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(10.3)); 149 164 - (UIEdgeInsets)_webView:(WKWebView *)webView finalObscuredInsetsForScrollView:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset WK_API_AVAILABLE(ios(9.0)); 150 - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_API_ AVAILABLE(ios(9.0));151 - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForAnimatedImageAtURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo imageSize:(CGSize)imageSize WK_API_ AVAILABLE(ios(9.0));165 - (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)); 166 - (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)); 152 167 - (UIViewController *)_presentingViewControllerForWebView:(WKWebView *)webView WK_API_AVAILABLE(ios(10.0)); 153 168 - (void)_webView:(WKWebView *)webView getAlternateURLFromImage:(UIImage *)image completionHandler:(void (^)(NSURL *alternateURL, NSDictionary *userInfo))completionHandler WK_API_AVAILABLE(ios(11.0)); 154 169 - (NSURL *)_webView:(WKWebView *)webView alternateURLFromImage:(UIImage *)image userInfo:(NSDictionary **)userInfo WK_API_AVAILABLE(ios(11.0)); 155 - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForImage:(UIImage *)image alternateURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_API_ AVAILABLE(ios(11.0));170 - (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)); 156 171 - (NSArray *)_webView:(WKWebView *)webView adjustedDataInteractionItemProviders:(NSArray *)originalItemProviders WK_API_AVAILABLE(ios(11.0)); 157 172 - (NSArray *)_webView:(WKWebView *)webView adjustedDataInteractionItemProvidersForItemProvider:(id)itemProvider representingObjects:(NSArray *)representingObjects additionalData:(NSDictionary *)additionalData WK_API_AVAILABLE(ios(11.0)); -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.h
r244368 r246252 48 48 @property (nonatomic, readonly) CGRect boundingRect; 49 49 @property (nonatomic, readonly) NSString *ID WK_API_AVAILABLE(macos(10.12), ios(10.0)); 50 @property (nonatomic, readonly) BOOL isAnimatedImage WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 50 51 #if TARGET_OS_IPHONE 51 52 @property (nonatomic, readonly) NSDictionary *userInfo WK_API_AVAILABLE(ios(11.0)); -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm
r244368 r246252 52 52 RetainPtr<NSImage> _nsImage; 53 53 #endif 54 BOOL _animatedImage; 54 55 } 55 56 … … 82 83 _image = information.image; 83 84 _ID = information.idAttribute; 85 _animatedImage = information.isAnimatedImage; 84 86 85 87 return self; … … 137 139 } 138 140 141 - (BOOL)isAnimatedImage 142 { 143 return _animatedImage; 144 } 145 139 146 #if PLATFORM(IOS_FAMILY) 140 147 - (NSDictionary *)userInfo -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
r245072 r246252 141 141 class WebPageProxy; 142 142 class WebProcessPool; 143 class WebProcessProxy; 143 144 struct ColorSpaceData; 144 145 struct WebHitTestResultData; -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
r245796 r246252 1570 1570 NSView *webView = m_view.getAutoreleased(); 1571 1571 1572 if (direction == FocusDirectionForward) {1572 if (direction == WebCore::FocusDirectionForward) { 1573 1573 // Since we're trying to move focus out of m_webView, and because 1574 1574 // m_webView may contain subviews within it, we ask it for the next key … … 3612 3612 if ([parameter isKindOfClass:[NSValue class]]) { 3613 3613 NSRect rect = [(NSValue *)parameter rectValue]; 3614 return [NSValue valueWithRect:m_pageClient->rootViewToScreen( IntRect(rect))];3614 return [NSValue valueWithRect:m_pageClient->rootViewToScreen(WebCore::IntRect(rect))]; 3615 3615 } 3616 3616 } -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.h
r242801 r246252 39 39 @class WKActionSheetAssistant; 40 40 @class _WKActivatedElementInfo; 41 @class _WKElementAction; 41 42 @protocol WKActionSheetDelegate; 42 43 … … 77 78 - (void)cleanupSheet; 78 79 - (void)updateSheetPosition; 79 - (RetainPtr<NSArray >)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo;80 - (RetainPtr<NSArray >)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo;80 - (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo; 81 - (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo; 81 82 - (BOOL)isShowingSheet; 82 83 - (void)interactionDidStartWithPositionInformation:(const WebKit::InteractionInformationAtPosition&)information; -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm
r244955 r246252 530 530 } 531 531 532 - (RetainPtr<NSArray >)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo532 - (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo 533 533 { 534 534 NSURL *targetURL = [elementInfo URL]; … … 551 551 } 552 552 553 - (RetainPtr<NSArray >)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo553 - (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo 554 554 { 555 555 NSURL *targetURL = [elementInfo URL]; -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/ios/WKContentView.h
r245272 r246252 55 55 @package 56 56 RefPtr<WebKit::WebPageProxy> _page; 57 WKWebView *_webView; 57 WKWebView *_webView; // FIXME: This should be made a WeakObjCPtr once everything that refers to it is moved to OpenSource. 58 58 } 59 59 -
branches/safari-608.1.27-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r246251 r246252 43 43 #import "UIKitSPI.h" 44 44 #import "WKActionSheetAssistant.h" 45 #import "WKContextMenuElementInfoInternal.h" 45 46 #import "WKDatePickerViewController.h" 46 47 #import "WKDrawingCoordinator.h" … … 7521 7522 if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForAnimatedImageAtURL:defaultActions:elementInfo:imageSize:)]) { 7522 7523 RetainPtr<NSArray> actions = [_actionSheetAssistant defaultActionsForImageSheet:animatedImageElementInfo.get()]; 7524 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 7523 7525 return [uiDelegate _webView:_webView previewViewControllerForAnimatedImageAtURL:targetURL defaultActions:actions.get() elementInfo:animatedImageElementInfo.get() imageSize:_positionInformation.image->size()]; 7526 ALLOW_DEPRECATED_DECLARATIONS_END 7524 7527 } 7525 7528 } … … 7543 7546 } 7544 7547 7548 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 7545 7549 if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForURL:defaultActions:elementInfo:)]) 7546 7550 return [uiDelegate _webView:_webView previewViewControllerForURL:targetURL defaultActions:actions.get() elementInfo:elementInfo.get()]; … … 7548 7552 if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForURL:)]) 7549 7553 return [uiDelegate _webView:_webView previewViewControllerForURL:targetURL]; 7554 ALLOW_DEPRECATED_DECLARATIONS_END 7555 7550 7556 return nil; 7551 7557 } … … 7568 7574 _page->startInteractionWithElementAtPosition(_positionInformation.request.point); 7569 7575 7576 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 7570 7577 if ([uiDelegate respondsToSelector:@selector(_webView:willPreviewImageWithURL:)]) 7571 7578 [uiDelegate _webView:_webView willPreviewImageWithURL:targetURL]; 7579 ALLOW_DEPRECATED_DECLARATIONS_END 7572 7580 7573 7581 auto defaultActions = [_actionSheetAssistant defaultActionsForImageSheet:elementInfo.get()]; 7574 7582 if (imageInfo && [uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForImage:alternateURL:defaultActions:elementInfo:)]) { 7583 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 7575 7584 UIViewController *previewViewController = [uiDelegate _webView:_webView previewViewControllerForImage:uiImage.get() alternateURL:alternateURL.get() defaultActions:defaultActions.get() elementInfo:elementInfo.get()]; 7585 ALLOW_DEPRECATED_DECLARATIONS_END 7576 7586 if (previewViewController) 7577 7587 return previewViewController; … … 7592 7602 if (imageURL.isEmpty() || !(imageURL.protocolIsInHTTPFamily() || imageURL.protocolIs("data"))) 7593 7603 return; 7604 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 7594 7605 [uiDelegate _webView:_webView commitPreviewedImageWithURL:(NSURL *)imageURL]; 7606 ALLOW_DEPRECATED_DECLARATIONS_END 7595 7607 return; 7596 7608 } … … 7606 7618 7607 7619 if ([uiDelegate respondsToSelector:@selector(_webView:commitPreviewedViewController:)]) { 7620 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 7608 7621 [uiDelegate _webView:_webView commitPreviewedViewController:viewController]; 7622 ALLOW_DEPRECATED_DECLARATIONS_END 7609 7623 return; 7610 7624 } … … 7630 7644 { 7631 7645 id<WKUIDelegatePrivate> uiDelegate = static_cast<id <WKUIDelegatePrivate>>([_webView UIDelegate]); 7646 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 7632 7647 if ([uiDelegate respondsToSelector:@selector(_webView:didDismissPreviewViewController:committing:)]) 7633 7648 [uiDelegate _webView:_webView didDismissPreviewViewController:viewController committing:committing]; 7634 7649 else if ([uiDelegate respondsToSelector:@selector(_webView:didDismissPreviewViewController:)]) 7635 7650 [uiDelegate _webView:_webView didDismissPreviewViewController:viewController]; 7636 7651 ALLOW_DEPRECATED_DECLARATIONS_END 7652 7637 7653 [_webView _didDismissForcePressPreview]; 7638 7654 } -
branches/safari-608.1.27-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r246250 r246252 1072 1072 5C5D238C227A2CDA000B9BDA /* _WKCustomHeaderFields.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C5D2389227A1892000B9BDA /* _WKCustomHeaderFields.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1073 1073 5C62FDF91EFC271C00CE072E /* WKURLSchemeTaskPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C62FDF81EFC263C00CE072E /* WKURLSchemeTaskPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1074 5C795D70229F373F003FF1C4 /* WKContextMenuElementInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE0C369229F2D4A003695F0 /* WKContextMenuElementInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1075 5C795D71229F3757003FF1C4 /* WKContextMenuElementInfoPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE0C36A229F2D4A003695F0 /* WKContextMenuElementInfoPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1074 1076 5C7FB47021E97DC5009E3241 /* WebCookieJar.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C7FB46F21E97C0C009E3241 /* WebCookieJar.h */; }; 1075 1077 5C8BC797218CBB4800813886 /* SafeBrowsing.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5C8BC796218CB58A00813886 /* SafeBrowsing.xcassets */; }; … … 3571 3573 5CD2864F1E722F440094FDC8 /* WKContentRuleListStoreInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentRuleListStoreInternal.h; sourceTree = "<group>"; }; 3572 3574 5CD286501E722F440094FDC8 /* WKContentRuleListStorePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentRuleListStorePrivate.h; sourceTree = "<group>"; }; 3575 5CE0C366229F2D3D003695F0 /* APIContextMenuElementInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIContextMenuElementInfo.cpp; sourceTree = "<group>"; }; 3576 5CE0C367229F2D3E003695F0 /* APIContextMenuElementInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIContextMenuElementInfo.h; sourceTree = "<group>"; }; 3577 5CE0C368229F2D4A003695F0 /* WKContextMenuElementInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKContextMenuElementInfo.mm; sourceTree = "<group>"; }; 3578 5CE0C369229F2D4A003695F0 /* WKContextMenuElementInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuElementInfo.h; sourceTree = "<group>"; }; 3579 5CE0C36A229F2D4A003695F0 /* WKContextMenuElementInfoPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuElementInfoPrivate.h; sourceTree = "<group>"; }; 3580 5CE0C36B229F2D4B003695F0 /* WKContextMenuElementInfoInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuElementInfoInternal.h; sourceTree = "<group>"; }; 3573 3581 5CE85B1F1C88E6430070BFCE /* PingLoad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PingLoad.h; sourceTree = "<group>"; }; 3574 3582 5CE9120B2293C1E0005BEC78 /* WKMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKMain.h; sourceTree = "<group>"; }; … … 6246 6254 5CD2864F1E722F440094FDC8 /* WKContentRuleListStoreInternal.h */, 6247 6255 5CD286501E722F440094FDC8 /* WKContentRuleListStorePrivate.h */, 6256 5CE0C369229F2D4A003695F0 /* WKContextMenuElementInfo.h */, 6257 5CE0C368229F2D4A003695F0 /* WKContextMenuElementInfo.mm */, 6258 5CE0C36B229F2D4B003695F0 /* WKContextMenuElementInfoInternal.h */, 6259 5CE0C36A229F2D4A003695F0 /* WKContextMenuElementInfoPrivate.h */, 6248 6260 1AF4592D19464B2000F9D4A2 /* WKError.h */, 6249 6261 1AF4592C19464B2000F9D4A2 /* WKError.mm */, … … 7711 7723 7C3A06A61AAB903E009D74BA /* APIContentRuleListStore.h */, 7712 7724 076E884D1A13CADF005E90FC /* APIContextMenuClient.h */, 7725 5CE0C366229F2D3D003695F0 /* APIContextMenuElementInfo.cpp */, 7726 5CE0C367229F2D3E003695F0 /* APIContextMenuElementInfo.h */, 7713 7727 5C5D238A227A1D9B000B9BDA /* APICustomHeaderFields.h */, 7714 7728 7A821F4F1E2F7A5C00604577 /* APICustomProtocolManagerClient.h */, … … 9885 9899 1A445BA1184D5FC1004B3414 /* WKContextHistoryClient.h in Headers */, 9886 9900 1A445B9F184D5FB5004B3414 /* WKContextInjectedBundleClient.h in Headers */, 9901 5C795D70229F373F003FF1C4 /* WKContextMenuElementInfo.h in Headers */, 9902 5C795D71229F3757003FF1C4 /* WKContextMenuElementInfoPrivate.h in Headers */, 9887 9903 51A555F6128C6C47009ABCEC /* WKContextMenuItem.h in Headers */, 9888 9904 51A55601128C6D92009ABCEC /* WKContextMenuItemTypes.h in Headers */,
Note:
See TracChangeset
for help on using the changeset viewer.