Rollback support for dismiss behavior of dpwa download bubble on Mac

Commit: 053094ae | 2025-03-17 23:32:21+00:00

← Back to List

Rollback support for dismiss behavior of dpwa download bubble on Mac

Minor
Commit Hash: 053094ae36a8278f65b5b206a28a687ed64bf05f
Commit Time: 2025-03-17 23:32:21+00:00
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review: View Upstream Review 🔗

📋 Summary

This submission rolls back the previous support for dismiss behavior in the Progressive Web App (PWA) download bubble on Mac. The reverted changes mainly include: undoing the renaming of the local_event_monitor_ field to key_down_event_monitor_ in the NativeWidgetNSWindowBridge class related to remote_cocoa; removing the inheritance from NativeWidgetMacEventMonitor::Client and the associated event monitoring logic in the EventMonitorMac class, restoring monitoring solely through local NSEvent events; as well as reverting related event handling and header file references. The rollback is due to this feature causing keyboard input to fail in PWA fullscreen mode.

🎯 Impact Analysis

This rollback restores remote_cocoa::NativeWidgetNSWindowBridge and its event monitoring logic to the original implementation, reverting enhancements to the event monitoring mechanism (such as dedicated key down event monitors and special event paths for PWA/Remote Cocoa). For WebView2Mac:
- If downstream has not adopted the event monitoring enhancements being rolled back, this rollback will not result in any functional or performance changes.
- If downstream has made adaptations based on the rolled-back implementation (such as the key_down_event_monitor_ field or NativeWidgetMacEventMonitor::Client related interfaces), corresponding adaptations need to be reverted as well; otherwise, compilation or runtime errors may occur.
- Since WebView2Mac mainly relies on remote_cocoa::NativeWidgetNSWindowBridge and its event dispatch mechanism, the rollback of event monitoring may affect event handling consistency in a very small number of edge cases, but the main workflow is not affected.
- This rollback helps to avoid the issue of keyboard input failure in PWA fullscreen mode, indirectly improving the stability of Remote Cocoa event handling.

Impacted Classes:

remote_cocoa::NativeWidgetNSWindowBridge views::EventMonitorMac views::NativeWidgetMacEventMonitor(接口引用/事件监控相关)