[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 07:13:07 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 030cad4c2aed3f5cb5fb43f58643a77323453269
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 10 05:00:00 2002 +0000

    Tools:
    
            Reviewed by Maciej.
    
            * Scripts/set-alex-version: Make it bump the source version and marketing version
    	of all our subprojects, because that's what we need up until Alex 1.0.
    
    JavaScriptCore:
    
            Reviewed by Maciej.
    
            * JavaScriptCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
    	* English.lproj/InfoPlist.strings: In here too.
    
    WebFoundation:
    
            Reviewed by Maciej.
    
    	- fixed problems I noticed in my review of Chris's change (which came in too late)
    
            * CacheLoader.subproj/WebResourceLoad.m: (_guessMIMEType): Fix && vs. || confusion that
    	will make CR, LF, and tab not qualify as text characters. Also take end of loop check
    	out of the loop.
    
    	- added a method for use in user-agent computations
    
            * Misc.subproj/WebNSUserDefaultsExtras.h: Added _web_preferredLanguageCode.
            * Misc.subproj/WebNSUserDefaultsExtras.m:
            (+[NSUserDefaults _web_preferredLanguageCode]): Use _web_HTTPStyleLanguageCode on the
    	first element of the AppleLanguages array.
    
            * WebFoundation.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
    	Make WebNSUserDefaultsExtras.h SPI so we can use it in WebKit. Re-sort things a bit.
    	* English.lproj/InfoPlist.strings: Bump versions in here too.
    
            * English.lproj/StringsNotToBeLocalized.txt: Updated for these and other recent changes.
    
    WebCore:
    
            Reviewed by Maciej.
    
            * WebCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
    
    WebKit:
    
            Reviewed by Maciej.
    
    	- fixed 3028664 -- change user agent string to include application name and version
    
            * WebView.subproj/WebController.m:
            (-[WebController setApplicationNameForUserAgent:]): Remove locking, unneeded since we changed
    	how WebFoundation handles user agent.
            (-[WebController setCustomUserAgent:]): Ditto.
            (-[WebController resetUserAgent]): Ditto.
            (-[WebController userAgentForURL:]): Remove locking. Also add new algorithm for computing the
    	user agent which takes the preferred language into account, and incorporates the WebKit version
    	and the application name.
    
            * WebView.subproj/WebControllerPrivate.h: No need for a lock.
            * WebView.subproj/WebControllerPrivate.m:
            (-[WebControllerPrivate init]): Don't create a lock.
            (-[WebControllerPrivate dealloc]): Don't release a lock.
    
            * WebKit.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
    	* English.lproj/InfoPlist.strings: In here too.
    
            * English.lproj/StringsNotToBeLocalized.txt: Updated for these and other recent changes.
    
    WebBrowser:
    
            Reviewed by Maciej.
    
    	- pass properly-formatted application name string to WebKit so it can make a good user-agent
    
            * BrowserWebController.m: (-[BrowserWebController initWithBrowserDocument:]):
    	Instead of passing "Mr. Poopypants", pass Sherlock, augmented with version strings,
    	to setApplicationNameForUserAgent:. Later we will pass Safari instead.
    
            * WebBrowser.pbproj/project.pbxproj: Bump version to 35u (we won't use " unofficial" any more).
    
            * English.lproj/StringsNotToBeLocalized.txt: Updated for these changes.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2985 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 42fd5c6..ee2fbed 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,10 @@
+2002-12-09  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+        * JavaScriptCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
+	* English.lproj/InfoPlist.strings: In here too.
+
 2002-12-09  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Ken.
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index 42fd5c6..ee2fbed 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,3 +1,10 @@
+2002-12-09  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+        * JavaScriptCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
+	* English.lproj/InfoPlist.strings: In here too.
+
 2002-12-09  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Ken.
diff --git a/JavaScriptCore/English.lproj/InfoPlist.strings b/JavaScriptCore/English.lproj/InfoPlist.strings
index 7c8dd8b..2fab567 100644
Binary files a/JavaScriptCore/English.lproj/InfoPlist.strings and b/JavaScriptCore/English.lproj/InfoPlist.strings differ
diff --git a/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
index 3d75008..340b940 100644
--- a/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
+++ b/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
@@ -150,7 +150,7 @@
 	<key>CFBundleExecutable</key>
 	<string>JavaScriptCore</string>
 	<key>CFBundleGetInfoString</key>
-	<string>0.2</string>
+	<string>0.8</string>
 	<key>CFBundleIconFile</key>
 	<string></string>
 	<key>CFBundleIdentifier</key>
@@ -164,11 +164,11 @@
 	<key>CFBundlePackageType</key>
 	<string>FMWK</string>
 	<key>CFBundleShortVersionString</key>
-	<string>0.2</string>
+	<string>0.8</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>5</string>
+	<string>36u</string>
 	<key>CFHumanReadableCopyright</key>
 	<string>Copyright (c) 2001-2002 Apple Computer</string>
 	<key>NSPrincipalClass</key>
@@ -176,7 +176,6 @@
 </dict>
 </plist>
 ";
-			shouldUseHeadermap = 1;
 		};
 		0867D69DFE84028FC02AAC07 = {
 			buildActionMask = 2147483647;
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 0bc6229..1ec36d9 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,9 @@
+2002-12-09  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+        * WebCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
+
 2002-12-09  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Dave.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 0bc6229..1ec36d9 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,9 @@
+2002-12-09  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+        * WebCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
+
 2002-12-09  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Dave.
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index da51e6c..1283ad6 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -170,7 +170,7 @@
 	<key>CFBundleSignature</key>
 	<string>webc</string>
 	<key>CFBundleVersion</key>
-	<string>0.0.1d1</string>
+	<string>36u</string>
 	<key>NSPrincipalClass</key>
 	<string></string>
 	<key>SKIP_INSTALL</key>
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index ccf4721..abf07a8 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,28 @@
+2002-12-09  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+	- fixed 3028664 -- change user agent string to include application name and version
+
+        * WebView.subproj/WebController.m:
+        (-[WebController setApplicationNameForUserAgent:]): Remove locking, unneeded since we changed
+	how WebFoundation handles user agent.
+        (-[WebController setCustomUserAgent:]): Ditto.
+        (-[WebController resetUserAgent]): Ditto.
+        (-[WebController userAgentForURL:]): Remove locking. Also add new algorithm for computing the
+	user agent which takes the preferred language into account, and incorporates the WebKit version
+	and the application name.
+
+        * WebView.subproj/WebControllerPrivate.h: No need for a lock.
+        * WebView.subproj/WebControllerPrivate.m:
+        (-[WebControllerPrivate init]): Don't create a lock.
+        (-[WebControllerPrivate dealloc]): Don't release a lock.
+
+        * WebKit.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
+	* English.lproj/InfoPlist.strings: In here too.
+
+        * English.lproj/StringsNotToBeLocalized.txt: Updated for these and other recent changes.
+
 2002-12-09  Richard Williamson   <rjw at apple.com>
 
         Many changes for b/f list.
diff --git a/WebKit/English.lproj/StringsNotToBeLocalized.txt b/WebKit/English.lproj/StringsNotToBeLocalized.txt
index 2722309..e6f9dc2 100644
--- a/WebKit/English.lproj/StringsNotToBeLocalized.txt
+++ b/WebKit/English.lproj/StringsNotToBeLocalized.txt
@@ -18,9 +18,9 @@
 "/tmp/%@"
 "0x0"
 "1.00"
-"10"
 "1000"
 "14"
+"4"
 "4096"
 "6"
 "7"
@@ -68,7 +68,8 @@
 "Library/Internet Plug-Ins"
 "Library/Preferences/Explorer/Favorites.html"
 "Lucida Grande"
-"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.1) Gecko/20020826"
+"Mozilla/5.0 (Macintosh; U; PPC; %@) WebKit/%@ %@"
+"Mozilla/5.0 (Macintosh; U; PPC; %@) WebKit/%@"
 "NETSCAPE2"
 "NP_GetEntryPoints"
 "NP_Initialize"
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index a889748..8452bab 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -177,7 +177,7 @@
 	<key>CFBundleSignature</key>
 	<string>webk</string>
 	<key>CFBundleVersion</key>
-	<string>0.0.1d1</string>
+	<string>36u</string>
 	<key>NSPrincipalClass</key>
 	<string></string>
 	<key>SKIP_INSTALL</key>
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index 915533d..5484c4e 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -27,6 +27,7 @@
 #import <WebKit/WebWindowOperationsDelegate.h>
 
 #import <WebFoundation/WebAssertions.h>
+#import <WebFoundation/WebNSUserDefaultsExtras.h>
 #import <WebFoundation/WebResourceHandle.h>
 
 NSString *WebElementFrameKey = 			@"WebElementFrame";
@@ -303,10 +304,8 @@ NSString *WebElementStringKey = 		@"WebElementString";
 - (void)setApplicationNameForUserAgent:(NSString *)applicationName
 {
     NSString *name = [applicationName copy];
-    [_private->userAgentLock lock];
     [_private->applicationNameForUserAgent release];
     _private->applicationNameForUserAgent = name;
-    [_private->userAgentLock unlock];
 }
 
 - (NSString *)applicationNameForUserAgent
@@ -318,23 +317,15 @@ NSString *WebElementStringKey = 		@"WebElementString";
 {
     ASSERT_ARG(userAgentString, userAgentString);
     
-    // FIXME: Lock can go away once WebFoundation's user agent callback is replaced with something
-    // that's thread safe.
     NSString *override = [userAgentString copy];
-    [_private->userAgentLock lock];
     [_private->userAgentOverride release];
     _private->userAgentOverride = override;
-    [_private->userAgentLock unlock];
 }
 
 - (void)resetUserAgent
 {
-    // FIXME: Lock can go away once WebFoundation's user agent callback is replaced with something
-    // that's thread safe.
-    [_private->userAgentLock lock];
     [_private->userAgentOverride release];
     _private->userAgentOverride = nil;
-    [_private->userAgentLock unlock];
 }
 
 - (BOOL)hasCustomUserAgent
@@ -354,24 +345,28 @@ NSString *WebElementStringKey = 		@"WebElementString";
 // Get the appropriate user-agent string for a particular URL.
 - (NSString *)userAgentForURL:(NSURL *)URL
 {
-    // FIXME: Lock can go away once WebFoundation's user agent callback is replaced with something
-    // that's thread safe.
-    [_private->userAgentLock lock];
     NSString *result = [[_private->userAgentOverride copy] autorelease];
-    [_private->userAgentLock unlock];
     if (result) {
         return result;
     }
 
     // Note that we currently don't look at the URL.
-    // If we find that we need to spoof different user agent strings for different web pages
-    // for best results, then that logic will go here.
+    // Soon we will spoof different user agent strings for different web pages
+    // for best results, and that logic will go here.
 
-    // FIXME: Incorporate applicationNameForUserAgent in this string so that people
-    // can tell that they are talking to Alexander and not another WebKit client.
-    // Maybe also incorporate something that identifies WebKit's involvement.
+    // FIXME: Some day we will start reporting the actual CPU here instead of hardcoding PPC.
     
-    return @"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.1) Gecko/20020826";
+    NSString *language = [NSUserDefaults _web_preferredLanguageCode];
+    id sourceVersion = [[NSBundle bundleForClass:[WebController class]]
+        objectForInfoDictionaryKey:(id)kCFBundleVersionKey];
+    NSString *applicationName = _private->applicationNameForUserAgent;
+
+    if ([applicationName length]) {
+        return [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; PPC; %@) WebKit/%@ %@",
+            language, sourceVersion, applicationName];
+    }
+    return [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; PPC; %@) WebKit/%@",
+        language, sourceVersion];
 }
 
 - (BOOL)supportsTextEncoding
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index 8d4caf7..633a8fe 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -30,7 +30,6 @@
 
     NSString *applicationNameForUserAgent;
     NSString *userAgentOverride;
