Closed Bug 878441 Opened 11 years ago Closed 11 years ago

Add simple mutation watching to the inspector actor

Categories

(DevTools :: Inspector, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 24

People

(Reporter: dcamp, Assigned: dcamp)

References

Details

Attachments

(1 file, 2 obsolete files)

For mutations that don't change the tree, like attributes and text values.
Depends on: 877300
Blocks: 878442
Depends on: 878381
Attached patch v1 (obsolete) (deleted) — Splinter Review
Attachment #757031 - Flags: review?(jwalker)
Comment on attachment 757031 [details] [diff] [review] v1 Review of attachment 757031 [details] [diff] [review]: ----------------------------------------------------------------- I'd like to take another pass when there are docs to make sure I get it properly. ::: toolkit/devtools/server/actors/inspector.js @@ +224,4 @@ > > if (form.parent) { > // Get the owner actor for this actor (the walker), and find the > // parent node of this actor from it, creating a standin node if Nit: stand-in? Avoids people going 'standing? what's a standing node?' @@ +230,5 @@ > this.reparent(parentNodeFront); > } > }, > > + updateMutation: function(change) { I think we need docs here. @@ +1007,5 @@ > + mutations: RetVal("array:dommutation") > + } > + }), > + > + onMutations: function(mutations) { docs?
Attachment #757031 - Flags: review?(jwalker)
Attached patch v2 (obsolete) (deleted) — Splinter Review
Now with better docs.
Attachment #757031 - Attachment is obsolete: true
Attachment #759374 - Flags: review?(jwalker)
Attached patch v3 (deleted) — Splinter Review
Add in some bugfixes that were in the next patch on my queue.
Attachment #759374 - Attachment is obsolete: true
Attachment #759374 - Flags: review?(jwalker)
Attachment #759396 - Flags: review?(jwalker)
Comment on attachment 759396 [details] [diff] [review] v3 Review of attachment 759396 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/devtools/server/actors/inspector.js @@ +226,5 @@ > form: function(form, detail, ctx) { > // Shallow copy of the form. We could just store a reference, but > // eventually we'll want to update some of the data. > this._form = object.merge(form); > + this._form.attrs = this._form.attrs ? this._form.attrs.slice() : []; How confident are you that there are no falsey arrays? I don't think there are any, but I don't know the depths of wtfjs.
Attachment #759396 - Flags: review?(jwalker) → review+
From dherman's Effective JavaScript, "There are exactly seven falsy values: false, 0, -0, "", NaN, null, and undefined. All other values are truthy." An empty array might still == null, but we're good on truthiness.
Assignee: nobody → dcamp
Whiteboard: [fixed-in-fx-team]
No longer depends on: 877300
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 24
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: