Commit 105b4151 authored by dmazzoni's avatar dmazzoni Committed by Commit bot
Browse files

Fix Mac accessibility window attribute inside child frames.

BUG=none

Review-Url: https://codereview.chromium.org/2102663002
Cr-Commit-Position: refs/heads/master@{#402357}
parent 9d7ff2e8
......@@ -1161,9 +1161,11 @@ bool InitializeAccessibilityTreeSearch(
} else {
// Hook back up to RenderWidgetHostViewCocoa.
BrowserAccessibilityManagerMac* manager =
static_cast<BrowserAccessibilityManagerMac*>(
browserAccessibility_->manager());
return manager->parent_view();
browserAccessibility_->manager()->GetRootManager()
->ToBrowserAccessibilityManagerMac();
if (manager)
return manager->parent_view();
return nil;
}
}
......@@ -1869,8 +1871,8 @@ bool InitializeAccessibilityTreeSearch(
return nil;
BrowserAccessibilityManagerMac* manager =
static_cast<BrowserAccessibilityManagerMac*>(
browserAccessibility_->manager());
browserAccessibility_->manager()->GetRootManager()
->ToBrowserAccessibilityManagerMac();
if (!manager || !manager->parent_view())
return nil;
......
......@@ -35,6 +35,8 @@ class BrowserAccessibilityManagerAndroid;
class BrowserAccessibilityManagerWin;
#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11)
class BrowserAccessibilityManagerAuraLinux;
#elif defined(OS_MACOSX)
class BrowserAccessibilityManagerMac;
#endif
class SiteInstance;
......@@ -276,6 +278,10 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
ToBrowserAccessibilityManagerAuraLinux();
#endif
#if defined(OS_MACOSX)
BrowserAccessibilityManagerMac* ToBrowserAccessibilityManagerMac();
#endif
// Return the object that has focus, starting at the top of the frame tree.
virtual BrowserAccessibility* GetFocus();
......
......@@ -105,6 +105,11 @@ BrowserAccessibilityManager* BrowserAccessibilityManager::Create(
NULL, initial_tree, delegate, factory);
}
BrowserAccessibilityManagerMac*
BrowserAccessibilityManager::ToBrowserAccessibilityManagerMac() {
return static_cast<BrowserAccessibilityManagerMac*>(this);
}
BrowserAccessibilityManagerMac::BrowserAccessibilityManagerMac(
NSView* parent_view,
const ui::AXTreeUpdate& initial_tree,
......
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