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:
parent
2fd388c036
commit
a15f7a968d
|
@ -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',
|
||||
},
|
||||
]
|
||||
|
|
|
@ -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);
|
Loading…
Reference in New Issue