<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170787] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170787">170787</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2014-07-04 00:10:10 -0700 (Fri, 04 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[iOS][WK2] Black web view after un-suspending process
https://bugs.webkit.org/show_bug.cgi?id=134623
<rdar://problem/17513223>
Reviewed by Simon Fraser.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
Add an argument to viewStateDidChange that allows callers (-[WKContentView _applicationWillEnterForeground:])
to force us to wait for a synchronous reply from the Web process after performing a view state change.
(WebKit::WebPageProxy::dispatchViewStateChange):
Move the has-been-in-window-and-now-is-newly-in-window check into dispatchViewStateChange.
Adjust the logic surrounding going into/out of window by factoring out the IsInWindow-did-change check, for clarity.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationWillEnterForeground:]):
As previously mentioned, wait for a reply when foregrounding.
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlushImmediately):
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
(WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
Make sure to schedule a commit immediately if the UI process is waiting for a reply.
Previously we assumed that a commit would be scheduled anyway because we would have to reparent the
layer tree, but that doesn't happen in the suspension-without-unparenting case. Also, we want to skip
all throttling in this case.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerFlushImmediately):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewmm">trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (170786 => 170787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-07-04 05:38:20 UTC (rev 170786)
+++ trunk/Source/WebKit2/ChangeLog        2014-07-04 07:10:10 UTC (rev 170787)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-07-04 Timothy Horton <timothy_horton@apple.com>
+
+ [iOS][WK2] Black web view after un-suspending process
+ https://bugs.webkit.org/show_bug.cgi?id=134623
+ <rdar://problem/17513223>
+
+ Reviewed by Simon Fraser.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::viewStateDidChange):
+ Add an argument to viewStateDidChange that allows callers (-[WKContentView _applicationWillEnterForeground:])
+ to force us to wait for a synchronous reply from the Web process after performing a view state change.
+
+ (WebKit::WebPageProxy::dispatchViewStateChange):
+ Move the has-been-in-window-and-now-is-newly-in-window check into dispatchViewStateChange.
+ Adjust the logic surrounding going into/out of window by factoring out the IsInWindow-did-change check, for clarity.
+
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/ios/WKContentView.mm:
+ (-[WKContentView _applicationWillEnterForeground:]):
+ As previously mentioned, wait for a reply when foregrounding.
+
+ * WebProcess/WebPage/DrawingArea.h:
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+ (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlushImmediately):
+ (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
+ (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
+ Make sure to schedule a commit immediately if the UI process is waiting for a reply.
+ Previously we assumed that a commit would be scheduled anyway because we would have to reparent the
+ layer tree, but that doesn't happen in the suspension-without-unparenting case. Also, we want to skip
+ all throttling in this case.
+
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerFlushImmediately):
+
</ins><span class="cx"> 2014-07-03 Gavin Barraclough <baraclough@apple.com>
</span><span class="cx">
</span><span class="cx"> Should not take background task assertion for NetworkProcess
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (170786 => 170787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-07-04 05:38:20 UTC (rev 170786)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-07-04 07:10:10 UTC (rev 170787)
</span><span class="lines">@@ -366,7 +366,7 @@
</span><span class="cx"> , m_navigationID(0)
</span><span class="cx"> , m_configurationPreferenceValues(configuration.preferenceValues)
</span><span class="cx"> , m_potentiallyChangedViewStateFlags(ViewState::NoFlags)
</span><del>- , m_viewStateChangeWantsReply(WantsReplyOrNot::DoesNotWantReply)
</del><ins>+ , m_viewStateChangeWantsReply(false)
</ins><span class="cx"> {
</span><span class="cx"> if (m_process->state() == WebProcessProxy::State::Running) {
</span><span class="cx"> if (m_userContentController)
</span><span class="lines">@@ -1101,15 +1101,13 @@
</span><span class="cx"> m_viewState |= ViewState::IsVisuallyIdle;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::viewStateDidChange(ViewState::Flags mayHaveChanged)
</del><ins>+void WebPageProxy::viewStateDidChange(ViewState::Flags mayHaveChanged, bool wantsReply)
</ins><span class="cx"> {
</span><del>- bool isNewlyInWindow = !isInWindow() && (mayHaveChanged & ViewState::IsInWindow) && m_pageClient.isViewInWindow();
-
</del><span class="cx"> m_potentiallyChangedViewStateFlags |= mayHaveChanged;
</span><del>- m_viewStateChangeWantsReply = ((m_viewWasEverInWindow && isNewlyInWindow) || m_viewStateChangeWantsReply == WantsReplyOrNot::DoesWantReply) ? WantsReplyOrNot::DoesWantReply : WantsReplyOrNot::DoesNotWantReply;
</del><ins>+ m_viewStateChangeWantsReply = m_viewStateChangeWantsReply || wantsReply;
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>- if (isNewlyInWindow) {
</del><ins>+ if (!isInWindow() && (mayHaveChanged & ViewState::IsInWindow) && m_pageClient.isViewInWindow()) {
</ins><span class="cx"> dispatchViewStateChange();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -1119,6 +1117,29 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebPageProxy::viewDidLeaveWindow()
+{
+#if ENABLE(INPUT_TYPE_COLOR_POPOVER)
+ // When leaving the current page, close the popover color well.
+ if (m_colorPicker)
+ endColorPicker();
+#endif
+#if PLATFORM(IOS)
+ // When leaving the current page, close the video fullscreen.
+ if (m_videoFullscreenManager)
+ m_videoFullscreenManager->requestHideAndExitFullscreen();
+#endif
+}
+
+void WebPageProxy::viewDidEnterWindow()
+{
+ LayerHostingMode layerHostingMode = m_pageClient.viewLayerHostingMode();
+ if (m_layerHostingMode != layerHostingMode) {
+ m_layerHostingMode = layerHostingMode;
+ m_process->send(Messages::WebPage::SetLayerHostingMode(static_cast<unsigned>(layerHostingMode)), m_pageID);
+ }
+}
+
</ins><span class="cx"> void WebPageProxy::dispatchViewStateChange()
</span><span class="cx"> {
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -1138,8 +1159,12 @@
</span><span class="cx"> updateViewState(m_potentiallyChangedViewStateFlags);
</span><span class="cx"> ViewState::Flags changed = m_viewState ^ previousViewState;
</span><span class="cx">
</span><ins>+ // We always want to wait for the Web process to reply if we've been in-window before and are coming back in-window.
+ if (m_viewWasEverInWindow && (changed & ViewState::IsInWindow) && isInWindow())
+ m_viewStateChangeWantsReply = true;
+
</ins><span class="cx"> if (changed)
</span><del>- m_process->send(Messages::WebPage::SetViewState(m_viewState, m_viewStateChangeWantsReply == WantsReplyOrNot::DoesWantReply), m_pageID);
</del><ins>+ m_process->send(Messages::WebPage::SetViewState(m_viewState, m_viewStateChangeWantsReply), m_pageID);
</ins><span class="cx">
</span><span class="cx"> // This must happen after the SetViewState message is sent, to ensure the page visibility event can fire.
</span><span class="cx"> updateActivityToken();
</span><span class="lines">@@ -1153,34 +1178,20 @@
</span><span class="cx"> if ((changed & ViewState::IsVisible) && !isViewVisible())
</span><span class="cx"> m_process->responsivenessTimer()->stop();
</span><span class="cx">
</span><del>- if ((m_potentiallyChangedViewStateFlags & ViewState::IsInWindow) && (m_viewState & ViewState::IsInWindow)) {
- LayerHostingMode layerHostingMode = m_pageClient.viewLayerHostingMode();
- if (m_layerHostingMode != layerHostingMode) {
- m_layerHostingMode = layerHostingMode;
- m_process->send(Messages::WebPage::SetLayerHostingMode(static_cast<unsigned>(layerHostingMode)), m_pageID);
- }
</del><ins>+ if (changed & ViewState::IsInWindow) {
+ if (isInWindow())
+ viewDidEnterWindow();
+ else
+ viewDidLeaveWindow();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if ((m_potentiallyChangedViewStateFlags & ViewState::IsInWindow) && !(m_viewState & ViewState::IsInWindow)) {
-#if ENABLE(INPUT_TYPE_COLOR_POPOVER)
- // When leaving the current page, close the popover color well.
- if (m_colorPicker)
- endColorPicker();
-#endif
-#if PLATFORM(IOS)
- // When leaving the current page, close the video fullscreen.
- if (m_videoFullscreenManager)
- m_videoFullscreenManager->requestHideAndExitFullscreen();
-#endif
- }
-
</del><span class="cx"> updateBackingStoreDiscardableState();
</span><span class="cx">
</span><del>- if (m_viewStateChangeWantsReply == WantsReplyOrNot::DoesWantReply)
</del><ins>+ if (m_viewStateChangeWantsReply)
</ins><span class="cx"> waitForDidUpdateViewState();
</span><span class="cx">
</span><span class="cx"> m_potentiallyChangedViewStateFlags = ViewState::NoFlags;
</span><del>- m_viewStateChangeWantsReply = WantsReplyOrNot::DoesNotWantReply;
</del><ins>+ m_viewStateChangeWantsReply = false;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::updateActivityToken()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (170786 => 170787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-07-04 05:38:20 UTC (rev 170786)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-07-04 07:10:10 UTC (rev 170787)
</span><span class="lines">@@ -360,8 +360,7 @@
</span><span class="cx"> void setDelegatesScrolling(bool delegatesScrolling) { m_delegatesScrolling = delegatesScrolling; }
</span><span class="cx"> bool delegatesScrolling() const { return m_delegatesScrolling; }
</span><span class="cx">
</span><del>- enum class WantsReplyOrNot { DoesNotWantReply, DoesWantReply };
- void viewStateDidChange(WebCore::ViewState::Flags mayHaveChanged);
</del><ins>+ void viewStateDidChange(WebCore::ViewState::Flags mayHaveChanged, bool wantsReply = false);
</ins><span class="cx"> bool isInWindow() const { return m_viewState & WebCore::ViewState::IsInWindow; }
</span><span class="cx"> void waitForDidUpdateViewState();
</span><span class="cx"> void didUpdateViewState() { m_waitingForDidUpdateViewState = false; }
</span><span class="lines">@@ -1266,6 +1265,8 @@
</span><span class="cx"> WebPreferencesStore preferencesStore() const;
</span><span class="cx">
</span><span class="cx"> void dispatchViewStateChange();
</span><ins>+ void viewDidLeaveWindow();
+ void viewDidEnterWindow();
</ins><span class="cx">
</span><span class="cx"> PageClient& m_pageClient;
</span><span class="cx"> std::unique_ptr<API::LoaderClient> m_loaderClient;
</span><span class="lines">@@ -1513,7 +1514,7 @@
</span><span class="cx">
</span><span class="cx"> WebPreferencesStore::ValueMap m_configurationPreferenceValues;
</span><span class="cx"> WebCore::ViewState::Flags m_potentiallyChangedViewStateFlags;
</span><del>- WantsReplyOrNot m_viewStateChangeWantsReply;
</del><ins>+ bool m_viewStateChangeWantsReply;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (170786 => 170787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2014-07-04 05:38:20 UTC (rev 170786)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2014-07-04 07:10:10 UTC (rev 170787)
</span><span class="lines">@@ -760,7 +760,7 @@
</span><span class="cx"> - (void)_applicationWillEnterForeground:(NSNotification*)notification
</span><span class="cx"> {
</span><span class="cx"> _page->applicationWillEnterForeground();
</span><del>- _page->viewStateDidChange(ViewState::AllFlags & ~ViewState::IsInWindow);
</del><ins>+ _page->viewStateDidChange(ViewState::AllFlags & ~ViewState::IsInWindow, true);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_applicationDidBecomeActive:(NSNotification*)notification
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (170786 => 170787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-07-04 05:38:20 UTC (rev 170786)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-07-04 07:10:10 UTC (rev 170787)
</span><span class="lines">@@ -101,6 +101,7 @@
</span><span class="cx"> virtual WebCore::GraphicsLayerFactory* graphicsLayerFactory() { return nullptr; }
</span><span class="cx"> virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) = 0;
</span><span class="cx"> virtual void scheduleCompositingLayerFlush() = 0;
</span><ins>+ virtual void scheduleCompositingLayerFlushImmediately() = 0;
</ins><span class="cx">
</span><span class="cx"> #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
</span><span class="cx"> virtual PassRefPtr<WebCore::DisplayRefreshMonitor> createDisplayRefreshMonitor(PlatformDisplayID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (170786 => 170787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-07-04 05:38:20 UTC (rev 170786)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-07-04 07:10:10 UTC (rev 170787)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx"> virtual WebCore::GraphicsLayerFactory* graphicsLayerFactory() override;
</span><span class="cx"> virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) override;
</span><span class="cx"> virtual void scheduleCompositingLayerFlush() override;
</span><ins>+ virtual void scheduleCompositingLayerFlushImmediately() override;
</ins><span class="cx">
</span><span class="cx"> virtual void addTransactionCallbackID(uint64_t callbackID) override;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (170786 => 170787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-07-04 05:38:20 UTC (rev 170786)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-07-04 07:10:10 UTC (rev 170787)
</span><span class="lines">@@ -239,6 +239,11 @@
</span><span class="cx"> return frameView ? frameView->tiledBacking() : nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlushImmediately()
+{
+ m_layerFlushTimer.startOneShot(0_ms);
+}
+
</ins><span class="cx"> void RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush()
</span><span class="cx"> {
</span><span class="cx"> if (m_isFlushingSuspended) {
</span><span class="lines">@@ -248,7 +253,7 @@
</span><span class="cx"> }
</span><span class="cx"> if (m_isLayerFlushThrottlingTemporarilyDisabledForInteraction) {
</span><span class="cx"> m_isLayerFlushThrottlingTemporarilyDisabledForInteraction = false;
</span><del>- m_layerFlushTimer.startOneShot(0_ms);
</del><ins>+ scheduleCompositingLayerFlushImmediately();
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -427,6 +432,9 @@
</span><span class="cx"> void RemoteLayerTreeDrawingArea::viewStateDidChange(ViewState::Flags, bool wantsDidUpdateViewState)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Should we suspend painting while not visible, like TiledCoreAnimationDrawingArea? Probably.
</span><ins>+
+ if (wantsDidUpdateViewState)
+ scheduleCompositingLayerFlushImmediately();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RemoteLayerTreeDrawingArea::addTransactionCallbackID(uint64_t callbackID)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (170786 => 170787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-07-04 05:38:20 UTC (rev 170786)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-07-04 07:10:10 UTC (rev 170787)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> virtual bool layerTreeStateIsFrozen() const override;
</span><span class="cx"> virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) override;
</span><span class="cx"> virtual void scheduleCompositingLayerFlush() override;
</span><ins>+ virtual void scheduleCompositingLayerFlushImmediately() override;
</ins><span class="cx">
</span><span class="cx"> virtual void updatePreferences(const WebPreferencesStore&) override;
</span><span class="cx"> virtual void mainFrameContentSizeChanged(const WebCore::IntSize&) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (170786 => 170787)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-07-04 05:38:20 UTC (rev 170786)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-07-04 07:10:10 UTC (rev 170787)
</span><span class="lines">@@ -174,6 +174,11 @@
</span><span class="cx"> m_layerFlushScheduler.schedule();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void TiledCoreAnimationDrawingArea::scheduleCompositingLayerFlushImmediately()
+{
+ scheduleCompositingLayerFlush();
+}
+
</ins><span class="cx"> void TiledCoreAnimationDrawingArea::updatePreferences(const WebPreferencesStore&)
</span><span class="cx"> {
</span><span class="cx"> Settings& settings = m_webPage.corePage()->settings();
</span></span></pre>
</div>
</div>
</body>
</html>