[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

loislo at chromium.org loislo at chromium.org
Wed Dec 22 13:44:05 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6101999ef905b748955212852666cbc8ad3a2f4c
Author: loislo at chromium.org <loislo at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 24 15:45:22 2010 +0000

    2010-09-24  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Web Inspector: move searchingForNode flag in InspectorController under control of InspectorCookies.
    
            Four functions from Inspector IDL go away.
            Searching for node feature of Inspector keeps alive even after navigation.
    
            https://bugs.webkit.org/show_bug.cgi?id=46462
    
            * inspector/Inspector.idl:
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::updateInspectorStateCookie):
            (WebCore::InspectorController::restoreInspectorStateFromCookie):
            (WebCore::InspectorController::setSearchingForNode):
            (WebCore::InspectorController::populateScriptObjects):
            * inspector/InspectorController.h:
            * inspector/front-end/ElementsPanel.js:
            (WebInspector.ElementsPanel.prototype.hide):
            (WebInspector.ElementsPanel.prototype.updateFocusedNode):
            (WebInspector.ElementsPanel.prototype._setSearchingForNode):
            (WebInspector.ElementsPanel.prototype.setSearchingForNode):
            (WebInspector.ElementsPanel.prototype.toggleSearchingForNode):
            * inspector/front-end/inspector.js:
            (WebInspector._updateFocusedNode):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68256 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b75acf8..57da804 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2010-09-24  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: move searchingForNode flag in InspectorController under control of InspectorCookies.
