Title: [164163] trunk/Source/WebInspectorUI
Revision
164163
Author
[email protected]
Date
2014-02-15 00:28:41 -0800 (Sat, 15 Feb 2014)

Log Message

Web Inspector: scope chain details sidebar doesn't update values modified via console
https://bugs.webkit.org/show_bug.cgi?id=126855

Patch by Chris J. Shull <[email protected]> on 2014-02-15
Reviewed by Timothy Hatcher.

Add a RuntimeManager event that the scope chain details sidebar can
listen to to trigger refresh.

Testing on this is blocked by http://webkit.org/b/128724
(Web Inspector: Issue testing breakpoints).

* UserInterface/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evalCallback):
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
* UserInterface/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (164162 => 164163)


--- trunk/Source/WebInspectorUI/ChangeLog	2014-02-15 08:27:16 UTC (rev 164162)
+++ trunk/Source/WebInspectorUI/ChangeLog	2014-02-15 08:28:41 UTC (rev 164163)
@@ -1,3 +1,22 @@
+2014-02-15  Chris J. Shull  <[email protected]>
+
+        Web Inspector: scope chain details sidebar doesn't update values modified via console
+        https://bugs.webkit.org/show_bug.cgi?id=126855
+
+        Reviewed by Timothy Hatcher.
+
+        Add a RuntimeManager event that the scope chain details sidebar can 
+        listen to to trigger refresh.
+
+        Testing on this is blocked by http://webkit.org/b/128724
+        (Web Inspector: Issue testing breakpoints).
+
+        * UserInterface/RuntimeManager.js:
+        (WebInspector.RuntimeManager.prototype.evalCallback):
+        (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
+        * UserInterface/ScopeChainDetailsSidebarPanel.js:
+        (WebInspector.ScopeChainDetailsSidebarPanel):
+
 2014-02-14  Antoine Quint  <[email protected]>
 
         Web Inspector: color wheel should support Retina displays

Modified: trunk/Source/WebInspectorUI/UserInterface/RuntimeManager.js (164162 => 164163)


--- trunk/Source/WebInspectorUI/UserInterface/RuntimeManager.js	2014-02-15 08:27:16 UTC (rev 164162)
+++ trunk/Source/WebInspectorUI/UserInterface/RuntimeManager.js	2014-02-15 08:28:41 UTC (rev 164163)
@@ -32,6 +32,10 @@
         RuntimeAgent.enable();
 };
 
+WebInspector.RuntimeManager.Event = {
+    DidEvaluate: "runtime-manager-did-evaluate"
+};
+
 WebInspector.RuntimeManager.prototype = {
     constructor: WebInspector.RuntimeManager,
 
@@ -46,6 +50,8 @@
 
         function evalCallback(error, result, wasThrown)
         {
+            this.dispatchEventToListeners(WebInspector.RuntimeManager.Event.DidEvaluate);
+            
             if (error) {
                 console.error(error);
                 callback(null, false);
@@ -59,14 +65,14 @@
         }
 
         if (WebInspector.debuggerManager.activeCallFrame) {
-            DebuggerAgent.evaluateOnCallFrame(WebInspector.debuggerManager.activeCallFrame.id, _expression_, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, evalCallback);
+            DebuggerAgent.evaluateOnCallFrame(WebInspector.debuggerManager.activeCallFrame.id, _expression_, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, evalCallback.bind(this));
             return;
         }
 
         // COMPATIBILITY (iOS 6): Execution context identifiers (contextId) did not exist
         // in iOS 6. Fallback to including the frame identifier (frameId).
         var contextId = WebInspector.quickConsole.executionContextIdentifier;
-        RuntimeAgent.evaluate.invoke({_expression_: _expression_, objectGroup: objectGroup, includeCommandLineAPI: includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole: doNotPauseOnExceptionsAndMuteConsole, contextId: contextId, frameId: contextId, returnByValue: returnByValue}, evalCallback);
+        RuntimeAgent.evaluate.invoke({_expression_: _expression_, objectGroup: objectGroup, includeCommandLineAPI: includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole: doNotPauseOnExceptionsAndMuteConsole, contextId: contextId, frameId: contextId, returnByValue: returnByValue}, evalCallback.bind(this));
     },
 
     getPropertiesForRemoteObject: function(objectId, callback)

Modified: trunk/Source/WebInspectorUI/UserInterface/ScopeChainDetailsSidebarPanel.js (164162 => 164163)


--- trunk/Source/WebInspectorUI/UserInterface/ScopeChainDetailsSidebarPanel.js	2014-02-15 08:27:16 UTC (rev 164162)
+++ trunk/Source/WebInspectorUI/UserInterface/ScopeChainDetailsSidebarPanel.js	2014-02-15 08:28:41 UTC (rev 164163)
@@ -27,6 +27,9 @@
     WebInspector.DetailsSidebarPanel.call(this, "scope-chain", WebInspector.UIString("Scope Chain"), WebInspector.UIString("Scope Chain"), "Images/NavigationItemVariable.svg", "5");
 
     this._callFrame = null;
+    
+    // Update on console prompt eval as objects in the scope chain may have changed.
+    WebInspector.runtimeManager.addEventListener(WebInspector.RuntimeManager.Event.DidEvaluate, this.needsRefresh, this);
 };
 
 WebInspector.ScopeChainDetailsSidebarPanel.prototype = {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to