summaryrefslogtreecommitdiffstats
path: root/accessible/mac
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /accessible/mac
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/mac')
-rw-r--r--accessible/mac/AccessibleWrap.mm3
-rw-r--r--accessible/mac/MOXWebAreaAccessible.mm2
-rw-r--r--accessible/mac/mozActionElements.h29
-rw-r--r--accessible/mac/mozActionElements.mm41
4 files changed, 46 insertions, 29 deletions
diff --git a/accessible/mac/AccessibleWrap.mm b/accessible/mac/AccessibleWrap.mm
index ef2f4ba779..e8107b1690 100644
--- a/accessible/mac/AccessibleWrap.mm
+++ b/accessible/mac/AccessibleWrap.mm
@@ -192,6 +192,9 @@ Class a11y::GetTypeFromRole(roles::Role aRole) {
case roles::RADIO_MENU_ITEM:
return [mozRadioButtonAccessible class];
+ case roles::PROGRESSBAR:
+ return [mozRangeAccessible class];
+
case roles::SPINBUTTON:
case roles::SLIDER:
return [mozIncrementableAccessible class];
diff --git a/accessible/mac/MOXWebAreaAccessible.mm b/accessible/mac/MOXWebAreaAccessible.mm
index c1ae585fa1..37168b1be2 100644
--- a/accessible/mac/MOXWebAreaAccessible.mm
+++ b/accessible/mac/MOXWebAreaAccessible.mm
@@ -211,7 +211,7 @@ using namespace mozilla::a11y;
- (NSArray*)moxUnignoredChildren {
if (id rootGroup = [self rootGroup]) {
- return @[ [self rootGroup] ];
+ return @[ rootGroup ];
}
// There is no root group, expose the children here directly.
diff --git a/accessible/mac/mozActionElements.h b/accessible/mac/mozActionElements.h
index f9940c793a..d5b286ff97 100644
--- a/accessible/mac/mozActionElements.h
+++ b/accessible/mac/mozActionElements.h
@@ -65,15 +65,14 @@
@end
/**
- * Base accessible for an incrementable
+ * Base accessible for a range, an acc with a min, max that cannot
+ * be modified by the user directly.
*/
-@interface mozIncrementableAccessible : mozAccessible
-// override
-- (id)moxValue;
+@interface mozRangeAccessible : mozAccessible
// override
-- (NSString*)moxValueDescription;
+- (id)moxValue;
// override
- (id)moxMinValue;
@@ -82,19 +81,29 @@
- (id)moxMaxValue;
// override
-- (void)moxSetValue:(id)value;
+- (NSString*)moxOrientation;
// override
-- (void)moxPerformIncrement;
+- (void)handleAccessibleEvent:(uint32_t)eventType;
+
+@end
+
+/**
+ * Base accessible for an incrementable, a settable range
+ */
+@interface mozIncrementableAccessible : mozRangeAccessible
// override
-- (void)moxPerformDecrement;
+- (NSString*)moxValueDescription;
// override
-- (NSString*)moxOrientation;
+- (void)moxSetValue:(id)value;
// override
-- (void)handleAccessibleEvent:(uint32_t)eventType;
+- (void)moxPerformIncrement;
+
+// override
+- (void)moxPerformDecrement;
- (void)changeValueBySteps:(int)factor;
diff --git a/accessible/mac/mozActionElements.mm b/accessible/mac/mozActionElements.mm
index f39f2c8ad5..e3a2ff9598 100644
--- a/accessible/mac/mozActionElements.mm
+++ b/accessible/mac/mozActionElements.mm
@@ -134,17 +134,12 @@ using namespace mozilla::a11y;
@end
-@implementation mozIncrementableAccessible
+@implementation mozRangeAccessible
- (id)moxValue {
return [NSNumber numberWithDouble:mGeckoAccessible->CurValue()];
}
-- (NSString*)moxValueDescription {
- nsAutoString valueDesc;
- mGeckoAccessible->Value(valueDesc);
- return nsCocoaUtils::ToNSString(valueDesc);
-}
- (id)moxMinValue {
return [NSNumber numberWithDouble:mGeckoAccessible->MinValue()];
}
@@ -153,18 +148,6 @@ using namespace mozilla::a11y;
return [NSNumber numberWithDouble:mGeckoAccessible->MaxValue()];
}
-- (void)moxSetValue:(id)value {
- [self setValue:([value doubleValue])];
-}
-
-- (void)moxPerformIncrement {
- [self changeValueBySteps:1];
-}
-
-- (void)moxPerformDecrement {
- [self changeValueBySteps:-1];
-}
-
- (NSString*)moxOrientation {
RefPtr<AccAttributes> attributes = mGeckoAccessible->Attributes();
if (attributes) {
@@ -192,6 +175,28 @@ using namespace mozilla::a11y;
}
}
+@end
+
+@implementation mozIncrementableAccessible
+
+- (NSString*)moxValueDescription {
+ nsAutoString valueDesc;
+ mGeckoAccessible->Value(valueDesc);
+ return nsCocoaUtils::ToNSString(valueDesc);
+}
+
+- (void)moxSetValue:(id)value {
+ [self setValue:([value doubleValue])];
+}
+
+- (void)moxPerformIncrement {
+ [self changeValueBySteps:1];
+}
+
+- (void)moxPerformDecrement {
+ [self changeValueBySteps:-1];
+}
+
/*
* Updates the accessible's current value by factor and step.
*