| Index: content/browser/accessibility/browser_accessibility.cc
|
| diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
|
| index 003e8050207b95b6c7a0432da70757abd9d133ea..9f528bd0de10cb7f8c7624574c6b619cce9a763e 100644
|
| --- a/content/browser/accessibility/browser_accessibility.cc
|
| +++ b/content/browser/accessibility/browser_accessibility.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "content/browser/accessibility/browser_accessibility.h"
|
|
|
| +#include <stddef.h>
|
| +
|
| #include <algorithm>
|
|
|
| #include "base/logging.h"
|
| @@ -66,7 +68,7 @@ bool BrowserAccessibility::PlatformIsLeaf() const {
|
| }
|
| }
|
|
|
| -uint32 BrowserAccessibility::PlatformChildCount() const {
|
| +uint32_t BrowserAccessibility::PlatformChildCount() const {
|
| if (HasIntAttribute(ui::AX_ATTR_CHILD_TREE_ID)) {
|
| BrowserAccessibilityManager* child_manager =
|
| BrowserAccessibilityManager::FromID(
|
| @@ -101,7 +103,7 @@ bool BrowserAccessibility::IsTextOnlyObject() const {
|
| }
|
|
|
| BrowserAccessibility* BrowserAccessibility::PlatformGetChild(
|
| - uint32 child_index) const {
|
| + uint32_t child_index) const {
|
| DCHECK(child_index < PlatformChildCount());
|
| BrowserAccessibility* result = nullptr;
|
|
|
| @@ -171,14 +173,14 @@ BrowserAccessibility* BrowserAccessibility::PlatformDeepestLastChild() const {
|
| return deepest_child;
|
| }
|
|
|
| -uint32 BrowserAccessibility::InternalChildCount() const {
|
| +uint32_t BrowserAccessibility::InternalChildCount() const {
|
| if (!node_ || !manager_)
|
| return 0;
|
| - return static_cast<uint32>(node_->child_count());
|
| + return static_cast<uint32_t>(node_->child_count());
|
| }
|
|
|
| BrowserAccessibility* BrowserAccessibility::InternalGetChild(
|
| - uint32 child_index) const {
|
| + uint32_t child_index) const {
|
| if (!node_ || !manager_ || child_index >= InternalChildCount())
|
| return nullptr;
|
|
|
| @@ -207,11 +209,11 @@ BrowserAccessibility* BrowserAccessibility::InternalGetParent() const {
|
| return nullptr;
|
| }
|
|
|
| -int32 BrowserAccessibility::GetIndexInParent() const {
|
| +int32_t BrowserAccessibility::GetIndexInParent() const {
|
| return node_ ? node_->index_in_parent() : -1;
|
| }
|
|
|
| -int32 BrowserAccessibility::GetId() const {
|
| +int32_t BrowserAccessibility::GetId() const {
|
| return node_ ? node_->id() : -1;
|
| }
|
|
|
| @@ -227,11 +229,11 @@ gfx::Rect BrowserAccessibility::GetLocation() const {
|
| return GetData().location;
|
| }
|
|
|
| -int32 BrowserAccessibility::GetRole() const {
|
| +int32_t BrowserAccessibility::GetRole() const {
|
| return GetData().role;
|
| }
|
|
|
| -int32 BrowserAccessibility::GetState() const {
|
| +int32_t BrowserAccessibility::GetState() const {
|
| return GetData().state;
|
| }
|
|
|
| @@ -307,8 +309,8 @@ gfx::Rect BrowserAccessibility::GetLocalBoundsForRange(int start, int len)
|
| gfx::Rect child_rect = child->GetLocation();
|
| int text_direction = child->GetIntAttribute(
|
| ui::AX_ATTR_TEXT_DIRECTION);
|
| - const std::vector<int32>& character_offsets = child->GetIntListAttribute(
|
| - ui::AX_ATTR_CHARACTER_OFFSETS);
|
| + const std::vector<int32_t>& character_offsets =
|
| + child->GetIntListAttribute(ui::AX_ATTR_CHARACTER_OFFSETS);
|
| int start_pixel_offset =
|
| local_start > 0 ? character_offsets[local_start - 1] : 0;
|
| int end_pixel_offset =
|
| @@ -400,15 +402,15 @@ int BrowserAccessibility::GetWordStartBoundary(
|
| int child_len = static_cast<int>(child_text.size());
|
| child_end += child_len; // End is one past the last character.
|
|
|
| - const std::vector<int32>& word_starts = child->GetIntListAttribute(
|
| - ui::AX_ATTR_WORD_STARTS);
|
| + const std::vector<int32_t>& word_starts =
|
| + child->GetIntListAttribute(ui::AX_ATTR_WORD_STARTS);
|
| if (word_starts.empty()) {
|
| word_start = child_end;
|
| continue;
|
| }
|
|
|
| int local_start = start - child_start;
|
| - std::vector<int32>::const_iterator iter = std::upper_bound(
|
| + std::vector<int32_t>::const_iterator iter = std::upper_bound(
|
| word_starts.begin(), word_starts.end(), local_start);
|
| if (iter != word_starts.end()) {
|
| if (direction == ui::FORWARDS_DIRECTION) {
|
| @@ -611,14 +613,14 @@ bool BrowserAccessibility::HasIntListAttribute(
|
| return GetData().HasIntListAttribute(attribute);
|
| }
|
|
|
| -const std::vector<int32>& BrowserAccessibility::GetIntListAttribute(
|
| +const std::vector<int32_t>& BrowserAccessibility::GetIntListAttribute(
|
| ui::AXIntListAttribute attribute) const {
|
| return GetData().GetIntListAttribute(attribute);
|
| }
|
|
|
| bool BrowserAccessibility::GetIntListAttribute(
|
| ui::AXIntListAttribute attribute,
|
| - std::vector<int32>* value) const {
|
| + std::vector<int32_t>* value) const {
|
| return GetData().GetIntListAttribute(attribute, value);
|
| }
|
|
|
| @@ -675,7 +677,7 @@ bool BrowserAccessibility::HasCaret() const {
|
| }
|
|
|
| // The caret is always at the focus of the selection.
|
| - int32 focus_id = manager()->GetTreeData().sel_focus_object_id;
|
| + int32_t focus_id = manager()->GetTreeData().sel_focus_object_id;
|
| BrowserAccessibility* focus_object = manager()->GetFromID(focus_id);
|
| if (!focus_object)
|
| return false;
|
|
|