[webkit-reviews] review requested: [Bug 8194] Style spans with no style are not always deleted : [Attachment 9076] patch

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Wed Jun 28 07:53:39 PDT 2006


Graham Dennis <Graham.Dennis at gmail.com> has asked Justin Garcia
<justin.garcia at apple.com> for review:
Bug 8194: Style spans with no style are not always deleted
http://bugzilla.opendarwin.org/show_bug.cgi?id=8194

Attachment 9076: patch
http://bugzilla.opendarwin.org/attachment.cgi?id=9076&action=edit

------- Additional Comments from Graham Dennis <Graham.Dennis at gmail.com>
The bug is caused because when applying a style to part of a #text node, a
style span is created around it before the #text node is split. Later, when the
empty style spans are being cleaned up, iteration proceeds from the inserted
node to its ancestors, but stopping when a node has a sibling before/after it
as appropriate. In this case, the empty style span is missed because the span
is one level further up. I'm not sure if this is the correct fix, but I've
simply changed the cleanup code to iterate from the node where the style was
changed all the way back to the root editable element cleaning up empty style
spans along the way.

Included in this patch is an automated testcase. This patch passes the layout
tests except for:
editing/style/remove-underline-across-paragraph-in-bold
editing/style/remove-underline-in-bold
editing/style/typing-style-003
The only changes for these testcases however is the removal of the empty style
spans.



More information about the webkit-reviews mailing list