Bug 1512289 - Remove webconsole reverse search pref; r=bgrins.

Differential Revision: https://phabricator.services.mozilla.com/D13913

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicolas Chevobbe 2018-12-11 13:01:30 +00:00
parent d776888886
commit 1ee3ef7e09
10 changed files with 5 additions and 32 deletions

View file

@ -277,9 +277,6 @@ pref("devtools.webconsole.sidebarToggle", false);
// Enable CodeMirror in the JsTerm // Enable CodeMirror in the JsTerm
pref("devtools.webconsole.jsterm.codeMirror", true); pref("devtools.webconsole.jsterm.codeMirror", true);
// Enable console input reverse-search everywhere
pref("devtools.webconsole.jsterm.reverse-search", true);
// Disable the new performance recording panel by default // Disable the new performance recording panel by default
pref("devtools.performance.new-panel-enabled", false); pref("devtools.performance.new-panel-enabled", false);

View file

@ -46,7 +46,6 @@ class App extends Component {
serviceContainer: PropTypes.object.isRequired, serviceContainer: PropTypes.object.isRequired,
closeSplitConsole: PropTypes.func.isRequired, closeSplitConsole: PropTypes.func.isRequired,
jstermCodeMirror: PropTypes.bool, jstermCodeMirror: PropTypes.bool,
jstermReverseSearch: PropTypes.bool,
currentReverseSearchEntry: PropTypes.string, currentReverseSearchEntry: PropTypes.string,
reverseSearchInputVisible: PropTypes.bool, reverseSearchInputVisible: PropTypes.bool,
}; };
@ -63,14 +62,11 @@ class App extends Component {
onKeyDown(event) { onKeyDown(event) {
const { const {
dispatch, dispatch,
jstermReverseSearch,
} = this.props; } = this.props;
if ( if (
jstermReverseSearch && ( (!isMacOS && event.key === "F9") ||
(!isMacOS && event.key === "F9") || (isMacOS && event.key === "r" && event.ctrlKey === true)
(isMacOS && event.key === "r" && event.ctrlKey === true)
)
) { ) {
dispatch(actions.reverseSearchInputToggle()); dispatch(actions.reverseSearchInputToggle());
event.stopPropagation(); event.stopPropagation();
@ -199,7 +195,6 @@ class App extends Component {
serviceContainer, serviceContainer,
closeSplitConsole, closeSplitConsole,
jstermCodeMirror, jstermCodeMirror,
jstermReverseSearch,
} = this.props; } = this.props;
const classNames = ["webconsole-output-wrapper"]; const classNames = ["webconsole-output-wrapper"];
@ -245,11 +240,9 @@ class App extends Component {
onPaste: this.onPaste, onPaste: this.onPaste,
codeMirrorEnabled: jstermCodeMirror, codeMirrorEnabled: jstermCodeMirror,
}), }),
jstermReverseSearch ReverseSearchInput({
? ReverseSearchInput({ hud,
hud, })
})
: null
), ),
SideBar({ SideBar({
serviceContainer, serviceContainer,

View file

@ -72,7 +72,6 @@ const prefs = {
// We use the same pref to enable the sidebar on webconsole and browser console. // We use the same pref to enable the sidebar on webconsole and browser console.
SIDEBAR_TOGGLE: "devtools.webconsole.sidebarToggle", SIDEBAR_TOGGLE: "devtools.webconsole.sidebarToggle",
JSTERM_CODE_MIRROR: "devtools.webconsole.jsterm.codeMirror", JSTERM_CODE_MIRROR: "devtools.webconsole.jsterm.codeMirror",
JSTERM_REVERSE_SEARCH: "devtools.webconsole.jsterm.reverse-search",
}, },
}, },
}; };

View file

