Incremental rendering should be unsuppressed after the load event or a configurable...
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 07:43:40 +0000 (07:43 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 07:43:40 +0000 (07:43 +0000)
commit7711ffbb22c51a9bb023e85e68ead48fe5b5d9e5
tree899c99a3b6d1b8052f36e63d7feab378f6ecfe6a
parent1339e6676f4bbdf07573809f368984d91728d174
Incremental rendering should be unsuppressed after the load event or a configurable timeout, whichever occurs first.
https://bugs.webkit.org/show_bug.cgi?id=84583

Source/WebCore:

Reviewed by Anders Carlsson.

In high-latency situations, having incremental rendering suppression
enabled makes for a worse experience due to the excessively long time
it takes for the load event to fire. So that clients that opt in to
incremental rendering suppression can mitigate this, add a configurable
timeout in which rendering is re-enabled if the load event has yet to
fire.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setReadyState): When the document transitions to
the loading state, start a timer; when it transitions to the completed
state, allow visual updates.
(WebCore::Document::setVisualUpdatesAllowed): If visual updates are
allowed, force a repaint. Otherwise, set a flag that suppresses
rendering.
(WebCore::Document::visualUpdatesSuppressionTimerFired): When the timer
fires, allow visual updates.
(WebCore::Document::implicitClose): Remove code that is now called in
setVisualUpdatesAllowed().
* dom/Document.h:
(WebCore::Document::visualUpdatesAllowed):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setIncrementalRenderingSuppressionTimeoutInSeconds):
(WebCore::Settings::incrementalRenderingSuppressionTimeoutInSeconds):

Source/WebKit/mac:

Add a private WebPreference for setting the incremental rendering suppression timeout.

Reviewed by Anders Carlsson.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences setIncrementalRenderingSuppressionTimeoutInSeconds:]):
(-[WebPreferences incrementalRenderingSuppressionTimeoutInSeconds]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm