Changeset 161940 in webkit


Ignore:
Timestamp:
Jan 13, 2014 7:52:09 PM (10 years ago)
Author:
benjamin@webkit.org
Message:

Update WebPageProxyIOS's user agent string
https://bugs.webkit.org/show_bug.cgi?id=126933

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-01-13
Reviewed by Darin Adler.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::standardUserAgent):
Send a more reasonable user agent. The previous one was forcing
iOS 5.1's iPad user-agent.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r161939 r161940  
     12014-01-13  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        Update WebPageProxyIOS's user agent string
     4        https://bugs.webkit.org/show_bug.cgi?id=126933
     5
     6        Reviewed by Darin Adler.
     7
     8        * UIProcess/ios/WebPageProxyIOS.mm:
     9        (WebKit::WebPageProxy::standardUserAgent):
     10        Send a more reasonable user agent. The previous one was forcing
     11        iOS 5.1's iPad user-agent.
     12
    1132014-01-13  Tim Horton  <timothy_horton@apple.com>
    214
  • trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm

    r161358 r161940  
    4848String WebPageProxy::standardUserAgent(const String&)
    4949{
    50     notImplemented();
    51 
    52     // Just return the iOS 5.1 user agent for now.
    53     return "Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3";
     50    if (CFStringRef overrideUserAgent = WKGetUserAgent())
     51        return overrideUserAgent;
     52
     53    notImplemented();
     54
     55    // Just return the iOS 7 user agent for now.
     56    return [NSString stringWithFormat:@"Mozilla/5.0 (%@; CPU %@ 7_0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B489 Safari/9537.53", WKGetDeviceName(), WKGetOSNameForUserAgent()];
    5457}
    5558
Note: See TracChangeset for help on using the changeset viewer.