View state change callbacks are sometimes dropped on the floor
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jan 2015 00:18:40 +0000 (00:18 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jan 2015 00:18:40 +0000 (00:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140156
<rdar://problem/19255417>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dispatchViewStateChange):
Always send SetViewState to the Web process if we have any
registered view state change callbacks. Otherwise, if nothing changed,
we can end up never calling the callback.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178003 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp

index 869959d..208f737 100644 (file)
@@ -1,5 +1,19 @@
 2015-01-06  Timothy Horton  <timothy_horton@apple.com>
 
+        View state change callbacks are sometimes dropped on the floor
+        https://bugs.webkit.org/show_bug.cgi?id=140156
+        <rdar://problem/19255417>
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::dispatchViewStateChange):
+        Always send SetViewState to the Web process if we have any
+        registered view state change callbacks. Otherwise, if nothing changed,
+        we can end up never calling the callback.
+
+2015-01-06  Timothy Horton  <timothy_horton@apple.com>
+
         Make explicit which TextIndicator animations are driven manually, and which run automatically
         https://bugs.webkit.org/show_bug.cgi?id=140113
         <rdar://problem/19383425>
index 0282e94..bbb8b94 100644 (file)
@@ -1228,7 +1228,7 @@ void WebPageProxy::dispatchViewStateChange()
     if (m_viewWasEverInWindow && (changed & ViewState::IsInWindow) && isInWindow())
         m_viewStateChangeWantsSynchronousReply = true;
 
-    if (changed || m_viewStateChangeWantsSynchronousReply)
+    if (changed || m_viewStateChangeWantsSynchronousReply || !m_nextViewStateChangeCallbacks.isEmpty())
         m_process->send(Messages::WebPage::SetViewState(m_viewState, m_viewStateChangeWantsSynchronousReply, m_nextViewStateChangeCallbacks), m_pageID);
 
     m_nextViewStateChangeCallbacks.clear();