[Webkit-unassigned] [Bug 30083] Data loss occurs when unbolding nested bold tags.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 17 21:38:30 PDT 2009


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


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #41369|                            |review?
               Flag|                            |




--- Comment #8 from Ryosuke Niwa <rniwa at webkit.org>  2009-10-17 21:38:28 PDT ---
Created an attachment (id=41369)
 --> (https://bugs.webkit.org/attachment.cgi?id=41369)
Fixes the loop in swapInNodePreservingAttributesAndChildren

It turned out that the bug resided in
swapInNodePreservingAttributesAndChildren:

https://trac.webkit.org/browser/trunk/WebCore/editing/ReplaceNodeWithSpanCommand.cpp#L60

60        for (Node* child = nodeToReplace->firstChild(); child; child =
child->nextSibling()) {
61            newNode->appendChild(child, ec);
62            ASSERT(!ec);
63        }

As soon as we appendChild to newNode in L61, nextSibling() is changed to 0.
In my patch, I introduced Node* nextChild to temporarily save the pointer.

-- 
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