Null dereference loading Blink layout test editing/execCommand/format-block-uneditabl...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Oct 2015 00:35:24 +0000 (00:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Oct 2015 00:35:24 +0000 (00:35 +0000)
commit985ec397e83e4c50c844dc784f1759d3b4841699
tree596d326f81e8233b49763ee71689923932c4e03e
parente7f404f75e62328e7d6c37a1d2443240ceb26943
Null dereference loading Blink layout test editing/execCommand/format-block-uneditable-crash.html
https://bugs.webkit.org/show_bug.cgi?id=150207
<rdar://problem/23137066>

Patch by Jiewen Tan <jiewen_tan@apple.com> on 2015-10-27
Reviewed by Enrica Casucci.

Source/WebCore:

This is a merge of Blink r200238:
https://codereview.chromium.org/1280263002

Test: editing/execCommand/format-block-uneditable-crash.html

* editing/ApplyBlockElementCommand.cpp:
(WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
splitTextNode() will return early if the given text node is not editable. Hence, check
its editablity before calling the method.

LayoutTests:

* editing/execCommand/format-block-uneditable-crash-expected.txt: Added.
* editing/execCommand/format-block-uneditable-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/format-block-uneditable-crash-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/format-block-uneditable-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/ApplyBlockElementCommand.cpp