Skip to content

Conversation

@dipeshmsft
Copy link
Member

Addresses #4834
This is a port of a servicing fix in .NET 4.7-4.8.

Description

This hang arises when UseLayoutRounding is set, and the container's top margin is not a multiple of the rounding quantum. VSP uses two offsets from the viewport to the container, one that includes the margin and one that doesn't. It was computing the second and subtracting the margin to obtain the first, but that can give the wrong answer in the situation above. This can lead to infinite re-measures in anchored scrolls.

Fixed by computing the first offset directly from layout information. The two offsets will differ by an amount that is close to the margin size, and rounded to a quantum, but there's no way to know which of the nearby candidates is the right one.

Customer Impact

Hang while scrolling an ItemsControl.

Regression

no

Testing

Ad-hoc around customer scenario.
Standard regression testing.

Risk

Low. Port of a .NETFx servicing fix released earlier this year.

@dipeshmsft dipeshmsft requested a review from a team as a code owner January 27, 2022 11:26
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jan 27, 2022
@ghost ghost requested review from SamBent, fabiant3 and ryalanms January 27, 2022 11:26
@leecow leecow added this to the 5.0.15 milestone Feb 3, 2022
@dipeshmsft dipeshmsft merged commit 3291314 into dotnet:release/5.0 Feb 7, 2022
@dipeshmsft dipeshmsft deleted the pr5841 branch March 14, 2022 02:27
@ghost ghost locked as resolved and limited conversation to collaborators Apr 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

PR metadata: Label to tag PRs, to facilitate with triage Servicing-approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants