|
@@ -41,7 +41,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/cont
|
|
|
index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a279af78c 100644
|
|
|
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
|
|
|
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
|
|
-@@ -141,6 +141,7 @@
|
|
|
+@@ -141,6 +141,7 @@ NSDictionary* attributeToMethodNameMap = nil;
|
|
|
// VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
|
|
|
const int kAXResultsLimitNoLimit = -1;
|
|
|
|
|
@@ -49,7 +49,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
extern "C" {
|
|
|
|
|
|
// The following are private accessibility APIs required for cursor navigation
|
|
|
-@@ -346,6 +347,7 @@ void AddMisspelledTextAttributes(
|
|
|
+@@ -346,6 +347,7 @@ NSAttributedString* GetAttributedTextForTextMarkerRange(
|
|
|
AddMisspelledTextAttributes(text_only_objects, attributed_text);
|
|
|
return [attributed_text attributedSubstringFromRange:range];
|
|
|
}
|
|
@@ -57,7 +57,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
|
|
|
// Returns an autoreleased copy of the AXNodeData's attribute.
|
|
|
NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
|
|
|
-@@ -613,7 +615,9 @@ + (void)initialize {
|
|
|
+@@ -613,7 +615,9 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
|
|
|
{NSAccessibilityElementBusyAttribute, @"elementBusy"},
|
|
|
{NSAccessibilityEnabledAttribute, @"enabled"},
|
|
@@ -67,7 +67,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
{NSAccessibilityExpandedAttribute, @"expanded"},
|
|
|
{NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
|
|
|
{NSAccessibilityFocusedAttribute, @"focused"},
|
|
|
-@@ -648,13 +652,17 @@ + (void)initialize {
|
|
|
+@@ -648,13 +652,17 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
{NSAccessibilityRowsAttribute, @"rows"},
|
|
|
// TODO(aboxhall): expose
|
|
|
// NSAccessibilityServesAsTitleForUIElementsAttribute
|
|
@@ -85,7 +85,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
{NSAccessibilitySizeAttribute, @"size"},
|
|
|
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
|
|
|
{NSAccessibilitySubroleAttribute, @"subrole"},
|
|
|
-@@ -1145,6 +1153,7 @@ - (NSNumber*)enabled {
|
|
|
+@@ -1145,6 +1153,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
ax::mojom::Restriction::kDisabled];
|
|
|
}
|
|
|
|
|
@@ -93,7 +93,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
// Returns a text marker that points to the last character in the document that
|
|
|
// can be selected with VoiceOver.
|
|
|
- (id)endTextMarker {
|
|
|
-@@ -1155,6 +1164,7 @@ - (id)endTextMarker {
|
|
|
+@@ -1155,6 +1164,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
|
|
|
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
|
|
|
}
|
|
@@ -101,7 +101,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
|
|
|
- (NSNumber*)expanded {
|
|
|
if (![self instanceActive])
|
|
|
-@@ -2033,6 +2043,7 @@ - (NSValue*)selectedTextRange {
|
|
|
+@@ -2033,6 +2043,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
|
|
|
}
|
|
|
|
|
@@ -109,7 +109,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
- (id)selectedTextMarkerRange {
|
|
|
if (![self instanceActive])
|
|
|
return nil;
|
|
|
-@@ -2065,6 +2076,7 @@ - (id)selectedTextMarkerRange {
|
|
|
+@@ -2065,6 +2076,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
anchorAffinity, *focusObject,
|
|
|
focusOffset, focusAffinity));
|
|
|
}
|
|
@@ -117,7 +117,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
|
|
|
- (NSValue*)size {
|
|
|
if (![self instanceActive])
|
|
|
-@@ -2097,6 +2109,7 @@ - (NSString*)sortDirection {
|
|
|
+@@ -2097,6 +2109,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
return nil;
|
|
|
}
|
|
|
|
|
@@ -125,7 +125,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
// Returns a text marker that points to the first character in the document that
|
|
|
// can be selected with VoiceOver.
|
|
|
- (id)startTextMarker {
|
|
|
-@@ -2107,6 +2120,7 @@ - (id)startTextMarker {
|
|
|
+@@ -2107,6 +2120,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
|
|
|
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
|
|
|
}
|
|
@@ -133,7 +133,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
|
|
|
// Returns a subrole based upon the role.
|
|
|
- (NSString*)subrole {
|
|
|
-@@ -2407,12 +2421,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
|
|
|
+@@ -2407,12 +2421,14 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
NSMutableAttributedString* attributedValue =
|
|
|
[[[NSMutableAttributedString alloc] initWithString:value] autorelease];
|
|
|
|
|
@@ -148,7 +148,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
|
|
|
return [attributedValue attributedSubstringFromRange:range];
|
|
|
}
|
|
|
-@@ -2495,6 +2511,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
|
|
+@@ -2495,6 +2511,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
return ToBrowserAccessibilityCocoa(cell);
|
|
|
}
|
|
|
|
|
@@ -156,7 +156,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
if ([attribute isEqualToString:@"AXUIElementForTextMarker"]) {
|
|
|
BrowserAccessibilityPositionInstance position =
|
|
|
CreatePositionFromTextMarker(parameter);
|
|
|
-@@ -2672,6 +2689,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
|
|
+@@ -2672,6 +2689,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
NSString* text = GetTextForTextMarkerRange(parameter);
|
|
|
return [NSNumber numberWithInt:[text length]];
|
|
|
}
|
|
@@ -164,7 +164,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
|
|
|
if ([attribute isEqualToString:
|
|
|
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
|
|
|
-@@ -2705,6 +2723,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
|
|
+@@ -2705,6 +2723,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
return nil;
|
|
|
}
|
|
|
|
|
@@ -172,7 +172,7 @@ index 444bb384d8453c19f0eec31dc3411b8684f502ca..9d0fbb5d5faf900810b4f85cc8c9bb3a
|
|
|
if ([attribute
|
|
|
isEqualToString:
|
|
|
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
|
|
|
-@@ -2785,6 +2804,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
|
|
|
+@@ -2785,6 +2804,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
|
|
|
|
|
return @(child->GetIndexInParent());
|
|
|
}
|
|
@@ -184,7 +184,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
|
|
index 0c9de0ce2504dca9e9e628885b3dcfbfc37f9675..d6b4139c4bf486182883a45ba7ccc70d42681998 100644
|
|
|
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
|
|
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
|
|
-@@ -491,6 +491,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
|
|
+@@ -491,6 +491,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
|
|
|
[user_info setObject:native_focus_object
|
|
|
forKey:NSAccessibilityTextChangeElement];
|
|
|
|
|
@@ -192,7 +192,7 @@ index 0c9de0ce2504dca9e9e628885b3dcfbfc37f9675..d6b4139c4bf486182883a45ba7ccc70d
|
|
|
id selected_text = [native_focus_object selectedTextMarkerRange];
|
|
|
if (selected_text) {
|
|
|
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
|
|
|
-@@ -498,6 +499,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
|
|
+@@ -498,6 +499,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
|
|
|
[user_info setObject:selected_text
|
|
|
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
|
|
|
}
|
|
@@ -216,7 +216,7 @@ index e59ac93d0e1554a2df5d8c74db2beba25d090228..6657c48664bdec4964b382f80309d1bf
|
|
|
|
|
|
namespace content {
|
|
|
|
|
|
-@@ -22,6 +24,7 @@
|
|
|
+@@ -22,6 +24,7 @@ namespace {
|
|
|
// verifies there are no existing open connections), and then indicates that
|
|
|
// Chrome should continue execution without access to launchservicesd.
|
|
|
void DisableSystemServices() {
|
|
@@ -244,7 +244,7 @@ index fcf50dc3bd9a94536d7fc457c4e7b413a83dc672..6252cb195ff77aa31295c4958fd6b80c
|
|
|
extern "C" {
|
|
|
// Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
|
|
|
// `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
|
|
|
-@@ -49,6 +50,7 @@
|
|
|
+@@ -49,6 +50,7 @@ extern "C" {
|
|
|
// [4] https://support.apple.com/kb/PH25091
|
|
|
void IOBluetoothPreferenceSetControllerPowerState(int state);
|
|
|
}
|
|
@@ -252,7 +252,7 @@ index fcf50dc3bd9a94536d7fc457c4e7b413a83dc672..6252cb195ff77aa31295c4958fd6b80c
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
-@@ -121,8 +123,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
|
|
|
+@@ -121,8 +123,10 @@ BluetoothAdapterMac::BluetoothAdapterMac()
|
|
|
controller_state_function_(
|
|
|
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
|
|
|
base::Unretained(this))),
|
|
@@ -263,7 +263,7 @@ index fcf50dc3bd9a94536d7fc457c4e7b413a83dc672..6252cb195ff77aa31295c4958fd6b80c
|
|
|
should_update_name_(true),
|
|
|
classic_discovery_manager_(
|
|
|
BluetoothDiscoveryManagerMac::CreateClassic(this)),
|
|
|
-@@ -319,8 +323,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
|
|
|
+@@ -319,8 +323,12 @@ bool BluetoothAdapterMac::IsLowEnergyAvailable() {
|
|
|
}
|
|
|
|
|
|
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
|