Summary: | [Qt] copy and paste greek symbols to Word, TextEdit results in ?'s being shown | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tor Arne Vestbø <vestbo> | ||||||
Component: | New Bugs | Assignee: | QtWebKit Unassigned <webkit-qt-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ariya.hidayat, commit-queue, jhanssen, kent.hansen | ||||||
Priority: | P2 | Keywords: | Qt | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Other | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
Tor Arne Vestbø
2010-03-03 03:17:08 PST
Reproduced with r55986, http://html5demos.com/contenteditable This is caused by Pasteboard::writeSelection() calling QMimeData::setHtml() and there's two separate issues involved here. 1) QMacPasteboardMimeAny::convertFromMime() returns UTF-8 data only for text/plain, not text/html. Not sure if this is intended or not but I don't think it can be changed in Qt without breaking existing code. 2) HTML on the Pasteboard on OS X needs to be explicitly told that it contains unicode data (i.e. using a <meta> tag). I'll upload a patch shortly that fixes this. Created attachment 76329 [details]
Patch
Comment on attachment 76329 [details]
Patch
Seems you'd want to share more code with PasteboardMac here. :(
Comment on attachment 76329 [details]
Patch
We really need a better way of testing clipboard tests like this.
(In reply to comment #5) > (From update of attachment 76329 [details]) > We really need a better way of testing clipboard tests like this. Agreed. This particular one would be hard to test though since this bug only happens when copying from QtWebKit and pasting to a non-Qt program so I don't see how this could be tested without launching an external application. Created attachment 77245 [details]
Patch
Change the manual test case in the previous test to an autotest for Qt which checks that QClipboard contains the selected unicode data and also verifies that the clipboard data contains the charset information
> Seems you'd want to share more code with PasteboardMac here. :(
This bug is caused by Qt-specific handling in its QClipboard abstraction.
Comment on attachment 77245 [details]
Patch
Looks sane enough to me.
The commit-queue encountered the following flaky tests while processing attachment 77245 [details]: http/tests/appcache/local-content.html bug 51558 (author: ap@webkit.org) The commit-queue is continuing to process your patch. Comment on attachment 77245 [details] Patch Clearing flags on attachment: 77245 Committed r74577: <http://trac.webkit.org/changeset/74577> All reviewed patches have been landed. Closing bug. |