Changeset 160354 in webkit
- Timestamp:
- Dec 10, 2013 2:19:06 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r160352 r160354 1 2013-12-10 Gustavo Noronha Silva <gns@gnome.org> 2 3 [GTK] REGRESSION: www.yahoo.com redirects to the mobile version after UA change 4 https://bugs.webkit.org/show_bug.cgi?id=125444 5 6 Reviewed by Martin Robinson. 7 8 * platform/gtk/UserAgentGtk.cpp: 9 (WebCore::platformVersionForUAString): more correctly pretend we're Mac OS X. 10 (WebCore::standardUserAgent): ditto. 11 1 12 2013-12-09 Gustavo Noronha Silva <gns@gnome.org> 2 13 -
trunk/Source/WebCore/platform/gtk/UserAgentGtk.cpp
r159572 r160354 31 31 #if OS(UNIX) 32 32 #include <sys/utsname.h> 33 #elif OS(WINDOWS)34 #include "SystemInfo.h"35 33 #endif 36 34 37 35 namespace WebCore { 38 36 39 #if OS(DARWIN) || OS(UNIX)40 37 static const char* cpuDescriptionForUAString() 41 38 { … … 50 47 #endif 51 48 } 52 #endif53 54 static const char* platformForUAString()55 {56 #if PLATFORM(X11)57 return "X11";58 #elif OS(WINDOWS)59 return "";60 #elif PLATFORM(MAC)61 return "Macintosh";62 #elif defined(GDK_WINDOWING_DIRECTFB)63 return "DirectFB";64 #else65 return "Unknown";66 #endif67 }68 49 69 50 static String platformVersionForUAString() … … 73 54 return uaOSVersion; 74 55 75 #if OS(WINDOWS)76 uaOSVersion = windowsVersionForUAString();77 #elif OS(DARWIN) || OS(UNIX)78 56 // We will always claim to be Safari in Mac OS X, since Safari in Linux triggers the iOS path on 79 57 // some websites. 80 58 uaOSVersion = String::format("%s Mac OS X", cpuDescriptionForUAString()); 81 #else82 uaOSVersion = String("Unknown");83 #endif84 59 return uaOSVersion; 85 60 } … … 96 71 // sites won't load resources at all. 97 72 DEFINE_STATIC_LOCAL(const CString, uaVersion, (String::format("%i.%i", USER_AGENT_GTK_MAJOR_VERSION, USER_AGENT_GTK_MINOR_VERSION).utf8())); 98 DEFINE_STATIC_LOCAL(const String, staticUA, (String::format("Mozilla/5.0 ( %s; %s) AppleWebKit/%s (KHTML, like Gecko) Safari/%s",99 platformForUAString(), platformVersionForUAString().utf8().data(),100 uaVersion.data(), uaVersion.data()))); 73 DEFINE_STATIC_LOCAL(const String, staticUA, (String::format("Mozilla/5.0 (Macintosh; %s) AppleWebKit/%s (KHTML, like Gecko) Safari/%s", 74 platformVersionForUAString().utf8().data(), uaVersion.data(), uaVersion.data()))); 75 101 76 if (applicationName.isEmpty()) 102 77 return staticUA;
Note: See TracChangeset
for help on using the changeset viewer.