Backport crash fix by Huzaifa Sidhpurwala <huzaifas@redhat.com>
authorHuzaifa Sidhpurwala <huzaifas@redhat.com>
Mon, 31 Jan 2011 09:23:35 +0000 (14:53 +0530)
committerHuzaifa Sidhpurwala <huzaifas@redhat.com>
Mon, 31 Jan 2011 09:23:35 +0000 (14:53 +0530)
commit1b07db37f69bda36c837033e7443b531229a90bb
treec47fbf2a390761d0303a7c2ec6c6d854de6e3a62
parent4d701fcc540c9393171a051087a3556b242a7d93
Backport crash fix by Huzaifa Sidhpurwala <huzaifas@redhat.com>

commit 005063e17ff45046c76227e0bad8caa471d06032
Author: inferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 10 22:09:37 2010 +0000

    2010-12-10  Emil Eklund  <eae@chromium.org>

            Reviewed by Adam Barth.

            Fix crash in ReplaceSelectionCommand::doApply when selection is modified
            during execution.
            https://bugs.webkit.org/show_bug.cgi?id=50840

            Test: editing/execCommand/insertHTML-mutation-crash.html

            * editing/ReplaceSelectionCommand.cpp:
            (WebCore::ReplaceSelectionCommand::copyStyleToChildren):
            Replaced raw node pointer with RefPtr.

            (WebCore::ReplaceSelectionCommand::doApply):
            Replaced raw node pointer with RefPtr and added null check.
    2010-12-10  Emil Eklund  <eae@chromium.org>

            Reviewed by Adam Barth.

            Add testcase for ReplaceSelectionCommand crash.
            https://bugs.webkit.org/show_bug.cgi?id=50840

            * editing/execCommand/insertHTML-mutation-crash.html: Added.

    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/editing/insertHTML-mutation-crash-expected.txt [new file with mode: 0644]
LayoutTests/editing/insertHTML-mutation-crash.html [new file with mode: 0644]
WebCore/editing/ReplaceSelectionCommand.cpp