Commit 62d57875 authored by ap@apple.com's avatar ap@apple.com

[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.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7b59793e
2012-04-18 Alexey Proskuryakov <ap@apple.com>
[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 <leviw@chromium.org>
GraphicsContextCG's roundToDevicePixels should round even when there's no transform
......@@ -36,7 +36,6 @@ namespace WebCore {
DragDestinationActionDHTML = 1,
DragDestinationActionEdit = 2,
DragDestinationActionLoad = 4,
DragDestinationActionUpload = 8, // This value is not part of WebDragDestinationAction. File upload is always allowed.
DragDestinationActionAny = UINT_MAX
} DragDestinationAction;
......
......@@ -469,7 +469,6 @@ bool DragController::concludeEditDrag(DragData* dragData)
return false;
fileInput->receiveDroppedFiles(filenames);
m_client->willPerformDragDestinationAction(DragDestinationActionUpload, dragData);
return true;
}
......
2012-04-18 Alexey Proskuryakov <ap@apple.com>
[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 <jer.noble@apple.com>
Exiting full screen video brings the wrong Safari window to the foreground
......
......@@ -70,9 +70,6 @@ WebCore::DragDestinationAction WebDragClient::actionMaskForDrag(WebCore::DragDat
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()];
}
......
2012-04-18 Alexey Proskuryakov <ap@apple.com>
[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 <allan.jensen@nokia.com>
Clean-up WheelEvent Conversion.
......@@ -36,8 +36,8 @@ void WebDragClient::willPerformDragDestinationAction(DragDestinationAction actio
{
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*)
......
......@@ -2228,7 +2228,7 @@ void WebPage::willPerformLoadDragDestinationAction()
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();
......
......@@ -459,7 +459,7 @@ public:
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment