Commit 030cad4c authored by darin's avatar darin

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
parent 2222d328
2002-12-09 Darin Adler <darin@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@apple.com>
Reviewed by Ken.
......
2002-12-09 Darin Adler <darin@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@apple.com>
Reviewed by Ken.
......
B/* Localized versions of Info.plist keys */
......
......@@ -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;
......
2002-12-09 Darin Adler <darin@apple.com>
Reviewed by Maciej.
* WebCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
2002-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
......
2002-12-09 Darin Adler <darin@apple.com>
Reviewed by Maciej.
* WebCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
2002-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
......
......@@ -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>
......
2002-12-09 Darin Adler <darin@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@apple.com>
Many changes for b/f list.
......
......@@ -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"
......
......@@ -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>
......
......@@ -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 @@ - (float)textSizeMultiplier
- (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 @@ - (void)setCustomUserAgent:(NSString *)userAgentString
{
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 *)customUserAgent
// 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
......
......@@ -30,7 +30,6 @@
NSString *applicationNameForUserAgent;
NSString *userAgentOverride;
NSLock *userAgentLock;
BOOL defersCallbacks;
......
......@@ -32,7 +32,6 @@ @implementation WebControllerPrivate
backForwardList = [[WebBackForwardList alloc] init];
defaultContextMenuDelegate = [[WebDefaultContextMenuDelegate alloc] init];
textSizeMultiplier = 1;
userAgentLock = [[NSLock alloc] init];
return self;
}
......@@ -65,7 +64,6 @@ - (void)dealloc
[backForwardList release];
[applicationNameForUserAgent release];
[userAgentOverride release];
[userAgentLock release];
[controllerSetName release];
[topLevelFrameName release];
......
......@@ -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 @@ - (float)textSizeMultiplier
- (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 @@ - (void)setCustomUserAgent:(NSString *)userAgentString
{
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 *)customUserAgent
// 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
......
......@@ -30,7 +30,6 @@
NSString *applicationNameForUserAgent;
NSString *userAgentOverride;
NSLock *userAgentLock;
BOOL defersCallbacks;
......
......@@ -32,7 +32,6 @@ @implementation WebControllerPrivate
backForwardList = [[WebBackForwardList alloc] init];
defaultContextMenuDelegate = [[WebDefaultContextMenuDelegate alloc] init];
textSizeMultiplier = 1;
userAgentLock = [[NSLock alloc] init];
return self;
}
......@@ -65,7 +64,6 @@ - (void)dealloc
[backForwardList release];
[applicationNameForUserAgent release];
[userAgentOverride release];
[userAgentLock release];
[controllerSetName release];
[topLevelFrameName release];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment