[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
eric at webkit.org
eric at webkit.org
Thu Oct 29 20:48:05 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 9ab8533cd3863a2b8a921e82846a58ff1cb47585
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 19 21:31:25 2009 +0000
2009-10-19 Marshall Culpepper <mculpepper at appcelerator.com>
Reviewed by Adam Roben.
implemented ClipboardWin::files()
https://bugs.webkit.org/show_bug.cgi?id=29666
* platform/win/ClipboardWin.cpp:
(WebCore::ClipboardWin::files):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7bf08ec..c7e4c87 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-19 Marshall Culpepper <mculpepper at appcelerator.com>
+
+ Reviewed by Adam Roben.
+
+ implemented ClipboardWin::files()
+ https://bugs.webkit.org/show_bug.cgi?id=29666
+
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::ClipboardWin::files):
+
2009-10-19 Nate Chapin <japhet at chromium.org>
Reviewed by Alexey Proskuryakov.
diff --git a/WebCore/platform/win/ClipboardWin.cpp b/WebCore/platform/win/ClipboardWin.cpp
index b2e8e3e..b75ce46 100644
--- a/WebCore/platform/win/ClipboardWin.cpp
+++ b/WebCore/platform/win/ClipboardWin.cpp
@@ -577,8 +577,32 @@ HashSet<String> ClipboardWin::types() const
PassRefPtr<FileList> ClipboardWin::files() const
{
- notImplemented();
- return 0;
+ RefPtr<FileList> files = FileList::create();
+ if (policy() != ClipboardReadable && policy() != ClipboardTypesReadable)
+ return files.release();
+
+ if (!m_dataObject)
+ return files.release();
+
+ STGMEDIUM medium;
+ if (FAILED(m_dataObject->GetData(cfHDropFormat(), &medium)))
+ return files.release();
+
+ HDROP hdrop = reinterpret_cast<HDROP>(GlobalLock(medium.hGlobal));
+ if (!hdrop)
+ return files.release();
+
+ WCHAR filename[MAX_PATH];
+ UINT fileCount = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0);
+ for (UINT i = 0; i < fileCount; i++) {
+ if (!DragQueryFileW(hdrop, i, filename, ARRAYSIZE(filename)))
+ continue;
+ files->append(File::create(reinterpret_cast<UChar*>(filename)));
+ }
+
+ GlobalUnlock(medium.hGlobal);
+ ReleaseStgMedium(&medium);
+ return files.release();
}
void ClipboardWin::setDragImage(CachedImage* image, Node *node, const IntPoint &loc)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list