Title: [257533] branches/safari-610.1.5-branch
- Revision
- 257533
- Author
- [email protected]
- Date
- 2020-02-26 16:42:56 -0800 (Wed, 26 Feb 2020)
Log Message
Cherry-pick r257364. rdar://problem/59826931
REGRESSION (r256882): Can't drag an HTML file into a new (empty) Safari tab
https://bugs.webkit.org/show_bug.cgi?id=208199
<rdar://problem/59746887>
Reviewed by Alex Christensen.
Source/WebKit:
Make sure we launch the initial WKWebView's WebProcess when a drag enters the view, so that the drag & drop
logic still works on empty views.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dragEntered):
Tools:
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
(TEST):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610.1.5-branch/Source/WebKit/ChangeLog (257532 => 257533)
--- branches/safari-610.1.5-branch/Source/WebKit/ChangeLog 2020-02-27 00:42:52 UTC (rev 257532)
+++ branches/safari-610.1.5-branch/Source/WebKit/ChangeLog 2020-02-27 00:42:56 UTC (rev 257533)
@@ -1,3 +1,45 @@
+2020-02-26 Alan Coon <[email protected]>
+
+ Cherry-pick r257364. rdar://problem/59826931
+
+ REGRESSION (r256882): Can't drag an HTML file into a new (empty) Safari tab
+ https://bugs.webkit.org/show_bug.cgi?id=208199
+ <rdar://problem/59746887>
+
+ Reviewed by Alex Christensen.
+
+ Source/WebKit:
+
+ Make sure we launch the initial WKWebView's WebProcess when a drag enters the view, so that the drag & drop
+ logic still works on empty views.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::dragEntered):
+
+ Tools:
+
+ Add API test coverage.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
+ (TEST):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-02-25 Chris Dumez <[email protected]>
+
+ REGRESSION (r256882): Can't drag an HTML file into a new (empty) Safari tab
+ https://bugs.webkit.org/show_bug.cgi?id=208199
+ <rdar://problem/59746887>
+
+ Reviewed by Alex Christensen.
+
+ Make sure we launch the initial WKWebView's WebProcess when a drag enters the view, so that the drag & drop
+ logic still works on empty views.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::dragEntered):
+
2020-02-25 Alan Coon <[email protected]>
Cherry-pick r257264. rdar://problem/59778922
Modified: branches/safari-610.1.5-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (257532 => 257533)
--- branches/safari-610.1.5-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-02-27 00:42:52 UTC (rev 257532)
+++ branches/safari-610.1.5-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-02-27 00:42:56 UTC (rev 257533)
@@ -2329,6 +2329,7 @@
#if ENABLE(DRAG_SUPPORT)
void WebPageProxy::dragEntered(DragData& dragData, const String& dragStorageName)
{
+ launchInitialProcessIfNecessary();
performDragControllerAction(DragControllerAction::Entered, dragData, dragStorageName, { }, { });
}
Modified: branches/safari-610.1.5-branch/Tools/ChangeLog (257532 => 257533)
--- branches/safari-610.1.5-branch/Tools/ChangeLog 2020-02-27 00:42:52 UTC (rev 257532)
+++ branches/safari-610.1.5-branch/Tools/ChangeLog 2020-02-27 00:42:56 UTC (rev 257533)
@@ -1,3 +1,44 @@
+2020-02-26 Alan Coon <[email protected]>
+
+ Cherry-pick r257364. rdar://problem/59826931
+
+ REGRESSION (r256882): Can't drag an HTML file into a new (empty) Safari tab
+ https://bugs.webkit.org/show_bug.cgi?id=208199
+ <rdar://problem/59746887>
+
+ Reviewed by Alex Christensen.
+
+ Source/WebKit:
+
+ Make sure we launch the initial WKWebView's WebProcess when a drag enters the view, so that the drag & drop
+ logic still works on empty views.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::dragEntered):
+
+ Tools:
+
+ Add API test coverage.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
+ (TEST):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-02-25 Chris Dumez <[email protected]>
+
+ REGRESSION (r256882): Can't drag an HTML file into a new (empty) Safari tab
+ https://bugs.webkit.org/show_bug.cgi?id=208199
+ <rdar://problem/59746887>
+
+ Reviewed by Alex Christensen.
+
+ Add API test coverage.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
+ (TEST):
+
2020-02-21 Jonathan Bedard <[email protected]>
Build DumpRenderTree and WebKitTestRunner for macCatalyst
Modified: branches/safari-610.1.5-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm (257532 => 257533)
--- branches/safari-610.1.5-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm 2020-02-27 00:42:52 UTC (rev 257532)
+++ branches/safari-610.1.5-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm 2020-02-27 00:42:56 UTC (rev 257533)
@@ -116,6 +116,35 @@
EXPECT_WK_STREQ("https://webkit.org/\nhttps://apple.com/", [webView stringByEvaluatingJavaScript:@"urlData.textContent"]);
}
+TEST(DragAndDropTests, DragAndDropOnEmptyView)
+{
+ auto simulator = adoptNS([[DragAndDropSimulator alloc] initWithWebViewFrame:CGRectMake(0, 0, 320, 500)]);
+ simulator.get().dragDestinationAction = WKDragDestinationActionAny;
+ auto webView = [simulator webView];
+
+ NSURL *url = "" mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
+
+#if PLATFORM(MAC)
+ NSPasteboard *pasteboard = [NSPasteboard pasteboardWithUniqueName];
+ [pasteboard writeObjects:@[ url ]];
+ [simulator setExternalDragPasteboard:pasteboard];
+#else
+ auto urlItem = adoptNS([[NSItemProvider alloc] initWithObject:url]);
+ urlItem.get().preferredPresentationStyle = UIPreferredPresentationStyleInline;
+ [simulator setExternalItemProviders:@[ urlItem.get() ]];
+#endif
+
+ [simulator runFrom:CGPointMake(0, 0) to:CGPointMake(100, 100)];
+
+ __block bool finished = false;
+ [webView performAfterLoading:^{
+ finished = true;
+ }];
+ TestWebKitAPI::Util::run(&finished);
+
+ EXPECT_WK_STREQ("Simple HTML file.", [webView stringByEvaluatingJavaScript:@"document.body.innerText"]);
+}
+
TEST(DragAndDropTests, PreventingMouseDownShouldPreventDragStart)
{
auto simulator = adoptNS([[DragAndDropSimulator alloc] initWithWebViewFrame:CGRectMake(0, 0, 320, 500)]);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes