Title: [197906] trunk/Source/WebInspectorUI
Revision
197906
Author
[email protected]
Date
2016-03-09 17:10:09 -0800 (Wed, 09 Mar 2016)

Log Message

Web Inspector: Nodes in Computed Styles > Container Regions formatted incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=155277
<rdar://problem/25072711>

Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMTreeDataGrid.js:
(WebInspector.DOMTreeDataGrid):
Enable icon column property.

* UserInterface/Views/DOMTreeDataGridNode.js:
(WebInspector.DOMTreeDataGridNode):
Removed calls to unused methods.

(WebInspector.DOMTreeDataGridNode.prototype.createCellContent):
(WebInspector.DOMTreeDataGridNode.prototype._createNameCellDocumentFragment):
Simplified cell content creation.

(WebInspector.DOMTreeDataGridNode.prototype._updateNodeName): Deleted.
(WebInspector.DOMTreeDataGridNode.prototype._makeNameCell): Deleted.
Renamed _createNameCellDocumentFragment to be consistent with similar
methods in other data grid node classes.

(WebInspector.DOMTreeDataGridNode.prototype._updateNameCellData): Deleted.
No longer needed.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (197905 => 197906)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-03-10 01:09:03 UTC (rev 197905)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-03-10 01:10:09 UTC (rev 197906)
@@ -1,3 +1,31 @@
+2016-03-09  Matt Baker  <[email protected]>
+
+        Web Inspector: Nodes in Computed Styles > Container Regions formatted incorrectly.
+        https://bugs.webkit.org/show_bug.cgi?id=155277
+        <rdar://problem/25072711>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/DOMTreeDataGrid.js:
+        (WebInspector.DOMTreeDataGrid):
+        Enable icon column property.
+
+        * UserInterface/Views/DOMTreeDataGridNode.js:
+        (WebInspector.DOMTreeDataGridNode):
+        Removed calls to unused methods.
+
+        (WebInspector.DOMTreeDataGridNode.prototype.createCellContent):
+        (WebInspector.DOMTreeDataGridNode.prototype._createNameCellDocumentFragment):
+        Simplified cell content creation.
+
+        (WebInspector.DOMTreeDataGridNode.prototype._updateNodeName): Deleted.
+        (WebInspector.DOMTreeDataGridNode.prototype._makeNameCell): Deleted.
+        Renamed _createNameCellDocumentFragment to be consistent with similar
+        methods in other data grid node classes.
+
+        (WebInspector.DOMTreeDataGridNode.prototype._updateNameCellData): Deleted.
+        No longer needed.
+
 2016-03-09  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: Remove unnecessary constructor

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeDataGrid.js (197905 => 197906)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeDataGrid.js	2016-03-10 01:09:03 UTC (rev 197905)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeDataGrid.js	2016-03-10 01:10:09 UTC (rev 197906)
@@ -29,7 +29,7 @@
     constructor()
     {
         super({
-            name: {title: WebInspector.UIString("Node"), sortable: false}
+            name: {title: WebInspector.UIString("Node"), sortable: false, icon: true}
         });
 
         this._previousHoveredElement = null;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeDataGridNode.js (197905 => 197906)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeDataGridNode.js	2016-03-10 01:09:03 UTC (rev 197905)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeDataGridNode.js	2016-03-10 01:10:09 UTC (rev 197906)
@@ -30,9 +30,7 @@
     {
         super();
 
-        this._nameLabel = null;
         this._domNode = domNode;
-        this._updateNodeName();
     }
 
     get domNode()
@@ -47,39 +45,23 @@
         if (columnIdentifier !== "name")
             return super.createCellContent(columnIdentifier, cell);
 
-        var cell = this._makeNameCell();
-        this._updateNameCellData();
-        return cell;
+        return this._createNameCellDocumentFragment();
     }
 
     // Private
 
-    _updateNodeName()
+    _createNameCellDocumentFragment()
     {
-        this.data = "" WebInspector.displayNameForNode(this._domNode)};
-    }
+        let fragment = document.createDocumentFragment();
+        let mainTitle = WebInspector.displayNameForNode(this._domNode);
+        fragment.append(mainTitle);
 
-    _makeNameCell()
-    {
-        var fragment = document.createDocumentFragment();
-
-        fragment.appendChild(document.createElement("img")).classList.add("icon");
-
-        this._nameLabel = document.createElement("div");
-        this._nameLabel.classList.add("label");
-        fragment.appendChild(this._nameLabel);
-
-        var goToButton = fragment.appendChild(WebInspector.createGoToArrowButton());
+        let goToButton = fragment.appendChild(WebInspector.createGoToArrowButton());
         goToButton.addEventListener("click", this._goToArrowWasClicked.bind(this), false);
 
         return fragment;
     }
 
-    _updateNameCellData()
-    {
-        this._nameLabel.textContent = this.data.name;
-    }
-
     _goToArrowWasClicked()
     {
         WebInspector.showMainFrameDOMTree(this._domNode);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to