Add code comments to highlight pitfalls to avoid when reintroducing the feature in the future
Minor
Commit Hash:
db5d04637f1e6c059f56f505e2e66e6ea6e17ea1
Commit Time: 2025-03-19 16:25:35+00:00
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review:
View Upstream Review 🔗
📋 Summary
This submission only adds detailed code comments in the content/app_shim_remote_cocoa/web_menu_runner_mac.mm file regarding the planned replacement of legacy APIs related to menu popups. The comments include: when switching to the new API ([NSMenu popUpMenuPositioningItem:atLocation:inView:]) in the future, reference should be made to the previous patch (crrev.com/c/6173642), and special attention should be paid to the positioning issue when the popup menu font size is 0 in web pages, in order to avoid reintroducing the known menu positioning regression (crbug.com/404294118).
🎯 Impact Analysis
This change only supplements code comments, without any actual modifications to business logic, interfaces, or classes. There is no direct impact on the functionality or performance of WebView2Mac. The added comments help future developers avoid known issues when attempting to reintroduce related features, improving code maintainability and change safety, but do not affect the current behavior or compatibility of WebView2Mac.
Impacted Classes:
WebMenuRunner