summaryrefslogtreecommitdiff
path: root/chromium/ui/accessibility/ax_node_position.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-03 13:42:47 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-15 10:27:51 +0000
commit8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (patch)
treed29d987c4d7b173cf853279b79a51598f104b403 /chromium/ui/accessibility/ax_node_position.cc
parent830c9e163d31a9180fadca926b3e1d7dfffb5021 (diff)
downloadqtwebengine-chromium-8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec.tar.gz
BASELINE: Update Chromium to 66.0.3359.156
Change-Id: I0c9831ad39911a086b6377b16f995ad75a51e441 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/ui/accessibility/ax_node_position.cc')
-rw-r--r--chromium/ui/accessibility/ax_node_position.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/chromium/ui/accessibility/ax_node_position.cc b/chromium/ui/accessibility/ax_node_position.cc
index 95318cc7fb6..9711f344677 100644
--- a/chromium/ui/accessibility/ax_node_position.cc
+++ b/chromium/ui/accessibility/ax_node_position.cc
@@ -5,7 +5,7 @@
#include "ui/accessibility/ax_node_position.h"
#include "base/strings/string_util.h"
-#include "ui/accessibility/ax_enums.h"
+#include "ui/accessibility/ax_enums.mojom.h"
namespace ui {
@@ -24,11 +24,12 @@ base::string16 AXNodePosition::GetInnerText() const {
return base::string16();
DCHECK(GetAnchor());
- base::string16 value =
- GetAnchor()->data().GetString16Attribute(AX_ATTR_VALUE);
+ base::string16 value = GetAnchor()->data().GetString16Attribute(
+ ax::mojom::StringAttribute::kValue);
if (!value.empty())
return value;
- return GetAnchor()->data().GetString16Attribute(AX_ATTR_NAME);
+ return GetAnchor()->data().GetString16Attribute(
+ ax::mojom::StringAttribute::kName);
}
void AXNodePosition::AnchorChild(int child_index,
@@ -100,14 +101,16 @@ std::vector<int32_t> AXNodePosition::GetWordStartOffsets() const {
if (IsNullPosition())
return std::vector<int32_t>();
DCHECK(GetAnchor());
- return GetAnchor()->data().GetIntListAttribute(ui::AX_ATTR_WORD_STARTS);
+ return GetAnchor()->data().GetIntListAttribute(
+ ax::mojom::IntListAttribute::kWordStarts);
}
std::vector<int32_t> AXNodePosition::GetWordEndOffsets() const {
if (IsNullPosition())
return std::vector<int32_t>();
DCHECK(GetAnchor());
- return GetAnchor()->data().GetIntListAttribute(ui::AX_ATTR_WORD_ENDS);
+ return GetAnchor()->data().GetIntListAttribute(
+ ax::mojom::IntListAttribute::kWordEnds);
}
int32_t AXNodePosition::GetNextOnLineID(int32_t node_id) const {
@@ -115,9 +118,8 @@ int32_t AXNodePosition::GetNextOnLineID(int32_t node_id) const {
return INVALID_ANCHOR_ID;
AXNode* node = GetNodeInTree(tree_id(), node_id);
int next_on_line_id;
- if (!node ||
- !node->data().GetIntAttribute(AX_ATTR_NEXT_ON_LINE_ID,
- &next_on_line_id)) {
+ if (!node || !node->data().GetIntAttribute(
+ ax::mojom::IntAttribute::kNextOnLineId, &next_on_line_id)) {
return INVALID_ANCHOR_ID;
}
return static_cast<int32_t>(next_on_line_id);
@@ -129,7 +131,7 @@ int32_t AXNodePosition::GetPreviousOnLineID(int32_t node_id) const {
AXNode* node = GetNodeInTree(tree_id(), node_id);
int previous_on_line_id;
if (!node ||
- !node->data().GetIntAttribute(AX_ATTR_PREVIOUS_ON_LINE_ID,
+ !node->data().GetIntAttribute(ax::mojom::IntAttribute::kPreviousOnLineId,
&previous_on_line_id)) {
return INVALID_ANCHOR_ID;
}