Telephone number detection should respect its setting consistently
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Apr 2014 19:47:27 +0000 (19:47 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Apr 2014 19:47:27 +0000 (19:47 +0000)
commita935e3ffdf3037bbd4dec02f6e56b29b3a333181
tree28691f90c7ee3d4cb4f890590106e4544f413446
parent33b7355be8ac57b175de43a75fca96ba1ae0fc5e
Telephone number detection should respect its setting consistently
https://bugs.webkit.org/show_bug.cgi?id=131893
rdar://problem/16597639

Reviewed by Tim Horton.

* editing/Editor.cpp:
(WebCore::Editor::respondToChangedSelection): Only start the timer
if shouldDetectTelephoneNumbers returns true.
(WebCore::Editor::shouldDetectTelephoneNumbers): Added. Calls both
isTelephoneNumberParsingEnabled and TelephoneNumberDetector::isSupported.
(WebCore::Editor::scanSelectionForTelephoneNumbers): Use
shouldDetectTelephoneNumbers.
(WebCore::Editor::clearDataDetectedTelephoneNumbers): Use document()
instead of m_frame.document().

* editing/Editor.h: Added declaration of shouldDetectTelephoneNumbers.

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