WebKit Bugzilla
Attachment 347659 Details for
Bug 188756
: Remove experimental affiliated domain code now that StorageAccess API is available
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188756-20180821104524.patch (text/plain), 13.92 KB, created by
Brent Fulgham
on 2018-08-21 10:45:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Brent Fulgham
Created:
2018-08-21 10:45:24 PDT
Size:
13.92 KB
patch
obsolete
>Subversion Revision: 235116 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c41411b07d66e729cf5b01c43900b76be7920812..8c6a7bdb4c7d4f1d62eef51105ea73c3275b904b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2018-08-21 Brent Fulgham <bfulgham@apple.com> >+ >+ Remove experimental affiliated domain code now that StorageAccess API is available >+ https://bugs.webkit.org/show_bug.cgi?id=188756 >+ <rdar://problem/43527848> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In Bug 174661 we added a compatibility quirk to support wsj.com authentication. This quirk is no longer needed, >+ since the StorageAccess API provides the necessary tools to do this type of interaction without needing global >+ cross-site access. >+ >+ * loader/ResourceLoadObserver.cpp: >+ (WebCore::ResourceLoadObserver::logSubresourceLoading): >+ (WebCore::ResourceLoadObserver::logWebSocketLoading): >+ (WebCore::areDomainsAssociated): Deleted. >+ (WebCore::shouldEnableSiteSpecificQuirks): Deleted. >+ * loader/ResourceLoadStatistics.cpp: >+ (WebCore::ResourceLoadStatistics::areDomainsAssociated): Deleted. >+ * loader/ResourceLoadStatistics.h: >+ > 2018-08-21 Fujii Hironori <Hironori.Fujii@sony.com> > > Don't place "using namespace XXX;" in global space for unified source builds >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 47d23dabb8a34aa932a5dd6319bcffbba1a7838d..280cab225087a9dda7865a7624ff412347877cb1 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,22 @@ >+2018-08-21 Brent Fulgham <bfulgham@apple.com> >+ >+ Remove experimental affiliated domain code now that StorageAccess API is available >+ https://bugs.webkit.org/show_bug.cgi?id=188756 >+ <rdar://problem/43527848> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In Bug 174661 we added a compatibility quirk to support wsj.com authentication. This quirk is no longer needed, >+ since the StorageAccess API provides the necessary tools to do this type of interaction without needing global >+ cross-site access. >+ >+ * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: >+ (WebKit::ResourceLoadStatisticsMemoryStore::logFrameNavigation): >+ * UIProcess/ResourceLoadStatisticsMemoryStore.h: >+ * UIProcess/WebResourceLoadStatisticsStore.cpp: >+ (WebKit::WebResourceLoadStatisticsStore::logFrameNavigation): >+ (WebKit::areDomainsAssociated): Deleted. >+ > 2018-08-21 Commit Queue <commit-queue@webkit.org> > > Unreviewed, rolling out r234981. >diff --git a/Source/WebCore/loader/ResourceLoadObserver.cpp b/Source/WebCore/loader/ResourceLoadObserver.cpp >index 511b912a2540c3926304abedcb8ec04540217092..5615a3e7b5fdfd32d3f0cbcd3be7ad02ee233710 100644 >--- a/Source/WebCore/loader/ResourceLoadObserver.cpp >+++ b/Source/WebCore/loader/ResourceLoadObserver.cpp >@@ -55,24 +55,6 @@ ResourceLoadObserver& ResourceLoadObserver::shared() > return resourceLoadObserver; > } > >-static bool shouldEnableSiteSpecificQuirks(Page* page) >-{ >-#if PLATFORM(IOS) >- UNUSED_PARAM(page); >- >- // There is currently no way to toggle the needsSiteSpecificQuirks setting on iOS so we always enable >- // the site-specific quirks on iOS. >- return true; >-#else >- return page && page->settings().needsSiteSpecificQuirks(); >-#endif >-} >- >-static bool areDomainsAssociated(Page* page, const String& firstDomain, const String& secondDomain) >-{ >- return ResourceLoadStatistics::areDomainsAssociated(shouldEnableSiteSpecificQuirks(page), firstDomain, secondDomain); >-} >- > void ResourceLoadObserver::setNotificationCallback(WTF::Function<void (Vector<ResourceLoadStatistics>&&)>&& notificationCallback) > { > ASSERT(!m_notificationCallback); >@@ -126,8 +108,8 @@ void ResourceLoadObserver::logSubresourceLoading(const Frame* frame, const Resou > auto targetPrimaryDomain = primaryDomain(targetURL); > auto mainFramePrimaryDomain = primaryDomain(mainFrameURL); > auto sourcePrimaryDomain = primaryDomain(sourceURL); >- >- if (areDomainsAssociated(page, targetPrimaryDomain, mainFramePrimaryDomain) || (isRedirect && areDomainsAssociated(page, targetPrimaryDomain, sourcePrimaryDomain))) >+ >+ if (targetPrimaryDomain == mainFramePrimaryDomain || (isRedirect && targetPrimaryDomain == sourcePrimaryDomain)) > return; > > bool shouldCallNotificationCallback = false; >@@ -173,8 +155,8 @@ void ResourceLoadObserver::logWebSocketLoading(const Frame* frame, const URL& ta > > auto targetPrimaryDomain = primaryDomain(targetURL); > auto mainFramePrimaryDomain = primaryDomain(mainFrameURL); >- >- if (areDomainsAssociated(page, targetPrimaryDomain, mainFramePrimaryDomain)) >+ >+ if (targetPrimaryDomain == mainFramePrimaryDomain) > return; > > auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain); >diff --git a/Source/WebCore/loader/ResourceLoadStatistics.cpp b/Source/WebCore/loader/ResourceLoadStatistics.cpp >index d75639c62c0385e655c6b91d9e9cdf0748443af4..9e2b7cf31519ceb3856c38616c75720724f70ede 100644 >--- a/Source/WebCore/loader/ResourceLoadStatistics.cpp >+++ b/Source/WebCore/loader/ResourceLoadStatistics.cpp >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2016-2017 Apple Inc. All rights reserved. >+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -353,40 +353,6 @@ String ResourceLoadStatistics::primaryDomain(StringView host) > return hostString; > } > >-// FIXME: Temporary fix for <rdar://problem/32343256> until content can be updated. >-bool ResourceLoadStatistics::areDomainsAssociated(bool needsSiteSpecificQuirks, const String& firstDomain, const String& secondDomain) >-{ >- ASSERT(isMainThread()); >- >- static NeverDestroyed<HashMap<String, unsigned>> metaDomainIdentifiers = [] { >- HashMap<String, unsigned> map; >- >- // Domains owned by Dow Jones & Company, Inc. >- const unsigned dowJonesIdentifier = 1; >- map.add("dowjones.com"_s, dowJonesIdentifier); >- map.add("wsj.com"_s, dowJonesIdentifier); >- map.add("barrons.com"_s, dowJonesIdentifier); >- map.add("marketwatch.com"_s, dowJonesIdentifier); >- map.add("wsjplus.com"_s, dowJonesIdentifier); >- >- return map; >- }(); >- >- if (firstDomain == secondDomain) >- return true; >- >- ASSERT(!equalIgnoringASCIICase(firstDomain, secondDomain)); >- >- if (!needsSiteSpecificQuirks) >- return false; >- >- unsigned firstMetaDomainIdentifier = metaDomainIdentifiers.get().get(firstDomain); >- if (!firstMetaDomainIdentifier) >- return false; >- >- return firstMetaDomainIdentifier == metaDomainIdentifiers.get().get(secondDomain); >-} >- > WallTime ResourceLoadStatistics::reduceTimeResolution(WallTime time) > { > return WallTime::fromRawSeconds(std::floor(time.secondsSinceEpoch() / timestampResolution) * timestampResolution.seconds()); >diff --git a/Source/WebCore/loader/ResourceLoadStatistics.h b/Source/WebCore/loader/ResourceLoadStatistics.h >index eb9c7b6906493dd9e78b45d8c1b87e7431d9b033..8c9ed4c2ba1fb34a59b6322d9beebaff83b62d40 100644 >--- a/Source/WebCore/loader/ResourceLoadStatistics.h >+++ b/Source/WebCore/loader/ResourceLoadStatistics.h >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2016-2017 Apple Inc. All rights reserved. >+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -53,7 +53,6 @@ struct ResourceLoadStatistics { > WEBCORE_EXPORT static String primaryDomain(const URL&); > WEBCORE_EXPORT static String primaryDomain(StringView host); > >- WEBCORE_EXPORT static bool areDomainsAssociated(bool needsSiteSpecificQuirks, const String&, const String&); > WEBCORE_EXPORT static WallTime reduceTimeResolution(WallTime); > > WEBCORE_EXPORT void encode(KeyedEncoder&) const; >diff --git a/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp b/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp >index 348cacd3be5115cd797ced8856ee546a31faf007..f4f8a60a63e640aa1536bb47e2c9ce020d192e51 100644 >--- a/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp >+++ b/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp >@@ -602,10 +602,13 @@ void ResourceLoadStatisticsMemoryStore::cancelPendingStatisticsProcessingRequest > m_pendingStatisticsProcessingRequestIdentifier = std::nullopt; > } > >-void ResourceLoadStatisticsMemoryStore::logFrameNavigation(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, const String& sourcePrimaryDomain, const String& targetHost, const String& mainFrameHost, bool areTargetAndMainFrameDomainsAssociated, bool areTargetAndSourceDomainsAssociated, bool isRedirect, bool isMainFrame) >+void ResourceLoadStatisticsMemoryStore::logFrameNavigation(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, const String& sourcePrimaryDomain, const String& targetHost, const String& mainFrameHost, bool isRedirect, bool isMainFrame) > { > ASSERT(!RunLoop::isMain()); > >+ bool areTargetAndMainFrameDomainsAssociated = targetPrimaryDomain == mainFramePrimaryDomain; >+ bool areTargetAndSourceDomainsAssociated = targetPrimaryDomain == sourcePrimaryDomain; >+ > bool statisticsWereUpdated = false; > if (targetHost != mainFrameHost && !(areTargetAndMainFrameDomainsAssociated || areTargetAndSourceDomainsAssociated)) { > auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain); >diff --git a/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h b/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h >index 25787f9c05af54ce253287af5e07377eba043a92..4e2ec2425aee8a0e323d4cf7e83765d5bfcfbc2f 100644 >--- a/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h >+++ b/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h >@@ -119,7 +119,7 @@ public: > void requestStorageAccess(String&& subFramePrimaryDomain, String&& topFramePrimaryDomain, uint64_t frameID, uint64_t pageID, bool promptEnabled, CompletionHandler<void(StorageAccessStatus)>&&); > void grantStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, bool userWasPromptedNow, CompletionHandler<void(bool)>&&); > >- void logFrameNavigation(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, const String& sourcePrimaryDomain, const String& targetHost, const String& mainFrameHost, bool areTargetAndMainFrameDomainsAssociated, bool areTargetAndSourceDomainsAssociated, bool isRedirect, bool isMainFrame); >+ void logFrameNavigation(const String& targetPrimaryDomain, const String& mainFramePrimaryDomain, const String& sourcePrimaryDomain, const String& targetHost, const String& mainFrameHost, bool isRedirect, bool isMainFrame); > void logUserInteraction(const String& primaryDomain); > > void clearUserInteraction(const String& primaryDomain); >diff --git a/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp b/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp >index 2877cad114308cb2cec1d8605ec9168044847933..cc448a982d3198a26003c0c651c1d6f13d0ab496 100644 >--- a/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp >+++ b/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp >@@ -50,12 +50,6 @@ template<typename T> static inline String isolatedPrimaryDomain(const T& value) > return ResourceLoadStatistics::primaryDomain(value).isolatedCopy(); > } > >-static bool areDomainsAssociated(WebPageProxy* page, const String& firstDomain, const String& secondDomain) >-{ >- bool needsSiteSpecificQuirks = page && page->preferences().needsSiteSpecificQuirks(); >- return ResourceLoadStatistics::areDomainsAssociated(needsSiteSpecificQuirks, firstDomain, secondDomain); >-} >- > const OptionSet<WebsiteDataType>& WebResourceLoadStatisticsStore::monitoredDataTypes() > { > static NeverDestroyed<OptionSet<WebsiteDataType>> dataTypes(std::initializer_list<WebsiteDataType>({ >@@ -392,17 +386,14 @@ void WebResourceLoadStatisticsStore::logFrameNavigation(const WebFrameProxy& fra > if (targetHost.isEmpty() || mainFrameHost.isEmpty() || targetHost == sourceURL.host()) > return; > >- auto* page = frame.page(); > auto targetPrimaryDomain = ResourceLoadStatistics::primaryDomain(targetURL); > auto mainFramePrimaryDomain = ResourceLoadStatistics::primaryDomain(pageURL); > auto sourcePrimaryDomain = ResourceLoadStatistics::primaryDomain(sourceURL); > >- bool areTargetAndMainFrameDomainsAssociated = areDomainsAssociated(page, targetPrimaryDomain, mainFramePrimaryDomain); >- bool areTargetAndSourceDomainsAssociated = areDomainsAssociated(page, targetPrimaryDomain, sourcePrimaryDomain); >- >- postTask([this, targetPrimaryDomain = targetPrimaryDomain.isolatedCopy(), mainFramePrimaryDomain = mainFramePrimaryDomain.isolatedCopy(), sourcePrimaryDomain = sourcePrimaryDomain.isolatedCopy(), targetHost = targetHost.toString().isolatedCopy(), mainFrameHost = mainFrameHost.toString().isolatedCopy(), areTargetAndMainFrameDomainsAssociated, areTargetAndSourceDomainsAssociated, isRedirect, isMainFrame = frame.isMainFrame()] { >+ postTask([this, targetPrimaryDomain = targetPrimaryDomain.isolatedCopy(), mainFramePrimaryDomain = mainFramePrimaryDomain.isolatedCopy(), sourcePrimaryDomain = sourcePrimaryDomain.isolatedCopy(), targetHost = targetHost.toString().isolatedCopy(), mainFrameHost = mainFrameHost.toString().isolatedCopy(), isRedirect, isMainFrame = frame.isMainFrame()] { >+ > if (m_memoryStore) >- m_memoryStore->logFrameNavigation(targetPrimaryDomain, mainFramePrimaryDomain, sourcePrimaryDomain, targetHost, mainFrameHost, areTargetAndMainFrameDomainsAssociated, areTargetAndSourceDomainsAssociated, isRedirect, isMainFrame); >+ m_memoryStore->logFrameNavigation(targetPrimaryDomain, mainFramePrimaryDomain, sourcePrimaryDomain, targetHost, mainFrameHost, isRedirect, isMainFrame); > }); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188756
:
347546
|
347576
|
347648
|
347659
|
347664