De-unify accessibility build on Mac.

Also fixes Linux build bustage with accessibility enabled.
This commit is contained in:
adeshkp 2019-05-04 09:51:45 -04:00 • committed by Roy Tam
commit cf09a88938
12 changed files with 58 additions and 38 deletions

View file

@ -8,6 +8,9 @@
#include "Accessible-inl.h" #include "Accessible-inl.h"
#include "nsEventShell.h" #include "nsEventShell.h"
#include "DocAccessible.h" #include "DocAccessible.h"
#include "DocAccessible-inl.h"
#include "EmbeddedObjCollector.h"
#include "NotificationController.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" #include "Logging.h"
#endif #endif

View file

@ -9,6 +9,7 @@
#include "Accessible-inl.h" #include "Accessible-inl.h"
#include "AccEvent.h" #include "AccEvent.h"
#include "DocAccessible.h" #include "DocAccessible.h"
#include "DocAccessible-inl.h"
#include "nsAccessibilityService.h" #include "nsAccessibilityService.h"
#include "nsCoreUtils.h" #include "nsCoreUtils.h"
#include "OuterDocAccessible.h" #include "OuterDocAccessible.h"
@ -23,6 +24,7 @@
#include "nsIDocShellTreeItem.h" #include "nsIDocShellTreeItem.h"
#include "nsIURI.h" #include "nsIURI.h"
#include "mozilla/dom/Element.h" #include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLBodyElement.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::a11y; using namespace mozilla::a11y;

View file

@ -16,6 +16,7 @@
using namespace mozilla; using namespace mozilla;
using namespace mozilla::a11y; using namespace mozilla::a11y;
using namespace mozilla::dom;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// NotificationCollector // NotificationCollector

View file

@ -55,7 +55,7 @@ UNIFIED_SOURCES += [
] ]
if CONFIG['A11Y_LOG']: if CONFIG['A11Y_LOG']:
UNIFIED_SOURCES += [ SOURCES += [
'Logging.cpp', 'Logging.cpp',
] ]

View file

@ -9,6 +9,7 @@
#include "nsIBaseWindow.h" #include "nsIBaseWindow.h"
#include "nsIDocShellTreeOwner.h" #include "nsIDocShellTreeOwner.h"
#include "nsIContentInlines.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIDOMHTMLDocument.h" #include "nsIDOMHTMLDocument.h"
#include "nsIDOMHTMLElement.h" #include "nsIDOMHTMLElement.h"

View file

@ -9,6 +9,10 @@
#include "mozilla/StaticPtr.h" #include "mozilla/StaticPtr.h"
#ifdef A11Y_LOG
#include "Logging.h"
#endif
using namespace mozilla; using namespace mozilla;
using namespace mozilla::a11y; using namespace mozilla::a11y;

View file

