Safari crashes when calling execCommand on formatted html in special case
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2009 01:06:26 +0000 (01:06 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2009 01:06:26 +0000 (01:06 +0000)
commit848f7859c04933557e1a4acc07550b5af61771d4
treeddb243d67dbb757ac2fd79566d1665e3dd8233e1
parent4ed3a57938669e227cf88e8d7dbf85871d15908e
Safari crashes when calling execCommand on formatted html in special case
<rdar://problem/7318656>
https://bugs.webkit.org/show_bug.cgi?id=31023

Reviewed by Adele Peterson and Dan Bernstein.

WebCore:

Test: editing/execCommand/align-in-span.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock): Modified comment on containingBlock returning NULL.
* rendering/RenderText.cpp:
(WebCore::RenderText::setSelectionState): Added check for NULL return from containingBlock,
since it is possible when dealing with orphaned trees.

LayoutTests:

* editing/execCommand/align-in-span-expected.txt: Added.
* editing/execCommand/align-in-span.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@50433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/align-in-span-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/align-in-span.html [new file with mode: 0755]
WebCore/ChangeLog
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderText.cpp