Title: [195966] trunk/Source/WebInspectorUI
- Revision
- 195966
- Author
- [email protected]
- Date
- 2016-02-01 10:22:37 -0800 (Mon, 01 Feb 2016)
Log Message
Web Inspector: DataGridNode should support adding go-to arrow buttons to any cell
https://bugs.webkit.org/show_bug.cgi?id=153733
<rdar://problem/24431813>
Reviewed by Brian Burg.
Provide a way to add go-to arrow buttons to any grid cell from within a
DataGridNode subclass's implementation of createCellContent.
* UserInterface/Views/DataGrid.js:
New event type, GoToArrowClicked.
(WebInspector.DataGridNode.prototype.createGoToArrowButton.buttonClicked):
(WebInspector.DataGridNode.prototype.createGoToArrowButton):
Adds a go-to arrow button to the cell's content element. Clicking the button
dispatches an event on the DataGrid, with event data containing the
DataGridNode and identifier of the cell containing the arrow button.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (195965 => 195966)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-02-01 18:15:25 UTC (rev 195965)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-02-01 18:22:37 UTC (rev 195966)
@@ -1,3 +1,22 @@
+2016-02-01 Matt Baker <[email protected]>
+
+ Web Inspector: DataGridNode should support adding go-to arrow buttons to any cell
+ https://bugs.webkit.org/show_bug.cgi?id=153733
+ <rdar://problem/24431813>
+
+ Reviewed by Brian Burg.
+
+ Provide a way to add go-to arrow buttons to any grid cell from within a
+ DataGridNode subclass's implementation of createCellContent.
+
+ * UserInterface/Views/DataGrid.js:
+ New event type, GoToArrowClicked.
+ (WebInspector.DataGridNode.prototype.createGoToArrowButton.buttonClicked):
+ (WebInspector.DataGridNode.prototype.createGoToArrowButton):
+ Adds a go-to arrow button to the cell's content element. Clicking the button
+ dispatches an event on the DataGrid, with event data containing the
+ DataGridNode and identifier of the cell containing the arrow button.
+
2016-01-31 Jeremy Jones <[email protected]>
Add resize event for HTMLMediaElement
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (195965 => 195966)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2016-02-01 18:15:25 UTC (rev 195965)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2016-02-01 18:22:37 UTC (rev 195966)
@@ -1344,7 +1344,8 @@
SortChanged: "datagrid-sort-changed",
SelectedNodeChanged: "datagrid-selected-node-changed",
ExpandedNode: "datagrid-expanded-node",
- CollapsedNode: "datagrid-collapsed-node"
+ CollapsedNode: "datagrid-collapsed-node",
+ GoToArrowClicked: "datagrid-go-to-arrow-clicked"
};
WebInspector.DataGrid.ResizeMethod = {
@@ -1454,6 +1455,26 @@
this._element.appendChild(this.createCell(columnIdentifier));
}
+ createGoToArrowButton(cellElement)
+ {
+ function buttonClicked(event)
+ {
+ if (this.hidden || !this.revealed)
+ return;
+
+ event.stopPropagation();
+
+ let columnIdentifier = cellElement.__columnIdentifier;
+ this.dataGrid.dispatchEventToListeners(WebInspector.DataGrid.Event.GoToArrowClicked, {dataGridNode: this, columnIdentifier});
+ }
+
+ let button = WebInspector.createGoToArrowButton();
+ button.addEventListener("click", buttonClicked.bind(this));
+
+ let contentElement = cellElement.firstChild;
+ contentElement.appendChild(button);
+ }
+
refreshIfNeeded()
{
if (!this._needsRefresh)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes