[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
commit-queue at webkit.org
commit-queue at webkit.org
Fri Jan 21 14:38:46 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit ae80fe4700eab5ba340b0dd2e7de3544b6656c1f
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 23 21:08:12 2010 +0000
2010-12-23 Jan Erik Hanssen <jhanssen at sencha.com>
Reviewed by Andreas Kling.
[Qt] copy and paste greek symbols to Word, TextEdit results in ?'s being shown
https://bugs.webkit.org/show_bug.cgi?id=35635
Explicitly set text/html data on QClipboard as UTF-8 and also include a <meta>
tag informing the OS that the data is in UTF-8 format.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::writeSelection):
2010-12-23 Jan Erik Hanssen <jhanssen at sencha.com>
Reviewed by Andreas Kling.
[Qt] copy and paste greek symbols to Word, TextEdit results in ?'s being shown
https://bugs.webkit.org/show_bug.cgi?id=35635
Test that QClipboard contains the charset information and unicode data
after copying unicode text.
* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::macCopyUnicodeToClipboard):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c964e8d..5a4b2e7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-23 Jan Erik Hanssen <jhanssen at sencha.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] copy and paste greek symbols to Word, TextEdit results in ?'s being shown
+ https://bugs.webkit.org/show_bug.cgi?id=35635
+
+ Explicitly set text/html data on QClipboard as UTF-8 and also include a <meta>
+ tag informing the OS that the data is in UTF-8 format.
+
+ * platform/qt/PasteboardQt.cpp:
+ (WebCore::Pasteboard::writeSelection):
+
2010-12-23 Justin Schuh <jschuh at chromium.org>
Reviewed by Eric Seidel.
diff --git a/WebCore/platform/qt/PasteboardQt.cpp b/WebCore/platform/qt/PasteboardQt.cpp
index b98e84e..1c60da0 100644
--- a/WebCore/platform/qt/PasteboardQt.cpp
+++ b/WebCore/platform/qt/PasteboardQt.cpp
@@ -65,7 +65,14 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
text.replace(QChar(0xa0), QLatin1Char(' '));
md->setText(text);
- md->setHtml(createMarkup(selectedRange, 0, AnnotateForInterchange, false, AbsoluteURLs));
+ QString markup = createMarkup(selectedRange, 0, AnnotateForInterchange, false, AbsoluteURLs);
+#ifdef Q_OS_MAC
+ markup.prepend(QLatin1String("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head><body>"));
+ markup.append(QLatin1String("</body></html>"));
+ md->setData(QLatin1String("text/html"), markup.toUtf8());
+#else
+ md->setHtml(markup);
+#endif
#ifndef QT_NO_CLIPBOARD
QApplication::clipboard()->setMimeData(md, m_selectionMode ?
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index e96bdbc..76a0efe 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-23 Jan Erik Hanssen <jhanssen at sencha.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] copy and paste greek symbols to Word, TextEdit results in ?'s being shown
+ https://bugs.webkit.org/show_bug.cgi?id=35635
+
+ Test that QClipboard contains the charset information and unicode data
+ after copying unicode text.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::macCopyUnicodeToClipboard):
+
2010-12-22 Sam Weinig <sam at webkit.org>
Reviewed by Darin Adler.
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 8d3921c..2c4b389 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -21,6 +21,7 @@
#include "../util.h"
#include "../WebCoreSupport/DumpRenderTreeSupportQt.h"
+#include <QClipboard>
#include <QDir>
#include <QGraphicsWidget>
#include <QLineEdit>
@@ -129,6 +130,10 @@ private slots:
void supportedContentType();
void infiniteLoopJS();
void networkAccessManagerOnDifferentThread();
+
+#ifdef Q_OS_MAC
+ void macCopyUnicodeToClipboard();
+#endif
private:
QWebView* m_view;
@@ -2644,5 +2649,20 @@ void tst_QWebPage::networkAccessManagerOnDifferentThread()
QCOMPARE(m_page->mainFrame()->childFrames()[0]->url(), QUrl("qrc:///resources/frame_a.html"));
}
+#ifdef Q_OS_MAC
+void tst_QWebPage::macCopyUnicodeToClipboard()
+{
+ QString unicodeText = QString::fromUtf8("αβγδεζηθικλμπ");
+ m_page->mainFrame()->setHtml(QString("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head><body>%1</body></html>").arg(unicodeText));
+ m_page->triggerAction(QWebPage::SelectAll);
+ m_page->triggerAction(QWebPage::Copy);
+
+ QString clipboardData = QString::fromUtf8(QApplication::clipboard()->mimeData()->data(QLatin1String("text/html")));
+
+ QVERIFY(clipboardData.contains(QLatin1String("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />")));
+ QVERIFY(clipboardData.contains(unicodeText));
+}
+#endif
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list