LayoutTests:
Reviewed by levi
<rdar://problem/
4609184>
Mail crashes at WebCore::Selection::adjustForEditableContent
<rdar://problem/
4609140>
Crash at WebCore::Range::compareBoundaryPoints
* editing/selection/mixed-editability-1-expected.checksum: Added.
* editing/selection/mixed-editability-1-expected.png: Added.
* editing/selection/mixed-editability-1-expected.txt: Added.
* editing/selection/mixed-editability-1.html: Added.
* editing/selection/mixed-editability-2-expected.checksum: Added.
* editing/selection/mixed-editability-2-expected.png: Added.
* editing/selection/mixed-editability-2-expected.txt: Added.
* editing/selection/mixed-editability-2.html: Added.
WebCore:
Reviewed by levi
<rdar://problem/
4609184>
Mail crashes at WebCore::Selection::adjustForEditableContent
<rdar://problem/
4609140>
Crash at WebCore::Range::compareBoundaryPoints
* editing/Selection.cpp:
(WebCore::Selection::adjustForEditableContent):
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::next): Moved code into a helper function.
(WebCore::VisiblePosition::previous): Ditto.
* editing/htmlediting.cpp:
(WebCore::comparePositions): Moved from Selection.cpp.
(WebCore::lowestEditableAncestor): Added. Returns rootEditableElement
for a node in editable content and the rootEditableElement for the first
ancestor that's editable for a node in non-editable content.
(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):
* editing/htmlediting.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15195
268f45cc-cd09-0410-ab3c-
d52691b4dbfc