Bug 63362 - convert editing/deleting/paragraph-in-preserveNewline.html to dumpAsText
Summary: convert editing/deleting/paragraph-in-preserveNewline.html to dumpAsText
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-24 15:53 PDT by Wyatt Carss
Modified: 2011-06-29 11:59 PDT (History)
6 users (show)

See Also:


Attachments
Patch (70.93 KB, patch)
2011-06-24 15:56 PDT, Wyatt Carss
no flags Details | Formatted Diff | Diff
Patch (67.88 KB, patch)
2011-06-27 12:52 PDT, Wyatt Carss
no flags Details | Formatted Diff | Diff
Patch (70.71 KB, patch)
2011-06-27 23:18 PDT, Wyatt Carss
rniwa: review-
Details | Formatted Diff | Diff
Proposed patch (13.44 KB, patch)
2011-06-28 12:15 PDT, Wyatt Carss
no flags Details | Formatted Diff | Diff
Proposed patch (69.47 KB, patch)
2011-06-28 12:24 PDT, Wyatt Carss
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wyatt Carss 2011-06-24 15:53:53 PDT
convert editing/deleting/paragraph-in-preserveNewline.html to dumpAsText
Comment 1 Wyatt Carss 2011-06-24 15:56:45 PDT
Created attachment 98555 [details]
Patch
Comment 2 Ryosuke Niwa 2011-06-24 18:46:30 PDT
Comment on attachment 98555 [details]
Patch

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

> LayoutTests/editing/deleting/paragraph-in-preserveNewline-expected.txt:14
> +
> +bar

We should use dump-as-markup so that we can see the markup in #test.  r- due to loss of test coverage.
Comment 3 Wyatt Carss 2011-06-27 12:52:20 PDT
Created attachment 98770 [details]
Patch
Comment 4 Ryosuke Niwa 2011-06-27 22:01:02 PDT
Comment on attachment 98770 [details]
Patch

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

> LayoutTests/ChangeLog:11
> +        * editing/deleting/paragraph-in-preserveNewline-expected.txt: Added.

I don't see this file in the patch.
Comment 5 Wyatt Carss 2011-06-27 23:18:44 PDT
Created attachment 98862 [details]
Patch
Comment 6 Wyatt Carss 2011-06-27 23:20:26 PDT
Comment on attachment 98770 [details]
Patch

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

>> LayoutTests/ChangeLog:11
>> +        * editing/deleting/paragraph-in-preserveNewline-expected.txt: Added.
> 
> I don't see this file in the patch.

That's very odd - I should have caught that it was missing! I looked at a diff of the branch from earlier, and it shows my edits; somehow the script didn't recognize it. Anyway, new patch (with results) is attached.
Comment 7 Ryosuke Niwa 2011-06-27 23:28:07 PDT
Comment on attachment 98862 [details]
Patch

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

> LayoutTests/editing/deleting/paragraph-in-preserveNewline-expected.txt:6
> +| <pre>
> +|   "<#selection-caret>
> +bar"

Huh, bar is outside of pre?  Please file a bug for this.

> LayoutTests/editing/deleting/paragraph-in-preserveNewline.html:20
> +if (window.layoutTestController)
> +     layoutTestController.dumpEditingCallbacks();

You need to do this before modifying selection & calling execCommand("Delete").  r- because of this.
Comment 8 Wyatt Carss 2011-06-28 12:15:38 PDT
Created attachment 98956 [details]
Proposed patch

Hopefully this works - I manually made the patch file using 'git diff -M100 commit-number'. The upload script generates a diff somewhere, and git's dumb "smart rename tracking" which only comes to the surfaces when generating diffs causes the file not to be shown. Passing -M100 or --no-renames to the diff line keeps it from finding renames, which is great - but modifying the upload script to include either of these in calls to git diff didn't seem to have an effect.

Anyway, since webkit-patch doesn't have the ability to pretty-preview an arbitrary patch from a file, and I don't fully trust my ability to read raw diffs, I'll know after uploading this whether the manual diff worked quite the way I wanted.
Comment 9 Wyatt Carss 2011-06-28 12:18:55 PDT
Comment on attachment 98862 [details]
Patch

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

>> LayoutTests/editing/deleting/paragraph-in-preserveNewline-expected.txt:6
>> +bar"
> 
> Huh, bar is outside of pre?  Please file a bug for this.

bar is in a string which has a \n in it -- so it appears on the next line without a new |
Comment 10 Wyatt Carss 2011-06-28 12:24:45 PDT
Created attachment 98957 [details]
Proposed patch

Trying again with '--binary' in the git diff line.
Comment 11 Ryosuke Niwa 2011-06-28 12:24:47 PDT
Comment on attachment 98862 [details]
Patch

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

>>> LayoutTests/editing/deleting/paragraph-in-preserveNewline-expected.txt:6
>>> +bar"
>> 
>> Huh, bar is outside of pre?  Please file a bug for this.
> 
> bar is in a string which has a \n in it -- so it appears on the next line without a new |

Ah ok.
Comment 12 Wyatt Carss 2011-06-28 13:08:31 PDT
The attached patch works - I reapplied it to a clean local dir successfully. For future reference, 'git diff -M100 --binary commit-id > patch.diff' is what to use. I'm going to look into the scripts and see if I can get them to mimic this; it would be cool to have git do renames properly for our purposes.
Comment 13 WebKit Review Bot 2011-06-29 11:58:58 PDT
Comment on attachment 98957 [details]
Proposed patch

Clearing flags on attachment: 98957

Committed r90031: <http://trac.webkit.org/changeset/90031>
Comment 14 WebKit Review Bot 2011-06-29 11:59:03 PDT
All reviewed patches have been landed.  Closing bug.