Bug 1619458 - Don't create OSX accessibles for XUL tooltips. r=morgan

Depends on D65038

Differential Revision: https://phabricator.services.mozilla.com/D65039

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Eitan Isaacson 2020-03-03 17:47:09 +00:00
parent 3ea5342b3a
commit fefb04c15e

View File

@ -28,9 +28,13 @@ AccessibleWrap::~AccessibleWrap() {}
mozAccessible* AccessibleWrap::GetNativeObject() {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
if (!mNativeInited && !mNativeObject && !IsDefunct() && !AncestorIsFlat()) {
uintptr_t accWrap = reinterpret_cast<uintptr_t>(this);
mNativeObject = [[GetNativeType() alloc] initWithAccessible:accWrap];
if (!mNativeInited && !mNativeObject) {
// We don't creat OSX accessibles for xul tooltips, defunct accessibles,
// or pruned children.
if (!IsXULTooltip() && !IsDefunct() && !AncestorIsFlat()) {
uintptr_t accWrap = reinterpret_cast<uintptr_t>(this);
mNativeObject = [[GetNativeType() alloc] initWithAccessible:accWrap];
}
}
mNativeInited = true;