Changeset 205676 in webkit
- Timestamp:
- Sep 8, 2016 4:21:27 PM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r205674 r205676 1 2016-09-08 Matt Baker <mattbaker@apple.com> 2 3 Web Inspector: TimelineDataGridNode should refresh when graph column is resized 4 https://bugs.webkit.org/show_bug.cgi?id=161765 5 <rdar://problem/28215674> 6 7 Reviewed by Brian Burg. 8 9 * UserInterface/Views/DataGrid.js: 10 (WebInspector.DataGrid.prototype.resizerDragging): 11 Call `DataGridNode.didResizeColumn` for all visible nodes in the columns 12 to the left and right of the column resizer. 13 14 * UserInterface/Views/DataGridNode.js: 15 (WebInspector.DataGridNode.prototype.didResizeColumn): 16 Add protected base class method for subclasses to override. 17 18 * UserInterface/Views/TimelineDataGridNode.js: 19 (WebInspector.TimelineDataGridNode.prototype.didResizeColumn): 20 Refresh the node's graph when the "graph" column is resized. 21 Renamed `left/rightCellIndex` -> `left/rightColumnIndex`. 22 1 23 2016-09-08 Nikita Vasilyev <nvasilyev@apple.com> 2 24 -
trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js
r205578 r205676 1784 1784 // Constrain the dragpoint to be within the space made up by the 1785 1785 // column directly to the left and the column directly to the right. 1786 var leftC ellIndex = resizer[WebInspector.DataGrid.PreviousColumnOrdinalSymbol];1787 var rightC ellIndex = resizer[WebInspector.DataGrid.NextColumnOrdinalSymbol];1786 var leftColumnIndex = resizer[WebInspector.DataGrid.PreviousColumnOrdinalSymbol]; 1787 var rightColumnIndex = resizer[WebInspector.DataGrid.NextColumnOrdinalSymbol]; 1788 1788 var firstRowCells = this._headerTableBodyElement.rows[0].cells; 1789 1789 var leftEdgeOfPreviousColumn = 0; 1790 for (var i = 0; i < leftC ellIndex; i++)1790 for (var i = 0; i < leftColumnIndex; i++) 1791 1791 leftEdgeOfPreviousColumn += firstRowCells[i].offsetWidth; 1792 1792 1793 1793 // Differences for other resize methods 1794 1794 if (this.resizeMethod === WebInspector.DataGrid.ResizeMethod.Last) { 1795 rightC ellIndex = this.resizers.length;1795 rightColumnIndex = this.resizers.length; 1796 1796 } else if (this.resizeMethod === WebInspector.DataGrid.ResizeMethod.First) { 1797 leftEdgeOfPreviousColumn += firstRowCells[leftC ellIndex].offsetWidth - firstRowCells[0].offsetWidth;1798 leftC ellIndex = 0;1799 } 1800 1801 var rightEdgeOfNextColumn = leftEdgeOfPreviousColumn + firstRowCells[leftC ellIndex].offsetWidth + firstRowCells[rightCellIndex].offsetWidth;1797 leftEdgeOfPreviousColumn += firstRowCells[leftColumnIndex].offsetWidth - firstRowCells[0].offsetWidth; 1798 leftColumnIndex = 0; 1799 } 1800 1801 var rightEdgeOfNextColumn = leftEdgeOfPreviousColumn + firstRowCells[leftColumnIndex].offsetWidth + firstRowCells[rightColumnIndex].offsetWidth; 1802 1802 1803 1803 // Give each column some padding so that they don't disappear. … … 1810 1810 1811 1811 var percentLeftColumn = (((dragPoint - leftEdgeOfPreviousColumn) / this._dataTableElement.offsetWidth) * 100) + "%"; 1812 this._headerTableColumnGroupElement.children[leftC ellIndex].style.width = percentLeftColumn;1813 this._dataTableColumnGroupElement.children[leftC ellIndex].style.width = percentLeftColumn;1812 this._headerTableColumnGroupElement.children[leftColumnIndex].style.width = percentLeftColumn; 1813 this._dataTableColumnGroupElement.children[leftColumnIndex].style.width = percentLeftColumn; 1814 1814 1815 1815 var percentRightColumn = (((rightEdgeOfNextColumn - dragPoint) / this._dataTableElement.offsetWidth) * 100) + "%"; 1816 this._headerTableColumnGroupElement.children[rightC ellIndex].style.width = percentRightColumn;1817 this._dataTableColumnGroupElement.children[rightC ellIndex].style.width = percentRightColumn;1816 this._headerTableColumnGroupElement.children[rightColumnIndex].style.width = percentRightColumn; 1817 this._dataTableColumnGroupElement.children[rightColumnIndex].style.width = percentRightColumn; 1818 1818 1819 1819 this._positionResizerElements(); 1820 1820 this._positionHeaderViews(); 1821 1822 const skipHidden = true; 1823 const dontPopulate = true; 1824 1825 let leftColumnIdentifier = this.orderedColumns[leftColumnIndex]; 1826 let rightColumnIdentifier = this.orderedColumns[rightColumnIndex]; 1827 let child = this.children[0]; 1828 1829 while (child) { 1830 child.didResizeColumn(leftColumnIdentifier); 1831 child.didResizeColumn(rightColumnIdentifier); 1832 child = child.traverseNextNode(skipHidden, this, dontPopulate); 1833 } 1834 1821 1835 event.preventDefault(); 1822 1836 } -
trunk/Source/WebInspectorUI/UserInterface/Views/DataGridNode.js
r205425 r205676 733 733 return typeof value === "string" ? value : null; 734 734 } 735 736 didResizeColumn(columnIdentifier) 737 { 738 // Override by subclasses. 739 } 735 740 }; 736 741 -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js
r205578 r205676 390 390 // Implemented by subclasses. 391 391 } 392 393 didResizeColumn(columnIdentifier) 394 { 395 if (columnIdentifier !== "graph") 396 return; 397 398 this.needsGraphRefresh(); 399 } 392 400 };
Note: See TracChangeset
for help on using the changeset viewer.