By creating our Sandbox under the system principal and giving it privileged XHR.
Bonus: no more `wrappedJSObject` required because sandbox code and actor code
are at the same privilege level now.
Fixes#3176
- Set min-width and min-height to width and height so buttons never shrink
- Remove defunct .zotero-clicky-* styles from 2x block in zotero.css
- Include zotero-platform/content/zotero.css in searchDialog.xhtml
- It seems only the defunct 2x styles from zotero.css were being applied, so
the buttons would have been unstyled on a non-hiDPI display
When you uninstall a plugin through the UI, XPIInstall:
1. Sets the plugin's `pendingUninstall` to true
2. Calls our onUninstalling() method
3. Waits for the Add-ons window to be closed
4. Actually uninstalls the plugin
5. Calls our onUninstalled() method
If you undo the uninstallation between steps 2 and 3, the remaining steps
instead look like:
3. Sets the plugin's `pendingUninstall` to false
4. Calls our onOperationCancelled() method
This commit changes our implementation of the bootstrapped plugin lifecycle so
that the shutdown and uninstall hooks are called from onUninstalling() (step 2).
If you close the Add-ons window without undoing, nothing more happens. The
plugin remains uninstalled. If you undo before closing, though, we call the
plugin's lifestyle hooks just as if it had been newly installed (unless it was
disabled before uninstallation, in which case we call install but not startup).
This mirrors the behavior of Firefox WebExtensions and makes things work more
like you'd expect: uninstalling a plugin immediately deactivates it, and undoing
activates it again.
- Fix mistaken reference to event.target (instead of currentTarget) in sync
function
- Move sync functions to fields for easier debugging - can't set a breakpoint
inside an inner function in the Firefox debugger
Fixes#3142
- Use locale directories for JSON files, since that's where the
Transifex client will interact with them
- Skip non-locale directories (e.g., don't create an .ftl file for
.DS_Store)
- Other minor simplification
- Switch to Mozilla's Timer.jsm for timer functions in XPCOM scope
- Add setInterval/clearInterval/requestIdleCallback/cancelIdleCallback
- Add all timer functions to plugins sandbox
Firefox has switched on all platforms, Chrome and Edge on Windows use
"Settings", and we really don't want to have to say different things for
different platforms