De-unify accessibility build on Mac.

This commit is contained in:
Fedor 2019-07-08 13:08:04 +03:00
parent 0f5a8c18a5
commit 7284f3b2da
12 changed files with 56 additions and 38 deletions

View File

@ -8,6 +8,7 @@
#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 "EmbeddedObjCollector.h"
#include "NotificationController.h" #include "NotificationController.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG

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

@ -17,6 +17,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 @@ 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"