[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:48:45 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 86e0992371d1a01270430af3a8b70e96e873d934
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jul 2 17:27:36 2004 +0000
Reviewed by Dave.
- fixed problem where tabsToLinks and privateBrowsingEnabled did not work with non-
standard WebPreferences objects
* WebView.subproj/WebPreferences.m:
(-[WebPreferences _valueForKey:]): New helper.
(-[WebPreferences _stringValueForKey:]): Use _valueForKey.
(-[WebPreferences _integerValueForKey:]): Use _valueForKey.
(-[WebPreferences _boolValueForKey:]): Use _valueForKey.
(-[WebPreferences tabsToLinks]): Use _boolValueForKey; this is the bug fix.
(-[WebPreferences privateBrowsingEnabled]): Ditto.
(+[WebPreferences _setIBCreatorID:]): Use copy instead of retain for keeping an NSString.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 813a48d..031aeff 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2004-07-02 Darin Adler <darin at apple.com>
+
+ Reviewed by Dave.
+
+ - fixed problem where tabsToLinks and privateBrowsingEnabled did not work with non-
+ standard WebPreferences objects
+
+ * WebView.subproj/WebPreferences.m:
+ (-[WebPreferences _valueForKey:]): New helper.
+ (-[WebPreferences _stringValueForKey:]): Use _valueForKey.
+ (-[WebPreferences _integerValueForKey:]): Use _valueForKey.
+ (-[WebPreferences _boolValueForKey:]): Use _valueForKey.
+ (-[WebPreferences tabsToLinks]): Use _boolValueForKey; this is the bug fix.
+ (-[WebPreferences privateBrowsingEnabled]): Ditto.
+ (+[WebPreferences _setIBCreatorID:]): Use copy instead of retain for keeping an NSString.
+
2004-07-01 Trey Matteson <trey at apple.com>
3556159 - Crashes in -[WebFrame(WebPrivate) _transitionToCommitted:] at www.mastercardbusiness.com
@@ -293,15 +309,6 @@
to get CGImageRef; can't include an individual header.
2004-06-15 Richard Williamson <rjw at apple.com>
-<<<<<<< ChangeLog
-=======
-
- Fixed <rdar://problem/3695875>: Objective-C instances that are exported to JavaScript are too promiscuous
-
- Flip the policy for exposing Objective-C methods and properties.
-
- Reviewed by Trey.
->>>>>>> 1.2589
Fixed <rdar://problem/3695875>: Objective-C instances that are exported to JavaScript are too promiscuous
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index b50e627..8bef7c1 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -533,7 +533,6 @@ static WebHTMLView *lastHitView = nil;
{
ASSERT(tag == TRACKING_RECT_TAG);
if (_private != nil) {
- ASSERT(_private->trackingRectOwner != nil);
_private->trackingRectOwner = nil;
}
}
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index a5cf233..9afa6b4 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -45,7 +45,7 @@
NSString *WebPreferencesChangedNotification = @"WebPreferencesChangedNotification";
-#define KEY(x) [(_private->identifier?_private->identifier:@"") stringByAppendingString:x]
+#define KEY(x) (_private->identifier ? [_private->identifier stringByAppendingString:(x)] : (x))
enum { WebPreferencesVersion = 1 };
@@ -72,12 +72,6 @@ enum { WebPreferencesVersion = 1 };
@interface WebPreferences (WebInternal)
+ (NSString *)_concatenateKeyWithIBCreatorID:(NSString *)key;
+ (NSString *)_IBCreatorID;
-- (NSString *)_stringValueForKey: (NSString *)key;
-- (void)_setStringValue: (NSString *)value forKey: (NSString *)key;
-- (int)_integerValueForKey: (NSString *)key;
-- (void)_setIntegerValue: (int)value forKey: (NSString *)key;
-- (int)_boolValueForKey: (NSString *)key;
-- (void)_setBoolValue: (BOOL)value forKey: (NSString *)key;
@end
@implementation WebPreferences
@@ -242,72 +236,60 @@ NS_ENDHANDLER
return _private->identifier;
}
-- (NSString *)_stringValueForKey: (NSString *)key
+- (id)_valueForKey:(NSString *)key
{
NSString *_key = KEY(key);
- NSString *s = [_private->values objectForKey:_key];
- if (s)
- return s;
- s = [[NSUserDefaults standardUserDefaults] stringForKey:_key];
- if (!s)
- s = [[NSUserDefaults standardUserDefaults] stringForKey:key];
- return s;
+ id o = [_private->values objectForKey:_key];
+ if (o)
+ return o;
+ o = [[NSUserDefaults standardUserDefaults] objectForKey:_key];
+ if (!o && key != _key)
+ o = [[NSUserDefaults standardUserDefaults] objectForKey:key];
+ return o;
}
-- (void)_setStringValue: (NSString *)value forKey: (NSString *)key
+- (NSString *)_stringValueForKey:(NSString *)key
+{
+ id s = [self _valueForKey:key];
+ return [s isKindOfClass:[NSString class]] ? (NSString *)s : nil;
+}
+
+- (void)_setStringValue:(NSString *)value forKey:(NSString *)key
{
NSString *_key = KEY(key);
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setObject:value forKey:_key];
-
- [_private->values setObject: value forKey:_key];
-
+ [_private->values setObject:value forKey:_key];
[self _postPreferencesChangesNotification];
}
-- (int)_integerValueForKey: (NSString *)key
+- (int)_integerValueForKey:(NSString *)key
{
- NSString *_key = KEY(key);
- NSNumber *n = [_private->values objectForKey:_key];
- if (n)
- return [n intValue];
- n = [[NSUserDefaults standardUserDefaults] objectForKey:_key];
- if (!n)
- n = [[NSUserDefaults standardUserDefaults] objectForKey:key];
- return [n intValue];
+ id o = [self _valueForKey:key];
+ //
+ return [o respondsToSelector:@selector(intValue)] ? [o intValue] : 0;
}
-- (void)_setIntegerValue: (int)value forKey: (NSString *)key
+- (void)_setIntegerValue:(int)value forKey:(NSString *)key
{
NSString *_key = KEY(key);
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setInteger:value forKey:_key];
-
- [_private->values _web_setInt: value forKey: _key];
-
+ [_private->values _web_setInt:value forKey:_key];
[self _postPreferencesChangesNotification];
}
-- (int)_boolValueForKey: (NSString *)key
+- (BOOL)_boolValueForKey:(NSString *)key
{
- NSString *_key = KEY(key);
- NSNumber *n = [_private->values objectForKey:_key];
- if (n)
- return [n boolValue];
- n = [[NSUserDefaults standardUserDefaults] objectForKey:_key];
- if (!n)
- n = [[NSUserDefaults standardUserDefaults] objectForKey:key];
- return [n intValue] != 0 ? YES : NO;
+ return [self _integerValueForKey:key] != 0;
}
-- (void)_setBoolValue: (BOOL)value forKey: (NSString *)key
+- (void)_setBoolValue:(BOOL)value forKey:(NSString *)key
{
NSString *_key = KEY(key);
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setBool:value forKey:_key];
-
- [_private->values _web_setBool: value forKey: _key];
-
+ [_private->values _web_setBool:value forKey:_key];
[self _postPreferencesChangesNotification];
}
@@ -553,7 +535,7 @@ NS_ENDHANDLER
- (BOOL)tabsToLinks
{
- return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitTabToLinksPreferenceKey];
+ return [self _boolValueForKey:WebKitTabToLinksPreferenceKey];
}
- (void)setPrivateBrowsingEnabled:(BOOL)flag
@@ -563,7 +545,7 @@ NS_ENDHANDLER
- (BOOL)privateBrowsingEnabled
{
- return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitPrivateBrowsingEnabledPreferenceKey];
+ return [self _boolValueForKey:WebKitPrivateBrowsingEnabledPreferenceKey];
}
@end
@@ -626,17 +608,19 @@ static NSMutableDictionary *webPreferencesInstances = nil;
userInfo:nil];
}
-static NSString *classIBCreatorID = 0;
+static NSString *classIBCreatorID = nil;
+ (void)_setIBCreatorID:(NSString *)string
{
-
- if (classIBCreatorID != string){
- [classIBCreatorID release];
- classIBCreatorID = [string retain];
- }
+ NSString *old = classIBCreatorID;
+ classIBCreatorID = [string copy];
+ [old release];
}
+ at end
+
+ at implementation WebPreferences (WebInternal)
+
+ (NSString *)_IBCreatorID
{
return classIBCreatorID;
@@ -652,12 +636,13 @@ static NSString *classIBCreatorID = 0;
@end
- at implementation NSMutableDictionary (WebPrivate)
+ at implementation NSMutableDictionary (WebInternal)
+
- (void)_web_checkLastReferenceForIdentifier:(NSString *)identifier
{
WebPreferences *instance = [webPreferencesInstances objectForKey:identifier];
if ([instance retainCount] == 1)
[webPreferencesInstances removeObjectForKey:identifier];
}
- at end
+ at end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list