summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/mac/WebView/WebPreferences.mm
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/mac/WebView/WebPreferences.mm')
-rw-r--r--Source/WebKit/mac/WebView/WebPreferences.mm45
1 files changed, 33 insertions, 12 deletions
diff --git a/Source/WebKit/mac/WebView/WebPreferences.mm b/Source/WebKit/mac/WebView/WebPreferences.mm
index a5f24e0..e69a06b 100644
--- a/Source/WebKit/mac/WebView/WebPreferences.mm
+++ b/Source/WebKit/mac/WebView/WebPreferences.mm
@@ -42,6 +42,7 @@
NSString *WebPreferencesChangedNotification = @"WebPreferencesChangedNotification";
NSString *WebPreferencesRemovedNotification = @"WebPreferencesRemovedNotification";
+NSString *WebPreferencesChangedInternalNotification = @"WebPreferencesChangedInternalNotification";
#define KEY(x) (_private->identifier ? [_private->identifier stringByAppendingString:(x)] : (x))
@@ -232,7 +233,7 @@ static bool useQuickLookQuirks(void)
[[self class] _setInstance:self forIdentifier:_private->identifier];
- [self _postPreferencesChangesNotification];
+ [self _postPreferencesChangedNotification];
return self;
}
@@ -345,6 +346,7 @@ static bool useQuickLookQuirks(void)
[NSNumber numberWithBool:YES], WebKitAllowAnimatedImagesPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAllowAnimatedImageLoopingPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDisplayImagesKey,
+ [NSNumber numberWithBool:NO], WebKitLoadSiteIconsKey,
@"1800", WebKitBackForwardCacheExpirationIntervalKey,
[NSNumber numberWithBool:NO], WebKitTabToLinksPreferenceKey,
[NSNumber numberWithBool:NO], WebKitPrivateBrowsingEnabledPreferenceKey,
@@ -375,7 +377,7 @@ static bool useQuickLookQuirks(void)
[NSNumber numberWithBool:YES], WebKitXSSAuditorEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAcceleratedCompositingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitAcceleratedDrawingEnabledPreferenceKey,
- [NSNumber numberWithBool:YES], WebKitCanvasUsesAcceleratedDrawingPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitCanvasUsesAcceleratedDrawingPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShowDebugBordersPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShowRepaintCounterPreferenceKey,
[NSNumber numberWithBool:NO], WebKitWebGLEnabledPreferenceKey,
@@ -436,7 +438,7 @@ static bool useQuickLookQuirks(void)
[_private->values setObject:value forKey:_key];
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setObject:value forKey:_key];
- [self _postPreferencesChangesNotification];
+ [self _postPreferencesChangedNotification];
}
- (int)_integerValueForKey:(NSString *)key
@@ -453,7 +455,7 @@ static bool useQuickLookQuirks(void)
[_private->values _webkit_setInt:value forKey:_key];
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setInteger:value forKey:_key];
- [self _postPreferencesChangesNotification];
+ [self _postPreferencesChangedNotification];
}
- (float)_floatValueForKey:(NSString *)key
@@ -470,7 +472,7 @@ static bool useQuickLookQuirks(void)
[_private->values _webkit_setFloat:value forKey:_key];
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setFloat:value forKey:_key];
- [self _postPreferencesChangesNotification];
+ [self _postPreferencesChangedNotification];
}
- (BOOL)_boolValueForKey:(NSString *)key
@@ -486,7 +488,7 @@ static bool useQuickLookQuirks(void)
[_private->values _webkit_setBool:value forKey:_key];
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setBool:value forKey:_key];
- [self _postPreferencesChangesNotification];
+ [self _postPreferencesChangedNotification];
}
- (long long)_longLongValueForKey:(NSString *)key
@@ -503,7 +505,7 @@ static bool useQuickLookQuirks(void)
[_private->values _webkit_setLongLong:value forKey:_key];
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithLongLong:value] forKey:_key];
- [self _postPreferencesChangesNotification];
+ [self _postPreferencesChangedNotification];
}
- (unsigned long long)_unsignedLongLongValueForKey:(NSString *)key
@@ -520,7 +522,7 @@ static bool useQuickLookQuirks(void)
[_private->values _webkit_setUnsignedLongLong:value forKey:_key];
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithUnsignedLongLong:value] forKey:_key];
- [self _postPreferencesChangesNotification];
+ [self _postPreferencesChangedNotification];
}
- (NSString *)standardFontFamily
@@ -1173,16 +1175,25 @@ static bool useQuickLookQuirks(void)
[self performSelector:@selector(_checkLastReferenceForIdentifier:) withObject:[self _concatenateKeyWithIBCreatorID:ident] afterDelay:0.1];
}
-- (void)_postPreferencesChangesNotification
+- (void)_postPreferencesChangedNotification
{
if (!pthread_main_np()) {
[self performSelectorOnMainThread:_cmd withObject:nil waitUntilDone:NO];
return;
}
- [[NSNotificationCenter defaultCenter]
- postNotificationName:WebPreferencesChangedNotification object:self
- userInfo:nil];
+ [[NSNotificationCenter defaultCenter] postNotificationName:WebPreferencesChangedInternalNotification object:self userInfo:nil];
+ [[NSNotificationCenter defaultCenter] postNotificationName:WebPreferencesChangedNotification object:self userInfo:nil];
+}
+
+- (void)_postPreferencesChangedAPINotification
+{
+ if (!pthread_main_np()) {
+ [self performSelectorOnMainThread:_cmd withObject:nil waitUntilDone:NO];
+ return;
+ }
+
+ [[NSNotificationCenter defaultCenter] postNotificationName:WebPreferencesChangedNotification object:self userInfo:nil];
}
+ (CFStringEncoding)_systemCFStringEncoding
@@ -1463,6 +1474,16 @@ static NSString *classIBCreatorID = nil;
setWebKitLinkTimeVersion(version);
}
+- (void)setLoadsSiteIconsIgnoringImageLoadingPreference: (BOOL)flag
+{
+ [self _setBoolValue: flag forKey: WebKitLoadSiteIconsKey];
+}
+
+- (BOOL)loadsSiteIconsIgnoringImageLoadingPreference
+{
+ return [self _boolValueForKey: WebKitLoadSiteIconsKey];
+}
+
@end
@implementation WebPreferences (WebInternal)