Commit Graph

267 Commits

Author SHA1 Message Date
Amy Churchwell
aca4530779 Bug 984589 - Sideways sliding animation in panels should be disabled when prefers-reduced-motion is turned on. r=sfoster,mhowell,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D167311
2023-03-08 17:52:48 +00:00
Andreas Pehrson
376dd077be Bug 1816693 - In PanelMultiView.jsm don't tie the openPopup args to the main window lifetime through the cancelCallback capture. r=Gijs
It appears that even a noop function `() => {}` will capture the entire scope,
so this patch also changes the normal state of the cancel callback to be
undefined.

Differential Revision: https://phabricator.services.mozilla.com/D170039
2023-02-16 12:34:40 +00:00
Itiel
c11764206c Bug 1815130 - Handle custom panel headers better when they are in the overflow panel r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D169253
2023-02-13 17:33:54 +00:00
Marian-Vasile Laza
c848003e2d Backed out changeset a55825557cf0 (bug 984589) for bc failures on browser_identityPopup_focus.js. CLOSED TREE 2023-02-04 00:26:30 +02:00
Amy Churchwell
ddd3cc362e Bug 984589 - Sideways sliding animation in panels should be disabled when prefers-reduced-motion is turned on. r=sfoster,mhowell,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D167311
2023-02-03 21:27:18 +00:00
Rob Wu
79598d955e Bug 1811459 - Avoid _moveOutKids on disconnected panelmultiview r=Gijs,rpl
`this.forNode` (with `this` being a `PanelMultiView` instance) may
return a node that was already disconnected before, in which case its
`node` member will be void. To avoid unexpected promise rejections, add
a null check before `_moveOutKids()`.

Differential Revision: https://phabricator.services.mozilla.com/D167369
2023-01-30 14:43:24 +00:00
Mark Banner
2bd093b567 Bug 1811334 - Automatically replace Cu.reportError with console.error (most of browser/components). r=settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D167297
2023-01-20 17:49:21 +00:00
Itiel
c5c7610894 Bug 1577257 - Share logic behind panel headers across the UI r=willdurand,Gijs,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D160972
2022-11-17 21:34:34 +00:00
Emilio Cobos Álvarez
f1aec2f463 Bug 1796735 - Remove XULPopupElement.autoPosition. r=dao
This was used to prevent reflows due to popuppositioned events during
view transitions.

The previous patch should've prevented the popuppositioned events to
begin with, plus we no longer use arrows that need positioning etc,
which means we shouldn't be triggering the reflows anyways.

Since this is the only consumer of autoPosition = true/false, we can
remove the code supporting it. It's a bit bogus as per the commit
message of the previous patch and, while fixable, it doesn't seem worth
fixing if we can just get rid of it.

Depends on D159936

Differential Revision: https://phabricator.services.mozilla.com/D159937
2022-10-21 13:13:54 +00:00
Emilio Cobos Álvarez
ca1a37b75f Bug 1796735 - Use getBoundsWithoutFlushing rather than getOuterScreenRect to lock the size of the panel. r=dao
getOuterScreenRect doesn't flush layout, so not flushing here should be
fine.

We only care about the CSS width / height, not about the screen
positioning, so this is more accurate.

The flickering in comment 8 (the hover effect in the "restore previous
session" button) happens because the following set of events:

 * We try to lock the size of the panel.
 * The size returned by getOuterScreenRect() is fractionally different
   to the actual size.
 * We get to [1], realize we've changed size (even though fractionally),
   set the origin at 0, 0, and then call SetPopupPosition to fix that
   up.
 * But we've disabled autopositioning[1], so the layout position of the
   panel remains at 0, 0.

This prevents the flickering by using the actual layout size
(getBoundsWithoutFlushing / getBoundingClientRect) rather than the
potentially-rounded getOuterScreenRect, to prevent the resize.

We could fix autoPosition = false, but I don't think it's needed
anymore, so I'm going to try removing it instead. However this change
should still avoid work, so seems worth landing regardless.

[1]: https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/layout/xul/nsMenuPopupFrame.cpp#621-626
[2]: https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/browser/components/customizableui/PanelMultiView.jsm#668

Depends on D159935

Differential Revision: https://phabricator.services.mozilla.com/D159936
2022-10-21 13:02:06 +00:00
Emilio Cobos Álvarez
5d9735877d Bug 1796735 - Don't use width/height attributes for panel sizing. r=dao
While these work now because I haven't ported popups to modern flexbox,
let's remove usage of these attributes so I don't have to later. This
doesn't change behavior.

Depends on D159934

Differential Revision: https://phabricator.services.mozilla.com/D159935
2022-10-21 13:01:51 +00:00
Emilio Cobos Álvarez
8eb4bd796d Bug 1795944 - Remove descriptionheightworkaround. r=Gijs
Stuff wraps properly now with flexbox emulation.

Differential Revision: https://phabricator.services.mozilla.com/D159621
2022-10-19 11:55:29 +00:00
Emilio Cobos Álvarez
16925fd709 Bug 1793622 - Remove unused argument in PanelMultiView. r=dao
_transitionViews doesn't take an anchor argument.

Differential Revision: https://phabricator.services.mozilla.com/D158586
2022-10-12 21:24:28 +00:00
Emilio Cobos Álvarez
38385a3c86 Bug 1790920 - Propagate modifiers properly in PanelMultiView's key event handling. r=Gijs
This is needed to fix browser_ext_browserAction_click_types.js.

Before the first patch in this bug, the order of the built-in command
event and the synthetic event here was slightly different, so it was
papered over. Also, the click event will trigger a command event if
needed, so there's no need to do it explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D157591
2022-09-19 17:02:38 +00:00
William Durand
eb8b86f19c Bug 1785204 - Separate primary and secondary buttons in the unified extensions panel. r=Itiel,Jamie,rpl,desktop-theme-reviewers
Depends on D154282

Differential Revision: https://phabricator.services.mozilla.com/D154873
2022-08-19 13:57:12 +00:00
William Durand
4e9ea12108 Bug 1784118 - Activate scripts when clicking an extension item in the unified extensions panel. r=Jamie,rpl
Differential Revision: https://phabricator.services.mozilla.com/D154282
2022-08-18 12:22:43 +00:00
Tooru Fujisawa
328d63ce7f Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel
f009ba2983 Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa
bf0a8b781b Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa
b10d0289af Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Neil Deakin
c9ddb2f4b9 Bug 1682621, remove keypress listener for main toolbar buttons, and use the inputSource to distinguish keyboard events, r=Gijs
The virtual click event is also removed. It seems this event is only used to check whether this was a key or mouse event in PanelMultiView.jsm

This also removes support for pressing the enter key to trigger these toolbarbuttons on Mac which shouldn't be happening anyway.

Differential Revision: https://phabricator.services.mozilla.com/D149285
2022-07-03 09:44:39 +00:00
Norisz Fay
f4827a4636 Backed out 2 changesets (bug 1682621) for causing bc failures on browser_menu_touch.js CLOSED TREE
Backed out changeset 88be5107a4a1 (bug 1682621)
Backed out changeset e32910a4948b (bug 1682621)
2022-06-29 19:36:51 +03:00
Neil Deakin
4674aa45e8 Bug 1682621, remove keypress listener for main toolbar buttons, and use the inputSource to distinguish keyboard events, r=Gijs
The virtual click event is also removed. It seems this event is only used to check whether this was a key or mouse event in PanelMultiView.jsm

This also removes support for pressing the enter key to trigger these toolbarbuttons on Mac which shouldn't be happening anyway.

Differential Revision: https://phabricator.services.mozilla.com/D149285
2022-06-29 12:38:30 +00:00
Marian-Vasile Laza
3dee1242d8 Backed out 2 changesets (bug 1682621) for causing bc failures on browser_ext_browserAction_click_types.js.
Backed out changeset 31a6b027b4e7 (bug 1682621)
Backed out changeset 782fd4871c5f (bug 1682621)
2022-06-28 20:27:15 +03:00
Neil Deakin
27e54692b9 Bug 1682621, remove keypress listener for main toolbar buttons, and use the inputSource to distinguish keyboard events, r=Gijs
The virtual click event is also removed. It seems this event is only used to check whether this was a key or mouse event in PanelMultiView.jsm

This also removes support for pressing the enter key to trigger these toolbarbuttons on Mac which shouldn't be happening anyway.

Differential Revision: https://phabricator.services.mozilla.com/D149285
2022-06-28 16:02:37 +00:00
Tooru Fujisawa
9ac8a72331 Bug 1772100 - Part 3: Use plain object for lazy getter in browser/components/customizableui/. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D148013
2022-06-10 19:42:59 +00:00
Shane Hughes
d0205caf06 Bug 1724622 - Fix missing ETP toast popup animation. r=pbz,Gijs
When the tracking protection toast popup closes on a timer, it doesn't
smoothly fade out, because it uses PanelMultiView.hidePopup instead of
panelNode.hidePopup. The static method on PanelMultiView ultimately
calls panelNode.hidePopup, but it doesn't have a parameter for enabling
the animation so it passes nothing to that method. This patch extends
PanelMultiView's hidePopup class methods to add an optional `animate`
parameter, and adds that parameter to the toast popup's hidePopup call.
This should slightly reduce the speed of part of
browser_protectionsUI.js but I don't think it affects any other tests.

Differential Revision: https://phabricator.services.mozilla.com/D146394
2022-05-24 16:04:23 +00:00
Shane Hughes
955f8e092c Bug 1769481 - Fix PanelMultiView console warnings. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146393
2022-05-16 15:23:30 +00:00
Emilio Cobos Álvarez
08a3c18595 Bug 1755315 - Add more convenient accessors for widget screen to chrome code. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D138662
2022-02-17 16:22:58 +00:00
Emilio Cobos Álvarez
2b4bcbce12 Bug 1753836 - Fix callers of screenForRect to pass desktop pixels. r=jfkthame,Gijs
Device pixels and desktop pixels are not the same on macOS and Win7.
Expose the desktop-to-device scale to JS and use it appropriately.

Depends on D138038

Differential Revision: https://phabricator.services.mozilla.com/D138039
2022-02-16 12:18:12 +00:00
smolnar
ac36389b37 Backed out 6 changesets (bug 1753836) for causing mochitest failures in test_event_screenXY_with_zoom. CLOSED TREE
Backed out changeset a572cbc0fac2 (bug 1753836)
Backed out changeset 371a495ff728 (bug 1753836)
Backed out changeset 774af76be463 (bug 1753836)
Backed out changeset faa8a8f2d40f (bug 1753836)
Backed out changeset 9209832ecffe (bug 1753836)
Backed out changeset db443ce0406d (bug 1753836)
2022-02-16 01:47:51 +02:00
Emilio Cobos Álvarez
1f6fc3a3d9 Bug 1753836 - Fix callers of screenForRect to pass desktop pixels. r=jfkthame,Gijs
Device pixels and desktop pixels are not the same on macOS and Win7.
Expose the desktop-to-device scale to JS and use it appropriately.

Depends on D138038

Differential Revision: https://phabricator.services.mozilla.com/D138039
2022-02-15 22:25:04 +00:00
Emilio Cobos Álvarez
09d941de74 Bug 1741830 - Fix front-end callers of screenForRect in HiDPI environments. r=Gijs
screenForRect takes screen coordinates (device pixels, for our purpose here).

However screenX / screenY are in CSS pixels, so we need to convert them to the
right coordinate space before looking up the screen.

Differential Revision: https://phabricator.services.mozilla.com/D137895
2022-02-05 15:44:43 +00:00
Gijs Kruitbosch
fb2c0a460f Bug 1752460 - drop references to unused 'navigable' class name from panel UI menu handling, r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D137449
2022-01-31 20:41:02 +00:00
Scott
9c09e77b2e Bug 1737868 - Pocket panel overflow menu not properly getting the remote attribute. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D130770
2021-11-16 00:35:34 +00:00
Neil Deakin
0d6adaeabb Bug 1733786, replace uitour implementation of show how button with one that focuses the item on the app menu and submenu instead, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D128428
2021-10-19 14:54:45 +00:00
Julien Wajsberg
78d61c1786 Bug 1681539 - Add a profiler marker for descriptionHeightWorkaround r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D126203
2021-10-05 09:13:12 +00:00
Michael Kohler
b40a4cb123 Bug 1702200 - Add toolbarseparator when header already exist when showing subview r=mconley
The toolbarseparator is added the first time a subview is opened. However for subsequent times the header already exists and we bailed out early without adding the separator.

Differential Revision: https://phabricator.services.mozilla.com/D122907
2021-08-30 07:11:24 +00:00
Alexandru Michis
358b440255 Backed out changeset 55776bb2f806 (bug 1702200) for causing failures in nsSocketTransport.
CLOSED TREE
2021-08-26 20:42:55 +03:00
Michael Kohler
8ad1631010 Bug 1702200 - Add toolbarseparator when header already exist when showing subview r=mconley
The toolbarseparator is added the first time a subview is opened. However for subsequent times the header already exists and we bailed out early without adding the separator.

Differential Revision: https://phabricator.services.mozilla.com/D122907
2021-08-26 16:48:01 +00:00
Michelle Goossens
80e0801348 Bug 1711515 - Remove gProtonDoorhangers, gProtonDoorhangersEnabled, and gProtonAppMenuEnabled from various jsms and other frontend (non-test) code r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D116246
2021-05-28 18:07:15 +00:00
Markus Stange
4b2c5e6c55 Bug 1704948 - Give XULCommandEvent a button property. r=smaug,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D111955
2021-04-20 17:44:16 +00:00
Narcis Beleuzu
2fd43d5a0b Backed out 7 changesets (bug 1704948, bug 1704879) for bc failures on browser_ext_menus_capture_secondary_click.js
Backed out changeset 02705918c4bf (bug 1704879)
Backed out changeset 79945b876a1d (bug 1704879)
Backed out changeset eb725de20b11 (bug 1704948)
Backed out changeset 454597ac2ba3 (bug 1704948)
Backed out changeset a43a8ef206ea (bug 1704948)
Backed out changeset 2369e321069e (bug 1704948)
Backed out changeset bdf396edd692 (bug 1704948)
2021-04-15 03:30:52 +03:00
Markus Stange
7f0c1757af Bug 1704948 - Give XULCommandEvent a button property. r=smaug,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D111955
2021-04-14 21:23:27 +00:00
Mike Conley
632adba6fc Bug 1695348 - Mass rename browser.proton.appmenu.enabled to browser.proton.enabled. r=emalysz,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106800
2021-03-01 17:27:52 +00:00
Emma Malysz
f11211967a Bug 1694648, ensure toolbarseparators are added correctly for menu headers when proton is enabled r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D106310
2021-02-24 21:28:23 +00:00
Mike Conley
895d964a1d Bug 1688960 - Use h1 and h2 elements for panel headers and subheaders. r=Standard8,yzen,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D105081
2021-02-24 02:52:30 +00:00
Dorel Luca
3c18ad591d Backed out 2 changesets (bug 1688960, bug 1693177) for Browser-chrome failures in browser/base/content/test/sync/browser_sync.js. CLOSED TREE
Backed out changeset 13e08408add0 (bug 1693177)
Backed out changeset a34474998cd6 (bug 1688960)
2021-02-24 03:36:21 +02:00
Mike Conley
b822f4d379 Bug 1688960 - Use h1 and h2 elements for panel headers and subheaders. r=Standard8,yzen,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D105081
2021-02-23 23:16:12 +00:00
Mike Conley
b9c2415b31 Bug 1692630 - Apply more Proton styles for headers and subheaders in the AppMenu. r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D105786
2021-02-19 17:45:25 +00:00