[webkit-changes] cvs commit: WebKit/WebView.subproj WebView.m
Adele
adele at opensource.apple.com
Mon Jul 25 17:40:20 PDT 2005
adele 05/07/25 17:40:20
Modified: . Tag: Safari-2-0-branch ChangeLog
WebView.subproj Tag: Safari-2-0-branch WebView.m
Log:
Merge from TOT to Safari-2-0-branch
<rdar://problem/3470523>
2005-07-25 Vicki Murley <vicki at apple.com>
Reviewed by Darin.
- fixed <rdar://problem/3470523> Safari's user agent should be changed to say Intel rather
than PPC on Intel machines
* WebView.subproj/WebView.m: add conditional #defines for "PPC" and "Intel"
(-[WebView userAgentForURL:]): use this variable when constructing the user agent string
Revision Changes Path
No revision
No revision
1.3118.4.25 +15 -0 WebKit/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKit/ChangeLog,v
retrieving revision 1.3118.4.24
retrieving revision 1.3118.4.25
diff -u -r1.3118.4.24 -r1.3118.4.25
--- ChangeLog 22 Jul 2005 03:09:56 -0000 1.3118.4.24
+++ ChangeLog 26 Jul 2005 00:40:15 -0000 1.3118.4.25
@@ -1,3 +1,18 @@
+2005-07-25 Adele Peterson <adele at apple.com>
+
+ Merge from TOT to Safari-2-0-branch
+ <rdar://problem/3470523>
+
+ 2005-07-25 Vicki Murley <vicki at apple.com>
+
+ Reviewed by Darin.
+
+ - fixed <rdar://problem/3470523> Safari's user agent should be changed to say Intel rather
+ than PPC on Intel machines
+
+ * WebView.subproj/WebView.m: add conditional #defines for "PPC" and "Intel"
+ (-[WebView userAgentForURL:]): use this variable when constructing the user agent string
+
2005-07-21 Adele Peterson <adele at apple.com>
Merge from TOT to Safari-2-0-branch
No revision
No revision
1.274.8.3 +11 -5 WebKit/WebView.subproj/WebView.m
Index: WebView.m
===================================================================
RCS file: /cvs/root/WebKit/WebView.subproj/WebView.m,v
retrieving revision 1.274.8.2
retrieving revision 1.274.8.3
diff -u -r1.274.8.2 -r1.274.8.3
--- WebView.m 22 Jul 2005 01:18:49 -0000 1.274.8.2
+++ WebView.m 26 Jul 2005 00:40:19 -0000 1.274.8.3
@@ -70,6 +70,14 @@
#include <CoreGraphics/CGSConnection.h>
#endif
+#if __ppc__
+#define PROCESSOR "PPC"
+#elif __i386__
+#define PROCESSOR "Intel"
+#else
+#error Unknown architecture
+#endif
+
#define FOR_EACH_RESPONDER_SELECTOR(macro) \
macro(alignCenter) \
macro(alignJustified) \
@@ -1895,7 +1903,7 @@
return [[[self mainFrame] _bridge] windowScriptObject];
}
-
+
// Get the appropriate user-agent string for a particular URL.
// Since we no longer automatically spoof, this no longer requires looking at the URL.
- (NSString *)userAgentForURL:(NSURL *)URL
@@ -1905,18 +1913,16 @@
return [[userAgent retain] autorelease];
}
- // FIXME: Some day we will start reporting the actual CPU here instead of hardcoding PPC.
-
NSString *language = [NSUserDefaults _web_preferredLanguageCode];
id sourceVersion = [[NSBundle bundleForClass:[WebView class]]
objectForInfoDictionaryKey:(id)kCFBundleVersionKey];
NSString *applicationName = _private->applicationNameForUserAgent;
if ([applicationName length]) {
- userAgent = [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; %@) AppleWebKit/%@ (KHTML, like Gecko) %@",
+ userAgent = [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; " PROCESSOR " Mac OS X; %@) AppleWebKit/%@ (KHTML, like Gecko) %@",
language, sourceVersion, applicationName];
} else {
- userAgent = [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; %@) AppleWebKit/%@ (KHTML, like Gecko)",
+ userAgent = [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; " PROCESSOR " Mac OS X; %@) AppleWebKit/%@ (KHTML, like Gecko)",
language, sourceVersion];
}
More information about the webkit-changes
mailing list