Title: [189572] trunk/Source/WebKit2
Revision
189572
Author
[email protected]
Date
2015-09-10 10:27:46 -0700 (Thu, 10 Sep 2015)

Log Message

Web Inspector: Make WebInspectorProxy inspectorURL path methods static
https://bugs.webkit.org/show_bug.cgi?id=149021

Patch by Joseph Pecoraro <[email protected]> on 2015-09-10
Reviewed by Brian Burg.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
(WebKit::isMainOrTestInspectorPage):
(WebKit::decidePolicyForNavigationAction):
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
(WebKit::WebInspectorProxy::createInspectorPage):
* UIProcess/WebInspectorProxy.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (189571 => 189572)


--- trunk/Source/WebKit2/ChangeLog	2015-09-10 17:11:35 UTC (rev 189571)
+++ trunk/Source/WebKit2/ChangeLog	2015-09-10 17:27:46 UTC (rev 189572)
@@ -1,3 +1,30 @@
+2015-09-10  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Make WebInspectorProxy inspectorURL path methods static
+        https://bugs.webkit.org/show_bug.cgi?id=149021
+
+        Reviewed by Brian Burg.
+
+        * UIProcess/WebInspectorProxy.cpp:
+        (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
+        (WebKit::isMainOrTestInspectorPage):
+        (WebKit::decidePolicyForNavigationAction):
+        (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
+        (WebKit::WebInspectorProxy::createInspectorPage):
+        * UIProcess/WebInspectorProxy.h:
+        * UIProcess/efl/WebInspectorProxyEfl.cpp:
+        (WebKit::WebInspectorProxy::inspectorPageURL):
+        (WebKit::WebInspectorProxy::inspectorTestPageURL):
+        (WebKit::WebInspectorProxy::inspectorBaseURL):
+        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+        (WebKit::WebInspectorProxy::inspectorPageURL):
+        (WebKit::WebInspectorProxy::inspectorTestPageURL):
+        (WebKit::WebInspectorProxy::inspectorBaseURL):
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::inspectorPageURL):
+        (WebKit::WebInspectorProxy::inspectorTestPageURL):
+        (WebKit::WebInspectorProxy::inspectorBaseURL):
+
 2015-09-09  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: Remove dead WebInspectorProxy related code

Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp (189571 => 189572)


--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp	2015-09-10 17:11:35 UTC (rev 189571)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp	2015-09-10 17:27:46 UTC (rev 189572)
@@ -178,7 +178,7 @@
 void WebInspectorProxy::didRelaunchInspectorPageProcess()
 {
     m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID(), *this);
-    m_inspectorPage->process().assumeReadAccessToBaseURL(inspectorBaseURL());
+    m_inspectorPage->process().assumeReadAccessToBaseURL(WebInspectorProxy::inspectorBaseURL());
 
     // When didRelaunchInspectorPageProcess is called we can assume it is during a load request.
     // Any messages we would have sent to a terminated process need to be re-sent.
@@ -329,24 +329,24 @@
     return pageLevelMap().contains(&webPage);
 }
 
-static bool isMainOrTestInspectorPage(const WebInspectorProxy* webInspectorProxy, WKURLRequestRef requestRef)
+static bool isMainOrTestInspectorPage(WKURLRequestRef requestRef)
 {
     URL requestURL(URL(), toImpl(requestRef)->resourceRequest().url());
     if (!WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(requestURL.protocol()))
         return false;
 
     // Use URL so we can compare just the paths.
-    URL mainPageURL(URL(), webInspectorProxy->inspectorPageURL());
+    URL mainPageURL(URL(), WebInspectorProxy::inspectorPageURL());
     ASSERT(WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(mainPageURL.protocol()));
     if (decodeURLEscapeSequences(requestURL.path()) == decodeURLEscapeSequences(mainPageURL.path()))
         return true;
 
     // We might not have a Test URL in Production builds.
-    String testPageURLString = webInspectorProxy->inspectorTestPageURL();
+    String testPageURLString = WebInspectorProxy::inspectorTestPageURL();
     if (testPageURLString.isNull())
         return false;
 
-    URL testPageURL(URL(), webInspectorProxy->inspectorTestPageURL());
+    URL testPageURL(URL(), testPageURLString);
     ASSERT(WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(testPageURL.protocol()));
     return decodeURLEscapeSequences(requestURL.path()) == decodeURLEscapeSequences(testPageURL.path());
 }
@@ -370,7 +370,7 @@
     ASSERT(webInspectorProxy);
 
     // Allow loading of the main inspector file.
-    if (isMainOrTestInspectorPage(webInspectorProxy, requestRef)) {
+    if (isMainOrTestInspectorPage(requestRef)) {
         toImpl(listenerRef)->use();
         return;
     }
@@ -474,7 +474,7 @@
     WKPageSetPageLoaderClient(toAPI(m_inspectorPage), &loaderClient.base);
 
     m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID(), *this);
