Make UIWKDocumentContext rects per-character instead of per-word
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Apr 2019 21:08:31 +0000 (21:08 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Apr 2019 21:08:31 +0000 (21:08 +0000)
commit3f1153832c99e7367c7f1be733d10c77ad65ca2a
tree14203e02879e53dd5e4e2ef82892672e3316dcb6
parentcdd686070f39a4cb1d1e4c36009fb2daff861e49
Make UIWKDocumentContext rects per-character instead of per-word
https://bugs.webkit.org/show_bug.cgi?id=196459

Reviewed by Wenson Hsieh.

Source/WebCore:

No new tests; adjusted expected results of WebKit.DocumentEditingContext.

* editing/TextIterator.cpp:
(WebCore::CharacterIterator::CharacterIterator):
* editing/TextIterator.h:
(WebCore::CharacterIterator::atEnd const):
(WebCore::CharacterIterator::text const):
Add WEBCORE_EXPORT to some things.
Introduce a CharacterIterator constructor that takes Positions, like one that TextIterator has.
Move initializers to the header.

Source/WebKit:

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestDocumentEditingContext):
Switch to CharacterIterator instead of TextIterator directly, to get
per-character rects as the API requests.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
(TEST):
Adjust test results due to switching to per-character rects.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/editing/TextIterator.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm