Bug 220704 - Extend getUserMedia quirk to warbyparker.com
Summary: Extend getUserMedia quirk to warbyparker.com
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-18 00:50 PST by youenn fablet
Modified: 2021-01-21 08:56 PST (History)
14 users (show)

See Also:


Attachments
Patch (3.35 KB, patch)
2021-01-18 01:11 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (3.51 KB, patch)
2021-01-20 01:07 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2021-01-18 00:50:46 PST
Extend getUserMedia quirk to warbyparker.com
Comment 1 youenn fablet 2021-01-18 00:50:58 PST
<rdar://problem/72839707>
Comment 2 youenn fablet 2021-01-18 01:11:46 PST
Created attachment 417814 [details]
Patch
Comment 3 youenn fablet 2021-01-20 01:07:58 PST
Created attachment 417952 [details]
Patch
Comment 4 EWS 2021-01-20 12:51:33 PST
Committed r271667: <https://trac.webkit.org/changeset/271667>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417952 [details].
Comment 5 Darin Adler 2021-01-20 14:55:07 PST
Comment on attachment 417952 [details]
Patch

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

> Source/WebCore/page/Quirks.cpp:869
> +        m_shouldEnableLegacyGetUserMediaQuirk = host == "www.baidu.com" || host == "www.warbyparker.com";

Why did we stop using equalLettersIgnoringASCIICase? I don’t think a case sensitive check is right for a host name.
Comment 6 youenn fablet 2021-01-20 23:30:10 PST
(In reply to Darin Adler from comment #5)
> Comment on attachment 417952 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=417952&action=review
> 
> > Source/WebCore/page/Quirks.cpp:869
> > +        m_shouldEnableLegacyGetUserMediaQuirk = host == "www.baidu.com" || host == "www.warbyparker.com";
> 
> Why did we stop using equalLettersIgnoringASCIICase? I don’t think a case
> sensitive check is right for a host name.

This is an optimization since we are using SecurityOrigin::host, which is lower cased. 
I guess we could revert back to caseless checks in Quirks.cpp for consistency.
Or introduce matching methods with SecurityOrigin instead for clarity.
Comment 7 Darin Adler 2021-01-21 08:56:31 PST
Comment on attachment 417952 [details]
Patch

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

>>> Source/WebCore/page/Quirks.cpp:869
>>> +        m_shouldEnableLegacyGetUserMediaQuirk = host == "www.baidu.com" || host == "www.warbyparker.com";
>> 
>> Why did we stop using equalLettersIgnoringASCIICase? I don’t think a case sensitive check is right for a host name.
> 
> This is an optimization since we are using SecurityOrigin::host, which is lower cased. 
> I guess we could revert back to caseless checks in Quirks.cpp for consistency.
> Or introduce matching methods with SecurityOrigin instead for clarity.

Got it. I didn’t notice that this is calling a different host function now. Code seems fine. Thank you for answering my question.