WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
267623
Quirks.cpp: Fix and extend domain method
https://bugs.webkit.org/show_bug.cgi?id=267623
Summary
Quirks.cpp: Fix and extend domain method
Karl Dubost
Reported
2024-01-16 23:45:19 PST
bool Quirks::isDomain(const String& domainString) const { return RegistrableDomain(m_document->topDocument().url()).string() == domainString; } was added with
Bug 260938
https://github.com/WebKit/WebKit/pull/17329
but it broke at least one Quirk
Bug 267569
Indeed Quirks::isDomain("www.example.com") will return false Quirks::isDomain("example.com") will return true because RegistrableDomain(m_document->topDocument().url()).string() returns only the top domain. So probably we need something along Quirks::isFullDomain("www.example.com") matches only www.example.com Quirks::isTopDomain("example.com") matches only example.com And maybe something along Quirks::isSubDomain("example.com") matching everything *.example.com Real names to be determined.
Attachments
Add attachment
proposed patch, testcase, etc.
Anne van Kesteren
Comment 1
2024-01-17 05:43:39 PST
isDomain should be renamed to isRegistrableDomain or maybe even topLevelDocumentRegistrableDomainIs. However it's not clear you want isRegistrableDomain to begin with here. After all, it can lead to
bug 267569
happening. I would expect these to be useful: - topLevelDocumentDomainIs - topLevelDocumentDomainIsSubDomainOf / topLevelDocumentDomainEndsWith
Radar WebKit Bug Importer
Comment 2
2024-01-23 23:46:14 PST
<
rdar://problem/121499128
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug