-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework how TextBlock skips redundant measure and arrange calls #17271
Rework how TextBlock skips redundant measure and arrange calls #17271
Conversation
…Avalonia into fixes/textBlockMeasureArrange
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…Avalonia into fixes/textBlockMeasureArrange
You can test this PR using the following package version. |
* Rework how TextBlock skips redundant measure and arrange calls Add some tests * Adjust tests * Try this * Make sure the TextBlock is arranged after it has been measured with a different availableSize * Make it more clear that we are resetting and recreating the TextLayout * Capture textLayout after inlines have been processed
@Gillibald FYI since this PR I am getting crashes on Stack -
|
We need to cover this in a unit tests that sets the FontSize to NaN |
So you know how to repro this? If not I can try make something or capture process dump if it helps |
@Gillibald if it helps, it seems like the control is not even attached to visual tree. |
…niaUI#17271) * Rework how TextBlock skips redundant measure and arrange calls Add some tests * Adjust tests * Try this * Make sure the TextBlock is arranged after it has been measured with a different availableSize * Make it more clear that we are resetting and recreating the TextLayout * Capture textLayout after inlines have been processed
What does the pull request do?
This PR attempts to improve the logic that skips the creation of new TextLayouts when Measure or Arrange is called.
Previously we only tested for smaller widths. This PR tests for changes to the constraining size in general.
What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues