WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
120726
When deleting editable content, typing style should be reset when moving into another node.
https://bugs.webkit.org/show_bug.cgi?id=120726
Summary
When deleting editable content, typing style should be reset when moving into...
Arpita Bahuguna
Reported
2013-09-04 23:18:43 PDT
1. Fetch the attached testpage. 2. Start back-deleting from the end of the word "World" which is in blue color. 3. Notice how after deleting a few characters of this word, typing anything new would take on the existing word's style, i.e. newly typed content would be in blue color. 4. However continue deleting and start deleting the word "Hello". 5. Notice that even this time new content will appear in blue color, instead of taking on the existing content's style. Typing style should be reset or cleared when we move into a different node.
Attachments
Testpage
(368 bytes, text/html)
2013-09-04 23:19 PDT
,
Arpita Bahuguna
no flags
Details
Patch
(5.35 KB, patch)
2013-09-05 03:44 PDT
,
Arpita Bahuguna
no flags
Details
Formatted Diff
Diff
Patch
(5.95 KB, patch)
2013-09-06 02:16 PDT
,
Arpita Bahuguna
no flags
Details
Formatted Diff
Diff
Patch for landing
(5.96 KB, patch)
2013-09-09 23:57 PDT
,
Arpita Bahuguna
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Arpita Bahuguna
Comment 1
2013-09-04 23:19:23 PDT
Created
attachment 210551
[details]
Testpage
Ryosuke Niwa
Comment 2
2013-09-04 23:25:55 PDT
Confirmed. WebKit doesn't match either TextEdit or Firefox in this case.
Radar WebKit Bug Importer
Comment 3
2013-09-04 23:26:06 PDT
<
rdar://problem/14916114
>
Arpita Bahuguna
Comment 4
2013-09-05 03:44:13 PDT
Created
attachment 210597
[details]
Patch
Ryosuke Niwa
Comment 5
2013-09-06 01:44:34 PDT
Comment on
attachment 210597
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=210597&action=review
> Source/WebCore/editing/DeleteSelectionCommand.cpp:283 > // typing style at the start of the selection, nor is there a reason to > // compute the style at the start of the selection after deletion (see the > // early return in calculateTypingStyleAfterDelete).
Perhaps you should update this comment as well.
> LayoutTests/editing/deleting/maintain-style-after-delete-expected.txt:3 > +Dump of markup 1:
This is rather mysterious title.
> LayoutTests/editing/deleting/maintain-style-after-delete.html:19 > +Markup.dump(test);
You can pass in a description as the second argument. e.g. "Deleting the blue text and typing O immediately after it. O should be blue below"
> LayoutTests/editing/deleting/maintain-style-after-delete.html:24 > +Markup.dump(test);
e.g. "Deleting O and the preceding space, then typing W. W should not be in blue below"
Arpita Bahuguna
Comment 6
2013-09-06 02:16:19 PDT
Created
attachment 210712
[details]
Patch
Arpita Bahuguna
Comment 7
2013-09-06 02:17:33 PDT
(In reply to
comment #5
)
> (From update of
attachment 210597
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=210597&action=review
>
Many thanks for the review rniwa! Have made the suggested changes and uploaded another patch.
> > Source/WebCore/editing/DeleteSelectionCommand.cpp:283 > > // typing style at the start of the selection, nor is there a reason to > > // compute the style at the start of the selection after deletion (see the > > // early return in calculateTypingStyleAfterDelete). > > Perhaps you should update this comment as well. > > > LayoutTests/editing/deleting/maintain-style-after-delete-expected.txt:3 > > +Dump of markup 1: > > This is rather mysterious title. > > > LayoutTests/editing/deleting/maintain-style-after-delete.html:19 > > +Markup.dump(test); > > You can pass in a description as the second argument. e.g. "Deleting the blue text and typing O immediately after it. O should be blue below" > > > LayoutTests/editing/deleting/maintain-style-after-delete.html:24 > > +Markup.dump(test); > > e.g. "Deleting O and the preceding space, then typing W. W should not be in blue below"
Ryosuke Niwa
Comment 8
2013-09-06 13:11:18 PDT
Comment on
attachment 210712
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=210712&action=review
> LayoutTests/editing/deleting/maintain-style-after-delete-expected.txt:3 > +Deleting 'W' in blue color and then inserting 'O'. The following markup should show 'O' in blue color.:
We shouldn't have . before :.
> LayoutTests/editing/deleting/maintain-style-after-delete-expected.txt:9 > +Deleting the blue colored text and the preceding space and then inserting 'W'. 'W' should be not be in blue color in the following markup.:
Ditto.
Arpita Bahuguna
Comment 9
2013-09-09 23:57:09 PDT
Created
attachment 211177
[details]
Patch for landing
WebKit Commit Bot
Comment 10
2013-09-10 00:26:19 PDT
Comment on
attachment 211177
[details]
Patch for landing Clearing flags on attachment: 211177 Committed
r155425
: <
http://trac.webkit.org/changeset/155425
>
WebKit Commit Bot
Comment 11
2013-09-10 00:26:22 PDT
All reviewed patches have been landed. Closing bug.
Arpita Bahuguna
Comment 12
2013-09-10 00:33:48 PDT
(In reply to
comment #8
)
> (From update of
attachment 210712
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=210712&action=review
> > > LayoutTests/editing/deleting/maintain-style-after-delete-expected.txt:3 > > +Deleting 'W' in blue color and then inserting 'O'. The following markup should show 'O' in blue color.: > > We shouldn't have . before :. > > > LayoutTests/editing/deleting/maintain-style-after-delete-expected.txt:9 > > +Deleting the blue colored text and the preceding space and then inserting 'W'. 'W' should be not be in blue color in the following markup.: > > Ditto.
Thanks for the review rniwa! I made the aforementioned changes and landed the patch.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug