Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilityNodeView.js

Issue 2630323004: [Devtools] Accessibility pane: correctly show label text source (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilityNodeView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilityNodeView.js b/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilityNodeView.js
index 5bdfdc3bf8f6d47ff303977b843d63b735f311d7..9e8664ca470324700fc63934b3e967dcdf1c5b93 100644
--- a/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilityNodeView.js
+++ b/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilityNodeView.js
@@ -188,15 +188,13 @@ Accessibility.AXNodePropertyTreeElement = class extends UI.TreeElement {
/**
* @param {!Protocol.Accessibility.AXValue} value
- * @return {?Element}
*/
appendValueElement(value) {
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);
- if (!value.value)
- return null;
+ return;
} else if (value.sources) {
var sources = value.sources;
for (var i = 0; i < sources.length; i++) {
@@ -208,7 +206,6 @@ Accessibility.AXNodePropertyTreeElement = class extends UI.TreeElement {
}
var element = Accessibility.AXNodePropertyTreeElement.createSimpleValueElement(value.type, String(value.value));
this.listItemElement.appendChild(element);
- return element;
}
/**
@@ -303,9 +300,7 @@ Accessibility.AXNodePropertyTreePropertyElement = class extends Accessibility.AX
this.listItemElement.createChild('span', 'separator').textContent = ':\u00A0';
- var valueElement = this.appendValueElement(this._property.value);
- if (this._property.name === 'name')
- valueElement.classList.add('ax-computed-text');
+ this.appendValueElement(this._property.value);
}
};
@@ -450,6 +445,8 @@ Accessibility.AXValueSourceTreeElement = class extends Accessibility.AXNodePrope
} else if (this._source.nativeSourceValue) {
this.appendValueElement(this._source.nativeSourceValue);
this.listItemElement.createTextChild('\u00a0');
+ if (this._source.value)
+ this.appendValueElement(this._source.value);
} else if (this._source.value) {
this.appendValueElement(this._source.value);
} else {
@@ -462,20 +459,6 @@ Accessibility.AXValueSourceTreeElement = class extends Accessibility.AXNodePrope
if (this._source.value && this._source.superseded)
this.listItemElement.classList.add('ax-value-source-superseded');
}
-
- /**
- * @param {!Protocol.Accessibility.AXValue} value
- * @return {!Element}
- * @override
- */
- appendValueElement(value) {
- var element = super.appendValueElement(value);
- if (!element) {
- element = Accessibility.AXNodePropertyTreeElement.createSimpleValueElement(value.type, String(value.value));
- this.listItemElement.appendChild(element);
- }
- return element;
- }
};
/**
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698