Title: [174013] trunk/Source/WebKit2
- Revision
- 174013
- Author
- [email protected]
- Date
- 2014-09-26 10:50:05 -0700 (Fri, 26 Sep 2014)
Log Message
REGRESSION(r173929): Web inspector doesn't work after r173929 when INSPECTOR_SERVER is enabled
https://bugs.webkit.org/show_bug.cgi?id=137150
Reviewed by Timothy Hatcher.
The inspector doesn't show any information about the inspected
page because it's sending messages to a remote frontend that is
not running.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::WebInspector): Initialize m_remoteFrontendConnected.
(WebKit::WebInspector::sendMessageToFrontend): Send
SendMessageToRemoteFrontend message to the UI process when remote
frontend is connected, or SendMessageToFrontend message to
WebInspectorUI otherwise.
(WebKit::WebInspector::remoteFrontendConnected): Set m_remoteFrontendConnected to true.
(WebKit::WebInspector::remoteFrontendDisconnected): Set m_remoteFrontendConnected to false.
* WebProcess/WebPage/WebInspector.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (174012 => 174013)
--- trunk/Source/WebKit2/ChangeLog 2014-09-26 17:49:57 UTC (rev 174012)
+++ trunk/Source/WebKit2/ChangeLog 2014-09-26 17:50:05 UTC (rev 174013)
@@ -1,3 +1,24 @@
+2014-09-26 Carlos Garcia Campos <[email protected]>
+
+ REGRESSION(r173929): Web inspector doesn't work after r173929 when INSPECTOR_SERVER is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=137150
+
+ Reviewed by Timothy Hatcher.
+
+ The inspector doesn't show any information about the inspected
+ page because it's sending messages to a remote frontend that is
+ not running.
+
+ * WebProcess/WebPage/WebInspector.cpp:
+ (WebKit::WebInspector::WebInspector): Initialize m_remoteFrontendConnected.
+ (WebKit::WebInspector::sendMessageToFrontend): Send
+ SendMessageToRemoteFrontend message to the UI process when remote
+ frontend is connected, or SendMessageToFrontend message to
+ WebInspectorUI otherwise.
+ (WebKit::WebInspector::remoteFrontendConnected): Set m_remoteFrontendConnected to true.
+ (WebKit::WebInspector::remoteFrontendDisconnected): Set m_remoteFrontendConnected to false.
+ * WebProcess/WebPage/WebInspector.h:
+
2014-09-26 Alberto Garcia <[email protected]>
[GTK] Don't include full path names in WebKitEnumTypes.h
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp (174012 => 174013)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp 2014-09-26 17:49:57 UTC (rev 174012)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp 2014-09-26 17:50:05 UTC (rev 174013)
@@ -64,6 +64,9 @@
: m_page(page)
, m_attached(false)
, m_previousCanAttach(false)
+#if ENABLE(INSPECTOR_SERVER)
+ , m_remoteFrontendConnected(false)
+#endif
{
}
@@ -213,23 +216,26 @@
bool WebInspector::sendMessageToFrontend(const String& message)
{
-#if !ENABLE(INSPECTOR_SERVER)
- m_frontendConnection->send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);
-#else
- WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID());
+#if ENABLE(INSPECTOR_SERVER)
+ if (m_remoteFrontendConnected)
+ WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID());
+ else
#endif
+ m_frontendConnection->send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);
return true;
}
#if ENABLE(INSPECTOR_SERVER)
void WebInspector::remoteFrontendConnected()
{
+ m_remoteFrontendConnected = true;
bool isAutomaticInspection = false;
m_page->corePage()->inspectorController().connectFrontend(this, isAutomaticInspection);
}
void WebInspector::remoteFrontendDisconnected()
{
+ m_remoteFrontendConnected = false;
m_page->corePage()->inspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed);
}
#endif
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.h (174012 => 174013)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.h 2014-09-26 17:49:57 UTC (rev 174012)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.h 2014-09-26 17:50:05 UTC (rev 174013)
@@ -104,6 +104,9 @@
bool m_attached;
bool m_previousCanAttach;
+#if ENABLE(INSPECTOR_SERVER)
+ bool m_remoteFrontendConnected;
+#endif
};
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes