stylesheets manager does not notify about already registered stylesheets
Categories
(DevTools :: Style Editor, defect, P3)
Tracking
(firefox111 fixed)
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
Attachments
(2 files)
Spotted while working on https://phabricator.services.mozilla.com/D166311
If anything on the server side already triggered the registration of a stylesheet on the stylesheets manager, before the client is watching for stylesheets resources, the manager will not emit the existing stylesheets as resources.
STRs to force the issue:
- in devtools/server/actors/targets/window-global.js update ensureCSSErrorReportingEnabled in order to register all stylesheets on the stylesheets manager
- run the test at devtools/client/webconsole/test/browser/browser_webconsole_location_styleeditor_link.js
In this test, we have a few CSS warnings which will trigger an early registration of the stylesheets, which means that the stylesheet manager will skip emitting the corresponding events when startWatching is called.
We should try to force emitting the events for already registered stylesheets.
Assignee | ||
Comment 1•1 year ago
|
||
Depends on D167098
This is normally not triggered by any scenario with the current DevTools but there is no reason actors should not be allowed to use the stylesheet-manager
unless a client has started it.
Assignee | ||
Comment 2•1 year ago
|
||
Depends on D167164
I was hoping to remove this noop watcher thanks to the previous patch, but we have to keep it.
Updated the comment to highlight the main reason why the watchResources call is needed here.
Alternatively, instead of a no-op here, we could either
- cache the stylesheet resources in the inspector front and remove getResourceById on resourceCommand
- or automatically watch stylesheets
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9338af8dc025 [devtools] Notify about already registered stylesheets in stylesheets-manager r=devtools-reviewers,ochameau https://hg.mozilla.org/integration/autoland/rev/e2f8224674a4 [devtools] Update comment about noop watcher for stylesheets r=devtools-reviewers,ochameau
Comment 4•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9338af8dc025
https://hg.mozilla.org/mozilla-central/rev/e2f8224674a4
Description
•