Title: [274825] branches/safari-611.1.21.0-branch/Source

Diff

Modified: branches/safari-611.1.21.0-branch/Source/WebCore/ChangeLog (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebCore/ChangeLog	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebCore/ChangeLog	2021-03-23 00:20:51 UTC (rev 274825)
@@ -1,133 +1,3 @@
-2021-03-22  Russell Epstein  <[email protected]>
-
-        Cherry-pick r274746. rdar://problem/75706601
-
-    Cannot login to microsoftonline.com without allowing storage access
-    https://bugs.webkit.org/show_bug.cgi?id=223510
-    <rdar://problem/75619058>
-    
-    Reviewed by John Wilander.
-    
-    Source/WebCore:
-    
-    This patch introduces two changes:
-    
-    1. Activate the storage access quirks for default browsers only. This
-    is the main place we test them, and can lead to unexpected behavior in
-    apps otherwise.
-    
-    2. Doesn't cancel the click even if the user denies storage access.
-    Previously we we were not allowing the click because it produces
-    unexpected behavior. But, sites like login.microsoftonline.com are used
-    by multiple Microsoft login flows. Since only a subset require storage
-    access, canceling the click across the board could be considered
-    regressing behavior.
-    
-    Since storage access data is stored in the network process, we
-    currently cancel the user's click on quirked sites while we wait
-    asyncronously for the IPC response. If the user grants storage access,
-    we store this in the web content process and dispatch a synthetic
-    click. In this case, when the click triggers another storage access
-    check, we can allow the click because we no longer need to wait for
-    information from the network process.
-    
-    We need some heuristic in the web content process to handle the case
-    of the user denying storage access to know whether to allow a
-    synthetic click to happen. This patch introduces
-    hasDeniedCrossPageStorageAccess which stores domains in the web
-    content process which have been denied storage access via quirk. If
-    a user has previously denied storage access in that web content
-    process, we don't prompt again. A new web content process will give them
-    another opportunity to allow/deny storage access.
-    
-    * dom/Element.cpp:
-    (WebCore::Element::dispatchMouseEvent):
-    * loader/FrameLoaderClient.h:
-    Add a client function to check if the parent process is a full web
-    browser, and pass this to the place we apply the quirks.
-    
-    * loader/ResourceLoadObserver.h:
-    (WebCore::ResourceLoadObserver::setHasDeniedCrossPageStorageAccess):
-    (WebCore::ResourceLoadObserver::hasDeniedCrossPageStorageAccess const):
-    * page/Quirks.cpp:
-    (WebCore::hasDeniedCrossPageStorageAccess):
-    (WebCore::Quirks::requestStorageAccessAndHandleClick const):
-    (WebCore::Quirks::triggerOptionalStorageAccessQuirk const):
-    * page/Quirks.h:
-    
-    Source/WebKit:
-    
-    Disable the storage access quirk for non-default web browsers and
-    don't cancel the login click on sites even if the user denies storage
-    access. See WebCore changelog for more details.
-    
-    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
-    (WebKit::WebFrameLoaderClient::isParentProcessAFullWebBrowser const):
-    * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
-    * WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:
-    (WebKit::WebResourceLoadObserver::hasDeniedCrossPageStorageAccess const):
-    (WebKit::WebResourceLoadObserver::setHasDeniedCrossPageStorageAccess):
-    * WebProcess/WebCoreSupport/WebResourceLoadObserver.h:
-    * WebProcess/WebPage/WebPage.cpp:
-    (WebKit::WebPage::pageIsParentProcessAFullWebBrowser):
-    (WebKit::WebPage::updatePreferences):
-    * WebProcess/WebPage/WebPage.h:
-    
-    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
-    2021-03-19  Kate Cheney  <[email protected]>
-
-            Cannot login to microsoftonline.com without allowing storage access
-            https://bugs.webkit.org/show_bug.cgi?id=223510
-            <rdar://problem/75619058>
-
-            Reviewed by John Wilander.
-
-            This patch introduces two changes:
-
-            1. Activate the storage access quirks for default browsers only. This
-            is the main place we test them, and can lead to unexpected behavior in
-            apps otherwise.
-
-            2. Doesn't cancel the click even if the user denies storage access.
-            Previously we we were not allowing the click because it produces
-            unexpected behavior. But, sites like login.microsoftonline.com are used
-            by multiple Microsoft login flows. Since only a subset require storage
-            access, canceling the click across the board could be considered
-            regressing behavior.
-
-            Since storage access data is stored in the network process, we
-            currently cancel the user's click on quirked sites while we wait
-            asyncronously for the IPC response. If the user grants storage access,
-            we store this in the web content process and dispatch a synthetic
-            click. In this case, when the click triggers another storage access
-            check, we can allow the click because we no longer need to wait for
-            information from the network process.
-
-            We need some heuristic in the web content process to handle the case
-            of the user denying storage access to know whether to allow a
-            synthetic click to happen. This patch introduces
-            hasDeniedCrossPageStorageAccess which stores domains in the web
-            content process which have been denied storage access via quirk. If
-            a user has previously denied storage access in that web content
-            process, we don't prompt again. A new web content process will give them
-            another opportunity to allow/deny storage access.
-
-            * dom/Element.cpp:
-            (WebCore::Element::dispatchMouseEvent):
-            * loader/FrameLoaderClient.h:
-            Add a client function to check if the parent process is a full web
-            browser, and pass this to the place we apply the quirks.
-
-            * loader/ResourceLoadObserver.h:
-            (WebCore::ResourceLoadObserver::setHasDeniedCrossPageStorageAccess):
-            (WebCore::ResourceLoadObserver::hasDeniedCrossPageStorageAccess const):
-            * page/Quirks.cpp:
-            (WebCore::hasDeniedCrossPageStorageAccess):
-            (WebCore::Quirks::requestStorageAccessAndHandleClick const):
-            (WebCore::Quirks::triggerOptionalStorageAccessQuirk const):
-            * page/Quirks.h:
-
 2021-03-17  Ruben Turcios  <[email protected]>
 
         Cherry-pick r274573. rdar://problem/75538213

Modified: branches/safari-611.1.21.0-branch/Source/WebCore/dom/Element.cpp (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebCore/dom/Element.cpp	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebCore/dom/Element.cpp	2021-03-23 00:20:51 UTC (rev 274825)
@@ -389,15 +389,8 @@
 
     if (dispatchPointerEventIfNeeded(*this, mouseEvent.get(), platformEvent, didNotSwallowEvent) == ShouldIgnoreMouseEvent::Yes)
         return false;
-    
-    auto isParentProcessAFullWebBrowser = false;
-#if PLATFORM(IOS_FAMILY)
-    if (Frame* frame = document().frame())
-        isParentProcessAFullWebBrowser = frame->loader().client().isParentProcessAFullWebBrowser();
-#elif PLATFORM(MAC)
-    isParentProcessAFullWebBrowser = MacApplication::isSafari();
-#endif
-    if (Quirks::StorageAccessResult::ShouldCancelEvent == document().quirks().triggerOptionalStorageAccessQuirk(*this, platformEvent, eventType, detail, relatedTarget, isParentProcessAFullWebBrowser))
+
+    if (Quirks::StorageAccessResult::ShouldCancelEvent == document().quirks().triggerOptionalStorageAccessQuirk(*this, platformEvent, eventType, detail, relatedTarget))
         return false;
 
     ASSERT(!mouseEvent->target() || mouseEvent->target() != relatedTarget);

Modified: branches/safari-611.1.21.0-branch/Source/WebCore/loader/FrameLoaderClient.h (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebCore/loader/FrameLoaderClient.h	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebCore/loader/FrameLoaderClient.h	2021-03-23 00:20:51 UTC (rev 274825)
@@ -381,8 +381,6 @@
     virtual bool shouldEnableInAppBrowserPrivacyProtections() const { return false; }
     virtual void notifyPageOfAppBoundBehavior() { }
 #endif
-    
-    virtual bool isParentProcessAFullWebBrowser() const { return false; }
 };
 
 } // namespace WebCore

Modified: branches/safari-611.1.21.0-branch/Source/WebCore/loader/ResourceLoadObserver.h (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebCore/loader/ResourceLoadObserver.h	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebCore/loader/ResourceLoadObserver.h	2021-03-23 00:20:51 UTC (rev 274825)
@@ -71,9 +71,6 @@
     virtual void setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubResourceDomain>&&, CompletionHandler<void()>&& completionHandler) { completionHandler(); }
     virtual bool hasCrossPageStorageAccess(const SubResourceDomain&, const TopFrameDomain&) const { return false; }
     virtual bool hasHadUserInteraction(const RegistrableDomain&) const { return false; }
-    
-    virtual void setHasDeniedCrossPageStorageAccess(HashMap<TopFrameDomain, SubResourceDomain>&&, CompletionHandler<void()>&& completionHandler) { completionHandler(); }
-    virtual bool hasDeniedCrossPageStorageAccess(const SubResourceDomain&, const TopFrameDomain&) const { return false; }
 };
     
 } // namespace WebCore

Modified: branches/safari-611.1.21.0-branch/Source/WebCore/page/Quirks.cpp (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebCore/page/Quirks.cpp	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebCore/page/Quirks.cpp	2021-03-23 00:20:51 UTC (rev 274825)
@@ -1033,15 +1033,6 @@
     return true;
 }
 
-static bool hasDeniedCrossPageStorageAccess(const HashSet<RegistrableDomain>& loginDomains, const RegistrableDomain& topFrameDomain)
-{
-    for (auto& loginDomain : loginDomains) {
-        if (ResourceLoadObserver::shared().hasDeniedCrossPageStorageAccess(loginDomain, topFrameDomain))
-            return true;
-    }
-    return false;
-}
-
 const String& Quirks::BBCRadioPlayerURLString()
 {
     static NeverDestroyed<String> BBCRadioPlayerURLString = "https://www.bbc.co.uk/sounds/player/bbc_world_service"_s;
@@ -1069,17 +1060,16 @@
     return element.parentElement()->classNames().contains("p_audioButton_buttonInner") && parentElement->parentElement()->classNames().contains("hidden");
 }
 
-Quirks::StorageAccessResult Quirks::requestStorageAccessAndHandleClick(CompletionHandler<void(ShouldDispatchClick)>&& completionHandler) const
+Quirks::StorageAccessResult Quirks::requestStorageAccessAndHandleClick(CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) const
 {
     auto firstPartyDomain = mapToTopDomain(m_document->topDocument().url());
     auto domainsInNeedOfStorageAccess = NetworkStorageSession::subResourceDomainsInNeedOfStorageAccessForFirstParty(firstPartyDomain);
     if (!domainsInNeedOfStorageAccess || domainsInNeedOfStorageAccess.value().isEmpty()) {
-        completionHandler(ShouldDispatchClick::No);
+        completionHandler(StorageAccessWasGranted::No);
         return Quirks::StorageAccessResult::ShouldNotCancelEvent;
     }
-    if (hasStorageAccessForAllLoginDomains(*domainsInNeedOfStorageAccess, firstPartyDomain)
-        || hasDeniedCrossPageStorageAccess(*domainsInNeedOfStorageAccess, firstPartyDomain)) {
-        completionHandler(ShouldDispatchClick::No);
+    if (hasStorageAccessForAllLoginDomains(*domainsInNeedOfStorageAccess, firstPartyDomain)) {
+        completionHandler(StorageAccessWasGranted::No);
         return Quirks::StorageAccessResult::ShouldNotCancelEvent;
     }
 
@@ -1086,20 +1076,18 @@
     auto domainInNeedOfStorageAccess = RegistrableDomain(*domainsInNeedOfStorageAccess.value().begin().get());
 
     if (!m_document) {
-        completionHandler(ShouldDispatchClick::No);
+        completionHandler(StorageAccessWasGranted::No);
         return Quirks::StorageAccessResult::ShouldNotCancelEvent;
     }
 
     DocumentStorageAccess::requestStorageAccessForNonDocumentQuirk(*m_document, WTFMove(domainInNeedOfStorageAccess), [firstPartyDomain, domainInNeedOfStorageAccess, completionHandler = WTFMove(completionHandler)](StorageAccessWasGranted storageAccessGranted) mutable {
         if (storageAccessGranted == StorageAccessWasGranted::No) {
-            ResourceLoadObserver::shared().setHasDeniedCrossPageStorageAccess({{ firstPartyDomain, domainInNeedOfStorageAccess }}, [completionHandler = WTFMove(completionHandler)] () mutable {
-                completionHandler(ShouldDispatchClick::Yes);
-            });
+            completionHandler(storageAccessGranted);
             return;
         }
 
-        ResourceLoadObserver::shared().setDomainsWithCrossPageStorageAccess({{ firstPartyDomain, domainInNeedOfStorageAccess }}, [completionHandler = WTFMove(completionHandler)] () mutable {
-            completionHandler(ShouldDispatchClick::Yes);
+        ResourceLoadObserver::shared().setDomainsWithCrossPageStorageAccess({{ firstPartyDomain, domainInNeedOfStorageAccess }}, [storageAccessGranted, completionHandler = WTFMove(completionHandler)] () mutable {
+            completionHandler(storageAccessGranted);
         });
     });
     return Quirks::StorageAccessResult::ShouldCancelEvent;
@@ -1114,9 +1102,9 @@
 }
 #endif
 
-Quirks::StorageAccessResult Quirks::triggerOptionalStorageAccessQuirk(Element& element, const PlatformMouseEvent& platformEvent, const AtomString& eventType, int detail, Element* relatedTarget, bool isParentProcessAFullWebBrowser) const
+Quirks::StorageAccessResult Quirks::triggerOptionalStorageAccessQuirk(Element& element, const PlatformMouseEvent& platformEvent, const AtomString& eventType, int detail, Element* relatedTarget) const
 {
-    if (!DeprecatedGlobalSettings::resourceLoadStatisticsEnabled() || !isParentProcessAFullWebBrowser)
+    if (!DeprecatedGlobalSettings::resourceLoadStatisticsEnabled())
         return Quirks::StorageAccessResult::ShouldNotCancelEvent;
 
 #if ENABLE(RESOURCE_LOAD_STATISTICS)
@@ -1191,11 +1179,11 @@
         }
 
         if (isStorageAccessQuirkDomainAndElement(m_document->url(), element)) {
-            return requestStorageAccessAndHandleClick([element = makeWeakPtr(element), platformEvent, eventType, detail, relatedTarget] (ShouldDispatchClick shouldDispatchClick) mutable {
+            return requestStorageAccessAndHandleClick([element = makeWeakPtr(element), platformEvent, eventType, detail, relatedTarget] (StorageAccessWasGranted storageAccessWasGranted) mutable {
                 if (!element)
                     return;
 
-                if (shouldDispatchClick == ShouldDispatchClick::Yes)
+                if (storageAccessWasGranted == StorageAccessWasGranted::Yes)
                     element->dispatchMouseEvent(platformEvent, eventType, detail, relatedTarget);
             });
         }
@@ -1205,8 +1193,8 @@
 
         // BBC RadioPlayer case.
         if (isBBCDomain(domain) && isBBCPopUpPlayerElement(element)) {
-            return requestStorageAccessAndHandleClick([document = m_document] (ShouldDispatchClick shouldDispatchClick) mutable {
-                if (!document || shouldDispatchClick == ShouldDispatchClick::No)
+            return requestStorageAccessAndHandleClick([document = m_document] (StorageAccessWasGranted storageAccessWasGranted) mutable {
+                if (!document || storageAccessWasGranted == StorageAccessWasGranted::No)
                     return;
 
                 auto domWindow = document->domWindow();

Modified: branches/safari-611.1.21.0-branch/Source/WebCore/page/Quirks.h (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebCore/page/Quirks.h	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebCore/page/Quirks.h	2021-03-23 00:20:51 UTC (rev 274825)
@@ -115,8 +115,7 @@
     bool shouldAvoidPastingImagesAsWebContent() const;
 
     enum StorageAccessResult : bool { ShouldNotCancelEvent, ShouldCancelEvent };
-    enum ShouldDispatchClick : bool { No, Yes };
-    StorageAccessResult triggerOptionalStorageAccessQuirk(Element&, const PlatformMouseEvent&, const AtomString& eventType, int, Element*, bool isParentProcessAFullWebBrowser) const;
+    StorageAccessResult triggerOptionalStorageAccessQuirk(Element&, const PlatformMouseEvent&, const AtomString& eventType, int, Element*) const;
 
     bool needsVP9FullRangeFlagQuirk() const;
     bool needsHDRPixelDepthQuirk() const;
@@ -137,7 +136,7 @@
     static bool hasStorageAccessForAllLoginDomains(const HashSet<RegistrableDomain>&, const RegistrableDomain&);
     static const String& BBCRadioPlayerURLString();
     WEBCORE_EXPORT static const String& staticRadioPlayerURLString();
-    StorageAccessResult requestStorageAccessAndHandleClick(CompletionHandler<void(ShouldDispatchClick)>&&) const;
+    StorageAccessResult requestStorageAccessAndHandleClick(CompletionHandler<void(StorageAccessWasGranted)>&&) const;
     static RegistrableDomain mapToTopDomain(const URL&);
 #endif
 

Modified: branches/safari-611.1.21.0-branch/Source/WebKit/ChangeLog (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebKit/ChangeLog	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebKit/ChangeLog	2021-03-23 00:20:51 UTC (rev 274825)
@@ -1,104 +1,3 @@
-2021-03-22  Russell Epstein  <[email protected]>
-
-        Cherry-pick r274746. rdar://problem/75706601
-
-    Cannot login to microsoftonline.com without allowing storage access
-    https://bugs.webkit.org/show_bug.cgi?id=223510
-    <rdar://problem/75619058>
-    
-    Reviewed by John Wilander.
-    
-    Source/WebCore:
-    
-    This patch introduces two changes:
-    
-    1. Activate the storage access quirks for default browsers only. This
-    is the main place we test them, and can lead to unexpected behavior in
-    apps otherwise.
-    
-    2. Doesn't cancel the click even if the user denies storage access.
-    Previously we we were not allowing the click because it produces
-    unexpected behavior. But, sites like login.microsoftonline.com are used
-    by multiple Microsoft login flows. Since only a subset require storage
-    access, canceling the click across the board could be considered
-    regressing behavior.
-    
-    Since storage access data is stored in the network process, we
-    currently cancel the user's click on quirked sites while we wait
-    asyncronously for the IPC response. If the user grants storage access,
-    we store this in the web content process and dispatch a synthetic
-    click. In this case, when the click triggers another storage access
-    check, we can allow the click because we no longer need to wait for
-    information from the network process.
-    
-    We need some heuristic in the web content process to handle the case
-    of the user denying storage access to know whether to allow a
-    synthetic click to happen. This patch introduces
-    hasDeniedCrossPageStorageAccess which stores domains in the web
-    content process which have been denied storage access via quirk. If
-    a user has previously denied storage access in that web content
-    process, we don't prompt again. A new web content process will give them
-    another opportunity to allow/deny storage access.
-    
-    * dom/Element.cpp:
-    (WebCore::Element::dispatchMouseEvent):
-    * loader/FrameLoaderClient.h:
-    Add a client function to check if the parent process is a full web
-    browser, and pass this to the place we apply the quirks.
-    
-    * loader/ResourceLoadObserver.h:
-    (WebCore::ResourceLoadObserver::setHasDeniedCrossPageStorageAccess):
-    (WebCore::ResourceLoadObserver::hasDeniedCrossPageStorageAccess const):
-    * page/Quirks.cpp:
-    (WebCore::hasDeniedCrossPageStorageAccess):
-    (WebCore::Quirks::requestStorageAccessAndHandleClick const):
-    (WebCore::Quirks::triggerOptionalStorageAccessQuirk const):
-    * page/Quirks.h:
-    
-    Source/WebKit:
-    
-    Disable the storage access quirk for non-default web browsers and
-    don't cancel the login click on sites even if the user denies storage
-    access. See WebCore changelog for more details.
-    
-    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
-    (WebKit::WebFrameLoaderClient::isParentProcessAFullWebBrowser const):
-    * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
-    * WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:
-    (WebKit::WebResourceLoadObserver::hasDeniedCrossPageStorageAccess const):
-    (WebKit::WebResourceLoadObserver::setHasDeniedCrossPageStorageAccess):
-    * WebProcess/WebCoreSupport/WebResourceLoadObserver.h:
-    * WebProcess/WebPage/WebPage.cpp:
-    (WebKit::WebPage::pageIsParentProcessAFullWebBrowser):
-    (WebKit::WebPage::updatePreferences):
-    * WebProcess/WebPage/WebPage.h:
-    
-    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
-    2021-03-19  Kate Cheney  <[email protected]>
-
-            Cannot login to microsoftonline.com without allowing storage access
-            https://bugs.webkit.org/show_bug.cgi?id=223510
-            <rdar://problem/75619058>
-
-            Reviewed by John Wilander.
-
-            Disable the storage access quirk for non-default web browsers and
-            don't cancel the login click on sites even if the user denies storage
-            access. See WebCore changelog for more details.
-
-            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
-            (WebKit::WebFrameLoaderClient::isParentProcessAFullWebBrowser const):
-            * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
-            * WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:
-            (WebKit::WebResourceLoadObserver::hasDeniedCrossPageStorageAccess const):
-            (WebKit::WebResourceLoadObserver::setHasDeniedCrossPageStorageAccess):
-            * WebProcess/WebCoreSupport/WebResourceLoadObserver.h:
-            * WebProcess/WebPage/WebPage.cpp:
-            (WebKit::WebPage::pageIsParentProcessAFullWebBrowser):
-            (WebKit::WebPage::updatePreferences):
-            * WebProcess/WebPage/WebPage.h:
-
 2021-03-16  Alan Coon  <[email protected]>
 
         Cherry-pick r274462. rdar://problem/75485320

Modified: branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2021-03-23 00:20:51 UTC (rev 274825)
@@ -1959,12 +1959,6 @@
 }
 #endif
 
-bool WebFrameLoaderClient::isParentProcessAFullWebBrowser() const
-{
-    auto* page = m_frame->page();
-    return page && page->isParentProcessAWebBrowser();
-}
-
 } // namespace WebKit
 
 #undef PREFIX_PARAMETERS

Modified: branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h	2021-03-23 00:20:51 UTC (rev 274825)
@@ -290,8 +290,6 @@
     bool shouldEnableInAppBrowserPrivacyProtections() const final;
     void notifyPageOfAppBoundBehavior() final;
 #endif
-
-    bool isParentProcessAFullWebBrowser() const final;
 };
 
 // As long as EmptyFrameLoaderClient exists in WebCore, this can return nullptr.

Modified: branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp	2021-03-23 00:20:51 UTC (rev 274825)
@@ -443,25 +443,6 @@
     completionHandler();
 }
 
-bool WebResourceLoadObserver::hasDeniedCrossPageStorageAccess(const SubFrameDomain& subDomain, const TopFrameDomain& topDomain) const
-{
-    auto it = m_domainsWithDeniedStorageAccess.find(topDomain);
-
-    if (it != m_domainsWithDeniedStorageAccess.end())
-        return it->value.contains(subDomain);
-
-    return false;
-}
-
-void WebResourceLoadObserver::setHasDeniedCrossPageStorageAccess(HashMap<TopFrameDomain, SubFrameDomain>&& domains, CompletionHandler<void()>&& completionHandler)
-{
-    for (auto& topDomain : domains.keys()) {
-        m_domainsWithDeniedStorageAccess.ensure(topDomain, [] { return HashSet<RegistrableDomain> { };
-            }).iterator->value.add(domains.get(topDomain));
-    }
-    completionHandler();
-}
-
 } // namespace WebKit
 
 #endif // ENABLE(RESOURCE_LOAD_STATISTICS)

Modified: branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.h (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.h	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.h	2021-03-23 00:20:51 UTC (rev 274825)
@@ -69,8 +69,6 @@
     void setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, SubFrameDomain>&&, CompletionHandler<void()>&&) final;
     bool hasHadUserInteraction(const WebCore::RegistrableDomain&) const final;
     bool hasCrossPageStorageAccess(const SubFrameDomain&, const TopFrameDomain&) const final;
-    void setHasDeniedCrossPageStorageAccess(HashMap<TopFrameDomain, SubFrameDomain>&&, CompletionHandler<void()>&&) final;
-    bool hasDeniedCrossPageStorageAccess(const SubFrameDomain&, const TopFrameDomain&) const final;
 
 private:
     WebCore::ResourceLoadStatistics& ensureResourceStatisticsForRegistrableDomain(const WebCore::RegistrableDomain&);
@@ -90,7 +88,6 @@
 
     HashSet<WebCore::RegistrableDomain> m_domainsWithUserInteraction;
     HashMap<TopFrameDomain, HashSet<SubFrameDomain>> m_domainsWithCrossPageStorageAccess;
-    HashMap<TopFrameDomain, HashSet<SubFrameDomain>> m_domainsWithDeniedStorageAccess;
 #if !RELEASE_LOG_DISABLED
     uint64_t m_loggingCounter { 0 };
     static bool shouldLogUserInteraction;

Modified: branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2021-03-23 00:20:51 UTC (rev 274825)
@@ -3744,15 +3744,6 @@
     updatePreferences(store);
 }
 
-bool WebPage::isParentProcessAWebBrowser() const
-{
-#if HAVE(AUDIT_TOKEN)
-    if (auto* connection = WebProcess::singleton().parentProcessConnection())
-        return isParentProcessAFullWebBrowser(connection->getAuditToken());
-#endif
-    return false;
-}
-
 void WebPage::updatePreferences(const WebPreferencesStore& store)
 {
     updatePreferencesGenerated(store);
@@ -3858,8 +3849,10 @@
     m_page->setTextInteractionEnabled(store.getBoolValueForKey(WebPreferencesKey::textInteractionEnabledKey()));
 
 #if ENABLE(WEB_AUTHN) && PLATFORM(IOS)
-    if (isParentProcessAWebBrowser())
-        settings.setWebAuthenticationEnabled(true);
+    if (auto* connection = WebProcess::singleton().parentProcessConnection()) {
+        if (isParentProcessAFullWebBrowser(connection->getAuditToken()))
+            settings.setWebAuthenticationEnabled(true);
+    }
 #endif
 
 #if ENABLE(WEBM_FORMAT_READER)

Modified: branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.h (274824 => 274825)


--- branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.h	2021-03-23 00:18:41 UTC (rev 274824)
+++ branches/safari-611.1.21.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.h	2021-03-23 00:20:51 UTC (rev 274825)
@@ -1379,8 +1379,6 @@
 
     void dispatchWheelEventWithoutScrolling(const WebWheelEvent&, CompletionHandler<void(bool)>&&);
 
-    bool isParentProcessAWebBrowser() const;
-    
 private:
     WebPage(WebCore::PageIdentifier, WebPageCreationParameters&&);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to