@@ -84,6 +84,7 @@ import {
8484 buildShellRotationTransform ,
8585 clampPan ,
8686 clampZoom ,
87+ computeChromeBackingRect ,
8788 computeChromeScreenBorderRadius ,
8889 computeChromeScreenRect ,
8990 normalizeQuarterTurns ,
@@ -149,6 +150,7 @@ const STREAM_TRANSPORT_VALUES = new Set<StreamTransport>([
149150 "webrtc" ,
150151] ) ;
151152const MOBILE_VIEWPORT_MEDIA_QUERY = "(max-width: 600px)" ;
153+ const CHROME_RENDERER_ASSET_VERSION = "chrome-renderer-watch-bezel-inset-22" ;
152154clearLegacyVolatileUiState ( ) ;
153155
154156interface StreamQualityResponse {
@@ -231,6 +233,10 @@ function buildChromeProfileAssetStamp(profile: ChromeProfile | null): string {
231233 profile . screenY ,
232234 profile . screenWidth ,
233235 profile . screenHeight ,
236+ profile . contentX ,
237+ profile . contentY ,
238+ profile . contentWidth ,
239+ profile . contentHeight ,
234240 profile . cornerRadius ,
235241 ]
236242 . map ( chromeStampNumber )
@@ -981,6 +987,7 @@ export function AppShell({
981987 selectedSimulator ?. runtimeName ,
982988 selectedSimulator ?. udid ,
983989 chromeGeometryStamp ,
990+ CHROME_RENDERER_ASSET_VERSION ,
984991 chromeHasInteractiveButtons ? "baked-buttons" : "no-buttons" ,
985992 chromeHasCrown ? "crown" : "no-crown" ,
986993 ]
@@ -1755,10 +1762,17 @@ export function AppShell({
17551762 viewportChromeProfile ,
17561763 effectiveDeviceNaturalSize ,
17571764 ) ;
1765+ const chromeScreenBackingRect = computeChromeBackingRect (
1766+ viewportChromeProfile ,
1767+ ) ;
17581768 const chromeScreenBorderRadius = computeChromeScreenBorderRadius (
17591769 viewportChromeProfile ,
17601770 chromeScreenRect ,
17611771 ) ;
1772+ const chromeScreenBackingBorderRadius = computeChromeScreenBorderRadius (
1773+ viewportChromeProfile ,
1774+ chromeScreenBackingRect ,
1775+ ) ;
17621776 const chromeScreenStyle =
17631777 viewportChromeProfile && chromeScreenRect
17641778 ? ( {
@@ -1788,6 +1802,16 @@ export function AppShell({
17881802 : { } ) ,
17891803 } satisfies CSSProperties )
17901804 : null ;
1805+ const chromeScreenBackingStyle =
1806+ viewportChromeProfile && chromeScreenBackingRect
1807+ ? ( {
1808+ left : `${ ( chromeScreenBackingRect . x / viewportChromeProfile . totalWidth ) * 100 } %` ,
1809+ top : `${ ( chromeScreenBackingRect . y / viewportChromeProfile . totalHeight ) * 100 } %` ,
1810+ width : `${ ( chromeScreenBackingRect . width / viewportChromeProfile . totalWidth ) * 100 } %` ,
1811+ height : `${ ( chromeScreenBackingRect . height / viewportChromeProfile . totalHeight ) * 100 } %` ,
1812+ borderRadius : chromeScreenBackingBorderRadius ?? "0" ,
1813+ } satisfies CSSProperties )
1814+ : null ;
17911815 const screenOnlyStyle =
17921816 ! viewportChromeProfile && chromeProfile && chromeProfile . screenWidth > 0
17931817 ? isAndroidViewport
@@ -2804,6 +2828,7 @@ export function AppShell({
28042828 chromeProfile = { viewportChromeProfile }
28052829 chromeRequired = { chromeRequired }
28062830 chromeButtonsRenderedInChrome = { chromeButtonsRenderedInChrome }
2831+ chromeScreenBackingStyle = { chromeScreenBackingStyle }
28072832 chromeScreenStyle = { viewportScreenStyle }
28082833 chromeUrl = { chromeUrl }
28092834 chromeButtonUrl = { chromeButtonUrl }
0 commit comments