Title: [158451] trunk/Source/WebKit2
Revision
158451
Author
barraclo...@apple.com
Date
2013-11-01 13:42:25 -0700 (Fri, 01 Nov 2013)

Log Message

Rename InWindowState -> ViewState
https://bugs.webkit.org/show_bug.cgi?id=123584

Rubber stamped by Sam Weinig.

WebPageProxy::setViewState offers the option to wait for a reply. Previously this option
was only available via setIsInWindow, hence the mechanism to wait to the update has
'InWindowState' in method and variable names (i.e.
'WebPageProxy::waitForDidUpdateInWindowState'). Since the mechanism is now applicable to
all ViewState changes, rename to reflect this.

* UIProcess/API/mac/WKView.mm:
(-[WKView endDeferringViewInWindowChangesSync]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::waitForDidUpdateViewState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::didUpdateViewState):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didUpdateViewStateTimerFired):
(WebKit::WebPage::setViewState):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::didUpdateViewStateTimerFired):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (158450 => 158451)


--- trunk/Source/WebKit2/ChangeLog	2013-11-01 20:15:27 UTC (rev 158450)
+++ trunk/Source/WebKit2/ChangeLog	2013-11-01 20:42:25 UTC (rev 158451)
@@ -1,3 +1,34 @@
+2013-10-31  Gavin Barraclough  <barraclo...@apple.com>
+
+        Rename InWindowState -> ViewState
+        https://bugs.webkit.org/show_bug.cgi?id=123584
+
+        Rubber stamped by Sam Weinig.
+
+        WebPageProxy::setViewState offers the option to wait for a reply. Previously this option
+        was only available via setIsInWindow, hence the mechanism to wait to the update has
+        'InWindowState' in method and variable names (i.e.
+        'WebPageProxy::waitForDidUpdateInWindowState'). Since the mechanism is now applicable to
+        all ViewState changes, rename to reflect this.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView endDeferringViewInWindowChangesSync]):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::waitForDidUpdateViewState):
+        (WebKit::WebPageProxy::resetStateAfterProcessExited):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::didUpdateViewState):
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        (WebKit::WebPage::didUpdateViewStateTimerFired):
+        (WebKit::WebPage::setViewState):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::didUpdateViewStateTimerFired):
+
 2013-11-01  Tim Horton  <timothy_hor...@apple.com>
 
         Remote Layer Tree: Vend layer contents via IOSurfaces

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (158450 => 158451)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2013-11-01 20:15:27 UTC (rev 158450)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2013-11-01 20:42:25 UTC (rev 158451)
@@ -3171,7 +3171,7 @@
     }
 
     if (hasPendingViewInWindowChange)
-        _data->_page->waitForDidUpdateInWindowState();
+        _data->_page->waitForDidUpdateViewState();
 }
 
 - (BOOL)isDeferringViewInWindowChanges

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (158450 => 158451)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2013-11-01 20:15:27 UTC (rev 158450)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2013-11-01 20:42:25 UTC (rev 158451)
@@ -307,7 +307,7 @@
     , m_autoSizingShouldExpandToViewHeight(false)
     , m_mediaVolume(1)
     , m_mayStartMediaWhenInWindow(true)
-    , m_waitingForDidUpdateInWindowState(false)
+    , m_waitingForDidUpdateViewState(false)
 #if PLATFORM(MAC)
     , m_exposedRectChangedTimer(this, &WebPageProxy::exposedRectChangedTimerFired)
     , m_clipsToExposedRect(false)
@@ -1036,20 +1036,20 @@
     updateBackingStoreDiscardableState();
 }
 
-void WebPageProxy::waitForDidUpdateInWindowState()
+void WebPageProxy::waitForDidUpdateViewState()
 {
     // If we have previously timed out with no response from the WebProcess, don't block the UIProcess again until it starts responding.
-    if (m_waitingForDidUpdateInWindowState)
+    if (m_waitingForDidUpdateViewState)
         return;
 
     if (!isValid())
         return;
 
-    m_waitingForDidUpdateInWindowState = true;
+    m_waitingForDidUpdateViewState = true;
 
     if (!m_process->isLaunching()) {
-        const double inWindowStateUpdateTimeout = 0.25;
-        m_process->connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::DidUpdateInWindowState>(m_pageID, inWindowStateUpdateTimeout);
+        const double viewStateUpdateTimeout = 0.25;
+        m_process->connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::DidUpdateViewState>(m_pageID, viewStateUpdateTimeout);
     }
 }
 
@@ -3778,7 +3778,7 @@
 
     m_isValid = false;
     m_isPageSuspended = false;
-    m_waitingForDidUpdateInWindowState = false;
+    m_waitingForDidUpdateViewState = false;
 
     if (m_mainFrame) {
         m_urlAtProcessExit = m_mainFrame->url();

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (158450 => 158451)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2013-11-01 20:15:27 UTC (rev 158450)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2013-11-01 20:42:25 UTC (rev 158451)
@@ -327,7 +327,7 @@
     enum class WantsReplyOrNot { DoesNotWantReply, DoesWantReply };
     void viewStateDidChange(ViewState::Flags mayHaveChanged, WantsReplyOrNot = WantsReplyOrNot::DoesNotWantReply);
     bool isInWindow() const { return m_viewState & ViewState::IsInWindow; }
-    void waitForDidUpdateInWindowState();
+    void waitForDidUpdateViewState();
 
     WebCore::IntSize viewSize() const;
     bool isViewVisible() const { return m_viewState & ViewState::IsVisible; }
@@ -465,7 +465,7 @@
     void listenForLayoutMilestones(WebCore::LayoutMilestones);
 
     void setVisibilityState(WebCore::PageVisibilityState, bool isInitialState);
-    void didUpdateInWindowState() { m_waitingForDidUpdateInWindowState = false; }
+    void didUpdateViewState() { m_waitingForDidUpdateViewState = false; }
 
     bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
     bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; }
