auto host = m_document->topDocument().url().host(); return equalLettersIgnoringASCIICase(host, "netflix.com") || host.endsWithIgnoringASCIICase(".netflix.com"); is a common pattern we have in Quirks class.
Created attachment 398828 [details] Patch
In some cases m_document->url() is used instead of m_document->topDocument().url(). Some investigation is needed whether they are intentional.
Comment on attachment 398828 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=398828&action=review > Source/WebCore/page/Quirks.cpp:74 > +bool Quirks::matchesTopLevelDomain(StringView hostNameToMatch) const I think this name needs to make it clear that it looks at topDocument. > Source/WebCore/page/Quirks.cpp:-807 > - auto host = m_document->url().host(); This was not topDocument. Bug?
(In reply to Simon Fraser (smfr) from comment #3) > Comment on attachment 398828 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=398828&action=review > > > Source/WebCore/page/Quirks.cpp:74 > > +bool Quirks::matchesTopLevelDomain(StringView hostNameToMatch) const > > I think this name needs to make it clear that it looks at topDocument. Any suggestions? > > > Source/WebCore/page/Quirks.cpp:-807 > > - auto host = m_document->url().host(); > > This was not topDocument. Bug? Yes.
Comment on attachment 398828 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=398828&action=review >>> Source/WebCore/page/Quirks.cpp:74 >>> +bool Quirks::matchesTopLevelDomain(StringView hostNameToMatch) const >> >> I think this name needs to make it clear that it looks at topDocument. > > Any suggestions? topDocumentMatchesTopLevelDomain
it has been done in https://github.com/WebKit/WebKit/pull/17329 with Bug 260938 *** This bug has been marked as a duplicate of bug 260938 ***