Changeset 217924 in webkit


Ignore:
Timestamp:
Jun 7, 2017 11:46:21 PM (7 years ago)
Author:
Carlos Garcia Campos
Message:

Remove legacy INSPECTOR_SERVER implementation
https://bugs.webkit.org/show_bug.cgi?id=172966

Reviewed by Žan Doberšek.

.:

  • Source/PlatformWin.cmake:

Source/WebInspectorUI:

Remove InspectorFrontendHostStub and thr web sockets initialization.

  • UserInterface/Base/InspectorFrontendHostStub.js: Removed.
  • UserInterface/Base/Main.js:

(WebInspector.loaded):

  • UserInterface/Main.html:
  • UserInterface/Test.html:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

Source/WebKit2:

  • CMakeLists.txt:
  • Platform/Logging.h:
  • PlatformWPE.cmake:
  • UIProcess/InspectorServer/HTTPRequest.cpp: Removed.
  • UIProcess/InspectorServer/HTTPRequest.h: Removed.
  • UIProcess/InspectorServer/WebInspectorServer.cpp: Removed.
  • UIProcess/InspectorServer/WebInspectorServer.h: Removed.
  • UIProcess/InspectorServer/WebSocketServer.cpp: Removed.
  • UIProcess/InspectorServer/WebSocketServer.h: Removed.
  • UIProcess/InspectorServer/WebSocketServerClient.h: Removed.
  • UIProcess/InspectorServer/WebSocketServerConnection.cpp: Removed.
  • UIProcess/InspectorServer/WebSocketServerConnection.h: Removed.
  • UIProcess/InspectorServer/front-end/inspectorPageIndex.html: Removed.
  • UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp: Removed.
  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::invalidate):

  • UIProcess/WebInspectorProxy.h:
  • UIProcess/WebInspectorProxy.messages.in:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::preferencesDidChange):

  • UIProcess/wpe/WebProcessPoolWPE.cpp:
  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::sendMessageToFrontend):

  • WebProcess/WebPage/WebInspector.h:
  • WebProcess/WebPage/WebInspector.messages.in:
