Until container tabs are supported in private browsing mode
(bug 1320757), extensions should not be able to open container tabs when
perma-private browsing mode is off.
Differential Revision: https://phabricator.services.mozilla.com/D9517
--HG--
extra : moz-landing-system : lando
This changeset updates all the test that were wrongly using ok() and wanted to
use is() AND for which the assert is still passing without any modification
required.
Differential Revision: https://phabricator.services.mozilla.com/D8739
--HG--
extra : moz-landing-system : lando
Usually, documentUrlPatterns applies to the URL of the document where
the context menu is opened. In some cases, there is no document, such
as menus on browser UI (extension action buttons, tools menu, tabs).
In these cases, `documentUrlPatterns` matches the (active) tab's URL.
This causes ambiguity when `browser.menus.overrideContext` is used to
change the context to the "tab" context.
Before this patch, `documentUrlPatterns` applied to the tab's URL.
After this patch, `documentUrlPatterns` applies to the URL of the
document where the menu was opened, *if* `viewTypes` is also set.
Using this property is a strong signal from the extension that the menu
is meant to be shown in a document rather than browser UI, so extensions
can reasonably expect `documentUrlPatterns` to match the original
document's URL instead of the URL of the spoofed tab context.
There was no existing test coverage for documentUrlPatterns on tab
contexts, so this does not only add tests for documentUrlPatterns on
overridden contexts (browser_ext_menus_replace_menu_context.js), but
also documentUrlPatterns in normal tab contexts (browser_ext_menus.js).
Differential Revision: https://phabricator.services.mozilla.com/D9249
--HG--
extra : moz-landing-system : lando
Prior to this patch, if a user attempted to use a keyboard shortcut that used a numeric key, the action would not be triggered if they used the numeric key from the number pad. This patch triggers the shortcut regardless of the source.
Differential Revision: https://phabricator.services.mozilla.com/D8535
--HG--
extra : moz-landing-system : lando
Use a homepage URL instead of a new tab URL by default in
browser.windows.create.
Differential Revision: https://phabricator.services.mozilla.com/D6030
--HG--
extra : moz-landing-system : lando
Use a homepage URL instead of a new tab URL by default in
browser.windows.create.
Differential Revision: https://phabricator.services.mozilla.com/D6030
--HG--
extra : moz-landing-system : lando
This updates the test to use a multiple of the default process count rather
than hardcoding 8.
--HG--
extra : rebase_source : b5d7d34b4994ea7e2e453ec833f218919146636f
extra : source : 403c3d0daf6a24a7bb21e9f8ca2493cb4956fb4c
This updates the test to use a multiple of the default process count rather
than hardcoding 8.
--HG--
extra : rebase_source : 2aa15de90a58e38e480aca5e10f0b680820ecb2c
Changed the validation function for PageInfo to use a more general validateItemProperties.
This changes the error message being thrown. Changed the respective test cases to accomodate the change.
Differential Revision: https://phabricator.services.mozilla.com/D5831
--HG--
extra : moz-landing-system : lando
mkaply for overall search engine api changes
adw for searchservice changes. note that a small part of it will be removed in favor of the fix from bug 1485508
aswan for webextension side. note that I want to do better with the distribution signal, that can be in bug 1488517
Differential Revision: https://phabricator.services.mozilla.com/D4473
--HG--
extra : moz-landing-system : lando
- Support viewTypes property in menus.create / menus.update.
- Add info.viewType to menus.onShown / menus.onClicked event.
- This "viewType" reuses the existing extension.ViewType enum,
which is a "tab", "popup" (pageAction/browserAction) or "sidebar".
Differential Revision: https://phabricator.services.mozilla.com/D6205
--HG--
extra : moz-landing-system : lando
Stop checking whether `browser.menus.overrideContext` is called during
a `contextmenu` event, because the implementation cannot rely on
`window.event` due to bug 1493869.
Because of the removed check, `overrideContext` does not throw any more
when called outside of a "contextmenu" event. An extra check was added
to make sure that this does not impact menus of non-extension documents.
The new implementation has the following other effects:
- overrideContext can be called from shadow DOM (+tests).
- overrideContext can be called for context menu in a different
(same-origin) document (e.g. a menu in a blank child frame).
Differential Revision: https://phabricator.services.mozilla.com/D7249
--HG--
extra : moz-landing-system : lando
The new permission is added to make it easier to audit the usage of the
API. It is an optional permission, in case we ever decide to introduce
a permission warning for it.
Differential Revision: https://phabricator.services.mozilla.com/D6771
--HG--
extra : moz-landing-system : lando
This refactor is mainly meant to support bug 1367160, but it also eases
the implementation of bug 1294429, bug 1325758 or bug 1370735 if we ever
decide to fix those bugs.
Previously, the menu was constructed by creating one root menu item
and moving the submenu to the root if there was only one item.
The refactored code constructs the menu items by generating a list of
(potentially more than one) top-level menu items, and moving excess menu
items to a submenu (as before). Besides the ability to support an
arbitrary number of top-level menu items, this new implementation also
makes it easier to insert menu items and optionally separators at
arbitrary locations in the menu.
The refactored code obsoletes some separate code paths for browserAction
and pageAction menus, which improves the maintainability of the code.
There are two user-visible functional changes in this commit:
- Excess action menu items (more than ACTION_MENU_TOP_LEVEL_LIMIT = 6)
are not silently discarded, but shown in a submenu. See updated test.
- menus.onShown/onHidden are now always fired when the action menu is
shown, even if the extension has not created any action menu items.
Differential Revision: https://phabricator.services.mozilla.com/D6621
--HG--
extra : moz-landing-system : lando
Changed the validation function for PageInfo to use a more general validateItemProperties.
This changes the error message being thrown. Changed the respective test cases to accomodate the change.
Differential Revision: https://phabricator.services.mozilla.com/D5831
--HG--
extra : moz-landing-system : lando
Other (internal API) changes besides extension API changes:
- This also introduces support for opening a window with multiple tabs
in a non-default container tab.
- This also adds LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL to the
gBrowser.loadTabs call, unless allowInheritPrincipal is set.
For backwards-compatibility, this flag defaults to true.
Depends on D4928
Differential Revision: https://phabricator.services.mozilla.com/D4929
--HG--
extra : moz-landing-system : lando