Null dereference loading Blink layout test editing/execCommand/delete-hidden-crash.html
https://bugs.webkit.org/show_bug.cgi?id=149289
<rdar://problem/
22746352>
Reviewed by Enrica Casucci.
Source/WebCore:
This is a merge of Blink r176497:
https://codereview.chromium.org/
340713003
It ensures the start & end positions in DeleteSelectionCommand::initializePositionData
are editable.
Test: editing/execCommand/delete-hidden-crash.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::initializePositionData):
* editing/Editor.cpp:
(WebCore::Editor::advanceToNextMisspelling):
* editing/htmlediting.cpp:
(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):
These two functions don't make any sense to return VisiblePosition. Change them
to return Position instead. Since there is a viable conversion from Position to
VisiblePosition. It should not change the behavior of any other components depending
on it.
* editing/htmlediting.h:
LayoutTests:
* editing/execCommand/delete-hidden-crash-expected.txt: Added.
* editing/execCommand/delete-hidden-crash.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192043
268f45cc-cd09-0410-ab3c-
d52691b4dbfc