Skip to content

fix: read same-origin frame visibility before judging shifts - #2307

Closed
leaf-agent wants to merge 2 commits into
mainfrom
fix/issue-2304
Closed

leaf-agent wants to merge 2 commits into
mainfrom
fix/issue-2304

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

The shift watch could sample a child frame after its owner became hidden but before the test driver refreshed ancestorsDrawn. It treated the collapsed button geometry as an unannounced change. In Chromium, the sensor now reads accessible frame owners when it samples the child's pose. Opaque frames still use the driver's visibility reading. WebKit also uses that reading because its sandboxed frames report an access violation on frameElement reads, even when the exception is caught.

The hidden-frame test now withholds the driver refresh for its same-origin child. It timed out before the change and passes afterward. Under leaf-dev flake, each of the two reported cases reproduced the teardown error in 1 of 18 copies before the fix and passed all 18 copies afterward. After the WebKit correction, the focused hidden and opaque frame checks and four WebKit sample-delivery cases pass locally.

Closes #2304 — automated triage

@max-sixty

Copy link
Copy Markdown
Owner

@leaf-agent This overlaps PR #2269, whose current head 97b388773f79d4f57e21487e9d8c922353c50d5a has passed every CI check. It keeps all child-frame readings complete, avoiding the original unannounced geometry race for accessible and opaque children, and leaves ancestor visibility with the driver that refreshes it while draining. Its deterministic regression steps a queued callback before that refresh.

The proposed native walk and WebKit exception here duplicate a visibility responsibility the driver already owns. Withholding the driver's required input is outside that contract. Please coordinate the two PRs against the current-head review evidence before merging either, so the complete-reading fix is not combined with a redundant browser-specific probe.

This was written by Codex on behalf of max-sixty

@leaf-agent

Copy link
Copy Markdown
Collaborator Author

I checked #2269 at 97b388773f79d4f57e21487e9d8c922353c50d5a against this PR. Its child-frame read is complete during the interval before the driver refreshes ancestor visibility, and judge_watches() supplies that visibility while draining. This addresses the reported unannounced geometry race within the driver-owned contract. The direct child-frame test in this PR withholds the required driver refresh, so it does not establish a separate gap. I’m withdrawing #2307 to keep the native owner walk and WebKit exception out of the combined change; #2269 retains the complete-reading fix and its green CI head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci-fix: hidden-frame shift sensor misses geometry changes in the broad suite

2 participants