Repository navigation
fix(binding): Always apply animation and setter values - #24601
Conversation
|
Claude finished @MartinZikmund's task in 4m 42s —— View job Review complete ✅
Verdict: ship (fix is sound, well-tested; only minor non-blocking notes below) The fix is narrow and well-targeted: it makes Test coverage is solid: the new Findings posted inline (2, both non-blocking):
No correctness, security, or cross-platform concerns found. No breaking changes, no new warnings anticipated from the diff. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24601/wasm-skia-net9/index.html |
|
Claude finished @MartinZikmund's task in 3m 7s —— View job Review complete ✅
Verdict: ship (non-blocking nits only) This review covers the full PR, including the newest commit ( The core fix in New findings (2, both non-blocking, same category as a nit already flagged in the prior pass on this PR):
Carried over from the earlier review pass (still open, not re-posted to avoid duplicate threads): the perf note on No correctness, security, async/cancellation, or cross-platform concerns found. No breaking changes, no new warnings anticipated. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24601/wasm-skia-net9/index.html |
|
The build 235264 found UI Test snapshots differences: Details
|
A VisualState setter (or storyboard target) sets through BindingPath.Value, which skipped the write whenever the new value was reference-equal to the property's effective value. When that effective value came from a lower precedence, e.g. inheritance, the Animations slot stayed empty. The setter then silently lost to later inherited changes and did not count as "set" for anything that checks precedence. For the editable ComboBox (and NumberBox) Focused state in a dark theme, this happened on re-entering Focused. Leaving the state unfreezes ContentElement back to the shared Dark text brush, which is the same instance TextControlForegroundFocused resolves to. The Foreground setter was skipped, so the following RequestedTheme=Light setter saw a default Foreground and froze the Light default text brush (#E4000000) over the text display block. On WASM, the a11y focus sync blurs and refocuses the TextBox on every Focus() call once accessibility is enabled. That made the #24021 regression tests fail whenever a Given_Accessible* test ran earlier in the same shard. Animation items now always write, like WinUI, where VisualStateSetterHelper calls SetAnimatedValue unconditionally and CModifiedValue::SetAnimatedValue clears the local-newer flag. Property-changed callbacks are still gated on the effective value changing, so equal writes stay silent. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01WHHcu5U9N25wvKGNFCrpJm
- A VisualState setter whose value is the very brush the target inherits must keep winning after the inherited value changes. - An editable ComboBox focused, blurred and refocused in a dark theme keeps light text. This is the round trip the WASM a11y focus sync forces on every Focus() call. - A storyboard restarted after a newer local value must retake precedence, even though its animated slot already holds the same value. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01WHHcu5U9N25wvKGNFCrpJm
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01WHHcu5U9N25wvKGNFCrpJm
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
4ae7a66 to
4d7d323
Compare
|
Claude finished @MartinZikmund's task in 1m 35s —— View job Review complete ✅
Verdict: ship This pass reviewed the full PR as of the latest commit ( Re-verified the core fix independently this pass:
No new inline findings. The one item still open from the prior passes — the non-blocking perf note on |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24601/wasm-skia-net9/index.html |
|
The build 235424 found UI Test snapshots differences: Details
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
GitHub Issue: closes #24600
PR Type:
🐞 Bugfix
What changed? 🚀
BindingPath.Valueskipped the write when the new value equalled the property's current effective value. For VisualState setters and animations (the_forAnimationsbinding path), that's wrong in two ways:Foregroundsetter's brush equals the inherited Dark brush, so it isn't stored, and the state'sRequestedTheme=Lightthen freezes the Light default text brush (dark text on a dark background).WinUI stores setter and animation values unconditionally:
VisualStateSetterHelper→SetAnimatedValue, which always stores the value and clears that flag. Animation-mode writes now never skip. Property-changed callbacks are still gated on the effective value actually changing, so equal writes stay silent.Why it showed up as a flaky test: on WebAssembly with accessibility enabled, focusing a TextBox bounces focus (Focused → Normal → Focused within one call), which hits case 1 on every focus.
Given_ElementTheme.When_Editable_ComboBox_Focused_In_Dark_Theme_Text_Is_Lightand…Without_Theme_Walk_Text_Is_Lightfailed in WASM shard 1 in 12 of the last 30 master builds, because earlierGiven_Accessible*tests leave accessibility on for the rest of the shard. The CI retry passes because it starts a fresh app. The bug itself isn't WASM-specific: focus, focus elsewhere, focus again reproduces it on any Skia head.A first version compared against the value already stored at animation precedence instead. Review showed that breaks case 2 (a Storyboard re-begun after a local value was set kept showing the local value), so that approach was dropped and the new
Given_Storyboardtest guards against it.Validation
Runtime, all tests below:
When_Editable_ComboBox_Refocused_In_Dark_Theme_Text_Is_Lightfails,When_Setter_Value_Equals_Inherited_Value_Setter_Still_Winsfails,When_Begin_Again_After_Local_Value_Animated_Value_Winspasses (regression guard)Given_VisualStateManagersuites, the animation suites (Given_Storyboard,Given_DoubleAnimation,Given_DoubleAnimationUsingKeyFrames,Given_ObjectAnimationUsingKeyFrames,Given_ColorAnimationUsingKeyFrames,Given_TemplateBindingAfterAnimation,Given_ThemeAnimation) and the editable-ComboBox testsThe setter and Storyboard tests have no
PlatformCondition, so they also run against native WinUI.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01WHHcu5U9N25wvKGNFCrpJm