Web Inspector: do not force document loading on reload (should happen on demand).
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Oct 2011 15:14:46 +0000 (15:14 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Oct 2011 15:14:46 +0000 (15:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=70724

Reviewed by Yury Semikhatsky.

Source/WebCore:

* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMAgent.prototype._documentUpdated):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.wasShown):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeOutline.prototype.setVisible):

LayoutTests:

* inspector/debugger/dom-breakpoints.html:
* inspector/debugger/error-in-watch-expressions.html:

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

LayoutTests/ChangeLog
LayoutTests/inspector/debugger/dom-breakpoints.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/ConsoleMessage.js
Source/WebCore/inspector/front-end/DOMAgent.js
Source/WebCore/inspector/front-end/ElementsPanel.js
Source/WebCore/inspector/front-end/ElementsTreeOutline.js

index d0f29ea..aa93923 100644 (file)
@@ -1,3 +1,13 @@
+2011-10-24  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: do not force document loading on reload (should happen on demand).
+        https://bugs.webkit.org/show_bug.cgi?id=70724
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/debugger/dom-breakpoints.html:
+        * inspector/debugger/error-in-watch-expressions.html:
+
 2011-10-24  Yury Semikhatsky  <yurys@chromium.org>
 
         Web Inspector: allow debugging dedicated worker initialization
index c28c8f4..68cc83f 100644 (file)
@@ -137,6 +137,11 @@ function test()
 
             function step3()
             {
+                InspectorTest.expandElementsTree(step4);
+            }
+
+            function step4()
+            {
                 InspectorTest.evaluateInPageWithTimeout("appendElement('rootElement', 'childElement')");
                 InspectorTest.addResult("Append childElement to rootElement.");
                 waitUntilPausedAndDumpStack(next);
index b19d9aa..e98e0e3 100755 (executable)
@@ -1,3 +1,19 @@
+2011-10-24  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: do not force document loading on reload (should happen on demand).
+        https://bugs.webkit.org/show_bug.cgi?id=70724
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/ConsoleMessage.js:
+        (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
+        * inspector/front-end/DOMAgent.js:
+        (WebInspector.DOMAgent.prototype._documentUpdated):
+        * inspector/front-end/ElementsPanel.js:
+        (WebInspector.ElementsPanel.prototype.wasShown):
+        * inspector/front-end/ElementsTreeOutline.js:
+        (WebInspector.ElementsTreeOutline.prototype.setVisible):
+
 2011-10-24  Eric Carlson  <eric.carlson@apple.com>
 
         Drop MutableTextTrack and make TextTrack always mutable
index d65ec8a..e685541 100644 (file)
@@ -289,6 +289,7 @@ WebInspector.ConsoleMessageImpl.prototype = {
                 return;
             }
             var treeOutline = new WebInspector.ElementsTreeOutline(false, false, true);
+            treeOutline.setVisible(true);
             treeOutline.rootDOMNode = WebInspector.domAgent.nodeForId(nodeId);
             treeOutline.element.addStyleClass("outline-disclosure");
             if (!treeOutline.children[0].hasChildren)
index 5e7b1d7..2369a23 100644 (file)
@@ -726,7 +726,6 @@ WebInspector.DOMAgent.prototype = {
     _documentUpdated: function()
     {
         this._setDocument(null);
-        this.requestDocument();
     },
 
     /**
index 73b148d..174f000 100644 (file)
@@ -138,6 +138,9 @@ WebInspector.ElementsPanel.prototype = {
         this.treeOutline.updateSelection();
         this.treeOutline.setVisible(true);
 
+        if (!this.treeOutline.rootDOMNode)
+            WebInspector.domAgent.requestDocument();
+
         if (Preferences.nativeInstrumentationEnabled)
             this.sidebarElement.insertBefore(this.sidebarPanes.domBreakpoints.element, this.sidebarPanes.eventListeners.element);
     },
@@ -195,8 +198,13 @@ WebInspector.ElementsPanel.prototype = {
         this._reset();
         this.searchCanceled();
 
-        if (!inspectedRootDocument)
+        this.treeOutline.rootDOMNode = inspectedRootDocument;
+
+        if (!inspectedRootDocument) {
+            if (this.isShowing())
+                WebInspector.domAgent.requestDocument();
             return;
+        }
 
         if (Preferences.nativeInstrumentationEnabled)
             this.sidebarPanes.domBreakpoints.restoreBreakpoints();
index f8fe704..85f3675 100644 (file)
@@ -80,11 +80,6 @@ WebInspector.ElementsTreeOutline.prototype = {
         if (!this._visible)
             return;
 
-        if (!this.rootDOMNode) {
-            WebInspector.domAgent.requestDocument();
-            return;
-        }
-
         this._updateModifiedNodes();
     },