Index: content/browser/accessibility/browser_accessibility.cc |
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc |
index cc91602febd3fd987baf0988db07df6333f8e171..ca367e644ec466cf93c37bf43804b562ba70c1cb 100644 |
--- a/content/browser/accessibility/browser_accessibility.cc |
+++ b/content/browser/accessibility/browser_accessibility.cc |
@@ -99,7 +99,7 @@ uint32_t BrowserAccessibility::PlatformChildCount() const { |
BrowserAccessibilityManager* child_manager = |
BrowserAccessibilityManager::FromID( |
GetIntAttribute(ui::AX_ATTR_CHILD_TREE_ID)); |
- if (child_manager && child_manager->GetRoot()->GetParent() == this) |
+ if (child_manager && child_manager->GetRoot()->PlatformGetParent() == this) |
return 1; |
return 0; |
@@ -120,8 +120,8 @@ bool BrowserAccessibility::IsDescendantOf( |
if (this == ancestor) |
return true; |
- if (GetParent()) |
- return GetParent()->IsDescendantOf(ancestor); |
+ if (PlatformGetParent()) |
+ return PlatformGetParent()->IsDescendantOf(ancestor); |
return false; |
} |
@@ -134,8 +134,8 @@ bool BrowserAccessibility::IsTextOnlyObject() const { |
bool BrowserAccessibility::IsLineBreakObject() const { |
return GetRole() == ui::AX_ROLE_LINE_BREAK || |
- (IsTextOnlyObject() && GetParent() && |
- GetParent()->GetRole() == ui::AX_ROLE_LINE_BREAK); |
+ (IsTextOnlyObject() && PlatformGetParent() && |
+ PlatformGetParent()->GetRole() == ui::AX_ROLE_LINE_BREAK); |
} |
BrowserAccessibility* BrowserAccessibility::PlatformGetChild( |
@@ -146,7 +146,7 @@ BrowserAccessibility* BrowserAccessibility::PlatformGetChild( |
BrowserAccessibilityManager* child_manager = |
BrowserAccessibilityManager::FromID( |
GetIntAttribute(ui::AX_ATTR_CHILD_TREE_ID)); |
- if (child_manager && child_manager->GetRoot()->GetParent() == this) |
+ if (child_manager && child_manager->GetRoot()->PlatformGetParent() == this) |
result = child_manager->GetRoot(); |
} else { |
result = InternalGetChild(child_index); |
@@ -177,18 +177,17 @@ BrowserAccessibility* BrowserAccessibility::GetClosestPlatformObject() const { |
} |
BrowserAccessibility* BrowserAccessibility::GetPreviousSibling() const { |
- if (GetParent() && GetIndexInParent() > 0) |
- return GetParent()->InternalGetChild(GetIndexInParent() - 1); |
+ if (PlatformGetParent() && GetIndexInParent() > 0) |
+ return PlatformGetParent()->InternalGetChild(GetIndexInParent() - 1); |
return nullptr; |
} |
BrowserAccessibility* BrowserAccessibility::GetNextSibling() const { |
- if (GetParent() && |
- GetIndexInParent() >= 0 && |
- GetIndexInParent() < static_cast<int>( |
- GetParent()->InternalChildCount() - 1)) { |
- return GetParent()->InternalGetChild(GetIndexInParent() + 1); |
+ if (PlatformGetParent() && GetIndexInParent() >= 0 && |
+ GetIndexInParent() < |
+ static_cast<int>(PlatformGetParent()->InternalChildCount() - 1)) { |
+ return PlatformGetParent()->InternalGetChild(GetIndexInParent() + 1); |
} |
return nullptr; |
@@ -307,7 +306,7 @@ BrowserAccessibility* BrowserAccessibility::InternalGetChild( |
return manager_->GetFromAXNode(child_node); |
} |
-BrowserAccessibility* BrowserAccessibility::GetParent() const { |
+BrowserAccessibility* BrowserAccessibility::PlatformGetParent() const { |
if (!instance_active()) |
return nullptr; |
@@ -828,7 +827,8 @@ bool BrowserAccessibility::HasInheritedStringAttribute( |
if (GetData().HasStringAttribute(attribute)) |
return true; |
- return GetParent() && GetParent()->HasInheritedStringAttribute(attribute); |
+ return PlatformGetParent() && |
+ PlatformGetParent()->HasInheritedStringAttribute(attribute); |
} |
const std::string& BrowserAccessibility::GetInheritedStringAttribute( |
@@ -840,7 +840,7 @@ const std::string& BrowserAccessibility::GetInheritedStringAttribute( |
do { |
if (current_object->GetData().HasStringAttribute(attribute)) |
return current_object->GetData().GetStringAttribute(attribute); |
- current_object = current_object->GetParent(); |
+ current_object = current_object->PlatformGetParent(); |
} while (current_object); |
return base::EmptyString(); |
} |
@@ -855,8 +855,8 @@ bool BrowserAccessibility::GetInheritedStringAttribute( |
if (GetData().GetStringAttribute(attribute, value)) |
return true; |
- return GetParent() && |
- GetParent()->GetData().GetStringAttribute(attribute, value); |
+ return PlatformGetParent() && |
+ PlatformGetParent()->GetData().GetStringAttribute(attribute, value); |
} |
base::string16 BrowserAccessibility::GetInheritedString16Attribute( |
@@ -868,7 +868,7 @@ base::string16 BrowserAccessibility::GetInheritedString16Attribute( |
do { |
if (current_object->GetData().HasStringAttribute(attribute)) |
return current_object->GetData().GetString16Attribute(attribute); |
- current_object = current_object->GetParent(); |
+ current_object = current_object->PlatformGetParent(); |
} while (current_object); |
return base::string16(); |
} |
@@ -883,8 +883,8 @@ bool BrowserAccessibility::GetInheritedString16Attribute( |
if (GetData().GetString16Attribute(attribute, value)) |
return true; |
- return GetParent() && |
- GetParent()->GetData().GetString16Attribute(attribute, value); |
+ return PlatformGetParent() && |
+ PlatformGetParent()->GetData().GetString16Attribute(attribute, value); |
} |
bool BrowserAccessibility::HasIntAttribute( |
@@ -1018,7 +1018,7 @@ bool BrowserAccessibility::IsWebAreaForPresentationalIframe() const { |
return false; |
} |
- BrowserAccessibility* parent = GetParent(); |
+ BrowserAccessibility* parent = PlatformGetParent(); |
if (!parent) |
return false; |
@@ -1109,7 +1109,8 @@ bool BrowserAccessibility::IsSimpleTextControl() const { |
// Indicates if this object is at the root of a rich edit text control. |
bool BrowserAccessibility::IsRichTextControl() const { |
return HasState(ui::AX_STATE_RICHLY_EDITABLE) && |
- (!GetParent() || !GetParent()->HasState(ui::AX_STATE_RICHLY_EDITABLE)); |
+ (!PlatformGetParent() || |
+ !PlatformGetParent()->HasState(ui::AX_STATE_RICHLY_EDITABLE)); |
} |
std::string BrowserAccessibility::ComputeAccessibleNameFromDescendants() { |
@@ -1194,7 +1195,7 @@ gfx::Rect BrowserAccessibility::RelativeToAbsoluteBounds( |
node->manager()->GetFromID(node->GetData().offset_container_id); |
if (!container) { |
if (node == node->manager()->GetRoot() && !frame_only) { |
- container = node->GetParent(); |
+ container = node->PlatformGetParent(); |
} else { |
container = node->manager()->GetRoot(); |
} |
@@ -1207,7 +1208,7 @@ gfx::Rect BrowserAccessibility::RelativeToAbsoluteBounds( |
bounds.Offset(container_bounds.x(), container_bounds.y()); |
if (container->manager()->UseRootScrollOffsetsWhenComputingBounds() || |
- container->GetParent()) { |
+ container->PlatformGetParent()) { |
int sx = 0; |
int sy = 0; |
if (container->GetIntAttribute(ui::AX_ATTR_SCROLL_X, &sx) && |