Diff
Modified: trunk/Source/WebCore/ChangeLog (114550 => 114551)
--- trunk/Source/WebCore/ChangeLog 2012-04-18 20:12:55 UTC (rev 114550)
+++ trunk/Source/WebCore/ChangeLog 2012-04-18 20:23:10 UTC (rev 114551)
@@ -1,3 +1,19 @@
+2012-04-18 Alexey Proskuryakov <[email protected]>
+
+ [WK2] Sandbox violations prevent attaching files to gmail messages
+ https://bugs.webkit.org/show_bug.cgi?id=84263
+ <rdar://problem/11248260>
+
+ Reviewed by Oliver Hunt.
+
+ * page/DragActions.h: Removed the newly added upload action. We cannot know if or when an
+ upload is going to happen - a drop even listener can always get a reference to a File object,
+ and upload it with XMLHttpRequest.
+
+ * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): Removed a separate
+ willPerformDragDestinationAction call for upload action - ther is nothing we'd want to only
+ do when dropping on a file upload button.
+
2012-04-18 Levi Weintraub <[email protected]>
GraphicsContextCG's roundToDevicePixels should round even when there's no transform
Modified: trunk/Source/WebCore/page/DragActions.h (114550 => 114551)
--- trunk/Source/WebCore/page/DragActions.h 2012-04-18 20:12:55 UTC (rev 114550)
+++ trunk/Source/WebCore/page/DragActions.h 2012-04-18 20:23:10 UTC (rev 114551)
@@ -36,7 +36,6 @@
DragDestinationActionDHTML = 1,
DragDestinationActionEdit = 2,
DragDestinationActionLoad = 4,
- DragDestinationActionUpload = 8, // This value is not part of WebDragDestinationAction. File upload is always allowed.
DragDestinationActionAny = UINT_MAX
} DragDestinationAction;
Modified: trunk/Source/WebCore/page/DragController.cpp (114550 => 114551)
--- trunk/Source/WebCore/page/DragController.cpp 2012-04-18 20:12:55 UTC (rev 114550)
+++ trunk/Source/WebCore/page/DragController.cpp 2012-04-18 20:23:10 UTC (rev 114551)
@@ -469,7 +469,6 @@
return false;
fileInput->receiveDroppedFiles(filenames);
- m_client->willPerformDragDestinationAction(DragDestinationActionUpload, dragData);
return true;
}
Modified: trunk/Source/WebKit/mac/ChangeLog (114550 => 114551)
--- trunk/Source/WebKit/mac/ChangeLog 2012-04-18 20:12:55 UTC (rev 114550)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-04-18 20:23:10 UTC (rev 114551)
@@ -1,3 +1,14 @@
+2012-04-18 Alexey Proskuryakov <[email protected]>
+
+ [WK2] Sandbox violations prevent attaching files to gmail messages
+ https://bugs.webkit.org/show_bug.cgi?id=84263
+ <rdar://problem/11248260>
+
+ Reviewed by Oliver Hunt.
+
+ * WebCoreSupport/WebDragClient.mm: (WebDragClient::willPerformDragDestinationAction):
+ DragDestinationActionUpload no longer exists, so we don't need a special case for it.
+
2012-04-17 Jer Noble <[email protected]>
Exiting full screen video brings the wrong Safari window to the foreground
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm (114550 => 114551)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm 2012-04-18 20:12:55 UTC (rev 114550)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm 2012-04-18 20:23:10 UTC (rev 114551)
@@ -70,9 +70,6 @@
void WebDragClient::willPerformDragDestinationAction(WebCore::DragDestinationAction action, WebCore::DragData* dragData)
{
- // This action is used only by WebKit2. We want to avoid any unwanted side effects for the WebKit clients, therefore we avoid the delegate call.
- if (action == DragDestinationActionUpload)
- return;
[[m_webView _UIDelegateForwarder] webView:m_webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:dragData->platformData()];
}
Modified: trunk/Source/WebKit2/ChangeLog (114550 => 114551)
--- trunk/Source/WebKit2/ChangeLog 2012-04-18 20:12:55 UTC (rev 114550)
+++ trunk/Source/WebKit2/ChangeLog 2012-04-18 20:23:10 UTC (rev 114551)
@@ -1,3 +1,20 @@
+2012-04-18 Alexey Proskuryakov <[email protected]>
+
+ [WK2] Sandbox violations prevent attaching files to gmail messages
+ https://bugs.webkit.org/show_bug.cgi?id=84263
+ <rdar://problem/11248260>
+
+ Reviewed by Oliver Hunt.
+
+ * WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit::WebDragClient::willPerformDragDestinationAction):
+ Prepare to the possibility that file data will be read. This needs to happen on every drop
+ with files, not just after event dispatch.
+
+ * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mayPerformUploadDragDestinationAction):
+ * WebProcess/WebPage/WebPage.h:
+ Renamed performUploadDragDestinationAction to mayPerformUploadDragDestinationAction. We don't
+ know if an upload will actually happen, it's up to _javascript_ code to decide.
+
2012-04-18 Allan Sandfeld Jensen <[email protected]>
Clean-up WheelEvent Conversion.
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp (114550 => 114551)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp 2012-04-18 20:12:55 UTC (rev 114550)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp 2012-04-18 20:23:10 UTC (rev 114551)
@@ -36,8 +36,8 @@
{
if (action == DragDestinationActionLoad)
m_page->willPerformLoadDragDestinationAction();
- else if (action == DragDestinationActionUpload)
- m_page->performUploadDragDestinationAction();
+ else
+ m_page->mayPerformUploadDragDestinationAction(); // Upload can happen from a drop event handler, so we should prepare early.
}
void WebDragClient::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (114550 => 114551)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-04-18 20:12:55 UTC (rev 114550)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-04-18 20:23:10 UTC (rev 114551)
@@ -2228,7 +2228,7 @@
m_sandboxExtensionTracker.willPerformLoadDragDestinationAction(m_pendingDropSandboxExtension.release());
}
-void WebPage::performUploadDragDestinationAction()
+void WebPage::mayPerformUploadDragDestinationAction()
{
for (size_t i = 0; i < m_pendingDropExtensionsForFileUpload.size(); i++)
m_pendingDropExtensionsForFileUpload[i]->consumePermanently();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (114550 => 114551)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2012-04-18 20:12:55 UTC (rev 114550)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2012-04-18 20:23:10 UTC (rev 114551)
@@ -459,7 +459,7 @@
void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
void willPerformLoadDragDestinationAction();
- void performUploadDragDestinationAction();
+ void mayPerformUploadDragDestinationAction();
void beginPrinting(uint64_t frameID, const PrintInfo&);
void endPrinting();