@ -49,7 +49,6 @@ function configureStore(hud, options = {}) {
|| Math.max(getIntPref("devtools.hud.loglimit"), 1); || Math.max(getIntPref("devtools.hud.loglimit"), 1);
const sidebarToggle = getBoolPref(PREFS.FEATURES.SIDEBAR_TOGGLE); const sidebarToggle = getBoolPref(PREFS.FEATURES.SIDEBAR_TOGGLE);
const jstermCodeMirror = getBoolPref(PREFS.FEATURES.JSTERM_CODE_MIRROR); const jstermCodeMirror = getBoolPref(PREFS.FEATURES.JSTERM_CODE_MIRROR);
const jstermReverseSearch = getBoolPref(PREFS.FEATURES.JSTERM_REVERSE_SEARCH);
const historyCount = getIntPref(PREFS.UI.INPUT_HISTORY_COUNT); const historyCount = getIntPref(PREFS.UI.INPUT_HISTORY_COUNT);
const initialState = { const initialState = {
@ -57,7 +56,6 @@ function configureStore(hud, options = {}) {
logLimit, logLimit,
sidebarToggle, sidebarToggle,
jstermCodeMirror, jstermCodeMirror,
jstermReverseSearch,
historyCount, historyCount,
}), }),
filters: FilterState({ filters: FilterState({

View file

@ -25,7 +25,6 @@ pref("devtools.webconsole.persistlog", false);
pref("devtools.webconsole.timestampMessages", false); pref("devtools.webconsole.timestampMessages", false);
pref("devtools.webconsole.sidebarToggle", true); pref("devtools.webconsole.sidebarToggle", true);
pref("devtools.webconsole.jsterm.codeMirror", true); pref("devtools.webconsole.jsterm.codeMirror", true);
pref("devtools.webconsole.jsterm.reverse-search", true);
global.loader = { global.loader = {
lazyServiceGetter: () => {}, lazyServiceGetter: () => {},

View file

@ -10,9 +10,6 @@ const TEST_URI = `data:text/html,<meta charset=utf8>Test reverse search`;
const isMacOS = AppConstants.platform === "macosx"; const isMacOS = AppConstants.platform === "macosx";
add_task(async function() { add_task(async function() {
// Force reverse search on.
await pushPref("devtools.webconsole.jsterm.reverse-search", true);
const hud = await openNewTabAndConsole(TEST_URI); const hud = await openNewTabAndConsole(TEST_URI);
const jstermHistory = [ const jstermHistory = [

View file

@ -10,9 +10,6 @@ const TEST_URI = `data:text/html,<meta charset=utf8>Test reverse search`;
const isMacOS = AppConstants.platform === "macosx"; const isMacOS = AppConstants.platform === "macosx";
add_task(async function() { add_task(async function() {
// Force reverse search on.
await pushPref("devtools.webconsole.jsterm.reverse-search", true);
const hud = await openNewTabAndConsole(TEST_URI); const hud = await openNewTabAndConsole(TEST_URI);
const jstermHistory = [ const jstermHistory = [

View file

@ -9,9 +9,6 @@
const TEST_URI = `data:text/html,<meta charset=utf8>Test reverse search`; const TEST_URI = `data:text/html,<meta charset=utf8>Test reverse search`;
add_task(async function() { add_task(async function() {
// Force reverse search on.
await pushPref("devtools.webconsole.jsterm.reverse-search", true);
const hud = await openNewTabAndConsole(TEST_URI); const hud = await openNewTabAndConsole(TEST_URI);
const jstermHistory = [ const jstermHistory = [

View file

@ -10,9 +10,6 @@ const TEST_URI = `data:text/html,<meta charset=utf8>Test reverse search toggle`;
const isMacOS = AppConstants.platform === "macosx"; const isMacOS = AppConstants.platform === "macosx";
add_task(async function() { add_task(async function() {
// Force reverse search on.
await pushPref("devtools.webconsole.jsterm.reverse-search", true);
const hud = await openNewTabAndConsole(TEST_URI); const hud = await openNewTabAndConsole(TEST_URI);
info("Close the reverse search UI with ESC"); info("Close the reverse search UI with ESC");

View file

@ -263,7 +263,6 @@ WebConsoleOutputWrapper.prototype = {
closeSplitConsole: this.closeSplitConsole.bind(this), closeSplitConsole: this.closeSplitConsole.bind(this),
jstermCodeMirror: prefs.jstermCodeMirror jstermCodeMirror: prefs.jstermCodeMirror
&& !Services.appinfo.accessibilityEnabled, && !Services.appinfo.accessibilityEnabled,
jstermReverseSearch: prefs.jstermReverseSearch,
}); });
// Render the root Application component. // Render the root Application component.