PSA: WebCore::Quirks should define the logic to determine if a particular site specific quirk is needed or not

# Ryosuke Niwa (a day ago)

I've consolidated all site specific quirks in WebCore and WebKit into WebCore::Quirks: trac.webkit.org/browser/webkit/trunk/Source/WebCore/page/Quirks.cpp

Going forward, any logic to determine whether a given site specific quirk is needed or not in a given document should be added to this class instead of scattered across our codebase and/or directly checking Settings::needsSiteSpecificQuirks.

On that note, I'd appreciate if someone who maintains PlayStation / Windows ports could cleanup standardsUserAgentForURL to use WebsitePolicies in WebKit layer instead of having the logic in WebCore.

  • R. Niwa
Contact us to advertise here
# Michael Catanzaro (a day ago)

On Tue, Mar 12, 2019 at 9:42 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

On that note, I'd appreciate if someone who maintains PlayStation / Windows ports could cleanup standardsUserAgentForURL to use WebsitePolicies in WebKit layer instead of having the logic in WebCore.

Looks like standardUserAgentForURL is a stub for both PlayStation and Windows? Only the UserAgentGLib.cpp implementation of standardUserAgentForURL actually calls into UserAgentQuirks.cpp. What exactly are you hoping to have changed?

If anyone seriously looks into changing user agent quirks, it would be a good time to try investigating bugs.webkit.org/show_bug.cgi?id=191858 as well.

Michael

# Ryosuke Niwa (a day ago)

On Tue, Mar 12, 2019 at 7:57 PM Michael Catanzaro <mcatanzaro at igalia.com>

wrote:

On Tue, Mar 12, 2019 at 9:42 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

On that note, I'd appreciate if someone who maintains PlayStation / Windows ports could cleanup standardsUserAgentForURL to use WebsitePolicies in WebKit layer instead of having the logic in WebCore.

Looks like standardUserAgentForURL is a stub for both PlayStation and Windows? Only the UserAgentGLib.cpp implementation of standardUserAgentForURL actually calls into UserAgentQuirks.cpp.

Oh, I didn't notice that.

What exactly are you hoping to have changed?

Right now, WebPage::platformUserAgent on GTK+ and Windows checks needsSiteSpecificQuirks and returns the result of standardUserAgentForURL.

Ideally, we want all ports to be using WebsitePolicies to set per-URL UA string instead. e.g. we've got rid of the code on macOS and iOS.

  • R. Niwa

Want more features?

Request early access to our private beta of readable email premium.