summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/WebView/WebPreferences.mm
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/mac/WebView/WebPreferences.mm')
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm39
1 files changed, 36 insertions, 3 deletions
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index e595861..6db14bd 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -306,6 +306,7 @@ static WebCacheModel cacheModelForMainBundle(void)
@"16", WebKitDefaultFontSizePreferenceKey,
@"13", WebKitDefaultFixedFontSizePreferenceKey,
@"ISO-8859-1", WebKitDefaultTextEncodingNamePreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitUsesEncodingDetectorPreferenceKey,
[NSNumber numberWithBool:NO], WebKitUserStyleSheetEnabledPreferenceKey,
@"", WebKitUserStyleSheetLocationPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShouldPrintBackgroundsPreferenceKey,
@@ -313,6 +314,8 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:NO], WebKitShrinksStandaloneImagesToFitPreferenceKey,
[NSNumber numberWithBool:YES], WebKitJavaEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitJavaScriptEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitWebSecurityEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitAllowUniversalAccessFromFileURLsPreferenceKey,
[NSNumber numberWithBool:YES], WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey,
[NSNumber numberWithBool:YES], WebKitPluginsEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDatabasesEnabledPreferenceKey,
@@ -663,7 +666,7 @@ static WebCacheModel cacheModelForMainBundle(void)
return [self _boolValueForKey: WebKitAllowAnimatedImagesPreferenceKey];
}
-- (void)setAllowsAnimatedImages:(BOOL)flag;
+- (void)setAllowsAnimatedImages:(BOOL)flag
{
[self _setBoolValue: flag forKey: WebKitAllowAnimatedImagesPreferenceKey];
}
@@ -688,7 +691,7 @@ static WebCacheModel cacheModelForMainBundle(void)
return [self _boolValueForKey: WebKitDisplayImagesKey];
}
-- (void)setAutosaves:(BOOL)flag;
+- (void)setAutosaves:(BOOL)flag
{
_private->autosaves = flag;
}
@@ -862,6 +865,36 @@ static WebCacheModel cacheModelForMainBundle(void)
_private->automaticallyDetectsCacheModel = automaticallyDetectsCacheModel;
}
+- (BOOL)usesEncodingDetector
+{
+ return [self _boolValueForKey: WebKitUsesEncodingDetectorPreferenceKey];
+}
+
+- (void)setUsesEncodingDetector:(BOOL)flag
+{
+ [self _setBoolValue: flag forKey: WebKitUsesEncodingDetectorPreferenceKey];
+}
+
+- (BOOL)isWebSecurityEnabled
+{
+ return [self _boolValueForKey: WebKitWebSecurityEnabledPreferenceKey];
+}
+
+- (void)setWebSecurityEnabled:(BOOL)flag
+{
+ [self _setBoolValue: flag forKey: WebKitWebSecurityEnabledPreferenceKey];
+}
+
+- (BOOL)allowUniversalAccessFromFileURLs
+{
+ return [self _boolValueForKey: WebKitAllowUniversalAccessFromFileURLsPreferenceKey];
+}
+
+- (void)setAllowUniversalAccessFromFileURLs:(BOOL)flag
+{
+ [self _setBoolValue: flag forKey: WebKitAllowUniversalAccessFromFileURLsPreferenceKey];
+}
+
- (NSTimeInterval)_backForwardCacheExpirationInterval
{
// FIXME: There's probably no good reason to read from the standard user defaults instead of self.
@@ -878,7 +911,7 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _setFloatValue:factor forKey:WebKitPDFScaleFactorPreferenceKey];
}
-- (PDFDisplayMode)PDFDisplayMode;
+- (PDFDisplayMode)PDFDisplayMode
{
PDFDisplayMode value = [self _integerValueForKey:WebKitPDFDisplayModePreferenceKey];
if (value != kPDFDisplaySinglePage && value != kPDFDisplaySinglePageContinuous && value != kPDFDisplayTwoUp && value != kPDFDisplayTwoUpContinuous) {