Diff
Modified: branches/safari-610.1.22.0-branch/Source/WebCore/ChangeLog (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Source/WebCore/ChangeLog 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Source/WebCore/ChangeLog 2020-07-14 21:16:32 UTC (rev 264374)
@@ -1,3 +1,7 @@
+2020-07-14 Alan Coon <alanc...@apple.com>
+
+ Revert r264101. rdar://problem/65559739
+
2020-07-09 Tim Horton <timothy_hor...@apple.com>
"ESPN Fantasy Sports" does not respond to mouse events, only touch events
Modified: branches/safari-610.1.22.0-branch/Source/WebCore/en.lproj/Localizable.strings (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Source/WebCore/en.lproj/Localizable.strings 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Source/WebCore/en.lproj/Localizable.strings 2020-07-14 21:16:32 UTC (rev 264374)
@@ -712,9 +712,6 @@
/* Title for Share context menu item. */
"Share" = "Share";
-/* Default name for the file created for a shared image with no explicit name. */
-"Shared Image" = "Shared Image";
-
/* Title for Share action button */
"Share…" = "Share…";
Modified: branches/safari-610.1.22.0-branch/Source/WebKit/ChangeLog (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Source/WebKit/ChangeLog 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Source/WebKit/ChangeLog 2020-07-14 21:16:32 UTC (rev 264374)
@@ -1,3 +1,7 @@
+2020-07-14 Alan Coon <alanc...@apple.com>
+
+ Revert r264101. rdar://problem/65559739
+
2020-07-09 Tim Horton <timothy_hor...@apple.com>
"ESPN Fantasy Sports" does not respond to mouse events, only touch events
Modified: branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2020-07-14 21:16:32 UTC (rev 264374)
@@ -147,8 +147,6 @@
- (void)_webView:(WKWebView *)webView handleAutoplayEvent:(_WKAutoplayEvent)event withFlags:(_WKAutoplayEventFlags)flags WK_API_AVAILABLE(macos(10.13.4), ios(WK_IOS_TBA));
-- (void)_webView:(WKWebView *)webView willShareActivityItems:(NSArray *)activityItems WK_API_AVAILABLE(ios(WK_IOS_TBA));
-
#if TARGET_OS_IPHONE
- (BOOL)_webView:(WKWebView *)webView shouldIncludeAppLinkActionsForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(9.0));
Modified: branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/Cocoa/WKShareSheet.h (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/Cocoa/WKShareSheet.h 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/Cocoa/WKShareSheet.h 2020-07-14 21:16:32 UTC (rev 264374)
@@ -47,7 +47,6 @@
@protocol WKShareSheetDelegate <NSObject>
@optional
- (void)shareSheetDidDismiss:(WKShareSheet *)shareSheet;
-- (void)shareSheet:(WKShareSheet *)shareSheet willShowActivityItems:(NSArray *)activityItems;
@end
#endif // PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
Modified: branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm 2020-07-14 21:16:32 UTC (rev 264374)
@@ -182,10 +182,7 @@
popoverController.sourceRect = *rect;
} else
popoverController._centersPopoverIfSourceViewNotSet = YES;
-
- if ([_delegate respondsToSelector:@selector(shareSheet:willShowActivityItems:)])
- [_delegate shareSheet:self willShowActivityItems:sharingItems];
-
+
_presentationViewController = [UIViewController _viewControllerForFullScreenPresentationFromView:webView];
[_presentationViewController presentViewController:_shareSheetViewController.get() animated:YES completion:nil];
#endif
Modified: branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.h (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.h 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.h 2020-07-14 21:16:32 UTC (rev 264374)
@@ -70,7 +70,6 @@
- (UITargetedPreview *)createTargetedContextMenuHintForActionSheetAssistant:(WKActionSheetAssistant *)assistant;
- (void)removeContextMenuViewIfPossibleForActionSheetAssistant:(WKActionSheetAssistant *)assistant;
#endif
-- (void)actionSheetAssistant:(WKActionSheetAssistant *)assistant shareElementWithImage:(UIImage *)image rect:(CGRect)boundingRect;
@end
Modified: branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm 2020-07-14 21:16:32 UTC (rev 264374)
@@ -828,10 +828,7 @@
[delegate actionSheetAssistant:self performAction:WebKit::SheetAction::SaveImage];
break;
case _WKElementActionTypeShare:
- if ([element.imageURL.scheme caseInsensitiveCompare:@"data"] == NSOrderedSame && element.image && [delegate respondsToSelector:@selector(actionSheetAssistant:shareElementWithImage:rect:)])
- [delegate actionSheetAssistant:self shareElementWithImage:element.image rect:element.boundingRect];
- else
- [delegate actionSheetAssistant:self shareElementWithURL:element.URL ?: element.imageURL rect:element.boundingRect];
+ [delegate actionSheetAssistant:self shareElementWithURL:element.URL ?: element.imageURL rect:element.boundingRect];
break;
default:
ASSERT_NOT_REACHED();
Modified: branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-07-14 21:16:32 UTC (rev 264374)
@@ -6808,16 +6808,6 @@
[_shareSheet setDelegate:nil];
_shareSheet = nil;
}
-
-- (void)shareSheet:(WKShareSheet *)shareSheet willShowActivityItems:(NSArray *)activityItems
-{
- ASSERT(_shareSheet == shareSheet);
-
- id <WKUIDelegatePrivate> uiDelegate = static_cast<id <WKUIDelegatePrivate>>([_webView UIDelegate]);
- if ([uiDelegate respondsToSelector:@selector(_webView:willShareActivityItems:)])
- [uiDelegate _webView:self.webView willShareActivityItems:activityItems];
-}
-
#endif
- (NSString *)inputLabelText
@@ -6942,17 +6932,9 @@
{
WebCore::ShareDataWithParsedURL shareData;
shareData.url = { url };
- [self _showShareSheet:shareData inRect: { [self convertRect:boundingRect toView:self.webView] } completionHandler:nil];
+ [self _showShareSheet:shareData inRect: { [self convertRect:boundingRect toView:self.webView] } completionHandler:[] (bool success) { }];
}
-- (void)actionSheetAssistant:(WKActionSheetAssistant *)assistant shareElementWithImage:(UIImage *)image rect:(CGRect)boundingRect
-{
- WebCore::ShareDataWithParsedURL shareData;
- NSString* fileName = [NSString stringWithFormat:@"%@.png", (NSString*)WEB_UI_STRING("Shared Image", "Default name for the file created for a shared image with no explicit name.")];
- shareData.files = { { fileName, WebCore::SharedBuffer::create(UIImagePNGRepresentation(image)) } };
- [self _showShareSheet:shareData inRect: { [self convertRect:boundingRect toView:self.webView] } completionHandler:nil];
-}
-
#if HAVE(APP_LINKS)
- (BOOL)actionSheetAssistant:(WKActionSheetAssistant *)assistant shouldIncludeAppLinkActionsForElement:(_WKActivatedElementInfo *)element
{
Modified: branches/safari-610.1.22.0-branch/Tools/ChangeLog (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Tools/ChangeLog 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Tools/ChangeLog 2020-07-14 21:16:32 UTC (rev 264374)
@@ -1,3 +1,7 @@
+2020-07-14 Alan Coon <alanc...@apple.com>
+
+ Revert r264101. rdar://problem/65559739
+
2020-07-09 Per Arne Vollan <pvol...@apple.com>
Move XPCEndpoint and XPCEndpointClient classes from WebCore to WebKit
Modified: branches/safari-610.1.22.0-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2020-07-14 21:16:32 UTC (rev 264374)
@@ -488,8 +488,6 @@
6B9ABE122086952F00D75DE6 /* HTTPParsers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6B9ABE112086952F00D75DE6 /* HTTPParsers.cpp */; };
6BF4A683239ED4CD00E2F45B /* LoggedInStatus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BF4A682239ED4CD00E2F45B /* LoggedInStatus.cpp */; };
6BFD294C1D5E6C1D008EC968 /* HashCountedSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A38D7E51C752D5F004F157D /* HashCountedSet.cpp */; };
- 71E88C4124B5299C00665160 /* ShareSheetTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71E88C4024B5299C00665160 /* ShareSheetTests.mm */; };
- 71E88C4524B534B700665160 /* img-with-base64-url.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 71E88C4324B533EC00665160 /* img-with-base64-url.html */; };
725C3EF322058A5B007C36FC /* AdditionalSupportedImageTypes.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 725C3EF2220584BA007C36FC /* AdditionalSupportedImageTypes.html */; };
7283A9D022FA754900B21C7D /* img-with-rotated-image.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7283A9CE22FA6BBE00B21C7D /* img-with-rotated-image.html */; };
7283A9D222FB1E0600B21C7D /* exif-orientation-8-llo.jpg in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7283A9D122FB1D9700B21C7D /* exif-orientation-8-llo.jpg */; };
@@ -1401,7 +1399,6 @@
F4DEF6ED1E9B4DB60048EF61 /* image-in-link-and-input.html in Copy Resources */,
F45B63FB1F197F4A009D38B9 /* image-map.html in Copy Resources */,
3128A8152376413300D90D40 /* image.html in Copy Resources */,
- 71E88C4524B534B700665160 /* img-with-base64-url.html in Copy Resources */,
7283A9D022FA754900B21C7D /* img-with-rotated-image.html in Copy Resources */,
49897D6C241FE9E400ECF153 /* in-app-browser-privacy-local-file.html in Copy Resources */,
4971B1182451F29A0096994D /* incorrectCreateTableSchema.db in Copy Resources */,
@@ -2202,8 +2199,6 @@
6B4E861B2220A5520022F389 /* RegistrableDomain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RegistrableDomain.cpp; sourceTree = "<group>"; };
6B9ABE112086952F00D75DE6 /* HTTPParsers.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPParsers.cpp; sourceTree = "<group>"; };
6BF4A682239ED4CD00E2F45B /* LoggedInStatus.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LoggedInStatus.cpp; sourceTree = "<group>"; };
- 71E88C4024B5299C00665160 /* ShareSheetTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ShareSheetTests.mm; sourceTree = "<group>"; };
- 71E88C4324B533EC00665160 /* img-with-base64-url.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "img-with-base64-url.html"; sourceTree = "<group>"; };
725C3EF2220584BA007C36FC /* AdditionalSupportedImageTypes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = AdditionalSupportedImageTypes.html; sourceTree = "<group>"; };
7283A9CE22FA6BBE00B21C7D /* img-with-rotated-image.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "img-with-rotated-image.html"; sourceTree = "<group>"; };
7283A9D122FB1D9700B21C7D /* exif-orientation-8-llo.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "exif-orientation-8-llo.jpg"; sourceTree = "<group>"; };
@@ -3478,7 +3473,6 @@
1C90420B2326E03C00BEF91E /* SelectionByWord.mm */,
9B4B5EA422DEBE19001E3D5A /* SelectionModifyByParagraphBoundary.mm */,
CE6E819F20A6935F00E2C80F /* SetTimeoutFunction.mm */,
- 71E88C4024B5299C00665160 /* ShareSheetTests.mm */,
4433A395208044130091ED57 /* SynchronousTimeoutTests.mm */,
F45E15742112CE6200307E82 /* TestInputDelegate.h */,
F45E15752112CE6200307E82 /* TestInputDelegate.mm */,
@@ -3823,7 +3817,6 @@
children = (
0F16BED72304A1D100B4A167 /* composited.html */,
CEDA12402437C9EA00C28A9E /* editable-region-composited-and-non-composited-overlap.html */,
- 71E88C4324B533EC00665160 /* img-with-base64-url.html */,
CE6D0EE22426B8ED002AD901 /* insert-text.html */,
A11E7D9F24A169E200026745 /* link-with-hover-menu.html */,
0F340777230382540060A1A0 /* overflow-scroll.html */,
@@ -5238,7 +5231,6 @@
7C83E0521D0A641800FEBCF3 /* SharedBuffer.cpp in Sources */,
A17991881E1C994E00A505ED /* SharedBuffer.mm in Sources */,
A179918B1E1CA24100A505ED /* SharedBufferTest.cpp in Sources */,
- 71E88C4124B5299C00665160 /* ShareSheetTests.mm in Sources */,
5CCB10E4213457E000AC5AF0 /* ShouldGoToBackForwardListItem.mm in Sources */,
7CCE7F141A411AE600447C4C /* ShouldKeepCurrentBackForwardListItemInList.cpp in Sources */,
37BCA61C1B596BA9002012CA /* ShouldOpenExternalURLsInNewWindowActions.mm in Sources */,
Deleted: branches/safari-610.1.22.0-branch/Tools/TestWebKitAPI/Tests/ios/ShareSheetTests.mm (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Tools/TestWebKitAPI/Tests/ios/ShareSheetTests.mm 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Tools/TestWebKitAPI/Tests/ios/ShareSheetTests.mm 2020-07-14 21:16:32 UTC (rev 264374)
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2017 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 "Test.h"
-
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
-
-#import "PlatformUtilities.h"
-#import "TestWKWebView.h"
-#import <WebKit/WKUIDelegatePrivate.h>
-#import <WebKit/WKWebViewPrivateForTesting.h>
-#import <WebKit/_WKActivatedElementInfo.h>
-#import <WebKit/_WKElementAction.h>
-#import <wtf/BlockPtr.h>
-
-@interface ShareSheetObserver : NSObject<WKUIDelegatePrivate>
-@property (nonatomic) BlockPtr<NSArray *(_WKActivatedElementInfo *, NSArray *)> presentationHandler;
-@property (nonatomic) BlockPtr<void(NSArray *)> activityItemsHandler;
-@end
-
-@implementation ShareSheetObserver
-
-- (NSArray *)_webView:(WKWebView *)webView actionsForElement:(_WKActivatedElementInfo *)element defaultActions:(NSArray<_WKElementAction *> *)defaultActions
-{
- return _presentationHandler ? _presentationHandler(element, defaultActions) : defaultActions;
-}
-
-- (void)_webView:(WKWebView *)webView willShareActivityItems:(NSArray *)activityItems
-{
- if (_activityItemsHandler)
- _activityItemsHandler(activityItems);
-}
-
-@end
-
-namespace TestWebKitAPI {
-
-#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
-
-static void showShareSheet(WKWebView *webView, ShareSheetObserver *observer, CGPoint location)
-{
- __block RetainPtr<_WKElementAction> copyAction;
- __block RetainPtr<_WKActivatedElementInfo> copyElement;
- __block bool done = false;
- [observer setPresentationHandler:^(_WKActivatedElementInfo *element, NSArray *actions) {
- copyElement = element;
- for (_WKElementAction *action in actions) {
- if (action.type == _WKElementActionTypeShare)
- copyAction = action;
- }
- done = true;
- return @[ copyAction.get() ];
- }];
- [webView _simulateLongPressActionAtLocation:location];
- TestWebKitAPI::Util::run(&done);
-
- EXPECT_TRUE(!!copyAction);
- EXPECT_TRUE(!!copyElement);
- [copyAction runActionWithElementInfo:copyElement.get()];
-}
-
-TEST(ShareSheetTests, ShareImgElementWithBase64URL)
-{
- auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
- auto observer = adoptNS([[ShareSheetObserver alloc] init]);
- [webView setUIDelegate:observer.get()];
- [webView synchronouslyLoadTestPageNamed:@"img-with-base64-url"];
-
- __block bool done = false;
- [observer setActivityItemsHandler:^(NSArray *activityItems) {
- EXPECT_EQ(1UL, activityItems.count);
- NSURL *url = "" objectAtIndex:0];
- EXPECT_WK_STREQ("Shared Image.png", url.lastPathComponent);
- done = true;
- }];
-
- showShareSheet(webView.get(), observer.get(), CGPointMake(100, 100));
- TestWebKitAPI::Util::run(&done);
-}
-
-#endif // !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
-
-} // namespace TestWebKitAPI
-
-#endif // PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
Deleted: branches/safari-610.1.22.0-branch/Tools/TestWebKitAPI/Tests/ios/img-with-base64-url.html (264373 => 264374)
--- branches/safari-610.1.22.0-branch/Tools/TestWebKitAPI/Tests/ios/img-with-base64-url.html 2020-07-14 20:57:16 UTC (rev 264373)
+++ branches/safari-610.1.22.0-branch/Tools/TestWebKitAPI/Tests/ios/img-with-base64-url.html 2020-07-14 21:16:32 UTC (rev 264374)
@@ -1,11 +0,0 @@
-<script>
-
-const canvas = document.createElement("canvas");
-canvas.getContext("2d").fillRect(0, 0, canvas.width, canvas.height);
-
-const img = document.createElement("img");
-img.src = ""
-
-document.addEventListener("DOMContentLoaded", () => document.body.appendChild(img));
-
-</script>
\ No newline at end of file