Changeset 206517 in webkit
- Timestamp:
- Sep 28, 2016 7:49:14 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r206515 r206517 1 2016-09-28 Michael Catanzaro <mcatanzaro@igalia.com> 2 3 [GTK] User agent should always claim to be Intel 4 https://bugs.webkit.org/show_bug.cgi?id=162610 5 6 Reviewed by Carlos Garcia Campos. 7 8 We should always claim to be running on Intel regardless of actual CPU type. See discussion 9 in bug #162548 for details. In particular, we can never advertise ARM because it causes dumb 10 websites to send mobile pages. 11 12 * platform/gtk/UserAgentGtk.cpp: 13 (WebCore::platformVersionForUAString): 14 (WebCore::buildUserAgentString): 15 (WebCore::cpuDescriptionForUAString): Deleted. 16 1 17 2016-09-28 Michael Catanzaro <mcatanzaro@igalia.com> 2 18 -
trunk/Source/WebCore/platform/gtk/UserAgentGtk.cpp
r206515 r206517 77 77 }; 78 78 79 static const char* cpuDescriptionForUAString()80 {81 #if CPU(PPC) || CPU(PPC64)82 return "PPC";83 #elif CPU(X86) || CPU(X86_64)84 return "Intel";85 #elif CPU(ARM) || CPU(ARM64)86 return "ARM";87 #else88 return "Unknown";89 #endif90 }91 92 79 static const char* platformForUAString() 93 80 { … … 108 95 #else 109 96 // We will always claim to be Safari in Mac OS X, since Safari in Linux triggers the iOS path on some websites. 110 static NeverDestroyed<const String> uaOSVersion(String::format("%s Mac OS X", cpuDescriptionForUAString())); 97 // And we always claim to be Intel since ARM triggers mobile versions of some websites. 98 static NeverDestroyed<const String> uaOSVersion(ASCIILiteral("Intel Mac OS X")); 111 99 return uaOSVersion; 112 100 #endif … … 131 119 uaString.appendLiteral("; "); 132 120 133 if (quirks.contains(UserAgentQuirks::NeedsMacintoshPlatform)) { 134 uaString.append(cpuDescriptionForUAString()); 135 uaString.appendLiteral(" Mac OS X"); 136 } else 121 if (quirks.contains(UserAgentQuirks::NeedsMacintoshPlatform)) 122 uaString.appendLiteral("Intel Mac OS X"); 123 else 137 124 uaString.append(platformVersionForUAString()); 138 125
Note: See TracChangeset
for help on using the changeset viewer.