Closed Bug 688595 Opened 14 years ago Closed 14 years ago

Hide Inspect Element context menu items if not enabled

Categories

(DevTools :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 9

People

(Reporter: rcampbell, Assigned: rcampbell)

Details

Attachments

(1 file)

I noticed the Inspect Element context menu items are not hidden by default and rely on InspectorUI.enabled which breaks in a subsequent patch. I've added a check against the preference in the context menu's showItem code.
Assignee: nobody → rcampbell
Status: NEW → ASSIGNED
Attachment #561861 - Flags: review?(gavin.sharp)
Comment on attachment 561861 [details] [diff] [review] [in-fx-team] inspect menu hiding >diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js >+ document.getElementById("inspect-separator").hidden = false; >+ document.getElementById("context-inspect").hidden = false; Shouldn't need this, since the context menu code runs on every show anyways. >diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js >+ var showInspect = Cc["@mozilla.org/preferences-service;1"] >+ .getService(Ci.nsIPrefService) >+ .QueryInterface(Ci.nsIPrefBranch2) >+ .getBoolPref("devtools.inspector.enabled"); Use gPrefService.getBoolPref() r=me with both of those changes made
Attachment #561861 - Flags: review?(gavin.sharp) → review+
Attachment #561861 - Attachment description: inspect menu hiding → [in-fx-team] inspect menu hiding
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 9
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: