Repository navigation
feat: add webFrameMain.findInFrame/stopFindInFrame - #28274
deepak1556 wants to merge 4 commits into
Conversation
samuelmaddock
left a comment
There was a problem hiding this comment.
It would be great if the WebContents.findInPage/stopFindInPage could be replaced with this new implementation. ie. just calling webContents.mainFrame.findInFrame internally.
nornagon
left a comment
There was a problem hiding this comment.
marking request changes until we have more info on upstreaming.
They are different in behavior, hence I haven't replaced them. |
4e03413 to
1fb38c7
Compare
1fb38c7 to
81b15cb
Compare
|
@deepak1556 @rzhao271 Thanks for looking into this. I just tried it out for VS Code but one difference I noticed compared to search inside Any ideas on if that's something this API could change or if we can workaround this? |
* Get subframes directly rather than from main frame * Add parent frame check
|
@deepak1556 are you still interested in landing this? If so, how do WebContents.findInPage and WebFrameMain.findInFrame interact with one another? Could we possibly consolidate these two systems into one by having WebFrameMain.findInFrame recurse into webviews that are hosted in subframes of the target frame? |
|
Sorry for the delay in getting back to this PR
Originally I was not sure about merging them #28274 (comment) mainly because the
What is your take on the patch ? Unfortunately, I couldn't get any traction on the upstream issue https://bugs.chromium.org/p/chromium/issues/detail?id=1189789, so this will end up being an electron only patch if the API were to be supported. |
It's not a crazy huge patch and it does add a legitimately useful feature which is sort of Electron-specific. It's a bit of a niche feature and it's likely to run into at least some code shear, so I'm not enthusiastic about it, but begrudgingly willing to take it. It would probably be worth spending some time thinking about whether we can reduce the surface area of the patch. Can we do some subclassing instead? Can we apply the filtering at a different point? Any thoughts? |
The filtering in this case has to be performed at I will first update the branch against main since the current patch is outdated and will check if there is a possibility to minimize it. |
|
@deepak1556 is this PR still live? |
|
There is need to upstream the frame find implementation but don't have cycles to visit this anytime soon. Closing for now. |
Description of Change
Refs microsoft/vscode#96307
An app switching from
<webview>to use OOPIF cannot use the current find functionality exposed onelectron::api::WebContents::Findas it will initiate search from the top-level WebContents. The new api allows users to target a particular frame where the search has to be initiated from.Checklist
npm testpassesRelease Notes
Notes: Added webFramMain.findInFrame/stopFindInFrame