diff --git a/patches/chromium/a11y_axplatformnodebase_getindexinparent_returns_base_optional.patch b/patches/chromium/a11y_axplatformnodebase_getindexinparent_returns_base_optional.patch index 4c310793f946f..5a35a5c0ee5d8 100644 --- a/patches/chromium/a11y_axplatformnodebase_getindexinparent_returns_base_optional.patch +++ b/patches/chromium/a11y_axplatformnodebase_getindexinparent_returns_base_optional.patch @@ -211,7 +211,7 @@ diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibilit index 0454164364c6a4a1b1c11011603af5978d2b8ef5..bd9e17f1e21bd17a68988ee3c9ab08f2a1d99b2e 100644 --- a/ui/accessibility/platform/ax_platform_node_mac.mm +++ b/ui/accessibility/platform/ax_platform_node_mac.mm -@@ -1257,11 +1257,6 @@ - (NSRange)accessibilityRangeForPosition:(NSPoint)point { +@@ -1257,11 +1257,6 @@ void AXPlatformNodeMac::AnnounceText(const base::string16& text) { [native_node_ AXWindow], false); } diff --git a/patches/chromium/allow_focus_to_move_into_an_editable_combobox_s_listbox.patch b/patches/chromium/allow_focus_to_move_into_an_editable_combobox_s_listbox.patch index 856e64c99f487..d0af6721b8117 100644 --- a/patches/chromium/allow_focus_to_move_into_an_editable_combobox_s_listbox.patch +++ b/patches/chromium/allow_focus_to_move_into_an_editable_combobox_s_listbox.patch @@ -23,7 +23,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm index 33324bbca5953f6f2f9d829e4c7b5d7daa3f49ea..a27cacfd303706ef3ee637107d2de0c8839bfa20 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm -@@ -143,11 +143,6 @@ +@@ -143,11 +143,6 @@ BrowserAccessibility* BrowserAccessibilityManagerMac::GetFocus() const { if (!focus) return nullptr; diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index 6f61a88aeaf82..e21f44fd3cedc 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -74,7 +74,7 @@ index 85378bb565de617b1bd611d28c8714361747a357..36de4c0b0353be2418dacd388e92d7c3 } return VKEY_UNKNOWN; } -@@ -192,7 +198,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy, +@@ -192,7 +198,10 @@ CGEventRef MediaKeysListenerImpl::EventTapCallback(CGEventTapProxy proxy, int key_code = (data1 & 0xFFFF0000) >> 16; if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT && key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST && diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index 80aaf5ad4bf4b..d503dfbc12fb6 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -139,7 +139,7 @@ diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/a index b579521d55860823722df2ee849f6b1628b3c950..f4f71e5174cf8fb706a2f8385252ba877d1a03a7 100644 --- a/components/crash/core/app/crashpad_mac.mm +++ b/components/crash/core/app/crashpad_mac.mm -@@ -67,6 +67,8 @@ +@@ -67,6 +67,8 @@ std::map GetProcessSimpleAnnotations() { } // @autoreleasepool return process_annotations; }(); @@ -148,7 +148,7 @@ index b579521d55860823722df2ee849f6b1628b3c950..f4f71e5174cf8fb706a2f8385252ba87 return annotations; } -@@ -140,9 +142,17 @@ void DumpProcessWithoutCrashing(task_t task_port) { +@@ -140,9 +142,17 @@ base::FilePath PlatformCrashpadInitialization( #else std::string url; #endif diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 2387649150777..86c9fb563bd92 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -9,7 +9,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont index f293a15c6145422707c22aeb5a254ad71a31900c..472869202ff8a62d854c9ca39ca9f14e2f91e8cf 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -472,7 +472,11 @@ +@@ -472,7 +472,11 @@ void RenderWidgetHostViewMac::WasOccluded() { return; host()->WasHidden(); diff --git a/patches/chromium/fix-ensure-edit-cmds-to-sent-focused-WebContents.patch b/patches/chromium/fix-ensure-edit-cmds-to-sent-focused-WebContents.patch index 956e3fe71b740..7914ffd680dc8 100644 --- a/patches/chromium/fix-ensure-edit-cmds-to-sent-focused-WebContents.patch +++ b/patches/chromium/fix-ensure-edit-cmds-to-sent-focused-WebContents.patch @@ -105,7 +105,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont index 472869202ff8a62d854c9ca39ca9f14e2f91e8cf..17e3fe40522e088057eaf01a290b658a0b6d1d01 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -1799,15 +1799,15 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1799,15 +1799,15 @@ void RenderWidgetHostViewMac::ExecuteEditCommand(const std::string& command) { } void RenderWidgetHostViewMac::Undo() { @@ -127,7 +127,7 @@ index 472869202ff8a62d854c9ca39ca9f14e2f91e8cf..17e3fe40522e088057eaf01a290b658a } void RenderWidgetHostViewMac::Cut() { -@@ -1835,9 +1835,9 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1835,9 +1835,9 @@ void RenderWidgetHostViewMac::Paste() { } void RenderWidgetHostViewMac::PasteAndMatchStyle() { @@ -144,7 +144,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcomma index 760e47e9edd7b92b7bc6074f6da9c76048be8f28..2b0f1135e584852048081629eb6297e4e1fcc574 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm -@@ -91,9 +91,12 @@ void ExecuteEditCommand( +@@ -91,9 +91,12 @@ class RenderWidgetHostDelegateEditCommandCounter const base::Optional& value) override { edit_command_message_count_++; } @@ -161,7 +161,7 @@ diff --git a/content/browser/renderer_host/text_input_client_mac_unittest.mm b/c index 158e0507af7433e16c47227e7519b12e14554f1b..e7b8109cdc78e76d737bd0c067f8d33e0c171117 100644 --- a/content/browser/renderer_host/text_input_client_mac_unittest.mm +++ b/content/browser/renderer_host/text_input_client_mac_unittest.mm -@@ -40,9 +40,12 @@ +@@ -40,9 +40,12 @@ class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate { void ExecuteEditCommand( const std::string& command, const base::Optional& value) override {} diff --git a/patches/chromium/fix_use_the_new_mediaplaypause_key_listener_for_internal_chrome.patch b/patches/chromium/fix_use_the_new_mediaplaypause_key_listener_for_internal_chrome.patch index fb5868f45618c..e88af03151bfd 100644 --- a/patches/chromium/fix_use_the_new_mediaplaypause_key_listener_for_internal_chrome.patch +++ b/patches/chromium/fix_use_the_new_mediaplaypause_key_listener_for_internal_chrome.patch @@ -12,7 +12,7 @@ diff --git a/chrome/browser/extensions/global_shortcut_listener_mac.mm b/chrome/ index befe726af9c10b1563a7fc0bb77cc55f65943d5c..bac51f33f35f96fe4ecc764cf5ca887176642f74 100644 --- a/chrome/browser/extensions/global_shortcut_listener_mac.mm +++ b/chrome/browser/extensions/global_shortcut_listener_mac.mm -@@ -39,7 +39,7 @@ +@@ -39,7 +39,7 @@ GlobalShortcutListenerMac::GlobalShortcutListenerMac() // global MediaKeysListener to receive media keys. if (!content::MediaKeysListenerManager::IsMediaKeysListenerManagerEnabled()) { media_keys_listener_ = ui::MediaKeysListener::Create( diff --git a/patches/chromium/make_macos_os_version_numbers_consistent.patch b/patches/chromium/make_macos_os_version_numbers_consistent.patch index 42672d2e39874..3b308d89df2ab 100644 --- a/patches/chromium/make_macos_os_version_numbers_consistent.patch +++ b/patches/chromium/make_macos_os_version_numbers_consistent.patch @@ -21,7 +21,7 @@ diff --git a/base/system/sys_info_mac.mm b/base/system/sys_info_mac.mm index 265d7678060fd003b4f28b2b50f8a80be5253c88..3becbd628e19084de6fd87de4adcdec2c5af67b4 100644 --- a/base/system/sys_info_mac.mm +++ b/base/system/sys_info_mac.mm -@@ -62,6 +62,19 @@ +@@ -62,6 +62,19 @@ void SysInfo::OperatingSystemVersionNumbers(int32_t* major_version, *major_version = version.majorVersion; *minor_version = version.minorVersion; *bugfix_version = version.patchVersion; diff --git a/patches/chromium/mas-cfisobjc.patch b/patches/chromium/mas-cfisobjc.patch index 388d72ed6f510..ba3280d793932 100644 --- a/patches/chromium/mas-cfisobjc.patch +++ b/patches/chromium/mas-cfisobjc.patch @@ -9,7 +9,7 @@ diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b36e9d422 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm -@@ -27,7 +27,6 @@ +@@ -27,7 +27,6 @@ CFTypeID SecKeyGetTypeID(); #if !defined(OS_IOS) CFTypeID SecACLGetTypeID(); CFTypeID SecTrustedApplicationGetTypeID(); @@ -17,7 +17,7 @@ index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b #endif } // extern "C" -@@ -316,8 +315,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { +@@ -316,8 +315,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) { const_cast(reinterpret_cast(cf_val)); DCHECK(!cf_val || CTFontGetTypeID() == CFGetTypeID(cf_val) || @@ -27,7 +27,7 @@ index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b return ns_val; } -@@ -385,9 +383,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { +@@ -385,9 +383,6 @@ CFCast(const CFTypeRef& cf_val) { return (CTFontRef)(cf_val); } diff --git a/patches/chromium/mas_blink_no_private_api.patch b/patches/chromium/mas_blink_no_private_api.patch index 38b83d60c1f5c..bbbc8584b58b8 100644 --- a/patches/chromium/mas_blink_no_private_api.patch +++ b/patches/chromium/mas_blink_no_private_api.patch @@ -18,7 +18,7 @@ index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d extern "C" { // Kill ring calls. Would be better to use NSKillRing.h, but that's not -@@ -39,38 +40,53 @@ +@@ -39,38 +40,53 @@ NSString* _NSYankFromKillRing(); void _NSNewKillRingSequence(); void _NSSetKillRingToYankedState(); } @@ -92,7 +92,7 @@ index 8f4ae94bc1d8188d041654c50511f3346eee79de..fa06f47abbff3dcda937bf0b794f616e namespace blink { -@@ -95,10 +97,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame, +@@ -95,10 +97,12 @@ bool ThemePainterMac::PaintTextField(const Node* node, // behavior change while remaining a fragile solution. // https://bugs.chromium.org/p/chromium/issues/detail?id=658085#c3 if (!use_ns_text_field_cell) { @@ -105,7 +105,7 @@ index 8f4ae94bc1d8188d041654c50511f3346eee79de..fa06f47abbff3dcda937bf0b794f616e return false; } -@@ -186,10 +190,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame, +@@ -186,10 +190,12 @@ bool ThemePainterMac::PaintTextArea(const Node* node, const IntRect& r) { ScopedColorSchemeAppearance appearance(style.UsedColorScheme()); LocalCurrentGraphicsContext local_context(paint_info.context, r); diff --git a/patches/chromium/mas_disable_custom_window_frame.patch b/patches/chromium/mas_disable_custom_window_frame.patch index 05a79f972f628..dfabb14223267 100644 --- a/patches/chromium/mas_disable_custom_window_frame.patch +++ b/patches/chromium/mas_disable_custom_window_frame.patch @@ -18,7 +18,7 @@ index cf88f696a46ff0ac84bcf466b44d1080438426c1..7672eee30a811001a0149edfa4eed9dc @interface NSWindow (PrivateBrowserNativeWidgetAPI) + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle; @end -@@ -63,10 +64,13 @@ - (NSRect)_draggableFrame NS_DEPRECATED_MAC(10_10, 10_11) { +@@ -63,10 +64,13 @@ @end @@ -32,7 +32,7 @@ index cf88f696a46ff0ac84bcf466b44d1080438426c1..7672eee30a811001a0149edfa4eed9dc + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle { // - NSThemeFrame and its subclasses will be nil if it's missing at runtime. if ([BrowserWindowFrame class]) -@@ -81,6 +85,8 @@ - (BOOL)_usesCustomDrawing { +@@ -81,6 +85,8 @@ return NO; } @@ -54,7 +54,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b @interface NSWindow (PrivateAPI) + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle; @end -@@ -18,8 +20,12 @@ - (CGFloat)_titlebarHeight { +@@ -18,8 +20,12 @@ } @end @@ -67,7 +67,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle { if ([NativeWidgetMacFramelessNSWindowFrame class]) { return [NativeWidgetMacFramelessNSWindowFrame class]; -@@ -27,4 +33,6 @@ + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle { +@@ -27,4 +33,6 @@ return [super frameViewClassForStyleMask:windowStyle]; } @@ -108,7 +108,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1 - (BOOL)hasKeyAppearance; - (long long)_resizeDirectionForMouseLocation:(CGPoint)location; - (BOOL)_isConsideredOpenForPersistentState; -@@ -56,6 +58,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event { +@@ -56,6 +58,8 @@ } @end @@ -117,7 +117,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1 @implementation NativeWidgetMacNSWindowTitledFrame - (void)mouseDown:(NSEvent*)event { if (self.window.isMovable) -@@ -82,6 +86,8 @@ - (BOOL)usesCustomDrawing { +@@ -82,6 +86,8 @@ } @end @@ -126,7 +126,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1 @implementation NativeWidgetMacNSWindow { @private base::scoped_nsobject _commandDispatcher; -@@ -163,6 +169,8 @@ - (BOOL)hasViewsMenuActive { +@@ -163,6 +169,8 @@ // NSWindow overrides. @@ -135,7 +135,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1 + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -174,6 +182,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -174,6 +182,8 @@ return [super frameViewClassForStyleMask:windowStyle]; } diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 161e5cb57e8ba..b344b2ad763b1 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -17,7 +17,7 @@ diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209ff3cbfaaa 100644 --- a/components/remote_cocoa/app_shim/application_bridge.mm +++ b/components/remote_cocoa/app_shim/application_bridge.mm -@@ -49,6 +49,7 @@ +@@ -49,6 +49,7 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper { // NativeWidgetNSWindowHostHelper: id GetNativeViewAccessible() override { @@ -25,7 +25,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f if (!remote_accessibility_element_) { int64_t browser_pid = 0; std::vector element_token; -@@ -59,6 +60,9 @@ id GetNativeViewAccessible() override { +@@ -59,6 +60,9 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper { ui::RemoteAccessibility::GetRemoteElementFromToken(element_token); } return remote_accessibility_element_.get(); @@ -35,7 +35,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f } void DispatchKeyEvent(ui::KeyEvent* event) override { bool event_handled = false; -@@ -96,8 +100,10 @@ void GetWordAt(const gfx::Point& location_in_content, +@@ -96,8 +100,10 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper { mojo::AssociatedRemote text_input_host_remote_; std::unique_ptr bridge_; @@ -50,7 +50,7 @@ diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm index 2ee45cb069ec5d78d9c7a3f61fdd1d444a590f41..badc4323b910f8e3957583e05af303472cb204f6 100644 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -@@ -543,10 +543,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -543,10 +543,12 @@ void NativeWidgetNSWindowBridge::CreateContentView(uint64_t ns_view_id, // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -67,7 +67,7 @@ diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/cont index a8e5c8888cb7ea8a85de7c8e8c613cc2b3c5be15..d01468fe77703b2812865b0198b84b0b645283c4 100644 --- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm +++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -@@ -66,8 +66,10 @@ id GetFocusedBrowserAccessibilityElement() override { +@@ -66,8 +66,10 @@ class RenderWidgetHostNSViewBridgeOwner return nil; } void SetAccessibilityWindow(NSWindow* window) override { @@ -78,7 +78,7 @@ index a8e5c8888cb7ea8a85de7c8e8c613cc2b3c5be15..d01468fe77703b2812865b0198b84b0b } void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event, -@@ -126,8 +128,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { +@@ -126,8 +128,10 @@ class RenderWidgetHostNSViewBridgeOwner mojo::AssociatedRemote host_; std::unique_ptr bridge_; @@ -120,7 +120,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont index 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad71a31900c 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -231,8 +231,10 @@ +@@ -231,8 +231,10 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() { void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -131,7 +131,7 @@ index 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad7 // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1348,8 +1350,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1348,8 +1350,10 @@ RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessible() { gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -142,7 +142,7 @@ index 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad7 return [GetInProcessNSView() window]; } -@@ -1381,9 +1385,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1381,9 +1385,11 @@ id RenderWidgetHostViewMac::GetFocusedBrowserAccessibilityElement() { } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -154,7 +154,7 @@ index 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad7 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -1870,12 +1876,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1870,12 +1876,14 @@ void RenderWidgetHostViewMac::StopSpeaking() { void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -239,7 +239,7 @@ diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e9846558d1a 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -282,14 +282,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -282,14 +282,22 @@ gfx::NativeViewAccessible NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const { if (in_process_ns_window_bridge_) return in_process_ns_window_bridge_->ns_view(); @@ -262,7 +262,7 @@ index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e98 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1118,6 +1126,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1118,6 +1126,7 @@ void NativeWidgetMacNSWindowHost::OnFocusWindowToolbar() { void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -270,7 +270,7 @@ index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e98 remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1125,14 +1134,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1125,14 +1134,17 @@ void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( [remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()]; [remote_view_accessible_ setTopLevelUIElement:remote_window_accessible_.get()]; diff --git a/patches/chromium/mas_disable_remote_layer.patch b/patches/chromium/mas_disable_remote_layer.patch index f1483c377df16..932b5158d9dcc 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -44,7 +44,7 @@ diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/se index eb46993b8f40fdc7da35dae1b850dad637f6b47d..05a9ae47620d17b5a53f991c0b3a0a5c153b599c 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -@@ -63,6 +63,7 @@ +@@ -63,6 +63,7 @@ ImageTransportSurfaceOverlayMacBase< template bool ImageTransportSurfaceOverlayMacBase::Initialize( gl::GLSurfaceFormat format) { @@ -52,7 +52,7 @@ index eb46993b8f40fdc7da35dae1b850dad637f6b47d..05a9ae47620d17b5a53f991c0b3a0a5c // Create the CAContext to send this to the GPU process, and the layer for // the context. if (use_remote_layer_api_) { -@@ -71,6 +72,7 @@ +@@ -71,6 +72,7 @@ bool ImageTransportSurfaceOverlayMacBase::Initialize( [CAContext contextWithCGSConnection:connection_id options:@{}] retain]); [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; } @@ -60,7 +60,7 @@ index eb46993b8f40fdc7da35dae1b850dad637f6b47d..05a9ae47620d17b5a53f991c0b3a0a5c return true; } -@@ -139,7 +141,9 @@ +@@ -139,7 +141,9 @@ ImageTransportSurfaceOverlayMacBase::SwapBuffersInternal( "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { @@ -74,7 +74,7 @@ diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated index 38f25d6314f653d7138d30c67c5ae49963863327..f2fda251ed975bd848a49b33830d329fc8954826 100644 --- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm +++ b/ui/accelerated_widget_mac/display_ca_layer_tree.mm -@@ -97,6 +97,7 @@ - (void)setContentsChanged; +@@ -97,6 +97,7 @@ void DisplayCALayerTree::UpdateCALayerTree( } void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) { @@ -82,7 +82,7 @@ index 38f25d6314f653d7138d30c67c5ae49963863327..f2fda251ed975bd848a49b33830d329f // Early-out if the remote layer has not changed. if ([remote_layer_ contextId] == ca_context_id) return; -@@ -121,6 +122,9 @@ - (void)setContentsChanged; +@@ -121,6 +122,9 @@ void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) { [io_surface_layer_ removeFromSuperlayer]; io_surface_layer_.reset(); } diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 23eb45a1de37a..90b257fa3f235 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -53,7 +53,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/cont index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe7736531da80c6 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm -@@ -206,6 +206,7 @@ +@@ -206,6 +206,7 @@ NSString* const NSString* const NSAccessibilityLengthForTextMarkerRangeParameterizedAttribute = @"AXLengthForTextMarkerRange"; @@ -61,7 +61,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 // Private attributes that can be used for testing text markers, e.g. in dump // tree tests. NSString* const -@@ -217,6 +218,7 @@ +@@ -217,6 +218,7 @@ NSString* const NSString* const NSAccessibilityTextMarkerNodeDebugDescriptionParameterizedAttribute = @"AXTextMarkerNodeDebugDescription"; @@ -69,7 +69,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 // Other private attributes. NSString* const NSAccessibilitySelectTextWithCriteriaParameterizedAttribute = -@@ -240,6 +242,7 @@ +@@ -240,6 +242,7 @@ NSDictionary* attributeToMethodNameMap = nil; // VoiceOver uses -1 to mean "no limit" for AXResultsLimit. const int kAXResultsLimitNoLimit = -1; @@ -77,7 +77,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 extern "C" { // The following are private accessibility APIs required for cursor navigation -@@ -479,6 +482,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range, +@@ -479,6 +482,7 @@ NSAttributedString* GetAttributedTextForTextMarkerRange(id marker_range) { AddMisspelledTextAttributes(ax_range, attributed_text); return attributed_text; } @@ -85,7 +85,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 // Returns an autoreleased copy of the AXNodeData's attribute. NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility, -@@ -772,7 +776,9 @@ + (void)initialize { +@@ -772,7 +776,9 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; {NSAccessibilityEditableAncestorAttribute, @"editableAncestor"}, {NSAccessibilityElementBusyAttribute, @"elementBusy"}, {NSAccessibilityEnabledAttribute, @"enabled"}, @@ -95,7 +95,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 {NSAccessibilityExpandedAttribute, @"expanded"}, {NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"}, {NSAccessibilityFocusedAttribute, @"focused"}, -@@ -784,8 +790,10 @@ + (void)initialize { +@@ -784,8 +790,10 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; {NSAccessibilityHighestEditableAncestorAttribute, @"highestEditableAncestor"}, {NSAccessibilityIndexAttribute, @"index"}, @@ -106,7 +106,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 {NSAccessibilityInvalidAttribute, @"invalid"}, {NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"}, {NSAccessibilityLanguageAttribute, @"language"}, -@@ -807,13 +815,17 @@ + (void)initialize { +@@ -807,13 +815,17 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; {NSAccessibilityRowsAttribute, @"rows"}, // TODO(aboxhall): expose // NSAccessibilityServesAsTitleForUIElementsAttribute @@ -124,7 +124,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 {NSAccessibilitySizeAttribute, @"size"}, {NSAccessibilitySortDirectionAttribute, @"sortDirection"}, {NSAccessibilitySubroleAttribute, @"subrole"}, -@@ -1306,6 +1318,7 @@ - (NSNumber*)enabled { +@@ -1306,6 +1318,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; ax::mojom::Restriction::kDisabled]; } @@ -132,7 +132,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 // Returns a text marker that points to the last character in the document that // can be selected with VoiceOver. - (id)endTextMarker { -@@ -1316,6 +1329,7 @@ - (id)endTextMarker { +@@ -1316,6 +1329,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0); return CreateTextMarker(position->CreatePositionAtEndOfAnchor()); } @@ -140,7 +140,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 - (NSNumber*)expanded { if (![self instanceActive]) -@@ -1465,6 +1479,8 @@ - (NSNumber*)index { +@@ -1465,6 +1479,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return nil; } @@ -149,7 +149,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 - (NSNumber*)insertionPointLineNumber { if (![self instanceActive]) return nil; -@@ -1487,6 +1503,7 @@ - (NSNumber*)insertionPointLineNumber { +@@ -1487,6 +1503,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; caretPosition->AsTextPosition()->text_offset()); return @(std::distance(lineBreaks.begin(), iterator)); } @@ -157,7 +157,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 // Returns whether or not this node should be ignored in the // accessibility tree. -@@ -2164,6 +2181,7 @@ - (NSArray*)selectedChildren { +@@ -2164,6 +2181,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return ret; } @@ -165,7 +165,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 - (NSString*)selectedText { if (![self instanceActive]) return nil; -@@ -2175,11 +2193,13 @@ - (NSString*)selectedText { +@@ -2175,11 +2193,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return nil; return base::SysUTF16ToNSString(range.GetText()); } @@ -179,7 +179,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 - (NSValue*)selectedTextRange { if (![self instanceActive]) return nil; -@@ -2200,12 +2220,15 @@ - (NSValue*)selectedTextRange { +@@ -2200,12 +2220,15 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; int selLength = range.GetText().length(); return [NSValue valueWithRange:NSMakeRange(selStart, selLength)]; } @@ -195,7 +195,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 - (NSValue*)size { if (![self instanceActive]) -@@ -2238,6 +2261,7 @@ - (NSString*)sortDirection { +@@ -2238,6 +2261,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return nil; } @@ -203,7 +203,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 // Returns a text marker that points to the first character in the document that // can be selected with VoiceOver. - (id)startTextMarker { -@@ -2248,6 +2272,7 @@ - (id)startTextMarker { +@@ -2248,6 +2272,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0); return CreateTextMarker(position->CreatePositionAtStartOfAnchor()); } @@ -211,7 +211,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 // Returns a subrole based upon the role. - (NSString*)subrole { -@@ -2573,11 +2598,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range { +@@ -2573,11 +2598,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; NSMutableAttributedString* attributedInnerText = [[[NSMutableAttributedString alloc] initWithString:base::SysUTF16ToNSString(innerText)] autorelease]; @@ -225,7 +225,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 return [attributedInnerText attributedSubstringFromRange:range]; } -@@ -2681,9 +2708,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute +@@ -2681,9 +2708,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return ToBrowserAccessibilityCocoa(cell); } @@ -237,7 +237,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 BrowserAccessibilityPositionInstance position = CreatePositionFromTextMarker(parameter); if (!position->IsNullPosition()) -@@ -2996,6 +3022,7 @@ AXPlatformRange range(std::move(lineStartPosition), +@@ -2996,6 +3022,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return CreateTextMarker(root->CreatePositionAt(index)); } @@ -245,7 +245,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 if ([attribute isEqualToString: NSAccessibilityBoundsForRangeParameterizedAttribute]) { -@@ -3031,6 +3058,7 @@ AXPlatformRange range(std::move(lineStartPosition), +@@ -3031,6 +3058,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return nil; } @@ -253,7 +253,7 @@ index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe77365 if ([attribute isEqualToString: NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) { -@@ -3145,6 +3173,7 @@ AXPlatformRange range(std::move(lineStartPosition), +@@ -3145,6 +3173,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return @(child->GetIndexInParent()); } @@ -265,7 +265,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm index 8e8b6b785ed6e2831f107e925c387f723f55a8fc..33324bbca5953f6f2f9d829e4c7b5d7daa3f49ea 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm -@@ -534,6 +534,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -534,6 +534,7 @@ NSDictionary* BrowserAccessibilityManagerMac:: [user_info setObject:native_focus_object forKey:NSAccessibilityTextChangeElement]; @@ -273,7 +273,7 @@ index 8e8b6b785ed6e2831f107e925c387f723f55a8fc..33324bbca5953f6f2f9d829e4c7b5d7d id selected_text = [native_focus_object selectedTextMarkerRange]; if (selected_text) { NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute = -@@ -541,6 +542,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -541,6 +542,7 @@ NSDictionary* BrowserAccessibilityManagerMac:: [user_info setObject:selected_text forKey:NSAccessibilitySelectedTextMarkerRangeAttribute]; } @@ -297,7 +297,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() { @@ -325,7 +325,7 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0 extern "C" { // Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and // `Karabiner` [3] to programmatically control the Bluetooth state. Calling the -@@ -48,6 +49,7 @@ +@@ -48,6 +49,7 @@ extern "C" { // [4] https://support.apple.com/kb/PH25091 void IOBluetoothPreferenceSetControllerPowerState(int state); } @@ -333,7 +333,7 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0 namespace { -@@ -120,8 +122,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) { +@@ -120,8 +122,10 @@ BluetoothAdapterMac::BluetoothAdapterMac() controller_state_function_( base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState, base::Unretained(this))), @@ -344,7 +344,7 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0 should_update_name_(true), classic_discovery_manager_( BluetoothDiscoveryManagerMac::CreateClassic(this)), -@@ -306,8 +310,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) { +@@ -306,8 +310,12 @@ base::WeakPtr BluetoothAdapterMac::GetWeakPtr() { } bool BluetoothAdapterMac::SetPoweredImpl(bool powered) { diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 15cc7798be5e5..973fea4da13d8 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -25,7 +25,7 @@ index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc19 // These are not documented, so use only after checking -respondsToSelector:. @interface NSApplication (UndocumentedSpeechMethods) - (void)speakString:(NSString*)string; -@@ -573,6 +578,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { +@@ -573,6 +578,9 @@ void ExtractUnderlines(NSAttributedString* string, } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -35,7 +35,7 @@ index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc19 return [self acceptsMouseEventsWhenInactive]; } -@@ -983,6 +991,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -983,6 +991,10 @@ void ExtractUnderlines(NSAttributedString* string, eventType == NSKeyDown && !(modifierFlags & NSCommandKeyMask); @@ -46,7 +46,7 @@ index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc19 // We only handle key down events and just simply forward other events. if (eventType != NSKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1759,9 +1771,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1759,9 +1771,11 @@ void ExtractUnderlines(NSAttributedString* string, // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -58,7 +58,7 @@ index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc19 - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1770,7 +1784,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1770,7 +1784,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName; initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 01344185c91bb..340bc494549b6 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -26,7 +26,7 @@ diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser index b874b3c4b16ca87c9730c6caaf5788cff0ab3493..2c82d63d646c9201abd6a669b726dae0f8bec12b 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm -@@ -419,9 +419,7 @@ - (void)setDragStartTrackersForProcess:(int)processID { +@@ -419,9 +419,7 @@ void DropCompletionCallback( } - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {