Skip to content

Instantly share code, notes, and snippets.

@smellman
Created February 20, 2011 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smellman/836087 to your computer and use it in GitHub Desktop.
Save smellman/836087 to your computer and use it in GitHub Desktop.
DOM Inspector support personas
diff --git a/chrome/content/inspector/inspector.xml b/chrome/content/inspector/inspector.xml
index 1504132..241fdd4 100644
--- a/chrome/content/inspector/inspector.xml
+++ b/chrome/content/inspector/inspector.xml
@@ -891,4 +891,23 @@
</binding>
+ <binding id="root-element">
+ <implementation>
+ <field name="_lightweightTheme">null</field>
+ <constructor><![CDATA[
+ if (this.hasAttribute("lightweightthemes")) {
+ let temp = {};
+ Components.utils.import("resource://gre/modules/LightweightThemeConsumer.jsm", temp);
+ this._lightweightTheme = new temp.LightweightThemeConsumer(this.ownerDocument);
+ }
+ ]]></constructor>
+ <destructor><![CDATA[
+ if (this._lightweightTheme) {
+ this._lightweightTheme.destroy();
+ this._lightweightTheme = null;
+ }
+ ]]></destructor>
+ </implementation>
+ </binding>
+
</bindings>
diff --git a/chrome/content/inspector/inspector.xul b/chrome/content/inspector/inspector.xul
index 977990b..28ccac0 100644
--- a/chrome/content/inspector/inspector.xul
+++ b/chrome/content/inspector/inspector.xul
@@ -55,7 +55,8 @@
<window id="winInspectorMain" title="&Inspector.title;"
width="640" height="480"
persist="screenX screenY width height sizemode"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ lightweightthemes="true">
<stringbundleset id="stringbundleset">
<stringbundle id="inspector-bundle"
diff --git a/chrome/inspector.jar b/chrome/inspector.jar
index a102566..b39626f 100644
Binary files a/chrome/inspector.jar and b/chrome/inspector.jar differ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment