summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebCore/page/Settings.cpp7
-rw-r--r--WebCore/page/Settings.h3
-rw-r--r--WebKit/android/jni/WebSettings.cpp7
3 files changed, 14 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;
diff --git a/WebKit/android/jni/WebSettings.cpp b/WebKit/android/jni/WebSettings.cpp
index 9b84409..8d4be57 100644
--- a/WebKit/android/jni/WebSettings.cpp
+++ b/WebKit/android/jni/WebSettings.cpp
@@ -119,6 +119,7 @@ struct FieldIds {
mShrinksStandaloneImagesToFit = env->GetFieldID(clazz, "mShrinksStandaloneImagesToFit", "Z");
mMaximumDecodedImageSize = env->GetFieldID(clazz, "mMaximumDecodedImageSize", "J");
mPrivateBrowsingEnabled = env->GetFieldID(clazz, "mPrivateBrowsingEnabled", "Z");
+ mSyntheticLinksEnabled = env->GetFieldID(clazz, "mSyntheticLinksEnabled", "Z");
mUseDoubleTree = env->GetFieldID(clazz, "mUseDoubleTree", "Z");
mPageCacheCapacity = env->GetFieldID(clazz, "mPageCacheCapacity", "I");
@@ -205,6 +206,7 @@ struct FieldIds {
jfieldID mShrinksStandaloneImagesToFit;
jfieldID mMaximumDecodedImageSize;
jfieldID mPrivateBrowsingEnabled;
+ jfieldID mSyntheticLinksEnabled;
jfieldID mUseDoubleTree;
jfieldID mPageCacheCapacity;
// Ordinal() method and value field for enums
@@ -378,6 +380,11 @@ public:
flag = env->GetBooleanField(obj, gFieldIds->mPrivateBrowsingEnabled);
s->setPrivateBrowsingEnabled(flag);
+ flag = env->GetBooleanField(obj, gFieldIds->mSyntheticLinksEnabled);
+ s->setDefaultFormatDetection(flag);
+ s->setFormatDetectionAddress(flag);
+ s->setFormatDetectionEmail(flag);
+ s->setFormatDetectionTelephone(flag);
#if ENABLE(DATABASE)
flag = env->GetBooleanField(obj, gFieldIds->mDatabaseEnabled);
WebCore::Database::setIsAvailable(flag);