Fix ContentIsland-hosted content rendering at reduced size on scaled displays - #16383
Open
Collin Schneide (FaithfulAudio) wants to merge 1 commit into
Open
Conversation
The child site reports ShouldApplyRasterizationScale = false, meaning the host owns applying the island rasterization scale at presentation. The placement visual lives in the physical-pixel composition tree unscaled, so hosted content laid out in DIPs and rasterized at RasterizationScale presented at 1x: on a 200% display, islands rendered at exactly half size in the top-left of their frame. Scale the placement visual by pointScaleFactor; at 100% display scale this is an identity transform.
Collin Schneide (FaithfulAudio)
requested a review
from a team
as a code owner
August 20, 2026 23:48
Contributor
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes undersized ContentIsland content on scaled displays by applying the display scale to its placement visual.
Changes:
- Applies
pointScaleFactorbefore connecting the island. - Documents the scaling rationale and observed behavior.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+85
to
+86
| const float placementScale = m_layoutMetrics.pointScaleFactor; | ||
| placementVisual.Scale({placementScale, placementScale, 1.0f}); |
|
|
||
| ChildSiteLink().ActualSize({m_layoutMetrics.frame.size.width, m_layoutMetrics.frame.size.height}); | ||
|
|
||
| // The child site reports ShouldApplyRasterizationScale = false: the host is |
Copilot started reviewing on behalf of
Collin Schneide (FaithfulAudio)
August 21, 2026 00:18
View session
|
|
||
| ChildSiteLink().ActualSize({m_layoutMetrics.frame.size.width, m_layoutMetrics.frame.size.height}); | ||
|
|
||
| // The child site reports ShouldApplyRasterizationScale = false: the host is |
There was a problem hiding this comment.
Please prefer putting long descriptions like this into the PR description. Having such long bug explanation comments inside of the code reduces the code readability.
If comment is needed, then it should be relatively short and be useful for understanding code later outside of the PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Content hosted through
ContentIslandComponentView(XAML islands viaChildSiteLink, e.g. a WebView2) renders at reduced size in the top-left of its frame on any display above 100% scale. At 200% it is exactly half size. The content is otherwise healthy — laid out at the right DIP size and rasterized at the right scale — it is only presented unscaled.Root cause
Measured live from a production RNW 0.83.2 new-architecture app on a 200% display, by logging the child site's state at
ConnectInternal:ShouldApplyRasterizationScale = falsemeans the host owns applying the island's rasterization scale at presentation. But the placementContainerVisualpassed toChildSiteLink::Createsits in RNW's physical-pixel composition tree with no scale, so island content lays out at DIP size (1368×728), rasterizes at 2×, and presents at 1× — half size on screen.Two other candidate fixes were tried first and eliminated on device:
LocalToParentTransformMatrix— visually inert; that matrix maps coordinates for input/popup placement (issue Pop-ups of Xaml controls need positioning and dismissal #15557), not visual presentation.OverrideScaleviaIContentSite—ChildSiteLinkdoes not answer that QI.Fix
Scale the placement visual by
pointScaleFactorbefore connecting. Content then lays out at DIP size, rasterizes at scale, and presents at scale — full-size and pixel-sharp (raster scale matches presentation scale 1:1, so no resampling blur).At 100% display scale this is
Scale(1,1,1)— an identity transform — so configurations already covered by CI are provably unaffected; the change only takes effect where the bug reproduces.Validation
Applied to the 0.83.2 package sources in a production app (WebView2-hosted maplibre basemap inside the island):
maincarries the identical placement code at both transform sites, so the defect is live on current heads.Happy to adjust if you'd prefer the scale applied elsewhere in the island bring-up (e.g. tracked against
DidRasterizationScaleChangefor monitor moves — the current change covers the initial connect, which is where the constant-scale case breaks).Microsoft Reviewers: Open in CodeFlow