Bug 267623
Summary: | Quirks.cpp: Fix and extend domain method | ||
---|---|---|---|
Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | annevk, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 17 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=260938 https://bugs.webkit.org/show_bug.cgi?id=267569 |
||
Bug Depends on: | |||
Bug Blocks: | 258603 |
Karl Dubost
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
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
<rdar://problem/121499128>