Commit Graph

3839 Commits

Author SHA1 Message Date
Mark Banner
7e07208b85 Bug 1808173 - Convert prompts imports to direct ES imports. r=Gijs,webdriver-reviewers,necko-reviewers,application-update-reviewers,credential-management-reviewers,valentin,whimboo,dimi,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D165794
2023-01-16 13:32:20 +00:00
Gregory Pappas
6ca9a7bd94 Bug 1680606 - Add matchDiacritics option to Find API r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D166875
2023-01-16 12:23:32 +00:00
Qijia Liu
c937ed63f9 Bug 1810076 - Fix promise constructor anti-pattern in ExtensionControlledPopup.jsm. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D166762
2023-01-16 12:22:04 +00:00
Rob Wu
223b64d4a0 Bug 1808921 - Fix intermittent incorrect window in browser_ext_incognito_views.js r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D166235
2023-01-15 13:35:51 +00:00
Dave Townsend
db50f97435 Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2023-01-07 17:53:19 +00:00
Oriol Brufau
ca1a72c7a6 Bug 1808615 - Make addTab default skipLoad to createLazyBrowser. r=Gijs,extension-reviewers,nika,robwu
And make callers rely on that instead of allowInheritPrincipal when
creating lazy tabs.

Unlike allowInheritPrincipal, skipLoad sets the nodefaultsrc attribute.
This avoids a load instead of falling back to about:blank.

One consequence of that is that switching to a lazy about:blank tab will
not notify invoke listeners registered with addTabsProgressListener
(listeners registered with addProgressListener will still be invoked).

Thus test browser_open_in_lazy_tab.js needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D166012
2023-01-07 13:51:47 +00:00
Sandor Molnar
4f5ee6f941 Backed out changeset 2b67bd0dd255 (bug 1808615) for causing bc failures in browser/components/customizableui/test/browser_open_in_lazy_tab.js CLOSED TREE 2023-01-07 03:18:23 +02:00
Oriol Brufau
60b9a931c7 Bug 1808615 - Make addTab default skipLoad to createLazyBrowser. r=Gijs,extension-reviewers,nika,robwu
And make callers rely on that instead of allowInheritPrincipal when
creating lazy tabs.

Differential Revision: https://phabricator.services.mozilla.com/D166012
2023-01-07 00:37:36 +00:00
Alexandre Poirot
b1a774bd6d Bug 1807937 - [devtools] Always use gDevTools.showToolboxForWebExtension to open Web extension toolboxes. r=devtools-reviewers,extension-reviewers,jdescottes
Let this test use the same codepath as production codepath used by about:debugging.

Differential Revision: https://phabricator.services.mozilla.com/D165718
2023-01-05 17:37:57 +00:00
Luca Greco
72ea8f018d Bug 1807961 - Fix browser_unified_extensions.js failures hit due to moving/resizing windows being asynchronous. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D165689
2023-01-03 12:39:55 +00:00
Gregory Pappas
ea227ca4c9 Bug 1707405 - Make bookmarkId optional r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D165790
2023-01-03 09:03:17 +00:00
Marian-Vasile Laza
3f9e8980c7 Backed out changeset 1c135e14142e (bug 1805523) for causing bc failures on browser_ext_windows_create_tabId.js. 2023-01-02 16:34:38 +02:00
Gregory Pappas
6c82a9320a Bug 1772166 - Implement 'ZoomSettings.defaultZoomFactor' r=mixedpuppy,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158731
2023-01-02 13:32:42 +00:00
Tomislav Jovanovic
6716f18a49 Bug 1805523 - Implement temporary access state and attention, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D165490
2023-01-01 21:46:00 +00:00
Mark Banner
df47c60747 Bug 1806359 - Convert telemetry imports to direct ES imports. r=necko-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,janerik,mconley,sgalich,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165002
2022-12-23 12:37:07 +00:00
Emilio Cobos Álvarez
8bbf7f3f5b Bug 1805500 - Implement panel borders in cocoa using a border rather than shadow. r=mstange,extension-reviewers
My guess is that it was done using shadows to not interfere with the
native look, but actually this just works even with native-looking menus
(like the <select> menulist), because the background-color for those is
set on the menupopup, rather than the ::part(content).

So those have effectively 1px of extra padding (due to the transparent
border), but that seems barely perceptible, and worth the consistency
and simplification.

Differential Revision: https://phabricator.services.mozilla.com/D164716
2022-12-17 01:45:05 +00:00
Emilio Cobos Álvarez
0f61b77b68 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-15 03:11:55 +00:00
Tomislav Jovanovic
02c5082e6b Bug 1798695 - Use WebExtensionPolicy to get list of active extensions r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D162570
2022-12-14 17:56:29 +00:00
Mark Banner
9c19df2f46 Bug 1801813 - Improve search engine load path reporting for add-ons, user and enterprise policy engines. r=mcheang,settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D162700
2022-12-14 15:12:10 +00:00
Cristian Tuns
c9c42bc174 Backed out 2 changesets (bug 1805415) for causing dt failures on browser_net_telemetry_throttle_changed.js CLOSED TREE
Backed out changeset 5056d7df9f1e (bug 1805415)
Backed out changeset e13513500184 (bug 1805415)
2022-12-14 08:52:21 -05:00
Emilio Cobos Álvarez
9a53f8dea3 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-14 10:25:17 +00:00
Nika Layzell
6687b848c0 Bug 1800149 - Part 1: Stop sending some values from a content process in nsContextMenu, r=Gijs,extension-reviewers,robwu
Currently we are sending some values, such as principals, from the content
process when creating a nsContextMenu. This information is already available in
the parent process on WindowGlobalParent, so changes the code to fetch the
values from there instead.

Differential Revision: https://phabricator.services.mozilla.com/D161835
2022-12-13 18:35:18 +00:00
Stanca Serban
e9a80a4736 Backed out changeset 514642d76faa (bug 1792138) for causing mochitests failures in test_ext_protocolHandlers.html. CLOSED TREE 2022-12-13 14:53:38 +02:00
Dave Townsend
45fe9bcc7c Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2022-12-13 10:43:32 +00:00
Sandor Molnar
cb53312f62 Backed out 2 changesets (bug 1800149) for causing mochitest failures in browser/base/content/test/referrer/browser_referrer_open_link_in_container_tab2.js CLOSED TREE
Backed out changeset 93299d2ad98a (bug 1800149)
Backed out changeset 0873ce3fa677 (bug 1800149)
2022-12-13 04:28:40 +02:00
Nika Layzell
0f0ad22af4 Bug 1800149 - Part 1: Stop sending some values from a content process in nsContextMenu, r=Gijs,extension-reviewers,robwu
Currently we are sending some values, such as principals, from the content
process when creating a nsContextMenu. This information is already available in
the parent process on WindowGlobalParent, so changes the code to fetch the
values from there instead.

Differential Revision: https://phabricator.services.mozilla.com/D161835
2022-12-12 23:41:22 +00:00
Andrew Halberstadt
784c7a446b Bug 1802323 - Add more logging to History cleaner in Sanitizers. r=Gijs,hpeuckmann,extension-reviewers,rpl
Makes passing a progress object as part of options more coherent in the
Sanitizer, so we don't need to null check it everywhere.
Create a sub progress object for each cleaner, so they don't overwrite each
other reusing the same property names (like "step"), since all the cleaners are
started in parallel.
Add a few steps to the history cleaner.

This also fixes a typo in the openWindows cleaner, that should receive an object
rather than a string as second argument. Adding a test for this feature is not
trivial, thus I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1803174.

Differential Revision: https://phabricator.services.mozilla.com/D163352
2022-12-12 17:16:51 +00:00
Drew Willcoxon
212d13a054 Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 18:43:49 -05:00
Noemi Erli
5ffe6e3698 Backed out changeset e0eac08ef8bc (bug 1803873) fo causing failures in browser_search_telemetry_sources_navigation CLOSED TREE 2022-12-07 01:24:44 +02:00
Drew Willcoxon
f7f081c409 Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 22:28:55 +00:00
Cristian Tuns
63266cca48 Backed out changeset 263fffe843be (bug 1803873) for causing mochitest failures on browser_test_focus_urlbar.js CLOSED TREE 2022-12-06 15:10:09 -05:00
Drew Willcoxon
e634925c17 Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 16:35:31 +00:00
Gijs Kruitbosch
965c6e86fc Bug 1803158 - convert session restore consumers to reference the sys.mjs files instead, r=webdriver-reviewers,perftest-reviewers,extension-reviewers,credential-management-reviewers,Standard8,sgalich,whimboo,sparky,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D163350
2022-12-06 16:02:03 +00:00
Butkovits Atila
74e26649e5 Backed out changeset 470fffc6ff9a (bug 1772166) for causing failures at browser_ext_webNavigation_onCreatedNavigationTarget.js. CLOSED TREE 2022-12-06 16:44:41 +02:00
Gregory Pappas
31354f56b1 Bug 1772166 - Implement 'ZoomSettings.defaultZoomFactor' r=mixedpuppy,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158731
2022-12-06 13:22:09 +00:00
Sandor Molnar
adfe63bce9 Backed out changeset 26d4da528112 (bug 1772166) for causing bc failures in browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget.js CLOSED TREE 2022-12-05 18:26:15 +02:00
William Durand
d55bdd31af Bug 1802925 - Update attention dot when (un)pinning extensions. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D163580
2022-12-05 14:55:51 +00:00
Gregory Pappas
fa412b2f5f Bug 1478095 - Implement 'SuggestResult.deletable' and 'omnibox.onDeleteSuggestion' r=mixedpuppy,adw
Differential Revision: https://phabricator.services.mozilla.com/D159475
2022-12-05 14:50:57 +00:00
Gregory Pappas
fdcd365e65 Bug 1772166 - Implement 'ZoomSettings.defaultZoomFactor' r=mixedpuppy,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158731
2022-12-05 14:49:40 +00:00
William Durand
0640c4da83 Bug 1803650 - Remove setAttribute() since the label is updated with Fluent. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D163629
2022-12-02 20:31:49 +00:00
Tomislav Jovanovic
aa927e58f2 Bug 1801336 - Don't show hover run message for mv2 without browser action r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D163333
2022-12-01 13:53:21 +00:00
Tomislav Jovanovic
1f0374a1d7 Bug 1791370 - Ensure proper order of startup cache clearing and saving, r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D163277
2022-11-29 21:58:15 +00:00
Luca Greco
b5c9ed5cb9 Bug 1775555 - Fix high frequency intermittent failures hit by browser_ext_browserAction_context.js. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D163137
2022-11-29 16:30:08 +00:00
Mark Banner
319bc25bd8 Bug 1802855 - Convert toolkit/components/satchel JSM modules to ES modules. r=credential-management-reviewers,daleharvey,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D163201
2022-11-29 15:53:20 +00:00
Cristian Tuns
637a023191 Backed out changeset 50a57a750043 (bug 1791370) for private browsing failures on browser_html_detail_view.js. CLOSED TREE 2022-11-29 11:01:38 -05:00
Tomislav Jovanovic
a7fbbe8c1d Bug 1791370 - Ensure proper order of startup cache clearing and saving, r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D163277
2022-11-29 14:08:00 +00:00
William Durand
1aa968ac12 Bug 1800109 - Add a test that checks that overflowed toolbar items in the addons area can be unpinned via a context menu. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D163244
2022-11-28 20:24:59 +00:00
Mike Conley
dda8b11101 Bug 1801514 - Make sure addons panel hides when entering customize mode. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D163013
2022-11-28 16:24:09 +00:00
William Durand
66339786bb Bug 1802574 - Maximize window to prevent intermittents. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D163176
2022-11-28 12:44:50 +00:00
William Durand
80f9f71d60 Bug 1799694 - Avoid flickering when messages have different lengths. r=rpl,mconley,desktop-theme-reviewers,Itiel
This is a completely redesign based on mconley's idea to use `deck`.
That removes a lot of code and makes things a lot better.

Depends on D163077

Differential Revision: https://phabricator.services.mozilla.com/D162390
2022-11-27 17:07:44 +00:00