REGRESSION (r171016): Reproducible infinite spin selecting phone number
https://bugs.webkit.org/show_bug.cgi?id=135183
<rdar://problem/
17727342>
Reviewed by Ryosuke Niwa.
* editing/Editor.cpp:
(WebCore::Editor::scanRangeForTelephoneNumbers):
Make use of TextIterator::subrange, which knows how to make a subrange from character positions,
instead of assuming that our character positions translate directly to positions in the incoming range.
Make use of DocumentMarkerController::addMarker, which takes a range and applies the marker to
all text nodes inside the range as appropriate.
Fix naming of the shadowed 'length' local.
Fix a typo in the comment.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171376
268f45cc-cd09-0410-ab3c-
d52691b4dbfc