Repository navigation
fix: Measurement logic for native elements - #21957
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the measurement logic for native macOS elements in the Skia runtime. Previously, the code incorrectly retrieved dimensions from the first subview's frame, which didn't align with how other platforms handle native element measurement. The new implementation establishes a fallback hierarchy: it prioritizes availableWidth/availableHeight, then falls back to childWidth/childHeight, and finally to the element's bounds.size when other values are unavailable or invalid.
Key Changes:
- Replaced subview-based measurement with a parameter-based resolution strategy
- Added finite value checks using
isfinite()to handle infinite/NaN dimensions - Implemented fallback to element bounds when resolved dimensions are invalid
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21957/wasm-skia-net9/index.html |
|
|
|
The build 184972 found UI Test snapshots differences: Details
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21957/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21957/docs/index.html |
|
The build 185359 found UI Test snapshots differences: Details
|
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21957/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21957/wasm-skia-net9/index.html |
|
The build 185987 found UI Test snapshots differences: Details
|
GitHub Issue: closes #21810
PR Type:
What is the current behavior? 🤔
Screen.Recording.2025-11-23.at.17.01.35.mov
What is the new behavior? 🚀
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other Info
https://github.com/user-attachments/files/23690767/UnoWeb.zip