chore: update patches

This commit is contained in:
John Kleinschmidt 2021-03-15 14:32:18 -04:00
parent f933c249fe
commit 1e16606524
64 changed files with 423 additions and 465 deletions

View file

@ -82,10 +82,10 @@ index 88f339d1669436db9c1e4d048a46fc28038c83fe..2e194c5174c24552eb684faa339ad92b
OptionalNSObject MakePairArray(const OptionalNSObject& obj1,
const OptionalNSObject& obj2) {
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h
index a6493f1c466fcfbc9253e68fecac7c86ec69f075..d7bfd4847e99da466e9e2b5fae46f0b89220ad55 100644
index eff8d3fe2d47c519952e74ca2d6238ad39429d74..ef74a8983171bb720e4be7b1efa0b1350550727d 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.h
+++ b/content/browser/accessibility/browser_accessibility_cocoa.h
@@ -151,7 +151,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
@@ -157,7 +157,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
@property(nonatomic, readonly) NSNumber* enabled;
// Returns a text marker that points to the last character in the document that
// can be selected with Voiceover.
@ -95,7 +95,7 @@ index a6493f1c466fcfbc9253e68fecac7c86ec69f075..d7bfd4847e99da466e9e2b5fae46f0b8
@property(nonatomic, readonly) NSNumber* expanded;
@property(nonatomic, readonly) NSNumber* focused;
@property(nonatomic, readonly) NSNumber* grabbed;
@@ -163,7 +165,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
@@ -169,7 +171,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
// Index of a row, column, or tree item.
@property(nonatomic, readonly) NSNumber* index;
@property(nonatomic, readonly) NSNumber* treeItemRowIndex;
@ -105,7 +105,7 @@ index a6493f1c466fcfbc9253e68fecac7c86ec69f075..d7bfd4847e99da466e9e2b5fae46f0b8
@property(nonatomic, readonly) NSString* invalid;
@property(nonatomic, readonly) NSNumber* isMultiSelectable;
@property(nonatomic, readonly) NSString* placeholderValue;
@@ -186,14 +190,18 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
@@ -192,14 +196,18 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker);
// The object is selected as a whole.
@property(nonatomic, readonly) NSNumber* selected;
@property(nonatomic, readonly) NSArray* selectedChildren;
@ -125,7 +125,7 @@ index a6493f1c466fcfbc9253e68fecac7c86ec69f075..d7bfd4847e99da466e9e2b5fae46f0b8
// is concerned.
@property(nonatomic, readonly) NSString* subrole;
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3c339e31f 100644
index 86e56961584a26746cc254e8d0f53fe29f62fdb9..2d8265b3d41ce834d29f2764daf4be4aad15a1d1 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -202,6 +202,7 @@
@ -215,7 +215,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
{NSAccessibilitySizeAttribute, @"size"},
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
{NSAccessibilitySubroleAttribute, @"subrole"},
@@ -1362,6 +1376,7 @@ - (NSNumber*)enabled {
@@ -1370,6 +1384,7 @@ - (NSNumber*)enabled {
ax::mojom::Restriction::kDisabled);
}
@ -223,7 +223,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
// Returns a text marker that points to the last character in the document that
// can be selected with VoiceOver.
- (id)endTextMarker {
@@ -1370,6 +1385,7 @@ - (id)endTextMarker {
@@ -1378,6 +1393,7 @@ - (id)endTextMarker {
BrowserAccessibility::AXPosition position = _owner->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtEndOfContent());
}
@ -231,7 +231,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
- (NSNumber*)expanded {
if (![self instanceActive])
@@ -1570,6 +1586,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind
@@ -1578,6 +1594,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind
return false;
}
@ -239,7 +239,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
- (NSNumber*)insertionPointLineNumber {
if (![self instanceActive])
return nil;
@@ -1595,6 +1612,7 @@ - (NSNumber*)insertionPointLineNumber {
@@ -1603,6 +1620,7 @@ - (NSNumber*)insertionPointLineNumber {
caretPosition->AsTextPosition()->text_offset());
return @(std::distance(lineBreaks.begin(), iterator));
}
@ -247,8 +247,8 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
// Returns whether or not this node should be ignored in the
// accessibility tree.
@@ -1946,8 +1964,12 @@ - (BOOL)shouldExposeTitleUIElement {
return content::AXTextEdit(newValue, base::string16(), nil);
@@ -1954,8 +1972,12 @@ - (BOOL)shouldExposeTitleUIElement {
return content::AXTextEdit(newValue, std::u16string(), nil);
}
}
+#ifndef MAS_BUILD
@ -260,7 +260,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
}
- (BOOL)instanceActive {
@@ -2272,6 +2294,7 @@ - (NSArray*)selectedChildren {
@@ -2283,6 +2305,7 @@ - (NSArray*)selectedChildren {
return ret;
}
@ -268,7 +268,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
- (NSString*)selectedText {
if (![self instanceActive])
return nil;
@@ -2283,11 +2306,13 @@ - (NSString*)selectedText {
@@ -2294,11 +2317,13 @@ - (NSString*)selectedText {
return nil;
return base::SysUTF16ToNSString(range.GetText());
}
@ -282,7 +282,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
- (NSValue*)selectedTextRange {
if (![self instanceActive])
return nil;
@@ -2312,7 +2337,9 @@ - (NSValue*)selectedTextRange {
@@ -2323,7 +2348,9 @@ - (NSValue*)selectedTextRange {
int selLength = range.GetText().length();
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
}
@ -292,7 +292,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
- (id)selectedTextMarkerRange {
if (![self instanceActive])
return nil;
@@ -2324,6 +2351,7 @@ - (id)selectedTextMarkerRange {
@@ -2335,6 +2362,7 @@ - (id)selectedTextMarkerRange {
// words correctly.
return CreateTextMarkerRange(ax_range.AsBackwardRange());
}
@ -300,7 +300,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
- (NSValue*)size {
if (![self instanceActive])
@@ -2356,6 +2384,7 @@ - (NSString*)sortDirection {
@@ -2367,6 +2395,7 @@ - (NSString*)sortDirection {
return nil;
}
@ -308,7 +308,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
// Returns a text marker that points to the first character in the document that
// can be selected with VoiceOver.
- (id)startTextMarker {
@@ -2364,6 +2393,7 @@ - (id)startTextMarker {
@@ -2375,6 +2404,7 @@ - (id)startTextMarker {
BrowserAccessibility::AXPosition position = _owner->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtStartOfContent());
}
@ -316,7 +316,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
// Returns a subrole based upon the role.
- (NSString*)subrole {
@@ -2693,12 +2723,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
@@ -2704,12 +2734,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
NSMutableAttributedString* attributedInnerText =
[[[NSMutableAttributedString alloc]
initWithString:base::SysUTF16ToNSString(innerText)] autorelease];
@ -331,7 +331,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
return [attributedInnerText attributedSubstringFromRange:range];
}
@@ -2811,6 +2843,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2822,6 +2854,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return ToBrowserAccessibilityCocoa(cell);
}
@ -339,7 +339,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
if ([attribute
isEqualToString:
NSAccessibilityUIElementForTextMarkerParameterizedAttribute]) {
@@ -3134,6 +3167,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -3145,6 +3178,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return CreateTextMarker(root->CreatePositionAt(index));
}
@ -347,7 +347,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
if ([attribute isEqualToString:
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
@@ -3164,6 +3198,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -3175,6 +3209,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return nil;
}
@ -355,7 +355,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
if ([attribute
isEqualToString:
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
@@ -3281,6 +3316,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -3292,6 +3327,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return @(child->GetIndexInParent());
}
@ -363,7 +363,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
return nil;
}
@@ -3810,6 +3846,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
@@ -3821,6 +3857,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
_owner->CreatePositionAt(range.location),
_owner->CreatePositionAt(NSMaxRange(range))));
}
@ -371,7 +371,7 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
if ([attribute
isEqualToString:NSAccessibilitySelectedTextMarkerRangeAttribute]) {
BrowserAccessibility::AXRange range = CreateRangeFromTextMarkerRange(value);
@@ -3820,6 +3857,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
@@ -3831,6 +3868,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
BrowserAccessibility::AXRange(range.anchor()->AsLeafTextPosition(),
range.focus()->AsLeafTextPosition()));
}
@ -380,10 +380,10 @@ index b0e3b8d22bfb3eda00612985454718ecaca91e83..6e487fa6382119d82f4fb8eeefd6c3a3
- (id)accessibilityFocusedUIElement {
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
index bf9b2cf399c88c3b08a727b492cd82106e53264b..3196760eb16e1f3642a612a6efd82b174f074f36 100644
index 2a5163acf68b8a26b562dd0ab54e78fb408e89fe..98a5b1efc461d8f46becd78a4e19c410300e40e0 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -484,7 +484,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -482,7 +482,7 @@ void PostAnnouncementNotification(NSString* announcement) {
if (native_focus_object && [native_focus_object instanceActive]) {
[user_info setObject:native_focus_object
forKey:ui::NSAccessibilityTextChangeElement];
@ -392,7 +392,7 @@ index bf9b2cf399c88c3b08a727b492cd82106e53264b..3196760eb16e1f3642a612a6efd82b17
id selected_text = [native_focus_object selectedTextMarkerRange];
if (selected_text) {
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
@@ -492,6 +492,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -490,6 +490,7 @@ void PostAnnouncementNotification(NSString* announcement) {
[user_info setObject:selected_text
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
}