Closed
Bug 1350151
Opened 8 years ago
Closed 7 years ago
Add support for isHandlingUserInput to webextensions schemas
Categories
(WebExtensions :: Frontend, enhancement, P1)
WebExtensions
Frontend
Tracking
(firefox55 affected, firefox56 fixed)
RESOLVED
FIXED
mozilla56
People
(Reporter: aswan, Assigned: aswan)
References
(Blocks 1 open bug)
Details
(Whiteboard: triaged)
Attachments
(3 files)
There are several webextensions APIs that may only be called immediately from an event handler for a user initiated action (e.g., a mouse click or key press). We don't want to repeat code for the checking for these methods, lets support this with an appropriate annotation in the schema.
Also, permissions.request() is about to land with code that checks directly, it should be converted to use this facility as part of this bug.
Comment 1•7 years ago
|
||
Note that downloads.open() will have the same check in it once bug 1369782 lands.
Updated•7 years ago
|
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8890198 -
Flags: review?(kmaglione+bmo)
Attachment #8890199 -
Flags: review?(kmaglione+bmo)
Attachment #8890200 -
Flags: review?(mstriemer)
Attachment #8890200 -
Flags: review?(kmaglione+bmo)
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8890198 [details]
Bug 1350151 Part 1: Add requireUserInput property for functions in webextension schemas
https://reviewboard.mozilla.org/r/161274/#review168442
::: toolkit/components/extensions/test/xpcshell/test_ext_schemas_interactive.js:43
(Diff revision 1)
> +function setHandlingUserInput(extension) {
> + let extensionChild = ExtensionManager.extensions.get(extension.extension.id);
> + let bgwin = null;
> + for (let view of extensionChild.views) {
> + if (view.viewType == "background") {
> + bgwin = view.contentWindow;
Nit: `break`
Attachment #8890198 -
Flags: review?(kmaglione+bmo) → review+
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8890199 [details]
Bug 1350151 Part 2: Use requireUserInput for permissions.request()
https://reviewboard.mozilla.org/r/161276/#review168446
Attachment #8890199 -
Flags: review?(kmaglione+bmo) → review+
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8890200 [details]
Bug 1350151 Part 3: Use requireUserInput for downloads.open()
https://reviewboard.mozilla.org/r/161278/#review168448
Attachment #8890200 -
Flags: review?(kmaglione+bmo) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 11•7 years ago
|
||
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.
hg error in cmd: hg rebase -s 053773205398 -d 241d6d2bc109: rebasing 410746:053773205398 "Bug 1350151 Part 1: Add requireUserInput property for functions in webextension schemas r=kmag"
merging toolkit/components/extensions/ExtensionCommon.jsm
merging toolkit/components/extensions/Schemas.jsm
merging toolkit/components/extensions/test/xpcshell/xpcshell.ini
warning: conflicts while merging toolkit/components/extensions/Schemas.jsm! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 15•7 years ago
|
||
Pushed by aswan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1cf8b34f618e
Part 1: Add requireUserInput property for functions in webextension schemas r=kmag
https://hg.mozilla.org/integration/autoland/rev/3facbb92e28b
Part 2: Use requireUserInput for permissions.request() r=kmag
https://hg.mozilla.org/integration/autoland/rev/86ed29aded32
Part 3: Use requireUserInput for downloads.open() r=kmag
Comment 16•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1cf8b34f618e
https://hg.mozilla.org/mozilla-central/rev/3facbb92e28b
https://hg.mozilla.org/mozilla-central/rev/86ed29aded32
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•7 years ago
|
Attachment #8890200 -
Flags: review?(mstriemer)
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•