[Webkit-unassigned] [Bug 57148] Delete table in contentEditable/designMode produces odd contents

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 23 12:57:57 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=57148


Annie Sullivan <sullivan at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sullivan at chromium.org




--- Comment #5 from Annie Sullivan <sullivan at chromium.org>  2011-05-23 12:57:57 PST ---
(In reply to comment #2)
> (From update of attachment 94453 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=94453&action=review
> 
> > Source/WebCore/editing/EditingStyle.cpp:727
> > +    m_mutableStyle->removeProperty(CSSPropertyWebkitBorderHorizontalSpacing);
> > +    m_mutableStyle->removeProperty(CSSPropertyWebkitBorderVerticalSpacing);
> 
> It's not clear to me why we'd have to remove these two properties.  Are these two properties only ones that we care about?  It seems like there should be a set of properties we'd need to remove.

We talked about this offline, and we're still thinking about where the best place to put code that removes properties like this is. The code review is on hold until we figure it out.

In the meantime, we wanted to check the behavior of other browsers. So I looked at Firefox 4 on Mac and IE9 on Windows 7. Neither browser had the behavior described in the initial report where if you delete the last bit of text in a table, the entire table is deleted. When I deleted the entire table manually, all styles were removed. In Firefox, the table was replace with "<br>", and in IE, it was replaced with nothing.

By contrast, WebKit keeps some styles which may be useful. For example, if you have "<table><tr><td style="font-size:xx-large">X</td></tr></table>", and you backspace to delete "X", WebKit deletes the table and adds "<font class="Apple-style-span" size="6">" around the text, so the text size is preserved. I couldn't get IE or Firefox to delete the table while preserving the font size, color, etc.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list