⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 266584 in webkit


Ignore:
Timestamp:
Sep 4, 2020, 4:14:48 AM (6 years ago)
Author:
Carlos Garcia Campos
Message:

[GLIB] Stop using firefox user agent quirk for google docs
​https://bugs.webkit.org/show_bug.cgi?id=215845

Reviewed by Adrian Perez de Castro.

Source/WebCore:

It causes problems with the CSP headers when accounts.youtube.com is used by google login and it no longer works
for google docs in any case.

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle):
(WebCore::urlRequiresFirefoxBrowser):

Tools:

Update API tests. Bring back UserAgentQuirks.cpp to the build that was removed in r244857.

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r266578 r266584  
     12020-09-04  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GLIB] Stop using firefox user agent quirk for google docs
     4        https://bugs.webkit.org/show_bug.cgi?id=215845
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        It causes problems with the CSP headers when accounts.youtube.com is used by google login and it no longer works
     9        for google docs in any case.
     10
     11        * platform/UserAgentQuirks.cpp:
     12        (WebCore::isGoogle):
     13        (WebCore::urlRequiresFirefoxBrowser):
     14
    1152020-09-03  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/Source/WebCore/platform/UserAgentQuirks.cpp

    r264676 r266584  
    3939{
    4040    String domain = url.host().toString();
     41
     42    // Google uses accounts.youtube.com for its login service.
     43    if (domain == "accounts.youtube.com")
     44        return true;
     45
    4146    String baseDomain = topPrivatelyControlledDomain(domain);
    4247
    … …  
    9398{
    9499    String domain = url.host().toString();
    95 
    96     // This quirk actually has nothing to do with YouTube. It's needed to avoid
    97     // unsupported browser warnings on Google Docs. After removing this quirk,
    98     // to reproduce the warnings you will need to sign out of Google, then click
    99     // on a link to a non-public document that requires signing in. The
    100     // unsupported browser warning will be displayed after signing in.
    101     if (domain == "accounts.youtube.com" || domain == "docs.google.com")
    102         return true;
    103100
    104101    // Google Drive shows an unsupported browser warning with WebKitGTK's
  • trunk/Tools/ChangeLog

    r266580 r266584  
     12020-09-04  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GLIB] Stop using firefox user agent quirk for google docs
     4        https://bugs.webkit.org/show_bug.cgi?id=215845
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        Update API tests. Bring back UserAgentQuirks.cpp to the build that was removed in r244857.
     9
     10        * TestWebKitAPI/PlatformGTK.cmake:
     11        * TestWebKitAPI/PlatformWPE.cmake:
     12        * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
     13        (TestWebKitAPI::TEST):
     14
    1152020-09-03  James Darpinian  <jdarpinian@chromium.org>
    216
  • trunk/Tools/TestWebKitAPI/PlatformGTK.cmake

    r260419 r266584  
    3333    ${test_main_SOURCES}
    3434
     35    Tests/WebCore/UserAgentQuirks.cpp
    3536    Tests/WebCore/gstreamer/GStreamerTest.cpp
    3637    Tests/WebCore/gstreamer/GstMappedBuffer.cpp
  • trunk/Tools/TestWebKitAPI/PlatformWPE.cmake

    r260419 r266584  
    2929    ${test_main_SOURCES}
    3030
     31    Tests/WebCore/UserAgentQuirks.cpp
    3132    Tests/WebCore/gstreamer/GStreamerTest.cpp
    3233    Tests/WebCore/gstreamer/GstMappedBuffer.cpp
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp

    r261466 r266584  
    9696    assertUserAgentForURLHasChromeBrowserQuirk("http://bankofamerica.com/");
    9797
    98     assertUserAgentForURLHasFirefoxBrowserQuirk("http://accounts.youtube.com/");
    99     assertUserAgentForURLHasFirefoxBrowserQuirk("http://docs.google.com/");
    10098    assertUserAgentForURLHasFirefoxBrowserQuirk("http://drive.google.com/");
    10199    assertUserAgentForURLHasFirefoxBrowserQuirk("http://bugzilla.redhat.com/");
    … …  
    107105    assertUserAgentForURLHasLinuxPlatformQuirk("http://drive.google.com/");
    108106    assertUserAgentForURLHasLinuxPlatformQuirk("http://fonts.googleapis.com/");
     107    assertUserAgentForURLHasLinuxPlatformQuirk("http://accounts.youtube.com/");
     108    assertUserAgentForURLHasLinuxPlatformQuirk("http://docs.google.com/");
    109109
    110110    assertUserAgentForURLHasMacPlatformQuirk("http://www.yahoo.com/");
    … …  
    114114    assertUserAgentForURLHasMacPlatformQuirk("http://web.whatsapp.com/");
    115115    assertUserAgentForURLHasMacPlatformQuirk("http://www.chase.com/");
    116     assertUserAgentForURLHasMacPlatformQuirk("http://drive.google.com/");
    117116    assertUserAgentForURLHasMacPlatformQuirk("http://paypal.com/");
    118117    assertUserAgentForURLHasMacPlatformQuirk("http://outlook.live.com/");
Note: See TracChangeset for help on using the changeset viewer.