Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: third_party/WebKit/Source/core/page/DragController.cpp

Issue 2572023002: Remove special DataTransfer permissions for file: origins. (Closed)
Patch Set: jsbell feedback, round 2. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dnd/resources/dragged-file.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/DragController.cpp
diff --git a/third_party/WebKit/Source/core/page/DragController.cpp b/third_party/WebKit/Source/core/page/DragController.cpp
index da3319ecdb8a00df032fa20dc69d533f02c54c9b..0be7eaeadf9e19192115fdf043a20fa3d9f9fab6 100644
--- a/third_party/WebKit/Source/core/page/DragController.cpp
+++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -213,11 +213,7 @@ void DragController::dragExited(DragData* dragData, LocalFrame& localRoot) {
FrameView* frameView(localRoot.view());
if (frameView) {
- DataTransferAccessPolicy policy =
- (!m_documentUnderMouse ||
- m_documentUnderMouse->getSecurityOrigin()->isLocal())
- ? DataTransferReadable
- : DataTransferTypesReadable;
+ DataTransferAccessPolicy policy = DataTransferTypesReadable;
DataTransfer* dataTransfer = createDraggingDataTransfer(policy, dragData);
dataTransfer->setSourceOperation(dragData->draggingSourceOperationMask());
localRoot.eventHandler().cancelDragAndDrop(createMouseEvent(dragData),
@@ -718,10 +714,7 @@ bool DragController::tryDHTMLDrag(DragData* dragData,
if (!localRoot.view())
return false;
- DataTransferAccessPolicy policy =
- m_documentUnderMouse->getSecurityOrigin()->isLocal()
- ? DataTransferReadable
- : DataTransferTypesReadable;
+ DataTransferAccessPolicy policy = DataTransferTypesReadable;
DataTransfer* dataTransfer = createDraggingDataTransfer(policy, dragData);
DragOperation srcOpMask = dragData->draggingSourceOperationMask();
dataTransfer->setSourceOperation(srcOpMask);
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dnd/resources/dragged-file.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698