Bug 212544

Summary: [iOS] Unable to paste images when composing mail at yahoo.com
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, bdakin, ews-watchlist, megan_gardner, mifenton, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Take 2 megan_gardner: review+, aestes: commit-queue-

Description Wenson Hsieh 2020-05-29 14:01:57 PDT
<rdar://problem/63511613>
Comment 1 Wenson Hsieh 2020-05-29 14:14:14 PDT Comment hidden (obsolete)
Comment 2 Tim Horton 2020-05-29 14:32:07 PDT
Comment on attachment 400614 [details]
Patch

Way insufficient coverage of Yahoo TLDs
Comment 3 Wenson Hsieh 2020-05-29 15:22:34 PDT
Created attachment 400625 [details]
Take 2
Comment 4 Andy Estes 2020-05-29 16:02:53 PDT
Comment on attachment 400625 [details]
Take 2

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

> Source/WebCore/page/Quirks.cpp:826
> +        m_shouldAvoidPastingImagesAsWebContent = host.startsWith("mail.") && topPrivatelyControlledDomain(host).startsWith("yahoo.");

Since this is a hostname, do you need to use startsWithIgnoringASCIICase instead? Or does URL do some sort of lowercase canonicalization?
Comment 5 Andy Estes 2020-05-29 16:03:45 PDT
Comment on attachment 400625 [details]
Take 2

Feel free to cq+ again if startsWithIgnoringASCIICase isn't needed.
Comment 6 Wenson Hsieh 2020-05-29 16:05:25 PDT
(In reply to Andy Estes from comment #5)
> Comment on attachment 400625 [details]
> Take 2
> 
> Feel free to cq+ again if startsWithIgnoringASCIICase isn't needed.

Good catch — I think the host name check should use startsWithIgnoringASCIICase.
Comment 7 Wenson Hsieh 2020-05-29 16:09:53 PDT
Committed r262323: <https://trac.webkit.org/changeset/262323>