@ -13,7 +13,7 @@ EXPORTS.mozilla.a11y += [
'HyperTextAccessibleWrap.h', 'HyperTextAccessibleWrap.h',
] ]
UNIFIED_SOURCES += [ SOURCES += [
'AccessibleWrap.mm', 'AccessibleWrap.mm',
'DocAccessibleWrap.mm', 'DocAccessibleWrap.mm',
'MacUtils.mm', 'MacUtils.mm',

View file

@ -49,42 +49,6 @@ using namespace mozilla::a11y;
// - NSAccessibilityMathPrescriptsAttribute @"AXMathPrescripts" // - NSAccessibilityMathPrescriptsAttribute @"AXMathPrescripts"
// - NSAccessibilityMathPostscriptsAttribute @"AXMathPostscripts" // - NSAccessibilityMathPostscriptsAttribute @"AXMathPostscripts"
// convert an array of Gecko accessibles to an NSArray of native accessibles
static inline NSMutableArray*
ConvertToNSArray(nsTArray<Accessible*>& aArray)
{
NSMutableArray* nativeArray = [[NSMutableArray alloc] init];
// iterate through the list, and get each native accessible.
size_t totalCount = aArray.Length();
for (size_t i = 0; i < totalCount; i++) {
Accessible* curAccessible = aArray.ElementAt(i);
mozAccessible* curNative = GetNativeFromGeckoAccessible(curAccessible);
if (curNative)
[nativeArray addObject:GetObjectOrRepresentedView(curNative)];
}
return nativeArray;
}
// convert an array of Gecko proxy accessibles to an NSArray of native accessibles
static inline NSMutableArray*
ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
{
NSMutableArray* nativeArray = [[NSMutableArray alloc] init];
// iterate through the list, and get each native accessible.
size_t totalCount = aArray.Length();
for (size_t i = 0; i < totalCount; i++) {
ProxyAccessible* curAccessible = aArray.ElementAt(i);
mozAccessible* curNative = GetNativeFromProxy(curAccessible);
if (curNative)
[nativeArray addObject:GetObjectOrRepresentedView(curNative)];
}
return nativeArray;
}
#pragma mark - #pragma mark -
@implementation mozAccessible @implementation mozAccessible

View file

@ -12,6 +12,8 @@
#import "nsCocoaUtils.h" #import "nsCocoaUtils.h"
using namespace mozilla::a11y;
@implementation mozHeadingAccessible @implementation mozHeadingAccessible
- (NSString*)title - (NSString*)title

View file

@ -5,9 +5,50 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#import "Accessible-inl.h"
#import "mozTableAccessible.h" #import "mozTableAccessible.h"
#import "TableAccessible.h"
#import "TableCellAccessible.h"
#import "nsCocoaUtils.h" #import "nsCocoaUtils.h"
using namespace mozilla::a11y;
// convert an array of Gecko accessibles to an NSArray of native accessibles
static inline NSMutableArray*
ConvertToNSArray(nsTArray<Accessible*>& aArray)
{
NSMutableArray* nativeArray = [[NSMutableArray alloc] init];
// iterate through the list, and get each native accessible.
size_t totalCount = aArray.Length();
for (size_t i = 0; i < totalCount; i++) {
Accessible* curAccessible = aArray.ElementAt(i);
mozAccessible* curNative = GetNativeFromGeckoAccessible(curAccessible);
if (curNative)
[nativeArray addObject:GetObjectOrRepresentedView(curNative)];
}
return nativeArray;
}
// convert an array of Gecko proxy accessibles to an NSArray of native accessibles
static inline NSMutableArray*
ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
{
NSMutableArray* nativeArray = [[NSMutableArray alloc] init];
// iterate through the list, and get each native accessible.
size_t totalCount = aArray.Length();
for (size_t i = 0; i < totalCount; i++) {
ProxyAccessible* curAccessible = aArray.ElementAt(i);
mozAccessible* curNative = GetNativeFromProxy(curAccessible);
if (curNative)
[nativeArray addObject:GetObjectOrRepresentedView(curNative)];
}
return nativeArray;
}
@implementation mozTablePartAccessible @implementation mozTablePartAccessible
- (BOOL)isLayoutTablePart; - (BOOL)isLayoutTablePart;
{ {

View file

@ -12,6 +12,7 @@
#import "mozTextAccessible.h" #import "mozTextAccessible.h"
using namespace mozilla;
using namespace mozilla::a11y; using namespace mozilla::a11y;
inline bool inline bool

View file

@ -7,6 +7,7 @@
#include "xpcAccessibleHyperText.h" #include "xpcAccessibleHyperText.h"
#include "Accessible-inl.h" #include "Accessible-inl.h"
#include "mozilla/a11y/DocAccessibleParent.h"
#include "HyperTextAccessible-inl.h" #include "HyperTextAccessible-inl.h"
#include "TextRange.h" #include "TextRange.h"
#include "xpcAccessibleDocument.h" #include "xpcAccessibleDocument.h"