Bug 1415554 - Inspector to use prop-types and react-dom-factories r=gl

MozReview-Commit-ID: 7NxFwgFLDAL
This commit is contained in:
Michael Ratcliffe 2017-11-08 18:55:58 +00:00
Родитель e50200ef65
Коммит 41dd42c3c4
29 изменённых файлов: 78 добавлений и 128 удалений

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

@ -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.");