Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2011-04-08 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein. Sandboxing doesn't work if a local file is dropped on the content area https://bugs.webkit.org/show_bug.cgi?id=58177 <rdar://problem/9019253> When performing a drag and the dragging pasteboard contains a local file, create a sandbox extension and pass it along. If we end up loading the file, the sandbox extension tracker will consume the extension. * UIProcess/API/mac/WKView.mm: (maybeCreateSandboxExtensionFromPasteboard): Add helper function. (-[WKView performDragOperation:]): Create a sandbox extension handle and pass it to performDrag. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::dragEntered): (WebKit::WebPageProxy::dragUpdated): (WebKit::WebPageProxy::dragExited): Pass an empty sandbox extension handle to performDragControllerAction. (WebKit::WebPageProxy::performDrag): Pass the sandbox extension handle along to performDragControllerAction. (WebKit::WebPageProxy::performDragControllerAction): Send along the sandbox extension handle. * WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit::WebDragClient::willPerformDragDestinationAction): If the destination action is a load action, call WebPage::willPerformLoadDragDestinationAction. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): Create a sandbox extension. (WebKit::WebPage::willPerformLoadDragDestinationAction): If we have a sandbox extension, pass it along to the sandbox extension tracker. (WebKit::WebPage::SandboxExtensionTracker::willPerformLoadDragDestinationAction): Call setPendingProvisionalSandboxExtension. (WebKit::WebPage::SandboxExtensionTracker::beginLoad): Call setPendingProvisionalSandboxExtension. (WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension): Factor code from beginLoad out into a separate function. * WebProcess/WebPage/WebPage.messages.in: PerformDragControllerAction now takes a sandbox extension handle. Canonical link: https://commits.webkit.org/73134@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Anders Carlsson
committed
Apr 9, 2011
1 parent
e7165b0
commit 8937333
Showing
8 changed files
with
142 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters