Tap and hold on Facebook sometimes creates a tall empty selection.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Sep 2019 03:50:04 +0000 (03:50 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Sep 2019 03:50:04 +0000 (03:50 +0000)
commita61d8e6885d6ed6c70912f904ab1835f38146768
tree291f80874b53bca68bc7e64a5401935883ea2b5e
parent1b17c0aa7b66173996f927c4f7fb128ca4d374d0
Tap and hold on Facebook sometimes creates a tall empty selection.
https://bugs.webkit.org/show_bug.cgi?id=201618
rdar://53630145

Reviewed by Megan Gardner.

Source/WebCore:

API Test: SelectionTests.ByWordAtEndOfDocument

* editing/VisibleUnits.cpp:
(WebCore::wordRangeFromPosition):
Remove special case code for the possibility of an empty paragraph and at the end
of the document. This is no longer needed and was causing a large selection to be
created on Facebook due to large areas of non-selectable content on the page.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/SelectionByWord.mm: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/VisibleUnits.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/ios/SelectionByWord.mm [new file with mode: 0644]