Use VisiblePosition to calculate selection ranges
authormegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2018 22:41:11 +0000 (22:41 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2018 22:41:11 +0000 (22:41 +0000)
commitfe6d3b535ced80015081138fbb1ff49c7d3e89a6
tree60ee5647a11f45bb518a16e9556ce86386ef49a3
parentfe9391cb0e124ec755cbc7cb5acbf9964d822c11
Use VisiblePosition to calculate selection ranges
https://bugs.webkit.org/show_bug.cgi?id=188767
<rdar://problem/43577166>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Exposing comparePositions.

* editing/Editing.h:

Source/WebKit:

Switches to using VisiblePosition, instead of Position. This code used to use VisiblePosiiton,
but it has been changed a lot lately, and using Position causes issues with next and previous
when trying to snap a selection. VisiblePosition gives us the correct information, and does not
result in collapsed ranges.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::rangeForPointInRootViewCoordinates):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/Editing.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm