[Mac] Fix Services menu appearance in contextual menus [chromium/src : main]

0 views
Skip to first unread message

Avi Drissman (Gerrit)

unread,
Jan 9, 2026, 10:39:56 AM (yesterday) Jan 9
to liang zeng, Yuanjun Zhu, Avi Drissman, Chromium LUCI CQ, chromium...@chromium.org, mac-r...@chromium.org
Attention needed from Yuanjun Zhu and liang zeng

Avi Drissman added 1 comment

File chrome/browser/ui/cocoa/renderer_context_menu/chrome_swizzle_services_menu_updater.mm
Line 37, Patchset 1 (Latest):- (void)plugMenu:(NSMenu*)menu intoMenu:(NSMenu*)parentMenu;
Avi Drissman . unresolved

In macOS 14, Apple rebuilt menus for macOS using Cocoa. In macOS 13 and earlier, there’s only `-plugMenu:intoMenuRef:`, but in macOS 14+ there’s now also `-plugMenu:intoMenu:`. This CL only swizzles the latter.

Do we see this bug in macOS 13 and earlier? If so, we’ll likely also need to swizzle that other method. If not, we should document this.

Open in Gerrit

Related details

Attention is currently required from:
  • Yuanjun Zhu
  • liang zeng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I1d5264b14dd408894b8237d88414885469e9758a
Gerrit-Change-Number: 7419999
Gerrit-PatchSet: 1
Gerrit-Owner: liang zeng <lian...@microsoft.com>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Yuanjun Zhu <yuanj...@microsoft.com>
Gerrit-Reviewer: liang zeng <lian...@microsoft.com>
Gerrit-Attention: liang zeng <lian...@microsoft.com>
Gerrit-Attention: Yuanjun Zhu <yuanj...@microsoft.com>
Gerrit-Comment-Date: Fri, 09 Jan 2026 15:39:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

liang zeng (Gerrit)

unread,
Jan 9, 2026, 9:40:03 PM (19 hours ago) Jan 9
to Yuanjun Zhu, Avi Drissman, Chromium LUCI CQ, chromium...@chromium.org, mac-r...@chromium.org
Attention needed from Avi Drissman and Yuanjun Zhu

liang zeng added 1 comment

File chrome/browser/ui/cocoa/renderer_context_menu/chrome_swizzle_services_menu_updater.mm
Line 37, Patchset 1:- (void)plugMenu:(NSMenu*)menu intoMenu:(NSMenu*)parentMenu;
Avi Drissman . resolved

In macOS 14, Apple rebuilt menus for macOS using Cocoa. In macOS 13 and earlier, there’s only `-plugMenu:intoMenuRef:`, but in macOS 14+ there’s now also `-plugMenu:intoMenu:`. This CL only swizzles the latter.

Do we see this bug in macOS 13 and earlier? If so, we’ll likely also need to swizzle that other method. If not, we should document this.

liang zeng

Thank you @avi, I tested it in macOS 12/13 and didn't find this bug, but I can reproduce it in macOS 14 and later. Updated the changes to skip swizzling `plugMenu:intoMenu` method in old versions and added more comments.

Open in Gerrit

Related details

Attention is currently required from:
  • Avi Drissman
  • Yuanjun Zhu
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1d5264b14dd408894b8237d88414885469e9758a
    Gerrit-Change-Number: 7419999
    Gerrit-PatchSet: 3
    Gerrit-Owner: liang zeng <lian...@microsoft.com>
    Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
    Gerrit-Reviewer: Yuanjun Zhu <yuanj...@microsoft.com>
    Gerrit-Reviewer: liang zeng <lian...@microsoft.com>
    Gerrit-Attention: Avi Drissman <a...@chromium.org>
    Gerrit-Attention: Yuanjun Zhu <yuanj...@microsoft.com>
    Gerrit-Comment-Date: Sat, 10 Jan 2026 02:39:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Avi Drissman <a...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages