-
Notifications
You must be signed in to change notification settings - Fork 788
fix(nativeelementhosting): default to zero when given infinite bounds on measuring #20574
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
base: master
Are you sure you want to change the base?
fix(nativeelementhosting): default to zero when given infinite bounds on measuring #20574
Conversation
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20574/docs/index.html |
@@ -153,7 +153,16 @@ partial void DetachNativeElement(object content) | |||
private Size MeasureNativeElement(Size childMeasuredSize, Size availableSize) | |||
{ | |||
global::System.Diagnostics.Debug.Assert(IsNativeHost); | |||
return _nativeElementHostingExtension.Value!.MeasureNativeElement(Content, childMeasuredSize, availableSize); | |||
var ret = _nativeElementHostingExtension.Value!.MeasureNativeElement(Content, childMeasuredSize, availableSize); | |||
if (ret.Width is double.PositiveInfinity or double.NaN) |
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.
Let's add a test for this, both manual and automated
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.
I added a runtime test but I'm not sure what to do for a manual test.
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.
For a manual test, since we can't screenshot the result, you can have different scenarios (grid, stackpanel, explicit height, explicit width, etc...) so that the tester can see the results on screen.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20574/wasm-skia-net9/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20574/docs/index.html |
|
GitHub Issue (If applicable): https://github.com/unoplatform/uno-private/issues/1349
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Internal Issue (If applicable):