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

Unified Diff: chrome/renderer/resources/extensions/automation/automation_node.js

Issue 2903973002: Rich editable text implementation using spannables (Closed)
Patch Set: Make boolean expressions explicit. Created 3 years, 6 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
Index: chrome/renderer/resources/extensions/automation/automation_node.js
diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js
index 95924e762c4510540b4d842bbc2383f0a481d5bb..1e359f8222f5343d36795ce1915858241b28ebae 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -238,6 +238,34 @@ var GetHtmlAttribute = requireNative('automationInternal').GetHtmlAttribute;
*/
var GetNameFrom = requireNative('automationInternal').GetNameFrom;
+/**
+ * @param {number} axTreeID The id of the accessibility tree.
+ * @param {number} nodeID The id of a node.
+ * @return {boolean}
+ */
+var GetBold = requireNative('automationInternal').GetBold;
+
+/**
+ * @param {number} axTreeID The id of the accessibility tree.
+ * @param {number} nodeID The id of a node.
+ * @return {boolean}
+ */
+var GetItalic = requireNative('automationInternal').GetItalic;
+
+/**
+ * @param {number} axTreeID The id of the accessibility tree.
+ * @param {number} nodeID The id of a node.
+ * @return {boolean}
+ */
+var GetUnderline = requireNative('automationInternal').GetUnderline;
+
+/**
+ * @param {number} axTreeID The id of the accessibility tree.
+ * @param {number} nodeID The id of a node.
+ * @return {boolean}
+ */
+var GetLineThrough = requireNative('automationInternal').GetLineThrough;
+
var lastError = require('lastError');
var logging = requireNative('logging');
var utils = require('utils');
@@ -380,6 +408,22 @@ AutomationNodeImpl.prototype = {
return GetNameFrom(this.treeID, this.id);
},
+ get bold() {
+ return GetBold(this.treeID, this.id);
+ },
+
+ get italic() {
+ return GetItalic(this.treeID, this.id);
+ },
+
+ get underline() {
+ return GetUnderline(this.treeID, this.id);
+ },
+
+ get lineThrough() {
+ return GetLineThrough(this.treeID, this.id);
+ },
+
doDefault: function() {
this.performAction_('doDefault');
},
@@ -1137,6 +1181,10 @@ utils.expose(AutomationNode, AutomationNodeImpl, {
'root',
'htmlAttributes',
'nameFrom',
+ 'bold',
+ 'italic',
+ 'underline',
+ 'lineThrough',
]),
});
« no previous file with comments | « chrome/renderer/extensions/automation_internal_custom_bindings.cc ('k') | third_party/closure_compiler/externs/automation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698