⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 269807 in webkit


Ignore:
Timestamp:
Nov 13, 2020, 4:55:05 PM (6 years ago)
Author:
Kate Cheney
Message:

Can't login to Microsoft Teams
https://bugs.webkit.org/show_bug.cgi?id=218778
<rdar://problem/36331568>

Reviewed by John Wilander.

This is a temporary quirk to assist a high-traffic website while they
complete the large task of migrating away from login flows that
require third party cookies. This quirk will be removed when the site
is updated.

Create a quirk to call the Storage Access API on behalf of Microsoft.

Source/WebCore:

No new tests, site-specific quirk.

  • dom/Element.cpp:

(WebCore::Element::dispatchMouseEvent):
Pass additional parameters to be able to dispatch a synthetic click
if storage access is granted.

  • loader/ResourceLoadObserver.h:

(WebCore::ResourceLoadObserver::setDomainsWithCrossPageStorageAccess):
(WebCore::ResourceLoadObserver::hasCrossPageStorageAccess const):
Store domains in the web process to avoid async calls to the network
process.

(WebCore::isMicrosoftLoginElement):
(WebCore::isMicrosoftDomain):

  • page/Quirks.cpp:

(WebCore::Quirks::triggerOptionalStorageAccessQuirk const):
This is the quirk.

  • page/Quirks.h:
  • platform/network/NetworkStorageSession.cpp:

(WebCore::NetworkStorageSession::setDomainsWithCrossPageStorageAccess):
(WebCore::NetworkStorageSession::grantCrossPageStorageAccess):
(WebCore::NetworkStorageSession::hasStorageAccess const):
(WebCore::NetworkStorageSession::grantStorageAccess):
(WebCore::NetworkStorageSession::removeAllStorageAccess):
(WebCore::NetworkStorageSession::storageAccessQuirks):
(WebCore::NetworkStorageSession::canRequestStorageAccessForLoginPurposesWithoutPriorUserInteraction):
(WebCore::NetworkStorageSession::loginDomainForFirstParty):
(WebCore::NetworkStorageSession::mapToTopDomain):
The user might go directly to login.live.com to sign in to Microsoft
Teams, but may not have seen the Storage Access prompt. In this case,
we should map live.com to microsoft.com and request storage access for
microsoftonline.com under microsoft.com. Since login.live.com is used
for other Microsoft login flows besides Teams, a user may have to
grant storage access to microsoftonline.com even when it is not needed
to complete the login. But this guarantees they will always be
successfully logged into all Microsoft accounts.

  • platform/network/NetworkStorageSession.h:

In order for the user to stay logged in between sessions, we should
update NetworkStorageSession to grant storage access based on values
stored in the ITP database for quirk domains.

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal):
Relax the requirement for user interaction for a specific third party
needing cookies for authentication purposes.

(WebKit::ResourceLoadStatisticsDatabaseStore::clear):
(WebKit::ResourceLoadStatisticsDatabaseStore::cookieAccess):
Relax the requirement for user interaction for a specific third party
needing cookies for authentication purposes.

(WebKit::ResourceLoadStatisticsDatabaseStore::domainsWithStorageAccess const):
(WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlocking):

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::clear):
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::requestStorageAccessEphemeral):
Relax user interaction for reasons above.

(WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:

(WebKit::RegistrableDomainsToBlockCookiesFor::isolatedCopy const):

  • Shared/WebProcessDataStoreParameters.h:

(WebKit::WebProcessDataStoreParameters::encode const):
(WebKit::WebProcessDataStoreParameters::decode):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::setDomainsWithCrossPageStorageAccess):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::webProcessDataStoreParameters):
(WebKit::WebProcessPool::setDomainsWithCrossPageStorageAccess):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:

(WebKit::WebResourceLoadObserver::hasCrossPageStorageAccess const):
(WebKit::WebResourceLoadObserver::setDomainsWithCrossPageStorageAccess):

  • WebProcess/WebCoreSupport/WebResourceLoadObserver.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setWebsiteDataStoreParameters):
(WebKit::WebProcess::setDomainsWithCrossPageStorageAccess):
Add quirk'd domains to have page level storage access to be able to
use document.cookie.

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:

Forward domains with the storage access quirk to the web process to
avoid an async call to the network process.

Location:
trunk/Source
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269806 r269807  
     12020-11-13  Kate Cheney  <katherine_cheney@apple.com>
     2
     3        Can't login to Microsoft Teams
     4        https://bugs.webkit.org/show_bug.cgi?id=218778
     5        <rdar://problem/36331568>
     6
     7        Reviewed by John Wilander.
     8
     9        This is a temporary quirk to assist a high-traffic website while they
     10        complete the large task of migrating away from login flows that
     11        require third party cookies. This quirk will be removed when the site
     12        is updated.
     13
     14        Create a quirk to call the Storage Access API on behalf of Microsoft.
     15
     16        No new tests, site-specific quirk.
     17
     18        * dom/Element.cpp:
     19        (WebCore::Element::dispatchMouseEvent):
     20        Pass additional parameters to be able to dispatch a synthetic click
     21        if storage access is granted.
     22
     23        * loader/ResourceLoadObserver.h:
     24        (WebCore::ResourceLoadObserver::setDomainsWithCrossPageStorageAccess):
     25        (WebCore::ResourceLoadObserver::hasCrossPageStorageAccess const):
     26        Store domains in the web process to avoid async calls to the network
     27        process.
     28
     29        (WebCore::isMicrosoftLoginElement):
     30        (WebCore::isMicrosoftDomain):
     31        * page/Quirks.cpp:
     32        (WebCore::Quirks::triggerOptionalStorageAccessQuirk const):
     33        This is the quirk.
     34
     35        * page/Quirks.h:
     36        * platform/network/NetworkStorageSession.cpp:
     37        (WebCore::NetworkStorageSession::setDomainsWithCrossPageStorageAccess):
     38        (WebCore::NetworkStorageSession::grantCrossPageStorageAccess):
     39        (WebCore::NetworkStorageSession::hasStorageAccess const):
     40        (WebCore::NetworkStorageSession::grantStorageAccess):
     41        (WebCore::NetworkStorageSession::removeAllStorageAccess):
     42        (WebCore::NetworkStorageSession::storageAccessQuirks):
     43        (WebCore::NetworkStorageSession::canRequestStorageAccessForLoginPurposesWithoutPriorUserInteraction):
     44        (WebCore::NetworkStorageSession::loginDomainForFirstParty):
     45        (WebCore::NetworkStorageSession::mapToTopDomain):
     46        The user might go directly to login.live.com to sign in to Microsoft
     47        Teams, but may not have seen the Storage Access prompt. In this case,
     48        we should map live.com to microsoft.com and request storage access for
     49        microsoftonline.com under microsoft.com. Since login.live.com is used
     50        for other Microsoft login flows besides Teams, a user may have to
     51        grant storage access to microsoftonline.com even when it is not needed
     52        to complete the login. But this guarantees they will always be
     53        successfully logged into all Microsoft accounts.
     54
     55        * platform/network/NetworkStorageSession.h:
     56        In order for the user to stay logged in between sessions, we should
     57        update NetworkStorageSession to grant storage access based on values
     58        stored in the ITP database for quirk domains.
     59
    1602020-11-13  Brian Burg  <bburg@apple.com>
    261
  • trunk/Source/WebCore/dom/DocumentStorageAccess.cpp

    r267973 r269807  
    3737#include "FrameLoaderClient.h"
    3838#include "JSDOMPromiseDeferred.h"
     39#include "NetworkStorageSession.h"
    3940#include "Page.h"
    4041#include "RegistrableDomain.h"
     
    266267    RELEASE_ASSERT(m_document.frame() && m_document.frame()->page());
    267268
    268     m_document.frame()->page()->chrome().client().requestStorageAccess(WTFMove(requestingDomain), RegistrableDomain::uncheckedCreateFromHost(m_document.topDocument().securityOrigin().host()), *m_document.frame(), m_storageAccessScope, [this, weakThis = makeWeakPtr(*this), completionHandler = WTFMove(completionHandler)] (RequestStorageAccessResult result) mutable {
     269    auto topFrameDomain = NetworkStorageSession::mapToTopDomain(RegistrableDomain(m_document.topDocument().url()));
     270
     271    m_document.frame()->page()->chrome().client().requestStorageAccess(WTFMove(requestingDomain), WTFMove(topFrameDomain), *m_document.frame(), m_storageAccessScope, [this, weakThis = makeWeakPtr(*this), completionHandler = WTFMove(completionHandler)] (RequestStorageAccessResult result) mutable {
    269272        if (!weakThis)
    270273            return;
  • trunk/Source/WebCore/dom/Element.cpp

    r269587 r269807  
    390390        return false;
    391391
    392     if (Quirks::StorageAccessResult::ShouldCancelEvent == document().quirks().triggerOptionalStorageAccessQuirk(*this, eventType))
     392    if (Quirks::StorageAccessResult::ShouldCancelEvent == document().quirks().triggerOptionalStorageAccessQuirk(*this, platformEvent, eventType, detail, relatedTarget))
    393393        return false;
    394394
  • trunk/Source/WebCore/loader/ResourceLoadObserver.h

    r266214 r269807  
    4040    WTF_MAKE_FAST_ALLOCATED;
    4141public:
     42    using TopFrameDomain = WebCore::RegistrableDomain;
     43    using SubResourceDomain = WebCore::RegistrableDomain;
     44
    4245    // https://fetch.spec.whatwg.org/#request-destination-script-like
    4346    enum class FetchDestinationIsScriptLike : bool { Yes, No };
     
    6669
    6770    virtual void setDomainsWithUserInteraction(HashSet<RegistrableDomain>&&) { }
     71    virtual void setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubResourceDomain>&&, CompletionHandler<void()>&& completionHandler) { completionHandler(); }
     72    virtual bool hasCrossPageStorageAccess(const SubResourceDomain&, const TopFrameDomain&) const { return false; }
    6873    virtual bool hasHadUserInteraction(const RegistrableDomain&) const { return false; }
    6974};
  • trunk/Source/WebCore/page/Quirks.cpp

    r269780 r269807  
    4343#include "LayoutUnit.h"
    4444#include "NamedNodeMap.h"
     45#include "NetworkStorageSession.h"
    4546#include "ResourceLoadObserver.h"
    4647#include "RuntimeEnabledFeatures.h"
     
    962963    return false;
    963964}
    964 #endif
    965 
    966 Quirks::StorageAccessResult Quirks::triggerOptionalStorageAccessQuirk(const Element& element, const AtomString& eventType) const
     965
     966static bool isMicrosoftLoginElement(const Element& element)
     967{
     968    if (!element.hasClass())
     969        return false;
     970
     971    auto& classNames = element.classNames();
     972    return classNames.contains("glyph_signIn_circle") || classNames.contains("mectrl_headertext") || classNames.contains("mectrl_header") || classNames.contains("ext-button primary") || classNames.contains("ext-primary");
     973}
     974
     975static bool isMicrosoftDomain(const RegistrableDomain& domain)
     976{
     977    static NeverDestroyed<RegistrableDomain> microsoftDotCom = RegistrableDomain::uncheckedCreateFromRegistrableDomainString("microsoft.com"_s);
     978    static NeverDestroyed<RegistrableDomain> liveDotCom = RegistrableDomain::uncheckedCreateFromRegistrableDomainString("live.com"_s);
     979
     980    return domain == microsoftDotCom || domain == liveDotCom;
     981}
     982#endif
     983
     984Quirks::StorageAccessResult Quirks::triggerOptionalStorageAccessQuirk(Element& element, const PlatformMouseEvent& platformEvent, const AtomString& eventType, int detail, Element* relatedTarget) const
    967985{
    968986#if ENABLE(RESOURCE_LOAD_STATISTICS)
     
    10341052            }
    10351053        }
     1054
     1055        // Microsoft Teams login case.
     1056        // FIXME(218779): Remove this quirk once microsoft.com completes their login flow redesign.
     1057        if (isMicrosoftDomain(domain) && isMicrosoftLoginElement(element)) {
     1058            auto firstPartyDomain = NetworkStorageSession::mapToTopDomain(RegistrableDomain::uncheckedCreateFromHost(m_document->topDocument().securityOrigin().host()));
     1059            if (auto loginDomain = NetworkStorageSession::loginDomainForFirstParty(firstPartyDomain)) {
     1060                if (!ResourceLoadObserver::shared().hasCrossPageStorageAccess(*loginDomain, firstPartyDomain)) {
     1061                    DocumentStorageAccess::requestStorageAccessForNonDocumentQuirk(*m_document, WTFMove(*loginDomain), [firstPartyDomain, loginDomain, &element, platformEvent, eventType, detail, relatedTarget](StorageAccessWasGranted storageAccessGranted) mutable {
     1062                        if (storageAccessGranted == StorageAccessWasGranted::Yes) {
     1063                            ResourceLoadObserver::shared().setDomainsWithCrossPageStorageAccess({{ firstPartyDomain, *loginDomain }}, [&element, platformEvent, eventType, detail, relatedTarget] {
     1064                                element.dispatchMouseEvent(platformEvent, eventType, detail, relatedTarget);
     1065                            });
     1066                        }
     1067                    });
     1068                    return Quirks::StorageAccessResult::ShouldCancelEvent;
     1069                }
     1070            }
     1071            return Quirks::StorageAccessResult::ShouldNotCancelEvent;
     1072        }
    10361073    }
    10371074#else
    10381075    UNUSED_PARAM(element);
     1076    UNUSED_PARAM(platformEvent);
    10391077    UNUSED_PARAM(eventType);
     1078    UNUSED_PARAM(detail);
     1079    UNUSED_PARAM(relatedTarget);
    10401080#endif
    10411081    return Quirks::StorageAccessResult::ShouldNotCancelEvent;
  • trunk/Source/WebCore/page/Quirks.h

    r268114 r269807  
    3838class HTMLVideoElement;
    3939class LayoutUnit;
     40class PlatformMouseEvent;
    4041
    4142class Quirks {
     
    113114
    114115    enum StorageAccessResult : bool { ShouldNotCancelEvent, ShouldCancelEvent };
    115     StorageAccessResult triggerOptionalStorageAccessQuirk(const Element&, const AtomString& eventType) const;
     116    StorageAccessResult triggerOptionalStorageAccessQuirk(Element&, const PlatformMouseEvent&, const AtomString& eventType, int, Element*) const;
    116117
    117118    bool needsVP9FullRangeFlagQuirk() const;
     
    155156};
    156157
    157 }
     158} // namespace WebCore
  • trunk/Source/WebCore/platform/network/NetworkStorageSession.cpp

    r266829 r269807  
    210210}
    211211
     212void NetworkStorageSession::setDomainsWithCrossPageStorageAccess(const HashMap<TopFrameDomain, SubResourceDomain>& domains)
     213{
     214    m_pairsGrantedCrossPageStorageAccess.clear();
     215    for (auto& topFrameDomain : domains.keys())
     216        grantCrossPageStorageAccess(topFrameDomain, domains.get(topFrameDomain));
     217}
     218
     219void NetworkStorageSession::grantCrossPageStorageAccess(const TopFrameDomain& topFrameDomain, const SubResourceDomain& resourceDomain)
     220{
     221    m_pairsGrantedCrossPageStorageAccess.add(topFrameDomain, resourceDomain);
     222}
     223
    212224bool NetworkStorageSession::hasStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID) const
    213225{
     
    228240                return true;
    229241        }
     242
     243        auto it = m_pairsGrantedCrossPageStorageAccess.find(firstPartyDomain);
     244        if (it != m_pairsGrantedCrossPageStorageAccess.end() && it->value == resourceDomain)
     245            return true;
    230246    }
    231247
     
    245261void NetworkStorageSession::grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID)
    246262{
     263    if (NetworkStorageSession::loginDomainMatchesRequestingDomain(firstPartyDomain, resourceDomain)) {
     264        grantCrossPageStorageAccess(firstPartyDomain, resourceDomain);
     265        return;
     266    }
     267
    247268    if (!frameID) {
    248269        if (firstPartyDomain.isEmpty())
     
    298319    m_pagesGrantedStorageAccess.clear();
    299320    m_framesGrantedStorageAccess.clear();
     321    m_pairsGrantedCrossPageStorageAccess.clear();
    300322}
    301323
     
    352374    return m_ageCapForClientSideCookies;
    353375}
     376
     377HashMap<RegistrableDomain, RegistrableDomain>& NetworkStorageSession::storageAccessQuirks()
     378{
     379    static NeverDestroyed<HashMap<RegistrableDomain, RegistrableDomain>> map = [] {
     380        HashMap<RegistrableDomain, RegistrableDomain> map;
     381        map.add(RegistrableDomain::uncheckedCreateFromRegistrableDomainString("microsoft.com"),
     382            RegistrableDomain::uncheckedCreateFromRegistrableDomainString("microsoftonline.com"_s));
     383        return map;
     384    }();
     385    return map.get();
     386}
     387
     388bool NetworkStorageSession::loginDomainMatchesRequestingDomain(const TopFrameDomain& topFrameDomain, const SubResourceDomain& resourceDomain)
     389{
     390    auto loginDomain = WebCore::NetworkStorageSession::loginDomainForFirstParty(topFrameDomain);
     391    return loginDomain && resourceDomain == loginDomain;
     392}
     393
     394bool NetworkStorageSession::canRequestStorageAccessForLoginPurposesWithoutPriorUserInteraction(const SubResourceDomain& resourceDomain, const TopFrameDomain& topFrameDomain)
     395{
     396    return loginDomainMatchesRequestingDomain(topFrameDomain, resourceDomain);
     397}
     398
     399Optional<RegistrableDomain> NetworkStorageSession::loginDomainForFirstParty(const RegistrableDomain& topFrameDomain)
     400{
     401    auto it = storageAccessQuirks().find(topFrameDomain);
     402    if (it != storageAccessQuirks().end())
     403        return it->value;
     404    return WTF::nullopt;
     405}
     406
     407RegistrableDomain NetworkStorageSession::mapToTopDomain(const RegistrableDomain& domainToMap)
     408{
     409    static NeverDestroyed<HashMap<RegistrableDomain, RegistrableDomain>> map = [] {
     410        HashMap<RegistrableDomain, RegistrableDomain> map;
     411        map.add(RegistrableDomain::uncheckedCreateFromRegistrableDomainString("live.com"),
     412            RegistrableDomain::uncheckedCreateFromRegistrableDomainString("microsoft.com"_s));
     413        return map;
     414    }();
     415
     416    auto it = map.get().find(domainToMap);
     417    if (it != map.get().end())
     418        return it->value;
     419    return domainToMap;
     420}
     421
    354422#endif // ENABLE(RESOURCE_LOAD_STATISTICS)
    355423
  • trunk/Source/WebCore/platform/network/NetworkStorageSession.h

    r269512 r269807  
    200200    WEBCORE_EXPORT void setPrevalentDomainsToBlockButKeepCookiesFor(const Vector<RegistrableDomain>&);
    201201    WEBCORE_EXPORT void setDomainsWithUserInteractionAsFirstParty(const Vector<RegistrableDomain>&);
     202    WEBCORE_EXPORT void setDomainsWithCrossPageStorageAccess(const HashMap<TopFrameDomain, SubResourceDomain>&);
     203    WEBCORE_EXPORT void grantCrossPageStorageAccess(const TopFrameDomain&, const SubResourceDomain&);
    202204    WEBCORE_EXPORT void setAgeCapForClientSideCookies(Optional<Seconds>);
    203205    WEBCORE_EXPORT bool hasStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<FrameIdentifier>, PageIdentifier) const;
     
    213215    WEBCORE_EXPORT void resetCrossSiteLoadsWithLinkDecorationForTesting();
    214216    WEBCORE_EXPORT void setThirdPartyCookieBlockingMode(ThirdPartyCookieBlockingMode);
     217
     218    WEBCORE_EXPORT static HashMap<RegistrableDomain, RegistrableDomain>& storageAccessQuirks();
     219    WEBCORE_EXPORT static bool canRequestStorageAccessForLoginPurposesWithoutPriorUserInteraction(const SubResourceDomain&, const TopFrameDomain&);
     220    WEBCORE_EXPORT static Optional<RegistrableDomain> loginDomainForFirstParty(const RegistrableDomain&);
     221    WEBCORE_EXPORT static bool loginDomainMatchesRequestingDomain(const TopFrameDomain&, const SubResourceDomain&);
     222    WEBCORE_EXPORT static RegistrableDomain mapToTopDomain(const RegistrableDomain&);
    215223#endif
    216224   
     
    272280    HashMap<PageIdentifier, HashMap<FrameIdentifier, RegistrableDomain>> m_framesGrantedStorageAccess;
    273281    HashMap<PageIdentifier, HashMap<RegistrableDomain, RegistrableDomain>> m_pagesGrantedStorageAccess;
     282    HashMap<TopFrameDomain, SubResourceDomain> m_pairsGrantedCrossPageStorageAccess;
    274283    Optional<Seconds> m_cacheMaxAgeCapForPrevalentResources { };
    275284    Optional<Seconds> m_ageCapForClientSideCookies { };
  • trunk/Source/WebKit/ChangeLog

    r269805 r269807  
     12020-11-13  Kate Cheney  <katherine_cheney@apple.com>
     2
     3        Can't login to Microsoft Teams
     4        https://bugs.webkit.org/show_bug.cgi?id=218778
     5        <rdar://problem/36331568>
     6
     7        Reviewed by John Wilander.
     8
     9        This is a temporary quirk to assist a high-traffic website while they
     10        complete the large task of migrating away from login flows that
     11        require third party cookies. This quirk will be removed when the site
     12        is updated.
     13
     14        Create a quirk to call the Storage Access API on behalf of Microsoft.
     15
     16        * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
     17        (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess):
     18        (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal):
     19        Relax the requirement for user interaction for a specific third party
     20        needing cookies for authentication purposes.
     21
     22        (WebKit::ResourceLoadStatisticsDatabaseStore::clear):
     23        (WebKit::ResourceLoadStatisticsDatabaseStore::cookieAccess):
     24        Relax the requirement for user interaction for a specific third party
     25        needing cookies for authentication purposes.
     26
     27        (WebKit::ResourceLoadStatisticsDatabaseStore::domainsWithStorageAccess const):
     28        (WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlocking):
     29        * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
     30        * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
     31        (WebKit::ResourceLoadStatisticsMemoryStore::clear):
     32        (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
     33        * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
     34        (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessEphemeral):
     35        Relax user interaction for reasons above.
     36
     37        (WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
     38        * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
     39        (WebKit::RegistrableDomainsToBlockCookiesFor::isolatedCopy const):
     40        * Shared/WebProcessDataStoreParameters.h:
     41        (WebKit::WebProcessDataStoreParameters::encode const):
     42        (WebKit::WebProcessDataStoreParameters::decode):
     43        * UIProcess/Network/NetworkProcessProxy.cpp:
     44        (WebKit::NetworkProcessProxy::setDomainsWithCrossPageStorageAccess):
     45        * UIProcess/Network/NetworkProcessProxy.h:
     46        * UIProcess/Network/NetworkProcessProxy.messages.in:
     47        * UIProcess/WebProcessPool.cpp:
     48        (WebKit::WebProcessPool::webProcessDataStoreParameters):
     49        (WebKit::WebProcessPool::setDomainsWithCrossPageStorageAccess):
     50        * UIProcess/WebProcessPool.h:
     51        * WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:
     52        (WebKit::WebResourceLoadObserver::hasCrossPageStorageAccess const):
     53        (WebKit::WebResourceLoadObserver::setDomainsWithCrossPageStorageAccess):
     54        * WebProcess/WebCoreSupport/WebResourceLoadObserver.h:
     55        * WebProcess/WebProcess.cpp:
     56        (WebKit::WebProcess::setWebsiteDataStoreParameters):
     57        (WebKit::WebProcess::setDomainsWithCrossPageStorageAccess):
     58        Add quirk'd domains to have page level storage access to be able to
     59        use document.cookie.
     60
     61        * WebProcess/WebProcess.h:
     62        * WebProcess/WebProcess.messages.in:
     63        Forward domains with the storage access quirk to the web process to
     64        avoid an async call to the network process.
     65
    1662020-11-13  Sam Weinig  <weinig@apple.com>
    267
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp

    r268458 r269807  
    13251325        }
    13261326        ASSERT(subFrameStatus.first == AddedRecord::No);
    1327         ASSERT(hasHadUserInteraction(subFrameDomain, OperatingDatesWindow::Long));
     1327#if ASSERT_ENABLED
     1328        if (!NetworkStorageSession::canRequestStorageAccessForLoginPurposesWithoutPriorUserInteraction(subFrameDomain, topFrameDomain))
     1329            ASSERT(hasHadUserInteraction(subFrameDomain, OperatingDatesWindow::Long));
     1330#endif
    13281331        insertDomainRelationshipList(storageAccessUnderTopFrameDomainsQuery, HashSet<RegistrableDomain>({ topFrameDomain }), *subFrameStatus.second);
    13291332    }
     
    13491352        }
    13501353        ASSERT(subFrameStatus.first == AddedRecord::No);
    1351         ASSERT(hasHadUserInteraction(subFrameDomain, OperatingDatesWindow::Long));
     1354#if ASSERT_ENABLED
     1355        if (!NetworkStorageSession::canRequestStorageAccessForLoginPurposesWithoutPriorUserInteraction(subFrameDomain, topFrameDomain))
     1356            ASSERT(hasHadUserInteraction(subFrameDomain, OperatingDatesWindow::Long));
     1357#endif
    13521358        ASSERT(hasUserGrantedStorageAccessThroughPrompt(*subFrameStatus.second, topFrameDomain) == StorageAccessPromptWasShown::Yes);
    13531359#endif
     
    20042010
    20052011    auto registrableDomainsToBlockAndDeleteCookiesFor = ensurePrevalentResourcesForDebugMode();
    2006     RegistrableDomainsToBlockCookiesFor domainsToBlock { registrableDomainsToBlockAndDeleteCookiesFor, { }, { } };
     2012    RegistrableDomainsToBlockCookiesFor domainsToBlock { registrableDomainsToBlockAndDeleteCookiesFor, { }, { }, { } };
    20072013    updateCookieBlockingForDomains(domainsToBlock, [callbackAggregator] { });
    20082014}
     
    20372043        return CookieAccess::BasedOnCookiePolicy;
    20382044
    2039     if (!hadUserInteraction)
     2045    if (!NetworkStorageSession::canRequestStorageAccessForLoginPurposesWithoutPriorUserInteraction(subresourceDomain, topFrameDomain) && !hadUserInteraction)
    20402046        return CookieAccess::CannotRequest;
    20412047
     
    21042110}
    21052111
     2112HashMap<TopFrameDomain, SubResourceDomain> ResourceLoadStatisticsDatabaseStore::domainsWithStorageAccess() const
     2113{
     2114    ASSERT(!RunLoop::isMain());
     2115
     2116    HashMap<WebCore::RegistrableDomain, WebCore::RegistrableDomain> results;
     2117    SQLiteStatement statement(m_database, "SELECT subFrameDomain, registrableDomain FROM (SELECT o.registrableDomain as subFrameDomain, s.topLevelDomainID as topLevelDomainID FROM ObservedDomains as o INNER JOIN StorageAccessUnderTopFrameDomains as s WHERE o.domainID = s.domainID) as z INNER JOIN ObservedDomains ON domainID = z.topLevelDomainID;"_s);
     2118
     2119    if (statement.prepare() != SQLITE_OK)
     2120        return results;
     2121
     2122    while (statement.step() == SQLITE_ROW)
     2123        results.add(RegistrableDomain::uncheckedCreateFromRegistrableDomainString(statement.getColumnText(1)), RegistrableDomain::uncheckedCreateFromRegistrableDomainString(statement.getColumnText(0)));
     2124
     2125    return results;
     2126}
     2127
    21062128void ResourceLoadStatisticsDatabaseStore::updateCookieBlocking(CompletionHandler<void()>&& completionHandler)
    21072129{
     
    21112133    auto domainsToBlockButKeepCookiesFor = this->domainsToBlockButKeepCookiesFor();
    21122134    auto domainsWithUserInteractionAsFirstParty = this->domainsWithUserInteractionAsFirstParty();
    2113 
    2114     if (domainsToBlockAndDeleteCookiesFor.isEmpty() && domainsToBlockButKeepCookiesFor.isEmpty() && domainsWithUserInteractionAsFirstParty.isEmpty()) {
     2135    auto domainsWithStorageAccess = this->domainsWithStorageAccess();
     2136
     2137    if (domainsToBlockAndDeleteCookiesFor.isEmpty() && domainsToBlockButKeepCookiesFor.isEmpty() && domainsWithUserInteractionAsFirstParty.isEmpty() && domainsWithStorageAccess.isEmpty()) {
    21152138        completionHandler();
    21162139        return;
    21172140    }
    21182141
    2119     RegistrableDomainsToBlockCookiesFor domainsToBlock { domainsToBlockAndDeleteCookiesFor, domainsToBlockButKeepCookiesFor, domainsWithUserInteractionAsFirstParty };
     2142    RegistrableDomainsToBlockCookiesFor domainsToBlock { domainsToBlockAndDeleteCookiesFor, domainsToBlockButKeepCookiesFor, domainsWithUserInteractionAsFirstParty, domainsWithStorageAccess };
    21202143
    21212144    if (debugLoggingEnabled() && (!domainsToBlockAndDeleteCookiesFor.isEmpty() || !domainsToBlockButKeepCookiesFor.isEmpty()))
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h

    r268458 r269807  
    160160    Vector<RegistrableDomain> domainsToBlockButKeepCookiesFor() const;
    161161    Vector<RegistrableDomain> domainsWithUserInteractionAsFirstParty() const;
     162    HashMap<TopFrameDomain, SubResourceDomain> domainsWithStorageAccess() const;
    162163
    163164    struct DomainData {
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp

    r268458 r269807  
    786786
    787787    auto registrableDomainsToBlockAndDeleteCookiesFor = ensurePrevalentResourcesForDebugMode();
    788     RegistrableDomainsToBlockCookiesFor domainsToBlock { registrableDomainsToBlockAndDeleteCookiesFor, { }, { } };
     788    RegistrableDomainsToBlockCookiesFor domainsToBlock { registrableDomainsToBlockAndDeleteCookiesFor, { }, { }, { }};
    789789    updateCookieBlockingForDomains(domainsToBlock, [callbackAggregator] { });
    790790}
     
    839839    }
    840840
    841     RegistrableDomainsToBlockCookiesFor domainsToBlock { domainsToBlockAndDeleteCookiesFor, domainsToBlockButKeepCookiesFor, domainsWithUserInteractionAsFirstParty };
     841    RegistrableDomainsToBlockCookiesFor domainsToBlock { domainsToBlockAndDeleteCookiesFor, domainsToBlockButKeepCookiesFor, domainsWithUserInteractionAsFirstParty, { } };
    842842
    843843    if (debugLoggingEnabled() && (!domainsToBlockAndDeleteCookiesFor.isEmpty() || !domainsToBlockButKeepCookiesFor.isEmpty()))
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp

    r268458 r269807  
    471471    ASSERT(isEphemeral());
    472472
    473     if (!m_networkSession || !m_domainsWithEphemeralUserInteraction.contains(subFrameDomain))
     473    if (!m_networkSession || (!m_domainsWithEphemeralUserInteraction.contains(subFrameDomain) && !NetworkStorageSession::canRequestStorageAccessForLoginPurposesWithoutPriorUserInteraction(subFrameDomain, topFrameDomain)))
    474474        return completionHandler({ StorageAccessWasGranted::No, StorageAccessPromptWasShown::No, scope, topFrameDomain, subFrameDomain });
    475475
     
    12581258            m_networkSession->networkProcess().parentProcessConnection()->send(Messages::NetworkProcessProxy::SetDomainsWithUserInteraction(domainsWithUserInteractionQuirk), 0);
    12591259        }
     1260
     1261        HashMap<TopFrameDomain, SubResourceDomain> domainsWithStorageAccessQuirk;
     1262        for (auto& firstPartyDomain : domainsToBlock.domainsWithStorageAccess.keys()) {
     1263            auto requestingDomain = domainsToBlock.domainsWithStorageAccess.get(firstPartyDomain);
     1264            if (NetworkStorageSession::loginDomainMatchesRequestingDomain(firstPartyDomain, requestingDomain))
     1265                domainsWithStorageAccessQuirk.add(firstPartyDomain, requestingDomain);
     1266        }
     1267
     1268        if (m_domainsWithCrossPageStorageAccessQuirk != domainsWithStorageAccessQuirk) {
     1269            if (m_networkSession) {
     1270                if (auto* storageSession = m_networkSession->networkStorageSession())
     1271                    storageSession->setDomainsWithCrossPageStorageAccess(domainsWithStorageAccessQuirk);
     1272                m_networkSession->networkProcess().parentProcessConnection()->sendWithAsyncReply(Messages::NetworkProcessProxy::SetDomainsWithCrossPageStorageAccess(domainsWithStorageAccessQuirk), [this, domainsWithStorageAccessQuirk] () mutable {
     1273                    m_domainsWithCrossPageStorageAccessQuirk = domainsWithStorageAccessQuirk;
     1274                });
     1275            }
     1276        }
    12601277    }
    12611278
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h

    r268458 r269807  
    6969enum class ShouldIncludeLocalhost : bool { No, Yes };
    7070enum class EnableResourceLoadStatisticsDebugMode : bool { No, Yes };
     71
     72using TopFrameDomain = WebCore::RegistrableDomain;
     73using SubResourceDomain = WebCore::RegistrableDomain;
     74
    7175struct RegistrableDomainsToBlockCookiesFor {
    7276    Vector<WebCore::RegistrableDomain> domainsToBlockAndDeleteCookiesFor;
    7377    Vector<WebCore::RegistrableDomain> domainsToBlockButKeepCookiesFor;
    7478    Vector<WebCore::RegistrableDomain> domainsWithUserInteractionAsFirstParty;
    75     RegistrableDomainsToBlockCookiesFor isolatedCopy() const { return { domainsToBlockAndDeleteCookiesFor.isolatedCopy(), domainsToBlockButKeepCookiesFor.isolatedCopy(), domainsWithUserInteractionAsFirstParty.isolatedCopy() }; }
     79    HashMap<TopFrameDomain, SubResourceDomain> domainsWithStorageAccess;
     80    RegistrableDomainsToBlockCookiesFor isolatedCopy() const { return { domainsToBlockAndDeleteCookiesFor.isolatedCopy(), domainsToBlockButKeepCookiesFor.isolatedCopy(), domainsWithUserInteractionAsFirstParty.isolatedCopy(), domainsWithStorageAccess }; }
    7681};
    7782struct RegistrableDomainsToDeleteOrRestrictWebsiteDataFor {
     
    331336
    332337    HashSet<RegistrableDomain> m_domainsWithUserInteractionQuirk;
     338    HashMap<TopFrameDomain, SubResourceDomain> m_domainsWithCrossPageStorageAccessQuirk;
    333339
    334340    bool m_hasScheduledProcessStats { false };
  • trunk/Source/WebKit/Shared/WebProcessDataStoreParameters.h

    r269785 r269807  
    3434
    3535struct WebProcessDataStoreParameters {
     36    using TopFrameDomain = WebCore::RegistrableDomain;
     37    using SubResourceDomain = WebCore::RegistrableDomain;
     38
    3639    PAL::SessionID sessionID;
    3740    String applicationCacheDirectory;
     
    4952    WebCore::ThirdPartyCookieBlockingMode thirdPartyCookieBlockingMode { WebCore::ThirdPartyCookieBlockingMode::All };
    5053    HashSet<WebCore::RegistrableDomain> domainsWithUserInteraction;
     54    HashMap<TopFrameDomain, SubResourceDomain> domainsWithStorageAccessQuirk;
     55
    5156#endif
    5257    bool resourceLoadStatisticsEnabled { false };
     
    7479    encoder << thirdPartyCookieBlockingMode;
    7580    encoder << domainsWithUserInteraction;
     81    encoder << domainsWithStorageAccessQuirk;
    7682#endif
    7783    encoder << resourceLoadStatisticsEnabled;
     
    145151    if (!domainsWithUserInteraction)
    146152        return WTF::nullopt;
     153   
     154    Optional<HashMap<TopFrameDomain, SubResourceDomain>> domainsWithStorageAccessQuirk;
     155    decoder >> domainsWithStorageAccessQuirk;
     156    if (!domainsWithStorageAccessQuirk)
     157        return WTF::nullopt;
    147158#endif
    148159
     
    167178        *thirdPartyCookieBlockingMode,
    168179        WTFMove(*domainsWithUserInteraction),
     180        WTFMove(*domainsWithStorageAccessQuirk),
    169181#endif
    170182        resourceLoadStatisticsEnabled
  • trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp

    r269712 r269807  
    12661266    sendWithAsyncReply(Messages::NetworkProcess::SetThirdPartyCNAMEDomainForTesting(sessionID, domain), WTFMove(completionHandler));
    12671267}
     1268
    12681269void NetworkProcessProxy::setDomainsWithUserInteraction(HashSet<WebCore::RegistrableDomain>&& domains)
    12691270{
     
    12711272        processPool->setDomainsWithUserInteraction(HashSet<WebCore::RegistrableDomain> { domains });
    12721273}
     1274
     1275void NetworkProcessProxy::setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubResourceDomain>&& domains, CompletionHandler<void()>&& completionHandler)
     1276{   
     1277    auto callbackAggregator = CallbackAggregator::create(WTFMove(completionHandler));
     1278   
     1279    for (auto* processPool : WebProcessPool::allProcessPools())
     1280        processPool->setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubResourceDomain> { domains }, [callbackAggregator] { });
     1281}
     1282
    12731283#endif // ENABLE(RESOURCE_LOAD_STATISTICS)
    12741284
  • trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h

    r269712 r269807  
    201201    void setThirdPartyCNAMEDomainForTesting(PAL::SessionID, const WebCore::RegistrableDomain&, CompletionHandler<void()>&&);
    202202    void setDomainsWithUserInteraction(HashSet<WebCore::RegistrableDomain>&&);
     203    void setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubResourceDomain>&&, CompletionHandler<void()>&&);
    203204#endif
    204205
  • trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in

    r268458 r269807  
    4949    DidCommitCrossSiteLoadWithDataTransferFromPrevalentResource(WebKit::WebPageProxyIdentifier pageID)
    5050    SetDomainsWithUserInteraction(HashSet<WebCore::RegistrableDomain> domains)
     51    SetDomainsWithCrossPageStorageAccess(HashMap<WebCore::RegistrableDomain, WebCore::RegistrableDomain> domains) -> () Async
    5152#endif
    5253#if ENABLE(CONTENT_EXTENSIONS)
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r269785 r269807  
    757757        websiteDataStore.thirdPartyCookieBlockingMode(),
    758758        m_domainsWithUserInteraction,
     759        m_domainsWithCrossPageStorageAccessQuirk,
    759760#endif
    760761        websiteDataStore.resourceLoadStatisticsEnabled()
     
    19561957}
    19571958
     1959void WebProcessPool::setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubResourceDomain>&& domains, CompletionHandler<void()>&& completionHandler)
     1960{   
     1961    auto callbackAggregator = CallbackAggregator::create(WTFMove(completionHandler));
     1962
     1963    for (auto& process : processes())
     1964        process->sendWithAsyncReply(Messages::WebProcess::SetDomainsWithCrossPageStorageAccess(domains), [callbackAggregator] { });
     1965
     1966    for (auto& topDomain : domains.keys())
     1967        m_domainsWithCrossPageStorageAccessQuirk.add(topDomain, domains.get(topDomain));
     1968}
     1969
    19581970void WebProcessPool::seedResourceLoadStatisticsForTesting(const RegistrableDomain& firstPartyDomain, const RegistrableDomain& thirdPartyDomain, bool shouldScheduleNotification, CompletionHandler<void()>&& completionHandler)
    19591971{
  • trunk/Source/WebKit/UIProcess/WebProcessPool.h

    r269785 r269807  
    455455#if ENABLE(RESOURCE_LOAD_STATISTICS)
    456456    void setDomainsWithUserInteraction(HashSet<WebCore::RegistrableDomain>&&);
     457    void setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubResourceDomain>&&, CompletionHandler<void()>&&);
    457458    void seedResourceLoadStatisticsForTesting(const WebCore::RegistrableDomain& firstPartyDomain, const WebCore::RegistrableDomain& thirdPartyDomain, bool shouldScheduleNotification, CompletionHandler<void()>&&);
    458459    void sendResourceLoadStatisticsDataImmediately(CompletionHandler<void()>&&);
     
    764765#if ENABLE(RESOURCE_LOAD_STATISTICS)
    765766    HashSet<WebCore::RegistrableDomain> m_domainsWithUserInteraction;
     767    HashMap<TopFrameDomain, SubResourceDomain> m_domainsWithCrossPageStorageAccessQuirk;
    766768#endif
    767769};
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp

    r266214 r269807  
    419419}
    420420
     421bool WebResourceLoadObserver::hasCrossPageStorageAccess(const SubFrameDomain& subDomain, const TopFrameDomain& topDomain) const
     422{
     423    auto it = m_domainsWithCrossPageStorageAccess.find(topDomain);
     424
     425    if (it != m_domainsWithCrossPageStorageAccess.end())
     426        return it->value == subDomain;
     427
     428    return false;
     429}
     430
     431void WebResourceLoadObserver::setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubFrameDomain>&& domains, CompletionHandler<void()>&& completionHandler)
     432{
     433    for (auto& topDomain : domains.keys())
     434        m_domainsWithCrossPageStorageAccess.add(topDomain, domains.get(topDomain));
     435
     436    completionHandler();
     437}
     438
    421439} // namespace WebKit
    422440
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.h

    r266214 r269807  
    4040class WebResourceLoadObserver final : public WebCore::ResourceLoadObserver {
    4141public:
     42    using TopFrameDomain = WebCore::RegistrableDomain;
     43    using SubFrameDomain = WebCore::RegistrableDomain;
     44
    4245    WebResourceLoadObserver(WebCore::ResourceLoadStatistics::IsEphemeral);
    4346    ~WebResourceLoadObserver();
     
    6467
    6568    void setDomainsWithUserInteraction(HashSet<WebCore::RegistrableDomain>&& domains) final { m_domainsWithUserInteraction = WTFMove(domains); }
     69    void setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubFrameDomain>&&, CompletionHandler<void()>&&) final;
    6670    bool hasHadUserInteraction(const WebCore::RegistrableDomain&) const final;
     71    bool hasCrossPageStorageAccess(const SubFrameDomain&, const TopFrameDomain&) const final;
     72
    6773private:
    6874    WebCore::ResourceLoadStatistics& ensureResourceStatisticsForRegistrableDomain(const WebCore::RegistrableDomain&);
     
    8288
    8389    HashSet<WebCore::RegistrableDomain> m_domainsWithUserInteraction;
     90    HashMap<TopFrameDomain, SubFrameDomain> m_domainsWithCrossPageStorageAccess;
    8491#if !RELEASE_LOG_DISABLED
    8592    uint64_t m_loggingCounter { 0 };
  • trunk/Source/WebKit/WebProcess/WebProcess.cpp

    r269785 r269807  
    522522            ResourceLoadObserver::setShared(*new WebResourceLoadObserver(parameters.sessionID.isEphemeral() ? WebCore::ResourceLoadStatistics::IsEphemeral::Yes : WebCore::ResourceLoadStatistics::IsEphemeral::No));
    523523        ResourceLoadObserver::shared().setDomainsWithUserInteraction(WTFMove(parameters.domainsWithUserInteraction));
     524        if (!parameters.sessionID.isEphemeral())
     525            ResourceLoadObserver::shared().setDomainsWithCrossPageStorageAccess(WTFMove(parameters.domainsWithStorageAccessQuirk), [] { });
    524526    }
    525527   
     
    18661868}
    18671869
     1870void WebProcess::setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubResourceDomain>&& domains, CompletionHandler<void()>&& completionHandler)
     1871{
     1872    for (auto& domain : domains.keys()) {
     1873        for (auto& webPage : m_pageMap.values())
     1874            webPage->addDomainWithPageLevelStorageAccess(domain, domains.get(domain));
     1875    }
     1876    ResourceLoadObserver::shared().setDomainsWithCrossPageStorageAccess(WTFMove(domains), WTFMove(completionHandler));
     1877}
     1878
    18681879void WebProcess::sendResourceLoadStatisticsDataImmediately(CompletionHandler<void()>&& completionHandler)
    18691880{
  • trunk/Source/WebKit/WebProcess/WebProcess.h

    r269785 r269807  
    147147    WTF_MAKE_FAST_ALLOCATED;
    148148public:
     149    using TopFrameDomain = WebCore::RegistrableDomain;
     150    using SubResourceDomain = WebCore::RegistrableDomain;
     151
    149152    static WebProcess& singleton();
    150153    static constexpr ProcessType processType = ProcessType::WebContent;
     
    488491    void setThirdPartyCookieBlockingMode(WebCore::ThirdPartyCookieBlockingMode, CompletionHandler<void()>&&);
    489492    void setDomainsWithUserInteraction(HashSet<WebCore::RegistrableDomain>&&);
     493    void setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubResourceDomain>&&, CompletionHandler<void()>&&);
    490494    void sendResourceLoadStatisticsDataImmediately(CompletionHandler<void()>&&);
    491495#endif
  • trunk/Source/WebKit/WebProcess/WebProcess.messages.in

    r269785 r269807  
    159159    SetThirdPartyCookieBlockingMode(enum:uint8_t WebCore::ThirdPartyCookieBlockingMode blockingMode) -> () Async
    160160    SetDomainsWithUserInteraction(HashSet<WebCore::RegistrableDomain> domains)
     161    SetDomainsWithCrossPageStorageAccess(HashMap<WebCore::RegistrableDomain, WebCore::RegistrableDomain> domains) -> () Async
    161162    SendResourceLoadStatisticsDataImmediately() -> () Async
    162163#endif
Note: See TracChangeset for help on using the changeset viewer.