Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[WPE][GTK] Introduce NeedsUnbrandedUserAgent quirk and use it for acc…
…ounts.google.com, docs.google.com, and drive.google.com https://bugs.webkit.org/show_bug.cgi?id=222978 Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2021-03-10 Reviewed by Carlos Garcia Campos. Source/WebCore: This is a follow-up to bug #222039. I simplified our Google user agent quirks too much in that bug, breaking accounts.google.com, docs.google.com, and drive.google.com for clients that set application name and version in the user agent. What we really need here is an empty quirk in order to ensure our most boring standard user agent is used without any application branding or customizations. But we no longer need to fake platform or browser, as was required in the past. Additionaly, clean up the code a bit. We shouldn't need to compute domain and baseDomain many separate times, for instance. There's also no need to perform string operations to add the WebKit version to the user agent, since the version has been frozen for several years now and is likely to remain frozen indefinitely. Finally, remove some forgotten leftovers of our Internet Explorer and Windows quirks that were previously used for Google Docs. * platform/UserAgentQuirks.cpp: (WebCore::urlRequiresChromeBrowser): (WebCore::urlRequiresFirefoxBrowser): (WebCore::urlRequiresMacintoshPlatform): (WebCore::urlRequiresUnbrandedUserAgent): (WebCore::UserAgentQuirks::quirksForURL): (WebCore::UserAgentQuirks::stringForQuirk): (WebCore::isGoogle): Deleted. (WebCore::urlRequiresLinuxDesktopPlatform): Deleted. * platform/UserAgentQuirks.h: * platform/glib/UserAgentGLib.cpp: (WebCore::buildUserAgentString): (WebCore::standardUserAgent): (WebCore::standardUserAgentForURL): (WebCore::versionForUAString): Deleted. Tools: * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::assertUserAgentForURLHasEmptyQuirk): (TestWebKitAPI::TEST): (TestWebKitAPI::assertUserAgentForURLHasLinuxPlatformQuirk): Deleted. Canonical link: https://commits.webkit.org/235126@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
d845c75
commit c87fa091ba26dabd4367c97c99bc5a9b448a97f1
Showing
6 changed files
with
102 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters