Closed Bug 1605359 Opened 5 years ago Closed 5 years ago

Page.getFrameTree has to return details for all frames in the current tab

Categories

(Remote Protocol :: CDP, enhancement, P1)

enhancement

Tracking

(firefox77 fixed)

RESOLVED FIXED
Firefox 77
Tracking Status
firefox77 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Depends on 1 open bug, Blocks 5 open bugs)

Details

(Whiteboard: [puppeteer-beta-mvp])

Attachments

(1 file)

Right now we simply return a list of frames that gets constructed each time when Page.getFrameTree gets called. This is totally inefficient, and we should make it dynamic. Means it might have to handle the Page.frameAttached (bug 1599413) and Page.frameDetached (bug 1599773) events.

As Andreas mentioned to me maybe the browsing context class already has such a feature which we would only have to iterate over. It's worth a check.

But this is all Fission related.

Note that the current implementation also lives on the content side of Page.jsm. It would have to be moved to domains/parent/Page.jsm.

Blocks: 1605362

To properly implement Page.frameAttached and Page.frameDetached I need an implementation of a frame tree class. As such we need this bug in our MVP, and bug 1601421 is moved to the backlog.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: P3 → P1
Whiteboard: [puppeteer-beta-reserve] → [puppeteer-beta-mvp]
Blocks: 1601695
Blocks: 1623482

The dynamic handling of frames is actually implemented in Puppeteer, and that's not needed here. What we have to do is to return all the frames for the current tab, including nested and x-origin ones. This can easily be done now that we have the browsing context tree.

Summary: Page.getFrameTree should dynamically handle attaching and detaching of frames → Page.getFrameTree has to return details for all frames in the current tab
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c3221bde9f2a [remote] Page.getFrameTree has to return details for all frames in the current tab. r=remote-protocol-reviewers,maja_zf
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 77
Blocks: 1605499
Component: CDP: Page → CDP
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: