Title: [171984] trunk/Source/WebCore
Revision
171984
Author
[email protected]
Date
2014-08-03 12:21:49 -0700 (Sun, 03 Aug 2014)

Log Message

<rdar://problem/17782529> REGRESSION: OS marketing version in iOS Simulator user-agent string is the host OS’s
https://bugs.webkit.org/show_bug.cgi?id=135549

Reviewed by Mark Rowe.

* platform/cocoa/SystemVersion.mm:
(WebCore::createSystemMarketingVersion): On the iOS Simulator, locate the system Library
directory relative to the Simulator root.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (171983 => 171984)


--- trunk/Source/WebCore/ChangeLog	2014-08-03 08:16:15 UTC (rev 171983)
+++ trunk/Source/WebCore/ChangeLog	2014-08-03 19:21:49 UTC (rev 171984)
@@ -1,3 +1,14 @@
+2014-08-03  Dan Bernstein  <[email protected]>
+
+        <rdar://problem/17782529> REGRESSION: OS marketing version in iOS Simulator user-agent string is the host OS’s
+        https://bugs.webkit.org/show_bug.cgi?id=135549
+
+        Reviewed by Mark Rowe.
+
+        * platform/cocoa/SystemVersion.mm:
+        (WebCore::createSystemMarketingVersion): On the iOS Simulator, locate the system Library
+        directory relative to the Simulator root.
+
 2014-08-02  Jeremy Jones  <[email protected]>
 
         Support both window and view based video fullscreen.

Modified: trunk/Source/WebCore/platform/cocoa/SystemVersion.mm (171983 => 171984)


--- trunk/Source/WebCore/platform/cocoa/SystemVersion.mm	2014-08-03 08:16:15 UTC (rev 171983)
+++ trunk/Source/WebCore/platform/cocoa/SystemVersion.mm	2014-08-03 19:21:49 UTC (rev 171984)
@@ -33,6 +33,10 @@
 {
     // Can't use -[NSProcessInfo operatingSystemVersionString] because it has too much stuff we don't want.
     NSString *systemLibraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSSystemDomainMask, YES) objectAtIndex:0];
+#if PLATFORM(IOS_SIMULATOR)
+    if (char *simulatorRoot = getenv("SIMULATOR_ROOT"))
+        systemLibraryPath = [NSString stringWithFormat:@"%s/%@", simulatorRoot, systemLibraryPath];
+#endif
     NSString *systemVersionPlistPath = [systemLibraryPath stringByAppendingPathComponent:@"CoreServices/SystemVersion.plist"];
     NSDictionary *systemVersionInfo = [NSDictionary dictionaryWithContentsOfFile:systemVersionPlistPath];
     return [[systemVersionInfo objectForKey:@"ProductVersion"] copy];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to