@@ -1229,7 +1229,7 @@
     float m_mediaVolume;
     bool m_mayStartMediaWhenInWindow;
 
-    bool m_waitingForDidUpdateInWindowState;
+    bool m_waitingForDidUpdateViewState;
 
 #if PLATFORM(MAC)
     WebCore::Timer<WebPageProxy> m_exposedRectChangedTimer;

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (158450 => 158451)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2013-11-01 20:15:27 UTC (rev 158450)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2013-11-01 20:42:25 UTC (rev 158451)
@@ -308,7 +308,7 @@
     FindPlugin(WTF::String mimeType, uint32_t processType, WTF::String urlString, WTF::String frameURLString, WTF::String pageURLString, bool allowOnlyApplicationPlugins) -> (uint64_t pluginProcessToken, WTF::String newMIMEType, uint32_t pluginLoadPolicy, WTF::String unavailabilityDescription)
 #endif
 
-    DidUpdateInWindowState()
+    DidUpdateViewState()
     
     DidSaveToPageCache()
 }

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (158450 => 158451)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-11-01 20:15:27 UTC (rev 158450)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-11-01 20:42:25 UTC (rev 158451)
@@ -249,7 +249,7 @@
     , m_accessibilityObject(0)
 #endif
     , m_setCanStartMediaTimer(RunLoop::main(), this, &WebPage::setCanStartMediaTimerFired)
-    , m_sendDidUpdateInWindowStateTimer(RunLoop::main(), this, &WebPage::didUpdateInWindowStateTimerFired)
+    , m_sendDidUpdateViewStateTimer(RunLoop::main(), this, &WebPage::didUpdateViewStateTimerFired)
     , m_findController(this)
 #if ENABLE(INPUT_TYPE_COLOR)
     , m_activeColorChooser(0)
@@ -1970,9 +1970,9 @@
 }
 
 #if !PLATFORM(MAC)
-void WebPage::didUpdateInWindowStateTimerFired()
+void WebPage::didUpdateViewStateTimerFired()
 {
-    send(Messages::WebPageProxy::DidUpdateInWindowState());
+    send(Messages::WebPageProxy::DidUpdateViewState());
 }
 #endif
 
@@ -2015,7 +2015,7 @@
         layoutIfNeeded();
 }
 
-void WebPage::setViewState(ViewState::Flags viewState, bool wantsDidUpdateInWindowState)
+void WebPage::setViewState(ViewState::Flags viewState, bool wantsDidUpdateViewState)
 {
     ViewState::Flags changed = m_viewState ^ viewState;
 
@@ -2036,8 +2036,8 @@
 
     m_viewState = viewState;
 
-    if (wantsDidUpdateInWindowState)
-        m_sendDidUpdateInWindowStateTimer.startOneShot(0);
+    if (wantsDidUpdateViewState)
+        m_sendDidUpdateViewStateTimer.startOneShot(0);
 }
 
 void WebPage::didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (158450 => 158451)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2013-11-01 20:15:27 UTC (rev 158450)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2013-11-01 20:42:25 UTC (rev 158451)
@@ -685,7 +685,7 @@
     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&);
     void setWindowResizerSize(const WebCore::IntSize&);
     void setIsInWindow(bool);
-    void setViewState(ViewState::Flags, bool wantsDidUpdateInWindowState);
+    void setViewState(ViewState::Flags, bool wantsDidUpdateViewState);
     void validateCommand(const String&, uint64_t);
     void executeEditCommand(const String&);
 
@@ -803,7 +803,7 @@
 
     void changeSelectedIndex(int32_t index);
     void setCanStartMediaTimerFired();
-    void didUpdateInWindowStateTimerFired();
+    void didUpdateViewStateTimerFired();
 
     bool canHandleUserEvents() const;
 
@@ -902,7 +902,7 @@
     RefPtr<PageBanner> m_footerBanner;
 
     WebCore::RunLoop::Timer<WebPage> m_setCanStartMediaTimer;
-    WebCore::RunLoop::Timer<WebPage> m_sendDidUpdateInWindowStateTimer;
+    WebCore::RunLoop::Timer<WebPage> m_sendDidUpdateViewStateTimer;
     bool m_mayStartMediaWhenInWindow;
 
     HashMap<uint64_t, RefPtr<WebUndoStep>> m_undoStepMap;

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (158450 => 158451)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2013-11-01 20:15:27 UTC (rev 158450)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2013-11-01 20:42:25 UTC (rev 158451)
@@ -22,7 +22,7 @@
 
 messages -> WebPage LegacyReceiver {
     SetInitialFocus(bool forward, bool isKeyboardEventValid, WebKit::WebKeyboardEvent event)
-    SetViewState(unsigned viewState, bool wantsDidUpdateInWindowState)
+    SetViewState(unsigned viewState, bool wantsDidUpdateViewState)
 
     SetDrawsBackground(bool drawsBackground)
     SetDrawsTransparentBackground(bool drawsTransparentBackground)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (158450 => 158451)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2013-11-01 20:15:27 UTC (rev 158450)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2013-11-01 20:42:25 UTC (rev 158451)
@@ -954,10 +954,10 @@
     }
 }
 
-void WebPage::didUpdateInWindowStateTimerFired()
+void WebPage::didUpdateViewStateTimerFired()
 {
     [CATransaction flush];
-    send(Messages::WebPageProxy::DidUpdateInWindowState());
+    send(Messages::WebPageProxy::DidUpdateViewState());
 }
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to