Backport crash fix by Huzaifa Sidhpurwala <huzaifas@redhat.com>
authorHuzaifa Sidhpurwala <huzaifas@redhat.com>
Mon, 17 Jan 2011 08:40:04 +0000 (14:10 +0530)
committerHuzaifa Sidhpurwala <huzaifas@redhat.com>
Mon, 17 Jan 2011 08:40:04 +0000 (14:10 +0530)
commit99dbeca11735236dd8e4316f073d2840f7bf184b
tree669774ebd6dc65633aa62e9630a7a158b8186410
parente0ef61576fd00bd6e14a70c96a230086febf1741
Backport crash fix by Huzaifa Sidhpurwala <huzaifas@redhat.com>

    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/execCommand/insertHTML-mutation-crash-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/insertHTML-mutation-crash.html [new file with mode: 0644]
WebCore/editing/ReplaceSelectionCommand.cpp