Bug 162610 - [GTK] User agent should always claim to be Intel
Summary: [GTK] User agent should always claim to be Intel
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on: 162612 162613
Blocks: 142074
  Show dependency treegraph
 
Reported: 2016-09-27 08:17 PDT by Michael Catanzaro
Modified: 2016-09-28 07:51 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.50 KB, patch)
2016-09-27 08:43 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff
Patch (2.69 KB, patch)
2016-09-28 05:59 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2016-09-27 08:17:50 PDT
We should always claim to be running on Intel regardless of actual CPU type. See discussion in bug #162548 for details. In particular, we can never advertise ARM because it causes dumb websites to send mobile pages.
Comment 1 Michael Catanzaro 2016-09-27 08:43:25 PDT
Created attachment 289946 [details]
Patch
Comment 2 Carlos Garcia Campos 2016-09-28 03:46:08 PDT
Comment on attachment 289946 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=289946&action=review

> Source/WebCore/platform/gtk/UserAgentGtk.cpp:96
> -    static NeverDestroyed<const String> uaOSVersion(String::format("%s Mac OS X", cpuDescriptionForUAString()));
> +    static NeverDestroyed<const String> uaOSVersion(ASCIILiteral("Intel Mac OS X"));

So, we should update the comment to also explain why we use Intel unconditionally.

> Source/WebCore/platform/gtk/UserAgentGtk.cpp:121
> +        uaString.appendLiteral("Intel");
>          uaString.appendLiteral(" Mac OS X");

These could be a single appendLiteral call now.
Comment 3 Michael Catanzaro 2016-09-28 05:59:32 PDT
Created attachment 290080 [details]
Patch
Comment 4 WebKit Commit Bot 2016-09-28 07:51:35 PDT
Comment on attachment 290080 [details]
Patch

Clearing flags on attachment: 290080

Committed r206517: <http://trac.webkit.org/changeset/206517>
Comment 5 WebKit Commit Bot 2016-09-28 07:51:38 PDT
All reviewed patches have been landed.  Closing bug.