Bug 19702

Summary: blockquote gets clobbered on delete, but the font-tag inside it doesn't
Product: WebKit Reporter: Ojan Vafai <ovafai>
Component: HTML EditingAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, ayg, enrica, eric, jparent, justin.garcia, ovafai, webkit.review.bot
Priority: P2 Keywords: GoogleBug
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Attachments:
Description Flags
reduced test case
none
Adds a test
none
Did s/&nbsp;/ /
none
Right patch none

Description Ojan Vafai 2008-06-20 18:33:54 PDT
The test-case attached has instructions. The short version is that there is a font-tag inside a blockquote. Selecting from the beginning of the font-tag to the end of the contentEditable region and hitting delete gets rid of the blockquote tag and not the font tag. 

It should either get rid of both or keep both. I think the right thing is to keep both. This is what IE does. It's also what MS Word does in my brief testing.
Comment 1 Ojan Vafai 2008-06-20 18:34:40 PDT
Created attachment 21866 [details]
reduced test case
Comment 2 Ryosuke Niwa 2012-05-01 23:06:20 PDT
Created attachment 139753 [details]
Adds a test

This bug appears to have been fixed. Let's just add a test.
Comment 3 Ryosuke Niwa 2012-05-01 23:08:54 PDT
Comment on attachment 139753 [details]
Adds a test

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

> LayoutTests/editing/execCommand/delete-line-and-insert-text-in-font-inside-blockquote-expected.txt:3
> +There should be exactly one blockquote and you should see "hello&nbsp;world" below:

WTF... I swear I've replaced &nbsp; by a space.
Comment 4 Ryosuke Niwa 2012-05-01 23:09:32 PDT
Created attachment 139754 [details]
Did s/&nbsp;/ /
Comment 5 Ryosuke Niwa 2012-05-02 13:12:07 PDT
Created attachment 139866 [details]
Right patch
Comment 6 Enrica Casucci 2012-05-02 13:13:50 PDT
Comment on attachment 139866 [details]
Right patch

Looks good to me.
Comment 7 WebKit Review Bot 2012-05-02 13:53:16 PDT
Comment on attachment 139866 [details]
Right patch

Clearing flags on attachment: 139866

Committed r115884: <http://trac.webkit.org/changeset/115884>
Comment 8 WebKit Review Bot 2012-05-02 13:53:28 PDT
All reviewed patches have been landed.  Closing bug.