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.
<rdar://problem/50780648>
Created attachment 380053 [details] Patch
Comment on attachment 380053 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380053&action=review > Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:171 > + m_networkActivityTracker = m_connection->startTrackingResourceLoad(m_parameters.webPageID, m_parameters.identifier, isMainResource() && isMainFrameLoad()); if isMainFrameLoad() is true, isMainResource() should also be true. I think we can remove the isMainResource() check.
Created attachment 380248 [details] Made suggested change.
Comment on attachment 380248 [details] Made suggested change. Clearing flags on attachment: 380248 Committed r250745: <https://trac.webkit.org/changeset/250745>
All reviewed patches have been landed. Closing bug.