summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-08-31 15:45:11 -0400
committerCary Clark <cary@android.com>2010-09-01 10:55:55 -0400
commit6bb45a504d0c8695fdc5d5580b3aba49db3086d7 (patch)
tree733c11daa9ed8512bf8bfb6cc69a8b8c6a63d64a /WebCore
parent0eb2314f8b27b9d07958b55fba1dc7d7264ae86a (diff)
downloadexternal_webkit-6bb45a504d0c8695fdc5d5580b3aba49db3086d7.zip
external_webkit-6bb45a504d0c8695fdc5d5580b3aba49db3086d7.tar.gz
external_webkit-6bb45a504d0c8695fdc5d5580b3aba49db3086d7.tar.bz2
add web setting for enabling/disabling synthetic links
According to this feature request http://b/1865484 Some webviews wish to load pages and ignore the email, phone, and postal addresses. Add a way to specify that preference to the WebView class. depends on companion change in frameworks/base Change-Id: Ibcd78ab632063d8ab403567fa40c329339e51572
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/page/Settings.cpp7
-rw-r--r--WebCore/page/Settings.h3
2 files changed, 7 insertions, 3 deletions
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 24563af..06dcd49 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -158,6 +158,7 @@ Settings::Settings(Page* page)
// hash before trying to use it.
AtomicString::init();
#ifdef ANDROID_META_SUPPORT
+ m_default_format_detection = true;
resetMetadataSettings();
#endif
}
@@ -470,9 +471,9 @@ void Settings::resetMetadataSettings()
m_viewport_maximum_scale = 0;
m_viewport_user_scalable = true;
m_viewport_target_densitydpi = -1;
- m_format_detection_telephone = true;
- m_format_detection_address = true;
- m_format_detection_email = true;
+ m_format_detection_telephone = m_default_format_detection;
+ m_format_detection_address = m_default_format_detection;
+ m_format_detection_email = m_default_format_detection;
}
void Settings::setMetadataSettings(const String& key, const String& value)
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index bca23b0..d048c34 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -283,6 +283,8 @@ namespace WebCore {
void setFormatDetectionTelephone(bool);
bool formatDetectionTelephone() const { return m_format_detection_telephone; }
+
+ void setDefaultFormatDetection(bool flag) { m_default_format_detection = flag; }
#endif
#ifdef ANDROID_MULTIPLE_WINDOWS
bool supportMultipleWindows() const { return m_supportMultipleWindows; }
@@ -443,6 +445,7 @@ namespace WebCore {
bool m_format_detection_address : 1;
// default is yes
bool m_format_detection_email : 1;
+ bool m_default_format_detection : 1;
#endif
#ifdef ANDROID_LAYOUT
bool m_useWideViewport : 1;