[Webkit-unassigned] [Bug 129098] WebKit crashes during execution of ReplaceSelectionCommand

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 14 17:43:06 PDT 2014


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





--- Comment #17 from Ryosuke Niwa <rniwa at webkit.org>  2014-03-14 17:43:28 PST ---
(From update of attachment 226682)
View in context: https://bugs.webkit.org/attachment.cgi?id=226682&action=review

> LayoutTests/editing/execCommand/insertHorizontalRule-into-paragraph-crash.html:28
> +Markup.waitUntilDone();
> +
> +function runTests()
> +{
> +    Markup.dump("content", "Before execCommand('insertHorizontalRule')");
> +
> +    var node = document.getElementById("testParagraph").firstChild;
> +
> +    setSelectionCommand(node, 3, node, 3);
> +    document.execCommand("insertHorizontalRule", false);
> +
> +    Markup.dump("content", "After execCommand('insertHorizontalRule')");
> +
> +    Markup.notifyDone();
> +}

Just move all the script elements to after #content and run the code there.
Then we wouldn't need waitUntilDone/notifyDone calls.

> Source/WebCore/editing/CompositeEditCommand.cpp:232
> +
> +        // If the command has failed, unapply it entirely.
> +        if (hasFailed())
> +            composition()->unapply();

I'm not sure if this is desirable.  I think the user would like to see things happen even if failed to complete.

> Source/WebCore/editing/ReplaceSelectionCommand.cpp:1158
> +    if (!makeInsertedContentRoundTrippableWithHTMLTreeBuilder(insertedNodes)) {
> +        this->reportFailure();
> +        return;
> +    }

I think it's better to simply exit here.

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