Skip to content

fix(page): wake navigation when a loading frame detaches - #672

Open
oleksii-leonov wants to merge 1 commit into
rubycdp:mainfrom
oleksii-leonov:fix/idle-after-frame-detach
Open

oleksii-leonov wants to merge 1 commit into
rubycdp:mainfrom
oleksii-leonov:fix/idle-after-frame-detach

Conversation

@oleksii-leonov

Copy link
Copy Markdown

Chromium's out-of-process PDF viewer (PdfOopif) can finish the main PDF document before swapping out its still-loading iframe, without sending frameStoppedLoading for that child. Removing the frame without signaling idle leaves the click waiting until the navigation timeout.

PdfOopif became the default on Windows/macOS/Linux in Chromium 145: https://chromium-review.googlesource.com/c/chromium/src/+/7239572

With unfixed Ferrum, Linux Chrome-for-Testing 145.0.7570.0 passes and 145.0.7571.0 times out. The first Linux stable 145 release, 145.0.7632.45, also times out. Each boundary case was checked three times.

This is feature-dependent, not limited to a browser version: enabling PdfOopif reproduces the same failure on Chrome 139 and 144; disabling it makes Chrome 145 pass. Feature controls preserve Ferrum's other defaults. The fix passes on Chrome 139 with PdfOopif enabled and both affected 145 builds above, three times each.

Recheck the existing idle predicate after removing a detached child. Keep main-frame detachment unchanged and continue waiting for loading frames or a main execution context that has been cleared.

Add an inline-PDF POST regression using the existing PDF fixture, plus deterministic CDP regressions for swap/removal and premature completion. The PDF and both child-detachment cases fail before the fix.

Validation on Chromium 155.0.8059.39: 683 examples, zero failures, four environment-dependent skips. Another 104 examples pass on Chrome 139. Full RuboCop and changed-line/branch coverage pass. RBS validation reports the same missing dependency types on unchanged upstream d7a9902; no method signatures or dependencies change here.

Chromium's out-of-process PDF viewer (PdfOopif) can finish the main
PDF document before swapping out its still-loading iframe, without
sending frameStoppedLoading for that child. Removing the frame without
signaling idle leaves the click waiting until the navigation timeout.

PdfOopif became the default on Windows/macOS/Linux in Chromium 145:
https://chromium-review.googlesource.com/c/chromium/src/+/7239572

With unfixed Ferrum, Linux Chrome-for-Testing 145.0.7570.0 passes and
145.0.7571.0 times out. The first Linux stable 145 release, 145.0.7632.45,
also times out. Each boundary case was checked three times.

This is feature-dependent, not limited to a browser version: enabling
PdfOopif reproduces the same failure on Chrome 139 and 144; disabling it
makes Chrome 145 pass. Feature controls preserve Ferrum's other defaults.
The fix passes on Chrome 139 with PdfOopif enabled and both affected 145
builds above, three times each.

Recheck the existing idle predicate after removing a detached child. Keep
main-frame detachment unchanged and continue waiting for loading frames
or a main execution context that has been cleared.

Add an inline-PDF POST regression using the existing PDF fixture, plus
deterministic CDP regressions for swap/removal and premature completion.
The PDF and both child-detachment cases fail before the fix.

Validation on Chromium 155.0.8059.39: 683 examples, zero failures, four
environment-dependent skips. Another 104 examples pass on Chrome 139.
Full RuboCop and changed-line/branch coverage pass. RBS validation reports
the same missing dependency types on unchanged upstream d7a9902; no method
signatures or dependencies change here.
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.

1 participant