Crash in ApplyStyleCommand::applyInlineStyleToNodeRange.
authorinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Mar 2012 20:03:28 +0000 (20:03 +0000)
committerinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Mar 2012 20:03:28 +0000 (20:03 +0000)
commit2b2e70db2b1630d71fded3f22ce79d1fe1e1a020
tree11f24a7bb3240b72b3c53074b3f126222f4b3deb
parentc75b0b5b1540d9c7fb4e246e93bd63909630c905
Crash in ApplyStyleCommand::applyInlineStyleToNodeRange.
https://bugs.webkit.org/show_bug.cgi?id=81959

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: editing/execCommand/apply-style-command-crash.html

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): RefPtr the weak
node iterator |node|.
* editing/ApplyStyleCommand.h:
(ApplyStyleCommand): convert |startNode| and |pastEndNode| into PassRefPtr.

LayoutTests:

* editing/execCommand/apply-style-command-crash-expected.txt: Added.
* editing/execCommand/apply-style-command-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/apply-style-command-crash-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/apply-style-command-crash.html [new file with mode: 0755]
Source/WebCore/ChangeLog
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/ApplyStyleCommand.h