Check if start and end positions are still valid after updating them through VisibleS...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Oct 2015 02:53:53 +0000 (02:53 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Oct 2015 02:53:53 +0000 (02:53 +0000)
commitaa34c2018e7b7ff0224c9e7d01544b84b069edf3
tree29ba5717cb6a25d7e223e4fb21920f34adf7a88f
parentbbeab9774d3aa44125d7dd880cb8831d72055bcd
Check if start and end positions are still valid after updating them through VisibleSelection.
https://bugs.webkit.org/show_bug.cgi?id=149982

Reviewed by Ryosuke Niwa.

This patch is required to be able to clean up anonymous tables structure.
In certain edge cases, start/end positions could become nullptr after various text splitting
operations.

Covered by editing/execCommand/crash-137961.html

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::applyInlineStyle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/ApplyStyleCommand.cpp