[webkit-reviews] review granted: [Bug 42941] Redo fails after text node is split by SplitTextNodeCommand : [Attachment 62546] Added a test and fix per Darin's comment.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 25 23:17:23 PDT 2010


Darin Adler <darin at apple.com> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 42941: Redo fails after text node is split by SplitTextNodeCommand
https://bugs.webkit.org/show_bug.cgi?id=42941

Attachment 62546: Added a test and fix per Darin's comment.
https://bugs.webkit.org/attachment.cgi?id=62546&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
>      ExceptionCode ec = 0;
>      m_text2->insertData(0, prefixText, ec);
> +    ASSERT(!ec);

Asserting here is OK because insertData can only return an exception when the
offset is larger than the text size, and we are passing an offset of 0.

> +    m_text2->parentNode()->insertBefore(m_text1.get(), m_text2.get(), ec);
> +    ASSERT(!ec);

But asserting here seems possibly wrong. Are you sure there are no exceptions
that insertBefore might raise in unusual circumstances?


More information about the webkit-reviews mailing list