-    NSLock *userAgentLock;
     
     BOOL defersCallbacks;
 
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 170e7f2..2f1e1a6 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -32,7 +32,6 @@
     backForwardList = [[WebBackForwardList alloc] init];
     defaultContextMenuDelegate = [[WebDefaultContextMenuDelegate alloc] init];
     textSizeMultiplier = 1;
-    userAgentLock = [[NSLock alloc] init];
     return self;
 }
 
@@ -65,7 +64,6 @@
     [backForwardList release];
     [applicationNameForUserAgent release];
     [userAgentOverride release];
-    [userAgentLock release];
     
     [controllerSetName release];
     [topLevelFrameName release];
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 915533d..5484c4e 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -27,6 +27,7 @@
 #import <WebKit/WebWindowOperationsDelegate.h>
 
 #import <WebFoundation/WebAssertions.h>
+#import <WebFoundation/WebNSUserDefaultsExtras.h>
 #import <WebFoundation/WebResourceHandle.h>
 
 NSString *WebElementFrameKey = 			@"WebElementFrame";
@@ -303,10 +304,8 @@ NSString *WebElementStringKey = 		@"WebElementString";
 - (void)setApplicationNameForUserAgent:(NSString *)applicationName
 {
     NSString *name = [applicationName copy];
-    [_private->userAgentLock lock];
     [_private->applicationNameForUserAgent release];
     _private->applicationNameForUserAgent = name;
-    [_private->userAgentLock unlock];
 }
 
 - (NSString *)applicationNameForUserAgent
