Title: [207119] releases/WebKitGTK/webkit-2.14/Source/WebCore
- Revision
- 207119
- Author
- [email protected]
- Date
- 2016-10-11 06:24:01 -0700 (Tue, 11 Oct 2016)
Log Message
Merge r206517 - [GTK] User agent should always claim to be Intel
https://bugs.webkit.org/show_bug.cgi?id=162610
Reviewed by Carlos Garcia Campos.
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.
* platform/gtk/UserAgentGtk.cpp:
(WebCore::platformVersionForUAString):
(WebCore::buildUserAgentString):
(WebCore::cpuDescriptionForUAString): Deleted.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (207118 => 207119)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog 2016-10-11 13:23:53 UTC (rev 207118)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog 2016-10-11 13:24:01 UTC (rev 207119)
@@ -1,5 +1,21 @@
2016-09-28 Michael Catanzaro <[email protected]>
+ [GTK] User agent should always claim to be Intel
+ https://bugs.webkit.org/show_bug.cgi?id=162610
+
+ Reviewed by Carlos Garcia Campos.
+
+ 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.
+
+ * platform/gtk/UserAgentGtk.cpp:
+ (WebCore::platformVersionForUAString):
+ (WebCore::buildUserAgentString):
+ (WebCore::cpuDescriptionForUAString): Deleted.
+
+2016-09-28 Michael Catanzaro <[email protected]>
+
[GTK] Adjust OS X UA quirks list
https://bugs.webkit.org/show_bug.cgi?id=162616
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/UserAgentGtk.cpp (207118 => 207119)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/UserAgentGtk.cpp 2016-10-11 13:23:53 UTC (rev 207118)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/UserAgentGtk.cpp 2016-10-11 13:24:01 UTC (rev 207119)
@@ -76,19 +76,6 @@
uint32_t m_quirks;
};
-static const char* cpuDescriptionForUAString()
-{
-#if CPU(PPC) || CPU(PPC64)
- return "PPC";
-#elif CPU(X86) || CPU(X86_64)
- return "Intel";
-#elif CPU(ARM) || CPU(ARM64)
- return "ARM";
-#else
- return "Unknown";
-#endif
-}
-
static const char* platformForUAString()
{
#if OS(MAC_OS_X)
@@ -107,7 +94,8 @@
return uaOSVersion;
#else
// We will always claim to be Safari in Mac OS X, since Safari in Linux triggers the iOS path on some websites.
- static NeverDestroyed<const String> uaOSVersion(String::format("%s Mac OS X", cpuDescriptionForUAString()));
+ // And we always claim to be Intel since ARM triggers mobile versions of some websites.
+ static NeverDestroyed<const String> uaOSVersion(ASCIILiteral("Intel Mac OS X"));
return uaOSVersion;
#endif
}
@@ -130,10 +118,9 @@
uaString.appendLiteral("; ");
- if (quirks.contains(UserAgentQuirks::NeedsMacintoshPlatform)) {
- uaString.append(cpuDescriptionForUAString());
- uaString.appendLiteral(" Mac OS X");
- } else
+ if (quirks.contains(UserAgentQuirks::NeedsMacintoshPlatform))
+ uaString.appendLiteral("Intel Mac OS X");
+ else
uaString.append(platformVersionForUAString());
uaString.appendLiteral(") AppleWebKit/");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes