Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/dom. r=jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D158372
This commit is contained in:
Alexandre Poirot 2022-09-30 15:17:35 +00:00
Родитель 3b29f7936d
Коммит 0bcdaf30bc
14 изменённых файлов: 62 добавлений и 39 удалений

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

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const constants = require("devtools/client/dom/content/constants");
const constants = require("resource://devtools/client/dom/content/constants.js");
/**
* Used to filter DOM panel content.

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

@ -4,7 +4,7 @@
/* globals DomProvider */
"use strict";
const constants = require("devtools/client/dom/content/constants");
const constants = require("resource://devtools/client/dom/content/constants.js");
/**
* Used to fetch grip prototype and properties from the backend.

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

@ -10,23 +10,32 @@
const {
Component,
createFactory,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const { connect } = require("devtools/client/shared/vendor/react-redux");
const {
connect,
} = require("resource://devtools/client/shared/vendor/react-redux.js");
const TreeView = createFactory(
require("devtools/client/shared/components/tree/TreeView")
require("resource://devtools/client/shared/components/tree/TreeView.js")
);
// Reps
const { REPS, MODE } = require("devtools/client/shared/components/reps/index");
const {
REPS,
MODE,
} = require("resource://devtools/client/shared/components/reps/index.js");
const { Rep } = REPS;
const Grip = REPS.Grip;
// DOM Panel
const { GripProvider } = require("devtools/client/dom/content/grip-provider");
const {
GripProvider,
} = require("resource://devtools/client/dom/content/grip-provider.js");
const { DomDecorator } = require("devtools/client/dom/content/dom-decorator");
const {
DomDecorator,
} = require("resource://devtools/client/dom/content/dom-decorator.js");
/**
* Renders DOM panel tree.

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

@ -9,18 +9,20 @@
const {
Component,
createFactory,
} = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
} = require("resource://devtools/client/shared/vendor/react.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const { connect } = require("devtools/client/shared/vendor/react-redux");
const {
connect,
} = require("resource://devtools/client/shared/vendor/react-redux.js");
// DOM Panel
const DomTree = createFactory(
require("devtools/client/dom/content/components/DomTree")
require("resource://devtools/client/dom/content/components/DomTree.js")
);
const MainToolbar = createFactory(
require("devtools/client/dom/content/components/MainToolbar")
require("resource://devtools/client/dom/content/components/MainToolbar.js")
);
// Shortcuts
const { div } = dom;

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

@ -7,22 +7,22 @@
const {
Component,
createFactory,
} = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
} = require("resource://devtools/client/shared/vendor/react.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const SearchBox = createFactory(
require("devtools/client/shared/components/SearchBox")
require("resource://devtools/client/shared/components/SearchBox.js")
);
const { l10n } = require("devtools/client/dom/content/utils");
const { l10n } = require("resource://devtools/client/dom/content/utils.js");
// Actions
const {
fetchProperties,
} = require("devtools/client/dom/content/actions/grips");
} = require("resource://devtools/client/dom/content/actions/grips.js");
const {
setVisibilityFilter,
} = require("devtools/client/dom/content/actions/filter");
} = require("resource://devtools/client/dom/content/actions/filter.js");
/**
* This template is responsible for rendering a toolbar

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

@ -3,7 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Property } = require("devtools/client/dom/content/reducers/grips");
const {
Property,
} = require("resource://devtools/client/dom/content/reducers/grips.js");
// Implementation

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

@ -4,19 +4,23 @@
"use strict";
// React & Redux
const React = require("devtools/client/shared/vendor/react");
const ReactDOM = require("devtools/client/shared/vendor/react-dom");
const { Provider } = require("devtools/client/shared/vendor/react-redux");
const React = require("resource://devtools/client/shared/vendor/react.js");
const ReactDOM = require("resource://devtools/client/shared/vendor/react-dom.js");
const {
Provider,
} = require("resource://devtools/client/shared/vendor/react-redux.js");
// DOM Panel
const MainFrame = React.createFactory(
require("devtools/client/dom/content/components/MainFrame")
require("resource://devtools/client/dom/content/components/MainFrame.js")
);
// Store
const createStore = require("devtools/client/shared/redux/create-store");
const createStore = require("resource://devtools/client/shared/redux/create-store.js");
const { reducers } = require("devtools/client/dom/content/reducers/index");
const {
reducers,
} = require("resource://devtools/client/dom/content/reducers/index.js");
const store = createStore(reducers);
/**

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

@ -5,8 +5,10 @@
const {
fetchProperties,
} = require("devtools/client/dom/content/actions/grips");
const { Property } = require("devtools/client/dom/content/reducers/grips");
} = require("resource://devtools/client/dom/content/actions/grips.js");
const {
Property,
} = require("resource://devtools/client/dom/content/reducers/grips.js");
// Implementation
function GripProvider(grips, dispatch) {

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

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const constants = require("devtools/client/dom/content/constants");
const constants = require("resource://devtools/client/dom/content/constants.js");
/**
* Initial state definition

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

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const constants = require("devtools/client/dom/content/constants");
const constants = require("resource://devtools/client/dom/content/constants.js");
/**
* Initial state definition

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

@ -3,8 +3,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { grips } = require("devtools/client/dom/content/reducers/grips");
const { filter } = require("devtools/client/dom/content/reducers/filter");
const {
grips,
} = require("resource://devtools/client/dom/content/reducers/grips.js");
const {
filter,
} = require("resource://devtools/client/dom/content/reducers/filter.js");
exports.reducers = {
grips,

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

@ -19,8 +19,8 @@ const require = BrowserLoader({
XPCOMUtils.defineConstant(this, "require", require);
// Localization
const { LocalizationHelper } = require("devtools/shared/l10n");
const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
this.l10n = new LocalizationHelper("devtools/client/locales/dom.properties");
// Load DOM panel content
require("devtools/client/dom/content/dom-view.js");
require("resource://devtools/client/dom/content/dom-view.js");

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

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const EventEmitter = require("devtools/shared/event-emitter");
const EventEmitter = require("resource://devtools/shared/event-emitter.js");
loader.lazyRequireGetter(
this,
"openContentLink",

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

@ -12,7 +12,7 @@ Services.scriptloader.loadSubScript(
);
// DOM panel actions.
const constants = require("devtools/client/dom/content/constants");
const constants = require("resource://devtools/client/dom/content/constants.js");
// Uncomment this pref to dump all devtools emitted events to the console.
// Services.prefs.setBoolPref("devtools.dom.enabled", true);