Title: [250745] trunk/Source/WebKit
- Revision
- 250745
- Author
- [email protected]
- Date
- 2019-10-04 14:17:22 -0700 (Fri, 04 Oct 2019)
Log Message
Fix determination of the top-level resource
https://bugs.webkit.org/show_bug.cgi?id=202491
<rdar://problem/50780648>
Reviewed by Youenn Fablet.
When loading the resources associated with a page, the Networking
process needs to know the main resource for the main frame. It uses
this information to keep track of page loads and the resources that
are loaded in those pages. By keeping track of this information,
WebKit can track and report difficult (slow or incomplete) resource
loads and their impact on the overall page.
The initial determination of the top resource only looked at whether
the resource was the "main" resource of a frame or not. However, this
determination was insufficient, and would confuse the tracking
mechanism when sub-frames also had main frames. Therefore, augment the
test by also looking to see if the hosting frame is the main frame.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::startTrackingResourceLoad):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (250744 => 250745)
--- trunk/Source/WebKit/ChangeLog 2019-10-04 20:58:32 UTC (rev 250744)
+++ trunk/Source/WebKit/ChangeLog 2019-10-04 21:17:22 UTC (rev 250745)
@@ -1,3 +1,30 @@
+2019-10-04 Keith Rollin <[email protected]>
+
+ Fix determination of the top-level resource
+ https://bugs.webkit.org/show_bug.cgi?id=202491
+ <rdar://problem/50780648>
+
+ Reviewed by Youenn Fablet.
+
+ When loading the resources associated with a page, the Networking
+ process needs to know the main resource for the main frame. It uses
+ this information to keep track of page loads and the resources that
+ are loaded in those pages. By keeping track of this information,
+ WebKit can track and report difficult (slow or incomplete) resource
+ loads and their impact on the overall page.
+
+ The initial determination of the top resource only looked at whether
+ the resource was the "main" resource of a frame or not. However, this
+ determination was insufficient, and would confuse the tracking
+ mechanism when sub-frames also had main frames. Therefore, augment the
+ test by also looking to see if the hosting frame is the main frame.
+
+ * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+ (WebKit::NetworkConnectionToWebProcess::startTrackingResourceLoad):
+ * NetworkProcess/NetworkConnectionToWebProcess.h:
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ (WebKit::NetworkResourceLoader::start):
+
2019-10-04 Ross Kirsling <[email protected]>
Unreviewed WinCairo build fix for r250717.
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (250744 => 250745)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2019-10-04 20:58:32 UTC (rev 250744)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2019-10-04 21:17:22 UTC (rev 250745)
@@ -761,7 +761,7 @@
SecurityPolicy::resetOriginAccessWhitelists();
}
-Optional<NetworkActivityTracker> NetworkConnectionToWebProcess::startTrackingResourceLoad(PageIdentifier pageID, ResourceLoadIdentifier resourceID, bool isMainResource)
+Optional<NetworkActivityTracker> NetworkConnectionToWebProcess::startTrackingResourceLoad(PageIdentifier pageID, ResourceLoadIdentifier resourceID, bool isTopResource)
{
if (m_sessionID.isEphemeral())
return WTF::nullopt;
@@ -770,7 +770,7 @@
// new one if this is the main resource.
size_t rootActivityIndex;
- if (isMainResource) {
+ if (isTopResource) {
// If we're loading a page from the top, make sure any tracking of
// previous activity for this page is stopped.
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (250744 => 250745)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2019-10-04 20:58:32 UTC (rev 250744)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2019-10-04 21:17:22 UTC (rev 250745)
@@ -144,7 +144,7 @@
m_networkLoadInformationByID.remove(identifier);
}
- Optional<NetworkActivityTracker> startTrackingResourceLoad(WebCore::PageIdentifier, ResourceLoadIdentifier resourceID, bool isMainResource);
+ Optional<NetworkActivityTracker> startTrackingResourceLoad(WebCore::PageIdentifier, ResourceLoadIdentifier resourceID, bool isTopResource);
void stopTrackingResourceLoad(ResourceLoadIdentifier resourceID, NetworkActivityTracker::CompletionCode);
Vector<RefPtr<WebCore::BlobDataFileReference>> resolveBlobReferences(const NetworkResourceLoadParameters&);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (250744 => 250745)
--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2019-10-04 20:58:32 UTC (rev 250744)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2019-10-04 21:17:22 UTC (rev 250745)
@@ -168,7 +168,7 @@
{
ASSERT(RunLoop::isMain());
- m_networkActivityTracker = m_connection->startTrackingResourceLoad(m_parameters.webPageID, m_parameters.identifier, isMainResource());
+ m_networkActivityTracker = m_connection->startTrackingResourceLoad(m_parameters.webPageID, m_parameters.identifier, isMainFrameLoad());
ASSERT(!m_wasStarted);
m_wasStarted = true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes