Changeset 228334 in webkit


Ignore:
Timestamp:
Feb 9, 2018 11:19:41 AM (6 years ago)
Author:
Brent Fulgham
Message:

[macOS, iOS] Expose OS marketing version in UserAgent
https://bugs.webkit.org/show_bug.cgi?id=182629
<rdar://problem/37370975>

Reviewed by Daniel Bates.

Revert back to dynamically reading the operating system marketing version
rather than using a hard-coded version.

  • page/cocoa/UserAgent.mm:

(WebCore::systemMarketingVersionForUserAgentString):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r228333 r228334  
     12018-02-09  Brent Fulgham  <bfulgham@apple.com>
     2
     3        [macOS, iOS] Expose OS marketing version in UserAgent
     4        https://bugs.webkit.org/show_bug.cgi?id=182629
     5        <rdar://problem/37370975>
     6
     7        Reviewed by Daniel Bates.
     8
     9        Revert back to dynamically reading the operating system marketing version
     10        rather than using a hard-coded version.
     11
     12        * page/cocoa/UserAgent.mm:
     13        (WebCore::systemMarketingVersionForUserAgentString):
     14
    1152018-02-08  Antoine Quint  <graouts@apple.com>
    216
  • trunk/Source/WebCore/page/cocoa/UserAgent.mm

    r227552 r228334  
    2727#import "UserAgent.h"
    2828
     29#import "SystemVersion.h"
     30
    2931namespace WebCore {
    3032
     
    3436    // we were concerned about old DHTML libraries interpreting "4." as Netscape 4. That's no longer a concern for us
    3537    // but we're sticking with the underscores for compatibility with the format used by older versions of Safari.
    36 #if PLATFORM(MAC)
    37     return ASCIILiteral("10_13_4");
    38 #else
    39     return ASCIILiteral("11_3");
    40 #endif
     38    return [systemMarketingVersion() stringByReplacingOccurrencesOfString:@"." withString:@"_"];
    4139}
    4240
Note: See TracChangeset for help on using the changeset viewer.