Bug 1464192 - Part 18: Lazy load modules in the css-logic. r=pbro

This commit is contained in:
Gabriel Luong 2018-09-28 13:14:34 -04:00
Родитель 5525c2ed7a
Коммит f37977f646
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -6,7 +6,6 @@
"use strict";
const { getTabPrefs } = require("devtools/shared/indentation");
const InspectorUtils = require("InspectorUtils");
const MAX_DATA_URL_LENGTH = 40;
@ -50,8 +49,9 @@ const Services = require("Services");
loader.lazyImporter(this, "findCssSelector", "resource://gre/modules/css-selector.js");
loader.lazyImporter(this, "getCssPath", "resource://gre/modules/css-selector.js");
loader.lazyImporter(this, "getXPath", "resource://gre/modules/css-selector.js");
loader.lazyRequireGetter(this, "getCSSLexer", "devtools/shared/css/lexer", true);
loader.lazyRequireGetter(this, "getTabPrefs", "devtools/shared/indentation", true);
const CSSLexer = require("devtools/shared/css/lexer");
const {LocalizationHelper} = require("devtools/shared/l10n");
const styleInspectorL10N =
new LocalizationHelper("devtools/shared/locales/styleinspector.properties");
@ -190,7 +190,7 @@ function prettifyCSS(text, ruleCount) {
// minified file.
let indent = "";
let indentLevel = 0;
const tokens = CSSLexer.getCSSLexer(text);
const tokens = getCSSLexer(text);
let result = "";
let pushbackToken = undefined;