Bug 38805 - [Qt] Add PlainTextController to DRT
Summary: [Qt] Add PlainTextController to DRT
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Robert Hogan
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-05-08 12:11 PDT by Robert Hogan
Modified: 2010-09-30 14:22 PDT (History)
6 users (show)

See Also:


Attachments
Proposed Patch (9.70 KB, patch)
2010-05-08 12:13 PDT, Robert Hogan
no flags Details | Formatted Diff | Diff
Patch (11.94 KB, patch)
2010-09-16 13:37 PDT, Robert Hogan
no flags Details | Formatted Diff | Diff
Patch (11.94 KB, patch)
2010-09-30 10:34 PDT, Robert Hogan
no flags Details | Formatted Diff | Diff
Patch (11.93 KB, patch)
2010-09-30 12:43 PDT, Robert Hogan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Hogan 2010-05-08 12:11:39 PDT
and try to get it work correctly.

My current approach has two problems:

- I'm only using the innerText from the range.StartContainer. I don't see a way of getting a reference to the WebCore::Range from the QVariant passed through the qt bridge.
- editing/text-iterator/basic-iteration.html still doesn't fully pass because innerText seems to have a problem with non-whitespace stuff like <span><div> in one test.

So any thoughts welcome!
Comment 1 Robert Hogan 2010-05-08 12:13:32 PDT
Created attachment 55483 [details]
Proposed Patch

OK, this isn't actually for review. It's to get the attention of a reviewer who can help me identify how to fix the two obvious problems with my work so far.
Comment 2 Robert Hogan 2010-05-08 12:16:00 PDT
Output of basic-iteration.html with current patch is:


ontent-Type: text/plain
Unit tests for WebCore text iterator

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is ""
PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is "a"
PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is "a"
PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is "a\nb"
PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is "debugging this note"
FAIL range.selectNodeContents(testDocument.body); plainText.plainText(range) should be Hello
. Was Hello

.
PASS range.selectNodeContents(testDocument.body); plainText.plainText(range) is "hey"
PASS range.setStartBefore(testDocument.body); range.setEndAfter(testDocument.body); plainText.plainText(range) is "hey"
PASS successfullyParsed is true

TEST COMPLETE
Comment 3 Robert Hogan 2010-09-16 13:37:54 PDT
Created attachment 67834 [details]
Patch
Comment 4 WebKit Review Bot 2010-09-16 13:41:48 PDT
Attachment 67834 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKitTools/DumpRenderTree/qt/PlainTextControllerQt.h:36:  Alphabetical sorting problem.  [build/include_order] [4]
WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp:40:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Andreas Kling 2010-09-29 10:56:53 PDT
Comment on attachment 67834 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=67834&action=review

> WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp:758
> +QString DumpRenderTreeSupportQt::plainText(const QVariant& rng)

Variable naming, "rng" should be "range"

LGTM otherwise.
Comment 6 Robert Hogan 2010-09-30 10:34:17 PDT
Created attachment 69348 [details]
Patch
Comment 7 WebKit Commit Bot 2010-09-30 10:59:41 PDT
Comment on attachment 69348 [details]
Patch

Rejecting patch 69348 from commit-queue.

Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'land-attachment', '--force-clean', '--ignore-builders', '--quiet', '--non-interactive', '--parent-command=commit-queue', 69348]" exit_code: 1
Last 500 characters of output:
69348&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=38805&ctype=xml
Processing 1 patch from 1 bug.
Cleaning working directory
Updating working directory
Processing patch 69348 from bug 38805.
NOBODY (OOPS!) found in /Projects/CommitQueue/LayoutTests/ChangeLog does not appear to be a valid reviewer according to committers.py.
ERROR: /Projects/CommitQueue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://queues.webkit.org/results/4214028
Comment 8 Robert Hogan 2010-09-30 12:43:25 PDT
Created attachment 69364 [details]
Patch
Comment 9 WebKit Commit Bot 2010-09-30 14:22:40 PDT
Comment on attachment 69364 [details]
Patch

Clearing flags on attachment: 69364

Committed r68825: <http://trac.webkit.org/changeset/68825>
Comment 10 WebKit Commit Bot 2010-09-30 14:22:45 PDT
All reviewed patches have been landed.  Closing bug.