Crashes in WebCore::ApplyStyleCommand.doApply()
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Sep 2011 09:02:36 +0000 (09:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Sep 2011 09:02:36 +0000 (09:02 +0000)
commit1b99cd84b47ba14440cb45d71cd87eb6dd3a594d
tree6eeeeaa7710971b201702eaa500701a56713ac11
parentc2704c8cab1680eec9c61b436be7633f6ba26bc5
Crashes in WebCore::ApplyStyleCommand.doApply()
https://bugs.webkit.org/show_bug.cgi?id=67765

Patch by Shinya Kawanaka <shinyak@google.com> on 2011-09-09
Reviewed by Ryosuke Niwa.

WebCore::enclosingBlock may return null, but ApplyStyleCommand::applyBlockStyle did not check it. This patch make it to be checked.

Source/WebCore:

Test: editing/style/remove-format-without-enclosing-block.html

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle): Added null check.

LayoutTests:

* editing/style/remove-format-without-enclosing-block-expected.txt: Added.
* editing/style/remove-format-without-enclosing-block.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/style/remove-format-without-enclosing-block-expected.txt [new file with mode: 0644]
LayoutTests/editing/style/remove-format-without-enclosing-block.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/ApplyStyleCommand.cpp