Skip to content

Commit 7945d35

Browse files
committed
docs(snapshot): name the sibling-frame limit of the chrome exemption
1 parent fed0d73 commit 7945d35

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

‎packages/capture-kit/src/snapshot-occlusion.ts‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -284,17 +284,20 @@ function isOverlayLikeNode(
284284
}
285285

286286
/**
287-
* A chrome container published with exactly the frame of a sibling reports that sibling's footprint
288-
* rather than a surface drawn over it: such a container is a host that paints nothing itself, and
289-
* everything it really draws is a descendant with its own smaller rect that this scan judges on its
290-
* own. `isFullViewportChromeContainer` reaches this verdict only for a container sized to the
291-
* viewport root, so a container stopping short of it condemned content on both sides — a bottom-bar
292-
* container matching the 812pt content branch beside it marked that branch's 36 nodes and the bar's
293-
* own navigation bar, and a tab-bar badge container matching the platter content view beside it
294-
* marked every tab (#2996).
287+
* Exempt a viewport-chrome container whose frame equals a listed sibling's. UIKit sizes a bar
288+
* container to the branch it presents over, so in the captured shapes a sibling-matching frame is
289+
* that branch's footprint, not a surface drawn on top of it; what the container really draws is its
290+
* descendants, each with its own rect the scan judges on its own (#2996).
295291
*
296-
* Only the chrome kinds qualify: a `dialog`/`sheet`/`alert` sized to the content around it is a real
297-
* presentation over that content and keeps covering.
292+
* Two captures carry the shape: a system app's bar container matching the 812pt content branch beside
293+
* it marked that branch's 36 nodes plus the navigation bar listed with it, and a tab-bar badge
294+
* container matching the platter content view beside it marked every tab. `isFullViewportChromeContainer`
295+
* reaches the same verdict only against the viewport root, which such a container stops short of.
296+
*
297+
* Accepted limit: a snapshot publishes geometry and kind only, so the predicate cannot tell a
298+
* pass-through host from an opaque bar of the same frame, and chrome siblings that share one frame
299+
* excuse each other. Both captures show the match only where content was being refused, and the kind
300+
* gate keeps a `dialog`/`sheet`/`alert` sized to the content around it covering.
298301
*/
299302
// Mutation-lane note: the `typeof parentIndex` and `!rect` guards below are provably
300303
// redundant — with no parent index the sibling lookup finds nothing and answers "not

0 commit comments

Comments
 (0)