Title: [231311] trunk
Revision
231311
Author
[email protected]
Date
2018-05-03 10:08:25 -0700 (Thu, 03 May 2018)

Log Message

WebKit should send fake macOS user agent to docs.google.com
https://bugs.webkit.org/show_bug.cgi?id=185165

Reviewed by Carlos Garcia Campos.

Source/WebCore:

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

Tools:

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (231310 => 231311)


--- trunk/Source/WebCore/ChangeLog	2018-05-03 16:58:48 UTC (rev 231310)
+++ trunk/Source/WebCore/ChangeLog	2018-05-03 17:08:25 UTC (rev 231311)
@@ -1,3 +1,14 @@
+2018-05-03  Michael Catanzaro  <[email protected]>
+
+        WebKit should send fake macOS user agent to docs.google.com
+        https://bugs.webkit.org/show_bug.cgi?id=185165
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/UserAgentQuirks.cpp:
+        (WebCore::urlRequiresMacintoshPlatform):
+        (WebCore::urlRequiresLinuxDesktopPlatform):
+
 2018-05-03  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r231223 and r231288.

Modified: trunk/Source/WebCore/platform/UserAgentQuirks.cpp (231310 => 231311)


--- trunk/Source/WebCore/platform/UserAgentQuirks.cpp	2018-05-03 16:58:48 UTC (rev 231310)
+++ trunk/Source/WebCore/platform/UserAgentQuirks.cpp	2018-05-03 17:08:25 UTC (rev 231311)
@@ -106,12 +106,18 @@
         return true;
     }
 
+    // Google Docs shows a scary unsupported browser warning with WebKitGTK+'s
+    // standard user agent.
+    if (domain == "docs.google.com")
+        return true;
+
     return false;
 }
 
 static bool urlRequiresLinuxDesktopPlatform(const URL& url)
 {
-    return isGoogle(url);
+    // docs.google.com requires the macOS platform quirk.
+    return isGoogle(url) && url.host() != "docs.google.com";
 }
 
 UserAgentQuirks UserAgentQuirks::quirksForURL(const URL& url)

Modified: trunk/Tools/ChangeLog (231310 => 231311)


--- trunk/Tools/ChangeLog	2018-05-03 16:58:48 UTC (rev 231310)
+++ trunk/Tools/ChangeLog	2018-05-03 17:08:25 UTC (rev 231311)
@@ -1,3 +1,13 @@
+2018-05-03  Michael Catanzaro  <[email protected]>
+
+        WebKit should send fake macOS user agent to docs.google.com
+        https://bugs.webkit.org/show_bug.cgi?id=185165
+
+        Reviewed by Carlos Garcia Campos.
+
+        * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
+        (TestWebKitAPI::TEST):
+
 2018-05-03  Valerie R Young  <[email protected]>
 
         test262/Runner.pm: performance improvements

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp (231310 => 231311)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp	2018-05-03 16:58:48 UTC (rev 231310)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp	2018-05-03 17:08:25 UTC (rev 231311)
@@ -94,6 +94,7 @@
     assertUserAgentForURLHasMacPlatformQuirk("http://web.whatsapp.com/");
     assertUserAgentForURLHasMacPlatformQuirk("http://outlook.live.com/");
     assertUserAgentForURLHasMacPlatformQuirk("http://www.chase.com/");
+    assertUserAgentForURLHasMacPlatformQuirk("http://docs.google.com/");
 }
 
 } // namespace TestWebKitAPI
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to