@@ -318,23 +317,15 @@ NSString *WebElementStringKey = 		@"WebElementString";
 {
     ASSERT_ARG(userAgentString, userAgentString);
     
-    // FIXME: Lock can go away once WebFoundation's user agent callback is replaced with something
-    // that's thread safe.
     NSString *override = [userAgentString copy];
-    [_private->userAgentLock lock];
     [_private->userAgentOverride release];
     _private->userAgentOverride = override;
-    [_private->userAgentLock unlock];
 }
 
 - (void)resetUserAgent
 {
-    // FIXME: Lock can go away once WebFoundation's user agent callback is replaced with something
-    // that's thread safe.
-    [_private->userAgentLock lock];
     [_private->userAgentOverride release];
     _private->userAgentOverride = nil;
-    [_private->userAgentLock unlock];
 }
 
 - (BOOL)hasCustomUserAgent
@@ -354,24 +345,28 @@ NSString *WebElementStringKey = 		@"WebElementString";
 // Get the appropriate user-agent string for a particular URL.
 - (NSString *)userAgentForURL:(NSURL *)URL
 {
-    // FIXME: Lock can go away once WebFoundation's user agent callback is replaced with something
-    // that's thread safe.
-    [_private->userAgentLock lock];
     NSString *result = [[_private->userAgentOverride copy] autorelease];
-    [_private->userAgentLock unlock];
     if (result) {
         return result;
     }
 
     // Note that we currently don't look at the URL.
-    // If we find that we need to spoof different user agent strings for different web pages
-    // for best results, then that logic will go here.
+    // Soon we will spoof different user agent strings for different web pages
+    // for best results, and that logic will go here.
 
-    // FIXME: Incorporate applicationNameForUserAgent in this string so that people
-    // can tell that they are talking to Alexander and not another WebKit client.
-    // Maybe also incorporate something that identifies WebKit's involvement.
+    // FIXME: Some day we will start reporting the actual CPU here instead of hardcoding PPC.
     
-    return @"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.1) Gecko/20020826";
+    NSString *language = [NSUserDefaults _web_preferredLanguageCode];
+    id sourceVersion = [[NSBundle bundleForClass:[WebController class]]
+        objectForInfoDictionaryKey:(id)kCFBundleVersionKey];
+    NSString *applicationName = _private->applicationNameForUserAgent;
+
+    if ([applicationName length]) {
+        return [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; PPC; %@) WebKit/%@ %@",
+            language, sourceVersion, applicationName];
+    }
+    return [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; PPC; %@) WebKit/%@",
+        language, sourceVersion];
 }
 
 - (BOOL)supportsTextEncoding
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 8d4caf7..633a8fe 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -30,7 +30,6 @@
 
     NSString *applicationNameForUserAgent;
     NSString *userAgentOverride;
-    NSLock *userAgentLock;
     
     BOOL defersCallbacks;
 
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 170e7f2..2f1e1a6 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -32,7 +32,6 @@
     backForwardList = [[WebBackForwardList alloc] init];
     defaultContextMenuDelegate = [[WebDefaultContextMenuDelegate alloc] init];
     textSizeMultiplier = 1;
-    userAgentLock = [[NSLock alloc] init];
     return self;
 }
 
@@ -65,7 +64,6 @@
     [backForwardList release];
     [applicationNameForUserAgent release];
     [userAgentOverride release];
-    [userAgentLock release];
     
     [controllerSetName release];
     [topLevelFrameName release];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list