Title: [179073] branches/safari-600.1.4.15-branch/Source/WebKit2
- Revision
- 179073
- Author
- [email protected]
- Date
- 2015-01-24 12:36:59 -0800 (Sat, 24 Jan 2015)
Log Message
Merged r176382. rdar://problem/19419810
Modified Paths
Diff
Modified: branches/safari-600.1.4.15-branch/Source/WebKit2/ChangeLog (179072 => 179073)
--- branches/safari-600.1.4.15-branch/Source/WebKit2/ChangeLog 2015-01-24 20:30:35 UTC (rev 179072)
+++ branches/safari-600.1.4.15-branch/Source/WebKit2/ChangeLog 2015-01-24 20:36:59 UTC (rev 179073)
@@ -1,5 +1,33 @@
2015-01-24 David Kilzer <[email protected]>
+ Merge r176382.
+
+ 2014-11-19 Yongjun Zhang <[email protected]>
+
+ Don't track sub-resources that are started after main frame progress has completed.
+ https://bugs.webkit.org/show_bug.cgi?id=138582
+
+ Reviewed by Sam Weinig.
+
+ After main frame progress has finished, starting loading a sub-resource shouldn't affect
+ UI process's view of page loading status (i.e., the page has already completed loading
+ and the progress shouldn't change). To achive that, don't track the subresources that
+ are started after the main frame has finished, except for those triggered by user interaction.
+
+ * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp: Notify WebPage that the main frame progress
+ has started or finished.
+ (WebKit::WebProgressTrackerClient::progressStarted):
+ (WebKit::WebProgressTrackerClient::progressFinished):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ (WebKit::WebPage::addResourceRequest): Don't track the resource request if it is initiated after
+ the main frame is loaded and it is not triggered by user interaction.
+ (WebKit::WebPage::removeResourceRequest):
+ * WebProcess/WebPage/WebPage.h: Rename m_networkResourceRequestIdentifiers to m_trackedNetworkResourceRequestIdentifiers.
+ (WebKit::WebPage::setMainFrameProgressCompleted):
+
+2015-01-24 David Kilzer <[email protected]>
+
<rdar://problem/19433134> REGRESSION (iOS 8): Reproducible null deref in WebKit::nextFocusableElement
Merged small change from r175549.
Modified: branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp (179072 => 179073)
--- branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp 2015-01-24 20:30:35 UTC (rev 179072)
+++ branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp 2015-01-24 20:36:59 UTC (rev 179073)
@@ -51,7 +51,8 @@
{
if (!originatingProgressFrame.isMainFrame())
return;
-
+
+ m_webPage.setMainFrameProgressCompleted(false);
m_webPage.send(Messages::WebPageProxy::DidStartProgress());
}
@@ -68,10 +69,12 @@
{
if (!originatingProgressFrame.isMainFrame())
return;
-
+
+ m_webPage.setMainFrameProgressCompleted(true);
+
// Notify the bundle client.
m_webPage.injectedBundleLoaderClient().didFinishProgress(&m_webPage);
-
+
m_webPage.send(Messages::WebPageProxy::DidFinishProgress());
}
Modified: branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (179072 => 179073)
--- branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-01-24 20:30:35 UTC (rev 179072)
+++ branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-01-24 20:36:59 UTC (rev 179073)
@@ -328,6 +328,7 @@
, m_systemWebGLPolicy(WebGLAllowCreation)
#endif
, m_pageOverlayController(*this)
+ , m_mainFrameProgressCompleted(false)
{
ASSERT(m_pageID);
// FIXME: This is a non-ideal location for this Setting and
@@ -3927,19 +3928,22 @@
if (!request.url().protocolIsInHTTPFamily())
return;
- ASSERT(!m_networkResourceRequestIdentifiers.contains(identifier));
- bool wasEmpty = m_networkResourceRequestIdentifiers.isEmpty();
- m_networkResourceRequestIdentifiers.add(identifier);
+ if (m_mainFrameProgressCompleted && !ScriptController::processingUserGesture())
+ return;
+
+ ASSERT(!m_trackedNetworkResourceRequestIdentifiers.contains(identifier));
+ bool wasEmpty = m_trackedNetworkResourceRequestIdentifiers.isEmpty();
+ m_trackedNetworkResourceRequestIdentifiers.add(identifier);
if (wasEmpty)
send(Messages::WebPageProxy::SetNetworkRequestsInProgress(true));
}
void WebPage::removeResourceRequest(unsigned long identifier)
{
- if (!m_networkResourceRequestIdentifiers.remove(identifier))
+ if (!m_trackedNetworkResourceRequestIdentifiers.remove(identifier))
return;
- if (m_networkResourceRequestIdentifiers.isEmpty())
+ if (m_trackedNetworkResourceRequestIdentifiers.isEmpty())
send(Messages::WebPageProxy::SetNetworkRequestsInProgress(false));
}
Modified: branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (179072 => 179073)
--- branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h 2015-01-24 20:30:35 UTC (rev 179072)
+++ branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h 2015-01-24 20:36:59 UTC (rev 179073)
@@ -845,6 +845,7 @@
void willChangeCurrentHistoryItemForMainFrame();
+ void setMainFrameProgressCompleted(bool completed) { m_mainFrameProgressCompleted = completed; }
private:
WebPage(uint64_t pageID, const WebPageCreationParameters&);
@@ -1213,7 +1214,7 @@
unsigned m_cachedPageCount;
- HashSet<unsigned long> m_networkResourceRequestIdentifiers;
+ HashSet<unsigned long> m_trackedNetworkResourceRequestIdentifiers;
WebCore::IntSize m_minimumLayoutSize;
bool m_autoSizingShouldExpandToViewHeight;
@@ -1286,6 +1287,8 @@
#endif
PageOverlayController m_pageOverlayController;
+
+ bool m_mainFrameProgressCompleted;
};
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes