Bug 220704

Summary: Extend getUserMedia quirk to warbyparker.com
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, darin, eric.carlson, esprehn+autocc, ews-watchlist, glenn, hta, jer.noble, kondapallykalyan, philipj, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.