Commit 59b5d989 authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by Commit Bot

Reland "A11y: prepare AXPlatformNodeAuraLinux to implement multiple Atk interfaces."

Original CL: https:/crrev.com/c/767427/

> As a first step towards moving all the ATK object implementation to
> ui/accessibility, we will make AXPlatformNodeAuraLinux implement as much
> as possible of the features implemented only in
> BrowserAccessibilityAuraLinux ATK object.
>
> This patch prepares AtkPlatformNodeAuraLinux to load different Atk
> interfaces.

Changes:
- Change initalization of AuraLinuxApplication so AXNodeData is initialized
  before AXPlatformNode accesses to it avoiding MSAN crash.

Bug: 784583,785106
Change-Id: I59804d1e859dc95fae3af06747aaa21043aed05e
Reviewed-on: https://chromium-review.googlesource.com/774888
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517557}
parent e4effb80
......@@ -49,6 +49,24 @@ class AXPlatformNodeAuraLinux : public AXPlatformNodeBase {
private:
~AXPlatformNodeAuraLinux() override;
enum AtkInterfaces {
ATK_ACTION_INTERFACE,
ATK_COMPONENT_INTERFACE,
ATK_DOCUMENT_INTERFACE,
ATK_EDITABLE_TEXT_INTERFACE,
ATK_HYPERLINK_INTERFACE,
ATK_HYPERTEXT_INTERFACE,
ATK_IMAGE_INTERFACE,
ATK_SELECTION_INTERFACE,
ATK_TABLE_INTERFACE,
ATK_TEXT_INTERFACE,
ATK_VALUE_INTERFACE,
};
static const char* GetUniqueAccessibilityGTypeName(int interface_mask);
int GetGTypeInterfaceMask();
GType GetAccessibilityGType();
AtkObject* CreateAtkObject();
// We own a reference to this ref-counted object.
AtkObject* atk_object_;
......
......@@ -128,9 +128,9 @@ class AuraLinuxApplication
private:
friend struct base::DefaultSingletonTraits<AuraLinuxApplication>;
AuraLinuxApplication()
: platform_node_(ui::AXPlatformNode::Create(this)) {
AuraLinuxApplication() {
data_.role = ui::AX_ROLE_APPLICATION;
platform_node_ = ui::AXPlatformNode::Create(this);
if (ViewsDelegate::GetInstance()) {
data_.AddStringAttribute(
ui::AX_ATTR_NAME,
......
......@@ -40,8 +40,8 @@ bool IsViewUnfocusableChildOfFocusableAncestor(View* view) {
} // namespace
NativeViewAccessibilityBase::NativeViewAccessibilityBase(View* view)
: view_(view),
ax_node_(ui::AXPlatformNode::Create(this)) {
: view_(view) {
ax_node_ = ui::AXPlatformNode::Create(this);
DCHECK(ax_node_);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment