Diff
Modified: trunk/Source/WebCore/ChangeLog (101214 => 101215)
--- trunk/Source/WebCore/ChangeLog 2011-11-27 23:44:38 UTC (rev 101214)
+++ trunk/Source/WebCore/ChangeLog 2011-11-27 23:47:22 UTC (rev 101215)
@@ -1,3 +1,13 @@
+2011-11-27 Mark Rowe <mr...@apple.com>
+
+ <http://webkit.org/b/72665> Switch to a more modern approach to retrieving the OS marketing version
+
+ Reviewed by Dan Bernstein.
+
+ * WebCore.exp.in: Expose the necessary symbol.
+ * platform/mac/WebCoreSystemInterface.h: Ditto.
+ * platform/mac/WebCoreSystemInterface.mm: Ditto.
+
2011-11-27 Anna Cavender <ann...@chromium.org>
Move readyState from TextTrack to HTMLTrackElement
Modified: trunk/Source/WebCore/WebCore.exp.in (101214 => 101215)
--- trunk/Source/WebCore/WebCore.exp.in 2011-11-27 23:44:38 UTC (rev 101214)
+++ trunk/Source/WebCore/WebCore.exp.in 2011-11-27 23:47:22 UTC (rev 101215)
@@ -1556,6 +1556,10 @@
_wkGetNSEventMomentumPhase
#endif
+#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+_wkGetMacOSXVersionString
+#endif
+
_wkUnregisterUniqueIdForElement
_wkAccessibilityHandleFocusChanged
_wkGetAXTextMarkerTypeID
Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h (101214 => 101215)
--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h 2011-11-27 23:44:38 UTC (rev 101214)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h 2011-11-27 23:47:22 UTC (rev 101215)
@@ -310,13 +310,18 @@
extern void (*wkCFURLRequestSetHTTPRequestBodyParts)(CFMutableURLRequestRef, CFArrayRef bodyParts);
extern void (*wkSetRequestStorageSession)(CFURLStorageSessionRef, CFMutableURLRequestRef);
#endif
-
+
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
#import <dispatch/dispatch.h>
-
+
extern dispatch_source_t (*wkCreateVMPressureDispatchOnMainQueue)(void);
-
+
#endif
+
+#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+extern NSString *(*wkGetMacOSXVersionString)(void);
+#endif
+
}
#endif
Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (101214 => 101215)
--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2011-11-27 23:44:38 UTC (rev 101214)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2011-11-27 23:47:22 UTC (rev 101215)
@@ -176,3 +176,6 @@
dispatch_source_t (*wkCreateVMPressureDispatchOnMainQueue)(void);
#endif
+#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+NSString *(*wkGetMacOSXVersionString)(void);
+#endif
Modified: trunk/Source/WebKit/mac/ChangeLog (101214 => 101215)
--- trunk/Source/WebKit/mac/ChangeLog 2011-11-27 23:44:38 UTC (rev 101214)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-11-27 23:47:22 UTC (rev 101215)
@@ -1,3 +1,14 @@
+2011-11-27 Mark Rowe <mr...@apple.com>
+
+ <http://webkit.org/b/72665> Switch to a more modern approach to retrieving the OS marketing version
+
+ Reviewed by Dan Bernstein.
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface): Set up wkGetMacOSXVersionString.
+ * WebView/WebView.mm:
+ (createMacOSXVersionString): Use WKGetMacOSXVersionString.
+
2011-11-26 Pavel Feldman <pfeld...@google.com>
Web Inspector: remove disconnectFromBackend from the protocol.
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (101214 => 101215)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm 2011-11-27 23:44:38 UTC (rev 101214)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm 2011-11-27 23:47:22 UTC (rev 101215)
@@ -166,5 +166,9 @@
INIT(CreateVMPressureDispatchOnMainQueue);
#endif
+#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+ INIT(GetMacOSXVersionString);
+#endif
+
didInit = true;
}
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (101214 => 101215)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2011-11-27 23:44:38 UTC (rev 101214)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2011-11-27 23:47:22 UTC (rev 101215)
@@ -506,6 +506,18 @@
@implementation WebView (WebPrivate)
+#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+
+static NSString *createMacOSXVersionString()
+{
+ // Use underscores instead of dots because when we first added the Mac OS X version to the user agent string
+ // we were concerned about old DHTML libraries interpreting "4." as Netscape 4. That's no longer a concern for us
+ // but we're sticking with the underscores for compatibility with the format used by older versions of Safari.
+ return [WKGetMacOSXVersionString() stringByReplacingOccurrencesOfString:@"." withString:@"_"];
+}
+
+#else
+
static inline int callGestalt(OSType selector)
{
SInt32 value = 0;
@@ -529,6 +541,8 @@
return [[NSString alloc] initWithFormat:@"%d", major];
}
+#endif // !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+
static NSString *createUserVisibleWebKitVersionString()
{
// If the version is 4 digits long or longer, then the first digit represents
Modified: trunk/Source/WebKit2/ChangeLog (101214 => 101215)
--- trunk/Source/WebKit2/ChangeLog 2011-11-27 23:44:38 UTC (rev 101214)
+++ trunk/Source/WebKit2/ChangeLog 2011-11-27 23:47:22 UTC (rev 101215)
@@ -1,3 +1,14 @@
+2011-11-27 Mark Rowe <mr...@apple.com>
+
+ <http://webkit.org/b/72665> Switch to a more modern approach to retrieving the OS marketing version
+
+ Reviewed by Dan Bernstein.
+
+ * UIProcess/mac/WebPageProxyMac.mm:
+ (WebKit::macOSXVersionString): Use WKGetMacOSXVersionString.
+ * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface): Set up wkGetMacOSXVersionString.
+
2011-11-26 Pavel Feldman <pfeld...@google.com>
Web Inspector: remove disconnectFromBackend from the protocol.
Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (101214 => 101215)
--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm 2011-11-27 23:44:38 UTC (rev 101214)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm 2011-11-27 23:47:22 UTC (rev 101215)
@@ -37,6 +37,7 @@
#import "TextChecker.h"
#import "WebPageMessages.h"
#import "WebProcessProxy.h"
+#import <WebKitSystemInterface.h>
#import <wtf/text/StringConcatenate.h>
@interface NSApplication (Details)
@@ -57,6 +58,18 @@
#error Unknown architecture
#endif
+#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+
+static String macOSXVersionString()
+{
+ // Use underscores instead of dots because when we first added the Mac OS X version to the user agent string
+ // we were concerned about old DHTML libraries interpreting "4." as Netscape 4. That's no longer a concern for us
+ // but we're sticking with the underscores for compatibility with the format used by older versions of Safari.
+ return [WKGetMacOSXVersionString() stringByReplacingOccurrencesOfString:@"." withString:@"_"];
+}
+
+#else
+
static inline int callGestalt(OSType selector)
{
SInt32 value = 0;
@@ -80,6 +93,8 @@
return String::format("%d", major);
}
+#endif // !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+
static String userVisibleWebKitVersionString()
{
// If the version is 4 digits long or longer, then the first digit represents
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (101214 => 101215)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2011-11-27 23:44:38 UTC (rev 101214)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2011-11-27 23:47:22 UTC (rev 101215)
@@ -141,7 +141,7 @@
INIT(CopyAXTextMarkerRangeEnd);
INIT(AccessibilityHandleFocusChanged);
INIT(CreateAXUIElementRef);
- INIT(UnregisterUniqueIdForElement);
+ INIT(UnregisterUniqueIdForElement);
INIT(GetCFURLResponseMIMEType);
INIT(GetCFURLResponseURL);
@@ -153,5 +153,9 @@
INIT(CreateVMPressureDispatchOnMainQueue);
#endif
+#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+ INIT(GetMacOSXVersionString);
+#endif
+
});
}