Changeset 273197 in webkit


Ignore:
Timestamp:
Feb 20, 2021 2:39:06 AM (3 years ago)
Author:
commit-queue@webkit.org
Message:

Remove unused isGoogle function
https://bugs.webkit.org/show_bug.cgi?id=222227

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-20
Reviewed by Frédéric Wang.

Remove unused (after r273084) isGoogle function.

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle): Deleted.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r273194 r273197  
     12021-02-20  Rob Buis  <rbuis@igalia.com>
     2
     3        Remove unused isGoogle function
     4        https://bugs.webkit.org/show_bug.cgi?id=222227
     5
     6        Reviewed by Frédéric Wang.
     7
     8        Remove unused (after r273084) isGoogle function.
     9
     10        * platform/UserAgentQuirks.cpp:
     11        (WebCore::isGoogle): Deleted.
     12
    1132021-02-19  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Source/WebCore/platform/UserAgentQuirks.cpp

    r273084 r273197  
    3535// When editing the quirks in this file, be sure to update
    3636// Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp.
    37 
    38 static bool isGoogle(const URL& url)
    39 {
    40     String domain = url.host().toString();
    41     String baseDomain = topPrivatelyControlledDomain(domain);
    42 
    43     // Our Google UA is *very* complicated to get right. Read
    44     // https://webkit.org/b/142074 carefully before changing. Test that 3D
    45     // view is available in Google Maps. Test Google Calendar. Test logging out
    46     // and logging in to a Google account. Change platformVersionForUAString()
    47     // to return "FreeBSD amd64" and test everything again.
    48     if (baseDomain.startsWith("google."))
    49         return true;
    50     if (baseDomain == "gstatic.com")
    51         return true;
    52     if (baseDomain == "googleusercontent.com")
    53         return true;
    54     // googleapis.com is in the public suffix list, which is confusing. E.g.
    55     // fonts.googleapis.com is actually a base domain.
    56     if (domain.endsWith(".googleapis.com"))
    57         return true;
    58 
    59     return false;
    60 }
    6137
    6238// Be careful with this quirk: it's an invitation for sites to use JavaScript
Note: See TracChangeset for help on using the changeset viewer.