Skip to content

Commit fe80e84

Browse files
committed
[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. Source/WebCore: No change in behavior. * page/EventHandler.h: * page/ios/EventHandlerIOS.mm: (WebCore::EventHandler::tryToBeginDragAtPoint): (WebCore::EventHandler::tryToBeginDataInteractionAtPoint): Deleted. * platform/ios/WebItemProviderPasteboard.mm: (linkTemporaryItemProviderFilesToDropStagingDirectory): Source/WebKit: * 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. Source/WebKitLegacy/mac: * WebCoreSupport/WebDragClient.mm: (WebDragClient::didConcludeEditDrag): * WebView/WebView.mm: (-[WebView _requestStartDataInteraction:globalPosition:]): (-[WebView _didConcludeEditDrag]): (-[WebView _didConcludeEditDataInteraction]): Deleted. * WebView/WebViewInternal.h: Canonical link: https://commits.webkit.org/208330@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent beb2e68 commit fe80e84

22 files changed

Lines changed: 147 additions & 63 deletions

Source/WebCore/ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2019-01-25 Wenson Hsieh <[email protected]>
2+
3+
[iOS] Rename some WebKit-internal functions and variables that reference "data interaction"
4+
https://bugs.webkit.org/show_bug.cgi?id=193829
5+
6+
Reviewed by Tim Horton.
7+
8+
No change in behavior.
9+
10+
* page/EventHandler.h:
11+
* page/ios/EventHandlerIOS.mm:
12+
(WebCore::EventHandler::tryToBeginDragAtPoint):
13+
(WebCore::EventHandler::tryToBeginDataInteractionAtPoint): Deleted.
14+
* platform/ios/WebItemProviderPasteboard.mm:
15+
(linkTemporaryItemProviderFilesToDropStagingDirectory):
16+
117
2019-01-25 Jon Davis <[email protected]>
218

319
Updated feature status for several features

Source/WebCore/page/EventHandler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ class EventHandler {
329329

330330
static Widget* widgetForEventTarget(Element* eventTarget);
331331

332-
#if ENABLE(DATA_INTERACTION)
333-
WEBCORE_EXPORT bool tryToBeginDataInteractionAtPoint(const IntPoint& clientPosition, const IntPoint& globalPosition);
332+
#if PLATFORM(IOS_FAMILY) && ENABLE(DRAG_SUPPORT)
333+
WEBCORE_EXPORT bool tryToBeginDragAtPoint(const IntPoint& clientPosition, const IntPoint& globalPosition);
334334
#endif
335335

336336
#if PLATFORM(IOS_FAMILY)

Source/WebCore/page/ios/EventHandlerIOS.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ static IntSize autoscrollAdjustmentFactorForScreenBoundaries(const IntPoint& con
650650
return false;
651651
}
652652

653-
bool EventHandler::tryToBeginDataInteractionAtPoint(const IntPoint& clientPosition, const IntPoint&)
653+
bool EventHandler::tryToBeginDragAtPoint(const IntPoint& clientPosition, const IntPoint&)
654654
{
655655
Ref<Frame> protectedFrame(m_frame);
656656

@@ -673,7 +673,7 @@ static IntSize autoscrollAdjustmentFactorForScreenBoundaries(const IntPoint& con
673673
auto hitTestedMouseEvent = document->prepareMouseEvent(request, documentPoint, syntheticMouseMoveEvent);
674674

675675
RefPtr<Frame> subframe = subframeForHitTestResult(hitTestedMouseEvent);
676-
if (subframe && subframe->eventHandler().tryToBeginDataInteractionAtPoint(adjustedClientPosition, adjustedGlobalPosition))
676+
if (subframe && subframe->eventHandler().tryToBeginDragAtPoint(adjustedClientPosition, adjustedGlobalPosition))
677677
return true;
678678

679679
if (!eventMayStartDrag(syntheticMousePressEvent))

Source/WebCore/platform/ios/WebItemProviderPasteboard.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -690,12 +690,12 @@ - (NSInteger)numberOfFiles
690690
{
691691
static NSString *defaultDropFolderName = @"folder";
692692
static NSString *defaultDropFileName = @"file";
693-
static NSString *dataInteractionDirectoryPrefix = @"data-interaction";
693+
static NSString *droppedDataDirectoryPrefix = @"dropped-data";
694694
if (!url)
695695
return nil;
696696

697-
NSString *temporaryDataInteractionDirectory = FileSystem::createTemporaryDirectory(dataInteractionDirectoryPrefix);
698-
if (!temporaryDataInteractionDirectory)
697+
NSString *temporaryDropDataDirectory = FileSystem::createTemporaryDirectory(droppedDataDirectoryPrefix);
698+
if (!temporaryDropDataDirectory)
699699
return nil;
700700

701701
NSURL *destination = nil;
@@ -708,7 +708,7 @@ - (NSInteger)numberOfFiles
708708
if (![suggestedName containsString:@"."] && !isFolder)
709709
suggestedName = [suggestedName stringByAppendingPathExtension:url.pathExtension];
710710

711-
destination = [NSURL fileURLWithPath:[temporaryDataInteractionDirectory stringByAppendingPathComponent:suggestedName]];
711+
destination = [NSURL fileURLWithPath:[temporaryDropDataDirectory stringByAppendingPathComponent:suggestedName]];
712712
return [fileManager linkItemAtURL:url toURL:destination error:nil] ? destination : nil;
713713
}
714714

Source/WebKit/ChangeLog

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
2019-01-25 Wenson Hsieh <[email protected]>
2+
3+
[iOS] Rename some WebKit-internal functions and variables that reference "data interaction"
4+
https://bugs.webkit.org/show_bug.cgi?id=193829
5+
6+
Reviewed by Tim Horton.
7+
8+
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
9+
(WebKit::WebPageProxy::setDragCaretRect):
10+
* UIProcess/PageClient.h:
11+
* UIProcess/WebPageProxy.h:
12+
* UIProcess/WebPageProxy.messages.in:
13+
* UIProcess/ios/PageClientImplIOS.h:
14+
* UIProcess/ios/PageClientImplIOS.mm:
15+
(WebKit::PageClientImpl::didHandleDragStartRequest):
16+
(WebKit::PageClientImpl::didConcludeEditDrag):
17+
(WebKit::PageClientImpl::didChangeDragCaretRect):
18+
(WebKit::PageClientImpl::didHandleStartDataInteractionRequest): Deleted.
19+
(WebKit::PageClientImpl::didConcludeEditDataInteraction): Deleted.
20+
(WebKit::PageClientImpl::didChangeDataInteractionCaretRect): Deleted.
21+
* UIProcess/ios/WKContentViewInteraction.h:
22+
* UIProcess/ios/WKContentViewInteraction.mm:
23+
(-[WKContentView setupInteraction]):
24+
(-[WKContentView cleanupInteraction]):
25+
(-[WKContentView setupDragAndDropInteractions]):
26+
(-[WKContentView teardownDragAndDropInteractions]):
27+
(-[WKContentView _didHandleDragStartRequest:]):
28+
(-[WKContentView _didConcludeEditDrag:]):
29+
(-[WKContentView _didChangeDragCaretRect:currentRect:]):
30+
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
31+
(-[WKContentView setupDataInteractionDelegates]): Deleted.
32+
(-[WKContentView teardownDataInteractionDelegates]): Deleted.
33+
(-[WKContentView _didHandleStartDataInteractionRequest:]): Deleted.
34+
(-[WKContentView _didConcludeEditDataInteraction:]): Deleted.
35+
(-[WKContentView _didChangeDataInteractionCaretRect:currentRect:]): Deleted.
36+
* UIProcess/ios/WebPageProxyIOS.mm:
37+
(WebKit::WebPageProxy::didHandleDragStartRequest):
38+
(WebKit::WebPageProxy::requestDragStart):
39+
(WebKit::WebPageProxy::didConcludeEditDrag):
40+
(WebKit::WebPageProxy::didHandleStartDataInteractionRequest): Deleted.
41+
(WebKit::WebPageProxy::requestStartDataInteraction): Deleted.
42+
(WebKit::WebPageProxy::didConcludeEditDataInteraction): Deleted.
43+
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
44+
(WebKit::WebDragClient::didConcludeEditDrag):
45+
* WebProcess/WebPage/WebPage.h:
46+
* WebProcess/WebPage/WebPage.messages.in:
47+
* WebProcess/WebPage/ios/WebPageIOS.mm:
48+
(WebKit::WebPage::requestDragStart):
49+
(WebKit::WebPage::requestAdditionalItemsForDragSession):
50+
(WebKit::WebPage::didConcludeEditDrag):
51+
(WebKit::WebPage::requestStartDataInteraction): Deleted.
52+
(WebKit::WebPage::didConcludeEditDataInteraction): Deleted.
53+
154
2019-01-25 Alex Christensen <[email protected]>
255

356
WKWebView.goBack should reload if there is a safe browsing warning

Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155

156156
auto previousRect = m_currentDragCaretRect;
157157
m_currentDragCaretRect = dragCaretRect;
158-
pageClient().didChangeDataInteractionCaretRect(previousRect, dragCaretRect);
158+
pageClient().didChangeDragCaretRect(previousRect, dragCaretRect);
159159
}
160160

161161
#endif // PLATFORM(IOS_FAMILY)

Source/WebKit/UIProcess/PageClient.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,10 @@ class PageClient : public CanMakeWeakPtr<PageClient> {
458458
#endif
459459

460460
#if ENABLE(DATA_INTERACTION)
461-
virtual void didHandleStartDataInteractionRequest(bool started) = 0;
461+
virtual void didHandleDragStartRequest(bool started) = 0;
462462
virtual void didHandleAdditionalDragItemsRequest(bool added) = 0;
463-
virtual void didConcludeEditDataInteraction(Optional<WebCore::TextIndicatorData>) = 0;
464-
virtual void didChangeDataInteractionCaretRect(const WebCore::IntRect& previousCaretRect, const WebCore::IntRect& caretRect) = 0;
463+
virtual void didConcludeEditDrag(Optional<WebCore::TextIndicatorData>) = 0;
464+
virtual void didChangeDragCaretRect(const WebCore::IntRect& previousCaretRect, const WebCore::IntRect& caretRect) = 0;
465465
#endif
466466

467467
#if ENABLE(ATTACHMENT_ELEMENT)

Source/WebKit/UIProcess/WebPageProxy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,11 +679,11 @@ class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page>
679679
void cancelAutoscroll();
680680
void hardwareKeyboardAvailabilityChanged();
681681
#if ENABLE(DATA_INTERACTION)
682-
void didHandleStartDataInteractionRequest(bool started);
682+
void didHandleDragStartRequest(bool started);
683683
void didHandleAdditionalDragItemsRequest(bool added);
684-
void requestStartDataInteraction(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
684+
void requestDragStart(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
685685
void requestAdditionalItemsForDragSession(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
686-
void didConcludeEditDataInteraction(Optional<WebCore::TextIndicatorData>);
686+
void didConcludeEditDrag(Optional<WebCore::TextIndicatorData>);
687687
#endif
688688
#endif
689689
#if ENABLE(DATA_DETECTION)

Source/WebKit/UIProcess/WebPageProxy.messages.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,9 @@ messages -> WebPageProxy {
327327
#endif
328328

329329
#if ENABLE(DATA_INTERACTION)
330-
DidHandleStartDataInteractionRequest(bool started)
330+
DidHandleDragStartRequest(bool started)
331331
DidHandleAdditionalDragItemsRequest(bool added)
332-
DidConcludeEditDataInteraction(Optional<WebCore::TextIndicatorData> textIndicator)
332+
DidConcludeEditDrag(Optional<WebCore::TextIndicatorData> textIndicator)
333333
#endif
334334

335335
#if PLATFORM(COCOA)

Source/WebKit/UIProcess/ios/PageClientImplIOS.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,11 @@ class PageClientImpl : public PageClientImplCocoa
222222

223223
#if ENABLE(DATA_INTERACTION)
224224
void didPerformDragOperation(bool handled) override;
225-
void didHandleStartDataInteractionRequest(bool started) override;
225+
void didHandleDragStartRequest(bool started) override;
226226
void didHandleAdditionalDragItemsRequest(bool added) override;
227227
void startDrag(const WebCore::DragItem&, const ShareableBitmap::Handle& image) override;
228-
void didConcludeEditDataInteraction(Optional<WebCore::TextIndicatorData>) override;
229-
void didChangeDataInteractionCaretRect(const WebCore::IntRect& previousCaretRect, const WebCore::IntRect& caretRect) override;
228+
void didConcludeEditDrag(Optional<WebCore::TextIndicatorData>) override;
229+
void didChangeDragCaretRect(const WebCore::IntRect& previousCaretRect, const WebCore::IntRect& caretRect) override;
230230
#endif
231231

232232
void didFinishProcessingAllPendingMouseEvents() final { }

0 commit comments

Comments
 (0)