WebKit Bugzilla
Attachment 347664 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-20180821114053.patch (text/plain), 14.08 KB, created by
Brent Fulgham
on 2018-08-21 11:40:54 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Brent Fulgham
Created:
2018-08-21 11:40:54 PDT
Size:
14.08 KB
patch
obsolete
>Subversion Revision: 235127 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 03a81b76a6d9a836c5f51977fcf619b96c7c6393..87e02b7e5db4c98880450fcdc80e1fb5231d5ab6 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 Per Arne Vollan <pvollan@apple.com> > > [WebGL] Contexts are not updated when display configuration changed. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 0654d89d4873edaa2fe083e6b8a7e5be73d21dc3..3e9345501d35fcf183211f8c74f52c65f2dd7d67 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 Alex Christensen <achristensen@webkit.org> > > Add _WKWebsiteDataStoreConfiguration. sourceApplicationBundleIdentifier and sourceApplicationSecondaryIdentifier >diff --git a/Source/WebCore/loader/ResourceLoadObserver.cpp b/Source/WebCore/loader/ResourceLoadObserver.cpp >index 3a447c76848b10b8426a669e91f34a7e6912d402..8d03ba06755fa4570650f4e6d9b03bb68483df3a 100644 >--- a/Source/WebCore/loader/ResourceLoadObserver.cpp >+++ b/Source/WebCore/loader/ResourceLoadObserver.cpp >@@ -56,24 +56,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); >@@ -123,8 +105,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; >@@ -163,6 +145,9 @@ void ResourceLoadObserver::logWebSocketLoading(const URL& targetURL, const URL& > auto targetPrimaryDomain = primaryDomain(targetURL); > auto mainFramePrimaryDomain = primaryDomain(mainFrameURL); > >+ if (targetPrimaryDomain == mainFramePrimaryDomain) >+ return; >+ > auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain); > targetStatistics.lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now()); > if (targetStatistics.subresourceUnderTopFrameOrigins.add(mainFramePrimaryDomain).isNewEntry) >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 c2534fdff2531fa871a9586028c278fe0754e969..64f9db7e332f7fc5ad3f7e0f11e1e74eedac6126 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 40b394b08aac11a9c2457df44ea145e228332387..b79f0fe504f79283e3d6706092fa8e4a07ddc45b 100644 >--- a/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h >+++ b/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h >@@ -120,7 +120,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 8d03721d0a09fe0760f27c898ab633405674ff42..6cd9dc4b7d74e0087901b05903b3bd2336a7a40d 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
Flags:
achristensen
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188756
:
347546
|
347576
|
347648
|
347659
| 347664