Repository navigation
fix: webview findInPage() hang when the embedder page has an iframe - #54508
Merged
Merged
Conversation
Calling findInPage() on a <webview> whose embedder page also contains an <iframe> never emitted found-in-page and left the main process spinning in FindRequestManager::Traverse(). The sibling lookup there returned the webview's outer delegate frame where the rest of the traversal expects the guest's main frame, so the walk cycled through the embedder's frames without reaching the guest. Patch the traversal to derive siblings from the ancestor's children and add a spec that wraps past the last match with an embedder iframe present.
Trim the two function comments to one sentence each and note in the patch description that the backward walk has the same cycle when the iframe follows the guest. No code lines change.
MarshallOfSound
approved these changes
Sep 29, 2026
VerteDinde
approved these changes
Sep 29, 2026
|
Release Notes Persisted
|
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #54584 |
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #54585 |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #54586 |
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.
Description of Change
Fixes #54199
Calling
findInPage()on a<webview>never emittedfound-in-pageand pinned the main process at 100% CPU when the embedder page also had an<iframe>. Chromium's find-in-page frame walk treats a webview's placeholder frame inconsistently: child and parent lookups swap in the guest's main frame, while sibling lookups return the placeholder itself. From the iframe the walk stepped onto the placeholder, could not continue, wrapped back to the embedder's main frame and repeated forever without reaching the guest.This adds a Chromium patch that takes siblings from the same child list the other lookups use, upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/8470272. The new webview spec adds an iframe to the embedder before the webview and steps find past the last match.
Checklist
npm testpassesRelease Notes
Notes: Fixed
webview.findInPage()hanging when the host page also has an iframe.