WebKit Bugzilla
Attachment 370474 Details for
Bug 198152
: Deprecate more preview API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198152-20190522182721.patch (text/plain), 10.05 KB, created by
Alex Christensen
on 2019-05-22 18:27:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-05-22 18:27:22 PDT
Size:
10.05 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 245666) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,27 @@ >+2019-05-22 Alex Christensen <achristensen@webkit.org> >+ >+ Deprecate more preview API >+ https://bugs.webkit.org/show_bug.cgi?id=198152 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This is working towards <rdar://problem/51003503> >+ >+ * UIProcess/API/Cocoa/WKPreviewActionItem.h: >+ * UIProcess/API/Cocoa/WKPreviewActionItem.mm: >+ * UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.h: >+ * UIProcess/API/Cocoa/WKPreviewActionItemInternal.h: >+ * UIProcess/API/Cocoa/WKPreviewElementInfo.h: >+ * UIProcess/API/Cocoa/WKPreviewElementInfo.mm: >+ * UIProcess/API/Cocoa/WKUIDelegate.h: >+ * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: >+ (WebKit::ScrollingTreeScrollingNodeDelegateIOS::activeTouchActions const): >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (previewIdentifierForElementAction): >+ (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]): >+ (-[WKContentView _presentedViewControllerForPreviewItemController:]): >+ (-[WKContentView _previewItemController:commitPreview:]): >+ > 2019-05-22 Ryosuke Niwa <rniwa@webkit.org> > > REGRESSION(r245148): Removing inputmode="none" does not bring up software keyboard >Index: Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItem.h >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItem.h (revision 245604) >+++ Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItem.h (working copy) >@@ -29,7 +29,7 @@ > > #import <UIKit/UIViewController.h> > >-WK_API_AVAILABLE(ios(10.0)) >+WK_API_DEPRECATED("This API will be replaced", ios(10.0, WK_IOS_TBA)) > @protocol WKPreviewActionItem <UIPreviewActionItem> > > @property (nonatomic, copy, readonly) NSString *identifier; >Index: Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItem.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItem.mm (revision 245604) >+++ Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItem.mm (working copy) >@@ -31,12 +31,14 @@ > @implementation WKPreviewAction > @synthesize identifier=_identifier; > >+ALLOW_DEPRECATED_DECLARATIONS_BEGIN > + (instancetype)actionWithIdentifier:(NSString *)identifier title:(NSString *)title style:(UIPreviewActionStyle)style handler:(void (^)(UIPreviewAction *action, UIViewController *previewViewController))handler > { > WKPreviewAction *action = [self actionWithTitle:title style:style handler:handler]; > action->_identifier = identifier; > return action; > } >+ALLOW_DEPRECATED_DECLARATIONS_END > > - (id)copyWithZone:(NSZone *)zone > { >Index: Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.h >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.h (revision 245604) >+++ Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.h (working copy) >@@ -30,9 +30,9 @@ > > #import <Foundation/Foundation.h> > >-WK_EXTERN NSString * const WKPreviewActionItemIdentifierOpen WK_API_AVAILABLE(ios(10.0)); >-WK_EXTERN NSString * const WKPreviewActionItemIdentifierAddToReadingList WK_API_AVAILABLE(ios(10.0)); >-WK_EXTERN NSString * const WKPreviewActionItemIdentifierCopy WK_API_AVAILABLE(ios(10.0)); >-WK_EXTERN NSString * const WKPreviewActionItemIdentifierShare WK_API_AVAILABLE(ios(10.0)); >+WK_EXTERN NSString * const WKPreviewActionItemIdentifierOpen WK_API_DEPRECATED("This API will be replaced", ios(10.0, WK_IOS_TBA)); >+WK_EXTERN NSString * const WKPreviewActionItemIdentifierAddToReadingList WK_API_DEPRECATED("This API will be replaced", ios(10.0, WK_IOS_TBA)); >+WK_EXTERN NSString * const WKPreviewActionItemIdentifierCopy WK_API_DEPRECATED("This API will be replaced", ios(10.0, WK_IOS_TBA)); >+WK_EXTERN NSString * const WKPreviewActionItemIdentifierShare WK_API_DEPRECATED("This API will be replaced", ios(10.0, WK_IOS_TBA)); > > #endif >Index: Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItemInternal.h >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItemInternal.h (revision 245604) >+++ Source/WebKit/UIProcess/API/Cocoa/WKPreviewActionItemInternal.h (working copy) >@@ -29,10 +29,12 @@ > > #import "WKPreviewActionItem.h" > >+ALLOW_DEPRECATED_DECLARATIONS_BEGIN > @interface WKPreviewAction : UIPreviewAction <WKPreviewActionItem> > > + (instancetype)actionWithIdentifier:(NSString *)identifier title:(NSString *)title style:(UIPreviewActionStyle)style handler:(void (^)(UIPreviewAction *action, UIViewController *previewViewController))handler; > > @end >+ALLOW_DEPRECATED_DECLARATIONS_END > > #endif >Index: Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.mm (revision 245604) >+++ Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.mm (working copy) >@@ -28,7 +28,10 @@ > > #if PLATFORM(IOS_FAMILY) > >+#pragma clang diagnostic push >+#pragma clang diagnostic ignored "-Wdeprecated-implementations" > @implementation WKPreviewElementInfo >+#pragma clang diagnostic pop > > - (instancetype)_initWithLinkURL:(NSURL *)url > { >Index: Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h (revision 245604) >+++ Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h (working copy) >@@ -150,7 +150,7 @@ NS_ASSUME_NONNULL_BEGIN > @param webView The web view invoking the delegate method. > @param previewingViewController The view controller that is being popped. > */ >-- (void)webView:(WKWebView *)webView commitPreviewingViewController:(UIViewController *)previewingViewController WK_API_AVAILABLE(ios(10.0)); >+- (void)webView:(WKWebView *)webView commitPreviewingViewController:(UIViewController *)previewingViewController WK_API_DEPRECATED("This API will be replaced", ios(10.0, WK_IOS_TBA)); > > #endif // TARGET_OS_IPHONE > >Index: Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h >=================================================================== >--- Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h (revision 245604) >+++ Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h (working copy) >@@ -67,7 +67,7 @@ public: > void repositionScrollingLayers(); > > #if ENABLE(POINTER_EVENTS) >- OptionSet<TouchAction> activeTouchActions() const { return m_activeTouchActions; } >+ OptionSet<WebCore::TouchAction> activeTouchActions() const { return m_activeTouchActions; } > void computeActiveTouchActionsForGestureRecognizer(UIGestureRecognizer*); > void clearActiveTouchActions() { m_activeTouchActions = { }; } > void cancelPointersForGestureRecognizer(UIGestureRecognizer*); >@@ -80,7 +80,7 @@ private: > RetainPtr<CALayer> m_scrolledContentsLayer; > RetainPtr<WKScrollingNodeScrollViewDelegate> m_scrollViewDelegate; > #if ENABLE(POINTER_EVENTS) >- OptionSet<TouchAction> m_activeTouchActions { }; >+ OptionSet<WebCore::TouchAction> m_activeTouchActions { }; > #endif > bool m_updatingFromStateNode { false }; > }; >Index: Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >=================================================================== >--- Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (revision 245604) >+++ Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (working copy) >@@ -7248,6 +7248,7 @@ - (NSDictionary *)_contentsOfUserInterfa > > static NSString *previewIdentifierForElementAction(_WKElementAction *action) > { >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > switch (action.type) { > case _WKElementActionTypeOpen: > return WKPreviewActionItemIdentifierOpen; >@@ -7262,6 +7263,7 @@ static NSString *previewIdentifierForEle > default: > return nil; > } >+ ALLOW_DEPRECATED_DECLARATIONS_END > ASSERT_NOT_REACHED(); > return nil; > } >@@ -7313,12 +7315,12 @@ - (BOOL)_interactionShouldBeginFromPrevi > const URL& linkURL = _positionInformation.url; > if (_positionInformation.isLink) { > id <WKUIDelegatePrivate> uiDelegate = static_cast<id <WKUIDelegatePrivate>>([_webView UIDelegate]); >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > if ([uiDelegate respondsToSelector:@selector(webView:shouldPreviewElement:)]) { > auto previewElementInfo = adoptNS([[WKPreviewElementInfo alloc] _initWithLinkURL:(NSURL *)linkURL]); >-ALLOW_DEPRECATED_DECLARATIONS_BEGIN > return [uiDelegate webView:_webView shouldPreviewElement:previewElementInfo.get()]; >-ALLOW_DEPRECATED_DECLARATIONS_END > } >+ ALLOW_DEPRECATED_DECLARATIONS_END > if (linkURL.isEmpty()) > return NO; > if (linkURL.protocolIsInHTTPFamily()) >@@ -7465,11 +7467,11 @@ - (UIViewController *)_presentedViewCont > }]; > [previewActions addObject:previewAction]; > } >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > auto previewElementInfo = adoptNS([[WKPreviewElementInfo alloc] _initWithLinkURL:targetURL]); >-ALLOW_DEPRECATED_DECLARATIONS_BEGIN > if (UIViewController *controller = [uiDelegate webView:_webView previewingViewControllerForElement:previewElementInfo.get() defaultActions:previewActions.get()]) > return controller; >-ALLOW_DEPRECATED_DECLARATIONS_END >+ ALLOW_DEPRECATED_DECLARATIONS_END > } > > if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForURL:defaultActions:elementInfo:)]) >@@ -7528,7 +7530,9 @@ - (void)_previewItemController:(UIPrevie > } > > if ([uiDelegate respondsToSelector:@selector(webView:commitPreviewingViewController:)]) { >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > [uiDelegate webView:_webView commitPreviewingViewController:viewController]; >+ ALLOW_DEPRECATED_DECLARATIONS_END > return; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dino
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198152
:
370472
| 370474