Diff
Modified: branches/safari-537.43-branch/Source/WebCore/ChangeLog (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebCore/ChangeLog 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebCore/ChangeLog 2013-05-30 21:08:22 UTC (rev 150983)
@@ -1,5 +1,37 @@
2013-05-30 Lucas Forschler <[email protected]>
+ Merge r150950
+
+ 2013-05-29 Tim Horton <[email protected]>
+
+ Expose incrementalRenderingSuppressionTimeout via WK2
+ https://bugs.webkit.org/show_bug.cgi?id=117015
+ <rdar://problem/13992853>
+
+ Reviewed by Darin Adler.
+
+ * dom/Document.cpp:
+ (WebCore::Document::setVisualUpdatesAllowed):
+ Inform the FrameLoader that we're ready to transition the page, if
+ nothing else already has. This will be forwarded to the FrameLoaderClient,
+ and WebKit2's implementation will go ahead and un-freeze the layer tree,
+ so that the incremental rendering suppression watchdog timer actually works.
+
+ (WebCore::Document::setVisualUpdatesAllowedByClient):
+ Make incremental rendering suppression extension tokens play nice with the
+ watchdog timer; allow setVisualUpdatesAllowedByClient=true to re-enable updates
+ if either the page is in the "completed" state or the watchdog has already fired.
+
+ * loader/FrameLoader.cpp:
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::forcePageTransitionIfNeeded): Added.
+ Forward to the client.
+
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::forcePageTransitionIfNeeded): Added.
+
+2013-05-30 Lucas Forschler <[email protected]>
+
Merge r150948
2013-05-29 Simon Fraser <[email protected]>
Modified: branches/safari-537.43-branch/Source/WebCore/dom/Document.cpp (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebCore/dom/Document.cpp 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebCore/dom/Document.cpp 2013-05-30 21:08:22 UTC (rev 150983)
@@ -1310,6 +1310,9 @@
if (RenderView* renderView = this->renderView())
renderView->repaintViewAndCompositedLayers();
+
+ if (Frame* frame = this->frame())
+ frame->loader()->forcePageTransitionIfNeeded();
}
void Document::visualUpdatesSuppressionTimerFired(Timer<Document>*)
@@ -1326,7 +1329,10 @@
void Document::setVisualUpdatesAllowedByClient(bool visualUpdatesAllowedByClient)
{
- if (visualUpdatesAllowedByClient && m_readyState == Complete && !visualUpdatesAllowed())
+ // We should only re-enable visual updates if ReadyState is Completed or the watchdog timer has fired,
+ // both of which we can determine by looking at the timer.
+
+ if (visualUpdatesAllowedByClient && !m_visualUpdatesSuppressionTimer.isActive() && !visualUpdatesAllowed())
setVisualUpdatesAllowed(true);
}
Modified: branches/safari-537.43-branch/Source/WebCore/loader/FrameLoader.cpp (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebCore/loader/FrameLoader.cpp 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebCore/loader/FrameLoader.cpp 2013-05-30 21:08:22 UTC (rev 150983)
@@ -3339,6 +3339,11 @@
view->adjustTiledBackingCoverage();
}
+void FrameLoader::forcePageTransitionIfNeeded()
+{
+ m_client->forcePageTransitionIfNeeded();
+}
+
bool FrameLoaderClient::hasHTMLView() const
{
return true;
Modified: branches/safari-537.43-branch/Source/WebCore/loader/FrameLoader.h (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebCore/loader/FrameLoader.h 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebCore/loader/FrameLoader.h 2013-05-30 21:08:22 UTC (rev 150983)
@@ -286,6 +286,8 @@
const KURL& previousURL() const { return m_previousURL; }
+ void forcePageTransitionIfNeeded();
+
private:
enum FormSubmissionCacheLoadPolicy {
MayAttemptCacheOnlyLoadForFormSubmissionItem,
Modified: branches/safari-537.43-branch/Source/WebCore/loader/FrameLoaderClient.h (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebCore/loader/FrameLoaderClient.h 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebCore/loader/FrameLoaderClient.h 2013-05-30 21:08:22 UTC (rev 150983)
@@ -349,6 +349,8 @@
virtual void dispatchDidChangeResourcePriority(unsigned long /*identifier*/, ResourceLoadPriority) { }
+ virtual void forcePageTransitionIfNeeded() { }
+
// FIXME (bug 116233): We need to get rid of EmptyFrameLoaderClient completely, then this will no longer be needed.
virtual bool isEmptyFrameLoaderClient() { return false; }
};
Modified: branches/safari-537.43-branch/Source/WebKit2/ChangeLog (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebKit2/ChangeLog 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebKit2/ChangeLog 2013-05-30 21:08:22 UTC (rev 150983)
@@ -1,5 +1,37 @@
2013-05-30 Lucas Forschler <[email protected]>
+ Merge r150950
+
+ 2013-05-29 Tim Horton <[email protected]>
+
+ Expose incrementalRenderingSuppressionTimeout via WK2
+ https://bugs.webkit.org/show_bug.cgi?id=117015
+ <rdar://problem/13992853>
+
+ Reviewed by Darin Adler.
+
+ * Shared/WebPreferencesStore.h:
+ * UIProcess/API/C/WKPreferencesPrivate.h:
+ Add IncrementalRenderingSuppressionTimeout preference.
+
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetIncrementalRenderingSuppressionTimeout): Added.
+ (WKPreferencesGetIncrementalRenderingSuppressionTimeout): Added.
+
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+ (WebKit::WebFrameLoaderClient::forcePageTransitionIfNeeded): Added.
+ Call didCompletePageTransition, which un-freezes the layer tree.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::didCompletePageTransition):
+ Fix some indentation.
+
+ (WebKit::WebPage::updatePreferences):
+ Forward the timeout value through to WebCore.
+
+2013-05-30 Lucas Forschler <[email protected]>
+
Merge r150948
2013-05-29 Simon Fraser <[email protected]>
Modified: branches/safari-537.43-branch/Source/WebKit2/Shared/WebPreferencesStore.h (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebKit2/Shared/WebPreferencesStore.h 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebKit2/Shared/WebPreferencesStore.h 2013-05-30 21:08:22 UTC (rev 150983)
@@ -164,6 +164,7 @@
#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
macro(PDFScaleFactor, pdfScaleFactor, Double, double, 0) \
+ macro(IncrementalRenderingSuppressionTimeout, incrementalRenderingSuppressionTimeout, Double, double, 5) \
\
#define FOR_EACH_WEBKIT_FLOAT_PREFERENCE(macro) \
Modified: branches/safari-537.43-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2013-05-30 21:08:22 UTC (rev 150983)
@@ -1143,3 +1143,13 @@
{
return toImpl(preferencesRef)->hiddenPageCSSAnimationSuspensionEnabled();
}
+
+void WKPreferencesSetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef, double timeout)
+{
+ toImpl(preferencesRef)->setIncrementalRenderingSuppressionTimeout(timeout);
+}
+
+double WKPreferencesGetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef)
+{
+ return toAPI(toImpl(preferencesRef)->incrementalRenderingSuppressionTimeout());
+}
Modified: branches/safari-537.43-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h 2013-05-30 21:08:22 UTC (rev 150983)
@@ -283,6 +283,10 @@
WK_EXPORT void WKPreferencesSetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef, bool enabled);
WK_EXPORT bool WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef);
+// Defaults to 5 seconds.
+WK_EXPORT void WKPreferencesSetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef, double timeout);
+WK_EXPORT double WKPreferencesGetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef);
+
WK_EXPORT void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef);
#ifdef __cplusplus
Modified: branches/safari-537.43-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2013-05-30 21:08:22 UTC (rev 150983)
@@ -524,6 +524,19 @@
webPage->didFinishLoad(m_frame);
}
+void WebFrameLoaderClient::forcePageTransitionIfNeeded()
+{
+ if (m_didCompletePageTransitionAlready)
+ return;
+
+ WebPage* webPage = m_frame->page();
+ if (!webPage)
+ return;
+
+ webPage->didCompletePageTransition();
+ m_didCompletePageTransitionAlready = true;
+}
+
void WebFrameLoaderClient::dispatchDidLayout(LayoutMilestones milestones)
{
WebPage* webPage = m_frame->page();
Modified: branches/safari-537.43-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2013-05-30 21:08:22 UTC (rev 150983)
@@ -224,6 +224,8 @@
virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext() OVERRIDE;
+ virtual void forcePageTransitionIfNeeded() OVERRIDE;
+
WebFrame* m_frame;
RefPtr<PluginView> m_pluginView;
bool m_hasSentResponseToPluginView;
Modified: branches/safari-537.43-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (150982 => 150983)
--- branches/safari-537.43-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-05-30 21:03:47 UTC (rev 150982)
+++ branches/safari-537.43-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-05-30 21:08:22 UTC (rev 150983)
@@ -2125,7 +2125,8 @@
send(Messages::WebPageProxy::PageTransitionViewportReady());
else
#endif
- m_drawingArea->setLayerTreeStateIsFrozen(false);
+
+ m_drawingArea->setLayerTreeStateIsFrozen(false);
}
void WebPage::show()
@@ -2495,6 +2496,7 @@
settings->setApplicationChromeMode(store.getBoolValueForKey(WebPreferencesKey::applicationChromeModeKey()));
settings->setSuppressesIncrementalRendering(store.getBoolValueForKey(WebPreferencesKey::suppressesIncrementalRenderingKey()));
+ settings->setIncrementalRenderingSuppressionTimeoutInSeconds(store.getDoubleValueForKey(WebPreferencesKey::incrementalRenderingSuppressionTimeoutKey()));
settings->setBackspaceKeyNavigationEnabled(store.getBoolValueForKey(WebPreferencesKey::backspaceKeyNavigationEnabledKey()));
settings->setWantsBalancedSetDefersLoadingBehavior(store.getBoolValueForKey(WebPreferencesKey::wantsBalancedSetDefersLoadingBehaviorKey()));
settings->setCaretBrowsingEnabled(store.getBoolValueForKey(WebPreferencesKey::caretBrowsingEnabledKey()));