2009-10-06 Pavel Feldman <pfeldman@chromium.org>
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Oct 2009 15:48:52 +0000 (15:48 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Oct 2009 15:48:52 +0000 (15:48 +0000)
        Reviewed by Timothy Hatcher.

        Web Inspector: close inspector client view on
        InspectorController::close API call.

        In order to run batch web inspector layout tests (and not affect
        subsequent tests) we should close inspector client's view upon
        InspectorController::close API call.

        https://bugs.webkit.org/show_bug.cgi?id=30009

WebCore:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::inspectedPageDestroyed):
        (WebCore::InspectorController::close):
WebKit/gtk:
        * WebCoreSupport/InspectorClientGtk.cpp:
        (WebKit::InspectorClient::createPage):
WebKit/mac:
        * WebCoreSupport/WebInspectorClient.mm:
        (WebInspectorClient::createPage):
WebKit/qt:
        * WebCoreSupport/InspectorClientQt.cpp:
        (WebCore::InspectorClientQt::createPage):
WebKit/win:
        * WebCoreSupport/WebInspectorClient.cpp:
        (WebInspectorClient::createPage):

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

WebCore/ChangeLog
WebCore/inspector/InspectorController.cpp
WebKit/gtk/ChangeLog
WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebCoreSupport/WebInspectorClient.mm
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
WebKit/win/ChangeLog
WebKit/win/WebCoreSupport/WebInspectorClient.cpp

index 3cc6faf..d3b9fd0 100644 (file)
@@ -1,3 +1,20 @@
+2009-10-06  Pavel Feldman  <pfeldman@chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Web Inspector: close inspector client view on
+        InspectorController::close API call.
+
+        In order to run batch web inspector layout tests (and not affect
+        subsequent tests) we should close inspector client's view upon
+        InspectorController::close API call.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30009
+
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::inspectedPageDestroyed):
+        (WebCore::InspectorController::close):
+
 2009-10-06  Simon Hausmann  <simon.hausmann@nokia.com>
 
         Reviewed by Tor Arne Vestbø.
index 15d7325..dba2d25 100644 (file)
@@ -179,11 +179,6 @@ void InspectorController::inspectedPageDestroyed()
     if (m_scriptState)
         ScriptGlobalObject::remove(m_scriptState, "InspectorController");
 
-    if (m_page) {
-        m_page->setParentInspectorController(0);
-        m_page = 0;
-    }
-
     ASSERT(m_inspectedPage);
     m_inspectedPage = 0;
 
@@ -621,6 +616,9 @@ void InspectorController::close()
     m_domAgent = 0;
     m_timelineAgent = 0;
     m_scriptState = 0;
+    if (m_page)
+        m_page->setParentInspectorController(0);
+    m_page = 0;
 }
 
 void InspectorController::showWindow()
index d33f4de..b0b6cfa 100644 (file)
@@ -1,3 +1,19 @@
+2009-10-06  Pavel Feldman  <pfeldman@chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Web Inspector: close inspector client view on
+        InspectorController::close API call.
+
+        In order to run batch web inspector layout tests (and not affect 
+        subsequent tests) we should close inspector client's view upon
+        InspectorController::close API call.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30009
+
+        * WebCoreSupport/InspectorClientGtk.cpp:
+        (WebKit::InspectorClient::createPage):
+
 2009-10-06  Alejandro G. Castro  <alex@igalia.com>
 
         Reviewed by Xan Lopez.
index 908bffa..fef07c1 100644 (file)
@@ -68,8 +68,13 @@ void InspectorClient::webViewDestroyed()
 
 Page* InspectorClient::createPage()
 {
-    if (m_webView)
-      return core(m_webView);
+    if (m_webView) {
+        gboolean handled = FALSE;
+        g_signal_emit_by_name(m_webInspector, "destroy", &handled);
+
+        /* we can now dispose our own reference */
+        g_object_unref(m_webInspector);
+    }
 
     // This g_object_get will ref the inspector. We're not doing an
     // unref if this method succeeds because the inspector object must
index 5d03b3d..937ee8c 100644 (file)
@@ -1,3 +1,19 @@
+2009-10-06  Pavel Feldman  <pfeldman@chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Web Inspector: close inspector client view on
+        InspectorController::close API call.
+
+        In order to run batch web inspector layout tests (and not affect 
+        subsequent tests) we should close inspector client's view upon
+        InspectorController::close API call.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30009
+
+        * WebCoreSupport/WebInspectorClient.mm:
+        (WebInspectorClient::createPage):
+
 2009-10-05  Dan Bernstein  <mitz@apple.com>
 
         Rubber-stamped by Mark Rowe.
index 3f0b43d..c6b3e76 100644 (file)
@@ -81,8 +81,9 @@ void WebInspectorClient::inspectorDestroyed()
 
 Page* WebInspectorClient::createPage()
 {
-    if (!m_windowController)
-        m_windowController.adoptNS([[WebInspectorWindowController alloc] initWithInspectedWebView:m_webView]);
+    if (m_windowController)
+        [[m_windowController.get() webView] close];
+    m_windowController.adoptNS([[WebInspectorWindowController alloc] initWithInspectedWebView:m_webView]);
 
     return core([m_windowController.get() webView]);
 }
index 7a3feb1..6755e00 100644 (file)
@@ -1,3 +1,19 @@
+2009-10-06  Pavel Feldman  <pfeldman@chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Web Inspector: close inspector client view on
+        InspectorController::close API call.
+
+        In order to run batch web inspector layout tests (and not affect
+        subsequent tests) we should close inspector client's view upon
+        InspectorController::close API call.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30009
+
+        * WebCoreSupport/InspectorClientQt.cpp:
+        (WebCore::InspectorClientQt::createPage):
+
 2009-10-06  Janne Koskinen  <janne.p.koskinen@digia.com>
 
         Reviewed by Simon Hausmann.
index 3931a85..12f405c 100644 (file)
@@ -84,9 +84,6 @@ void InspectorClientQt::inspectorDestroyed()
 
 Page* InspectorClientQt::createPage()
 {
-    if (m_inspectorView)
-        return m_inspectorView->page()->d->page;
-
     QWebView* inspectorView = new QWebView;
     InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView);
     inspectorView->setPage(inspectorPage);
index 14d1c31..e054982 100644 (file)
@@ -1,3 +1,19 @@
+2009-10-06  Pavel Feldman  <pfeldman@chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Web Inspector: close inspector client view on
+        InspectorController::close API call.
+
+        In order to run batch web inspector layout tests (and not affect 
+        subsequent tests) we should close inspector client's view upon
+        InspectorController::close API call.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30009
+
+        * WebCoreSupport/WebInspectorClient.cpp:
+        (WebInspectorClient::createPage):
+
 2009-10-06  David Levin  <levin@chromium.org>
 
         Reviewed by NOBODY (windows build fix).
index ba724b4..b3bd49e 100644 (file)
@@ -99,13 +99,11 @@ void WebInspectorClient::inspectorDestroyed()
 
 Page* WebInspectorClient::createPage()
 {
-    if (m_webView)
-        return core(m_webView.get());
-
-    ASSERT(!m_hwnd);
-
     registerWindowClass();
 
+    if (m_hwnd)
+        ::DestroyWindow(m_hwnd);
+
     m_hwnd = ::CreateWindowEx(0, kWebInspectorWindowClassName, 0, WS_OVERLAPPEDWINDOW,
         defaultWindowRect().x(), defaultWindowRect().y(), defaultWindowRect().width(), defaultWindowRect().height(),
         0, 0, 0, 0);