diff --git a/browser/devtools/highlighter/inspector.jsm b/browser/devtools/highlighter/inspector.jsm index b10e92225d30..151074d60419 100644 --- a/browser/devtools/highlighter/inspector.jsm +++ b/browser/devtools/highlighter/inspector.jsm @@ -448,16 +448,15 @@ InspectorUI.prototype = { this.win = this.browser.contentWindow; this.winID = this.getWindowID(this.win); this.toolbar = this.chromeDoc.getElementById("inspector-toolbar"); - this.inspectCommand = this.chromeDoc.getElementById("Inspector:Inspect"); - - // Update menus: - this.inspectorUICommand = this.chromeDoc.getElementById("Tools:Inspect"); - this.inspectorUICommand.setAttribute("checked", "true"); + this.inspectMenuitem = this.chromeDoc.getElementById("Tools:Inspect"); + this.inspectToolbutton = + this.chromeDoc.getElementById("inspector-inspect-toolbutton"); this.chromeWin.Tilt.setup(); this.treePanel = new TreePanel(this.chromeWin, this); this.toolbar.hidden = false; + this.inspectMenuitem.setAttribute("checked", true); // initialize the HTML Breadcrumbs this.breadcrumbs = new HTMLBreadcrumbs(this); @@ -650,8 +649,7 @@ InspectorUI.prototype = { if (!aKeepInspector) this.store.deleteInspector(this.winID); - this.inspectorUICommand.setAttribute("checked", "false"); - + this.inspectMenuitem.removeAttribute("checked"); this.browser = this.win = null; // null out references to browser and window this.winID = null; this.selection = null; @@ -660,8 +658,6 @@ InspectorUI.prototype = { delete this.treePanel; delete this.stylePanel; - delete this.inspectorUICommand; - delete this.inspectCommand; delete this.toolbar; Services.obs.notifyObservers(null, INSPECTOR_NOTIFICATIONS.CLOSED, null); @@ -681,7 +677,7 @@ InspectorUI.prototype = { if (this.treePanel && this.treePanel.editingContext) this.treePanel.closeEditor(); - this.inspectCommand.setAttribute("checked", "true"); + this.inspectToolbutton.checked = true; this.inspecting = true; this.highlighter.unlock(); @@ -706,7 +702,7 @@ InspectorUI.prototype = { return; } - this.inspectCommand.setAttribute("checked", "false"); + this.inspectToolbutton.checked = false; this.inspecting = false; if (this.highlighter.getNode()) { diff --git a/browser/themes/gnomestripe/browser.css b/browser/themes/gnomestripe/browser.css index 3b60a7978ad4..9e3ac2dbb016 100644 --- a/browser/themes/gnomestripe/browser.css +++ b/browser/themes/gnomestripe/browser.css @@ -1966,7 +1966,7 @@ panel[dimmed="true"] { -moz-image-region: rect(0px 16px 16px 0px); } -#inspector-inspect-toolbutton[checked=true] { +#inspector-inspect-toolbutton[checked] { -moz-image-region: rect(0px 32px 16px 16px); } diff --git a/browser/themes/gnomestripe/devtools/common.css b/browser/themes/gnomestripe/devtools/common.css index 4ab6a1a5f446..35373e4082e9 100644 --- a/browser/themes/gnomestripe/devtools/common.css +++ b/browser/themes/gnomestripe/devtools/common.css @@ -37,25 +37,25 @@ min-width: 32px; } -.devtools-toolbarbutton:not([checked=true]):hover:active { +.devtools-toolbarbutton:not([checked]):hover:active { border-color: hsla(210,8%,5%,.6); background: -moz-linear-gradient(hsla(220,6%,10%,.3), hsla(212,7%,57%,.15) 65%, hsla(212,7%,57%,.3)); box-shadow: 0 0 3px hsla(210,8%,5%,.25) inset, 0 1px 3px hsla(210,8%,5%,.25) inset, 0 1px 0 hsla(210,16%,76%,.15); } .devtools-menulist[open=true], -.devtools-toolbarbutton[checked=true] { +.devtools-toolbarbutton[checked] { color: hsl(208,100%,60%) !important; border-color: hsla(210,8%,5%,.6) !important; background: -moz-linear-gradient(hsla(220,6%,10%,.6), hsla(210,11%,18%,.45) 75%, hsla(210,11%,30%,.4)); box-shadow: 0 1px 3px hsla(210,8%,5%,.25) inset, 0 1px 3px hsla(210,8%,5%,.25) inset, 0 1px 0 hsla(210,16%,76%,.15); } -.devtools-toolbarbutton[checked=true]:hover { +.devtools-toolbarbutton[checked]:hover { background-color: transparent !important; } -.devtools-toolbarbutton[checked=true]:hover:active { +.devtools-toolbarbutton[checked]:hover:active { background-color: hsla(210,8%,5%,.2) !important; } diff --git a/browser/themes/pinstripe/browser.css b/browser/themes/pinstripe/browser.css index 02bf83937132..56870290d226 100644 --- a/browser/themes/pinstripe/browser.css +++ b/browser/themes/pinstripe/browser.css @@ -2695,7 +2695,7 @@ panel[dimmed="true"] { -moz-image-region: rect(0px 16px 16px 0px); } -#inspector-inspect-toolbutton[checked=true] { +#inspector-inspect-toolbutton[checked] { -moz-image-region: rect(0px 32px 16px 16px); } @@ -2779,7 +2779,6 @@ html|*#highlighter-nodeinfobar-pseudo-classes { padding: 0; width: 26px; min-height: 26px; - background-color: transparent; } #highlighter-nodeinfobar-inspectbutton { diff --git a/browser/themes/pinstripe/devtools/common.css b/browser/themes/pinstripe/devtools/common.css index 051eebe51f89..adef611121c0 100644 --- a/browser/themes/pinstripe/devtools/common.css +++ b/browser/themes/pinstripe/devtools/common.css @@ -46,21 +46,21 @@ min-width: 32px; } -.devtools-toolbarbutton:not([checked=true]):hover:active { +.devtools-toolbarbutton:not([checked]):hover:active { border-color: hsla(210,8%,5%,.6); background: -moz-linear-gradient(hsla(220,6%,10%,.3), hsla(212,7%,57%,.15) 65%, hsla(212,7%,57%,.3)); box-shadow: 0 0 3px hsla(210,8%,5%,.25) inset, 0 1px 3px hsla(210,8%,5%,.25) inset, 0 1px 0 hsla(210,16%,76%,.15); } .devtools-menulist[open=true], -.devtools-toolbarbutton[checked=true] { +.devtools-toolbarbutton[checked] { color: hsl(208,100%,60%) !important; border-color: hsla(210,8%,5%,.6); background: -moz-linear-gradient(hsla(220,6%,10%,.6), hsla(210,11%,18%,.45) 75%, hsla(210,11%,30%,.4)); box-shadow: 0 1px 3px hsla(210,8%,5%,.25) inset, 0 1px 3px hsla(210,8%,5%,.25) inset, 0 1px 0 hsla(210,16%,76%,.15); } -.devtools-toolbarbutton[checked=true]:hover:active { +.devtools-toolbarbutton[checked]:hover:active { background-color: hsla(210,8%,5%,.2); } diff --git a/browser/themes/winstripe/browser.css b/browser/themes/winstripe/browser.css index d5263d6a93ae..3c006daf3739 100644 --- a/browser/themes/winstripe/browser.css +++ b/browser/themes/winstripe/browser.css @@ -2631,7 +2631,7 @@ panel[dimmed="true"] { -moz-image-region: rect(0px 16px 16px 0px); } -#inspector-inspect-toolbutton[checked=true] { +#inspector-inspect-toolbutton[checked] { -moz-image-region: rect(0px 32px 16px 16px); } @@ -2702,7 +2702,6 @@ html|*#highlighter-nodeinfobar-pseudo-classes { padding: 0; width: 26px; min-height: 26px; - background-color: transparent; } #highlighter-nodeinfobar-inspectbutton { diff --git a/browser/themes/winstripe/devtools/common.css b/browser/themes/winstripe/devtools/common.css index 427bd237dc64..db3cea594880 100644 --- a/browser/themes/winstripe/devtools/common.css +++ b/browser/themes/winstripe/devtools/common.css @@ -42,21 +42,21 @@ min-width: 32px; } -.devtools-toolbarbutton:not([checked=true]):hover:active { +.devtools-toolbarbutton:not([checked]):hover:active { background-color: hsla(210,18%,9%,.1); background-image: -moz-linear-gradient(hsla(209,13%,54%,.35), hsla(209,13%,54%,.1) 85%, hsla(209,13%,54%,.2)); box-shadow: 0 1px 3px hsla(211,68%,6%,.5) inset, 0 0 0 1px hsla(209,29%,72%,.1), 0 1px 0 hsla(210,16%,76%,.1); } .devtools-menulist[open=true], -.devtools-toolbarbutton[checked=true] { +.devtools-toolbarbutton[checked] { border-color: hsla(211,68%,6%,.6); background: -moz-linear-gradient(hsla(211,68%,6%,.1), hsla(211,68%,6%,.2)); box-shadow: 0 1px 3px hsla(211,68%,6%,.5) inset, 0 0 0 1px hsla(209,29%,72%,.1), 0 1px 0 hsla(210,16%,76%,.1); color: hsl(200,100%,60%) !important; } -.devtools-toolbarbutton[checked=true]:hover:active { +.devtools-toolbarbutton[checked]:hover:active { background-color: hsla(211,68%,6%,.2); }