mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 915570 - Rename 'keyboard' permission and role to 'input'. r=yxl
This commit is contained in:
parent
dbf6c1e67e
commit
185ed6b3c2
@ -282,12 +282,12 @@ this.PermissionsTable = { geolocation: {
|
||||
privileged: DENY_ACTION,
|
||||
certified: ALLOW_ACTION
|
||||
},
|
||||
"keyboard": {
|
||||
"input": {
|
||||
app: DENY_ACTION,
|
||||
privileged: ALLOW_ACTION,
|
||||
certified: ALLOW_ACTION
|
||||
},
|
||||
"inputmethod-manage": {
|
||||
"input-manage": {
|
||||
app: DENY_ACTION,
|
||||
privileged: DENY_ACTION,
|
||||
certified: ALLOW_ACTION
|
||||
|
@ -1833,7 +1833,7 @@ bool Navigator::HasInputMethodSupport(JSContext* /* unused */,
|
||||
nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal);
|
||||
return Preferences::GetBool("dom.mozInputMethod.testing", false) ||
|
||||
(Preferences::GetBool("dom.mozInputMethod.enabled", false) &&
|
||||
win && CheckPermission(win, "keyboard"));
|
||||
win && CheckPermission(win, "input"));
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -196,7 +196,7 @@ function BrowserElementParent(frameLoader, hasRemoteFrame) {
|
||||
|
||||
let principal = this._frameElement.ownerDocument.nodePrincipal;
|
||||
let perm = Services.perms
|
||||
.testExactPermissionFromPrincipal(principal, "inputmethod-manage");
|
||||
.testExactPermissionFromPrincipal(principal, "input-manage");
|
||||
if (perm === Ci.nsIPermissionManager.ALLOW_ACTION) {
|
||||
defineMethod('setInputMethodActive', this._setInputMethodActive);
|
||||
}
|
||||
|
@ -12,13 +12,13 @@ browserElementTestHelpers.addPermission();
|
||||
function setup() {
|
||||
SpecialPowers.setBoolPref("dom.mozInputMethod.enabled", true);
|
||||
SpecialPowers.setBoolPref("dom.mozInputMethod.testing", true);
|
||||
SpecialPowers.addPermission('inputmethod-manage', true, document);
|
||||
SpecialPowers.addPermission('input-manage', true, document);
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
SpecialPowers.setBoolPref("dom.mozInputMethod.enabled", false);
|
||||
SpecialPowers.setBoolPref("dom.mozInputMethod.testing", false);
|
||||
SpecialPowers.removePermission("inputmethod-manage", document);
|
||||
SpecialPowers.removePermission("input-manage", document);
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ this.Keyboard = {
|
||||
|
||||
receiveMessage: function keyboardReceiveMessage(msg) {
|
||||
// If we get a 'Keyboard:XXX' message, check that the sender has the
|
||||
// keyboard permission.
|
||||
// input permission.
|
||||
if (msg.name.indexOf("Keyboard:") != -1) {
|
||||
if (!this.messageManager) {
|
||||
return;
|
||||
@ -110,9 +110,9 @@ this.Keyboard = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mm.assertPermission("keyboard")) {
|
||||
if (!mm.assertPermission("input")) {
|
||||
dump("Keyboard message " + msg.name +
|
||||
" from a content process with no 'keyboard' privileges.");
|
||||
" from a content process with no 'input' privileges.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ MozKeyboard.prototype = {
|
||||
let principal = win.document.nodePrincipal;
|
||||
// Limited the deprecated mozKeyboard API to certified apps only
|
||||
let perm = Services.perms.testExactPermissionFromPrincipal(principal,
|
||||
"inputmethod-manage");
|
||||
"input-manage");
|
||||
if (perm != Ci.nsIPermissionManager.ALLOW_ACTION) {
|
||||
dump("No permission to use the keyboard API for " +
|
||||
principal.origin + "\n");
|
||||
|
@ -18,13 +18,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=920977
|
||||
<script type="application/javascript;version=1.8">
|
||||
var gData = [
|
||||
{
|
||||
perm: ["keyboard"],
|
||||
perm: ["input"],
|
||||
obj: "mozInputMethod",
|
||||
webidl: "MozInputMethod",
|
||||
settings: [["dom.mozInputMethod.enabled", true]],
|
||||
},
|
||||
{
|
||||
perm: ["inputmethod-manage"],
|
||||
perm: ["input-manage"],
|
||||
obj: "mozKeyboard",
|
||||
idl: "nsIB2GKeyboard",
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user