Bug 58081

Summary: dump-as-markup conversion: editing/pasteboard/paste-text-at-tabspan-001.html and paste-text-at-tabspan-002.html
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Enhancement CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 57743    
Attachments:
Description Flags
Patch
none
fixed 'aa\txz' to 'aax\tz'
none
Patch none

Description Ryosuke Niwa 2011-04-07 14:35:00 PDT
The following two tests should be converted to dump-as-markup tests so that the output can easily be understood:
editing/pasteboard/paste-text-at-tabspan-001.html
editing/pasteboard/paste-text-at-tabspan-002.html
Comment 1 Ryosuke Niwa 2011-04-07 14:55:28 PDT
Created attachment 88707 [details]
Patch
Comment 2 Tony Chang 2011-04-07 15:28:26 PDT
Comment on attachment 88707 [details]
Patch

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

> LayoutTests/editing/pasteboard/paste-text-at-tabspan-001-expected.txt:25
> +You should see aa\tz below:
> +| "
> +"
> +| <span>
> +|   id="test"
> +|   "a"
> +|   <span>
> +|     class="Apple-tab-span"
> +|     style="white-space:pre"
> +|     "a"
> +|     "			"
> +|   "x<#selection-caret>"
> +|   "z"

It looks like it's aa\txz, no?

> LayoutTests/editing/pasteboard/paste-text-at-tabspan-002-expected.txt:15
> +You should see a\tax\t\tz below:

This one looks like a\ta\t\txz.
Comment 3 Ryosuke Niwa 2011-04-07 22:53:58 PDT
Comment on attachment 88707 [details]
Patch

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

>> LayoutTests/editing/pasteboard/paste-text-at-tabspan-001-expected.txt:25

> 
> It looks like it's aa\txz, no?

Oops, this should be "aax\tz".  There's currently a bug in this text. After pasting "a" before the tab, typing x will insert x after the tab.

>> LayoutTests/editing/pasteboard/paste-text-at-tabspan-002-expected.txt:15
>> +You should see a\tax\t\tz below:
> 
> This one looks like a\ta\t\txz.

It's a regression :(
Comment 4 Ryosuke Niwa 2011-04-07 22:58:18 PDT
Created attachment 88770 [details]
fixed 'aa\txz' to 'aax\tz'
Comment 5 Ryosuke Niwa 2011-04-08 03:38:47 PDT
So I investigated a little on why this had never been detected by the existing test, and found out that the bug does not reproduce when div had a style such as style="border: 2px solid red; padding: 12px; font-size: 24px".  I'm uploading a new patch that adds style so as to preserve the original test and also filing a bug about this.
Comment 6 Ryosuke Niwa 2011-04-08 03:54:08 PDT
Created attachment 88794 [details]
Patch
Comment 7 WebKit Commit Bot 2011-04-08 14:06:43 PDT
Comment on attachment 88794 [details]
Patch

Clearing flags on attachment: 88794

Committed r83343: <http://trac.webkit.org/changeset/83343>
Comment 8 WebKit Commit Bot 2011-04-08 14:06:48 PDT
All reviewed patches have been landed.  Closing bug.