Bug 235502

Summary: Add a WebShare policy quirk for Twitter
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, marcos, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=243088
Bug Depends on:    
Bug Blocks: 235590    
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description youenn fablet 2022-01-24 01:03:52 PST
Add a WebShare policy quirk for Twitter
Comment 1 youenn fablet 2022-01-24 01:04:33 PST
<rdar://87944391>
Comment 2 youenn fablet 2022-01-24 02:07:07 PST
Created attachment 449793 [details]
Patch
Comment 3 youenn fablet 2022-01-24 03:39:42 PST
Created attachment 449797 [details]
Patch
Comment 4 youenn fablet 2022-01-24 06:31:46 PST
Comment on attachment 449797 [details]
Patch

win failure unrelated
Comment 5 Chris Dumez 2022-01-24 11:38:30 PST
Comment on attachment 449797 [details]
Patch

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

r=me

> Source/WebCore/page/Quirks.cpp:89
> +    return topPrivatelyControlledDomain(document.url().host().toString()) == "twitter.com";

Why not use RegistrableDomain instead of calling topPrivatelyControlledDomain() and having to deal with #ifdefs?
Comment 6 youenn fablet 2022-01-24 11:54:04 PST
(In reply to Chris Dumez from comment #5)
> Comment on attachment 449797 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=449797&action=review
> 
> r=me
> 
> > Source/WebCore/page/Quirks.cpp:89
> > +    return topPrivatelyControlledDomain(document.url().host().toString()) == "twitter.com";
> 
> Why not use RegistrableDomain instead of calling
> topPrivatelyControlledDomain() and having to deal with #ifdefs?

RegistrableDomain constructor is doing a little bit more work.
The point on #ifdef is good though.
Comment 7 youenn fablet 2022-01-25 05:24:57 PST
Created attachment 449920 [details]
Patch for landing
Comment 8 EWS 2022-01-25 06:10:14 PST
Committed r288546 (246378@main): <https://commits.webkit.org/246378@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449920 [details].