Allow inspection of drag&drop clipboard contents for non-local schemes (issue #533).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/963@517 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2012-02-23 23:14:15 +00:00
parent 2fd388c036
commit a15f7a968d
2 changed files with 34 additions and 0 deletions

View File

@ -43,4 +43,10 @@ patches = [
'path': '../webkit/plugins/npapi/',
'condition': 'CEF_SPI_BUILD',
},
{
# http://code.google.com/p/chromiumembedded/issues/detail?id=533
'name': 'spi_webcore_533',
'path': '../third_party/WebKit/Source/WebCore/page/',
'condition': 'CEF_SPI_BUILD',
},
]

View File

@ -0,0 +1,28 @@
Index: DragController.cpp
===================================================================
--- DragController.cpp (revision 102901)
+++ DragController.cpp (working copy)
@@ -175,7 +175,11 @@
Frame* mainFrame = m_page->mainFrame();
if (RefPtr<FrameView> v = mainFrame->view()) {
+#if 0
ClipboardAccessPolicy policy = (!m_documentUnderMouse || m_documentUnderMouse->securityOrigin()->isLocal()) ? ClipboardReadable : ClipboardTypesReadable;
+#else
+ ClipboardAccessPolicy policy = ClipboardReadable;
+#endif
RefPtr<Clipboard> clipboard = Clipboard::create(policy, dragData, mainFrame);
clipboard->setSourceOperation(dragData->draggingSourceOperationMask());
mainFrame->eventHandler()->cancelDragAndDrop(createMouseEvent(dragData), clipboard.get());
@@ -574,7 +578,11 @@
if (!viewProtector)
return false;
+#if 0
ClipboardAccessPolicy policy = m_documentUnderMouse->securityOrigin()->isLocal() ? ClipboardReadable : ClipboardTypesReadable;
+#else
+ ClipboardAccessPolicy policy = ClipboardReadable;
+#endif
RefPtr<Clipboard> clipboard = Clipboard::create(policy, dragData, mainFrame.get());
DragOperation srcOpMask = dragData->draggingSourceOperationMask();
clipboard->setSourceOperation(srcOpMask);