Title: [248371] trunk/Source
- Revision
- 248371
- Author
- ryanhad...@apple.com
- Date
- 2019-08-07 10:19:08 -0700 (Wed, 07 Aug 2019)
Log Message
Unreviewed, rolling out r248330.
Breaks internal builds.
Reverted changeset:
"Context menu on a universal link produces a blank preview"
https://bugs.webkit.org/show_bug.cgi?id=200485
https://trac.webkit.org/changeset/248330
Modified Paths
Diff
Modified: trunk/Source/WebCore/PAL/ChangeLog (248370 => 248371)
--- trunk/Source/WebCore/PAL/ChangeLog 2019-08-07 17:17:05 UTC (rev 248370)
+++ trunk/Source/WebCore/PAL/ChangeLog 2019-08-07 17:19:08 UTC (rev 248371)
@@ -1,3 +1,15 @@
+2019-08-07 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, rolling out r248330.
+
+ Breaks internal builds.
+
+ Reverted changeset:
+
+ "Context menu on a universal link produces a blank preview"
+ https://bugs.webkit.org/show_bug.cgi?id=200485
+ https://trac.webkit.org/changeset/248330
+
2019-08-07 Youenn Fablet <you...@apple.com>
ASSERT that a sessionID is valid when encoding it
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h (248370 => 248371)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h 2019-08-07 17:17:05 UTC (rev 248370)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h 2019-08-07 17:19:08 UTC (rev 248371)
@@ -32,11 +32,10 @@
#if PLATFORM(MAC)
#import <CoreServices/CoreServicesPriv.h>
#elif PLATFORM(IOS_FAMILY)
-#import <CoreServices/LSURLOverridePriv.h>
#import <MobileCoreServices/LSAppLinkPriv.h>
#endif
-#endif // USE(APPLE_INTERNAL_SDK)
+#endif
#if HAVE(APP_LINKS)
@class LSAppLink;
@@ -74,10 +73,6 @@
@end
#endif
-@interface NSURL ()
-- (NSURL *)iTunesStoreURL;
-@end
-
#if PLATFORM(MAC)
enum LSSessionID {
kLSDefaultSessionID = -2,
Modified: trunk/Source/WebKit/ChangeLog (248370 => 248371)
--- trunk/Source/WebKit/ChangeLog 2019-08-07 17:17:05 UTC (rev 248370)
+++ trunk/Source/WebKit/ChangeLog 2019-08-07 17:19:08 UTC (rev 248371)
@@ -1,3 +1,15 @@
+2019-08-07 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, rolling out r248330.
+
+ Breaks internal builds.
+
+ Reverted changeset:
+
+ "Context menu on a universal link produces a blank preview"
+ https://bugs.webkit.org/show_bug.cgi?id=200485
+ https://trac.webkit.org/changeset/248330
+
2019-08-06 Ryosuke Niwa <rn...@webkit.org>
[iPadOS] slides.google.com: tapping near cursor in a slide title focuses the speaker notes
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (248370 => 248371)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-08-07 17:17:05 UTC (rev 248370)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-08-07 17:19:08 UTC (rev 248371)
@@ -106,7 +106,6 @@
#import <WebKit/WebSelectionRect.h> // FIXME: WK2 should not include WebKit headers!
#import <pal/spi/cg/CoreGraphicsSPI.h>
#import <pal/spi/cocoa/DataDetectorsCoreSPI.h>
-#import <pal/spi/cocoa/LaunchServicesSPI.h>
#import <pal/spi/ios/DataDetectorsUISPI.h>
#import <pal/spi/ios/GraphicsServicesSPI.h>
#import <wtf/BlockObjCExceptions.h>
@@ -7809,7 +7808,7 @@
// Previously, UIPreviewItemController would detect the case where there was no previewViewController
// and create one. We need to replicate this code for the new API.
- if (!previewViewController || [(NSURL *)url iTunesStoreURL]) {
+ if (!previewViewController) {
auto ddContextMenuActionClass = getDDContextMenuActionClass();
if ([ddContextMenuActionClass respondsToSelector:@selector(contextMenuConfigurationForURL:identifier:selectedText:results:inView:context:menuIdentifier:)]) {
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -7954,24 +7953,15 @@
_page->startInteractionWithElementAtPosition(_positionInformation.request.point);
- continueWithContextMenuConfiguration([UIContextMenuConfiguration configurationWithIdentifier:nil previewProvider:contentPreviewProvider actionProvider:actionMenuProvider]);
- return;
+ // FIXME: Should we provide an identifier and ASSERT in delegates if we don't match?
+ return continueWithContextMenuConfiguration([UIContextMenuConfiguration configurationWithIdentifier:nil previewProvider:contentPreviewProvider actionProvider:actionMenuProvider]);
}
-#if ENABLE(DATA_DETECTION)
- if ([(NSURL *)linkURL iTunesStoreURL]) {
- if ([self continueContextMenuInteractionWithDataDetectors:continueWithContextMenuConfiguration])
- return;
- }
-#endif
-
auto completionBlock = makeBlockPtr([continueWithContextMenuConfiguration = makeBlockPtr(continueWithContextMenuConfiguration), linkURL = WTFMove(linkURL), weakSelf = WeakObjCPtr<WKContentView>(self)] (UIContextMenuConfiguration *configurationFromWKUIDelegate) mutable {
auto strongSelf = weakSelf.get();
- if (!strongSelf) {
- continueWithContextMenuConfiguration(nil);
- return;
- }
+ if (!strongSelf)
+ return continueWithContextMenuConfiguration(nil);
if (configurationFromWKUIDelegate) {
strongSelf->_page->startInteractionWithElementAtPosition(strongSelf->_positionInformation.request.point);
@@ -8006,8 +7996,7 @@
return [[[WKImagePreviewViewController alloc] initWithCGImage:cgImage defaultActions:nil elementInfo:elementInfo.get()] autorelease];
};
- continueWithContextMenuConfiguration([UIContextMenuConfiguration configurationWithIdentifier:nil previewProvider:contentPreviewProvider actionProvider:actionMenuProvider]);
- return;
+ return continueWithContextMenuConfiguration([UIContextMenuConfiguration configurationWithIdentifier:nil previewProvider:contentPreviewProvider actionProvider:actionMenuProvider]);
}
// At this point we have an object we might want to show a context menu for, but the
@@ -8018,15 +8007,23 @@
#if ENABLE(DATA_DETECTION)
// FIXME: Support _javascript_ urls here. But make sure they don't show a preview.
// <rdar://problem/50572283>
- if (!linkURL.protocolIsInHTTPFamily() && !WebCore::DataDetection::canBePresentedByDataDetectors(linkURL)) {
- continueWithContextMenuConfiguration(nil);
- return;
+ if (!linkURL.protocolIsInHTTPFamily() && !WebCore::DataDetection::canBePresentedByDataDetectors(linkURL))
+ return continueWithContextMenuConfiguration(nil);
+
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ auto ddContextMenuActionClass = getDDContextMenuActionClass();
+ if ([ddContextMenuActionClass respondsToSelector:@selector(contextMenuConfigurationWithURL:inView:context:menuIdentifier:)]) {
+ NSDictionary *context = [strongSelf dataDetectionContextForPositionInformation:strongSelf->_positionInformation];
+ UIContextMenuConfiguration *configurationFromDD = [ddContextMenuActionClass contextMenuConfigurationForURL:linkURL identifier:strongSelf->_positionInformation.dataDetectorIdentifier selectedText:[strongSelf selectedText] results:strongSelf->_positionInformation.dataDetectorResults.get() inView:strongSelf.get() context:context menuIdentifier:nil];
+ strongSelf->_contextMenuActionProviderDelegateNeedsOverride = YES;
+ strongSelf->_page->startInteractionWithElementAtPosition(strongSelf->_positionInformation.request.point);
+ if (strongSelf->_showLinkPreviews)
+ return continueWithContextMenuConfiguration(configurationFromDD);
+ return continueWithContextMenuConfiguration([UIContextMenuConfiguration configurationWithIdentifier:[configurationFromDD identifier] previewProvider:nil actionProvider:[configurationFromDD actionProvider]]);
}
-
- if ([strongSelf continueContextMenuInteractionWithDataDetectors:continueWithContextMenuConfiguration.get()])
- return;
+ END_BLOCK_OBJC_EXCEPTIONS;
#endif
- continueWithContextMenuConfiguration(nil);
+ return continueWithContextMenuConfiguration(nil);
});
_contextMenuActionProviderDelegateNeedsOverride = NO;
@@ -8051,26 +8048,6 @@
completionBlock(nil);
}
-#if ENABLE(DATA_DETECTION)
-- (BOOL)continueContextMenuInteractionWithDataDetectors:(void(^)(UIContextMenuConfiguration *))continueWithContextMenuConfiguration
-{
- BEGIN_BLOCK_OBJC_EXCEPTIONS;
- auto ddContextMenuActionClass = getDDContextMenuActionClass();
- if ([ddContextMenuActionClass respondsToSelector:@selector(contextMenuConfigurationWithURL:inView:context:menuIdentifier:)]) {
- URL linkURL = _positionInformation.url;
- NSDictionary *context = [self dataDetectionContextForPositionInformation:_positionInformation];
- UIContextMenuConfiguration *configurationFromDD = [ddContextMenuActionClass contextMenuConfigurationForURL:linkURL identifier:_positionInformation.dataDetectorIdentifier selectedText:[self selectedText] results:_positionInformation.dataDetectorResults.get() inView:self context:context menuIdentifier:nil];
- _contextMenuActionProviderDelegateNeedsOverride = YES;
- _page->startInteractionWithElementAtPosition(_positionInformation.request.point);
- continueWithContextMenuConfiguration(configurationFromDD);
- return YES;
- }
- END_BLOCK_OBJC_EXCEPTIONS;
-
- return NO;
-}
-#endif
-
- (NSArray<UIMenuElement *> *)_contextMenuInteraction:(UIContextMenuInteraction *)interaction overrideSuggestedActionsForConfiguration:(UIContextMenuConfiguration *)configuration
{
if (_contextMenuActionProviderDelegateNeedsOverride) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes