Skip to content

Commit

Permalink
squash 'resources/unpacked/devtools' changes from 5cf904a..1cdfbd9
Browse files Browse the repository at this point in the history
1cdfbd9 DevTools: rename devtools.js into devtools_compatibility.js
4df3084 DevTools: Reformat: Make TimelineJSProfile functions static
f2186c2 DevTools: Consolidate completion code into JavaScriptAutocomplete.js
56f5144 DevTools: Whitelist Runtime stats counters shown on timeline.
83f568a DevTools: throttle calls to ToolbarMenuButton.trigger() to avoid bad context menu state on Mac
8ca9ec6 DevTools: Refactoring: remove unrestricted from certain timeline classes.
22058c7 DevTools: Remove ghost text from FilteredListWidget
887b303 [DevTools] Scope generated protocol entities under Protocol namespace.
e32febf DevTools: isolate settings of custom devtoools front-end.
e4334a9 Move debug_devtools to a buildflag_header.

git-subtree-dir: resources/unpacked/devtools
git-subtree-split: 1cdfbd9
  • Loading branch information
darwin committed Nov 3, 2016
1 parent efd1717 commit 3f3cf7f
Show file tree
Hide file tree
Showing 115 changed files with 1,471 additions and 1,456 deletions.
4 changes: 3 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
# found in the LICENSE file.

import("//build/config/features.gni")
import("//third_party/WebKit/public/public_features.gni")
import("//third_party/WebKit/Source/core/core.gni")

