WebKit Bugzilla
Attachment 360122 Details for
Bug 193829
: [iOS] Rename some WebKit-internal functions and variables that reference "data interaction"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193829-20190125104233.patch (text/plain), 31.32 KB, created by
Wenson Hsieh
on 2019-01-25 10:42:34 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2019-01-25 10:42:34 PST
Size:
31.32 KB
patch
obsolete
>Subversion Revision: 240476 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 81ebcf491de75b2dc7e41f01618f6bdedf66783b..13745b0156ae1d081e163a78f7097bfaf744804d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-01-25 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] Rename some WebKit-internal functions and variables that reference "data interaction" >+ https://bugs.webkit.org/show_bug.cgi?id=193829 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 Wenson Hsieh <wenson_hsieh@apple.com> > > Need a way for JavaScript (or bundle) code to participate in undo >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 408551b1038fcb766a4579a0819374b54cf8bee2..d536373cfff06b3ce625652fe55cdf06d4a27bd7 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,56 @@ >+2019-01-25 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] Rename some WebKit-internal functions and variables that reference "data interaction" >+ https://bugs.webkit.org/show_bug.cgi?id=193829 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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 Wenson Hsieh <wenson_hsieh@apple.com> > > Need a way for JavaScript (or bundle) code to participate in undo >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 247391ed51a2dd829af5a4d85af79c363260c933..5f81f6629a91d1c4c6cbd0d72a385cc35507c0fc 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,18 @@ >+2019-01-25 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] Rename some WebKit-internal functions and variables that reference "data interaction" >+ https://bugs.webkit.org/show_bug.cgi?id=193829 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebCoreSupport/WebDragClient.mm: >+ (WebDragClient::didConcludeEditDrag): >+ * WebView/WebView.mm: >+ (-[WebView _requestStartDataInteraction:globalPosition:]): >+ (-[WebView _didConcludeEditDrag]): >+ (-[WebView _didConcludeEditDataInteraction]): Deleted. >+ * WebView/WebViewInternal.h: >+ > 2019-01-24 John Wilander <wilander@apple.com> > > Add Ad Click Attribution as an internal/experimental feature >diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h >index 563496122de1eb5d0bf1dc8e6f89ea926cb267e7..ce6ea32674a13fcf7c97fbd4a4affe698728a703 100644 >--- a/Source/WebCore/page/EventHandler.h >+++ b/Source/WebCore/page/EventHandler.h >@@ -329,8 +329,8 @@ public: > > 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) >diff --git a/Source/WebCore/page/ios/EventHandlerIOS.mm b/Source/WebCore/page/ios/EventHandlerIOS.mm >index 099076de45da776697a4584b97848053b4b2b5fc..c92aded1ace3f316afa42aeed52ca5da5761a074 100644 >--- a/Source/WebCore/page/ios/EventHandlerIOS.mm >+++ b/Source/WebCore/page/ios/EventHandlerIOS.mm >@@ -650,7 +650,7 @@ bool EventHandler::eventLoopHandleMouseDragged(const MouseEventWithHitTestResult > 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 @@ bool EventHandler::tryToBeginDataInteractionAtPoint(const IntPoint& clientPositi > 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)) >diff --git a/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm b/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm >index 3545d7efcac867648f49a474e8a020b51c88d4da..816a30f15fa56445a6c133777b6636eb46b20384 100644 >--- a/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm >+++ b/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm >@@ -690,12 +690,12 @@ static NSURL *linkTemporaryItemProviderFilesToDropStagingDirectory(NSURL *url, N > { > 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 @@ static NSURL *linkTemporaryItemProviderFilesToDropStagingDirectory(NSURL *url, N > 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; > } > >diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm >index 354f5af3a12c172502c5fa04b09bb68a5be72c24..2010f65f9098550d7380f9824f83e767f6fe70be 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm >@@ -155,7 +155,7 @@ void WebPageProxy::setDragCaretRect(const IntRect& dragCaretRect) > > auto previousRect = m_currentDragCaretRect; > m_currentDragCaretRect = dragCaretRect; >- pageClient().didChangeDataInteractionCaretRect(previousRect, dragCaretRect); >+ pageClient().didChangeDragCaretRect(previousRect, dragCaretRect); > } > > #endif // PLATFORM(IOS_FAMILY) >diff --git a/Source/WebKit/UIProcess/PageClient.h b/Source/WebKit/UIProcess/PageClient.h >index 0795cd8daf4a903d6e0c02b13897a58766b6c6ca..be2cf7ad36ad681ab545312e11feacaa8963184e 100644 >--- a/Source/WebKit/UIProcess/PageClient.h >+++ b/Source/WebKit/UIProcess/PageClient.h >@@ -456,10 +456,10 @@ public: > #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) >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index ad7d7dc9282e357f30ef24e289a113da63201d92..61a686898ef02e96bd41d156f745b2d3e8c2f2f8 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -679,11 +679,11 @@ public: > 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) >diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in >index 6c35cb411236a138a5c6071707f3c40165050b5e..a864278eef6beb5afdb59b6a495a842e14daba55 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in >+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in >@@ -327,9 +327,9 @@ messages -> WebPageProxy { > #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) >diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.h b/Source/WebKit/UIProcess/ios/PageClientImplIOS.h >index 68e54dbf534a80ff693d897b71fadbf1315605d4..9ce54b7ba548546a9084085c21c3ea67882726ab 100644 >--- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.h >+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.h >@@ -222,11 +222,11 @@ private: > > #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 { } >diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm >index f2304ac7293f0d825d5583429ade1c05fa3703e1..e05da73543b7ab115cdf5db8e4c0f4c0938bc65f 100644 >--- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm >+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm >@@ -788,9 +788,9 @@ void PageClientImpl::didPerformDragOperation(bool handled) > [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 @@ void PageClientImpl::startDrag(const DragItem& item, const ShareableBitmap::Hand > [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 > >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >index d508a3e4ba7cd7ac82186e69a6c275a5a0c8437e..5ea7776e5ae807dde085f28a2f2971370b007edd 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >@@ -429,11 +429,11 @@ FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW) > #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; >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index b28f177ca1485f75e14cccf158284c2962b4b791..541a6c337ce73025810585af515bfdb3849751a1 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -692,7 +692,7 @@ - (void)setupInteraction > [self _createAndConfigureLongPressGestureRecognizer]; > > #if ENABLE(DATA_INTERACTION) >- [self setupDataInteractionDelegates]; >+ [self setupDragAndDropInteractions]; > #endif > > _twoFingerSingleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_twoFingerSingleTapGestureRecognized:)]); >@@ -808,7 +808,7 @@ - (void)cleanupInteraction > > #if ENABLE(DATA_INTERACTION) > [existingLocalDragSessionContext(_dragDropInteractionState.dragSession()) cleanUpTemporaryDirectories]; >- [self teardownDataInteractionDelegates]; >+ [self teardownDragAndDropInteractions]; > #endif > > _inspectorNodeSearchEnabled = NO; >@@ -5431,7 +5431,7 @@ - (id <WKUIDelegatePrivate>)webViewUIDelegate > 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 @@ - (void)setupDataInteractionDelegates > [self addInteraction:_dropInteraction.get()]; > } > >-- (void)teardownDataInteractionDelegates >+- (void)teardownDragAndDropInteractions > { > if (_dragInteraction) > [self removeInteraction:_dragInteraction.get()]; >@@ -5492,7 +5492,7 @@ - (void)_didHandleAdditionalDragItemsRequest:(BOOL)added > _page->didStartDrag(); > } > >-- (void)_didHandleStartDataInteractionRequest:(BOOL)started >+- (void)_didHandleDragStartRequest:(BOOL)started > { > BlockPtr<void()> savedCompletionBlock = _dragDropInteractionState.takeDragStartCompletionBlock(); > ASSERT(savedCompletionBlock); >@@ -5586,7 +5586,7 @@ static NSArray<NSItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop > return extractItemProvidersFromDragItems(session.items); > } > >-- (void)_didConcludeEditDataInteraction:(Optional<WebCore::TextIndicatorData>)data >+- (void)_didConcludeEditDrag:(Optional<WebCore::TextIndicatorData>)data > { > if (!data) > return; >@@ -5599,12 +5599,12 @@ - (void)_didConcludeEditDataInteraction:(Optional<WebCore::TextIndicatorData>)da > 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 @@ - (void)_didPerformDragOperation:(BOOL)handled > _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 @@ - (void)_dragInteraction:(UIDragInteraction *)interaction prepareForSession:(id > _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()); > } >diff --git a/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm b/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >index 8a5302df11dc6b02d88c360b1d87472dff79800d..4726894a93a787190746fd53c67d92820eab7ddf 100644 >--- a/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >+++ b/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >@@ -1117,9 +1117,9 @@ void WebPageProxy::hardwareKeyboardAvailabilityChanged() > > #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 @@ void WebPageProxy::didHandleAdditionalDragItemsRequest(bool added) > 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 @@ void WebPageProxy::requestAdditionalItemsForDragSession(const IntPoint& clientPo > 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 >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm >index f87d93443f7c58a82c4363f034a006013b6aa17f..6b7d64a631a8f5d8720512ca73781b51deeb139b 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm >+++ b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm >@@ -210,7 +210,7 @@ void WebDragClient::declareAndWriteDragImage(const String& pasteboardName, Eleme > > void WebDragClient::didConcludeEditDrag() > { >- m_page->didConcludeEditDataInteraction(); >+ m_page->didConcludeEditDrag(); > } > > #endif // PLATFORM(IOS_FAMILY) >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index 4a40ae0bd35eaf3be04dbaa57ca13db79517ca6b..942e487dd4d91c3b64097b0affb2ca428d5a78f4 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -1096,7 +1096,7 @@ public: > void setUseIconLoadingClient(bool); > > #if ENABLE(DATA_INTERACTION) >- void didConcludeEditDataInteraction(); >+ void didConcludeEditDrag(); > #endif > > WebURLSchemeHandlerProxy* urlSchemeHandlerForScheme(const String&); >@@ -1182,7 +1182,7 @@ private: > #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 > >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >index 54abbaf8934ccdcf8e4f20f783fcb6b9f03040eb..12849dde720b9654f84a34178028f4dfc1809654 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >@@ -289,7 +289,7 @@ messages -> WebPage LegacyReceiver { > #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 > >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index 87d1be1d3878e220d671ad41d521cbd3ce927411..fac629b87088690c3b9dba1ad6684a02dd803bb8 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -656,10 +656,10 @@ void WebPage::requestFocusedElementInformation(WebKit::CallbackID callbackID) > } > > #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 @@ void WebPage::requestAdditionalItemsForDragSession(const IntPoint& clientPositio > 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 > >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm >index dc9a41101cb14d12ce23f5eefdfd5b0475b74f6d..640ce832142e54dba1690d46b38a0cab37d8ecc5 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm >@@ -244,7 +244,7 @@ void WebDragClient::declareAndWriteDragImage(const String& pasteboardName, Eleme > > void WebDragClient::didConcludeEditDrag() > { >- [m_webView _didConcludeEditDataInteraction]; >+ [m_webView _didConcludeEditDrag]; > } > > #endif // PLATFORM(IOS_FAMILY) >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 7c5092e627877e6f9712313a35f34bc55a9db81f..1f602241531d209d46963a2a3f857da6edad8f9d 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -1827,7 +1827,7 @@ - (void)updateLayoutIgnorePendingStyleSheets > - (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 @@ - (void)_endedDataInteraction:(CGPoint)clientPosition global:(CGPoint)globalPosi > _private->draggedLinkURL = nil; > } > >-- (void)_didConcludeEditDataInteraction >+- (void)_didConcludeEditDrag > { > _private->dataOperationTextIndicator = nullptr; > auto* page = _private->page; >diff --git a/Source/WebKitLegacy/mac/WebView/WebViewInternal.h b/Source/WebKitLegacy/mac/WebView/WebViewInternal.h >index 579c8d8850729db793c669d7497993ecf63f77ea..84f6f893f97735818fc18392f55b844f633199c4 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebViewInternal.h >+++ b/Source/WebKitLegacy/mac/WebView/WebViewInternal.h >@@ -264,7 +264,7 @@ OBJC_CLASS NSTextAlternatives; > > #if ENABLE(DATA_INTERACTION) && defined(__cplusplus) > - (void)_startDrag:(const WebCore::DragItem&)dragItem; >-- (void)_didConcludeEditDataInteraction; >+- (void)_didConcludeEditDrag; > #endif > > - (void)_preferencesChanged:(WebPreferences *)preferences;
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 193829
: 360122