DOM panel / light colors

91 views
Skip to first unread message

Benjamin Andre

unread,
Sep 7, 2013, 2:13:09 PM9/7/13
to fir...@googlegroups.com

Hi,

I found the meaning of the colors, but no explanation on why the colors of dom property value is sometimes "light".

For exemple, you can see here that the property "clientWidth" is light blue, whereas "hidden" is normal blue.

Any idea ?

(this is important, this difference is the only one I found between a case that works and another cas that doesn't work... :-)





Sebastian Zartner

unread,
Sep 7, 2013, 7:21:47 PM9/7/13
to fir...@googlegroups.com
Hmm, spontaneously I'd say that's a bug. Do you have a URL and steps, so this can be reproduced?

Sebastian

Benjamin Andre

unread,
Sep 8, 2013, 3:01:30 AM9/8/13
to fir...@googlegroups.com
I made different tries and I realized that "light colors" appears only if you look at the dom while debugging.
It is then quite difficult to export and html file with the pb :-)

No, realy, I don't understand the meaning of these colors... If all properties were light it might indicates that ... the node is "fresh" ?? (joke)

Simon Lindholm

unread,
Sep 8, 2013, 12:55:08 PM9/8/13
to fir...@googlegroups.com
I *think* they might indicate that the property is readonly (has getter but no setter), and that the difference between debugging and not is whether the objects we deal with are wrapped or not (see http://code.google.com/p/fbug/issues/detail?id=5377 ).

Benjamin ANDRE

unread,
Sep 8, 2013, 4:19:40 PM9/8/13
to fir...@googlegroups.com
hum, I like the read only theory, but why when not in debugging does the color become strong again ?
Maybe your second point explain this, but I don't understand what a "wrapped object" is in this context...



2013/9/8 Simon Lindholm <simon.li...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Firebug" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebug/86xqlONxY6E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebug+u...@googlegroups.com.
To post to this group, send email to fir...@googlegroups.com.
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebug/3f1f8dcf-bbf1-4db1-a088-fdcd83cf074e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Sebastian Zartner

unread,
Sep 9, 2013, 6:11:09 AM9/9/13
to fir...@googlegroups.com

Simon seems to be right with his assumption that the pale color indicates properties that are read-only. Here are the related code lines:

https://github.com/firebug/firebug/blob/master/extension/content/firebug/dom/domMemberProvider.js#L344
https://github.com/firebug/firebug/blob/master/extension/skin/classic/dom.css#L18

I added a sentence to the DOM panel reflecting that.

Though I wonder why they are not displayed in pale color for me within the DOM side panel:

That may be the bug here, because inside the main DOM panel the properties are displayed in light color. Simon, what do you think?

Sebastian

Simon Lindholm

unread,
Sep 9, 2013, 2:47:55 PM9/9/13
to fir...@googlegroups.com
Yeah, I'm pretty sure it's a bug (related to that issue I linked).

Wrapped objects are a technical term, related to privileged JavaScript in Firefox. I suppose you could google "spidermonkey wrappers" to get further information, but to simplify it a wrapper (at least, of this kind) is like a shadow version of a DOM object, that behaves subtly differently, and attempts to make it "nicer" to work with. (It is implicitly converted to a non-wrapper when passed back to non-privileged JavaScript.)

Benjamin ANDRE

unread,
Sep 9, 2013, 4:52:59 PM9/9/13
to fir...@googlegroups.com
thank you for the complete explanations, it was not easy to find : a bug in firebug... difficult to imagine ;-)
well done to both of you !
2013/9/9 Simon Lindholm <simon.li...@gmail.com>
Reply all
Reply to author
Forward
0 new messages