diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-04 18:21:04 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-04 18:21:04 +0200 |
commit | dee00a8a79394559e0e868cc72464c2de24583ac (patch) | |
tree | 18dc2e3db8127ceabcf9b03416b135bced2976ad /accessible/mac | |
parent | 851cfd198bc01020cd411d4f1cd6586222700269 (diff) | |
parent | 363bfeb2c06e5f57136ebdab8da1ebeba0591520 (diff) | |
download | UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar.gz UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar.lz UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar.xz UXP-dee00a8a79394559e0e868cc72464c2de24583ac.zip |
Merge branch 'master' into Basilisk-release
Diffstat (limited to 'accessible/mac')
-rw-r--r-- | accessible/mac/moz.build | 2 | ||||
-rw-r--r-- | accessible/mac/mozAccessible.mm | 36 | ||||
-rw-r--r-- | accessible/mac/mozHTMLAccessible.mm | 2 | ||||
-rw-r--r-- | accessible/mac/mozTableAccessible.mm | 41 | ||||
-rw-r--r-- | accessible/mac/mozTextAccessible.mm | 1 |
5 files changed, 45 insertions, 37 deletions
diff --git a/accessible/mac/moz.build b/accessible/mac/moz.build index a8f07c48b..1ead3d8f6 100644 --- a/accessible/mac/moz.build +++ b/accessible/mac/moz.build @@ -13,7 +13,7 @@ EXPORTS.mozilla.a11y += [ 'HyperTextAccessibleWrap.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AccessibleWrap.mm', 'DocAccessibleWrap.mm', 'MacUtils.mm', diff --git a/accessible/mac/mozAccessible.mm b/accessible/mac/mozAccessible.mm index e1cdba694..07868fea6 100644 --- a/accessible/mac/mozAccessible.mm +++ b/accessible/mac/mozAccessible.mm @@ -49,42 +49,6 @@ using namespace mozilla::a11y; // - NSAccessibilityMathPrescriptsAttribute @"AXMathPrescripts" // - 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 - @implementation mozAccessible diff --git a/accessible/mac/mozHTMLAccessible.mm b/accessible/mac/mozHTMLAccessible.mm index 6c4925589..2079a4aa6 100644 --- a/accessible/mac/mozHTMLAccessible.mm +++ b/accessible/mac/mozHTMLAccessible.mm @@ -12,6 +12,8 @@ #import "nsCocoaUtils.h" +using namespace mozilla::a11y; + @implementation mozHeadingAccessible - (NSString*)title diff --git a/accessible/mac/mozTableAccessible.mm b/accessible/mac/mozTableAccessible.mm index a3612e5bc..6ad157b9f 100644 --- a/accessible/mac/mozTableAccessible.mm +++ b/accessible/mac/mozTableAccessible.mm @@ -5,9 +5,50 @@ * 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/. */ +#import "Accessible-inl.h" #import "mozTableAccessible.h" +#import "TableAccessible.h" +#import "TableCellAccessible.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 - (BOOL)isLayoutTablePart; { diff --git a/accessible/mac/mozTextAccessible.mm b/accessible/mac/mozTextAccessible.mm index 0909cd512..1f433b802 100644 --- a/accessible/mac/mozTextAccessible.mm +++ b/accessible/mac/mozTextAccessible.mm @@ -12,6 +12,7 @@ #import "mozTextAccessible.h" +using namespace mozilla; using namespace mozilla::a11y; inline bool |