Location:
trunk
Files:
2 deleted
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r217894 r217924  
     12017-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Remove legacy INSPECTOR_SERVER implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=172966
     5
     6        Reviewed by Žan Doberšek.
     7
     8        * Source/PlatformWin.cmake:
     9
    1102017-06-07  Loïc Yhuel  <loic.yhuel@softathome.com>
    211
  • trunk/Source/PlatformWin.cmake

    r205418 r217924  
    77    COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js ${WEB_INSPECTOR_DIR}/Protocol
    88    COMMAND ${CMAKE_COMMAND} -E copy ${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR}
    9     COMMAND ${CMAKE_COMMAND} -E copy ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html ${WEB_INSPECTOR_DIR}
    109    DEPENDS JavaScriptCore WebCore
    1110    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
  • trunk/Source/WebInspectorUI/ChangeLog

    r217912 r217924  
     12017-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Remove legacy INSPECTOR_SERVER implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=172966
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Remove InspectorFrontendHostStub and thr web sockets initialization.
     9
     10        * UserInterface/Base/InspectorFrontendHostStub.js: Removed.
     11        * UserInterface/Base/Main.js:
     12        (WebInspector.loaded):
     13        * UserInterface/Main.html:
     14        * UserInterface/Test.html:
     15        * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
     16        * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
     17
    1182017-06-07  Devin Rousso  <drousso@apple.com>
    219
  • trunk/Source/WebInspectorUI/UserInterface/Base/Main.js

    r217460 r217924  
    5656WebInspector.loaded = function()
    5757{
    58     // Initialize WebSocket to communication.
    59     this._initializeWebSocketIfNeeded();
    60 
    6158    this.debuggableType = InspectorFrontendHost.debuggableType() === "web" ? WebInspector.DebuggableType.Web : WebInspector.DebuggableType.JavaScript;
    6259    this.hasExtraDomains = false;
     
    16541651};
    16551652
    1656 WebInspector._initializeWebSocketIfNeeded = function()
    1657 {
    1658     if (!InspectorFrontendHost.initializeWebSocket)
    1659         return;
    1660 
    1661     var queryParams = parseLocationQueryParameters();
    1662 
    1663     if ("ws" in queryParams)
    1664         var url = "ws://" + queryParams.ws;
    1665     else if ("page" in queryParams) {
    1666         var page = queryParams.page;
    1667         var host = "host" in queryParams ? queryParams.host : window.location.host;
    1668         var url = "ws://" + host + "/devtools/page/" + page;
    1669     }
    1670 
    1671     if (!url)
    1672         return;
    1673 
    1674     InspectorFrontendHost.initializeWebSocket(url);
    1675 };
    1676 
    16771653WebInspector._updateSplitConsoleHeight = function(height)
    16781654{
  • trunk/Source/WebInspectorUI/UserInterface/Main.html

    r217744 r217924  
    242242
    243243    <script src="Base/WebInspector.js"></script>
    244     <script src="Base/InspectorFrontendHostStub.js"></script>
    245244    <script src="Base/Platform.js"></script>
    246245    <script src="Base/LinkedList.js"></script>
  • trunk/Source/WebInspectorUI/UserInterface/Test.html

    r215170 r217924  
    3737
    3838    <script src="Base/WebInspector.js"></script>
    39     <script src="Base/InspectorFrontendHostStub.js"></script>
    4039    <script src="Base/Platform.js"></script>
    4140    <script src="Base/LinkedList.js"></script>
  • trunk/Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.vcxproj

    r196163 r217924  
    1 <?xml version="1.0" encoding="utf-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <ItemGroup Label="ProjectConfigurations">
     
    661661    <None Include="..\UserInterface\InspectorBackend.js" />
    662662    <None Include="..\UserInterface\InspectorFrontendAPI.js" />
    663     <None Include="..\UserInterface\InspectorFrontendHostStub.js" />
    664663    <None Include="..\UserInterface\InspectorObserver.js" />
    665664    <None Include="..\UserInterface\InstrumentIcons.css" />
  • trunk/Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters

    r188993 r217924  
    589589      <Filter>UserInterface</Filter>
    590590    </None>
    591     <None Include="..\UserInterface\InspectorFrontendHostStub.js">
    592       <Filter>UserInterface</Filter>
    593     </None>
    594591    <None Include="..\UserInterface\InspectorObserver.js">
    595592      <Filter>UserInterface</Filter>
  • trunk/Source/WebKit2/CMakeLists.txt

    r217737 r217924  
    3838    "${WEBKIT2_DIR}/UIProcess/Downloads"
    3939    "${WEBKIT2_DIR}/UIProcess/Gamepad"
    40     "${WEBKIT2_DIR}/UIProcess/InspectorServer"
    4140    "${WEBKIT2_DIR}/UIProcess/Launcher"
    4241    "${WEBKIT2_DIR}/UIProcess/Network"
     
    415414    UIProcess/Gamepad/UIGamepadProvider.cpp
    416415
    417     UIProcess/InspectorServer/HTTPRequest.cpp
    418     UIProcess/InspectorServer/WebInspectorServer.cpp
    419     UIProcess/InspectorServer/WebSocketServer.cpp
    420     UIProcess/InspectorServer/WebSocketServerConnection.cpp
    421 
    422416    UIProcess/Launcher/ProcessLauncher.cpp
    423417
  • trunk/Source/WebKit2/ChangeLog

    r217923 r217924  
     12017-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Remove legacy INSPECTOR_SERVER implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=172966
     5
     6        Reviewed by Žan Doberšek.
     7
     8        * CMakeLists.txt:
     9        * Platform/Logging.h:
     10        * PlatformWPE.cmake:
     11        * UIProcess/InspectorServer/HTTPRequest.cpp: Removed.
     12        * UIProcess/InspectorServer/HTTPRequest.h: Removed.
     13        * UIProcess/InspectorServer/WebInspectorServer.cpp: Removed.
     14        * UIProcess/InspectorServer/WebInspectorServer.h: Removed.
     15        * UIProcess/InspectorServer/WebSocketServer.cpp: Removed.
     16        * UIProcess/InspectorServer/WebSocketServer.h: Removed.
     17        * UIProcess/InspectorServer/WebSocketServerClient.h: Removed.
     18        * UIProcess/InspectorServer/WebSocketServerConnection.cpp: Removed.
     19        * UIProcess/InspectorServer/WebSocketServerConnection.h: Removed.
     20        * UIProcess/InspectorServer/front-end/inspectorPageIndex.html: Removed.
     21        * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp: Removed.
     22        * UIProcess/WebInspectorProxy.cpp:
     23        (WebKit::WebInspectorProxy::invalidate):
     24        * UIProcess/WebInspectorProxy.h:
     25        * UIProcess/WebInspectorProxy.messages.in:
     26        * UIProcess/WebPageProxy.cpp:
     27        (WebKit::WebPageProxy::initializeWebPage):
     28        (WebKit::WebPageProxy::preferencesDidChange):
     29        * UIProcess/wpe/WebProcessPoolWPE.cpp:
     30        * WebProcess/WebPage/WebInspector.cpp:
     31        (WebKit::WebInspector::sendMessageToFrontend):
     32        * WebProcess/WebPage/WebInspector.h:
     33        * WebProcess/WebPage/WebInspector.messages.in:
     34
    1352017-06-07  Dan Bernstein  <mitz@apple.com>
    236
  • trunk/Source/WebKit2/Platform/Logging.h

    r213167 r217924  
    4848    M(IDB) \
    4949    M(IndexedDB) \
    50     M(InspectorServer) \
    5150    M(IPC) \
    5251    M(KeyHandling) \
  • trunk/Source/WebKit2/PlatformWPE.cmake

    r217779 r217924  
    111111    UIProcess/API/wpe/WPEView.cpp
    112112    UIProcess/API/wpe/WPEViewClient.cpp
    113 
    114     UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp
    115113
    116114    UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp
     
    321319)
    322320
    323 add_custom_command(
    324     OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/WebKit2InspectorGResourceBundle.c
    325     DEPENDS ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKit2InspectorGResourceBundle.xml
    326             ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
    327     COMMAND glib-compile-resources --generate --sourcedir=${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end --target=${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/WebKit2InspectorGResourceBundle.c ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKit2InspectorGResourceBundle.xml
    328     VERBATIM
    329 )
    330 
    331321list(APPEND WPEWebInspectorResources_DERIVED_SOURCES
    332322    ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.c
    333     ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/WebKit2InspectorGResourceBundle.c
    334323)
    335324
  • trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp

    r213338 r217924  
    4848#include <wtf/NeverDestroyed.h>
    4949
    50 #if ENABLE(INSPECTOR_SERVER)
    51 #include "WebInspectorServer.h"
    52 #endif
    53 
    5450using namespace WebCore;
    5551
     
    8884void WebInspectorProxy::invalidate()
    8985{
    90 #if ENABLE(INSPECTOR_SERVER)
    91     if (m_remoteInspectionPageId)
    92         WebInspectorServer::singleton().unregisterPage(m_remoteInspectionPageId);
    93 #endif
    94 
    9586    m_inspectedPage->process().removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID());
    9687
     
    391382    *newMenuRef = menuItems;
    392383}
    393 
    394 #if ENABLE(INSPECTOR_SERVER)
    395 void WebInspectorProxy::enableRemoteInspection()
    396 {
    397     if (!m_remoteInspectionPageId)
    398         m_remoteInspectionPageId = WebInspectorServer::singleton().registerPage(this);
    399 }
    400 
    401 void WebInspectorProxy::remoteFrontendConnected()
    402 {
    403     m_inspectedPage->process().send(Messages::WebInspector::RemoteFrontendConnected(), m_inspectedPage->pageID());
    404 }
    405 
    406 void WebInspectorProxy::remoteFrontendDisconnected()
    407 {
    408     m_inspectedPage->process().send(Messages::WebInspector::RemoteFrontendDisconnected(), m_inspectedPage->pageID());
    409 }
    410 
    411 void WebInspectorProxy::dispatchMessageFromRemoteFrontend(const String& message)
    412 {
    413     m_inspectedPage->process().send(Messages::WebInspector::SendMessageToBackend(message), m_inspectedPage->pageID());
    414 }
    415 #endif
    416384
    417385void WebInspectorProxy::eagerlyCreateInspectorPage()
     
    635603}
    636604
    637 #if ENABLE(INSPECTOR_SERVER)
    638 void WebInspectorProxy::sendMessageToRemoteFrontend(const String& message)
    639 {
    640     ASSERT(m_remoteInspectionPageId);
    641     WebInspectorServer::singleton().sendMessageOverConnection(m_remoteInspectionPageId, message);
    642 }
    643 #endif
    644 
    645605// Unsupported configurations can use the stubs provided here.
    646606
  • trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h

    r216497 r217924  
    149149    static bool isMainOrTestInspectorPage(const WebCore::URL&);
    150150
    151 #if ENABLE(INSPECTOR_SERVER)
    152     void enableRemoteInspection();
    153     void remoteFrontendConnected();
    154     void remoteFrontendDisconnected();
    155     void dispatchMessageFromRemoteFrontend(const String& message);
    156     int remoteInspectionPageID() const { return m_remoteInspectionPageId; }
    157 #endif
    158 
    159151    static const unsigned minimumWindowWidth;
    160152    static const unsigned minimumWindowHeight;
     
    210202    void append(const String& filename, const String& content);
    211203
    212 #if ENABLE(INSPECTOR_SERVER)
    213     void sendMessageToRemoteFrontend(const String& message);
    214 #endif
    215 
    216204    bool canAttach() const { return m_canAttach; }
    217205    bool shouldOpenAttached();
     
    261249    String m_inspectedURLString;
    262250#endif
    263 #if ENABLE(INSPECTOR_SERVER)
    264     int m_remoteInspectionPageId { 0 };
    265 #endif
    266251};
    267252
  • trunk/Source/WebKit2/UIProcess/WebInspectorProxy.messages.in

    r212597 r217924  
    4545
    4646    StartWindowDrag()
    47 
    48 #if ENABLE(INSPECTOR_SERVER)
    49     SendMessageToRemoteFrontend(String message)
    50 #endif
    5147}
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r217910 r217924  
    797797#endif
    798798
    799 #if ENABLE(INSPECTOR_SERVER)
    800     if (m_preferences->developerExtrasEnabled())
    801         inspector()->enableRemoteInspection();
    802 #endif
    803 
    804799    process().send(Messages::WebProcess::CreateWebPage(m_pageID, creationParameters()), 0);
    805800
     
    30723067    if (!isValid())
    30733068        return;
    3074 
    3075 #if ENABLE(INSPECTOR_SERVER)
    3076     if (m_preferences->developerExtrasEnabled())
    3077         inspector()->enableRemoteInspection();
    3078 #endif
    30793069
    30803070    updateThrottleState();
  • trunk/Source/WebKit2/UIProcess/wpe/WebProcessPoolWPE.cpp

    r217832 r217924  
    3333#include "NetworkProcessMessages.h"
    3434#include "WebCookieManagerProxy.h"
    35 #include "WebInspectorServer.h"
    3635#include "WebProcessCreationParameters.h"
    3736#include "WebProcessMessages.h"
  • trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp

    r211443 r217924  
    287287void WebInspector::sendMessageToFrontend(const String& message)
    288288{
    289 #if ENABLE(INSPECTOR_SERVER)
    290     if (m_remoteFrontendConnected)
    291         WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID());
    292     else
    293 #endif
    294         m_frontendConnection->send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);
    295 }
    296 
    297 #if ENABLE(INSPECTOR_SERVER)
    298 void WebInspector::remoteFrontendConnected()
    299 {
    300     if (m_page->corePage()) {
    301         m_remoteFrontendConnected = true;
    302         m_page->corePage()->inspectorController().connectFrontend(this);
    303     }
    304 }
    305 
    306 void WebInspector::remoteFrontendDisconnected()
    307 {
    308     m_remoteFrontendConnected = false;
    309 
    310     if (m_page->corePage())
    311         m_page->corePage()->inspectorController().disconnectFrontend(this);
    312 }
    313 #endif
     289    m_frontendConnection->send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);
     290}
    314291
    315292} // namespace WebKit
  • trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.h

    r207928 r217924  
    8484    void sendMessageToBackend(const String&);
    8585
    86 #if ENABLE(INSPECTOR_SERVER)
    87     void remoteFrontendConnected();
    88     void remoteFrontendDisconnected();
    89 #endif
    90 
    9186    void disconnectFromPage() { close(); }
    9287
     
    111106    bool m_attached { false };
    112107    bool m_previousCanAttach { false };
    113 #if ENABLE(INSPECTOR_SERVER)
    114     bool m_remoteFrontendConnected { false };
    115 #endif
    116108};
    117109
  • trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.messages.in

    r201101 r217924  
    4242
    4343    SendMessageToBackend(String message)
    44 
    45 #if ENABLE(INSPECTOR_SERVER)
    46     RemoteFrontendConnected()
    47     RemoteFrontendDisconnected()
    48 #endif
    4944}
Note: See TracChangeset for help on using the changeset viewer.