Commit 8f80d8a5 authored by Margareta Eliza Balazs's avatar Margareta Eliza Balazs
Browse files

Backed out changeset f37177d85efe (bug 1424669) for ES failure in...

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
parent 7e5a64da
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
+9 −4
Original line number Diff line number Diff line
@@ -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,12 +743,15 @@ 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.