mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1424669 - Enable negative line numbers in the grid inspector. r=pbro
This commit is contained in:
parent
c8ce812620
commit
9da6ed3ccf
@ -81,7 +81,6 @@ pref("devtools.gridinspector.gridOutlineMaxRows", 50);
|
||||
pref("devtools.gridinspector.showGridAreas", false);
|
||||
pref("devtools.gridinspector.showGridLineNumbers", false);
|
||||
pref("devtools.gridinspector.showInfiniteLines", false);
|
||||
pref("devtools.gridinspector.showNegativeLineNumbers", false);
|
||||
|
||||
// Whether or not the box model panel is opened in the computed view
|
||||
pref("devtools.computed.boxmodel.opened", true);
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const Services = require("Services");
|
||||
const { AutoRefreshHighlighter } = require("./auto-refresh");
|
||||
const {
|
||||
CANVAS_SIZE,
|
||||
@ -38,8 +37,6 @@ const { LocalizationHelper } = require("devtools/shared/l10n");
|
||||
const LAYOUT_STRINGS_URI = "devtools/client/locales/layout.properties";
|
||||
const LAYOUT_L10N = new LocalizationHelper(LAYOUT_STRINGS_URI);
|
||||
|
||||
const NEGATIVE_LINE_NUMBERS_PREF = "devtools.gridinspector.showNegativeLineNumbers";
|
||||
|
||||
const COLUMNS = "cols";
|
||||
const ROWS = "rows";
|
||||
|
||||
@ -743,15 +740,12 @@ class CssGridHighlighter extends AutoRefreshHighlighter {
|
||||
if (this.options.showGridLineNumbers) {
|
||||
this.renderLineNumbers(fragment.cols, COLUMNS, this.getFirstRowLinePos(fragment));
|
||||
this.renderLineNumbers(fragment.rows, ROWS, this.getFirstColLinePos(fragment));
|
||||
|
||||
if (Services.prefs.getBoolPref(NEGATIVE_LINE_NUMBERS_PREF)) {
|
||||
this.renderNegativeLineNumbers(fragment.cols, COLUMNS,
|
||||
this.getLastRowLinePos(fragment));
|
||||
this.renderNegativeLineNumbers(fragment.rows, ROWS,
|
||||
this.getLastColLinePos(fragment));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the grid area highlight for the given area name or for all the grid areas.
|
||||
|
Loading…
Reference in New Issue
Block a user