-    m_inspectorPage->process().assumeReadAccessToBaseURL(inspectorBaseURL());
+    m_inspectorPage->process().assumeReadAccessToBaseURL(WebInspectorProxy::inspectorBaseURL());
 }
 
 // Called by WebInspectorProxy messages
@@ -517,7 +517,7 @@
         m_inspectorPage->process().send(Messages::WebInspectorUI::SetDockingUnavailable(!m_canAttach), m_inspectorPage->pageID());
     }
 
-    m_inspectorPage->loadRequest(URL(URL(), m_underTest ? inspectorTestPageURL() : inspectorPageURL()));
+    m_inspectorPage->loadRequest(URL(URL(), m_underTest ? WebInspectorProxy::inspectorTestPageURL() : WebInspectorProxy::inspectorPageURL()));
 }
 
 void WebInspectorProxy::open()

Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h (189571 => 189572)


--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h	2015-09-10 17:11:35 UTC (rev 189571)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h	2015-09-10 17:27:46 UTC (rev 189572)
@@ -139,9 +139,9 @@
     static bool isInspectorPage(WebPageProxy&);
 
     // Provided by platform WebInspectorProxy implementations.
-    String inspectorPageURL() const;
-    String inspectorTestPageURL() const;
-    String inspectorBaseURL() const;
+    static String inspectorPageURL();
+    static String inspectorTestPageURL();
+    static String inspectorBaseURL();
 
 #if ENABLE(INSPECTOR_SERVER)
     void enableRemoteInspection();

Modified: trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp (189571 => 189572)


--- trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp	2015-09-10 17:11:35 UTC (rev 189571)
+++ trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp	2015-09-10 17:27:46 UTC (rev 189572)
@@ -170,25 +170,23 @@
     ecore_evas_title_set(m_inspectorWindow, title.utf8().data());
 }
 
-String WebInspectorProxy::inspectorPageURL() const
+String WebInspectorProxy::inspectorPageURL()
 {
     StringBuilder builder;
-    builder.append(inspectorBaseURL());
+    builder.append(WebInspectorProxy::inspectorBaseURL());
     builder.appendLiteral("/Main.html");
-
     return builder.toString();
 }
 
-String WebInspectorProxy::inspectorTestPageURL() const
+String WebInspectorProxy::inspectorTestPageURL()
 {
     StringBuilder builder;
-    builder.append(inspectorBaseURL());
+    builder.append(WebInspectorProxy::inspectorBaseURL());
     builder.appendLiteral("/Test.html");
-
     return builder.toString();
 }
 
-String WebInspectorProxy::inspectorBaseURL() const
+String WebInspectorProxy::inspectorBaseURL()
 {
     StringBuilder builder;
     builder.appendLiteral("file://");

Modified: trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp (189571 => 189572)


--- trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp	2015-09-10 17:11:35 UTC (rev 189571)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp	2015-09-10 17:27:46 UTC (rev 189572)
@@ -250,17 +250,17 @@
         updateInspectorWindowTitle();
 }
 
-String WebInspectorProxy::inspectorPageURL() const
+String WebInspectorProxy::inspectorPageURL()
 {
     return String("resource:///org/webkitgtk/inspector/UserInterface/Main.html");
 }
 
-String WebInspectorProxy::inspectorTestPageURL() const
+String WebInspectorProxy::inspectorTestPageURL()
 {
     return String("resource:///org/webkitgtk/inspector/UserInterface/Test.html");
 }
 
-String WebInspectorProxy::inspectorBaseURL() const
+String WebInspectorProxy::inspectorBaseURL()
 {
     return String("resource:///org/webkitgtk/inspector/UserInterface/");
 }

Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (189571 => 189572)


--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2015-09-10 17:11:35 UTC (rev 189571)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2015-09-10 17:27:46 UTC (rev 189572)
@@ -850,7 +850,7 @@
 #endif
 }
 
-String WebInspectorProxy::inspectorPageURL() const
+String WebInspectorProxy::inspectorPageURL()
 {
     // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
     WebInspectorUILibrary();
@@ -861,7 +861,7 @@
     return [[NSURL fileURLWithPath:path] absoluteString];
 }
 
-String WebInspectorProxy::inspectorTestPageURL() const
+String WebInspectorProxy::inspectorTestPageURL()
 {
     // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
     WebInspectorUILibrary();
@@ -875,7 +875,7 @@
     return [[NSURL fileURLWithPath:path] absoluteString];
 }
 
-String WebInspectorProxy::inspectorBaseURL() const
+String WebInspectorProxy::inspectorBaseURL()
 {
     // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
     WebInspectorUILibrary();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to