Title: [221266] trunk/Source/WebInspectorUI
Revision
221266
Author
[email protected]
Date
2017-08-28 12:56:58 -0700 (Mon, 28 Aug 2017)

Log Message

Web Inspector: Remove some unused DataGrid code
https://bugs.webkit.org/show_bug.cgi?id=176029

Patch by Joseph Pecoraro <[email protected]> on 2017-08-28
Reviewed by Matt Baker.

* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.get copyTextDelimiter):
(WI.DataGrid.prototype.set copyTextDelimiter):
(WI.DataGrid.prototype.resizerDragging):
(WI.DataGrid.prototype.columnWidthsMap): Deleted.
(WI.DataGrid.prototype.applyColumnWidthsMap): Deleted.
(WI.DataGrid.prototype.get resizeMethod): Deleted.
(WI.DataGrid.prototype.set resizeMethod): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (221265 => 221266)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-08-28 19:48:58 UTC (rev 221265)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-08-28 19:56:58 UTC (rev 221266)
@@ -1,3 +1,19 @@
+2017-08-28  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Remove some unused DataGrid code
+        https://bugs.webkit.org/show_bug.cgi?id=176029
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/DataGrid.js:
+        (WI.DataGrid.prototype.get copyTextDelimiter):
+        (WI.DataGrid.prototype.set copyTextDelimiter):
+        (WI.DataGrid.prototype.resizerDragging):
+        (WI.DataGrid.prototype.columnWidthsMap): Deleted.
+        (WI.DataGrid.prototype.applyColumnWidthsMap): Deleted.
+        (WI.DataGrid.prototype.get resizeMethod): Deleted.
+        (WI.DataGrid.prototype.set resizeMethod): Deleted.
+
 2017-08-27  Devin Rousso  <[email protected]>
 
         Web Inspector: Record actions performed on WebGLRenderingContext

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (221265 => 221266)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js	2017-08-28 19:48:58 UTC (rev 221265)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js	2017-08-28 19:56:58 UTC (rev 221266)
@@ -230,6 +230,9 @@
     get columnChooserEnabled() { return this._columnChooserEnabled; }
     set columnChooserEnabled(x) { this._columnChooserEnabled = x; }
 
+    get copyTextDelimiter() { return this._copyTextDelimiter; }
+    set copyTextDelimiter(x) { this._copyTextDelimiter = x; }
+
     get refreshCallback()
     {
         return this._refreshCallback;
@@ -891,28 +894,6 @@
         this._cachedScrollableOffsetHeight = NaN;
     }
 
-    columnWidthsMap()
-    {
-        var result = {};
-        for (var [identifier, column] of this.columns) {
-            var width = this._headerTableColumnGroupElement.children[column["ordinal"]].style.width;
-            result[identifier] = parseFloat(width);
-        }
-        return result;
-    }
-
-    applyColumnWidthsMap(columnWidthsMap)
-    {
-        for (var [identifier, column] of this.columns) {
-            var width = (columnWidthsMap[identifier] || 0) + "%";
-            var ordinal = column["ordinal"];
-            this._headerTableColumnGroupElement.children[ordinal].style.width = width;
-            this._dataTableColumnGroupElement.children[ordinal].style.width = width;
-        }
-
-        this.needsLayout();
-    }
-
     _isColumnVisible(columnIdentifier)
     {
         return !this.columns.get(columnIdentifier)["hidden"];
@@ -1718,8 +1699,6 @@
         return (data instanceof Node ? data.textContent : data) || "";
     }
 
-    set copyTextDelimiter(value) { this._copyTextDelimiter = value; }
-
     _copyTextForDataGridNode(node)
     {
         let fields = node.dataGrid.orderedColumns.map((identifier) => this.textForDataGridNodeColumn(node, identifier));
@@ -1778,18 +1757,6 @@
         return gridNode && gridNode.selectable && gridNode.copyable;
     }
 
-    get resizeMethod()
-    {
-        if (!this._resizeMethod)
-            return WI.DataGrid.ResizeMethod.Nearest;
-        return this._resizeMethod;
-    }
-
-    set resizeMethod(method)
-    {
-        this._resizeMethod = method;
-    }
-
     resizerDragStarted(resizer)
     {
         if (!resizer[WI.DataGrid.NextColumnOrdinalSymbol])
@@ -1824,14 +1791,6 @@
         for (let i = 0; i < leftColumnIndex; ++i)
             leadingEdgeOfPreviousColumn += firstRowCells[i].offsetWidth;
 
-        // Differences for other resize methods
-        if (this.resizeMethod === WI.DataGrid.ResizeMethod.Last) {
-            rightColumnIndex = this.resizers.length;
-        } else if (this.resizeMethod === WI.DataGrid.ResizeMethod.First) {
-            leadingEdgeOfPreviousColumn += firstRowCells[leftColumnIndex].offsetWidth - firstRowCells[0].offsetWidth;
-            leftColumnIndex = 0;
-        }
-
         let trailingEdgeOfNextColumn = leadingEdgeOfPreviousColumn + firstRowCells[leftColumnIndex].offsetWidth + firstRowCells[rightColumnIndex].offsetWidth;
 
         // Give each column some padding so that they don't disappear.
@@ -1948,12 +1907,6 @@
     NodeWasFiltered: "datagrid-node-was-filtered"
 };
 
-WI.DataGrid.ResizeMethod = {
-    Nearest: "nearest",
-    First: "first",
-    Last: "last"
-};
-
 WI.DataGrid.SortOrder = {
     Indeterminate: "data-grid-sort-order-indeterminate",
     Ascending: "data-grid-sort-order-ascending",
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to