Send more context about text selection to telephone number scanner
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jun 2014 17:52:18 +0000 (17:52 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jun 2014 17:52:18 +0000 (17:52 +0000)
commit660b16e3c8fd122f00b2270c84fcf70629db5ec9
tree23fbe05c436100154e6898cc3db02a0ea86c0c76
parentad984b06924b220f28903c3fa7560ad6d19bc68e
Send more context about text selection to telephone number scanner
<rdar://problem/16874385> and https://bugs.webkit.org/show_bug.cgi?id=133684

Reviewed by Enrica Casucci.

* dom/Range.cpp:
(WebCore::rangesOverlap):Add a utility to check if two ranges overlap.
* dom/Range.h:

* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers): Create a range that is wider than the
  actual selection to search for phone numbers that are not completely selected yet.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Range.cpp
Source/WebCore/dom/Range.h
Source/WebCore/editing/Editor.cpp