Diff
Modified: trunk/Source/WTF/ChangeLog (217579 => 217580)
--- trunk/Source/WTF/ChangeLog 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WTF/ChangeLog 2017-05-30 21:54:52 UTC (rev 217580)
@@ -1,3 +1,15 @@
+2017-05-30 Ryosuke Niwa <[email protected]>
+
+ Only include DataDetectorsUI headers in iOS
+ https://bugs.webkit.org/show_bug.cgi?id=172633
+
+ Reviewed by David Kilzer.
+
+ Enable data detectors only on iOS and not other variants of iOS.
+
+ * wtf/FeatureDefines.h:
+ * wtf/Platform.h:
+
2017-05-29 Yusuke Suzuki <[email protected]>
Unreviewed, disable faster Interpreter::getOpcodeID for ARM_THUMB2 with non-Darwin OSes
Modified: trunk/Source/WTF/wtf/FeatureDefines.h (217579 => 217580)
--- trunk/Source/WTF/wtf/FeatureDefines.h 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WTF/wtf/FeatureDefines.h 2017-05-30 21:54:52 UTC (rev 217580)
@@ -252,7 +252,7 @@
#if PLATFORM(COCOA)
#if !defined(ENABLE_DATA_DETECTION)
-#define ENABLE_DATA_DETECTION 1
+#define ENABLE_DATA_DETECTION 0
#endif
#if !defined(ENABLE_FILE_REPLACEMENT)
Modified: trunk/Source/WTF/wtf/Platform.h (217579 => 217580)
--- trunk/Source/WTF/wtf/Platform.h 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WTF/wtf/Platform.h 2017-05-30 21:54:52 UTC (rev 217580)
@@ -547,6 +547,7 @@
#define HAVE_DTRACE 0
#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
+#define ENABLE_DATA_DETECTION 1
#define HAVE_AVKIT 1
#define HAVE_PARENTAL_CONTROLS 1
#endif
Modified: trunk/Source/WebCore/ChangeLog (217579 => 217580)
--- trunk/Source/WebCore/ChangeLog 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebCore/ChangeLog 2017-05-30 21:54:52 UTC (rev 217580)
@@ -1,3 +1,22 @@
+2017-05-30 Ryosuke Niwa <[email protected]>
+
+ Only include DataDetectorsUI headers in iOS
+ https://bugs.webkit.org/show_bug.cgi?id=172633
+
+ Reviewed by David Kilzer.
+
+ Enable data detectors only on iOS and not other variants of iOS.
+
+ * editing/cocoa/DataDetection.h:
+ * editing/cocoa/DataDetection.mm:
+ * page/DragController.cpp:
+ (WebCore::isDraggableLink):
+ * platform/cocoa/DataDetectorsCoreSoftLink.h:
+ * platform/cocoa/DataDetectorsCoreSoftLink.mm:
+ * platform/spi/cocoa/DataDetectorsCoreSPI.h:
+ * platform/spi/ios/DataDetectorsUISPI.h:
+ * platform/spi/mac/DataDetectorsSPI.h:
+
2017-05-30 Chris Dumez <[email protected]>
REGRESSION(r215946): Can't reference a table cell in Google spreadsheet
Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.h (217579 => 217580)
--- trunk/Source/WebCore/editing/cocoa/DataDetection.h 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.h 2017-05-30 21:54:52 UTC (rev 217580)
@@ -25,6 +25,8 @@
#pragma once
+#if ENABLE(DATA_DETECTION)
+
#import <wtf/RefPtr.h>
#import <wtf/RetainPtr.h>
#import <wtf/text/WTFString.h>
@@ -71,3 +73,6 @@
};
} // namespace WebCore
+
+#endif
+
Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (217579 => 217580)
--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2017-05-30 21:54:52 UTC (rev 217580)
@@ -26,6 +26,8 @@
#import "config.h"
#import "DataDetection.h"
+#if ENABLE(DATA_DETECTION)
+
#import "Attr.h"
#import "CSSStyleDeclaration.h"
#import "DataDetectorsSPI.h"
@@ -672,3 +674,6 @@
}
} // namespace WebCore
+
+#endif
+
Modified: trunk/Source/WebCore/page/DragController.cpp (217579 => 217580)
--- trunk/Source/WebCore/page/DragController.cpp 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebCore/page/DragController.cpp 2017-05-30 21:54:52 UTC (rev 217580)
@@ -89,7 +89,7 @@
#include <wtf/SetForScope.h>
#endif
-#if PLATFORM(COCOA)
+#if ENABLE(DATA_DETECTION)
#include "DataDetection.h"
#endif
@@ -101,7 +101,7 @@
auto& anchorElement = downcast<HTMLAnchorElement>(element);
if (!anchorElement.isLiveLink())
return false;
-#if PLATFORM(COCOA)
+#if ENABLE(DATA_DETECTION)
return !DataDetection::isDataDetectorURL(anchorElement.href());
#else
return true;
Modified: trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h (217579 => 217580)
--- trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h 2017-05-30 21:54:52 UTC (rev 217580)
@@ -23,9 +23,10 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DataDetectorsCoreSoftLink_h
-#define DataDetectorsCoreSoftLink_h
+#pragma once
+#if ENABLE(DATA_DETECTION)
+
#include "DataDetectorsCoreSPI.h"
#include "SoftLinking.h"
@@ -72,4 +73,4 @@
#endif // PLATFORM(IOS)
-#endif // DataDetectorsCoreSoftLink_h
+#endif
Modified: trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm (217579 => 217580)
--- trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm 2017-05-30 21:54:52 UTC (rev 217580)
@@ -26,7 +26,7 @@
#include "config.h"
#include "DataDetectorsCoreSoftLink.h"
-#if PLATFORM(IOS)
+#if PLATFORM(IOS) && ENABLE(DATA_DETECTION)
SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(DataDetectorsCore)
@@ -69,4 +69,4 @@
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, DataDetectorsCore, DDScannerEnableOptionalSource, void, (DDScannerRef scanner, DDScannerSource source, Boolean enable), (scanner, source, enable))
#endif
-#endif // PLATFORM(IOS)
+#endif // PLATFORM(IOS) && ENABLE(DATA_DETECTION)
Modified: trunk/Source/WebCore/platform/spi/cocoa/DataDetectorsCoreSPI.h (217579 => 217580)
--- trunk/Source/WebCore/platform/spi/cocoa/DataDetectorsCoreSPI.h 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebCore/platform/spi/cocoa/DataDetectorsCoreSPI.h 2017-05-30 21:54:52 UTC (rev 217580)
@@ -23,9 +23,10 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DataDetectorsCoreSPI_h
-#define DataDetectorsCoreSPI_h
+#pragma once
+#if ENABLE(DATA_DETECTION)
+
typedef struct __DDResult *DDResultRef;
#if USE(APPLE_INTERNAL_SDK)
@@ -163,4 +164,5 @@
WTF_EXTERN_C_END
-#endif // DataDetectorsCoreSPI_h
+#endif
+
Modified: trunk/Source/WebCore/platform/spi/ios/DataDetectorsUISPI.h (217579 => 217580)
--- trunk/Source/WebCore/platform/spi/ios/DataDetectorsUISPI.h 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebCore/platform/spi/ios/DataDetectorsUISPI.h 2017-05-30 21:54:52 UTC (rev 217580)
@@ -23,7 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if PLATFORM(IOS)
+#if PLATFORM(IOS) && ENABLE(DATA_DETECTION)
#import <UIKit/UIKit.h>
#import <WebCore/SoftLinking.h>
Modified: trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h (217579 => 217580)
--- trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h 2017-05-30 21:54:52 UTC (rev 217580)
@@ -23,11 +23,12 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DataDetectorsSPI_h
-#define DataDetectorsSPI_h
+#pragma once
#import <wtf/Platform.h>
+#if ENABLE(DATA_DETECTION)
+
#import <WebCore/DataDetectorsCoreSPI.h>
#import <WebCore/SoftLinking.h>
@@ -113,4 +114,5 @@
#endif
-#endif // DataDetectorsSPI_h
+#endif
+
Modified: trunk/Source/WebKit/mac/ChangeLog (217579 => 217580)
--- trunk/Source/WebKit/mac/ChangeLog 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit/mac/ChangeLog 2017-05-30 21:54:52 UTC (rev 217580)
@@ -1,3 +1,14 @@
+2017-05-30 Ryosuke Niwa <[email protected]>
+
+ Only include DataDetectorsUI headers in iOS
+ https://bugs.webkit.org/show_bug.cgi?id=172633
+
+ Reviewed by David Kilzer.
+
+ Enable data detectors only on iOS and not other variants of iOS.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
2017-05-30 Alex Christensen <[email protected]>
Update libwebrtc configuration
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (217579 => 217580)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm 2017-05-30 21:54:52 UTC (rev 217580)
@@ -516,9 +516,11 @@
}
}
+#if ENABLE(DATA_DETECTION)
void WebFrameLoaderClient::dispatchDidFinishDataDetection(NSArray *)
{
}
+#endif
void WebFrameLoaderClient::dispatchDidFinishLoading(DocumentLoader* loader, unsigned long identifier)
{
Modified: trunk/Source/WebKit2/ChangeLog (217579 => 217580)
--- trunk/Source/WebKit2/ChangeLog 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit2/ChangeLog 2017-05-30 21:54:52 UTC (rev 217580)
@@ -1,3 +1,29 @@
+2017-05-30 Ryosuke Niwa <[email protected]>
+
+ Only include DataDetectorsUI headers in iOS
+ https://bugs.webkit.org/show_bug.cgi?id=172633
+
+ Reviewed by David Kilzer.
+
+ Enable data detectors only on iOS and not other variants of iOS.
+
+ * Platform/spi/ios/ManagedConfigurationSPI.h:
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _dataDetectionResults]):
+ * UIProcess/ios/WKActionSheetAssistant.h:
+ * UIProcess/ios/WKActionSheetAssistant.mm:
+ (-[WKActionSheetAssistant showDataDetectorsSheet]):
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView _actionForLongPressFromPositionInformation:]):
+ (-[WKContentView _didNotHandleTapAsClick:]):
+ * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm:
+ (-[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:]):
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::handleTap):
+ (WebKit::WebPage::handleTwoFingerTapAtPoint):
+ (WebKit::WebPage::commitPotentialTap):
+
2017-05-30 Chris Dumez <[email protected]>
REGRESSION(r215946): Can't reference a table cell in Google spreadsheet
Modified: trunk/Source/WebKit2/Platform/spi/ios/ManagedConfigurationSPI.h (217579 => 217580)
--- trunk/Source/WebKit2/Platform/spi/ios/ManagedConfigurationSPI.h 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit2/Platform/spi/ios/ManagedConfigurationSPI.h 2017-05-30 21:54:52 UTC (rev 217580)
@@ -24,6 +24,7 @@
*/
#import <Foundation/Foundation.h>
+#import <WebCore/SoftLinking.h>
#if USE(APPLE_INTERNAL_SDK)
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (217579 => 217580)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2017-05-30 21:54:52 UTC (rev 217580)
@@ -51,7 +51,6 @@
#import "WKBackForwardListInternal.h"
#import "WKBackForwardListItemInternal.h"
#import "WKBrowsingContextHandleInternal.h"
-#import "WKDataDetectorTypesInternal.h"
#import "WKDragDestinationAction.h"
#import "WKErrorInternal.h"
#import "WKHistoryDelegatePrivate.h"
@@ -115,6 +114,10 @@
#import <wtf/SetForScope.h>
#import <wtf/spi/darwin/dyldSPI.h>
+#if ENABLE(DATA_DETECTION)
+#import "WKDataDetectorTypesInternal.h"
+#endif
+
#if PLATFORM(IOS)
#import "InteractionInformationAtPosition.h"
#import "InteractionInformationRequest.h"
@@ -3860,7 +3863,11 @@
- (NSArray *)_dataDetectionResults
{
+#if ENABLE(DATA_DETECTION)
return [_contentView _dataDetectionResults];
+#else
+ return nil;
+#endif
}
- (void)_accessibilityRetrieveSpeakSelectionContent
Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h (217579 => 217580)
--- trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h 2017-05-30 21:54:52 UTC (rev 217580)
@@ -62,7 +62,11 @@
@end
+#if ENABLE(DATA_DETECTION)
@interface WKActionSheetAssistant : NSObject <WKActionSheetDelegate, DDDetectionControllerInteractionDelegate>
+#else
+@interface WKActionSheetAssistant : NSObject <WKActionSheetDelegate>
+#endif
@property (nonatomic, weak) id <WKActionSheetAssistantDelegate> delegate;
@property (nonatomic) BOOL needsLinkIndicator;
- (id)initWithView:(UIView *)view;
Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm (217579 => 217580)
--- trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm 2017-05-30 21:54:52 UTC (rev 217580)
@@ -532,6 +532,7 @@
- (void)showDataDetectorsSheet
{
+#if ENABLE(DATA_DETECTION)
auto delegate = _delegate.get();
if (!delegate)
return;
@@ -590,6 +591,7 @@
if (![_interactionSheet presentSheet:WKActionSheetPresentAtTouchLocation])
[self cleanupSheet];
+#endif
}
- (void)cleanupSheet
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (217579 => 217580)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2017-05-30 21:54:52 UTC (rev 217580)
@@ -279,7 +279,9 @@
- (void)_disableInspectorNodeSearch;
- (void)_becomeFirstResponderWithSelectionMovingForward:(BOOL)selectingForward completionHandler:(void (^)(BOOL didBecomeFirstResponder))completionHandler;
- (void)_setDoubleTapGesturesEnabled:(BOOL)enabled;
+#if ENABLE(DATA_DETECTION)
- (NSArray *)_dataDetectionResults;
+#endif
- (NSArray<NSValue *> *)_uiTextSelectionRects;
- (void)accessibilityRetrieveSpeakSelectionContent;
- (void)_accessibilityRetrieveRectsEnclosingSelectionOffset:(NSInteger)offset withGranularity:(UITextGranularity)granularity;
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (217579 => 217580)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-05-30 21:54:52 UTC (rev 217580)
@@ -1271,9 +1271,11 @@
return @selector(_showImageSheet);
if (positionInformation.isLink) {
+#if ENABLE(DATA_DETECTION)
NSURL *targetURL = [NSURL URLWithString:positionInformation.url];
if ([[getDDDetectionControllerClass() tapAndHoldSchemes] containsObject:targetURL.scheme.lowercaseString])
return @selector(_showDataDetectorsSheet);
+#endif
return @selector(_showLinkSheet);
}
if (positionInformation.isAttachment)
@@ -1669,10 +1671,12 @@
// FIXME: we should also take into account whether or not the UI delegate
// has handled this notification.
+#if ENABLE(DATA_DETECTION)
if (_hasValidPositionInformation && point == _positionInformation.request.point && _positionInformation.isDataDetectorLink) {
[self _showDataDetectorsSheet];
return;
}
+#endif
if (!_isDoubleTapPending)
return;
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm (217579 => 217580)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm 2017-05-30 21:54:52 UTC (rev 217580)
@@ -29,11 +29,14 @@
#if WK_API_ENABLED
#import "InjectedBundleNodeHandle.h"
-#import "WKDataDetectorTypesInternal.h"
#import "WKWebProcessPlugInFrameInternal.h"
#import <WebCore/DataDetection.h>
#import <WebCore/Range.h>
+#if ENABLE(DATA_DETECTION)
+#import "WKDataDetectorTypesInternal.h"
+#endif
+
using namespace WebKit;
@implementation WKWebProcessPlugInRangeHandle {
@@ -70,8 +73,12 @@
#if TARGET_OS_IPHONE
- (NSArray *)detectDataWithTypes:(WKDataDetectorTypes)types context:(NSDictionary *)context WK_API_AVAILABLE(ios(WK_IOS_TBA))
{
+#if ENABLE(DATA_DETECTION)
RefPtr<WebCore::Range> coreRange = &_rangeHandle->coreRange();
return WebCore::DataDetection::detectContentInRange(coreRange, fromWKDataDetectorTypes(types), context);
+#else
+ return nil;
+#endif
}
#endif
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (217579 => 217580)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2017-05-30 21:42:00 UTC (rev 217579)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2017-05-30 21:54:52 UTC (rev 217580)
@@ -613,11 +613,14 @@
if (!frameRespondingToClick || lastLayerTreeTransactionId < WebFrame::fromCoreFrame(*frameRespondingToClick)->firstLayerTreeTransactionIDAfterDidCommitLoad())
send(Messages::WebPageProxy::DidNotHandleTapAsClick(adjustedIntPoint));
+#if ENABLE(DATA_DETECTION)
else if (is<Element>(*nodeRespondingToClick) && DataDetection::shouldCancelDefaultAction(downcast<Element>(*nodeRespondingToClick))) {
InteractionInformationRequest request(adjustedIntPoint);
requestPositionInformation(request);
send(Messages::WebPageProxy::DidNotHandleTapAsClick(adjustedIntPoint));
- } else
+ }
+#endif
+ else
handleSyntheticClick(nodeRespondingToClick, adjustedPoint);
}
@@ -699,11 +702,13 @@
return;
}
sendTapHighlightForNodeIfNecessary(requestID, nodeRespondingToClick);
+#if ENABLE(DATA_DETECTION)
if (is<Element>(*nodeRespondingToClick) && DataDetection::shouldCancelDefaultAction(downcast<Element>(*nodeRespondingToClick))) {
InteractionInformationRequest request(roundedIntPoint(adjustedPoint));
requestPositionInformation(request);
send(Messages::WebPageProxy::DidNotHandleTapAsClick(roundedIntPoint(adjustedPoint)));
} else
+#endif
completeSyntheticClick(nodeRespondingToClick, adjustedPoint, WebCore::TwoFingerTap);
}
@@ -734,11 +739,13 @@
}
if (m_potentialTapNode == nodeRespondingToClick) {
+#if ENABLE(DATA_DETECTION)
if (is<Element>(*nodeRespondingToClick) && DataDetection::shouldCancelDefaultAction(downcast<Element>(*nodeRespondingToClick))) {
InteractionInformationRequest request(roundedIntPoint(m_potentialTapLocation));
requestPositionInformation(request);
commitPotentialTapFailed();
} else
+#endif
handleSyntheticClick(nodeRespondingToClick, adjustedPoint);
} else
commitPotentialTapFailed();