Bug 1456680 - Part 5: Remove unused onShowGridLineNamesHighlight method. r=pbro
MozReview-Commit-ID: bqGe9Fxc7x
--- a/devtools/client/inspector/grids/components/Grid.js
+++ b/devtools/client/inspector/grids/components/Grid.js
@@ -22,17 +22,16 @@ class Grid extends PureComponent {
grids: PropTypes.arrayOf(PropTypes.shape(Types.grid)).isRequired,
highlighterSettings: PropTypes.shape(Types.highlighterSettings).isRequired,
setSelectedNode: PropTypes.func.isRequired,
onHideBoxModelHighlighter: PropTypes.func.isRequired,
onSetGridOverlayColor: PropTypes.func.isRequired,
onShowBoxModelHighlighterForNode: PropTypes.func.isRequired,
onShowGridAreaHighlight: PropTypes.func.isRequired,
onShowGridCellHighlight: PropTypes.func.isRequired,
- onShowGridLineNamesHighlight: PropTypes.func.isRequired,
onToggleGridHighlighter: PropTypes.func.isRequired,
onToggleShowGridAreas: PropTypes.func.isRequired,
onToggleShowGridLineNumbers: PropTypes.func.isRequired,
onToggleShowInfiniteLines: PropTypes.func.isRequired,
};
}
render() {
--- a/devtools/client/inspector/grids/grid-inspector.js
+++ b/devtools/client/inspector/grids/grid-inspector.js
@@ -59,17 +59,16 @@ class GridInspector {
this.onHighlighterShown = this.onHighlighterShown.bind(this);
this.onHighlighterHidden = this.onHighlighterHidden.bind(this);
this.onNavigate = this.onNavigate.bind(this);
this.onReflow = throttle(this.onReflow, 500, this);
this.onSetGridOverlayColor = this.onSetGridOverlayColor.bind(this);
this.onShowGridAreaHighlight = this.onShowGridAreaHighlight.bind(this);
this.onShowGridCellHighlight = this.onShowGridCellHighlight.bind(this);
- this.onShowGridLineNamesHighlight = this.onShowGridLineNamesHighlight.bind(this);
this.onSidebarSelect = this.onSidebarSelect.bind(this);
this.onToggleGridHighlighter = this.onToggleGridHighlighter.bind(this);
this.onToggleShowGridAreas = this.onToggleShowGridAreas.bind(this);
this.onToggleShowGridLineNumbers = this.onToggleShowGridLineNumbers.bind(this);
this.onToggleShowInfiniteLines = this.onToggleShowInfiniteLines.bind(this);
this.init();
}
@@ -136,17 +135,16 @@ class GridInspector {
}
getComponentProps() {
return {
getSwatchColorPickerTooltip: this.getSwatchColorPickerTooltip,
onSetGridOverlayColor: this.onSetGridOverlayColor,
onShowGridAreaHighlight: this.onShowGridAreaHighlight,
onShowGridCellHighlight: this.onShowGridCellHighlight,
- onShowGridLineNamesHighlight: this.onShowGridLineNamesHighlight,
onToggleGridHighlighter: this.onToggleGridHighlighter,
onToggleShowGridAreas: this.onToggleShowGridAreas,
onToggleShowGridLineNumbers: this.onToggleShowGridLineNumbers,
onToggleShowInfiniteLines: this.onToggleShowInfiniteLines,
};
}
/**
@@ -564,49 +562,16 @@ class GridInspector {
highlighterSettings.color = color;
this.showGridHighlighter(node, highlighterSettings);
this.store.dispatch(updateGridHighlighted(node, true));
}
/**
- * Highlights the grid line in the CSS Grid Highlighter for the given grid.
- *
- * @param {NodeFront} node
- * The NodeFront of the grid container element for which the grid
- * highlighter is highlighted for.
- * @param {Number|null} gridFragmentIndex
- * The index of the grid fragment for which the grid highlighter
- * is highlighted for.
- * @param {String} color
- * The color of the grid line for which the grid highlighter
- * is highlighted for.
- * @param {Number|null} lineNumber
- * The line number of the grid for which the grid highlighter
- * is highlighted for.
- * @param {String|null} type
- * The type of line for which the grid line is being highlighted for.
- */
- onShowGridLineNamesHighlight(node, gridFragmentIndex, color, lineNumber, type) {
- let { highlighterSettings } = this.store.getState();
-
- highlighterSettings.showGridLineNames = {
- gridFragmentIndex,
- lineNumber,
- type
- };
- highlighterSettings.color = color;
-
- this.showGridHighlighter(node, highlighterSettings);
-
- this.store.dispatch(updateGridHighlighted(node, true));
- }
-
- /**
* Handler for the inspector sidebar "select" event. Starts tracking reflows
* if the layout panel is visible. Otherwise, stop tracking reflows.
* Finally, refresh the layout view if it is visible.
*/
onSidebarSelect() {
if (!this.isPanelVisible()) {
this.inspector.reflowTracker.untrackReflows(this, this.onReflow);
return;
--- a/devtools/client/inspector/layout/layout.js
+++ b/devtools/client/inspector/layout/layout.js
@@ -49,17 +49,16 @@ class LayoutView {
} = this.flexboxInspector.getComponentProps();
this.gridInspector = new GridInspector(this.inspector, this.inspector.panelWin);
let {
getSwatchColorPickerTooltip,
onSetGridOverlayColor,
onShowGridAreaHighlight,
onShowGridCellHighlight,
- onShowGridLineNamesHighlight,
onToggleGridHighlighter,
onToggleShowGridAreas,
onToggleShowGridLineNumbers,
onToggleShowInfiniteLines,
} = this.gridInspector.getComponentProps();
let layoutApp = LayoutApp({
getSwatchColorPickerTooltip,
@@ -71,17 +70,16 @@ class LayoutView {
showBoxModelProperties: true,
onHideBoxModelHighlighter,
onSetGridOverlayColor,
onShowBoxModelEditor,
onShowBoxModelHighlighter,
onShowBoxModelHighlighterForNode,
onShowGridAreaHighlight,
onShowGridCellHighlight,
- onShowGridLineNamesHighlight,
onToggleFlexboxHighlighter,
onToggleGeometryEditor,
onToggleGridHighlighter,
onToggleShowGridAreas,
onToggleShowGridLineNumbers,
onToggleShowInfiniteLines,
});