Separate ui/base/interaction into an independent BUILD file

Commit: 762365aa | 2025-08-26 17:47:46+00:00

← Back to List

Separate ui/base/interaction into an independent BUILD file

Minor
Commit Hash: 762365aac47a168bd59eab20fe6683645880e27d
Commit Time: 2025-08-26 17:47:46+00:00
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review: View Upstream Review 🔗

📋 Summary

This submission separates the ui/base/interaction module from the main ui/base BUILD.gn file, creating an independent BUILD target "//ui/base/interaction". The purpose of this change is to allow access to interaction elements without depending on the entire ui/base module. The main changes include: 1) removing all interaction-related source files from ui/base/BUILD.gn; 2) creating a new standalone component in ui/base/interaction/BUILD.gn; 3) updating 52 BUILD.gn files that previously depended on "//ui/base" to depend on "//ui/base/interaction"; 4) updating the COMPONENT_EXPORT macro from UI_BASE to UI_BASE_INTERACTION; 5) changing the dependency from "//ui/base" to "//ui/base/interaction" in remote_cocoa/app_shim/BUILD.gn.

🎯 Impact Analysis

The impact of this change on WebView2Mac is positive but relatively minor. WebView2Mac primarily uses the ui/base/interaction functionality indirectly through the components/remote_cocoa/app_shim component. Specific impacts include: 1) Build dependency optimization – the remote_cocoa component now only needs to depend on the smaller interaction module instead of the entire ui/base, which may slightly improve build speed; 2) Modularization improvement – this separation makes dependencies clearer and more precise, helping to reduce unnecessary dependencies; 3) Full functional compatibility – all interaction-related classes and interfaces (such as ElementIdentifier, ElementTracker, TrackedElement, etc.) remain unchanged, with only the export macro changed from UI_BASE to UI_BASE_INTERACTION; 4) No functional impact on the core classes used by WebView2Mac (such as HostingNSWindowBridge, HostingApplicationBridge, etc.). This is a purely refactoring change and will not affect any existing functionality of WebView2Mac.

Impacted Classes:

remote_cocoa::app_shim (BUILD依赖变更) ElementIdentifier (导出宏变更) ElementTracker (导出宏变更) TrackedElement (导出宏变更) TrackedElementMac (导出宏变更) ElementTrackerMac (导出宏变更) FrameworkSpecificImplementation (导出宏变更) InteractionSequence (导出宏变更) TypedDataBase (导出宏变更) OwnedTypedDataCollection (导出宏变更)