Commit Graph

3663 Commits

Author SHA1 Message Date
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
William Durand
ef7a4e1a24 Bug 1799694 - Rename action/menu button class names in unified extensions. r=Itiel,desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D163077
2022-11-27 17:07:44 +00:00
William Durand
b505ba8d95 Bug 1802374 - Open unified extensions panel with keyboard navigation. r=rpl
It looks like this used to be possible by chance when we didn't check
the event in `togglePanel()`. Now that we do this (to prevent
context-click to open the panel for example), we need to check the event
type and which button or key is clicked/pressed.

Differential Revision: https://phabricator.services.mozilla.com/D163076
2022-11-25 18:03:58 +00:00
William Durand
a4a9f55ee9 Bug 1802411 - Set disabled state on the action button for extension widgets. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D163100
2022-11-25 14:53:59 +00:00
William Durand
ad62036e84 Bug 1793743 - Resize window to avoid overflowed extensions in the unified extensions panel. r=rpl
Depending on the test chunks on Firefox CI, we might have a test file
executed before this one that resizes the window and does not reset it.

In most cases, this isn't an issue except when we have logic to overflow
extension buttons pinned in the toolbar into the unified extensions
panel. This is what's happening here, at least for some configurations.

By making sure that the window is large enough, we should not have
overflowed extension buttons in the panel anymore. That will make the
test more robust.

Differential Revision: https://phabricator.services.mozilla.com/D162961
2022-11-24 21:32:48 +00:00
Mike Conley
1d6fdf4e6a Bug 1801678 - Test that pinning a browser action to an overflowed toolbar puts the widget in the right area. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D162588
2022-11-24 18:51:20 +00:00
Mike Conley
20fb1fd1fd Bug 1801678 - Refactor the Unified Extensions overflowable toolbar test helper with more flexible lifetime functions. r=willdurand,extension-reviewers
This is helpful when we need to insert optional async functions to run at
particular times within withWindowOverflowed.

Differential Revision: https://phabricator.services.mozilla.com/D162587
2022-11-24 18:51:20 +00:00
Mike Conley
a4c6de385c Bug 1800967 - Update internal OverflowableToolbar state when unpinning an extension button from the toolbar when overflowed. r=willdurand,Gijs
We have some internal bookkeeping within OverflowableToolbar to remember the state of things that
have overflowed, like how wide the window needs to be before they can be moved back, etc. When an
item is removed from an overflowable toolbar while overflowed, we update that internal bookkeeping
so that OverflowableToolbar doesn't accidentally try to move those items back into the toolbar
when the window becomes wide enough again.

We've added a new overflow list for extension buttons, but we weren't updating our internal accounting
when items had been overflowed into that list. This patch fixes that.

Differential Revision: https://phabricator.services.mozilla.com/D162434
2022-11-24 18:51:18 +00:00
Tomislav Jovanovic
ce9d450436 Bug 1801136 - Update tooltips when extensions require attention for permissions, r=willdurand,flod
Differential Revision: https://phabricator.services.mozilla.com/D162894
2022-11-24 14:16:30 +00:00
William Durand
6f0e72b5e0 Bug 1793743 - Let ExtensionTestUtils generate extension IDs in createExtensions(). r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D162849
2022-11-23 19:07:45 +00:00
William Durand
700e42f801 Bug 1801471 - Add test case (+ clean-ups). r=robwu
Depends on D162541

Differential Revision: https://phabricator.services.mozilla.com/D162732
2022-11-22 18:57:58 +00:00
William Durand
fbc4f35adc Bug 1801471 - Handle Private Browsing mode in unified extensions panel. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D162541
2022-11-22 18:57:58 +00:00
William Durand
5ff99717fb Bug 1801515 - Hover messages shouldn't be hidden by extensions in the UEP. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D162555
2022-11-22 17:49:18 +00:00
Mike Conley
160604568f Bug 1798683 - Make browser_unified_extensions_overflowable_toolbar.js more resilient by using a constant set of extension IDs. r=willdurand,extension-reviewers
For reasons that I don't fully understand, this appears to make the test pass more reliably on all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D162577
2022-11-22 15:52:07 +00:00
Csoregi Natalia
425e1d6567 Backed out changeset a05954545cff (bug 1801471) as requested. CLOSED TREE 2022-11-22 17:40:51 +02:00
William Durand
0bdb53a03c Bug 1801471 - Handle Private Browsing mode in unified extensions panel. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D162541
2022-11-22 12:26:23 +00:00
YUKI "Piro" Hiroshi
a53e90352a Bug 1271047 - Place "popup" type window to given coordinates r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D73419
2022-11-22 09:05:29 +00:00
William Durand
45b6adb2cb Bug 1801479 - Fix perma when Gecko 109 merges to Beta. r=rpl CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D162460
2022-11-21 18:12:53 +00:00
Noemi Erli
83bd7d5ae9 Backed out changeset 6d541e7aaa50 (bug 1801471) for causing failures in browser_unified_extensions.js 2022-11-22 02:58:42 +02:00
Noemi Erli
dfa10ce5c5 Backed out changeset 18fdd690a0f7 (bug 1801479) for causing browser chrome failures CLOSED TREE 2022-11-22 01:37:09 +02:00
scott
35e4f02b0f Bug 1798956 - Pocket newtab ensure we clear spocs in cases where sponsored topsites applies to Pocket data. r=nanj
Differential Revision: https://phabricator.services.mozilla.com/D162028
2022-11-21 20:24:29 +00:00
William Durand
dcbd751150 Bug 1801318 - Close context menu on command. r=mconley
This will force the panel to close when we click an item in the context
menu, without having to handle each menu item separately.

Differential Revision: https://phabricator.services.mozilla.com/D162424
2022-11-21 18:59:50 +00:00
Cristian Tuns
d1e21d7b84 Backed out changeset 424c4d51a7cd (bug 1271047) for causing mochitest failures on /browser_ext_windows_size.js CLOSED TREE 2022-11-21 14:04:04 -05:00
William Durand
9b6b490997 Bug 1801479 - Fix perma when Gecko 109 merges to Beta. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D162460
2022-11-21 18:12:53 +00:00
YUKI "Piro" Hiroshi
91ce3fc92a Bug 1271047 - Place "popup" type window to given coordinates r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D73419
2022-11-21 17:02:06 +00:00
William Durand
53323bd553 Bug 1801471 - Handle Private Browsing mode in unified extensions panel. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D162541
2022-11-21 15:01:11 +00:00
Cosmin Sabou
153f0d2c33 Bug 1798683 - disable browser_unified_extensions_overflowable_toolbar.js everywhere because of frequent failures. a=test-only 2022-11-20 11:19:15 +02:00