diff options
author | John Reck <jreck@google.com> | 2012-05-24 19:18:49 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-05-24 19:20:37 -0700 |
commit | 917ab176521f67983bd1c7cdb99f55ce8fc412f5 (patch) | |
tree | 35b90c6fe72f94009df9646f7b3c70804591ee61 /Source/WebKit/android/content/address_detector.cpp | |
parent | 91f41286e33b387859e4841711f3054bcf75c748 (diff) | |
download | external_webkit-917ab176521f67983bd1c7cdb99f55ce8fc412f5.zip external_webkit-917ab176521f67983bd1c7cdb99f55ce8fc412f5.tar.gz external_webkit-917ab176521f67983bd1c7cdb99f55ce8fc412f5.tar.bz2 |
Support content detection metatags
Bug: 6558360
Change-Id: Idf02946306119755e3284b74f20ea5566f68d8ee
Diffstat (limited to 'Source/WebKit/android/content/address_detector.cpp')
-rw-r--r-- | Source/WebKit/android/content/address_detector.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebKit/android/content/address_detector.cpp b/Source/WebKit/android/content/address_detector.cpp index 8c9f230..f6657d9 100644 --- a/Source/WebKit/android/content/address_detector.cpp +++ b/Source/WebKit/android/content/address_detector.cpp @@ -40,6 +40,7 @@ #include "base/utf_string_conversions.h" #include "net/base/escape.h" +#include "Settings.h" #include "WebString.h" #include <wtf/HashSet.h> @@ -157,6 +158,11 @@ size_t AddressDetector::GetMaximumContentLength() { return kMaxAddressLength; } +bool AddressDetector::IsEnabled(const WebKit::WebHitTestInfo& hit_test) { + WebCore::Settings* settings = GetSettings(hit_test); + return settings && settings->formatDetectionAddress(); +} + bool AddressDetector::FindContent(const string16::const_iterator& begin, const string16::const_iterator& end, size_t* start_pos, size_t* end_pos) { HouseNumberParser house_number_parser; |