Crash in WebCore::editingIgnoresContent qtwebkit-2.2-week32
authorAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 15 Aug 2011 21:02:07 +0000 (18:02 -0300)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 15 Aug 2011 21:03:04 +0000 (18:03 -0300)
commit0e9f086adb423a785038bc12e7a646620a890f7a
tree04f22298dc609cf9ea1bcdd67ed8d4595ff2f661
parentfbfc2f9a18a55802204a8e95dd22bb5c1fe49f1a
Crash in WebCore::editingIgnoresContent
https://bugs.webkit.org/show_bug.cgi?id=66125

Author: Abhishek Arya <inferno@chromium.org>
Reviewed by Ryosuke Niwa.

Source/WebCore:

RefPtr a few nodes in case they get blown away in
dispatchEvent calls.

Test: editing/selection/select-start-remove-root-crash.html

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):

LayoutTests:

Tests that we do not crash when we blow away the root
during the firing of selectstart event in selection.

* editing/selection/select-start-remove-root-crash-expected.txt: Added.
* editing/selection/select-start-remove-root-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@92966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:

Source/WebCore/editing/FrameSelection.cpp
LayoutTests/ChangeLog
LayoutTests/editing/selection/select-start-remove-root-crash-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/select-start-remove-root-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/SelectionController.cpp