WebKit Bugzilla
Attachment 348503 Details for
Bug 189157
: Web Share API compatible with AppleTV and WatchOS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189157-20180830102349.patch (text/plain), 6.71 KB, created by
Olivia Barnett
on 2018-08-30 10:23:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Olivia Barnett
Created:
2018-08-30 10:23:50 PDT
Size:
6.71 KB
patch
obsolete
>Subversion Revision: 235508 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index bd7561140e2a3a5b880bce0670ed48dc903bf3bd..9091bc46986ab7a685fb92621f5e20337da7180f 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2018-08-30 Olivia Barnett <obarnett@apple.com> >+ >+ Web Share API compatible with AppleTV and WatchOS >+ https://bugs.webkit.org/show_bug.cgi?id=189157 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/WebPreferencesDefaultValues.h: >+ * UIProcess/ios/WKContentViewInteraction.h: >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView fileUploadPanelDidDismiss:]): >+ * UIProcess/ios/forms/WKShareSheet.h: >+ * UIProcess/ios/forms/WKShareSheet.mm: >+ (-[WKShareSheet invokeShareSheetWithResolution:]): >+ Added platform checks. >+ > 2018-08-30 Aditya Keerthi <akeerthi@apple.com> > > [macOS] Color picker layout is broken if suggested colors are specified >diff --git a/Source/WebKit/Shared/WebPreferencesDefaultValues.h b/Source/WebKit/Shared/WebPreferencesDefaultValues.h >index 7398a24a335fb110b526089d3136c26da2fde08b..c429f7f17a70b255c55d1379cfeaccc0e70636b8 100644 >--- a/Source/WebKit/Shared/WebPreferencesDefaultValues.h >+++ b/Source/WebKit/Shared/WebPreferencesDefaultValues.h >@@ -77,6 +77,9 @@ > #define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK true > #define DEFAULT_INTERACTIVE_MEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES 1 > #define EXPERIMENTAL_FULLSCREEN_API_HIDDEN false >+#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) >+#define DEFAULT_WEB_SHARE_ENABLED true >+#endif > #else > #define DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK false > #define DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED true >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >index 6dc3eee90b0169398ee0017d529f47c4a740d42c..d8ff14294c393621487b406da31d9b2bf354c39d 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >@@ -27,6 +27,10 @@ > > #import "WKContentView.h" > >+#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) >+#import "WKShareSheet.h" >+#endif >+ > #import "AssistedNodeInformation.h" > #import "DragDropInteractionState.h" > #import "EditorState.h" >@@ -176,7 +180,9 @@ struct WKAutoCorrectionData { > #endif > RetainPtr<WKFormInputSession> _formInputSession; > RetainPtr<WKFileUploadPanel> _fileUploadPanel; >+#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) > RetainPtr<WKShareSheet> _shareSheet; >+#endif > RetainPtr<UIGestureRecognizer> _previewGestureRecognizer; > RetainPtr<UIGestureRecognizer> _previewSecondaryGestureRecognizer; > Vector<bool> _focusStateStack; >@@ -265,7 +271,11 @@ struct WKAutoCorrectionData { > > @end > >-@interface WKContentView (WKInteraction) <UIGestureRecognizerDelegate, UITextAutoscrolling, UITextInputMultiDocument, UITextInputPrivate, UIWebFormAccessoryDelegate, UIWebTouchEventsGestureRecognizerDelegate, UIWKInteractionViewProtocol, WKActionSheetAssistantDelegate, WKFileUploadPanelDelegate, WKShareSheetDelegate, WKKeyboardScrollable >+@interface WKContentView (WKInteraction) <UIGestureRecognizerDelegate, UITextAutoscrolling, UITextInputMultiDocument, UITextInputPrivate, UIWebFormAccessoryDelegate, UIWebTouchEventsGestureRecognizerDelegate, UIWKInteractionViewProtocol, WKActionSheetAssistantDelegate, WKFileUploadPanelDelegate >+#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) >+ , WKShareSheetDelegate >+#endif >+ , WKKeyboardScrollable > #if ENABLE(DATA_INTERACTION) > , UIDragInteractionDelegate, UIDropInteractionDelegate > #endif >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index 93ddc59aae6aaefdf1fc4250dfdb84cd4863ae7c..139a717bfc4993e4ac94aa1954398ade1a8769a8 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -4700,6 +4700,15 @@ static bool isAssistableInputType(InputType type) > [_fileUploadPanel presentWithParameters:parameters resultListener:listener]; > } > >+- (void)fileUploadPanelDidDismiss:(WKFileUploadPanel *)fileUploadPanel >+{ >+ ASSERT(_fileUploadPanel.get() == fileUploadPanel); >+ >+ [_fileUploadPanel setDelegate:nil]; >+ _fileUploadPanel = nil; >+} >+ >+#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) > - (void)_showShareSheet:(const ShareDataWithParsedURL&)data completionHandler:(CompletionHandler<void(bool)>&&)completionHandler > { > ASSERT(!_shareSheet); >@@ -4712,14 +4721,6 @@ static bool isAssistableInputType(InputType type) > [_shareSheet presentWithParameters:data completionHandler:WTFMove(completionHandler)]; > } > >-- (void)fileUploadPanelDidDismiss:(WKFileUploadPanel *)fileUploadPanel >-{ >- ASSERT(_fileUploadPanel.get() == fileUploadPanel); >- >- [_fileUploadPanel setDelegate:nil]; >- _fileUploadPanel = nil; >-} >- > - (void)shareSheetDidDismiss:(WKShareSheet *)shareSheet > { > ASSERT(_shareSheet == shareSheet); >@@ -4727,6 +4728,7 @@ static bool isAssistableInputType(InputType type) > [_shareSheet setDelegate:nil]; > _shareSheet = nil; > } >+#endif > > #pragma mark - UITextInputMultiDocument > >diff --git a/Source/WebKit/UIProcess/ios/forms/WKShareSheet.h b/Source/WebKit/UIProcess/ios/forms/WKShareSheet.h >index c9a2402a2d4fe5a3f6ee7b5b2ca9e03dfe521c64..9447bc328fd8a26ccecc4cd1f0744532a6a9a4a9 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKShareSheet.h >+++ b/Source/WebKit/UIProcess/ios/forms/WKShareSheet.h >@@ -23,7 +23,7 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#if PLATFORM(IOS) >+#if PLATFORM(IOS) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) > > #import <UIKit/UIKit.h> > #import <WebCore/ShareData.h> >@@ -51,4 +51,4 @@ > - (void)shareSheetDidDismiss:(WKShareSheet *)shareSheet; > @end > >-#endif // PLATFORM(IOS) >+#endif // PLATFORM(IOS) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) >diff --git a/Source/WebKit/UIProcess/ios/forms/WKShareSheet.mm b/Source/WebKit/UIProcess/ios/forms/WKShareSheet.mm >index 0fa4baa3e21560483a4b9b5683cd487d48cbf6ae..de2c533d9eeb3551d7048d3f731e0e6b5cbd894b 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKShareSheet.mm >+++ b/Source/WebKit/UIProcess/ios/forms/WKShareSheet.mm >@@ -23,11 +23,11 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >+#if PLATFORM(IOS) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) >+ > #import "config.h" > #import "WKShareSheet.h" > >-#if PLATFORM(IOS) >- > #import "UIKitSPI.h" > #import "WKContentViewInteraction.h" > #import "WebPageProxy.h" >@@ -124,7 +124,7 @@ using namespace WebKit; > { > _shouldDismissWithAnimation = NO; > _shareSheetViewController.get().completionWithItemsHandler(nil, resolved, nil, nil); >-} >+WKShareSheet.mm} > > @end >-#endif // PLATFORM(IOS) >+#endif // PLATFORM(IOS) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189157
:
348503
|
348505
|
348506
|
348507