Reorganize observer modules and simplify watching for created/closed browser windows
Categories
(Remote Protocol :: Agent, task, P1)
Tracking
(firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
Details
(Whiteboard: [puppeteer-beta-mvp])
Attachments
(3 files, 2 obsolete files)
Before I want to start working on bug 1593226 I would like to see this refactoring landed, which makes the code easier to understand and follow.
Here the notable proposed changes:
- Move all observer modules into the /remote/observers folder
- Simplify handling of XUL/DOMWindows, and remove the extra not-needed WindowObserver
- Rename TabTarget to PageTarget and TabSession to PageSession to align with CDP
Assignee | ||
Comment 1•5 years ago
|
||
To better keep track of available observer classes
it's better to have them all in the same folder.
While moving files around the patch also renames
the TabObserver module to TargetObserver, which
would allow us to add target observers for workers
in the future.
Assignee | ||
Comment 2•5 years ago
|
||
The changes align our code to other instances of nsIWindowMediatorListener
usage in-tree, which always rely on the "load" event. Also "interactive"
isn't a ready state a XULWindow can ever be in, it's only used for content
windows.
Assignee | ||
Comment 3•5 years ago
|
||
The WindowObserver class is only used by the TabObserver, and as such
can easily be integrated transparently. This also removes the extra
events as being emitted for opening and closing XUL windows.
Assignee | ||
Comment 4•5 years ago
|
||
Within CDP there is no tab target, but a page target. The patch
renames our TabTarget class appropriately for an easier understanding
of our code.
Assignee | ||
Comment 5•5 years ago
|
||
Within CDP there is no tab session, but a page session. The patch
renames our TabSession class appropriately for an easier understanding
of our code.
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 7•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/804e863ee8d0
https://hg.mozilla.org/mozilla-central/rev/1da9a1cbc272
https://hg.mozilla.org/mozilla-central/rev/2ea167bead02
Assignee | ||
Updated•5 years ago
|
Description
•