From a90a5cba08fdf6c0ceb95101c275108a152a3aed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:37 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- accessible/mac/mozActionElements.mm | 41 +++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'accessible/mac/mozActionElements.mm') 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 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. * -- cgit v1.2.3