Diff
Modified: trunk/Source/WebCore/ChangeLog (240490 => 240491)
--- trunk/Source/WebCore/ChangeLog 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebCore/ChangeLog 2019-01-25 19:45:07 UTC (rev 240491)
@@ -1,3 +1,19 @@
+2019-01-25 Wenson Hsieh <[email protected]>
+
+ [iOS] Rename some WebKit-internal functions and variables that reference "data interaction"
+ https://bugs.webkit.org/show_bug.cgi?id=193829
+
+ Reviewed by Tim Horton.
+
+ No change in behavior.
+
+ * page/EventHandler.h:
+ * page/ios/EventHandlerIOS.mm:
+ (WebCore::EventHandler::tryToBeginDragAtPoint):
+ (WebCore::EventHandler::tryToBeginDataInteractionAtPoint): Deleted.
+ * platform/ios/WebItemProviderPasteboard.mm:
+ (linkTemporaryItemProviderFilesToDropStagingDirectory):
+
2019-01-25 Jon Davis <[email protected]>
Updated feature status for several features
Modified: trunk/Source/WebCore/page/EventHandler.h (240490 => 240491)
--- trunk/Source/WebCore/page/EventHandler.h 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebCore/page/EventHandler.h 2019-01-25 19:45:07 UTC (rev 240491)
@@ -329,8 +329,8 @@
static Widget* widgetForEventTarget(Element* eventTarget);
-#if ENABLE(DATA_INTERACTION)
- WEBCORE_EXPORT bool tryToBeginDataInteractionAtPoint(const IntPoint& clientPosition, const IntPoint& globalPosition);
+#if PLATFORM(IOS_FAMILY) && ENABLE(DRAG_SUPPORT)
+ WEBCORE_EXPORT bool tryToBeginDragAtPoint(const IntPoint& clientPosition, const IntPoint& globalPosition);
#endif
#if PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebCore/page/ios/EventHandlerIOS.mm (240490 => 240491)
--- trunk/Source/WebCore/page/ios/EventHandlerIOS.mm 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebCore/page/ios/EventHandlerIOS.mm 2019-01-25 19:45:07 UTC (rev 240491)
@@ -650,7 +650,7 @@
return false;
}
-bool EventHandler::tryToBeginDataInteractionAtPoint(const IntPoint& clientPosition, const IntPoint&)
+bool EventHandler::tryToBeginDragAtPoint(const IntPoint& clientPosition, const IntPoint&)
{
Ref<Frame> protectedFrame(m_frame);
@@ -673,7 +673,7 @@
auto hitTestedMouseEvent = document->prepareMouseEvent(request, documentPoint, syntheticMouseMoveEvent);
RefPtr<Frame> subframe = subframeForHitTestResult(hitTestedMouseEvent);
- if (subframe && subframe->eventHandler().tryToBeginDataInteractionAtPoint(adjustedClientPosition, adjustedGlobalPosition))
+ if (subframe && subframe->eventHandler().tryToBeginDragAtPoint(adjustedClientPosition, adjustedGlobalPosition))
return true;
if (!eventMayStartDrag(syntheticMousePressEvent))
Modified: trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm (240490 => 240491)
--- trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm 2019-01-25 19:45:07 UTC (rev 240491)
@@ -690,12 +690,12 @@
{
static NSString *defaultDropFolderName = @"folder";
static NSString *defaultDropFileName = @"file";
- static NSString *dataInteractionDirectoryPrefix = @"data-interaction";
+ static NSString *droppedDataDirectoryPrefix = @"dropped-data";
if (!url)
return nil;
- NSString *temporaryDataInteractionDirectory = FileSystem::createTemporaryDirectory(dataInteractionDirectoryPrefix);
- if (!temporaryDataInteractionDirectory)
+ NSString *temporaryDropDataDirectory = FileSystem::createTemporaryDirectory(droppedDataDirectoryPrefix);
+ if (!temporaryDropDataDirectory)
return nil;
NSURL *destination = nil;
@@ -708,7 +708,7 @@
if (![suggestedName containsString:@"."] && !isFolder)
suggestedName = [suggestedName stringByAppendingPathExtension:url.pathExtension];
- destination = [NSURL fileURLWithPath:[temporaryDataInteractionDirectory stringByAppendingPathComponent:suggestedName]];
+ destination = [NSURL fileURLWithPath:[temporaryDropDataDirectory stringByAppendingPathComponent:suggestedName]];
return [fileManager linkItemAtURL:url toURL:destination error:nil] ? destination : nil;
}
Modified: trunk/Source/WebKit/ChangeLog (240490 => 240491)
--- trunk/Source/WebKit/ChangeLog 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/ChangeLog 2019-01-25 19:45:07 UTC (rev 240491)
@@ -1,3 +1,56 @@
+2019-01-25 Wenson Hsieh <[email protected]>
+
+ [iOS] Rename some WebKit-internal functions and variables that reference "data interaction"
+ https://bugs.webkit.org/show_bug.cgi?id=193829
+
+ Reviewed by Tim Horton.
+
+ * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+ (WebKit::WebPageProxy::setDragCaretRect):
+ * UIProcess/PageClient.h:
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/ios/PageClientImplIOS.h:
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::didHandleDragStartRequest):
+ (WebKit::PageClientImpl::didConcludeEditDrag):
+ (WebKit::PageClientImpl::didChangeDragCaretRect):
+ (WebKit::PageClientImpl::didHandleStartDataInteractionRequest): Deleted.
+ (WebKit::PageClientImpl::didConcludeEditDataInteraction): Deleted.
+ (WebKit::PageClientImpl::didChangeDataInteractionCaretRect): Deleted.
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView setupInteraction]):
+ (-[WKContentView cleanupInteraction]):
+ (-[WKContentView setupDragAndDropInteractions]):
+ (-[WKContentView teardownDragAndDropInteractions]):
+ (-[WKContentView _didHandleDragStartRequest:]):
+ (-[WKContentView _didConcludeEditDrag:]):
+ (-[WKContentView _didChangeDragCaretRect:currentRect:]):
+ (-[WKContentView _dragInteraction:prepareForSession:completion:]):
+ (-[WKContentView setupDataInteractionDelegates]): Deleted.
+ (-[WKContentView teardownDataInteractionDelegates]): Deleted.
+ (-[WKContentView _didHandleStartDataInteractionRequest:]): Deleted.
+ (-[WKContentView _didConcludeEditDataInteraction:]): Deleted.
+ (-[WKContentView _didChangeDataInteractionCaretRect:currentRect:]): Deleted.
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::didHandleDragStartRequest):
+ (WebKit::WebPageProxy::requestDragStart):
+ (WebKit::WebPageProxy::didConcludeEditDrag):
+ (WebKit::WebPageProxy::didHandleStartDataInteractionRequest): Deleted.
+ (WebKit::WebPageProxy::requestStartDataInteraction): Deleted.
+ (WebKit::WebPageProxy::didConcludeEditDataInteraction): Deleted.
+ * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
+ (WebKit::WebDragClient::didConcludeEditDrag):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::requestDragStart):
+ (WebKit::WebPage::requestAdditionalItemsForDragSession):
+ (WebKit::WebPage::didConcludeEditDrag):
+ (WebKit::WebPage::requestStartDataInteraction): Deleted.
+ (WebKit::WebPage::didConcludeEditDataInteraction): Deleted.
+
2019-01-25 Alex Christensen <[email protected]>
WKWebView.goBack should reload if there is a safe browsing warning
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (240490 => 240491)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2019-01-25 19:45:07 UTC (rev 240491)
@@ -155,7 +155,7 @@
auto previousRect = m_currentDragCaretRect;
m_currentDragCaretRect = dragCaretRect;
- pageClient().didChangeDataInteractionCaretRect(previousRect, dragCaretRect);
+ pageClient().didChangeDragCaretRect(previousRect, dragCaretRect);
}
#endif // PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKit/UIProcess/PageClient.h (240490 => 240491)
--- trunk/Source/WebKit/UIProcess/PageClient.h 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/UIProcess/PageClient.h 2019-01-25 19:45:07 UTC (rev 240491)
@@ -458,10 +458,10 @@
#endif
#if ENABLE(DATA_INTERACTION)
- virtual void didHandleStartDataInteractionRequest(bool started) = 0;
+ virtual void didHandleDragStartRequest(bool started) = 0;
virtual void didHandleAdditionalDragItemsRequest(bool added) = 0;
- virtual void didConcludeEditDataInteraction(Optional<WebCore::TextIndicatorData>) = 0;
- virtual void didChangeDataInteractionCaretRect(const WebCore::IntRect& previousCaretRect, const WebCore::IntRect& caretRect) = 0;
+ virtual void didConcludeEditDrag(Optional<WebCore::TextIndicatorData>) = 0;
+ virtual void didChangeDragCaretRect(const WebCore::IntRect& previousCaretRect, const WebCore::IntRect& caretRect) = 0;
#endif
#if ENABLE(ATTACHMENT_ELEMENT)
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (240490 => 240491)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2019-01-25 19:45:07 UTC (rev 240491)
@@ -679,11 +679,11 @@
void cancelAutoscroll();
void hardwareKeyboardAvailabilityChanged();
#if ENABLE(DATA_INTERACTION)
- void didHandleStartDataInteractionRequest(bool started);
+ void didHandleDragStartRequest(bool started);
void didHandleAdditionalDragItemsRequest(bool added);
- void requestStartDataInteraction(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
+ void requestDragStart(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
void requestAdditionalItemsForDragSession(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
- void didConcludeEditDataInteraction(Optional<WebCore::TextIndicatorData>);
+ void didConcludeEditDrag(Optional<WebCore::TextIndicatorData>);
#endif
#endif
#if ENABLE(DATA_DETECTION)
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in (240490 => 240491)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2019-01-25 19:45:07 UTC (rev 240491)
@@ -327,9 +327,9 @@
#endif
#if ENABLE(DATA_INTERACTION)
- DidHandleStartDataInteractionRequest(bool started)
+ DidHandleDragStartRequest(bool started)
DidHandleAdditionalDragItemsRequest(bool added)
- DidConcludeEditDataInteraction(Optional<WebCore::TextIndicatorData> textIndicator)
+ DidConcludeEditDrag(Optional<WebCore::TextIndicatorData> textIndicator)
#endif
#if PLATFORM(COCOA)
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h (240490 => 240491)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h 2019-01-25 19:45:07 UTC (rev 240491)
@@ -222,11 +222,11 @@
#if ENABLE(DATA_INTERACTION)
void didPerformDragOperation(bool handled) override;
- void didHandleStartDataInteractionRequest(bool started) override;
+ void didHandleDragStartRequest(bool started) override;
void didHandleAdditionalDragItemsRequest(bool added) override;
void startDrag(const WebCore::DragItem&, const ShareableBitmap::Handle& image) override;
- void didConcludeEditDataInteraction(Optional<WebCore::TextIndicatorData>) override;
- void didChangeDataInteractionCaretRect(const WebCore::IntRect& previousCaretRect, const WebCore::IntRect& caretRect) override;
+ void didConcludeEditDrag(Optional<WebCore::TextIndicatorData>) override;
+ void didChangeDragCaretRect(const WebCore::IntRect& previousCaretRect, const WebCore::IntRect& caretRect) override;
#endif
void didFinishProcessingAllPendingMouseEvents() final { }
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (240490 => 240491)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2019-01-25 19:45:07 UTC (rev 240491)
@@ -788,9 +788,9 @@
[m_contentView _didPerformDragOperation:handled];
}
-void PageClientImpl::didHandleStartDataInteractionRequest(bool started)
+void PageClientImpl::didHandleDragStartRequest(bool started)
{
- [m_contentView _didHandleStartDataInteractionRequest:started];
+ [m_contentView _didHandleDragStartRequest:started];
}
void PageClientImpl::didHandleAdditionalDragItemsRequest(bool added)
@@ -803,14 +803,14 @@
[m_contentView _startDrag:ShareableBitmap::create(image)->makeCGImageCopy() item:item];
}
-void PageClientImpl::didConcludeEditDataInteraction(Optional<TextIndicatorData> data)
+void PageClientImpl::didConcludeEditDrag(Optional<TextIndicatorData> data)
{
- [m_contentView _didConcludeEditDataInteraction:data];
+ [m_contentView _didConcludeEditDrag:data];
}
-void PageClientImpl::didChangeDataInteractionCaretRect(const IntRect& previousCaretRect, const IntRect& caretRect)
+void PageClientImpl::didChangeDragCaretRect(const IntRect& previousCaretRect, const IntRect& caretRect)
{
- [m_contentView _didChangeDataInteractionCaretRect:previousCaretRect currentRect:caretRect];
+ [m_contentView _didChangeDragCaretRect:previousCaretRect currentRect:caretRect];
}
#endif
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (240490 => 240491)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2019-01-25 19:45:07 UTC (rev 240491)
@@ -429,11 +429,11 @@
#if ENABLE(DATA_INTERACTION)
- (void)_didChangeDragInteractionPolicy;
- (void)_didPerformDragOperation:(BOOL)handled;
-- (void)_didHandleStartDataInteractionRequest:(BOOL)started;
+- (void)_didHandleDragStartRequest:(BOOL)started;
- (void)_didHandleAdditionalDragItemsRequest:(BOOL)added;
- (void)_startDrag:(RetainPtr<CGImageRef>)image item:(const WebCore::DragItem&)item;
-- (void)_didConcludeEditDataInteraction:(Optional<WebCore::TextIndicatorData>)data;
-- (void)_didChangeDataInteractionCaretRect:(CGRect)previousRect currentRect:(CGRect)rect;
+- (void)_didConcludeEditDrag:(Optional<WebCore::TextIndicatorData>)data;
+- (void)_didChangeDragCaretRect:(CGRect)previousRect currentRect:(CGRect)rect;
#endif
- (void)reloadContextViewForPresentedListViewController;
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (240490 => 240491)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-01-25 19:45:07 UTC (rev 240491)
@@ -692,7 +692,7 @@
[self _createAndConfigureLongPressGestureRecognizer];
#if ENABLE(DATA_INTERACTION)
- [self setupDataInteractionDelegates];
+ [self setupDragAndDropInteractions];
#endif
_twoFingerSingleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_twoFingerSingleTapGestureRecognized:)]);
@@ -808,7 +808,7 @@
#if ENABLE(DATA_INTERACTION)
[existingLocalDragSessionContext(_dragDropInteractionState.dragSession()) cleanUpTemporaryDirectories];
- [self teardownDataInteractionDelegates];
+ [self teardownDragAndDropInteractions];
#endif
_inspectorNodeSearchEnabled = NO;
@@ -5431,7 +5431,7 @@
return (id <WKUIDelegatePrivate>)[_webView UIDelegate];
}
-- (void)setupDataInteractionDelegates
+- (void)setupDragAndDropInteractions
{
_dragInteraction = adoptNS([[UIDragInteraction alloc] initWithDelegate:self]);
_dropInteraction = adoptNS([[UIDropInteraction alloc] initWithDelegate:self]);
@@ -5442,7 +5442,7 @@
[self addInteraction:_dropInteraction.get()];
}
-- (void)teardownDataInteractionDelegates
+- (void)teardownDragAndDropInteractions
{
if (_dragInteraction)
[self removeInteraction:_dragInteraction.get()];
@@ -5492,7 +5492,7 @@
_page->didStartDrag();
}
-- (void)_didHandleStartDataInteractionRequest:(BOOL)started
+- (void)_didHandleDragStartRequest:(BOOL)started
{
BlockPtr<void()> savedCompletionBlock = _dragDropInteractionState.takeDragStartCompletionBlock();
ASSERT(savedCompletionBlock);
@@ -5586,7 +5586,7 @@
return extractItemProvidersFromDragItems(session.items);
}
-- (void)_didConcludeEditDataInteraction:(Optional<WebCore::TextIndicatorData>)data
+- (void)_didConcludeEditDrag:(Optional<WebCore::TextIndicatorData>)data
{
if (!data)
return;
@@ -5599,12 +5599,12 @@
if (!unselectedSnapshotImage)
return;
- auto dataInteractionUnselectedContentImage = adoptNS([[UIImage alloc] initWithCGImage:unselectedSnapshotImage.get() scale:_page->deviceScaleFactor() orientation:UIImageOrientationUp]);
- RetainPtr<UIImageView> unselectedContentSnapshot = adoptNS([[UIImageView alloc] initWithImage:dataInteractionUnselectedContentImage.get()]);
+ auto unselectedContentImageForEditDrag = adoptNS([[UIImage alloc] initWithCGImage:unselectedSnapshotImage.get() scale:_page->deviceScaleFactor() orientation:UIImageOrientationUp]);
+ auto unselectedContentSnapshot = adoptNS([[UIImageView alloc] initWithImage:unselectedContentImageForEditDrag.get()]);
[unselectedContentSnapshot setFrame:data->contentImageWithoutSelectionRectInRootViewCoordinates];
- RetainPtr<WKContentView> protectedSelf = self;
- RetainPtr<UIView> visibleContentViewSnapshot = adoptNS(_visibleContentViewSnapshot.leakRef());
+ auto protectedSelf = retainPtr(self);
+ auto visibleContentViewSnapshot = adoptNS(_visibleContentViewSnapshot.leakRef());
_isAnimatingConcludeEditDrag = YES;
[self insertSubview:unselectedContentSnapshot.get() belowSubview:visibleContentViewSnapshot.get()];
@@ -5639,7 +5639,7 @@
_page->dragEnded(WebCore::roundedIntPoint(client), WebCore::roundedIntPoint(global), _page->currentDragOperation());
}
-- (void)_didChangeDataInteractionCaretRect:(CGRect)previousRect currentRect:(CGRect)rect
+- (void)_didChangeDragCaretRect:(CGRect)previousRect currentRect:(CGRect)rect
{
BOOL previousRectIsEmpty = CGRectIsEmpty(previousRect);
BOOL currentRectIsEmpty = CGRectIsEmpty(rect);
@@ -5853,7 +5853,7 @@
_dragDropInteractionState.prepareForDragSession(session, completion);
auto dragOrigin = WebCore::roundedIntPoint([session locationInView:self]);
- _page->requestStartDataInteraction(dragOrigin, WebCore::roundedIntPoint([self convertPoint:dragOrigin toView:self.window]));
+ _page->requestDragStart(dragOrigin, WebCore::roundedIntPoint([self convertPoint:dragOrigin toView:self.window]));
RELEASE_LOG(DragAndDrop, "Drag session requested: %p at origin: {%d, %d}", session, dragOrigin.x(), dragOrigin.y());
}
Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (240490 => 240491)
--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2019-01-25 19:45:07 UTC (rev 240491)
@@ -1117,9 +1117,9 @@
#if ENABLE(DATA_INTERACTION)
-void WebPageProxy::didHandleStartDataInteractionRequest(bool started)
+void WebPageProxy::didHandleDragStartRequest(bool started)
{
- pageClient().didHandleStartDataInteractionRequest(started);
+ pageClient().didHandleDragStartRequest(started);
}
void WebPageProxy::didHandleAdditionalDragItemsRequest(bool added)
@@ -1127,10 +1127,10 @@
pageClient().didHandleAdditionalDragItemsRequest(added);
}
-void WebPageProxy::requestStartDataInteraction(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition)
+void WebPageProxy::requestDragStart(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition)
{
if (isValid())
- m_process->send(Messages::WebPage::RequestStartDataInteraction(clientPosition, globalPosition), m_pageID);
+ m_process->send(Messages::WebPage::RequestDragStart(clientPosition, globalPosition), m_pageID);
}
void WebPageProxy::requestAdditionalItemsForDragSession(const IntPoint& clientPosition, const IntPoint& globalPosition)
@@ -1139,9 +1139,9 @@
m_process->send(Messages::WebPage::RequestAdditionalItemsForDragSession(clientPosition, globalPosition), m_pageID);
}
-void WebPageProxy::didConcludeEditDataInteraction(Optional<TextIndicatorData> data)
+void WebPageProxy::didConcludeEditDrag(Optional<TextIndicatorData> data)
{
- pageClient().didConcludeEditDataInteraction(data);
+ pageClient().didConcludeEditDrag(data);
}
#endif
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm (240490 => 240491)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm 2019-01-25 19:45:07 UTC (rev 240491)
@@ -210,7 +210,7 @@
void WebDragClient::didConcludeEditDrag()
{
- m_page->didConcludeEditDataInteraction();
+ m_page->didConcludeEditDrag();
}
#endif // PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (240490 => 240491)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-01-25 19:45:07 UTC (rev 240491)
@@ -1095,7 +1095,7 @@
void setUseIconLoadingClient(bool);
#if ENABLE(DATA_INTERACTION)
- void didConcludeEditDataInteraction();
+ void didConcludeEditDrag();
#endif
WebURLSchemeHandlerProxy* urlSchemeHandlerForScheme(const String&);
@@ -1181,7 +1181,7 @@
#endif
#if PLATFORM(IOS_FAMILY) && ENABLE(DATA_INTERACTION)
- void requestStartDataInteraction(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
+ void requestDragStart(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
void requestAdditionalItemsForDragSession(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
#endif
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in (240490 => 240491)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2019-01-25 19:45:07 UTC (rev 240491)
@@ -289,7 +289,7 @@
#endif
#if ENABLE(DATA_INTERACTION)
- RequestStartDataInteraction(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition)
+ RequestDragStart(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition)
RequestAdditionalItemsForDragSession(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition)
#endif
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (240490 => 240491)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-01-25 19:45:07 UTC (rev 240491)
@@ -656,10 +656,10 @@
}
#if ENABLE(DATA_INTERACTION)
-void WebPage::requestStartDataInteraction(const IntPoint& clientPosition, const IntPoint& globalPosition)
+void WebPage::requestDragStart(const IntPoint& clientPosition, const IntPoint& globalPosition)
{
- bool didStart = m_page->mainFrame().eventHandler().tryToBeginDataInteractionAtPoint(clientPosition, globalPosition);
- send(Messages::WebPageProxy::DidHandleStartDataInteractionRequest(didStart));
+ bool didStart = m_page->mainFrame().eventHandler().tryToBeginDragAtPoint(clientPosition, globalPosition);
+ send(Messages::WebPageProxy::DidHandleDragStartRequest(didStart));
}
void WebPage::requestAdditionalItemsForDragSession(const IntPoint& clientPosition, const IntPoint& globalPosition)
@@ -671,22 +671,22 @@
m_page->dragController().dragEnded();
m_page->mainFrame().eventHandler().dragSourceEndedAt(event, DragOperationNone, MayExtendDragSession::Yes);
- bool didHandleDrag = m_page->mainFrame().eventHandler().tryToBeginDataInteractionAtPoint(clientPosition, globalPosition);
+ bool didHandleDrag = m_page->mainFrame().eventHandler().tryToBeginDragAtPoint(clientPosition, globalPosition);
send(Messages::WebPageProxy::DidHandleAdditionalDragItemsRequest(didHandleDrag));
}
-void WebPage::didConcludeEditDataInteraction()
+void WebPage::didConcludeEditDrag()
{
Optional<TextIndicatorData> textIndicatorData;
- static auto defaultEditDataInteractionTextIndicatorOptions = TextIndicatorOptionIncludeSnapshotOfAllVisibleContentWithoutSelection | TextIndicatorOptionExpandClipBeyondVisibleRect | TextIndicatorOptionPaintAllContent | TextIndicatorOptionIncludeMarginIfRangeMatchesSelection | TextIndicatorOptionPaintBackgrounds | TextIndicatorOptionComputeEstimatedBackgroundColor| TextIndicatorOptionUseSelectionRectForSizing | TextIndicatorOptionIncludeSnapshotWithSelectionHighlight;
+ static auto defaultTextIndicatorOptionsForEditDrag = TextIndicatorOptionIncludeSnapshotOfAllVisibleContentWithoutSelection | TextIndicatorOptionExpandClipBeyondVisibleRect | TextIndicatorOptionPaintAllContent | TextIndicatorOptionIncludeMarginIfRangeMatchesSelection | TextIndicatorOptionPaintBackgrounds | TextIndicatorOptionComputeEstimatedBackgroundColor| TextIndicatorOptionUseSelectionRectForSizing | TextIndicatorOptionIncludeSnapshotWithSelectionHighlight;
auto& frame = m_page->focusController().focusedOrMainFrame();
if (auto range = frame.selection().selection().toNormalizedRange()) {
- if (auto textIndicator = TextIndicator::createWithRange(*range, defaultEditDataInteractionTextIndicatorOptions, TextIndicatorPresentationTransition::None, FloatSize()))
+ if (auto textIndicator = TextIndicator::createWithRange(*range, defaultTextIndicatorOptionsForEditDrag, TextIndicatorPresentationTransition::None, FloatSize()))
textIndicatorData = textIndicator->data();
}
- send(Messages::WebPageProxy::DidConcludeEditDataInteraction(textIndicatorData));
+ send(Messages::WebPageProxy::DidConcludeEditDrag(WTFMove(textIndicatorData)));
}
#endif
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (240490 => 240491)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2019-01-25 19:45:07 UTC (rev 240491)
@@ -1,3 +1,18 @@
+2019-01-25 Wenson Hsieh <[email protected]>
+
+ [iOS] Rename some WebKit-internal functions and variables that reference "data interaction"
+ https://bugs.webkit.org/show_bug.cgi?id=193829
+
+ Reviewed by Tim Horton.
+
+ * WebCoreSupport/WebDragClient.mm:
+ (WebDragClient::didConcludeEditDrag):
+ * WebView/WebView.mm:
+ (-[WebView _requestStartDataInteraction:globalPosition:]):
+ (-[WebView _didConcludeEditDrag]):
+ (-[WebView _didConcludeEditDataInteraction]): Deleted.
+ * WebView/WebViewInternal.h:
+
2019-01-24 John Wilander <[email protected]>
Add Ad Click Attribution as an internal/experimental feature
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm (240490 => 240491)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm 2019-01-25 19:45:07 UTC (rev 240491)
@@ -244,7 +244,7 @@
void WebDragClient::didConcludeEditDrag()
{
- [m_webView _didConcludeEditDataInteraction];
+ [m_webView _didConcludeEditDrag];
}
#endif // PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (240490 => 240491)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2019-01-25 19:45:07 UTC (rev 240491)
@@ -1827,7 +1827,7 @@
- (BOOL)_requestStartDataInteraction:(CGPoint)clientPosition globalPosition:(CGPoint)globalPosition
{
WebThreadLock();
- return _private->page->mainFrame().eventHandler().tryToBeginDataInteractionAtPoint(IntPoint(clientPosition), IntPoint(globalPosition));
+ return _private->page->mainFrame().eventHandler().tryToBeginDragAtPoint(IntPoint(clientPosition), IntPoint(globalPosition));
}
- (void)_startDrag:(const DragItem&)dragItem
@@ -1939,7 +1939,7 @@
_private->draggedLinkURL = nil;
}
-- (void)_didConcludeEditDataInteraction
+- (void)_didConcludeEditDrag
{
_private->dataOperationTextIndicator = nullptr;
auto* page = _private->page;
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h (240490 => 240491)
--- trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h 2019-01-25 19:42:27 UTC (rev 240490)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebViewInternal.h 2019-01-25 19:45:07 UTC (rev 240491)
@@ -264,7 +264,7 @@
#if ENABLE(DATA_INTERACTION) && defined(__cplusplus)
- (void)_startDrag:(const WebCore::DragItem&)dragItem;
-- (void)_didConcludeEditDataInteraction;
+- (void)_didConcludeEditDrag;
#endif
- (void)_preferencesChanged:(WebPreferences *)preferences;