Bug 19702 - blockquote gets clobbered on delete, but the font-tag inside it doesn't
Summary: blockquote gets clobbered on delete, but the font-tag inside it doesn't
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: GoogleBug
Depends on:
Blocks:
 
Reported: 2008-06-20 18:33 PDT by Ojan Vafai
Modified: 2012-05-02 13:53 PDT (History)
8 users (show)

See Also:


Attachments
reduced test case (413 bytes, text/html)
2008-06-20 18:34 PDT, Ojan Vafai
no flags Details
Adds a test (2.68 KB, patch)
2012-05-01 23:06 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Did s/ / / (12.20 KB, patch)
2012-05-01 23:09 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Right patch (2.67 KB, patch)
2012-05-02 13:12 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 world" below:

WTF... I swear I've replaced   by a space.
Comment 4 Ryosuke Niwa 2012-05-01 23:09:32 PDT
Created attachment 139754 [details]
Did s/ / /
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.