iOS WebKit: Crash in charactersAroundPosition.
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jun 2014 23:20:11 +0000 (23:20 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jun 2014 23:20:11 +0000 (23:20 +0000)
commitbc2ea56318dd564f2268b93044a6ada868183ac5
treefa6b8cd661d0d47c69f80152206a208541995dc2
parenta519fbc02358fc48c262ff68db8de164aca35209
iOS WebKit: Crash in charactersAroundPosition.
https://bugs.webkit.org/show_bug.cgi?id=133659
<rdar://problem/17220870>

Reviewed by Benjamin Poulain.

Source/WebCore:
Ensure that we stay within the vector boundaries
when returning the characters around the position.

* editing/VisibleUnits.cpp:
(WebCore::charactersAroundPosition):

Source/WebKit2:
We only need to compute charactersAroundPosition when we are in
editable content.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/VisibleUnits.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebPage.cpp