devtools_embedder_scripts = [
"front_end/devtools.js",
"front_end/devtools_compatibility.js",
"front_end/Tests.js",
]
devtools_core_base_files = [
Expand Down Expand Up @@ -67,6 +68,7 @@ devtools_components_js_files = [
"front_end/components/DOMPresentationUtils.js",
"front_end/components/ExecutionContextSelector.js",
"front_end/components/HandlerRegistry.js",
"front_end/components/JavaScriptAutocomplete.js",
"front_end/components/BreakpointsSidebarPaneBase.js",
"front_end/components/Linkifier.js",
"front_end/components/NetworkConditionsSelector.js",
Expand Down
2 changes: 1 addition & 1 deletion front_end/accessibility/AXTreePane.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ WebInspector.AXNodeTreeElement = class extends TreeElement {
}

/**
* @param {?AccessibilityAgent.AXValue} role
* @param {?Protocol.Accessibility.AXValue} role
*/
_appendRoleElement(role) {
if (!role)
Expand Down
26 changes: 13 additions & 13 deletions front_end/accessibility/AccessibilityModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
WebInspector.AccessibilityNode = class extends WebInspector.SDKObject {
/**
* @param {!WebInspector.AccessibilityModel} accessibilityModel
* @param {!AccessibilityAgent.AXNode} payload
* @param {!Protocol.Accessibility.AXNode} payload
*/
constructor(accessibilityModel, payload) {
super(accessibilityModel.target());
Expand Down Expand Up @@ -39,58 +39,58 @@ WebInspector.AccessibilityNode = class extends WebInspector.SDKObject {
}

/**
* @return {?Array<!AccessibilityAgent.AXProperty>}
* @return {?Array<!Protocol.Accessibility.AXProperty>}
*/
ignoredReasons() {
return this._ignoredReasons || null;
}

/**
* @return {?AccessibilityAgent.AXValue}
* @return {?Protocol.Accessibility.AXValue}
*/
role() {
return this._role || null;
}

/**
* @return {!Array<!AccessibilityAgent.AXProperty>}
* @return {!Array<!Protocol.Accessibility.AXProperty>}
*/
coreProperties() {
var properties = [];

if (this._name)
properties.push(/** @type {!AccessibilityAgent.AXProperty} */ ({name: 'name', value: this._name}));
properties.push(/** @type {!Protocol.Accessibility.AXProperty} */ ({name: 'name', value: this._name}));
if (this._description)
properties.push(/** @type {!AccessibilityAgent.AXProperty} */ ({name: 'description', value: this._description}));
properties.push(/** @type {!Protocol.Accessibility.AXProperty} */ ({name: 'description', value: this._description}));
if (this._value)
properties.push(/** @type {!AccessibilityAgent.AXProperty} */ ({name: 'value', value: this._value}));
properties.push(/** @type {!Protocol.Accessibility.AXProperty} */ ({name: 'value', value: this._value}));

return properties;
}

/**
* @return {?AccessibilityAgent.AXValue}
* @return {?Protocol.Accessibility.AXValue}
*/
name() {
return this._name || null;
}

/**
* @return {?AccessibilityAgent.AXValue}
* @return {?Protocol.Accessibility.AXValue}
*/
description() {
return this._description || null;
}

/**
* @return {?AccessibilityAgent.AXValue}
* @return {?Protocol.Accessibility.AXValue}
*/
value() {
return this._value || null;
}

/**
* @return {?Array<!AccessibilityAgent.AXProperty>}
* @return {?Array<!Protocol.Accessibility.AXProperty>}
*/
properties() {
return this._properties || null;
Expand Down Expand Up @@ -158,12 +158,12 @@ WebInspector.AccessibilityModel = class extends WebInspector.SDKModel {
/**
* @this {WebInspector.AccessibilityModel}
* @param {?string} error
* @param {!Array<!AccessibilityAgent.AXNode>=} payloads
* @param {!Array<!Protocol.Accessibility.AXNode>=} payloads
* @return {?Array<!WebInspector.AccessibilityNode>}
*/
function parsePayload(error, payloads) {
if (error) {
console.error('AccessibilityAgent.getAXNodeChain(): ' + error);
console.error('Protocol.Accessibility.getAXNodeChain(): ' + error);
return null;
}

Expand Down
68 changes: 34 additions & 34 deletions front_end/accessibility/AccessibilityNodeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ WebInspector.AXNodeSubPane = class extends WebInspector.AccessibilitySubPane {
this._ignoredInfo.classList.remove('hidden');
ignoredReasons.element.classList.remove('hidden');
/**
* @param {!AccessibilityAgent.AXProperty} property
* @param {!Protocol.Accessibility.AXProperty} property
*/
function addIgnoredReason(property) {
ignoredReasons.appendChild(new WebInspector.AXNodeIgnoredReasonTreeElement(
property, /** @type {!WebInspector.AccessibilityNode} */ (axNode)));
}
var ignoredReasonsArray = /** @type {!Array<!AccessibilityAgent.AXProperty>} */ (axNode.ignoredReasons());
var ignoredReasonsArray = /** @type {!Array<!Protocol.Accessibility.AXProperty>} */ (axNode.ignoredReasons());
for (var reason of ignoredReasonsArray)
addIgnoredReason(reason);
if (!ignoredReasons.firstChild())
Expand All @@ -73,7 +73,7 @@ WebInspector.AXNodeSubPane = class extends WebInspector.AccessibilitySubPane {
treeOutline.element.classList.remove('hidden');

/**
* @param {!AccessibilityAgent.AXProperty} property
* @param {!Protocol.Accessibility.AXProperty} property
*/
function addProperty(property) {
treeOutline.appendChild(new WebInspector.AXNodePropertyTreePropertyElement(
Expand All @@ -83,18 +83,18 @@ WebInspector.AXNodeSubPane = class extends WebInspector.AccessibilitySubPane {
for (var property of axNode.coreProperties())
addProperty(property);

var roleProperty = /** @type {!AccessibilityAgent.AXProperty} */ ({name: 'role', value: axNode.role()});
var roleProperty = /** @type {!Protocol.Accessibility.AXProperty} */ ({name: 'role', value: axNode.role()});
addProperty(roleProperty);

var propertyMap = {};
var propertiesArray = /** @type {!Array.<!AccessibilityAgent.AXProperty>} */ (axNode.properties());
var propertiesArray = /** @type {!Array.<!Protocol.Accessibility.AXProperty>} */ (axNode.properties());
for (var property of propertiesArray)
propertyMap[property.name] = property;

for (var propertySet
of [AccessibilityAgent.AXWidgetAttributes, AccessibilityAgent.AXWidgetStates,
AccessibilityAgent.AXGlobalStates, AccessibilityAgent.AXLiveRegionAttributes,
AccessibilityAgent.AXRelationshipAttributes]) {
of [Protocol.Accessibility.AXWidgetAttributes, Protocol.Accessibility.AXWidgetStates,
Protocol.Accessibility.AXGlobalStates, Protocol.Accessibility.AXLiveRegionAttributes,
Protocol.Accessibility.AXRelationshipAttributes]) {
for (var propertyKey in propertySet) {
var property = propertySet[propertyKey];
if (property in propertyMap)
Expand Down Expand Up @@ -127,13 +127,13 @@ WebInspector.AXNodePropertyTreeElement = class extends TreeElement {
}

/**
* @param {?AccessibilityAgent.AXValueType} type
* @param {?Protocol.Accessibility.AXValueType} type
* @param {string} value
* @return {!Element}
*/
static createSimpleValueElement(type, value) {
var valueElement;
var AXValueType = AccessibilityAgent.AXValueType;
var AXValueType = Protocol.Accessibility.AXValueType;
if (!type || type === AXValueType.ValueUndefined || type === AXValueType.ComputedString)
valueElement = createElement('span');
else
Expand Down Expand Up @@ -188,11 +188,11 @@ WebInspector.AXNodePropertyTreeElement = class extends TreeElement {
}

/**
* @param {!AccessibilityAgent.AXValue} value
* @param {!Protocol.Accessibility.AXValue} value
* @return {?Element}
*/
appendValueElement(value) {
var AXValueType = AccessibilityAgent.AXValueType;
var AXValueType = Protocol.Accessibility.AXValueType;
if (value.type === AXValueType.Idref || value.type === AXValueType.Node || value.type === AXValueType.IdrefList ||
value.type === AXValueType.NodeList) {
this.appendRelatedNodeListValueElement(value);
Expand All @@ -213,7 +213,7 @@ WebInspector.AXNodePropertyTreeElement = class extends TreeElement {
}

/**
* @param {!AccessibilityAgent.AXRelatedNode} relatedNode
* @param {!Protocol.Accessibility.AXRelatedNode} relatedNode
* @param {number} index
*/
appendRelatedNode(relatedNode, index) {
Expand All @@ -223,7 +223,7 @@ WebInspector.AXNodePropertyTreeElement = class extends TreeElement {
}

/**
* @param {!AccessibilityAgent.AXRelatedNode} relatedNode
* @param {!Protocol.Accessibility.AXRelatedNode} relatedNode
*/
appendRelatedNodeInline(relatedNode) {
var deferredNode = new WebInspector.DeferredDOMNode(this._axNode.target(), relatedNode.backendNodeId);
Expand All @@ -232,7 +232,7 @@ WebInspector.AXNodePropertyTreeElement = class extends TreeElement {
}

/**
* @param {!AccessibilityAgent.AXValue} value
* @param {!Protocol.Accessibility.AXValue} value
*/
appendRelatedNodeListValueElement(value) {
if (value.relatedNodes.length === 1 && !value.value) {
Expand Down Expand Up @@ -266,18 +266,18 @@ WebInspector.AXNodePropertyTreeElement.TypeStyles = {
valueUndefined: 'ax-value-undefined'
};

/** @type {!Set.<!AccessibilityAgent.AXValueType>} */
/** @type {!Set.<!Protocol.Accessibility.AXValueType>} */
WebInspector.AXNodePropertyTreeElement.StringProperties = new Set([
AccessibilityAgent.AXValueType.String, AccessibilityAgent.AXValueType.ComputedString,
AccessibilityAgent.AXValueType.IdrefList, AccessibilityAgent.AXValueType.Idref
Protocol.Accessibility.AXValueType.String, Protocol.Accessibility.AXValueType.ComputedString,
Protocol.Accessibility.AXValueType.IdrefList, Protocol.Accessibility.AXValueType.Idref
]);

/**
* @unrestricted
*/
WebInspector.AXNodePropertyTreePropertyElement = class extends WebInspector.AXNodePropertyTreeElement {
/**
* @param {!AccessibilityAgent.AXProperty} property
* @param {!Protocol.Accessibility.AXProperty} property
* @param {!WebInspector.AccessibilityNode} axNode
*/
constructor(property, axNode) {
Expand Down Expand Up @@ -315,7 +315,7 @@ WebInspector.AXNodePropertyTreePropertyElement = class extends WebInspector.AXNo
*/
WebInspector.AXValueSourceTreeElement = class extends WebInspector.AXNodePropertyTreeElement {
/**
* @param {!AccessibilityAgent.AXValueSource} source
* @param {!Protocol.Accessibility.AXValueSource} source
* @param {!WebInspector.AccessibilityNode} axNode
*/
constructor(source, axNode) {
Expand All @@ -332,7 +332,7 @@ WebInspector.AXValueSourceTreeElement = class extends WebInspector.AXNodePropert
}

/**
* @param {!AccessibilityAgent.AXRelatedNode} relatedNode
* @param {!Protocol.Accessibility.AXRelatedNode} relatedNode
* @param {number} index
* @param {string} idref
*/
Expand All @@ -344,7 +344,7 @@ WebInspector.AXValueSourceTreeElement = class extends WebInspector.AXNodePropert
}

/**
* @param {!AccessibilityAgent.AXValue} value
* @param {!Protocol.Accessibility.AXValue} value
*/
appendIDRefValueElement(value) {
var relatedNodes = value.relatedNodes;
Expand Down Expand Up @@ -375,15 +375,15 @@ WebInspector.AXValueSourceTreeElement = class extends WebInspector.AXNodePropert
}

/**
* @param {!AccessibilityAgent.AXValue} value
* @param {!Protocol.Accessibility.AXValue} value
* @override
*/
appendRelatedNodeListValueElement(value) {
var relatedNodes = value.relatedNodes;
var numNodes = relatedNodes.length;

if (value.type === AccessibilityAgent.AXValueType.IdrefList ||
value.type === AccessibilityAgent.AXValueType.Idref) {
if (value.type === Protocol.Accessibility.AXValueType.IdrefList ||
value.type === Protocol.Accessibility.AXValueType.Idref) {
this.appendIDRefValueElement(value);
} else {
super.appendRelatedNodeListValueElement(value);
Expand All @@ -396,11 +396,11 @@ WebInspector.AXValueSourceTreeElement = class extends WebInspector.AXNodePropert
}

/**
* @param {!AccessibilityAgent.AXValueSource} source
* @param {!Protocol.Accessibility.AXValueSource} source
*/
appendSourceNameElement(source) {
var nameElement = createElement('span');
var AXValueSourceType = AccessibilityAgent.AXValueSourceType;
var AXValueSourceType = Protocol.Accessibility.AXValueSourceType;
var type = source.type;
var name;
switch (type) {
Expand Down Expand Up @@ -459,7 +459,7 @@ WebInspector.AXValueSourceTreeElement = class extends WebInspector.AXNodePropert
this.appendValueElement(this._source.value);
} else {
var valueElement = WebInspector.AXNodePropertyTreeElement.createSimpleValueElement(
AccessibilityAgent.AXValueType.ValueUndefined, WebInspector.UIString('Not specified'));
Protocol.Accessibility.AXValueType.ValueUndefined, WebInspector.UIString('Not specified'));
this.listItemElement.appendChild(valueElement);
this.listItemElement.classList.add('ax-value-source-unused');
}
Expand All @@ -469,7 +469,7 @@ WebInspector.AXValueSourceTreeElement = class extends WebInspector.AXNodePropert
}

/**
* @param {!AccessibilityAgent.AXValue} value
* @param {!Protocol.Accessibility.AXValue} value
* @return {!Element}
* @override
*/
Expand All @@ -489,7 +489,7 @@ WebInspector.AXValueSourceTreeElement = class extends WebInspector.AXNodePropert
WebInspector.AXRelatedNodeSourceTreeElement = class extends TreeElement {
/**
* @param {{deferredNode: (!WebInspector.DeferredDOMNode|undefined), idref: (string|undefined)}} node
* @param {!AccessibilityAgent.AXRelatedNode=} value
* @param {!Protocol.Accessibility.AXRelatedNode=} value
*/
constructor(node, value) {
super('');
Expand All @@ -509,7 +509,7 @@ WebInspector.AXRelatedNodeSourceTreeElement = class extends TreeElement {

if (this._value.text)
this.listItemElement.appendChild(WebInspector.AXNodePropertyTreeElement.createSimpleValueElement(
AccessibilityAgent.AXValueType.ComputedString, this._value.text));
Protocol.Accessibility.AXValueType.ComputedString, this._value.text));
}
};

Expand All @@ -519,7 +519,7 @@ WebInspector.AXRelatedNodeSourceTreeElement = class extends TreeElement {
WebInspector.AXRelatedNodeElement = class {
/**
* @param {{deferredNode: (!WebInspector.DeferredDOMNode|undefined), idref: (string|undefined)}} node
* @param {!AccessibilityAgent.AXRelatedNode=} value
* @param {!Protocol.Accessibility.AXRelatedNode=} value
*/
constructor(node, value) {
this._deferredNode = node.deferredNode;
Expand Down Expand Up @@ -563,7 +563,7 @@ WebInspector.AXRelatedNodeElement = class {
*/
WebInspector.AXNodeIgnoredReasonTreeElement = class extends WebInspector.AXNodePropertyTreeElement {
/**
* @param {!AccessibilityAgent.AXProperty} property
* @param {!Protocol.Accessibility.AXProperty} property
* @param {!WebInspector.AccessibilityNode} axNode
*/
constructor(property, axNode) {
Expand Down Expand Up @@ -655,7 +655,7 @@ WebInspector.AXNodeIgnoredReasonTreeElement = class extends WebInspector.AXNodeP
this.listItemElement.appendChild(this._reasonElement);

var value = this._property.value;
if (value.type === AccessibilityAgent.AXValueType.Idref)
if (value.type === Protocol.Accessibility.AXValueType.Idref)
this.appendRelatedNodeListValueElement(value);
}
};
Loading

0 comments on commit 3f3cf7f

Please sign in to comment.