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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 2 17:15:53 PDT 2017


Andy Estes <aestes at apple.com> changed:

           What    |Removed                     |Added
 Attachment #311887|review?                     |review+
              Flags|                            |

--- Comment #3 from Andy Estes <aestes at apple.com> ---
Comment on attachment 311887
  --> https://bugs.webkit.org/attachment.cgi?id=311887

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] != '.';

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/61b287bc/attachment.html>

More information about the webkit-unassigned mailing list