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

Unified Diff: ui/accessibility/ax_node.cc

Issue 2745713002: WIP: Modified AXPosition to work with objects with both embedded object characters and text. (Closed)
Patch Set: Created 3 years, 9 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: ui/accessibility/ax_node.cc
diff --git a/ui/accessibility/ax_node.cc b/ui/accessibility/ax_node.cc
index c55bf97fa92a48784c74d52520f18744d2d702ac..8327ccd786e12e8ee052c220dd05f5192a128273 100644
--- a/ui/accessibility/ax_node.cc
+++ b/ui/accessibility/ax_node.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/strings/string16.h"
+#include "ui/accessibility/ax_enums.h"
#include "ui/gfx/transform.h"
namespace ui {
@@ -19,6 +20,12 @@ AXNode::AXNode(AXNode* parent, int32_t id, int32_t index_in_parent)
AXNode::~AXNode() {
}
+bool AXNode::IsTextNode() const {
+ return data().role == AX_ROLE_STATIC_TEXT ||
+ data().role == AX_ROLE_LINE_BREAK ||
+ data().role == AX_ROLE_INLINE_TEXT_BOX;
+}
+
void AXNode::SetData(const AXNodeData& src) {
data_ = src;
}

Powered by Google App Engine
This is Rietveld 408576698