Repository navigation
refactor(namescope): Introduce the WinUI namescope owner model - #24473
MartinZikmund wants to merge 15 commits into
Conversation
|
Claude finished @MartinZikmund's task in 7m 38s —— View job Review complete
Verdict: ship. This is a clean, well-scoped first step of the namescope migration — the owner model and tables are added without changing resolution behavior, exactly as described. Findings: 1 low-severity, non-blocking (posted inline on Cross-cutting notes (not blocking):
|
There was a problem hiding this comment.
🔵 Needs a closer look
The change rewires core XAML Enter/Leave and namescope infrastructure across many call sites and generated baselines, making it high-impact despite being described as “plumbing-only.”
Pull request overview
Introduces the foundational “namescope owner” data model to align Uno’s x:Name / namescope behavior with WinUI, without changing name resolution semantics yet (part of #21129). This refactor threads a (currently null) namescope-owner value through the Enter/Leave walk, adds owner-keyed namescope tables in CoreServices, and seeds owner information from the XAML generator, with accompanying unit/runtime test coverage.
Changes:
- Add owner-keyed namescope tables (
NameScopeRoot,StandardNameScopeTable,NameScopeTableEntry) and wire them intoCoreServices. - Refactor the Enter/Leave walk plumbing to carry walk depth and (future) namescope-owner context; rename keyboard-accelerator propagation hooks for clarity.
- Update the XAML generator + generator baselines to seed
__nameScope.Ownerand mark potential definition-name ownership forx:Classroots; add new unit/runtime tests around the new model.
File summaries
| File | Description |
|---|---|
| src/Uno.UI/UI/Xaml/UIElement.Properties.cs | Update keyboard-accelerator collection enter/leave wiring to renamed APIs. |
| src/Uno.UI/UI/Xaml/UIElement.mux.cs | Refactor UIElement Enter/Leave walk entrypoints, thread namescope owner + depth, and rename managed-peer hooks. |
| src/Uno.UI/UI/Xaml/UIElement.cs | Update flyout keyboard-accelerator propagation and runtime child-enter path to new plumbing. |
| src/Uno.UI/UI/Xaml/UIElement.crossruntime.cs | Adjust child enter/leave and depth propagation in cross-runtime UIElement walk. |
| src/Uno.UI/UI/Xaml/ResourceDictionary.cs | Set/reset parser-parent lock during parsing lifecycle and update leave call signature. |
| src/Uno.UI/UI/Xaml/Internal/VisualTree.cs | Make public root visual a permanent namescope owner; update root Enter invocation + depth initialization. |
| src/Uno.UI/UI/Xaml/Internal/NameScoping/StandardNameScopeTable.cs | Introduce the owner-scoped name-to-element table implementation. |
| src/Uno.UI/UI/Xaml/Internal/NameScoping/NameScopeType.cs | Add enum to distinguish standard vs template namescope tables. |
| src/Uno.UI/UI/Xaml/Internal/NameScoping/NameScopeTableEntry.cs | Add entry representation for strong/weak/deferred (x:Load) name registrations. |
| src/Uno.UI/UI/Xaml/Internal/NameScoping/NameScopeRoot.cs | Add owner-keyed root that manages namescope tables and guarded clearing. |
| src/Uno.UI/UI/Xaml/Internal/CoreServices.NameScope.mux.cs | Add CoreServices APIs to register/resolve named objects via owner-keyed tables. |
| src/Uno.UI/UI/Xaml/Internal/CoreServices.cs | Add CoreServices.NameScopeRoot storage for per-core namescope tables. |
| src/Uno.UI/UI/Xaml/Input/KeyboardAccelerator/KeyboardAcceleratorCollection.h.mux.cs | Rename enter/leave helpers to explicit “(un)register live accelerators” APIs. |
| src/Uno.UI/UI/Xaml/Input/KeyboardAccelerator/KeyboardAccelerator.mux.cs | Rename accelerator enter implementation to avoid collision with UIElement enter plumbing. |
| src/Uno.UI/UI/Xaml/FrameworkElement.Layout.cs | Update FrameworkElement enter/leave overrides to new EnterImpl/LeaveImpl signatures. |
| src/Uno.UI/UI/Xaml/FrameworkElement.cs | Set/reset parser-parent lock in FrameworkElement parsing lifecycle. |
| src/Uno.UI/UI/Xaml/EnterParams.cs | Add Depth to EnterParams for Uno bookkeeping and thread it through constructors. |
| src/Uno.UI/UI/Xaml/ElementStub.cs | Update ElementStub enter/leave overrides to new signatures (avoid materializing on enter). |
| src/Uno.UI/UI/Xaml/DependencyObject.PropertySystem.mux.cs | Thread depth sentinel through property-enter path. |
| src/Uno.UI/UI/Xaml/DependencyObject.NameScoping.mux.cs | Add namescope-owner model flags + owner walk (WinUI-aligned). |
| src/Uno.UI/UI/Xaml/DependencyObject.mux.cs | Make DO EnterImpl / LeaveImpl virtual to support overrides in the new walk. |
| src/Uno.UI/UI/Xaml/Controls/Primitives/ButtonBase/ButtonBase.mux.cs | Rename managed-peer enter/leave overrides to new managed-peer hook names. |
| src/Uno.UI/UI/Xaml/Controls/MenuFlyout/SplitMenuFlyoutItem/SplitMenuFlyoutItem.mux.cs | Update enter/leave overrides to new signatures and propagate KA logic. |
| src/Uno.UI/UI/Xaml/Controls/MenuFlyout/MenuFlyoutSubItem/MenuFlyoutSubItem.mux.cs | Update enter/leave overrides to new signatures and propagate KA logic. |
| src/Uno.UI/UI/Xaml/Controls/MenuFlyout/MenuFlyoutItem/MenuFlyoutItem.mux.cs | Rename managed-peer enter/leave overrides to new managed-peer hook names. |
| src/Uno.UI/UI/Xaml/Controls/MenuFlyout/MenuFlyout.mux.cs | Rename flyout KA propagation hooks and update dead-enter/dead-leave usage. |
| src/Uno.UI/UI/Xaml/Controls/MenuBar/MenuBarItem.cs | Update KA dead-enter propagation to EnterTree and new EnterImpl signature. |
| src/Uno.UI/UI/Xaml/Controls/Flyout/FlyoutBase.cs | Rename flyout KA propagation hooks to avoid clashing with DO enter/leave semantics. |
| src/Uno.UI/UI/Xaml/Controls/Flyout/Flyout.mux.cs | Update flyout KA propagation to EnterTree/LeaveTree and renamed hooks. |
| src/Uno.UI/UI/Xaml/Controls/FlipView/FlipView.managed.cs | Update enter/leave overrides to new signatures. |
| src/Uno.UI/UI/Xaml/Controls/Control/Control.crossruntime.cs | Update control enter override to new signature and base call shape. |
| src/Uno.UI/UI/Xaml/Controls/ContentPresenter/ContentPresenter.cs | Update enter/leave overrides to new signatures. |
| src/Uno.UI/UI/Xaml/Controls/CalendarView/CalendarViewBaseItem.cs | Rename managed-peer enter override to new managed-peer hook name. |
| src/Uno.UI/UI/Xaml/Controls/Button/Button.mux.cs | Update enter/leave overrides and flyout KA propagation to renamed hooks. |
| src/Uno.UI.UnitTests/Windows_UI_Xaml/Given_NameScopeRoot.cs | Add unit tests for the new owner-keyed table root and identity-guard removal. |
| src/Uno.UI.UnitTests/Windows_UI_Xaml/Given_NameScopeOwner.cs | Add unit tests for owner minting, owner-walk behavior, parsing locks, and x:Class root behavior. |
| src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_EnterLeaveWalk.cs | Add runtime canary tests for enter/leave visit counts and depth propagation. |
| src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs | Seed __nameScope.Owner and definition-name marking in generated InitializeComponent bodies. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Given_Parser.cs | Update expected diagnostic spans due to additional emitted lines. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Given_MvvmGeneratedMembers.cs | Update expected diagnostic spans due to additional emitted lines. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Given_ImplicitXamlNamespaces.cs | Update expected diagnostic spans due to additional emitted lines. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Given_Grid.cs | Update expected diagnostic spans due to additional emitted lines. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Xuid/WhXuBa/XamlCodeGenerator_ContentDialog1_7987c32aca55089a14f8c6c711f92359.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_TemplateSettings/WhTeHaNoDeObCo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ResourceDictionary/WhNeWiSiReAnEv/XamlCodeGenerator_RD_WNWSRAE_656341a3c9e6d4b4357d06ec15ae6fce.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ResourceDictionary/TeReDiAsAtPrShSeThPr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_RelativeUri/WhReUrIsRe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_RelativeUri/WhReUrInSe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhVePr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhSkXmNa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhNeSe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhNaIsOnNeEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhMuWiIn/XamlCodeGenerator_ThirdPage_475d8edc4495de5bdb45b5c730a5c2f2.cs | Update generator baseline to include __nameScope.Owner. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhMuWiIn/XamlCodeGenerator_SecondPage_6b0363415e35aa5099bd5c22ab91d5f0.cs | Update generator baseline to include __nameScope.Owner. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhMuWiIn/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhKeAcKePr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInXm/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInRo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInPoVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInObPr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInObNo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInMeNo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInMaVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInGrLeVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInElPr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInDoVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhInCoRaVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhIn/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhEvOnToLeNoDeOb/XamlCodeGenerator_MainWindow_35b16a7cd4c5f6ba316b074a0da7f8d9.cs | Update generator baseline to include __nameScope.Owner for Window content. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhEvHa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser/WhAtDP_InTy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update generator baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoRoEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoReDiNeMeOK/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoImReDiRo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoDaTeRo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0913_xLoDaTeNeMeOK/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhWMC0907_xNaLo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaMuInEnVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaInEnVa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa003/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa002/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa001/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa001_InReSoPr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa001_InReSoMo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.Errors/WhInXaCa001_BiEr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update error baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.ClrNamespace/WhClNaXmUs/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.ClrNamespace/WhClNaXmUn/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.ClrNamespace/WhClNaXmInSc/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Parser.ClrNamespace/WhClNaXmIg/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_NoFuzzyMatching/TeViBoPa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_NoFuzzyMatching/TeTyPrWiXSt/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WOPAE_name/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WOPAE_m_name/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WOPAE__name/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WOPADNE/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WNBOP/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MvvmGeneratedMembers/WBOP/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtensionNameProperty/WhMaExNaOnLaEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtensionNameProperty/WhMaExNaMaViStSeTa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtensionNameProperty/WhElTyHaCoExCl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtension/TeNuMaExInRePr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtension/TeNuMaExInAtPr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtension/TeMaExWiShWiAc/XamlCodeGenerator_MainWindow_35b16a7cd4c5f6ba316b074a0da7f8d9.cs | Update baseline to include __nameScope.Owner for Window content. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtension/TeMaExWiShFrElLo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_MarkupExtension/TeCoAnCoExInSaNa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_LazyLoading/WhLoChHaBi/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_LazyLoading/WhDeLoStNoViSe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_ImplicitXamlNamespaces/WhAmTyInGlNa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoNoSeFoReFrSo/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoTyReDi/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoReTy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoPaLeSt/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoPaLeRe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInOuFoExReDi/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInInOuFoEmDaTe/XamlCodeGenerator_EmptyDataTemplatePage_14a64d66c7071a2b54a8c9a36712e00c.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeOrSoLoInInOuFoDeObThArFrEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HotReloadEnabledInBuild/SeBaUrInInOuFoFrEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HoistedResourceOwner/WhCuMaExInLaReInTe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_HoistedResourceOwner/WhCuMaExInLaRe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Grid/WhGrUsNeSuSy/XamlCodeGenerator_Grid_Uses_New_Succinct_Syntax_0b49a2c98bcf0a7403d6de3124559ba4.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Grid/WhGrUsNeAsCoPrSy/XamlCodeGenerator_Grid_Uses_New_Assigned_ContentProperty_Syntax_b80fca056e1bf6bae00bca0b4dfe18d7.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Grid/WhGrUsCoSy/XamlCodeGenerator_Grid_Uses_Common_Syntax_c1be4430470ec234df472eb5ce9cbaaf.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Grid/WhGrUsBoSy/XamlCodeGenerator_Grid_Uses_Both_Syntaxes_5d0366ecb133af4c31f7d61373b58fb4.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_GenerateEmbeddedXamlSources/EsTrQu/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_GenerateEmbeddedXamlSources/EsNQu/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/WhXaObWiXaObPr/XamlCodeGenerator_Binding_Xaml_Object_With_Xaml_Object_Properties_13ccd64bb03497e9fbd3d015c5d7874a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/WhXaObWiCoPr/XamlCodeGenerator_Binding_Xaml_Object_With_Common_Properties_32c9951cc1e205007e0c313480b9e8bf.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/WhStXBiPrInDaTeWiDaTy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/WhStXBiEvInDaTeWiDaTy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/WhBiElNaInTe/XamlCodeGenerator_Binding_ElementName_In_Template_d9353a41d6883de0ddf51bf7c4e43f1e.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeXBiReXLoEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeTwWa/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeTeInXLoEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeReSoShSy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeReSoFuXmSy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeReSoExSy/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TePaXBiReXLoEl/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeInMe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeInDeFrAn/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeBaTyNoSpInCoBe/XamlCodeGenerator_UserControl1_32e87d7058152b347bbc5c24e16f8b3c.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeBaTyNoSpInCoBe/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Out/Given_Binding/TeAcAr/XamlCodeGenerator_MainPage_0e3f323f9a22a3699cbcd4f0217eee4a.cs | Update baseline to include __nameScope.Owner + definition-name mark. |
Review details
- Files reviewed: 43/143 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
|
morning4coffe-dev
left a comment
There was a problem hiding this comment.
Reviewed 7cf7349a2c3e against its merge base 611bb279f91e, separately from later master changes. I inspected the 43 non-golden-file changes and verified that all 100 changed golden files contain only the owner/definition-name additions. The owner walk, first-owner setup and registration/clearing model were compared with pinned WinUI source d0c6705ec46d.
Two regressions need fixing:
-
The new Enter/Leave test file is included by the native Windows runtime-test project but uses Uno-only implementation details. Compiling that unchanged file against the same official Microsoft.WindowsAppSDK 2.4.0 package produces CS0509 because WinUI Border is sealed, plus missing Uno Enter/Leave type errors. The identical native-reference fixture without the introduced file builds cleanly. These tests need a compile-time Uno guard, not just a runtime platform condition.
-
Splitting registrations between the owner/pending tables and _foreignNames changes which object a name resolves to. A plain object registered after a DependencyObject does not replace it. In the opposite order, once the replacement DependencyObject is collected, an owned scope can expose the overwritten plain object again. The same 30-case compatibility matrix passes 30/30 on base but 25/30 here; seven owner-table controls pass. A reviewer-only copy that retires the superseded entry across the storage paths restores 30/30 and keeps those seven controls passing.
Evidence scope: linked namescope/table code and real GCHandle-backed weak-reference sources, with a small UI/property/logging envelope; native compilation uses real WinUI types with test-orchestration stand-ins. This is not a full visual-tree/runtime-suite or native app execution. The existing native CI build 232791 stopped earlier on NU1902 during restore, so I did not attribute that CI failure to the newly verified compilation defect. No author-branch source or existing thread state was changed.
7cf7349 to
ae8ca69
Compare
|
Claude finished @MartinZikmund's task in 2m 44s —— View job Review complete
Verdict: ship. This push is a direct, well-targeted response to the The four new commits (
Still open, not touched by this push (already reported by other reviewers, non-blocking):
|
🤖 Addressed PR comments up to this point
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24473/wasm-skia-net9/index.html |
|
The build 235460 found UI Test snapshots differences: Details
|
ae8ca69 to
8fcb185
Compare
|
Claude finished @MartinZikmund's task in 3m 11s —— View job Review complete
Verdict: ship — no new findings. This push carries no logic changes. The 87 files in the diff are all under I spot-checked across every category present (
Not new, still open (tracked, non-blocking):
No inline comments were posted since no defect was found in the reviewed diff. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24473/wasm-skia-net9/index.html |
|
The build 236292 found UI Test snapshots differences: Details
|
|
|
UIElement had three same-named Enter/Leave families: EnterImpl(EnterParams, int), EnterImpl(bool live), and DependencyObject's own. The bool arity is the managed-peer hook - its call site says so - so name it for that. This must land before depth moves into EnterParams: once EnterImpl(EnterParams) is one-arg it would be arity-compatible with EnterImpl(bool), and an edit dropping .IsLive would bind to the wrong overload and compile clean. The private EnterImpl() helper in CalendarViewBaseItem's non-enhanced-lifecycle branch is a different member and is deliberately untouched. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
Depth was a second parameter threaded alongside EnterParams through every Enter/EnterImpl override. Fold it into the struct so the walk carries one payload and adding the namescope owner next does not grow the arity again. Behaviour-preserving: every depth-supplying site keeps the value it passed before, including the pre-existing and inconsistent split between int.MinValue (ChildEnter's dead branch, EnterSparseProperties) and literal 0 (VisualTree.AddRoot, Flyout, MenuFlyout, MenuBarItem). Harmonising that split would be a real behaviour change and is deliberately not done here. ChildEnter still computes from the parent's persisted Depth field rather than the incoming @params.Depth, which can be stale after a property, resource or flyout hop. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
…wner DependencyObject.EnterImpl/LeaveImpl become virtual and UIElement's become the overrides, so the walk carries the namescope owner DependencyObject already has. The outer wrappers stay separate and are renamed EnterTree/ LeaveTree: keeping the name would collide with DependencyObject.Enter and force a 'new', reintroducing the hiding pattern. Provably inert: the owner is null on every runtime path today. The one site with a real value in scope, EnterSparseProperties, now forwards pAdjustedNamescopeOwner instead of dropping it - inert until seeding starts, and the first site that will carry a non-null owner. The cast dispatch at UIElement.mux.cs:1242/1833 had to become base., not stay a cast: a cast does not suppress virtual dispatch, so leaving it once DependencyObject.EnterImpl is virtual would recurse into UIElement and stack-overflow on the first attach. MenuFlyout's keyboard-accelerator helper passes null rather than the pNamescopeOwner it already receives, to keep this step free of behaviour change; wiring it is a follow-up. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
The walk has two distinct recursion axes - DP values via EnterProperties and visual children via ChildEnter - which overlap for any element that is both, i.e. ContentControl.Content and Border.Child. These pin the visit counts and the depth propagation so a refactor of the walk cannot change them silently. Verified as genuine, not tautological: temporarily changing ChildEnter to propagate this.Depth instead of this.Depth + 1 turns the depth canary red with Expected:<1> Actual:<0> while the other two stay green. Empty Borders never reach a non-zero size, so these pass an IsLoaded predicate to UITestHelper.Load rather than relying on the default size-based is-loaded check, which would time out. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
FlyoutBase declared 'internal new virtual' Enter/Leave that hid DependencyObject's non-virtual pair, and KeyboardAcceleratorCollection and KeyboardAccelerator did the same with 'internal new'. Now that DependencyObject's Impl pair is virtual, a stray call would silently dispatch a real DependencyObject walk instead of the intended hook. These members were never Enter/Leave overrides in intent - FlyoutBase's own doc comment says it propagates to the flyout's content for keyboard accelerator registration - so name them for what they do. Behaviour delta is zero: every dispatch is unchanged. Note this is NOT turning on a walk that never ran. The DependencyObject walk already runs on flyouts via EnterObjectProperty, which calls Enter on a statically-DependencyObject-typed variable for the ContextFlyout and Button.Flyout DP values. Dropping 'new' instead of renaming would have added a second walk. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
…clear Ports WinUI's namescope model: tables keyed by owner DependencyObject and scope kind, a tagged entry with strong/weak/deferred arms, and a bounded resolution retry so a deferred entry can materialize and be re-read. No callers yet - this is the data model only. Two deliberate divergences from WinUI, both improvements: - Tables hang off a ConditionalWeakTable rather than a raw-pointer map, so a table dies with its owner instead of relying on a destructor contract, and WinUI's bucket compaction is unnecessary. - Unregistration peeks rather than resolves, so leaving the tree cannot materialize deferred content just to answer an unregistration. Entries are weak everywhere for now, byte-identical to today's NameScope. WinUI holds standard entries strongly; that flip is a separate decision with lifetime consequences, and the identity guard - not the reference strength - is what makes unregistration safe. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
Verified red-first: removing the identity guard from ClearNamedObjectIfExists fails When_Duplicate_Name_Loser_Leaves_Winner_Survives with 'the loser must not clear an entry it no longer owns' while the other seven stay green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
WinUI keys every name table on the namescope owner (CDependencyObject's IsStandardNameScopeOwner/IsStandardNameScopeMember bits) and resolves a name by walking to the nearest owner. Port that model: - DependencyObject.NameScoping.mux.cs carries the namescope bitfields and GetStandardNameScopeOwner, the walk from depends.cpp:522-553. - CoreServices.SetNamedObject/GetNamedObject talk to NameScopeRoot. - NameScope becomes WinUI's NameScopeHelper facade: its Owner mints the owner's table, and registrations forward there. Template bodies are built bottom-up, so names registered before the owner is known wait in a pending buffer and flush on Owner. - FrameworkElement.IsParsing drives the ParserOwnsParent lock. - The public root visual becomes a permanent namescope owner. - The XAML generator seeds the owner right after SetNameScope, and marks an x:Class root as possibly carrying a definition name once its own properties are applied. Entries stay weak until Leave unregisters names (step 9). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
- Keep non-DependencyObject x:Name registrations resolvable: INameScope takes any object, and the core tables only hold DependencyObjects. - Stop the ancestor lookup recursing when a scope's owner is the object carrying it. - Take the parser parent lock for a ResourceDictionary too, not just for FrameworkElement. - Ignore a null Owner instead of throwing from a public setter. - Only look up the existing name when the duplicate warning would be logged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
8fcb185 to
d4296c6
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: None
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: None
|
Claude finished @MartinZikmund's task in 1m 26s —— View job Review complete
Verdict: ship — no new findings. This push carries no logic changes. All 87 files in the diff are under I diffed a sample across the categories present (
No core file ( No inline comments were posted since no defect was found in the reviewed diff. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24473/wasm-skia-net9/index.html |
|
The build 237223 found UI Test snapshots differences: Details
|
|
Tick the box to add this pull request to the merge queue (same as
|

GitHub Issue: part of #21129
PR Type:
🔄 Refactoring (no functional changes, no api changes)
What changed? 🚀
First step of the namescope /
x:NameWinUI alignment (spec 058). It builds the data model WinUI resolves names with, without changing how any name resolves yet.WinUI keys every name table on a namescope owner — the
DependencyObjectwhose scope a name belongs to — and resolves a name by walking to the nearest owner (CDependencyObject::GetStandardNameScopeOwnerInternal,depends.cpp:522-553). Uno keyed names on aNameScopeobject reached through an inherited attached property, which is why the same class of "name doesn't resolve" bug has been point-fixed repeatedly.DependencyObject.NameScoping.mux.cscarries the namescope bitfields (IsStandardNameScopeOwner,IsStandardNameScopeMember,ShouldRegisterInParentNamescope,IsTemplateNamescopeMember,ParserOwnsParent) and the owner walk.CoreServicesgains the owner-keyed tables (NameScopeRoot,StandardNameScopeTable,NameScopeTableEntry), with an identity guard so two elements sharing a name can't have the loser's removal evict the winner.NameScopebecomes WinUI'sNameScopeHelper: itsOwnermints the owner's table and registrations forward there. Template bodies are built bottom-up, so names registered before the owner is known wait in a pending buffer and flush onOwner.SetNameScope, and marks anx:Classroot as possibly carrying a definition name once its own properties are applied.FrameworkElement.IsParsing/ResourceDictionary.IsParsingdrive the parser-owns-parent lock; the public root visual becomes a permanent namescope owner.Prerequisite plumbing in the same PR: the
UIElementmanaged-peerEnter/Leavehooks are renamed so the ported walk can use the WinUI names,EnterParamscarries the walk depth, andDependencyObject.EnterImpl/LeaveImplbecome the virtual pairUIElementoverrides — so the walk can carry a namescope owner at all. The owner isnullon every path in this PR; seeding it is the next step.Name registration still happens exactly where it did before (generated code at parse time). Entries are weak for now — they become strong once
Leaveunregisters them, in the follow-up.Validation
Uno.UI.SourceGenerators.Tests: 479/479, identical to the master baseline. 89 golden files regenerated (2 lines each), and five hard-coded diagnostic spans shift by one line because of the emitted__nameScope.Ownerline.Uno.UI.UnitTests: 4180/4192, with only the 12 pre-existing timezone-dependentWhen_Calendarfailures — the same 12 that fail on master.CommandBarFlyout_Leak).PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01QQg2aJi7rAF6SMkTbBL9MS