[WK2] Remove some bad stuff from WebPageProxy
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Nov 2014 00:26:35 +0000 (00:26 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Nov 2014 00:26:35 +0000 (00:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138896

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-24
Reviewed by Sam Weinig.

The state loadStateAtProcessExit does not seem to be used anywhere.

The state urlAtProcessExit only exists to forward the url from
WebPageProxy::resetStateAfterProcessExited() to the coordinated graphics code
WebView::processDidExit().

* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::processDidExit):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::urlAtProcessExit): Deleted.
(WebKit::WebPageProxy::loadStateAtProcessExit): Deleted.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h

index cbffa93..310bdc9 100644 (file)
@@ -1,3 +1,25 @@
+2014-11-24  Benjamin Poulain  <bpoulain@apple.com>
+
+        [WK2] Remove some bad stuff from WebPageProxy
+        https://bugs.webkit.org/show_bug.cgi?id=138896
+
+        Reviewed by Sam Weinig.
+
+        The state loadStateAtProcessExit does not seem to be used anywhere.
+
+        The state urlAtProcessExit only exists to forward the url from
+        WebPageProxy::resetStateAfterProcessExited() to the coordinated graphics code
+        WebView::processDidExit().
+
+        * UIProcess/CoordinatedGraphics/WebView.cpp:
+        (WebKit::WebView::processDidExit):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::resetStateAfterProcessExited):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::urlAtProcessExit): Deleted.
+        (WebKit::WebPageProxy::loadStateAtProcessExit): Deleted.
+
 2014-11-24  Ryuan Choi  <ryuan.choi@navercorp.com>
 
         [EFL] REGRESSION(176066): It made all performance tests fail
index 1c844db..3186724 100644 (file)
@@ -34,6 +34,8 @@
 #include "CoordinatedLayerTreeHostProxy.h"
 #include "NotImplemented.h"
 #include "ViewState.h"
+#include "WebBackForwardList.h"
+#include "WebBackForwardListItem.h"
 #include "WebContextMenuProxy.h"
 #include "WebPageProxy.h"
 
@@ -345,7 +347,7 @@ bool WebView::isViewInWindow()
 
 void WebView::processDidExit()
 {
-    m_client.webProcessCrashed(this, m_page->urlAtProcessExit());
+    m_client.webProcessCrashed(this, m_page->backForwardList()->currentItem()->url());
 }
 
 void WebView::didRelaunchProcess()
index 1f399bf..51672cc 100644 (file)
@@ -284,7 +284,6 @@ WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, uin
     , m_viewState(ViewState::NoFlags)
     , m_viewWasEverInWindow(false)
     , m_backForwardList(WebBackForwardList::create(*this))
-    , m_loadStateAtProcessExit(FrameLoadState::State::Finished)
 #if PLATFORM(MAC) && !USE(ASYNC_NSTEXTINPUTCLIENT)
     , m_temporarilyClosedComposition(false)
 #endif
@@ -4545,11 +4544,6 @@ void WebPageProxy::resetStateAfterProcessExited()
     m_isValid = false;
     m_isPageSuspended = false;
 
-    if (m_mainFrame) {
-        m_urlAtProcessExit = m_mainFrame->url();
-        m_loadStateAtProcessExit = m_mainFrame->frameLoadState().m_state;
-    }
-
     m_pageClient.processDidExit();
 
     resetState(ResetStateReason::WebProcessExited);
index 36d46ef..6ddb85b 100644 (file)
@@ -756,9 +756,6 @@ public:
 
     bool isValid() const;
 
-    const String& urlAtProcessExit() const { return m_urlAtProcessExit; }
-    FrameLoadState::State loadStateAtProcessExit() const { return m_loadStateAtProcessExit; }
-
 #if ENABLE(DRAG_SUPPORT)
     WebCore::DragOperation currentDragOperation() const { return m_currentDragOperation; }
     bool currentDragIsOverFileInput() const { return m_currentDragIsOverFileInput; }
@@ -1420,9 +1417,6 @@ private:
 
     String m_toolTip;
 
-    String m_urlAtProcessExit;
-    FrameLoadState::State m_loadStateAtProcessExit;
-
     EditorState m_editorState;
 #if PLATFORM(MAC) && !USE(ASYNC_NSTEXTINPUTCLIENT)
     bool m_temporarilyClosedComposition; // Editor state changed from hasComposition to !hasComposition, but that was only with shouldIgnoreCompositionSelectionChange yet.