Title: [227416] trunk/Source/WebCore
Revision
227416
Author
commit-qu...@webkit.org
Date
2018-01-23 09:10:47 -0800 (Tue, 23 Jan 2018)

Log Message

[GTK] Add user agent quirk for Microsoft Outlook Web App
https://bugs.webkit.org/show_bug.cgi?id=181982

Patch by Ting-Wei Lan <lant...@gmail.com> on 2018-01-23
Reviewed by Michael Catanzaro.

Microsoft Outlook Web App forces users to switch to the lite version on
the login page with our standard user agent on all non-macOS systems.
Since it is an application that can be installed by different companies,
schools and organizations, it is not possible to fix the issue unless
we keep a big list of host names that are known to run it. We check the
host name instead of the base domain name here because it is not
expected to run all sites under a base domain on this webmail and
calendar application.

https://mail.ntu.edu.tw is a site that is known to run Microsoft Outlook
Web App for several years, and it is not likely to change. When there
are other sites found to run it and having the same user agent problem,
we can expand the list to include them.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (227415 => 227416)


--- trunk/Source/WebCore/ChangeLog	2018-01-23 16:51:22 UTC (rev 227415)
+++ trunk/Source/WebCore/ChangeLog	2018-01-23 17:10:47 UTC (rev 227416)
@@ -1,3 +1,27 @@
+2018-01-23  Ting-Wei Lan  <lant...@gmail.com>
+
+        [GTK] Add user agent quirk for Microsoft Outlook Web App
+        https://bugs.webkit.org/show_bug.cgi?id=181982
+
+        Reviewed by Michael Catanzaro.
+
+        Microsoft Outlook Web App forces users to switch to the lite version on
+        the login page with our standard user agent on all non-macOS systems.
+        Since it is an application that can be installed by different companies,
+        schools and organizations, it is not possible to fix the issue unless
+        we keep a big list of host names that are known to run it. We check the
+        host name instead of the base domain name here because it is not
+        expected to run all sites under a base domain on this webmail and
+        calendar application.
+
+        https://mail.ntu.edu.tw is a site that is known to run Microsoft Outlook
+        Web App for several years, and it is not likely to change. When there
+        are other sites found to run it and having the same user agent problem,
+        we can expand the list to include them.
+
+        * platform/UserAgentQuirks.cpp:
+        (WebCore::urlRequiresMacintoshPlatform):
+
 2018-01-23  Yacine Bandou  <yacine.bandou_...@softathome.com>
 
         [EME] Add support of multi keys from different sessions in CDMinstanceClearKey

Modified: trunk/Source/WebCore/platform/UserAgentQuirks.cpp (227415 => 227416)


--- trunk/Source/WebCore/platform/UserAgentQuirks.cpp	2018-01-23 16:51:22 UTC (rev 227415)
+++ trunk/Source/WebCore/platform/UserAgentQuirks.cpp	2018-01-23 17:10:47 UTC (rev 227416)
@@ -72,7 +72,8 @@
 
 static bool urlRequiresMacintoshPlatform(const URL& url)
 {
-    String baseDomain = topPrivatelyControlledDomain(url.host());
+    String domain = url.host();
+    String baseDomain = topPrivatelyControlledDomain(domain);
 
     // At least finance.yahoo.com displays a mobile version with WebKitGTK+'s standard user agent.
     if (baseDomain == "yahoo.com")
@@ -86,6 +87,12 @@
     if (baseDomain == "whatsapp.com")
         return true;
 
+    // Microsoft Outlook Web App forces users with WebKitGTK+'s standard user
+    // agent to use the light version. Earlier versions even blocks users from
+    // accessing the calendar.
+    if (domain == "mail.ntu.edu.tw")
+        return true;
+
     return false;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to