RESOLVED FIXED Bug 25501
Extra font tag created when changing fonts
https://bugs.webkit.org/show_bug.cgi?id=25501
Summary Extra font tag created when changing fonts
Annie Sullivan
Reported 2009-04-30 17:14:41 PDT
Steps to reproduce: 1. Go to Midas Demo: http://www.mozilla.org/editor/midasdemo/ 2. Enter the following HTML: <font face="Arial">text</font> (This is what IE generates when setting the font to Arial.) 3. Uncheck "View HTML Source", highlight "text", and change font to Courier. Actual result: <font><font class="Apple-style-span" face="Courier">text</font></font> Expected result: <font class="Apple-style-span" face="Courier">text</font> or just <font face="Courier">text</font> Lots of editing on different browsers can result in a document filling up with redundant tags. This makes it harder and harder to change the font correctly on all browsers.
Attachments
Patch (3.34 KB, patch)
2010-01-20 23:02 PST, Tony Chang
no flags
Patch (3.06 KB, patch)
2010-01-21 17:00 PST, Tony Chang
no flags
Tony Chang
Comment 1 2010-01-20 23:02:54 PST
Tony Chang
Comment 2 2010-01-20 23:04:54 PST
(In reply to comment #1) > Created an attachment (id=47099) [details] > Patch I think the original code wasn't removing the extra font tag because it didn't create the font tag. That said, that seems like a silly reason to keep the extra font tag. E.g., if you unbold a section, webkit doesn't care who created the <b> tags and just remove them.
Darin Adler
Comment 3 2010-01-21 09:54:18 PST
Comment on attachment 47099 [details] Patch r=me
Tony Chang
Comment 4 2010-01-21 17:00:40 PST
Tony Chang
Comment 5 2010-01-21 17:52:10 PST
Comment on attachment 47159 [details] Patch (same as before with better layout test that uses dumpAsText)
WebKit Commit Bot
Comment 6 2010-01-21 22:53:22 PST
Comment on attachment 47159 [details] Patch Clearing flags on attachment: 47159 Committed r53680: <http://trac.webkit.org/changeset/53680>
WebKit Commit Bot
Comment 7 2010-01-21 22:53:27 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.