+
+        Four functions from Inspector IDL go away.
+        Searching for node feature of Inspector keeps alive even after navigation.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46462
+
+        * inspector/Inspector.idl:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::updateInspectorStateCookie):
+        (WebCore::InspectorController::restoreInspectorStateFromCookie):
+        (WebCore::InspectorController::setSearchingForNode):
+        (WebCore::InspectorController::populateScriptObjects):
+        * inspector/InspectorController.h:
+        * inspector/front-end/ElementsPanel.js:
+        (WebInspector.ElementsPanel.prototype.hide):
+        (WebInspector.ElementsPanel.prototype.updateFocusedNode):
+        (WebInspector.ElementsPanel.prototype._setSearchingForNode):
+        (WebInspector.ElementsPanel.prototype.setSearchingForNode):
+        (WebInspector.ElementsPanel.prototype.toggleSearchingForNode):
+        * inspector/front-end/inspector.js:
+        (WebInspector._updateFocusedNode):
+
 2010-09-24  Andrei Popescu  <andreip at google.com>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index 9a1b94b..ce2b03f 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -49,8 +49,6 @@ module core {
         [notify] void removeResource(out unsigned long identifier);
         [notify] void reset();
         [notify] void resetProfilesPanel();
-        [notify] void searchingForNodeWasEnabled();
-        [notify] void searchingForNodeWasDisabled();
         [notify] void setChildNodes(out long parentId, out Array nodes);
         [notify] void setDetachedRoot(out Object root);
         [notify] void setDocument(out Value root);
@@ -105,8 +103,7 @@ module core {
         [handler=Controller] void saveApplicationSettings(in String settings);
         [handler=Controller] void saveSessionSettings(in String settings);
 
-        [handler=Controller] void enableSearchingForNode();
-        [handler=Controller] void disableSearchingForNode();
+        [handler=Controller] void setSearchingForNode(in boolean enabled, out boolean newState);
 
         [handler=Controller] void setMonitoringXHREnabled(in boolean enable, out boolean newState);
 
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 7ea15b9..769ead4 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -127,9 +127,10 @@ static const char* const monitoringXHRSettingName = "xhrMonitor";
 static const char* const resourceTrackingAlwaysEnabledSettingName = "resourceTrackingEnabled";
 static const char* const profilerAlwaysEnabledSettingName = "profilerEnabled";
 
-static const char* const timelineProfilerEnabledStateName = "timelineProfilerEnabled";
-static const char* const resourceTrackingEnabledStateName = "resourceTrackingEnabled";
 static const char* const monitoringXHRStateName = "monitoringXHREnabled";
+static const char* const resourceTrackingEnabledStateName = "resourceTrackingEnabled";
+static const char* const searchingForNodeEnabledStateName = "searchingForNodeEnabled";
+static const char* const timelineProfilerEnabledStateName = "timelineProfilerEnabled";
 
 static const char* const inspectorAttachedHeightName = "inspectorAttachedHeight";
 
@@ -265,6 +266,7 @@ void InspectorController::updateInspectorStateCookie()
     state->setBoolean(monitoringXHRStateName, m_monitoringXHR);
     state->setBoolean(resourceTrackingEnabledStateName, m_resourceTrackingEnabled);
     state->setBoolean(timelineProfilerEnabledStateName, m_timelineAgent);
+    state->setBoolean(searchingForNodeEnabledStateName, m_searchingForNode);
     m_client->updateInspectorStateCookie(state->toJSONString());
 }
 
@@ -280,6 +282,7 @@ void InspectorController::restoreInspectorStateFromCookie(const String& inspecto
 
     inspectorState->getBoolean(monitoringXHRStateName, &m_monitoringXHR);
     inspectorState->getBoolean(resourceTrackingEnabledStateName, &m_resourceTrackingEnabled);
+    inspectorState->getBoolean(searchingForNodeEnabledStateName, &m_searchingForNode);
 
     bool timelineProfilerEnabled = false;
     inspectorState->getBoolean(timelineProfilerEnabledStateName, &timelineProfilerEnabled);
@@ -493,12 +496,13 @@ void InspectorController::setSearchingForNode(bool enabled)
     m_searchingForNode = enabled;
     if (!m_searchingForNode)
         hideHighlight();
-    if (m_frontend) {
-        if (enabled)
-            m_frontend->searchingForNodeWasEnabled();
-        else
-            m_frontend->searchingForNodeWasDisabled();
-    }
+    updateInspectorStateCookie();
+}
+
+void InspectorController::setSearchingForNode(bool enabled, bool* newState)
+{
+    *newState = enabled;
+    setSearchingForNode(enabled);
 }
 
 void InspectorController::setMonitoringXHREnabled(bool enabled, bool* newState)
@@ -651,10 +655,6 @@ void InspectorController::populateScriptObjects()
 
     showPanel(m_showAfterVisible);
 
-    if (m_searchingForNode)
-        m_frontend->searchingForNodeWasEnabled();
-
-
 #if ENABLE(JAVASCRIPT_DEBUGGER)
     if (m_profilerAgent->enabled())
         m_frontend->profilerWasEnabled();
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index f3a17c2..9e63f01 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -297,11 +297,10 @@ private:
     void restoreDebugger();
     void restoreProfiler();
     void unbindAllResources();
+    void setSearchingForNode(bool enabled);
 
     // Following are used from InspectorBackend and internally.
-    void setSearchingForNode(bool enabled);
-    void enableSearchingForNode() { setSearchingForNode(true); }
-    void disableSearchingForNode() { setSearchingForNode(false); }
+    void setSearchingForNode(bool enabled, bool* newState);
 
     void setMonitoringXHREnabled(bool enabled, bool* newState);
     void storeLastActivePanel(const String& panelName);
diff --git a/WebCore/inspector/front-end/ElementsPanel.js b/WebCore/inspector/front-end/ElementsPanel.js
index f57dea5..d6437fc 100644
--- a/WebCore/inspector/front-end/ElementsPanel.js
+++ b/WebCore/inspector/front-end/ElementsPanel.js
@@ -148,7 +148,7 @@ WebInspector.ElementsPanel.prototype = {
         WebInspector.Panel.prototype.hide.call(this);
 
         WebInspector.highlightDOMNode(0);
-        InspectorBackend.disableSearchingForNode();
+        this.setSearchingForNode(false);
     },
 
     resize: function()
@@ -248,16 +248,6 @@ WebInspector.ElementsPanel.prototype = {
         InspectorBackend.performSearch(whitespaceTrimmedQuery, false);
     },
 
-    searchingForNodeWasEnabled: function()
-    {
-        this._nodeSearchButton.toggled = true;
-    },
-
-    searchingForNodeWasDisabled: function()
-    {
-        this._nodeSearchButton.toggled = false;
-    },
-
     populateHrefContextMenu: function(contextMenu, event, anchorElement)
     {
         if (!anchorElement.href)
@@ -1160,12 +1150,29 @@ WebInspector.ElementsPanel.prototype = {
         this.treeOutline.updateSelection();
     },
 
+    updateFocusedNode: function(nodeId)
+    {
+        var node = WebInspector.domAgent.nodeForId(nodeId);
+        if (!node)
+            return;
+
+        this.focusedDOMNode = node;
+        this._nodeSearchButton.toggled = false;
+    },
+
+    _setSearchingForNode: function(enabled)
+    {
+        this._nodeSearchButton.toggled = enabled;
+    },
+
+    setSearchingForNode: function(enabled)
+    {
+        InspectorBackend.setSearchingForNode(enabled, this._setSearchingForNode.bind(this));
+    },
+
     toggleSearchingForNode: function()
     {
-        if (!this._nodeSearchButton.toggled)
-            InspectorBackend.enableSearchingForNode();
-        else
-            InspectorBackend.disableSearchingForNode();
+        this.setSearchingForNode(!this._nodeSearchButton.toggled);
     },
 
     elementsToRestoreScrollPositionsFor: function()
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index f6fa06b..3e68d44 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -435,12 +435,8 @@ var WebInspector = {
 
     _updateFocusedNode: function(nodeId)
     {
-        var node = WebInspector.domAgent.nodeForId(nodeId);
-        if (!node)
-            return;
-
         this.currentPanel = this.panels.elements;
-        this.panels.elements.focusedDOMNode = node;
+        this.panels.elements.updateFocusedNode(nodeId);
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list