Bug 244945

Summary: Implement the concept of "browsing context set"
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Chris Dumez 2022-09-08 12:41:08 PDT
Implement the concept of "browsing context set" from the HTML specification:
- https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-set

For example, COOP violation reporting relies on the size of this set to determine if a violation report should be sent or not:
- https://html.spec.whatwg.org/multipage/origin.html#browsing-context-group-switches-due-to-cross-origin-opener-policy:coop-violation-navigation-from

"""
If browsingContext's group's browsing context set's size is greater than 1, then:
    * Queue a violation report for browsing context group switch when navigating to a COOP response with responseCOOP, "enforce", responseURL, currentCOOPEnforcementResult's url, currentCOOPEnforcementResult's origin, responseOrigin, and referrer.
"""

Right now, we have code in PingLoader that relies on Page::nonUtilityPageCount() instead, which is not correct.
Comment 1 Radar WebKit Bug Importer 2022-09-15 12:42:24 PDT
<rdar://problem/99982953>