Changeset 200962 in webkit
- Timestamp:
- May 16, 2016, 1:19:24 PM (9 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r200955 r200962 1 2016-05-16 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: Contents of Duration column are covered by always on (legacy) scroll bars 4 https://bugs.webkit.org/show_bug.cgi?id=157590 5 6 Reviewed by Timothy Hatcher. 7 8 Set the right padding of the DataGrid header to match the scrollbar width. 9 10 * UserInterface/Views/DataGrid.css: 11 (.data-grid .data-container): 12 (.data-grid.inline .data-container): 13 Don't show scrollbars for inline data grids. 14 15 (.data-grid > .header-wrapper): 16 (.data-grid.no-header > .header-wrapper > table.header): 17 (.data-grid.no-header > table.header): Deleted. 18 (.data-grid th): Deleted. 19 * UserInterface/Views/DataGrid.js: 20 (WebInspector.DataGrid): 21 We can't add padding-rigth to a table. Wrap the table in div.header-wrapper. 22 23 (WebInspector.DataGrid.prototype._updateScrollbarPadding): 24 (WebInspector.DataGrid.prototype.layout): 25 1 26 2016-05-16 Nikita Vasilyev <nvasilyev@apple.com> 2 27 -
trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css
r200918 r200962 51 51 right: 0; 52 52 overflow-x: hidden; 53 overflow-y: overlay;53 overflow-y: scroll; 54 54 } 55 55 56 56 .data-grid.inline .data-container { 57 57 position: static; 58 overflow-y: auto; 58 59 } 59 60 … … 62 63 } 63 64 64 .data-grid.no-header > table.header { 65 .data-grid > .header-wrapper { 66 border-bottom: 0.5px solid var(--border-color); 67 } 68 69 .data-grid.no-header > .header-wrapper > table.header { 65 70 display: none; 66 71 } … … 75 80 76 81 background-color: white; 77 78 border-bottom: 0.5px solid var(--border-color);79 82 80 83 font-weight: normal; -
trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js
r200949 r200962 53 53 this.resizers = []; 54 54 this._columnWidthsInitialized = false; 55 this._scrollbarWidth = 0; 55 56 56 57 this._cachedScrollTop = NaN; … … 68 69 this.element.copyHandler = this; 69 70 71 this._headerWrapperElement = document.createElement("div"); 72 this._headerWrapperElement.classList.add("header-wrapper"); 73 70 74 this._headerTableElement = document.createElement("table"); 71 75 this._headerTableElement.className = "header"; 76 this._headerWrapperElement.appendChild(this._headerTableElement); 77 72 78 this._headerTableColumnGroupElement = this._headerTableElement.createChild("colgroup"); 73 79 this._headerTableBodyElement = this._headerTableElement.createChild("tbody"); … … 110 116 this._fillerRowElement = this.dataTableBodyElement.createChild("tr", "filler"); 111 117 112 this.element.appendChild(this._header TableElement);118 this.element.appendChild(this._headerWrapperElement); 113 119 this.element.appendChild(this._scrollContainerElement); 114 120 … … 120 126 this.insertColumn(columnIdentifier, columnsData[columnIdentifier]); 121 127 } 128 129 this._updateScrollbarPadding(); 130 } 131 132 _updateScrollbarPadding() 133 { 134 if (this._inline) 135 return; 136 137 let scrollbarWidth = this._scrollContainerElement.offsetWidth - this._scrollContainerElement.scrollWidth; 138 if (this._scrollbarWidth === scrollbarWidth) 139 return; 140 141 this._headerWrapperElement.style.paddingRight = scrollbarWidth + "px"; 142 this._scrollbarWidth = scrollbarWidth; 122 143 } 123 144 … … 807 828 this._positionResizerElements(); 808 829 this._positionHeaderViews(); 830 this._updateScrollbarPadding(); 809 831 810 832 this._cachedScrollTop = NaN;
Note:
See TracChangeset
for help on using the changeset viewer.