[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:49:16 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 2293d4a5f0c571d2938ffe40a0f6cc97286ed7ff
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jul 29 01:23:26 2003 +0000

    	Fixed 3323866.  Provide SPI to IB to enable scoping of preferences
    	values on a document-by-document basis.
    
            Reviewed by Maciej.
    
            * WebView.subproj/WebPreferences.m:
            (-[WebPreferencesPrivate dealloc]):
            (-[WebPreferences initWithIdentifier:]):
            (-[WebPreferences initWithCoder:]):
            (+[WebPreferences _userDefaultsKeysForIB]):
            (+[WebPreferences _setIBCreatorID:]):
            (+[WebPreferences _IBCreatorID]):
            (-[WebPreferences _concatenateKeyWithIBCreatorID:]):
            * WebView.subproj/WebPreferencesPrivate.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4726 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b182604..3fb23ef 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2003-07-28  Richard Williamson   <rjw at apple.com>
+
+	Fixed 3323866.  Provide SPI to IB to enable scoping of preferences
+	values on a document-by-document basis.
+
+        Reviewed by Maciej.
+
+        * WebView.subproj/WebPreferences.m:
+        (-[WebPreferencesPrivate dealloc]):
+        (-[WebPreferences initWithIdentifier:]):
+        (-[WebPreferences initWithCoder:]):
+        (+[WebPreferences _userDefaultsKeysForIB]):
+        (+[WebPreferences _setIBCreatorID:]):
+        (+[WebPreferences _IBCreatorID]):
+        (-[WebPreferences _concatenateKeyWithIBCreatorID:]):
+        * WebView.subproj/WebPreferencesPrivate.h:
+
 2003-07-28  Darin Adler  <darin at apple.com>
 
         Reviewed by Maciej.
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index d9d97e4..a702be4 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -44,7 +44,7 @@
 
 NSString *WebPreferencesChangedNotification = @"WebPreferencesChangedNotification";
 
-#define KEY(x) [(_private->identifier?_private->identifier:@"") stringByAppendingString:x]
+#define KEY(x) [self _concatenateKeyWithIBCreatorID:[(_private->identifier?_private->identifier:@"") stringByAppendingString:x]]
 
 enum { WebPreferencesVersion = 1 };
 
@@ -53,6 +53,7 @@ enum { WebPreferencesVersion = 1 };
 @public
     NSMutableDictionary *values;
     NSString *identifier;
+    NSString *IBCreatorID;
     BOOL autosaves;
 }
 @end
@@ -62,10 +63,16 @@ enum { WebPreferencesVersion = 1 };
 {
     [values release];
     [identifier release];
+    [IBCreatorID release];
     [super dealloc];
 }
 @end
 
+ at interface WebPreferences (WebInternal)
+- (NSString *)_concatenateKeyWithIBCreatorID:(NSString *)key;
++ (NSString *)_IBCreatorID;
+ at end
+
 @implementation WebPreferences
 
 - init
@@ -81,6 +88,7 @@ enum { WebPreferencesVersion = 1 };
         anIdentifier = @"";
         
     _private = [[WebPreferencesPrivate alloc] init];
+    _private->IBCreatorID = [[WebPreferences _IBCreatorID] retain];
     
     WebPreferences *instance = [[self class] _getInstanceForIdentifier:anIdentifier];
     if (instance){
@@ -108,6 +116,7 @@ NS_DURING
     int version;
 
     _private = [[WebPreferencesPrivate alloc] init];
+    _private->IBCreatorID = [[WebPreferences _IBCreatorID] retain];
     
     if ([decoder allowsKeyedCoding]){
         _private->identifier = [[decoder decodeObjectForKey:@"Identifier"] retain];
@@ -588,6 +597,30 @@ static NSMutableDictionary *webPreferencesInstances = nil;
     ];
 }
 
+static NSString *classIBCreatorID = 0;
+
++ (void)_setIBCreatorID:(NSString *)string
+{
+    
+    if (classIBCreatorID != string){
+        [classIBCreatorID release];
+        classIBCreatorID = [string retain];
+    }
+}
+
++ (NSString *)_IBCreatorID
+{
+    return classIBCreatorID;
+}
+
+- (NSString *)_concatenateKeyWithIBCreatorID:(NSString *)key
+{
+    NSString *IBCreatorID = [WebPreferences _IBCreatorID];
+    if (!IBCreatorID)
+        return key;
+    return [IBCreatorID stringByAppendingString:key];
+}
+
 @end
 
 @implementation NSMutableDictionary (WebPrivate)
diff --git a/WebKit/WebView.subproj/WebPreferencesPrivate.h b/WebKit/WebView.subproj/WebPreferencesPrivate.h
index d5dbcf0..4bcb018 100644
--- a/WebKit/WebView.subproj/WebPreferencesPrivate.h
+++ b/WebKit/WebView.subproj/WebPreferencesPrivate.h
@@ -21,4 +21,6 @@
 + (NSArray *)_userDefaultsKeysForIB;
 - (NSTimeInterval)_backForwardCacheExpirationInterval;
 
++ (void)_setIBCreatorID:(NSString *)string;
+
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list