Title: [200962] trunk/Source/WebInspectorUI
- Revision
- 200962
- Author
- [email protected]
- Date
- 2016-05-16 13:19:24 -0700 (Mon, 16 May 2016)
Log Message
Web Inspector: Contents of Duration column are covered by always on (legacy) scroll bars
https://bugs.webkit.org/show_bug.cgi?id=157590
Reviewed by Timothy Hatcher.
Set the right padding of the DataGrid header to match the scrollbar width.
* UserInterface/Views/DataGrid.css:
(.data-grid .data-container):
(.data-grid.inline .data-container):
Don't show scrollbars for inline data grids.
(.data-grid > .header-wrapper):
(.data-grid.no-header > .header-wrapper > table.header):
(.data-grid.no-header > table.header): Deleted.
(.data-grid th): Deleted.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
We can't add padding-rigth to a table. Wrap the table in div.header-wrapper.
(WebInspector.DataGrid.prototype._updateScrollbarPadding):
(WebInspector.DataGrid.prototype.layout):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (200961 => 200962)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-05-16 20:01:03 UTC (rev 200961)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-05-16 20:19:24 UTC (rev 200962)
@@ -1,5 +1,30 @@
2016-05-16 Nikita Vasilyev <[email protected]>
+ Web Inspector: Contents of Duration column are covered by always on (legacy) scroll bars
+ https://bugs.webkit.org/show_bug.cgi?id=157590
+
+ Reviewed by Timothy Hatcher.
+
+ Set the right padding of the DataGrid header to match the scrollbar width.
+
+ * UserInterface/Views/DataGrid.css:
+ (.data-grid .data-container):
+ (.data-grid.inline .data-container):
+ Don't show scrollbars for inline data grids.
+
+ (.data-grid > .header-wrapper):
+ (.data-grid.no-header > .header-wrapper > table.header):
+ (.data-grid.no-header > table.header): Deleted.
+ (.data-grid th): Deleted.
+ * UserInterface/Views/DataGrid.js:
+ (WebInspector.DataGrid):
+ We can't add padding-rigth to a table. Wrap the table in div.header-wrapper.
+
+ (WebInspector.DataGrid.prototype._updateScrollbarPadding):
+ (WebInspector.DataGrid.prototype.layout):
+
+2016-05-16 Nikita Vasilyev <[email protected]>
+
Web Inspector: Background stripes don't span the width of Network sidebar
https://bugs.webkit.org/show_bug.cgi?id=157744
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css (200961 => 200962)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css 2016-05-16 20:01:03 UTC (rev 200961)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css 2016-05-16 20:19:24 UTC (rev 200962)
@@ -50,18 +50,23 @@
left: 0;
right: 0;
overflow-x: hidden;
- overflow-y: overlay;
+ overflow-y: scroll;
}
.data-grid.inline .data-container {
position: static;
+ overflow-y: auto;
}
.data-grid.inline {
border: 0.5px solid var(--border-color);
}
-.data-grid.no-header > table.header {
+.data-grid > .header-wrapper {
+ border-bottom: 0.5px solid var(--border-color);
+}
+
+.data-grid.no-header > .header-wrapper > table.header {
display: none;
}
@@ -75,8 +80,6 @@
background-color: white;
- border-bottom: 0.5px solid var(--border-color);
-
font-weight: normal;
height: 22px;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (200961 => 200962)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2016-05-16 20:01:03 UTC (rev 200961)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2016-05-16 20:19:24 UTC (rev 200962)
@@ -52,6 +52,7 @@
this.rowHeight = 20;
this.resizers = [];
this._columnWidthsInitialized = false;
+ this._scrollbarWidth = 0;
this._cachedScrollTop = NaN;
this._cachedScrollableOffsetHeight = NaN;
@@ -67,8 +68,13 @@
this.element.addEventListener("keydown", this._keyDown.bind(this), false);
this.element.copyHandler = this;
+ this._headerWrapperElement = document.createElement("div");
+ this._headerWrapperElement.classList.add("header-wrapper");
+
this._headerTableElement = document.createElement("table");
this._headerTableElement.className = "header";
+ this._headerWrapperElement.appendChild(this._headerTableElement);
+
this._headerTableColumnGroupElement = this._headerTableElement.createChild("colgroup");
this._headerTableBodyElement = this._headerTableElement.createChild("tbody");
this._headerTableRowElement = this._headerTableBodyElement.createChild("tr");
@@ -109,7 +115,7 @@
this._fillerRowElement = this.dataTableBodyElement.createChild("tr", "filler");
- this.element.appendChild(this._headerTableElement);
+ this.element.appendChild(this._headerWrapperElement);
this.element.appendChild(this._scrollContainerElement);
if (preferredColumnOrder) {
@@ -119,8 +125,23 @@
for (var columnIdentifier in columnsData)
this.insertColumn(columnIdentifier, columnsData[columnIdentifier]);
}
+
+ this._updateScrollbarPadding();
}
+ _updateScrollbarPadding()
+ {
+ if (this._inline)
+ return;
+
+ let scrollbarWidth = this._scrollContainerElement.offsetWidth - this._scrollContainerElement.scrollWidth;
+ if (this._scrollbarWidth === scrollbarWidth)
+ return;
+
+ this._headerWrapperElement.style.paddingRight = scrollbarWidth + "px";
+ this._scrollbarWidth = scrollbarWidth;
+ }
+
static createSortableDataGrid(columnNames, values)
{
var numColumns = columnNames.length;
@@ -806,6 +827,7 @@
if (layoutReason === WebInspector.View.LayoutReason.Resize || firstUpdate) {
this._positionResizerElements();
this._positionHeaderViews();
+ this._updateScrollbarPadding();
this._cachedScrollTop = NaN;
this._cachedScrollableOffsetHeight = NaN;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes