Commit 3834a861 authored by eustas@chromium.org's avatar eustas@chromium.org

DevTools: fixed UI glitches of inlined DataGrid.

1) fix inlined DataGrid columns widths
2) fix left border
3) do not show corner column

BUG=

Review URL: https://codereview.chromium.org/334183003

git-svn-id: svn://svn.chromium.org/blink/trunk@176305 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8cee5a4d
......@@ -39,6 +39,7 @@
position: static;
}
.data-grid.inline col.corner,
.data-grid.inline th.corner,
.data-grid.inline td.corner {
display: none;
......@@ -98,8 +99,8 @@
border-left: 1px solid #aaa;
}
.data-grid th:first-child,
.data-grid td:first-child {
.data-grid:not(.inline) th:first-child,
.data-grid:not(.inline) td:first-child {
border-left: none !important;
}
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment