[webkit-reviews] review granted: [Bug 215329] Add quirk to force touch events on mail.yahoo.com : [Attachment 406317] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 10 12:29:09 PDT 2020


Darin Adler <darin at apple.com> has granted Devin Rousso <drousso at apple.com>'s
request for review:
Bug 215329: Add quirk to force touch events on mail.yahoo.com
https://bugs.webkit.org/show_bug.cgi?id=215329

Attachment 406317: Patch

https://bugs.webkit.org/attachment.cgi?id=406317&action=review




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 406317
  --> https://bugs.webkit.org/attachment.cgi?id=406317
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=406317&action=review

> Source/WebCore/page/Quirks.cpp:501
> +    auto& url = m_document->topDocument().url();
> +    auto host = url.host().toString();
> +    if (host.startsWithIgnoringASCIICase("mail.") &&
topPrivatelyControlledDomain(host).startsWith("yahoo."))
> +	   return true;
> +
> +    return false;

Can do this more efficiently like so:

    auto host = m_document->topDocument().url().host();
    return startsWithLettersIgnoringASCIICase(host, "mail.") &&
topPrivatelyControlledDomain(host.toString()).startsWith("yahoo.");

Also, I think we should write an isYahooMail helper function so we can share
this logic with Quirks::shouldAvoidPastingImagesAsWebContent. Also, that uses a
data member to cache the result. Should we be doing that here too? Or sharing a
single one?


More information about the webkit-reviews mailing list