Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (219784 => 219785)
--- branches/safari-604-branch/Source/WebCore/ChangeLog 2017-07-23 06:51:43 UTC (rev 219784)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog 2017-07-23 06:51:49 UTC (rev 219785)
@@ -1,5 +1,32 @@
2017-07-22 Jason Marcell <[email protected]>
+ Cherry-pick r219703. rdar://problem/33462696
+
+ 2017-07-20 Chris Dumez <[email protected]>
+
+ Regression(ITP): May get frequently logged out of wsj.com
+ https://bugs.webkit.org/show_bug.cgi?id=174661
+ <rdar://problem/32343256>
+
+ Reviewed by Geoffrey Garen.
+
+ Add the concept of associated domains in the ResourceLoadObserver. We
+ previously ignore loads to and from the same domains. We now do the same
+ if the to and from domains are associated (i.e. owned by the same entity).
+
+ For now, only add domains owned by Dow Jones & Company, Inc. to the list,
+ to address login issues on wsj.com.
+
+ No new tests, verified manually on wsj.com.
+
+ * loader/ResourceLoadObserver.cpp:
+ (WebCore::areDomainsAssociated):
+ (WebCore::ResourceLoadObserver::logFrameNavigation):
+ (WebCore::ResourceLoadObserver::logSubresourceLoading):
+ (WebCore::ResourceLoadObserver::logWebSocketLoading):
+
+2017-07-22 Jason Marcell <[email protected]>
+
Cherry-pick r219701. rdar://problem/33465715
2017-07-20 Chris Dumez <[email protected]>
Modified: branches/safari-604-branch/Source/WebCore/loader/ResourceLoadObserver.cpp (219784 => 219785)
--- branches/safari-604-branch/Source/WebCore/loader/ResourceLoadObserver.cpp 2017-07-23 06:51:43 UTC (rev 219784)
+++ branches/safari-604-branch/Source/WebCore/loader/ResourceLoadObserver.cpp 2017-07-23 06:51:49 UTC (rev 219785)
@@ -54,6 +54,35 @@
return resourceLoadObserver;
}
+// FIXME: Temporary fix for <rdar://problem/32343256> until content can be updated.
+static bool areDomainsAssociated(const String& firstDomain, const String& secondDomain)
+{
+ static NeverDestroyed<HashMap<String, unsigned>> metaDomainIdentifiers = [] {
+ HashMap<String, unsigned> map;
+
+ // Domains owned by Dow Jones & Company, Inc.
+ const unsigned dowJonesIdentifier = 1;
+ map.add(ASCIILiteral("dowjones.com"), dowJonesIdentifier);
+ map.add(ASCIILiteral("wsj.com"), dowJonesIdentifier);
+ map.add(ASCIILiteral("barrons.com"), dowJonesIdentifier);
+ map.add(ASCIILiteral("marketwatch.com"), dowJonesIdentifier);
+ map.add(ASCIILiteral("wsjplus.com"), dowJonesIdentifier);
+
+ return map;
+ }();
+
+ if (firstDomain == secondDomain)
+ return true;
+
+ ASSERT(!equalIgnoringASCIICase(firstDomain, secondDomain));
+
+ unsigned firstMetaDomainIdentifier = metaDomainIdentifiers.get().get(firstDomain);
+ if (!firstMetaDomainIdentifier)
+ return false;
+
+ return firstMetaDomainIdentifier == metaDomainIdentifiers.get().get(secondDomain);
+}
+
void ResourceLoadObserver::setShouldThrottleObserverNotifications(bool shouldThrottle)
{
m_shouldThrottleNotifications = shouldThrottle;
@@ -126,7 +155,7 @@
auto mainFramePrimaryDomain = primaryDomain(mainFrameURL);
auto sourcePrimaryDomain = primaryDomain(sourceURL);
- if (targetPrimaryDomain == mainFramePrimaryDomain || targetPrimaryDomain == sourcePrimaryDomain)
+ if (areDomainsAssociated(targetPrimaryDomain, mainFramePrimaryDomain) || areDomainsAssociated(targetPrimaryDomain, sourcePrimaryDomain))
return;
auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
@@ -167,7 +196,7 @@
auto mainFramePrimaryDomain = primaryDomain(mainFrameURL);
auto sourcePrimaryDomain = primaryDomain(sourceURL);
- if (targetPrimaryDomain == mainFramePrimaryDomain || (isRedirect && targetPrimaryDomain == sourcePrimaryDomain))
+ if (areDomainsAssociated(targetPrimaryDomain, mainFramePrimaryDomain) || (isRedirect && areDomainsAssociated(targetPrimaryDomain, sourcePrimaryDomain)))
return;
if (resourceNeedsSSOQuirk(targetURL))
@@ -212,7 +241,7 @@
auto targetPrimaryDomain = primaryDomain(targetURL);
auto mainFramePrimaryDomain = primaryDomain(mainFrameURL);
- if (targetPrimaryDomain == mainFramePrimaryDomain)
+ if (areDomainsAssociated(targetPrimaryDomain, mainFramePrimaryDomain))
return;
auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
Modified: branches/safari-604-branch/Source/WebKit/ChangeLog (219784 => 219785)
--- branches/safari-604-branch/Source/WebKit/ChangeLog 2017-07-23 06:51:43 UTC (rev 219784)
+++ branches/safari-604-branch/Source/WebKit/ChangeLog 2017-07-23 06:51:49 UTC (rev 219785)
@@ -1,5 +1,22 @@
2017-07-22 Jason Marcell <[email protected]>
+ Cherry-pick r219703. rdar://problem/33462696
+
+ 2017-07-20 Chris Dumez <[email protected]>
+
+ Regression(ITP): May get frequently logged out of wsj.com
+ https://bugs.webkit.org/show_bug.cgi?id=174661
+ <rdar://problem/32343256>
+
+ Reviewed by Geoffrey Garen.
+
+ Bump statistics file version to blow away old statistics on disk since those do not
+ take into account associated domains.
+
+ * UIProcess/WebResourceLoadStatisticsStore.cpp:
+
+2017-07-22 Jason Marcell <[email protected]>
+
Cherry-pick r219701. rdar://problem/33465715
2017-07-20 Chris Dumez <[email protected]>
Modified: branches/safari-604-branch/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp (219784 => 219785)
--- branches/safari-604-branch/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-07-23 06:51:43 UTC (rev 219784)
+++ branches/safari-604-branch/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-07-23 06:51:49 UTC (rev 219785)
@@ -46,7 +46,7 @@
namespace WebKit {
constexpr unsigned operatingDatesWindow { 30 };
-constexpr unsigned statisticsModelVersion { 8 };
+constexpr unsigned statisticsModelVersion { 9 };
constexpr unsigned maxImportance { 3 };
template<typename T> static inline String isolatedPrimaryDomain(const T& value)