[Webkit-unassigned] [Bug 258603] New: Harmonize the hosts/domain name testing in Quirks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 27 22:40:19 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=258603

            Bug ID: 258603
           Summary: Harmonize the hosts/domain name testing in Quirks
           Product: WebKit
           Version: Safari 17
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: karlcow at apple.com
                CC: webkit-bug-importer at group.apple.com

Currently the Quirks.cpp file has a couple of different ways of testing for the domain name of a site where the Quirk should apply. 
https://github.com/WebKit/WebKit/blame/main/Source/WebCore/page/Quirks.cpp

This is probably due to layer of history. 
It would probably be better to choose a "better"/more recent way of doing things. 

top domain equality
   equalLettersIgnoringASCIICase(host, domain)
   host == domain

partial_domain end
   host.endsWithIgnoringASCIICase(partial_domain)
   host.endsWith(partial_domain)

partial_domain start
   startsWithLettersIgnoringASCIICase(host, domain)
   host.toString()).startsWith(partial_domain)


There is also 
   topPrivatelyControlledDomain(host.toString()).startsWith("expedia."_s))


The recommended way is probably to use
   class WebCore::RegistrableDomain and its methods

see
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/RegistrableDomain.h
https://github.com/WebKit/WebKit/blob/main/Tools/TestWebKitAPI/Tests/WebCore/RegistrableDomain.cpp

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230628/4170551e/attachment-0001.htm>


More information about the webkit-unassigned mailing list