зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1415554 - Inspector to use prop-types and react-dom-factories r=gl
MozReview-Commit-ID: 7NxFwgFLDAL
This commit is contained in:
Родитель
e50200ef65
Коммит
41dd42c3c4
|
@ -4,8 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { DOM: dom, PropTypes, PureComponent } =
|
||||
require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent } = 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");
|
||||
|
||||
class AnimationItem extends PureComponent {
|
||||
static get propTypes() {
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { createFactory, DOM: dom, PropTypes, PureComponent } =
|
||||
require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
|
||||
const AnimationItem = createFactory(require("./AnimationItem"));
|
||||
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { createFactory, DOM: dom, PropTypes, PureComponent } =
|
||||
require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
const { connect } = require("devtools/client/shared/vendor/react-redux");
|
||||
|
||||
const AnimationList = createFactory(require("./AnimationList"));
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { DOM: dom, PropTypes, PureComponent } =
|
||||
require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent } = 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");
|
||||
const { connect } = require("devtools/client/shared/vendor/react-redux");
|
||||
const { LocalizationHelper } = require("devtools/shared/l10n");
|
||||
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
createFactory,
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
|
||||
const BoxModelInfo = createFactory(require("./BoxModelInfo"));
|
||||
const BoxModelMain = createFactory(require("./BoxModelMain"));
|
||||
|
|
|
@ -5,11 +5,8 @@
|
|||
"use strict";
|
||||
|
||||
const Services = require("Services");
|
||||
const {
|
||||
createFactory,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { connect } = require("devtools/client/shared/vendor/react-redux");
|
||||
const { LocalizationHelper } = require("devtools/shared/l10n");
|
||||
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent } = 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");
|
||||
const { editableItem } = require("devtools/client/shared/inplace-editor");
|
||||
|
||||
const LONG_TEXT_ROTATE_LIMIT = 3;
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent } = 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");
|
||||
const { LocalizationHelper } = require("devtools/shared/l10n");
|
||||
|
||||
const Types = require("../types");
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
createFactory,
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
const { findDOMNode } = require("devtools/client/shared/vendor/react-dom");
|
||||
const { KeyCodes } = require("devtools/client/shared/keycodes");
|
||||
const { LocalizationHelper } = require("devtools/shared/l10n");
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
createFactory,
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
const { LocalizationHelper } = require("devtools/shared/l10n");
|
||||
|
||||
const ComputedProperty = createFactory(require("./ComputedProperty"));
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent } = 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");
|
||||
|
||||
const { REPS, MODE } = require("devtools/client/shared/components/reps/reps");
|
||||
const { Rep } = REPS;
|
||||
|
|
|
@ -4,13 +4,12 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { PropTypes } = require("devtools/client/shared/vendor/react");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
/**
|
||||
* The box model data for the current selected node.
|
||||
*/
|
||||
exports.boxModel = {
|
||||
|
||||
// Whether or not the geometry editor is enabled
|
||||
geometryEditorEnabled: PropTypes.boolean,
|
||||
|
||||
|
@ -19,5 +18,4 @@ exports.boxModel = {
|
|||
|
||||
// The offset parent for the selected node
|
||||
offsetParent: PropTypes.object,
|
||||
|
||||
};
|
||||
|
|
|
@ -6,10 +6,12 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { DOM, Component, PropTypes } = require("devtools/client/shared/vendor/react");
|
||||
const { Component } = 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");
|
||||
|
||||
// Shortcuts
|
||||
const { div } = DOM;
|
||||
const { div } = dom;
|
||||
|
||||
/**
|
||||
* Helper panel component that is using an existing DOM node
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
createFactory,
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
const { connect } = require("devtools/client/shared/vendor/react-redux");
|
||||
|
||||
const ObjectTreeView = createFactory(require("./ObjectTreeView"));
|
||||
|
|
|
@ -4,11 +4,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
createFactory,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
const { REPS, MODE } = require("devtools/client/shared/components/reps/reps");
|
||||
const { Rep } = REPS;
|
||||
|
|
|
@ -4,14 +4,12 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { PropTypes } = require("devtools/client/shared/vendor/react");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
exports.flexbox = {
|
||||
|
||||
// The id of the flexbox container.
|
||||
id: PropTypes.number,
|
||||
|
||||
// The node front of the flexbox container.
|
||||
nodeFront: PropTypes.object,
|
||||
|
||||
};
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent } = 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");
|
||||
|
||||
const { getStr } = require("../utils/l10n");
|
||||
const Types = require("../types");
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
createFactory,
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
|
||||
const Font = createFactory(require("./Font"));
|
||||
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
createFactory,
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
const { connect } = require("devtools/client/shared/vendor/react-redux");
|
||||
|
||||
const SearchBox = createFactory(require("devtools/client/shared/components/SearchBox"));
|
||||
|
|
|
@ -4,13 +4,12 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { PropTypes } = require("devtools/client/shared/vendor/react");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
/**
|
||||
* A single font.
|
||||
*/
|
||||
exports.font = {
|
||||
|
||||
// The name of the font family
|
||||
CSSFamilyName: PropTypes.string,
|
||||
|
||||
|
@ -31,6 +30,4 @@ exports.font = {
|
|||
|
||||
// The URI of the font file
|
||||
URI: PropTypes.string,
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
createFactory,
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
|
||||
const GridDisplaySettings = createFactory(require("./GridDisplaySettings"));
|
||||
const GridList = createFactory(require("./GridList"));
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent } = 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");
|
||||
|
||||
const Types = require("../types");
|
||||
const { getStr } = require("../utils/l10n");
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent } = 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");
|
||||
const { findDOMNode } = require("devtools/client/shared/vendor/react-dom");
|
||||
|
||||
// Reps
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
createFactory,
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
|
||||
const GridItem = createFactory(require("./GridItem"));
|
||||
|
||||
|
|
|
@ -5,11 +5,9 @@
|
|||
"use strict";
|
||||
|
||||
const Services = require("Services");
|
||||
const {
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent } = 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");
|
||||
|
||||
const Types = require("../types");
|
||||
const { getStr } = require("../utils/l10n");
|
||||
|
|
|
@ -4,13 +4,12 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { PropTypes } = require("devtools/client/shared/vendor/react");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
|
||||
/**
|
||||
* A single grid container in the document.
|
||||
*/
|
||||
exports.grid = {
|
||||
|
||||
// The id of the grid
|
||||
id: PropTypes.number,
|
||||
|
||||
|
@ -25,18 +24,15 @@ exports.grid = {
|
|||
|
||||
// The node front of the grid container
|
||||
nodeFront: PropTypes.object,
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* The grid highlighter settings on what to display in its grid overlay in the document.
|
||||
*/
|
||||
exports.highlighterSettings = {
|
||||
|
||||
// Whether or not the grid highlighter should show the grid line numbers
|
||||
showGridLineNumbers: PropTypes.bool,
|
||||
|
||||
// Whether or not the grid highlighter extends the grid lines infinitely
|
||||
showInfiniteLines: PropTypes.bool,
|
||||
|
||||
};
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const React = require("devtools/client/shared/vendor/react");
|
||||
const { PureComponent, DOM: dom, PropTypes } = React;
|
||||
const { createElement, PureComponent } = 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");
|
||||
|
||||
const { div, span } = dom;
|
||||
|
||||
|
@ -76,7 +77,7 @@ class Accordion extends PureComponent {
|
|||
{ className: "_content",
|
||||
style: { display: opened[i] ? "block" : "none" }
|
||||
},
|
||||
React.createElement(item.component, item.componentProps || {})
|
||||
createElement(item.component, item.componentProps || {})
|
||||
) :
|
||||
null
|
||||
);
|
||||
|
|
|
@ -5,12 +5,9 @@
|
|||
"use strict";
|
||||
|
||||
const Services = require("Services");
|
||||
const {
|
||||
createFactory,
|
||||
DOM: dom,
|
||||
PropTypes,
|
||||
PureComponent,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { createFactory, PureComponent } = 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");
|
||||
const { connect } = require("devtools/client/shared/vendor/react-redux");
|
||||
const { LocalizationHelper } = require("devtools/shared/l10n");
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ add_task(function* () {
|
|||
let { inspector } = yield openInspectorForURL(TEST_URI);
|
||||
|
||||
const React = inspector.React;
|
||||
const { div } = React.DOM;
|
||||
const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
const { div } = dom;
|
||||
|
||||
info("Adding custom panel.");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче