Developer Tools need a central notification system

RESOLVED FIXED

Status

()

Firefox
Developer Tools
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: miker, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 646595 [details]
Layout view updates on every paint event

For reference look at the attachment. All of the green lines are calls to LV_Update(), which is called on every paint event.

Each tool should not be listening e.g. to paint events like this. The more tools we have the worse things will become. It makes much more sense to have a central notifier that will send out notifications to tools that care.

e.g. The style panel is only interested in CSS changes to a specific node. Node centric tools should be able to register to listen to changes to a particular node. Some tools need to listen for mutation events. All tools should have access to a nodeDeleted notification.

I would suggest that we create a central notifier that regularly sends changes to registered tools in order for them to be updated. Tools generally only need the latest event from a batch so we could be quite optimal with this.

Paul may have been working on this. Do we have another bug logged?

Comment 1

6 years ago
I don't have anything really generic.
Less generic work is being done here:
- bug 765573
- bug 723904
- bug 762499

Comment 2

6 years ago
This is what I have been working on for bug 762499:

+const PAGE_EVENTS = [
+  "tabClose",
+  "tabHidden",
+  "tabVisible",
+];
+
+const WINDOW_EVENTS = [
+  "close",
+  "DOMReady",
+  "ready",
+  "DOMNodeUpdate",
+  "DOMTreeUpdate",
+  "resize",
+  "paint",
+  "reflow", // bug 453650
+];
It is a shame that we can't have DOMNodeCSSUpdate but I suppose that would be difficult.

Would you like this closed?

Comment 4

6 years ago
(In reply to Michael Ratcliffe [:miker] [:mratcliffe] from comment #3)
> It is a shame that we can't have DOMNodeCSSUpdate but I suppose that would
> be difficult.
> 
> Would you like this closed?

Keep it open for now.

Updated

6 years ago
Blocks: 782593
This was fixed a while back
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.