Skip to content
Permalink
Browse files
Unreviewed, reverting r273197.
https://bugs.webkit.org/show_bug.cgi?id=222909

Revert of r273084 broke building on Linux platforms

Reverted changeset:

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

Canonical link: https://commits.webkit.org/235009@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Mar 8, 2021
1 parent 377cbbf commit 81a5e591e504d675fbd1c865cff20a6cc11c0d8c
Showing 2 changed files with 37 additions and 0 deletions.
@@ -1,3 +1,16 @@
2021-03-08 Commit Queue <commit-queue@webkit.org>

Unreviewed, reverting r273197.
https://bugs.webkit.org/show_bug.cgi?id=222909

Revert of r273084 broke building on Linux platforms

Reverted changeset:

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

2021-03-08 Commit Queue <commit-queue@webkit.org>

Unreviewed, reverting r273084.
@@ -35,6 +35,30 @@ namespace WebCore {
// When editing the quirks in this file, be sure to update
// Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp.

static bool isGoogle(const URL& url)
{
String domain = url.host().toString();
String baseDomain = topPrivatelyControlledDomain(domain);

// Our Google UA is *very* complicated to get right. Read
// https://webkit.org/b/142074 carefully before changing. Test that 3D
// view is available in Google Maps. Test Google Calendar. Test logging out
// and logging in to a Google account. Change platformVersionForUAString()
// to return "FreeBSD amd64" and test everything again.
if (baseDomain.startsWith("google."))
return true;
if (baseDomain == "gstatic.com")
return true;
if (baseDomain == "googleusercontent.com")
return true;
// googleapis.com is in the public suffix list, which is confusing. E.g.
// fonts.googleapis.com is actually a base domain.
if (domain.endsWith(".googleapis.com"))
return true;

return false;
}

// Be careful with this quirk: it's an invitation for sites to use JavaScript
// that works in Chrome that WebKit cannot handle. Prefer other quirks instead.
static bool urlRequiresChromeBrowser(const URL& url)

0 comments on commit 81a5e59

Please sign in to comment.