Web Inspector: convert some InspectorFrontendHost methods to getters
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Dec 2019 20:42:43 +0000 (20:42 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Dec 2019 20:42:43 +0000 (20:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=205475

Reviewed by Devin Rousso.

Source/WebCore:

No reason for these to be method calls, so expose as getters / attributes instead.

* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::isRemote const):
(WebCore::debuggableTypeToString):
(WebCore::InspectorFrontendHost::localizedStringsURL): Deleted.
(WebCore::InspectorFrontendHost::backendCommandsURL): Deleted.
(WebCore::InspectorFrontendHost::debuggableType): Deleted.
(WebCore::InspectorFrontendHost::inspectionLevel): Deleted.
(WebCore::InspectorFrontendHost::platform): Deleted.
(WebCore::InspectorFrontendHost::port): Deleted.
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* testing/Internals.cpp:

Source/WebInspectorUI:

No reason for these to be method calls, so expose as getters / attributes instead.

* UserInterface/Base/LoadLocalizedStrings.js:
* UserInterface/Base/Main.js:
* UserInterface/Base/ObjectStore.js:
(WI.ObjectStore.get _databaseName):
* UserInterface/Base/Platform.js:
* UserInterface/Base/Setting.js:
(WI.Setting._localStorageKey):
* UserInterface/Debug/Bootstrap.js:
(WI.runBootstrapOperations):
* UserInterface/Protocol/LoadInspectorBackendCommands.js:

Source/WebKit:

No reason for these to be method calls, so expose as getters / attributes instead.

* WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:
(WebKit::WebInspectorUI::localizedStringsURL const):
(WebKit::RemoteWebInspectorUI::localizedStringsURL const):
(WebKit::WebInspectorUI::localizedStringsURL): Deleted.
(WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.
* WebProcess/WebPage/mac/WebInspectorUIMac.mm:
(WebKit::WebInspectorUI::localizedStringsURL const):
(WebKit::RemoteWebInspectorUI::localizedStringsURL const):
(WebKit::WebInspectorUI::localizedStringsURL): Deleted.
(WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.
* WebProcess/WebPage/win/WebInspectorUIWin.cpp:
(WebKit::WebInspectorUI::localizedStringsURL const):
(WebKit::RemoteWebInspectorUI::localizedStringsURL const):
(WebKit::WebInspectorUI::localizedStringsURL): Deleted.
(WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.
* WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp:
(WebKit::WebInspectorUI::localizedStringsURL const):
(WebKit::RemoteWebInspectorUI::localizedStringsURL const):
(WebKit::WebInspectorUI::localizedStringsURL): Deleted.
(WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.

Source/WebKitLegacy/ios:

* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorFrontendClient::localizedStringsURL const):
(WebInspectorFrontendClient::localizedStringsURL): Deleted.

Source/WebKitLegacy/mac:

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::localizedStringsURL const):
(WebInspectorFrontendClient::localizedStringsURL): Deleted.

Source/WebKitLegacy/win:

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::localizedStringsURL const):
(WebInspectorFrontendClient::localizedStringsURL): Deleted.
* WebCoreSupport/WebInspectorClient.h:

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

29 files changed:
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorFrontendClient.h
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/inspector/InspectorFrontendHost.h
Source/WebCore/inspector/InspectorFrontendHost.idl
Source/WebCore/testing/Internals.cpp
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/LoadLocalizedStrings.js
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Base/ObjectStore.js
Source/WebInspectorUI/UserInterface/Base/Platform.js
Source/WebInspectorUI/UserInterface/Base/Setting.js
Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js
Source/WebInspectorUI/UserInterface/Protocol/LoadInspectorBackendCommands.js
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.h
Source/WebKit/WebProcess/WebPage/WebInspectorUI.h
Source/WebKit/WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp
Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm
Source/WebKit/WebProcess/WebPage/win/WebInspectorUIWin.cpp
Source/WebKit/WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp
Source/WebKitLegacy/ios/ChangeLog
Source/WebKitLegacy/ios/WebCoreSupport/WebInspectorClientIOS.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebCoreSupport/WebInspectorClient.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebInspectorClient.h

index eab4aaa..52c856d 100644 (file)
@@ -1,3 +1,26 @@
+2019-12-20  Brian Burg  <bburg@apple.com>
+
+        Web Inspector: convert some InspectorFrontendHost methods to getters
+        https://bugs.webkit.org/show_bug.cgi?id=205475
+
+        Reviewed by Devin Rousso.
+
+        No reason for these to be method calls, so expose as getters / attributes instead.
+
+        * inspector/InspectorFrontendClient.h:
+        * inspector/InspectorFrontendHost.cpp:
+        (WebCore::InspectorFrontendHost::isRemote const):
+        (WebCore::debuggableTypeToString):
+        (WebCore::InspectorFrontendHost::localizedStringsURL): Deleted.
+        (WebCore::InspectorFrontendHost::backendCommandsURL): Deleted.
+        (WebCore::InspectorFrontendHost::debuggableType): Deleted.
+        (WebCore::InspectorFrontendHost::inspectionLevel): Deleted.
+        (WebCore::InspectorFrontendHost::platform): Deleted.
+        (WebCore::InspectorFrontendHost::port): Deleted.
+        * inspector/InspectorFrontendHost.h:
+        * inspector/InspectorFrontendHost.idl:
+        * testing/Internals.cpp:
+
 2019-12-20  Andres Gonzalez  <andresg_22@apple.com>
 
         IsolatedObject support for multiple parameterized attributes.
index 4b804b3..948a47e 100644 (file)
@@ -58,10 +58,10 @@ public:
     virtual void moveWindowBy(float x, float y) = 0;
 
     virtual bool isRemote() const = 0;
-    virtual String localizedStringsURL() = 0;
-    virtual unsigned inspectionLevel() const = 0;
+    virtual String localizedStringsURL() const = 0;
     virtual String backendCommandsURL() const = 0;
     virtual String debuggableType() const = 0;
+    virtual unsigned inspectionLevel() const = 0;
 
     virtual void bringToFront() = 0;
     virtual void closeWindow() = 0;
index e7204cb..79c60dd 100644 (file)
@@ -271,15 +271,15 @@ void InspectorFrontendHost::moveWindowBy(float x, float y) const
 
 bool InspectorFrontendHost::isRemote() const
 {
-    return m_client ? m_client->isRemote() : false;
+    return m_client && m_client->isRemote();
 }
 
-String InspectorFrontendHost::localizedStringsURL()
+String InspectorFrontendHost::localizedStringsURL() const
 {
     return m_client ? m_client->localizedStringsURL() : String();
 }
 
-String InspectorFrontendHost::backendCommandsURL()
+String InspectorFrontendHost::backendCommandsURL() const
 {
     return m_client ? m_client->backendCommandsURL() : String();
 }
@@ -289,12 +289,12 @@ String InspectorFrontendHost::debuggableType()
     return m_client ? m_client->debuggableType() : String();
 }
 
-unsigned InspectorFrontendHost::inspectionLevel()
+unsigned InspectorFrontendHost::inspectionLevel() const
 {
     return m_client ? m_client->inspectionLevel() : 1;
 }
 
-String InspectorFrontendHost::platform()
+String InspectorFrontendHost::platform() const
 {
 #if PLATFORM(COCOA)
     return "mac"_s;
@@ -311,7 +311,7 @@ String InspectorFrontendHost::platform()
 #endif
 }
 
-String InspectorFrontendHost::port()
+String InspectorFrontendHost::port() const
 {
 #if PLATFORM(GTK)
     return "gtk"_s;
index 670fc71..9f6df55 100644 (file)
@@ -81,13 +81,13 @@ public:
     void moveWindowBy(float x, float y) const;
 
     bool isRemote() const;
-    String localizedStringsURL();
-    String backendCommandsURL();
     String debuggableType();
-    unsigned inspectionLevel();
+    String localizedStringsURL() const;
+    String backendCommandsURL() const;
+    unsigned inspectionLevel() const;
 
-    String platform();
-    String port();
+    String platform() const;
+    String port() const;
 
     void copyText(const String& text);
     void killText(const String& text, bool shouldPrependToKillRing, bool shouldStartNewSequence);
index ac1a686..dec5338 100644 (file)
     void moveWindowBy(unrestricted float x, unrestricted float y);
 
     readonly attribute boolean isRemote;
-    DOMString localizedStringsURL();
-    DOMString backendCommandsURL();
     DOMString debuggableType();
-    unsigned long inspectionLevel();
+    readonly attribute DOMString localizedStringsURL;
+    readonly attribute DOMString backendCommandsURL;
+    readonly attribute unsigned long inspectionLevel;
 
     void copyText(DOMString text);
     void killText(DOMString text, boolean shouldPrependToKillRing, boolean shouldStartNewSequence);
@@ -74,8 +74,8 @@
     void append(DOMString url, DOMString content);
     void close(DOMString url);
 
-    DOMString platform();
-    DOMString port();
+    readonly attribute DOMString port;
+    readonly attribute DOMString platform;
 
     void showContextMenu(Event event, sequence<ContextMenuItem> items);
     void dispatchEventAsContextMenuEvent(Event event);
index 7a9c038..d950870 100644 (file)
@@ -338,8 +338,8 @@ private:
     void closeWindow() final;
     void reopen() final { }
     void bringToFront() final { }
-    String localizedStringsURL() final { return String(); }
     String debuggableType() const final { return "page"_s; };
+    String localizedStringsURL() const final { return String(); }
     void inspectedURLChanged(const String&) final { }
     void showCertificate(const CertificateInfo&) final { }
     void setAttachedWindowHeight(unsigned) final { }
index 508bfce..0abfef5 100644 (file)
@@ -1,3 +1,23 @@
+2019-12-20  Brian Burg  <bburg@apple.com>
+
+        Web Inspector: convert some InspectorFrontendHost methods to getters
+        https://bugs.webkit.org/show_bug.cgi?id=205475
+
+        Reviewed by Devin Rousso.
+
+        No reason for these to be method calls, so expose as getters / attributes instead.
+
+        * UserInterface/Base/LoadLocalizedStrings.js:
+        * UserInterface/Base/Main.js:
+        * UserInterface/Base/ObjectStore.js:
+        (WI.ObjectStore.get _databaseName):
+        * UserInterface/Base/Platform.js:
+        * UserInterface/Base/Setting.js:
+        (WI.Setting._localStorageKey):
+        * UserInterface/Debug/Bootstrap.js:
+        (WI.runBootstrapOperations):
+        * UserInterface/Protocol/LoadInspectorBackendCommands.js:
+
 2019-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
 
         Web Inspector: Enable p3 color picker by default
index e20d506..30b17e8 100644 (file)
@@ -27,7 +27,7 @@
     if (WI.dontLocalizeUserInterface)
         return;
 
-    let localizedStringsURL = InspectorFrontendHost.localizedStringsURL();
+    let localizedStringsURL = InspectorFrontendHost.localizedStringsURL;
     console.assert(localizedStringsURL);
     if (localizedStringsURL)
         document.write("<script src=\"" + localizedStringsURL + "\"></script>");
index a82ccf8..9c492af 100644 (file)
@@ -2272,7 +2272,7 @@ WI._reloadPage = function(event)
 
     event.preventDefault();
 
-    if (InspectorFrontendHost.inspectionLevel() > 1) {
+    if (InspectorFrontendHost.inspectionLevel > 1) {
         WI._reloadInspectedInspector();
         return;
     }
@@ -2288,7 +2288,7 @@ WI._reloadPageFromOrigin = function(event)
 
     event.preventDefault();
 
-    if (InspectorFrontendHost.inspectionLevel() > 1) {
+    if (InspectorFrontendHost.inspectionLevel > 1) {
         WI._reloadInspectedInspector();
         return;
     }
@@ -2298,7 +2298,7 @@ WI._reloadPageFromOrigin = function(event)
 
 WI._reloadToolbarButtonClicked = function(event)
 {
-    if (InspectorFrontendHost.inspectionLevel() > 1) {
+    if (InspectorFrontendHost.inspectionLevel > 1) {
         WI._reloadInspectedInspector();
         return;
     }
index 5056f13..05edd72 100644 (file)
@@ -48,7 +48,7 @@ WI.ObjectStore = class ObjectStore
 
     static get _databaseName()
     {
-        let inspectionLevel = InspectorFrontendHost ? InspectorFrontendHost.inspectionLevel() : 1;
+        let inspectionLevel = InspectorFrontendHost ? InspectorFrontendHost.inspectionLevel : 1;
         let levelString = (inspectionLevel > 1) ? "-" + inspectionLevel : "";
         return "com.apple.WebInspector" + levelString;
     }
index ffb5a77..e0f0149 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 WI.Platform = {
-    name: InspectorFrontendHost.platform(),
+    name: InspectorFrontendHost.platform,
     isNightlyBuild: false,
     version: {
         base: 0,
index a40fda6..aa20f7c 100644 (file)
@@ -75,7 +75,7 @@ WI.Setting = class Setting extends WI.Object
 
     static _localStorageKey(name)
     {
-        let inspectionLevel = InspectorFrontendHost ? InspectorFrontendHost.inspectionLevel() : 1;
+        let inspectionLevel = InspectorFrontendHost ? InspectorFrontendHost.inspectionLevel : 1;
         let levelString = inspectionLevel > 1 ? "-" + inspectionLevel : "";
         return `com.apple.WebInspector${levelString}.${name}`;
     }
index 72ec2f7..6376e35 100644 (file)
@@ -115,7 +115,7 @@ WI.runBootstrapOperations = function() {
     applyDumpMessagesState(dumpMessagesCurrentState());
 
     // Next Level Inspector.
-    let inspectionLevel = InspectorFrontendHost.inspectionLevel();
+    let inspectionLevel = InspectorFrontendHost.inspectionLevel;
     const inspectInspectorToolTip = WI.unlocalizedString("Open Web Inspector [%d]").format(inspectionLevel + 1);
     let inspectInspectorToolbarItem = new WI.ButtonToolbarItem("inspect-inspector", inspectInspectorToolTip);
     WI.toolbar.addToolbarItem(inspectInspectorToolbarItem, WI.Toolbar.Section.CenterRight);
index 7f75338..0478de7 100644 (file)
@@ -24,6 +24,6 @@
  */
 
 (function() {
-    let backendCommandsURL = InspectorFrontendHost.backendCommandsURL() || "Protocol/InspectorBackendCommands.js";
+    let backendCommandsURL = InspectorFrontendHost.backendCommandsURL || "Protocol/InspectorBackendCommands.js";
     document.write("<script src=\"" + backendCommandsURL + "\"></script>");
 })();
index a2ad0c9..4c81a08 100644 (file)
@@ -1,3 +1,33 @@
+2019-12-20  Brian Burg  <bburg@apple.com>
+
+        Web Inspector: convert some InspectorFrontendHost methods to getters
+        https://bugs.webkit.org/show_bug.cgi?id=205475
+
+        Reviewed by Devin Rousso.
+
+        No reason for these to be method calls, so expose as getters / attributes instead.
+
+        * WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:
+        (WebKit::WebInspectorUI::localizedStringsURL const):
+        (WebKit::RemoteWebInspectorUI::localizedStringsURL const):
+        (WebKit::WebInspectorUI::localizedStringsURL): Deleted.
+        (WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.
+        * WebProcess/WebPage/mac/WebInspectorUIMac.mm:
+        (WebKit::WebInspectorUI::localizedStringsURL const):
+        (WebKit::RemoteWebInspectorUI::localizedStringsURL const):
+        (WebKit::WebInspectorUI::localizedStringsURL): Deleted.
+        (WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.
+        * WebProcess/WebPage/win/WebInspectorUIWin.cpp:
+        (WebKit::WebInspectorUI::localizedStringsURL const):
+        (WebKit::RemoteWebInspectorUI::localizedStringsURL const):
+        (WebKit::WebInspectorUI::localizedStringsURL): Deleted.
+        (WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.
+        * WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp:
+        (WebKit::WebInspectorUI::localizedStringsURL const):
+        (WebKit::RemoteWebInspectorUI::localizedStringsURL const):
+        (WebKit::WebInspectorUI::localizedStringsURL): Deleted.
+        (WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.
+
 2019-12-20  Alex Christensen  <achristensen@webkit.org>
 
         Allow a managed configuration to re-enable TLS 1.0 and 1.1
index a5605f4..df849fc 100644 (file)
@@ -65,7 +65,7 @@ public:
     void moveWindowBy(float x, float y) override;
 
     bool isRemote() const final { return true; }
-    String localizedStringsURL() override;
+    String localizedStringsURL() const override;
     String backendCommandsURL() const final { return m_backendCommandsURL; }
     String debuggableType() const final { return m_debuggableType; }
 
index 99d156b..4c55239 100644 (file)
@@ -94,9 +94,10 @@ public:
     void moveWindowBy(float x, float y) override;
 
     bool isRemote() const final { return false; }
-    String localizedStringsURL() override;
+    String localizedStringsURL() const override;
     String backendCommandsURL() const final { return String(); }
     String debuggableType() const final { return "web-page"_s; }
+    unsigned inspectionLevel() const override { return m_inspectionLevel; }
 
     void bringToFront() override;
     void closeWindow() override;
@@ -132,7 +133,6 @@ public:
     void pageUnpaused() override;
 
     bool isUnderTest() override { return m_underTest; }
-    unsigned inspectionLevel() const override { return m_inspectionLevel; }
 
 private:
     explicit WebInspectorUI(WebPage&);
index 9d25a1a..2b4f97f 100644 (file)
@@ -39,12 +39,12 @@ bool WebInspectorUI::canSave()
     return true;
 }
 
-String WebInspectorUI::localizedStringsURL()
+String WebInspectorUI::localizedStringsURL() const
 {
     return String("resource:///org/webkit/inspector/Localizations/en.lproj/localizedStrings.js");
 }
 
-String RemoteWebInspectorUI::localizedStringsURL()
+String RemoteWebInspectorUI::localizedStringsURL() const
 {
     return String("resource:///org/webkit/inspector/Localizations/en.lproj/localizedStrings.js");
 }
index 8e41b0d..4eee9b2 100644 (file)
@@ -47,12 +47,12 @@ static String webInspectorUILocalizedStringsURL()
     return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString;
 }
 
-String WebInspectorUI::localizedStringsURL()
+String WebInspectorUI::localizedStringsURL() const
 {
     return webInspectorUILocalizedStringsURL();
 }
 
-String RemoteWebInspectorUI::localizedStringsURL()
+String RemoteWebInspectorUI::localizedStringsURL() const
 {
     return webInspectorUILocalizedStringsURL();
 }
index 19bf570..49411fd 100644 (file)
@@ -39,7 +39,7 @@ bool WebInspectorUI::canSave()
     return false;
 }
 
-String WebInspectorUI::localizedStringsURL()
+String WebInspectorUI::localizedStringsURL() const
 {
 #if USE(CF)
     RetainPtr<CFURLRef> stringsURLRef = adoptCF(CFBundleCopyResourceURL(WebCore::webKitBundle(), CFSTR("localizedStrings"), CFSTR("js"), CFSTR("WebInspectorUI")));
@@ -49,7 +49,7 @@ String WebInspectorUI::localizedStringsURL()
 #endif
 }
 
-String RemoteWebInspectorUI::localizedStringsURL()
+String RemoteWebInspectorUI::localizedStringsURL() const
 {
 #if USE(CF)
     RetainPtr<CFURLRef> stringsURLRef = adoptCF(CFBundleCopyResourceURL(WebCore::webKitBundle(), CFSTR("localizedStrings"), CFSTR("js"), CFSTR("WebInspectorUI")));
index 74c844b..f0ae6c3 100644 (file)
@@ -35,12 +35,12 @@ bool WebInspectorUI::canSave()
     return false;
 }
 
-String WebInspectorUI::localizedStringsURL()
+String WebInspectorUI::localizedStringsURL() const
 {
     return String();
 }
 
-String RemoteWebInspectorUI::localizedStringsURL()
+String RemoteWebInspectorUI::localizedStringsURL() const
 {
     return String();
 }
index 74f73f4..20354be 100644 (file)
@@ -1,3 +1,14 @@
+2019-12-20  Brian Burg  <bburg@apple.com>
+
+        Web Inspector: convert some InspectorFrontendHost methods to getters
+        https://bugs.webkit.org/show_bug.cgi?id=205475
+
+        Reviewed by Devin Rousso.
+
+        * WebCoreSupport/WebInspectorClientIOS.mm:
+        (WebInspectorFrontendClient::localizedStringsURL const):
+        (WebInspectorFrontendClient::localizedStringsURL): Deleted.
+
 2019-12-17  Tim Horton  <timothy_horton@apple.com>
 
         macCatalyst: Cursor should update on mouse movement and style change
index 5296f12..36ff102 100644 (file)
@@ -123,7 +123,7 @@ WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView
 
 void WebInspectorFrontendClient::attachAvailabilityChanged(bool) { }
 void WebInspectorFrontendClient::frontendLoaded() { }
-String WebInspectorFrontendClient::localizedStringsURL() { return String(); }
+String WebInspectorFrontendClient::localizedStringsURL() const { return String(); }
 void WebInspectorFrontendClient::bringToFront() { }
 void WebInspectorFrontendClient::closeWindow() { }
 void WebInspectorFrontendClient::reopen() { }
index c0e9958..b82944c 100644 (file)
@@ -1,3 +1,15 @@
+2019-12-20  Brian Burg  <bburg@apple.com>
+
+        Web Inspector: convert some InspectorFrontendHost methods to getters
+        https://bugs.webkit.org/show_bug.cgi?id=205475
+
+        Reviewed by Devin Rousso.
+
+        * WebCoreSupport/WebInspectorClient.h:
+        * WebCoreSupport/WebInspectorClient.mm:
+        (WebInspectorFrontendClient::localizedStringsURL const):
+        (WebInspectorFrontendClient::localizedStringsURL): Deleted.
+
 2019-12-20  Alex Christensen  <achristensen@webkit.org>
 
         Allow a managed configuration to re-enable TLS 1.0 and 1.1
index 166fe4e..d269d5b 100644 (file)
@@ -117,8 +117,8 @@ public:
 
     void startWindowDrag() override;
 
-    String localizedStringsURL() override;
     String debuggableType() const final { return "page"_s; };
+    String localizedStringsURL() const override;
 
     void bringToFront() override;
     void closeWindow() override;
index ea5078e..c476c75 100644 (file)
@@ -220,7 +220,7 @@ void WebInspectorFrontendClient::startWindowDrag()
     [[m_frontendWindowController window] performWindowDragWithEvent:[NSApp currentEvent]];
 }
 
-String WebInspectorFrontendClient::localizedStringsURL()
+String WebInspectorFrontendClient::localizedStringsURL() const
 {
     NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
     if (!bundle)
index 1e29252..69628cb 100644 (file)
@@ -1,3 +1,15 @@
+2019-12-20  Brian Burg  <bburg@apple.com>
+
+        Web Inspector: convert some InspectorFrontendHost methods to getters
+        https://bugs.webkit.org/show_bug.cgi?id=205475
+
+        Reviewed by Devin Rousso.
+
+        * WebCoreSupport/WebInspectorClient.cpp:
+        (WebInspectorFrontendClient::localizedStringsURL const):
+        (WebInspectorFrontendClient::localizedStringsURL): Deleted.
+        * WebCoreSupport/WebInspectorClient.h:
+
 2019-12-13  Brady Eidson  <beidson@apple.com>
 
         Refactor ScriptController's proliferation of ExceptionDetails*.
index f80ae04..71cff70 100644 (file)
@@ -248,7 +248,7 @@ void WebInspectorFrontendClient::frontendLoaded()
     setAttachedWindow(m_attached ? DockSide::Bottom : DockSide::Undocked);
 }
 
-String WebInspectorFrontendClient::localizedStringsURL()
+String WebInspectorFrontendClient::localizedStringsURL() const
 {
     RetainPtr<CFURLRef> url = adoptCF(CFBundleCopyResourceURL(webKitBundle(), CFSTR("localizedStrings"), CFSTR("js"), CFSTR("WebInspectorUI")));
     if (!url)
index c9f5a95..d5f5d65 100644 (file)
@@ -103,7 +103,7 @@ public:
     // InspectorFrontendClient API.
     void frontendLoaded() override;
 
-    WTF::String localizedStringsURL() override;
+    WTF::String localizedStringsURL() const override;
     String debuggableType() const final { return "page"_s; };
 
     void bringToFront() override;