Bug 41025 - editing/execCommand/copy-without-selection.html fails on Qt after r61637
Summary: editing/execCommand/copy-without-selection.html fails on Qt after r61637
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-06-22 17:10 PDT by Eric Seidel (no email)
Modified: 2010-06-27 07:14 PDT (History)
4 users (show)

See Also:


Attachments
Proposed patch (3.83 KB, patch)
2010-06-22 20:43 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Proposed patch, more ChangeLog (4.23 KB, patch)
2010-06-24 04:40 PDT, Andreas Kling
hausmann: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Proposed patch, updated to apply (4.32 KB, patch)
2010-06-26 02:42 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2010-06-22 17:10:29 PDT
editing/execCommand/copy-without-selection.html fails on Qt after r61637

Looks like the test somehow depended on NULL characters being stripped during fragment parsing.  Just not sure how it did that since it's clearly setting the string "SUCCESS" and getting out "S\0U\0..." converted to \xFFFD in the parser.

The failure appears to be Qt specific.
Comment 1 Eric Seidel (no email) 2010-06-22 17:11:49 PDT
--- /home/webkitbuildbot/slaves/release32bit/buildslave/qt-linux-release/build/layout-test-results/editing/execCommand/copy-without-selection-expected.txt	2010-06-22 16:54:03.788189611 -0700
+++ /home/webkitbuildbot/slaves/release32bit/buildslave/qt-linux-release/build/layout-test-results/editing/execCommand/copy-without-selection-actual.txt	2010-06-22 16:54:03.788189611 -0700
@@ -1 +1 @@
-SUCCESS
+S�U�C�C�E�S�S�
Comment 2 Eric Seidel (no email) 2010-06-22 17:12:12 PDT
� is \xFFFD, the HTML5 replacement character.
Comment 3 Eric Seidel (no email) 2010-06-22 17:13:03 PDT
I think the Qt code might be setting a UTF-16 string as UTF-8, and we just didn't notice before. :)
Comment 4 Eric Seidel (no email) 2010-06-22 17:14:59 PDT
Ooooooooh , i'm soooo goood!

Bad bad Qt:
http://trac.webkit.org/browser/trunk/WebCore/platform/qt/ClipboardQt.cpp#L146
Comment 5 Eric Seidel (no email) 2010-06-22 17:18:50 PDT
See how the Mac code deals with the arguments as strings:
http://trac.webkit.org/browser/trunk/WebCore/platform/mac/ClipboardMac.mm#L238
Comment 6 Eric Seidel (no email) 2010-06-22 17:25:35 PDT
Committed r61641: <http://trac.webkit.org/changeset/61641>
Comment 7 Eric Seidel (no email) 2010-06-22 17:26:37 PDT
Skipped the test until the ClipboardQt::setData bug can be fixed.
Comment 8 Andreas Kling 2010-06-22 20:43:03 PDT
Created attachment 59470 [details]
Proposed patch

Use QMimeData::text() and QMimeData::setText() for "text/plain" data to avoid encoding confusion.
Comment 9 Andreas Kling 2010-06-24 04:40:12 PDT
Created attachment 59638 [details]
Proposed patch, more ChangeLog
Comment 10 WebKit Commit Bot 2010-06-25 15:59:56 PDT
Comment on attachment 59638 [details]
Proposed patch, more ChangeLog

Rejecting patch 59638 from commit-queue.

Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Simon Hausmann', u'--force']" exit_code: 1
Parsed 4 diffs from patch file(s).
patching file LayoutTests/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/platform/qt/Skipped
Hunk #1 FAILED at 5446.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/platform/qt/Skipped.rej
patching file WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file WebCore/platform/qt/ClipboardQt.cpp

Full output: http://webkit-commit-queue.appspot.com/results/3281789
Comment 11 Andreas Kling 2010-06-26 02:42:32 PDT
Created attachment 59828 [details]
Proposed patch, updated to apply
Comment 12 WebKit Commit Bot 2010-06-27 07:14:39 PDT
Comment on attachment 59828 [details]
Proposed patch, updated to apply

Clearing flags on attachment: 59828

Committed r61968: <http://trac.webkit.org/changeset/61968>
Comment 13 WebKit Commit Bot 2010-06-27 07:14:44 PDT
All reviewed patches have been landed.  Closing bug.