Title: [210168] trunk
- Revision
- 210168
- Author
- [email protected]
- Date
- 2016-12-27 07:26:52 -0800 (Tue, 27 Dec 2016)
Log Message
[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: trunk/Source/WebCore/ChangeLog (210167 => 210168)
--- trunk/Source/WebCore/ChangeLog 2016-12-27 12:11:22 UTC (rev 210167)
+++ trunk/Source/WebCore/ChangeLog 2016-12-27 15:26:52 UTC (rev 210168)
@@ -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-12-26 Zalan Bujtas <[email protected]>
ASSERTION FAILED: !rect.isEmpty() in WebCore::GraphicsContext::drawRect
Modified: trunk/Source/WebCore/platform/UserAgentQuirks.cpp (210167 => 210168)
--- trunk/Source/WebCore/platform/UserAgentQuirks.cpp 2016-12-27 12:11:22 UTC (rev 210167)
+++ trunk/Source/WebCore/platform/UserAgentQuirks.cpp 2016-12-27 15:26:52 UTC (rev 210168)
@@ -45,12 +45,6 @@
if (baseDomain == "typekit.net" || baseDomain == "typekit.com")
return true;
- // Shut off Chrome ads. Avoid missing features on maps.google.com. Avoid
- // receiving a terrible fallback version of calendar.google.com. Receive a
- // fancier plus.google.com.
- if (baseDomain.startsWith("google."))
- return true;
-
// Needed for YouTube 360 with WebKitGTK+ and WPE (requires ENABLE_MEDIA_SOURCE).
if (baseDomain == "youtube.com")
return true;
@@ -66,6 +60,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 WebKitGTK+'s standard user agent.
if (baseDomain == "yahoo.com")
return true;
Modified: trunk/Tools/ChangeLog (210167 => 210168)
--- trunk/Tools/ChangeLog 2016-12-27 12:11:22 UTC (rev 210167)
+++ trunk/Tools/ChangeLog 2016-12-27 15:26:52 UTC (rev 210168)
@@ -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-12-23 Simon Fraser <[email protected]>
REGRESSION (r209299): Selection is broken when you zoom in webpage using trackpad
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp (210167 => 210168)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp 2016-12-27 12:11:22 UTC (rev 210167)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp 2016-12-27 15:26:52 UTC (rev 210168)
@@ -69,17 +69,15 @@
String uaString = standardUserAgentForURL(URL(ParsedURLString, "http://www.webkit.org/"));
EXPECT_TRUE(uaString.isNull());
+#if !OS(MAC_OS_X)
// Google quirk should not affect sites with similar domains.
uaString = standardUserAgentForURL(URL(ParsedURLString, "http://www.googleblog.com/"));
- EXPECT_FALSE(uaString.contains("Chrome"));
+ EXPECT_FALSE(uaString.contains("Macintosh"));
+ EXPECT_FALSE(uaString.contains("Mac OS X"));
+#endif
assertUserAgentForURLHasChromeBrowserQuirk("http://typekit.com/");
assertUserAgentForURLHasChromeBrowserQuirk("http://typekit.net/");
- assertUserAgentForURLHasChromeBrowserQuirk("http://www.google.com/");
- assertUserAgentForURLHasChromeBrowserQuirk("http://www.google.es/");
- assertUserAgentForURLHasChromeBrowserQuirk("http://calendar.google.com/");
- assertUserAgentForURLHasChromeBrowserQuirk("http://maps.google.com/");
- assertUserAgentForURLHasChromeBrowserQuirk("http://plus.google.com/");
assertUserAgentForURLHasChromeBrowserQuirk("http://www.youtube.com/");
assertUserAgentForURLHasChromeBrowserQuirk("http://www.slack.com/");
@@ -88,6 +86,12 @@
assertUserAgentForURLHasMacPlatformQuirk("http://intl.taobao.com/");
assertUserAgentForURLHasMacPlatformQuirk("http://www.whatsapp.com/");
assertUserAgentForURLHasMacPlatformQuirk("http://web.whatsapp.com/");
+
+ assertUserAgentForURLHasMacPlatformQuirk("http://www.google.com/");
+ assertUserAgentForURLHasMacPlatformQuirk("http://www.google.es/");
+ assertUserAgentForURLHasMacPlatformQuirk("http://calendar.google.com/");
+ assertUserAgentForURLHasMacPlatformQuirk("http://maps.google.com/");
+ assertUserAgentForURLHasMacPlatformQuirk("http://plus.google.com/");
}
} // namespace TestWebKitAPI
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes