Skip to content

[Mac] Upstream context menu images enablement macro and refactor logic #47156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

lilyspiniolas
Copy link
Contributor

@lilyspiniolas lilyspiniolas commented Jun 25, 2025

4989a73

[Mac] Upstream context menu images enablement macro and refactor logic
https://bugs.webkit.org/show_bug.cgi?id=294946
rdar://154252175

Reviewed by Wenson Hsieh.

Renamed ENABLE_CONTEXT_MENU_IMAGES_FOR_INTERNAL_CLIENTS to
ENABLE_CONTEXT_MENU_IMAGES_ON_MAC and added definition. Removed the
web preference for the feature and refactored the enablement logic so
that the macro alone is sufficient.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebCore/PAL/pal/spi/mac/NSMenuSPI.h:
* Source/WebKit/Platform/mac/MenuUtilities.h:
* Source/WebKit/Platform/mac/MenuUtilities.mm:
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::platformMenuItems const):
(WebKit::WebExtensionContext::singleMenuItemOrExtensionItemWithSubmenu const):
(WebKit::WebExtensionContext::addItemsToContextMenu):
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
* Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):
(WebKit::WebContextMenuProxyMac::getContextMenuItem):
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showPDFContextMenu):

Canonical link: https://commits.webkit.org/296606@main

b52619e

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

@lilyspiniolas lilyspiniolas self-assigned this Jun 25, 2025
@lilyspiniolas lilyspiniolas added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Jun 25, 2025
@lilyspiniolas lilyspiniolas added the merge-queue Applied to send a pull request to merge-queue label Jun 25, 2025
https://bugs.webkit.org/show_bug.cgi?id=294946
rdar://154252175

Reviewed by Wenson Hsieh.

Renamed ENABLE_CONTEXT_MENU_IMAGES_FOR_INTERNAL_CLIENTS to
ENABLE_CONTEXT_MENU_IMAGES_ON_MAC and added definition. Removed the
web preference for the feature and refactored the enablement logic so
that the macro alone is sufficient.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebCore/PAL/pal/spi/mac/NSMenuSPI.h:
* Source/WebKit/Platform/mac/MenuUtilities.h:
* Source/WebKit/Platform/mac/MenuUtilities.mm:
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::platformMenuItems const):
(WebKit::WebExtensionContext::singleMenuItemOrExtensionItemWithSubmenu const):
(WebKit::WebExtensionContext::addItemsToContextMenu):
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
* Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):
(WebKit::WebContextMenuProxyMac::getContextMenuItem):
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showPDFContextMenu):

Canonical link: https://commits.webkit.org/296606@main
@webkit-commit-queue
Copy link
Collaborator

Committed 296606@main (4989a73): https://commits.webkit.org/296606@main

Reviewed commits have been landed. Closing PR #47156 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 4989a73 into WebKit:main Jun 25, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants