Title: [210179] releases/WebKitGTK/webkit-2.14
Revision
210179
Author
[email protected]
Date
2016-12-27 09:12:43 -0800 (Tue, 27 Dec 2016)

Log Message

Merge r210168 - [GTK] Improve user agent construction
https://bugs.webkit.org/show_bug.cgi?id=142074

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Use the macOS rather than the Chrome quirk for Google domains, to avoid problems with
Google Calendar and Google Maps.

* platform/UserAgentQuirks.cpp:
(WebCore::urlRequiresChromeBrowser):
(WebCore::urlRequiresMacintoshPlatform):

Tools:

* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (210178 => 210179)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2016-12-27 17:03:57 UTC (rev 210178)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2016-12-27 17:12:43 UTC (rev 210179)
@@ -1,3 +1,17 @@
+2016-12-27  Michael Catanzaro  <[email protected]>
+
+        [GTK] Improve user agent construction
+        https://bugs.webkit.org/show_bug.cgi?id=142074
+
+        Reviewed by Carlos Garcia Campos.
+
+        Use the macOS rather than the Chrome quirk for Google domains, to avoid problems with
+        Google Calendar and Google Maps.
+
+        * platform/UserAgentQuirks.cpp:
+        (WebCore::urlRequiresChromeBrowser):
+        (WebCore::urlRequiresMacintoshPlatform):
+
 2016-11-28  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Crash in WebCore::PlatformDisplayX11::supportsXComposite when running under Wayland

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/UserAgentGtk.cpp (210178 => 210179)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/UserAgentGtk.cpp	2016-12-27 17:03:57 UTC (rev 210178)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/UserAgentGtk.cpp	2016-12-27 17:12:43 UTC (rev 210179)
@@ -178,10 +178,6 @@
     if (baseDomain == "typekit.net" || baseDomain == "typekit.com")
         return true;
 
-    // Shut off Chrome ads. Avoid missing features on maps.google.com.
-    if (baseDomain.startsWith("google"))
-        return true;
-
     // Needed for YouTube 360 (requires ENABLE_MEDIA_SOURCE).
     if (baseDomain == "youtube.com")
         return true;
@@ -197,6 +193,11 @@
 {
     String baseDomain = topPrivatelyControlledDomain(url.host());
 
+    // Avoid receiving terrible fallbacks version of calendar.google.com and
+    // maps.google.com on certain platforms. https://webkit.org/b/142074
+    if (baseDomain.startsWith("google."))
+        return true;
+
     // At least finance.yahoo.com displays a mobile version with our standard user agent.
     if (baseDomain == "yahoo.com")
         return true;

Modified: releases/WebKitGTK/webkit-2.14/Tools/ChangeLog (210178 => 210179)


--- releases/WebKitGTK/webkit-2.14/Tools/ChangeLog	2016-12-27 17:03:57 UTC (rev 210178)
+++ releases/WebKitGTK/webkit-2.14/Tools/ChangeLog	2016-12-27 17:12:43 UTC (rev 210179)
@@ -1,3 +1,13 @@
+2016-12-27  Michael Catanzaro  <[email protected]>
+
+        [GTK] Improve user agent construction
+        https://bugs.webkit.org/show_bug.cgi?id=142074
+
+        Reviewed by Carlos Garcia Campos.
+
+        * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
+        (TestWebKitAPI::TEST):
+
 2016-10-16  Carlos Garcia Campos  <[email protected]>
 
         [GTK] WebKitWebPage URI not updated after URI is modified by InjectedBundlePageResourceLoadClient::willSendRequestForFrame

Modified: releases/WebKitGTK/webkit-2.14/Tools/TestWebKitAPI/Tests/WebCore/gtk/UserAgentQuirks.cpp (210178 => 210179)


--- releases/WebKitGTK/webkit-2.14/Tools/TestWebKitAPI/Tests/WebCore/gtk/UserAgentQuirks.cpp	2016-12-27 17:03:57 UTC (rev 210178)
+++ releases/WebKitGTK/webkit-2.14/Tools/TestWebKitAPI/Tests/WebCore/gtk/UserAgentQuirks.cpp	2016-12-27 17:12:43 UTC (rev 210179)
@@ -47,16 +47,16 @@
 
     // google domains require Chrome in the UA
     uaString = standardUserAgentForURL(URL(ParsedURLString, "http://www.google.es/"));
-    EXPECT_FALSE(uaString.contains("Macintosh"));
-    EXPECT_FALSE(uaString.contains("Mac OS X"));
-    EXPECT_TRUE(uaString.contains("Linux"));
-    EXPECT_TRUE(uaString.contains("Chrome"));
+    EXPECT_TRUE(uaString.contains("Macintosh"));
+    EXPECT_TRUE(uaString.contains("Mac OS X"));
+    EXPECT_FALSE(uaString.contains("Linux"));
+    EXPECT_FALSE(uaString.contains("Chrome"));
 
     uaString = standardUserAgentForURL(URL(ParsedURLString, "http://maps.google.com/"));
-    EXPECT_FALSE(uaString.contains("Macintosh"));
-    EXPECT_FALSE(uaString.contains("Mac OS X"));
-    EXPECT_TRUE(uaString.contains("Linux"));
-    EXPECT_TRUE(uaString.contains("Chrome"));
+    EXPECT_TRUE(uaString.contains("Macintosh"));
+    EXPECT_TRUE(uaString.contains("Mac OS X"));
+    EXPECT_FALSE(uaString.contains("Linux"));
+    EXPECT_FALSE(uaString.contains("Chrome"));
 
     // Slack requires Chrome in the UA
     uaString = standardUserAgentForURL(URL(ParsedURLString, "http://www.slack.com/"));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to