[Webkit-unassigned] [Bug 172881] Modify Netflix controlsManager quirk to prevent only scrubbing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 3 12:24:43 PDT 2017


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

--- Comment #7 from Beth Dakin <bdakin at apple.com> ---
(In reply to Andy Estes from comment #3)
> Comment on attachment 311887 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=311887&action=review
> 
> > Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm:533
> > +    String host = document->url().host();
> > +    return !(equalLettersIgnoringASCIICase(host, "netflix.com") || host.endsWithIgnoringASCIICase(".netflix.com"));
> 
> Not new to this patch, but the double string comparison makes me a little
> sad. In the past I've done something like this:
> 
>     String netflixDomain = ASCIILiteral("netflix.com");
>     if (!host.endsWithIgnoringASCIICase(netflixDomain))
>         return true;
> 
>     unsigned suffixOffset = host.length() - netflixDomain.length();
>     return suffixOffset && host[suffixOffset - 1] != '.';

Cool, I'll try this! Thanks Andy!

-- 
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/20170603/ab3eafdc/attachment.html>


More information about the webkit-unassigned mailing list