Repository navigation
fix(composition): Damage a removed subtree where it was last replayed - #25908
MartinZikmund merged 2 commits into
Conversation
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 242684 found UI Test snapshots differences: Details
|
|
|
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
ebe4ef1 to
b295617
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 242859 found UI Test snapshots differences: Details
|
b295617 to
01384b3
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 243336 found UI Test snapshots differences: Details
|
|
@Mergifyio backport release/stable/7.0 |
✅ Backports have been createdDetails
|
01384b3 to
84b7706
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Xiaoy312
left a comment
There was a problem hiding this comment.
The fix looks right for the reported path. The scrolled content's visual moves through AnchorPoint, which goes through the same translation-only invalidation as the Offset the test uses, so the test models the real scroll. Clearing both flags once they're reported is safe: a later re-insert at a new placement damages the new area, and the old one was already damaged at removal.
Two non-blocking notes inline: one on hardening the test, and one on a follow-up for the ancestor case.
|
The build 243697 found UI Test snapshots differences: Details
|
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 243768 found UI Test snapshots differences: Details
|
9d565e0 to
9e2b6c3
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 244086 found UI Test snapshots differences: Details
|
A stable subtree moved by an ancestor (a scrolled page) is replayed from its cached children picture, so its descendants are not walked and keep the bounds they had before the move. Removing it damaged those old bounds only, leaving its pixels on screen. Removal now also damages the replayed area each collapsed subtree tracks. Fixes unoplatform#25478 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The collapsed-subtree test now asserts the scroller's children were replayed from their cached picture (it is the scroller, not the content, that collapses once the scroll moves it), so it can't pass by walking the marker. A sibling test covers the drop-shadow fallback, which replays its own recording of the subtree under a scroll. Both fail without their branch in ContributeRemovalDamage. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
9e2b6c3 to
07b32f5
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 244373 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 #25478
PR Type:
🐞 Bugfix
What changed? 🚀
Navigating away from a page whose
ScrollViewerhad been scrolled left parts of the old page on screen, at their scrolled positions. A full repaint (resize) cleared them.Partial repaint only redraws the reported damage. A stable subtree (enough visuals, unchanged for enough frames) is recorded once into a cached children picture. Scrolling moves that subtree without changing it, so
RenderChildrenStepreplays the cached picture under the new matrix and doesn't walk its descendants. Their_lastRenderBoundstherefore stay at the pre-scroll positions. The subtree root keeps_childrenContentDamageRectup to date on every moved replay, butContributeRemovalDamageonly damaged each visual's own_lastRenderBounds. Removing the page repainted the stale positions and never the area its content actually occupied.ContributeRemovalDamagenow also damages:_childrenContentDamageRect, the area a collapsed subtree was last replayed at;_shadowFallbackDamageRect, the cached shadow recording's area, which is replayed the same way.Like
_lastRenderBounds, both flags are cleared once reported, so a visual inserted elsewhere later starts with no stale rects. The descendants' stale bounds are still damaged as before, which is harmless over-damage.Not covered: a collapsed subtree whose root is an ancestor of the removed visual, moved without being re-walked. Scrolling invalidates the pictures above the scrolled content, so the reported scenario doesn't go through that path.
Validation
Given_Visual_Damage.When_Scrolled_Collapsed_Subtree_Is_Removed_Then_Its_Current_Area_Is_Damaged. It builds root → page → scroller → content (enough visuals to collapse), lets the content collapse, scrolls the scroller by 100px, then removes the page and checks the damage covers the content's current position.masterit fails: the removal damage only covers the pre-scroll positions (around y = 1 and y = 11).Given_Visual_DamageandGiven_CompositionTargeton Skia desktop (Win32): 30 passed, 0 failed, 1 inconclusive (WebGPU-only), 1 skipped (minimized-window case).PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code