[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 18:35:34 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit ea446855961deef66c75755fe343fead1a81660f
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 14 10:50:03 2010 +0000
2010-12-14 Jarred Nicholls <jarred at sencha.com>
Reviewed by Kenneth Rohde Christiansen.
Qt's Clipboard::files() implementation for HTML5 Drag/Drop (DataTransfer)
No new tests. Run tests manually until DRT is updated w/ beginDragWithFiles.
* platform/qt/ClipboardQt.cpp:
(WebCore::ClipboardQt::files):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8b948d1..50f243a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-12-14 Jarred Nicholls <jarred at sencha.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Qt's Clipboard::files() implementation for HTML5 Drag/Drop (DataTransfer)
+
+ No new tests. Run tests manually until DRT is updated w/ beginDragWithFiles.
+
+ * platform/qt/ClipboardQt.cpp:
+ (WebCore::ClipboardQt::files):
+
2010-12-13 Antonio Gomes <agomes at rim.com>
Rubber stamped by Daniel Bates.
diff --git a/WebCore/platform/qt/ClipboardQt.cpp b/WebCore/platform/qt/ClipboardQt.cpp
index 20cf62b..c14d362 100644
--- a/WebCore/platform/qt/ClipboardQt.cpp
+++ b/WebCore/platform/qt/ClipboardQt.cpp
@@ -2,6 +2,7 @@
* Copyright (C) 2007 Apple Inc. All rights reserved.
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010 Sencha, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -204,8 +205,20 @@ HashSet<String> ClipboardQt::types() const
PassRefPtr<FileList> ClipboardQt::files() const
{
- notImplemented();
- return 0;
+ if (policy() != ClipboardReadable || !m_readableData->hasUrls())
+ return FileList::create();
+
+ RefPtr<FileList> fileList = FileList::create();
+ QList<QUrl> urls = m_readableData->urls();
+
+ for (int i = 0; i < urls.size(); i++) {
+ QUrl url = urls[i];
+ if (url.scheme() != QLatin1String("file"))
+ continue;
+ fileList->append(File::create(url.toLocalFile()));
+ }
+
+ return fileList.release();
}
void ClipboardQt::setDragImage(CachedImage* image, const IntPoint& point)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list