Bug 1296412 - use System.appinfo, not services.js, in inspector; r?bgrins
MozReview-Commit-ID: 8TjHP1GBb1i
--- a/devtools/client/inspector/inspector-search.js
+++ b/devtools/client/inspector/inspector-search.js
@@ -3,19 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const promise = require("promise");
const {Task} = require("devtools/shared/task");
const {KeyCodes} = require("devtools/client/shared/keycodes");
-const system = require("devtools/shared/system");
const EventEmitter = require("devtools/shared/event-emitter");
const {AutocompletePopup} = require("devtools/client/shared/autocomplete-popup");
+const Services = require("Services");
// Maximum number of selector suggestions shown in the panel.
const MAX_SUGGESTIONS = 15;
/**
* Converts any input field into a document search box.
*
* @param {InspectorPanel} inspector
@@ -125,17 +125,17 @@ InspectorSearch.prototype = {
} else {
this.searchClearButton.hidden = false;
this.searchBox.setAttribute("filled", true);
}
if (event.keyCode === KeyCodes.DOM_VK_RETURN) {
this._onSearch(event.shiftKey);
}
- const modifierKey = system.constants.platform === "macosx"
+ const modifierKey = Services.appinfo.OS === "Darwin"
? event.metaKey : event.ctrlKey;
if (event.keyCode === KeyCodes.DOM_VK_G && modifierKey) {
this._onSearch(event.shiftKey);
event.preventDefault();
}
},
/**