Bug 58132 - REGRESSION: a character appears after tab span when typing immediately before the tab span
Summary: REGRESSION: a character appears after tab span when typing immediately before...
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2011-04-08 03:50 PDT by Ryosuke Niwa
Modified: 2011-04-26 04:12 PDT (History)
9 users (show)

See Also:

test case (463 bytes, text/html)
2011-04-08 03:50 PDT, Ryosuke Niwa
no flags Details
Patch (4.70 KB, patch)
2011-04-25 16:15 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2011-04-08 03:50:56 PDT
Created attachment 88793 [details]
test case

Reproduction steps:
1. Open the attached test case
2. Copy "hello"
3. Paste "hello" immediately after "hello"
4. Type "x"

Expected result:
"x" appears immediately after the second "hello" before a tab span.

Actual result:
"x" appears after the tab span.
Comment 1 Adele Peterson 2011-04-08 10:25:39 PDT
Comment 2 Adele Peterson 2011-04-08 10:51:32 PDT
I can reproduce this in Safari 5.0.3
Comment 3 Ryosuke Niwa 2011-04-08 10:54:09 PDT
(In reply to comment #2)
> I can reproduce this in Safari 5.0.3

I see so I guess this is a pretty old regression.  It doesn't reproduce on Chrome 10 though.
Comment 4 Adele Peterson 2011-04-08 10:57:57 PDT
The rough range I found was between r 46914 and 58919.  I'm having trouble bisecting right now.
Comment 5 Levi Weintraub 2011-04-25 11:30:25 PDT
It appears that the problem arises because the pasted "hello" goes into the Tab Span, which we proceed to avoid trying to place any other text in when editing. Paste shouldn't place the text into the tab span and InsertTextCommand::positionInsideTextNode shouldn't assume any position in a tab span should be moved to after the tab span.
Comment 6 Levi Weintraub 2011-04-25 16:15:11 PDT
Created attachment 90986 [details]
Comment 7 Ryosuke Niwa 2011-04-25 23:23:39 PDT
Comment on attachment 90986 [details]

r=me provided you've ran all layout tests.
Comment 8 Levi Weintraub 2011-04-25 23:31:22 PDT
Comment on attachment 90986 [details]

Clearing flags on attachment: 90986

Committed r84885: <http://trac.webkit.org/changeset/84885>
Comment 9 WebKit Review Bot 2011-04-26 04:12:01 PDT
http://trac.webkit.org/changeset/84885 might have broken SnowLeopard Intel Release (WebKit2 Tests)