Autocorrection causes ASSERT when replacing alternative string
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Apr 2014 21:35:17 +0000 (21:35 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Apr 2014 21:35:17 +0000 (21:35 +0000)
commit2a48a7e3e6c9e0d0600ae134cc5c064a31343c56
tree34407906f830f023f57d4d34718044d46947dce1
parentdf41e1e1d1634ded9de0c8774b9ea0dd6400e11e
Autocorrection causes ASSERT when replacing alternative string
https://bugs.webkit.org/show_bug.cgi?id=131475

Reviewed by Ryosuke Niwa.

In AlternativeTextController::applyAlternativeTextToRange(), we attempt to create
a Range that crosses from outside of a shadow root to inside of one. Instead,
we should keep the Range entirely within the shadow root.

Test: ManualTests/autocorrection/autocorrection-accept-crash.html

* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::applyAlternativeTextToRange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167151 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ManualTests/autocorrection/autocorrection-accept-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/AlternativeTextController.cpp