Backed out changeset f37177d85efe (bug 1424669) for ES failure in /builds/worker/checkouts/gecko/devtools/server/actors/highlighters/css-grid.js:7:7 r=backout on a CLOSED TREE

This commit is contained in:
Margareta Eliza Balazs 2017-12-13 07:05:44 +02:00
parent 7e5a64dac7
commit 8f80d8a5ba
2 changed files with 10 additions and 4 deletions

View File

@ -81,6 +81,7 @@ 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);

View File

@ -38,6 +38,8 @@ 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";
@ -741,10 +743,13 @@ class CssGridHighlighter extends AutoRefreshHighlighter {
if (this.options.showGridLineNumbers) {
this.renderLineNumbers(fragment.cols, COLUMNS, this.getFirstRowLinePos(fragment));
this.renderLineNumbers(fragment.rows, ROWS, this.getFirstColLinePos(fragment));
this.renderNegativeLineNumbers(fragment.cols, COLUMNS,
this.getLastRowLinePos(fragment));
this.renderNegativeLineNumbers(fragment.rows, ROWS,
this.getLastColLinePos(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));
}
}
}