Closed
Bug 915570
Opened 11 years ago
Closed 11 years ago
Rename 'keyboard' permission and role
Categories
(Firefox OS Graveyard :: General, defect)
Firefox OS Graveyard
General
Tracking
(blocking-b2g:koi+, firefox26 wontfix, firefox27 wontfix, firefox28 fixed, b2g-v1.2 fixed)
RESOLVED
FIXED
blocking-b2g | koi+ |
People
(Reporter: xyuan, Assigned: timdream)
References
Details
(Whiteboard: [3rd-party-keyboard])
Attachments
(3 files, 2 obsolete files)
I'd like to rename the permission and role of 'keyboard' to 'inputmethod'. Because we may have kind of voice input method without keyboard in the future, 'inputmethod' is more appropriate for input method apps.
I really don't care that strongly, so definitely leave the decision up to you here.
However "input method" doesn't mean a lot to people that hasn't worked with complex scripts, so people in most of the americas and europe.
Maybe "userinput" would be better, or simply "input"?
But again, totally your decision.
Reporter | ||
Comment 2•11 years ago
|
||
"input" sounds good to me and Google chrome extension uses this name as well.
Comment 3•11 years ago
|
||
Yuan, how about moving this bug forward for v1.2?
I guess for this change to land, we need some subtleties here to make Gaia and Gecko synced in order not to break the integration tests.
Can you add support for permission=input (I guess Gecko won't take role into consideration now, right?).
And then I can update Gaia part?
Thank you.
Whiteboard: [3rd-party-keyboard]
Reporter | ||
Comment 4•11 years ago
|
||
OK, I'll be responsible for the gecko changes.
Assignee: nobody → xyuan
Assignee | ||
Comment 5•11 years ago
|
||
Stealing, if all goes well in bug 920977.
Also koi+'ing the bug since we should finalize the permission/role string before 3rd-party developer consumption.
Assignee: xyuan → timdream
Assignee | ||
Updated•11 years ago
|
blocking-b2g: --- → koi+
Assignee | ||
Comment 6•11 years ago
|
||
Should I rename 'inputmethod-manage' permission to 'input-manage' too?
Flags: needinfo?(jonas)
Assignee | ||
Comment 7•11 years ago
|
||
So I changed keyboard to input and inputmethod-manage to input-manage.
I searched codebase with inputmethod-manage, but keyboard is a generic word so I ended locating the strings from bug 838308. I hope this is all we need.
Note that this patch is on top of bug 920977.
Attachment #825174 -
Flags: feedback?(xyuan)
Assignee | ||
Updated•11 years ago
|
Component: Gaia::Keyboard → General
Reporter | ||
Comment 8•11 years ago
|
||
Comment on attachment 825174 [details] [diff] [review]
WIP v1
Review of attachment 825174 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/inputmethod/Keyboard.jsm
@@ +110,5 @@
> return;
> }
>
> + if (!mm.assertPermission("input") ||
> + !mm.assertPermission("input-manage")) {
We only need to check |input| permission here. |assertPermission| will kill the process if the permission is not equal. If the mm doesn't have |input| permission, the process will be killed and has not chance to check |input-manage| permission.
Attachment #825174 -
Flags: feedback?(xyuan)
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Yuan Xulei [:yxl] from comment #8)
> Comment on attachment 825174 [details] [diff] [review]
> WIP v1
>
> Review of attachment 825174 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/inputmethod/Keyboard.jsm
> @@ +110,5 @@
> > return;
> > }
> >
> > + if (!mm.assertPermission("input") ||
> > + !mm.assertPermission("input-manage")) {
>
> We only need to check |input| permission here. |assertPermission| will kill
> the process if the permission is not equal. If the mm doesn't have |input|
> permission, the process will be killed and has not chance to check
> |input-manage| permission.
LOL, I was thinking about *maybe* we would have an app that comes with only input-manage permission but not input permission. How do we test that? Is that necessary in your opinion?
Flags: needinfo?(xyuan)
Assignee | ||
Comment 10•11 years ago
|
||
I duplicate the permissions in the manifest to prevent bustage here.
Both to be tested together manually.
Attachment #825215 -
Flags: feedback?(rlu)
Comment 11•11 years ago
|
||
Comment on attachment 825215 [details]
Gaia patch, to be land *before* Gecko: https://github.com/mozilla-b2g/gaia/pull/13255
Looks good to me.
Thanks.
Attachment #825215 -
Flags: feedback?(rlu) → feedback+
Assignee | ||
Comment 12•11 years ago
|
||
Need to include bug 920831.
Attachment #825174 -
Attachment is obsolete: true
Assignee | ||
Comment 13•11 years ago
|
||
Assignee | ||
Comment 14•11 years ago
|
||
Comment on attachment 825729 [details] [diff] [review]
WIP v2
The patches are ready for review because try passed on Gecko patch and Travis errors are unrelated.
I've also manually tested the patches together.
Attachment #825729 -
Flags: review?(xyuan)
Assignee | ||
Comment 15•11 years ago
|
||
Comment on attachment 825215 [details]
Gaia patch, to be land *before* Gecko: https://github.com/mozilla-b2g/gaia/pull/13255
The patches are ready for review because try passed on Gecko patch and Travis errors are unrelated.
I've also manually tested the patches together.
Attachment #825215 -
Flags: review?(rlu)
Reporter | ||
Comment 16•11 years ago
|
||
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #9)
> (In reply to Yuan Xulei [:yxl] from comment #8)
> > Comment on attachment 825174 [details] [diff] [review]
> > WIP v1
> >
> > Review of attachment 825174 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > ::: dom/inputmethod/Keyboard.jsm
> > @@ +110,5 @@
> > > return;
> > > }
> > >
> > > + if (!mm.assertPermission("input") ||
> > > + !mm.assertPermission("input-manage")) {
> >
> > We only need to check |input| permission here. |assertPermission| will kill
> > the process if the permission is not equal. If the mm doesn't have |input|
> > permission, the process will be killed and has not chance to check
> > |input-manage| permission.
>
> LOL, I was thinking about *maybe* we would have an app that comes with only
> input-manage permission but not input permission. How do we test that? Is
> that necessary in your opinion?
One way I think is separating the messages into two types. One for system app and one for keyboard app. Each type of the message will test against its own permission type.
I perfer to single permission for the system app, but it is an optional improvement, not a requirement.
Comment 17•11 years ago
|
||
Comment on attachment 825215 [details]
Gaia patch, to be land *before* Gecko: https://github.com/mozilla-b2g/gaia/pull/13255
r=me.
Thank you.
Attachment #825215 -
Flags: review?(rlu) → review+
Reporter | ||
Comment 18•11 years ago
|
||
Comment on attachment 825729 [details] [diff] [review]
WIP v2
Review of attachment 825729 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/inputmethod/Keyboard.jsm
@@ +110,5 @@
> return;
> }
>
> + if (!mm.assertPermission("input") ||
> + !mm.assertPermission("input-manage")) {
if |!mm.assertPermission("input")| is false, the process will be killed, and we cannot reach |mm.assertPermission("input-manage")|. So we don't need to check the second permission.
Attachment #825729 -
Flags: review?(xyuan) → review+
Assignee | ||
Comment 19•11 years ago
|
||
Gaia, master: https://github.com/mozilla-b2g/gaia/commit/54f3e81d56061ccfbe59f03472bc3470737b346f
I will push another patch to remove the old permission after Gecko part have landed.
Assignee | ||
Comment 20•11 years ago
|
||
Not flagging checkin-needed until I land the Gaia patch to both master and v1.2.
Assignee | ||
Comment 21•11 years ago
|
||
PS I am waiting for bug 912010 to settle on v1.2 before uplift this patch.
Assignee | ||
Comment 22•11 years ago
|
||
Now I am waiting for bug 931977 and bug 928281. I would like to make sure we have enough tbpl test runs to isolate the breakage (if any of the patches have caused it).
Assignee | ||
Comment 23•11 years ago
|
||
Updated•11 years ago
|
Attachment #825729 -
Attachment is obsolete: true
Comment 24•11 years ago
|
||
Setting status-b2g-v1.2 to affected so I won't forget to uplift this to b2g26 :)
https://hg.mozilla.org/integration/b2g-inbound/rev/2d0ee3cec349
Keywords: checkin-needed
Comment 25•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Comment 26•11 years ago
|
||
Assignee | ||
Comment 27•11 years ago
|
||
Let's push a part 2 on the same bug to remove the old permissions.
Attachment #826264 -
Flags: review?(rlu)
Comment 28•11 years ago
|
||
Comment on attachment 826264 [details]
Github: https://github.com/mozilla-b2g/gaia/pull/13304
r+, thank you.
Attachment #826264 -
Flags: review?(rlu) → review+
Assignee | ||
Comment 29•11 years ago
|
||
Assignee | ||
Comment 30•11 years ago
|
||
I didn't rename test-ime, so here it is:
master: 06b931c937215404d70bd96dfde9a170f26b50e4
v1.2: 99975756a26761e2e7d575211338b0803e0a67f2
Comment 31•11 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•