| Index: Source/devtools/front_end/ui/DataGrid.js
|
| diff --git a/Source/devtools/front_end/ui/DataGrid.js b/Source/devtools/front_end/ui/DataGrid.js
|
| index dd84de8afc94a2a274233e49d4248fad1e88faf1..7edaf5c62d6bd8b19892450d30a84e1733af50b7 100644
|
| --- a/Source/devtools/front_end/ui/DataGrid.js
|
| +++ b/Source/devtools/front_end/ui/DataGrid.js
|
| @@ -672,13 +672,16 @@ WebInspector.DataGrid.prototype = {
|
|
|
| _applyColumnWeights: function()
|
| {
|
| + var tableWidth = this.element.offsetWidth - this._cornerWidth;
|
| + if (tableWidth <= 0)
|
| + return;
|
| +
|
| var sumOfWeights = 0.0;
|
| for (var i = 0; i < this._visibleColumnsArray.length; ++i)
|
| sumOfWeights += this._visibleColumnsArray[i].weight;
|
|
|
| var sum = 0;
|
| var lastOffset = 0;
|
| - var tableWidth = this.element.offsetWidth - this._cornerWidth;
|
|
|
| for (var i = 0; i < this._visibleColumnsArray.length; ++i) {
|
| sum += this._visibleColumnsArray[i].weight;
|
| @@ -1128,6 +1131,8 @@ WebInspector.DataGrid.prototype = {
|
| */
|
| columnOffset: function(columnId)
|
| {
|
| + if (!this.element.offsetWidth)
|
| + return 0;
|
| for (var i = 1; i < this._visibleColumnsArray.length; ++i) {
|
| if (columnId === this._visibleColumnsArray[i].identifier)
|
| return this._resizers[i - 1].__position;
|
|
|