Closed
Bug 688595
Opened 14 years ago
Closed 14 years ago
Hide Inspect Element context menu items if not enabled
Categories
(DevTools :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 9
People
(Reporter: rcampbell, Assigned: rcampbell)
Details
Attachments
(1 file)
|
4.19 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
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 | ||
Comment 1•14 years ago
|
||
Comment 2•14 years ago
|
||
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+
| Assignee | ||
Comment 3•14 years ago
|
||
Comment on attachment 561861 [details] [diff] [review]
[in-fx-team] inspect menu hiding
https://hg.mozilla.org/integration/fx-team/rev/7d5311c92e04
Attachment #561861 -
Attachment description: inspect menu hiding → [in-fx-team] inspect menu hiding
| Assignee | ||
Comment 4•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 9
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•