Web Inspector: CSS Regions not displaying DOM Trees in inspector
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jun 2015 02:59:59 +0000 (02:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jun 2015 02:59:59 +0000 (02:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145903

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-06-11
Reviewed by Timothy Hatcher.

* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
Fix function inside the assertion to actually return a value.

* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.update):
For DOMTreeOutlines without a root node, don't clear the tree on updates,
since that will clear the nodes that have already been added explicitly.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
* UserInterface/Views/ResourcesTabContentView.js:
(WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject):
ResourceTab and sidebar can deal with ContentFlow related views.

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js
Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js
Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js

index a0b966f..c30ef39 100644 (file)
@@ -1,5 +1,27 @@
 2015-06-11  Joseph Pecoraro  <pecoraro@apple.com>
 
+        Web Inspector: CSS Regions not displaying DOM Trees in inspector
+        https://bugs.webkit.org/show_bug.cgi?id=145903
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Controllers/DOMTreeManager.js:
+        (WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
+        Fix function inside the assertion to actually return a value.
+
+        * UserInterface/Views/DOMTreeOutline.js:
+        (WebInspector.DOMTreeOutline.prototype.update):
+        For DOMTreeOutlines without a root node, don't clear the tree on updates,
+        since that will clear the nodes that have already been added explicitly.
+
+        * UserInterface/Views/ResourceSidebarPanel.js:
+        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
+        * UserInterface/Views/ResourcesTabContentView.js:
+        (WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject):
+        ResourceTab and sidebar can deal with ContentFlow related views.
+
+2015-06-11  Joseph Pecoraro  <pecoraro@apple.com>
+
         Web Inspector: IndexedDB data not showing for MDN example page
         https://bugs.webkit.org/show_bug.cgi?id=145851
 
index e68acca..da5a6c4 100644 (file)
@@ -435,7 +435,7 @@ WebInspector.DOMTreeManager = class DOMTreeManager extends WebInspector.Object
     _updateContentFlowFromPayload(contentFlow, flowPayload)
     {
         console.assert(contentFlow.contentNodes.length === flowPayload.content.length);
-        console.assert(contentFlow.contentNodes.every(function(node, i) { node.id === flowPayload.content[i]; }));
+        console.assert(contentFlow.contentNodes.every(function(node, i) { return node.id === flowPayload.content[i]; }));
 
         // FIXME: Collect the regions from the payload.
         contentFlow.overset = flowPayload.overset;
index f62e660..216e5be 100644 (file)
@@ -161,11 +161,11 @@ WebInspector.DOMTreeOutline = class DOMTreeOutline extends WebInspector.TreeOutl
     {
         var selectedNode = this.selectedTreeElement ? this.selectedTreeElement.representedObject : null;
 
-        this.removeChildren();
-
         if (!this.rootDOMNode)
             return;
 
+        this.removeChildren();
+
         var treeElement;
         if (this._includeRootDOMNode) {
             treeElement = new WebInspector.DOMTreeElement(this.rootDOMNode);
index dbc0852..54c7fe4 100644 (file)
@@ -335,7 +335,9 @@ WebInspector.ResourceSidebarPanel = class ResourceSidebarPanel extends WebInspec
         if (treeElement instanceof WebInspector.FolderTreeElement)
             return;
 
-        if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) {
+        if (treeElement instanceof WebInspector.ResourceTreeElement
+            || treeElement instanceof WebInspector.ScriptTreeElement
+            || treeElement instanceof WebInspector.ContentFlowTreeElement) {
             WebInspector.showRepresentedObject(treeElement.representedObject);
             return;
         }
index 95412e0..3d379a4 100644 (file)
@@ -49,7 +49,10 @@ WebInspector.ResourcesTabContentView.prototype = {
 
     canShowRepresentedObject: function(representedObject)
     {
-        return representedObject instanceof WebInspector.Frame || representedObject instanceof WebInspector.Resource || representedObject instanceof WebInspector.Script;
+        return representedObject instanceof WebInspector.Frame
+            || representedObject instanceof WebInspector.Resource
+            || representedObject instanceof WebInspector.Script
+            || representedObject instanceof WebInspector.ContentFlow;
     }
 };