Commit graph

223 commits

Author SHA1 Message Date
Mike Conley
dc2631ac79 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
86a7eeaf5a 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
3da2d710da 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
df1d85fc90 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
7404b84286 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
744c808df2 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
Emma Malysz
e7e6abb53d Bug 1689366, simplify bookmark panel r=fluent-reviewers,mconley,flod
Differential Revision: https://phabricator.services.mozilla.com/D103402
2021-02-02 18:56:19 +00:00
Kartik Gautam
b95d37ecfb Bug 1677247 - Replace :not(:is(X)) with :not(X) in the codebase. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97943
2020-11-25 04:23:25 +00:00
emcminn
112cbb6dae Bug 1669483 - Restore keyboard navigation to WhatsNewPanel footer r=Jamie,andreio
`oncommand` has been replaced with `onclick` for the checkbox in the WhatsNewPanel footer. `oncommand` was
causing the checkbox state to get out of sync with the pref when the keyboard was used. Since PanelMultiView treats
'enter' and 'space' presses as click events, using `onclick` gives us keyboard navigation while keeping the
pref in sync.

Differential Revision: https://phabricator.services.mozilla.com/D94454
2020-11-02 18:42:38 +00:00
Brad Werth
5b1f5cfb74 Bug 1634556 Part 1: Make web extension sidebars listen to zoom enlarge/reduce events. r=mixedpuppy
These events are fired for all parent process documents by the code that
handles native mousewheel events. This change adds listeners to those events
and handles them similarly to how they are handled for browsers.

Differential Revision: https://phabricator.services.mozilla.com/D84767
2020-10-26 16:20:59 +00:00
Emilio Cobos Álvarez
4ad501e86f Bug 1666497 - Don't flush layout from popuppositioned events. r=mconley,Gijs,smaug
We don't need to flush before dispatching the event because we know that
if the values we cared about changed, then we'd get another event.

Differential Revision: https://phabricator.services.mozilla.com/D92444
2020-10-06 16:28:41 +00:00
Itiel
e28cf185f0 Bug 1631202 - Convert all uses of :-moz-any to :is in browser/ r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D90690
2020-09-21 19:35:35 +00:00
Emma Malysz
3123c7867e Bug 1634030: lazify main app menu r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D84014
2020-08-10 17:09:55 +00:00
Butkovits Atila
996e816c65 Backed out changeset e71e10688704 (bug 1634030) for failure at browser_shim_disable_devtools.js CLOSED TREE 2020-08-08 03:46:14 +03:00
Emma Malysz
77f8ca0ed1 Bug 1634030: lazify main app menu r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D84014
2020-08-07 22:02:32 +00:00
Emma Malysz
392c9ed354 Bug 1648175, remove history and library panel views from the main panel and place in template r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D80306
2020-06-29 15:41:43 +00:00
Emilio Cobos Álvarez
142b7d3c57 Bug 1629096 - Always honor scroll-margin / scroll-padding from nsFocusManager. r=masayuki
We should always do this, otherwise stuff may not end up being visible which is
not acceptable for focus navigation.

Differential Revision: https://phabricator.services.mozilla.com/D70541

--HG--
extra : moz-landing-system : lando
2020-04-13 11:34:48 +00:00
Kousuke Takaki
cb722fa6db Bug 1542975 - Radio buttons in Forget panel are not keyboard navigable r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D61820

--HG--
extra : moz-landing-system : lando
2020-02-07 03:44:09 +00:00
gfmcknight
79bcb52abe Bug 1405031 - Add middle-click and click modifiers to browserAction r=robwu,Gijs
and pageActions.

Before this change, browserActions and pageActions did not trigger
onClick events when middle-clicked, and no information on the button or
any modifiers were passed in the onClick event. With this change, middle
clicking triggers an event, and a clickData object is passed in the
onClick event, with the button and a list of modifiers.

Differential Revision: https://phabricator.services.mozilla.com/D41492

--HG--
extra : moz-landing-system : lando
2019-10-28 15:33:11 +00:00
Tim Nguyen
822add064c Bug 1513325 - Remove textbox binding. r=emilio,dao
Differential Revision: https://phabricator.services.mozilla.com/D38955

--HG--
extra : moz-landing-system : lando
2019-10-09 09:27:28 +00:00
Gijs Kruitbosch
0077e210fe Bug 1561581 - listen for key events in panels 'later' than the builtin menu handling code, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D44679

--HG--
extra : moz-landing-system : lando
2019-09-18 22:48:15 +00:00
Gijs Kruitbosch
6a3d84c2f8 Bug 1580949 - avoid re-entry when showing extension subviews in the overflow panel, r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D46078

--HG--
extra : moz-landing-system : lando
2019-09-17 14:57:52 +00:00
Nihanth Subramanya
f0c4c53fc9 Bug 1574196 - Properly wrap long subview header text in identity and protections panels. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D43335

--HG--
extra : moz-landing-system : lando
2019-08-26 20:13:38 +00:00
Nihanth Subramanya
07a625aea2 Bug 1572528 - [Protections Panel] Update category item subviews. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D41271

--HG--
extra : moz-landing-system : lando
2019-08-12 20:09:13 +00:00
Nihanth Subramanya
4e879f584b Bug 1563093 - Set an attribute on PanelMultiView popups when the main view is showing, and use it to style the Protections Panel anchor arrow. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D41204

--HG--
extra : moz-landing-system : lando
2019-08-09 12:43:27 +00:00
Nihanth Subramanya
8e95b4661d Bug 1572416 - PanelMultiView: remove the min-height on the view container when navigating to the main view. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D41202

--HG--
extra : moz-landing-system : lando
2019-08-09 12:43:15 +00:00
Jared Wein
776e7c17fb Bug 1571567 - Fix no-fallthrough errors in /browser. r=MattN,k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D40745

--HG--
extra : moz-landing-system : lando
2019-08-08 15:18:49 +00:00
Bogdan Tara
844afcfb06 Backed out 10 changesets (bug 1571567) complementary backout after es lint failure on the patch CLOSED TREE
Backed out changeset ce83fa75ae32 (bug 1571567)
Backed out changeset 7aa97ba7cce9 (bug 1571567)
Backed out changeset 777d79076e99 (bug 1571567)
Backed out changeset fbdf6b75a484 (bug 1571567)
Backed out changeset e2ed4620f232 (bug 1571567)
Backed out changeset 2c67015f12c6 (bug 1571567)
Backed out changeset 7ec086bb5bd5 (bug 1571567)
Backed out changeset 42df735c8556 (bug 1571567)
Backed out changeset 7d5fc57b2809 (bug 1571567)
Backed out changeset 606bafb8211c (bug 1571567)
2019-08-08 18:13:54 +03:00
Jared Wein
bfdcad7ada Bug 1571567 - Fix no-fallthrough errors in /browser. r=MattN,k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D40745

--HG--
extra : moz-landing-system : lando
2019-08-08 01:38:50 +00:00
James Teh
f6179ac757 Bug 1561517: PanelMultiView: Don't override the tab key when an open menulist has focus. r=johannh
Tab in an open menulist should close the menulist.
Previously, we were overriding the tab key in this case, which meant that the menulist remained open while focus moved elsewhere.

Differential Revision: https://phabricator.services.mozilla.com/D37835

--HG--
extra : moz-landing-system : lando
2019-07-18 04:55:51 +00:00
Victor Porof
1f830c96da Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36042

--HG--
extra : source : d3afcafdce650a6f36cebbc126ee93b17f13cf52
2019-07-05 09:53:32 +02:00
James Teh
5993e555d3 Bug 1557115: Fix PanelMultiView keyboard navigation for embedded iframes. r=Gijs
Bug 1545766 (D28442) tweaked PanelMultiView keyboard navigation to behave as expected for embedded browser elements.
This patch extends this to handle iframe elements such as used in the builtin Profiler panel.
In addition, it avoids setting tabindex="-1" on iframe and browser elements, since this breaks tabbing behavior in iframe elements (and possibly causes issues in browser elements as well).
iframe and browser elements are already focusable, so this isn't needed anyway.

Differential Revision: https://phabricator.services.mozilla.com/D34984

--HG--
extra : moz-landing-system : lando
2019-06-14 09:44:55 +00:00
Andrew Swan
a745ec6099 Bug 1519577 Convert toolbarbutton to a custom element r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D31941

--HG--
extra : rebase_source : 3709ef713f1a7dc9fbc2d0ac97f16bea757fcd2b
2019-05-20 10:01:02 -07:00
James Teh
c504fadc7d Bug 1547635: PanelMultiView: Don't override keyboard navigation in context menus. r=Gijs
Normally, context menu keyboard handling takes precedence.
However, because we have a capturing window keydown listener, our listener takes precedence.
Therefore, we need to check for an open context menu and suppress our keyboard handling in this case.

Differential Revision: https://phabricator.services.mozilla.com/D29791

--HG--
extra : moz-landing-system : lando
2019-05-08 05:18:17 +00:00
James Teh
6cf69b31f4 Bug 1546633: PanelMultiView: Send mousedown event when activating a button via the keyboard. r=Gijs
Previously, we sent a command event and a click event.
Normally, the command event executes the action, then the click event closes the menu.
However, in some cases (e.g. the Library button), there is no command event handler and the mousedown event executes the action instead.

Differential Revision: https://phabricator.services.mozilla.com/D29151

--HG--
extra : moz-landing-system : lando
2019-05-02 10:35:57 +00:00
James Teh
32a5b927ef Bug 1545766: PanelMultiView: Don't override keyboard navigation in embedded documents. r=Gijs
Extension panels contain embedded documents; i.e. a <browser> element.
We want users to be able to tab to these and we want them to be focused automatically if a subview is opened from the keyboard, so treat them as tabbable.
However, once an embedded document is focused, we can't manage keyboard navigation inside it, so don't try.
Previously, we tried, which meant keys were overridden even though they didn't do anything, breaking keyboard navigation in extensions altogether.

Differential Revision: https://phabricator.services.mozilla.com/D28442

--HG--
extra : moz-landing-system : lando
2019-05-02 10:35:49 +00:00
Ciure Andrei
38ce44ca57 Backed out 2 changesets (bug 1545766, bug 1546633) for causing browser_PanelMultiView_keyboard.js to perma fail CLOSED TREE
Backed out changeset 041741ce1646 (bug 1546633)
Backed out changeset fbc294a6fe78 (bug 1545766)
2019-05-01 09:02:48 +03:00
James Teh
6b2c1efe9c Bug 1546633: PanelMultiView: Send mousedown event when activating a button via the keyboard. r=Gijs
Previously, we sent a command event and a click event.
Normally, the command event executes the action, then the click event closes the menu.
However, in some cases (e.g. the Library button), there is no command event handler and the mousedown event executes the action instead.

Differential Revision: https://phabricator.services.mozilla.com/D29151

--HG--
extra : moz-landing-system : lando
2019-05-01 04:01:35 +00:00
James Teh
e5870b20a4 Bug 1545766: PanelMultiView: Don't override keyboard navigation in embedded documents. r=Gijs
Extension panels contain embedded documents; i.e. a <browser> element.
We want users to be able to tab to these and we want them to be focused automatically if a subview is opened from the keyboard, so treat them as tabbable.
However, once an embedded document is focused, we can't manage keyboard navigation inside it, so don't try.
Previously, we tried, which meant keys were overridden even though they didn't do anything, breaking keyboard navigation in extensions altogether.

Differential Revision: https://phabricator.services.mozilla.com/D28442

--HG--
extra : moz-landing-system : lando
2019-05-01 04:01:35 +00:00
Gijs Kruitbosch
32599911f8 Bug 1544447 - add support for numpad enter key and add tests to check activation works, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D28431

--HG--
extra : moz-landing-system : lando
2019-04-23 11:44:36 +00:00
Gijs Kruitbosch
00fe7a02db Bug 1539984 - pass along whether a focus change was tripped by a keypress to ensure :-moz-focusring works as designed, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D27874

--HG--
extra : moz-landing-system : lando
2019-04-23 11:12:02 +00:00
Bogdan Tara
a0ccfdb583 Backed out changeset 6fea732af766 (bug 1539984) for browser_PanelMultiView_keyboard.js failures CLOSED TREE 2019-04-23 06:41:42 +03:00
Gijs Kruitbosch
539daeb738 Bug 1539984 - pass along whether a focus change was tripped by a keypress to ensure :-moz-focusring works as designed, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D27874

--HG--
extra : moz-landing-system : lando
2019-04-22 23:41:56 +00:00
James Teh
1a6f689917 Bug 1454865: PanelMultiView: When entering a subview using the keyboard, focus the first button after the Back button in the subview. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D26067

--HG--
extra : moz-landing-system : lando
2019-04-15 01:38:15 +00:00
James Teh
4e6ac5b1e0 Bug 1477673: Refactor PanelMultiView keyboard navigation to use a TreeWalker. r=Gijs,johannh
Previously, this code cached a list of controls on first use and used that for navigation.
This refactor addresses several issues:

1. There is now a separate focus order for tab/shift+tab and down/up arrows.
    This allows menulists, textboxes, etc. which use the arrow keys themselves to be focused with tab, but skipped with the arrows.
    This means the user won't fall into these controls when using the up/down arrow keys and be confused by the subsequent arrowing behaviour.

2. When a menulist, textbox, etc. is focused, the arrow keys, space and enter are now passed to the control.
    This is a better fix for handling of the arrow keys by menulists (bug 1522092).
    It also fixes left arrow in a textarea moving to the previous view instead of moving the caret (bug 1489874).

3. This improves handling of dynamic updates to the panel.
    For example, elements that are initially disabled and enabled later will be navigable.
    This is because the next element is determined dynamically by the TreeWalker, rather than using a cached list.

4. The interim fix for bug 1522092 disabled PanelMultiView keyboard navigation.
    This caused some regressions, including arrow keys/activation on the Site Identity Report a Problem link (bug 1539976) and some controls not being navigable if the Site Identity panel is opened using the mouse (bug 1539984).
    With the above fixes, we can now re-enable PanelMultiView keyboard navigation in the Site identity panel and thus fix these regressions.

5. Previously, PanelMultiView keyboard navigation was disabled in the main toolbar overflow menu.
    This is because the search box can be added to the overflow menu, which previously caused problems for the arrow keys.
    With the above fixes, we can now safely enable PanelMultiView keyboard navigation in the overflow menu.

6. PanelMultiView keyboard tests have been added.
    Previously, we relied on tests specific to various panels to exercise this functionality.

Differential Revision: https://phabricator.services.mozilla.com/D25905

--HG--
extra : moz-landing-system : lando
2019-04-15 01:38:08 +00:00
Cosmin Sabou
65e5dc96a7 Backed out 2 changesets (bug 1477673, bug 1454865) for browser chrome failures on browser_PanelMultiView_keyboard. CLOSED TREE
Backed out changeset eca8a6e641c0 (bug 1454865)
Backed out changeset 69db665d8263 (bug 1477673)
2019-04-09 14:29:08 +03:00
James Teh
426d8677cb Bug 1454865: PanelMultiView: When entering a subview using the keyboard, focus the first button after the Back button in the subview. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D26067

--HG--
extra : moz-landing-system : lando
2019-04-09 09:54:41 +00:00
James Teh
a286b1ed3c Bug 1477673: Refactor PanelMultiView keyboard navigation to use a TreeWalker. r=Gijs,johannh
Previously, this code cached a list of controls on first use and used that for navigation.
This refactor addresses several issues:

1. There is now a separate focus order for tab/shift+tab and down/up arrows.
    This allows menulists, textboxes, etc. which use the arrow keys themselves to be focused with tab, but skipped with the arrows.
    This means the user won't fall into these controls when using the up/down arrow keys and be confused by the subsequent arrowing behaviour.

2. When a menulist, textbox, etc. is focused, the arrow keys, space and enter are now passed to the control.
    This is a better fix for handling of the arrow keys by menulists (bug 1522092).
    It also fixes left arrow in a textarea moving to the previous view instead of moving the caret (bug 1489874).

3. This improves handling of dynamic updates to the panel.
    For example, elements that are initially disabled and enabled later will be navigable.
    This is because the next element is determined dynamically by the TreeWalker, rather than using a cached list.

4. The interim fix for bug 1522092 disabled PanelMultiView keyboard navigation.
    This caused some regressions, including arrow keys/activation on the Site Identity Report a Problem link (bug 1539976) and some controls not being navigable if the Site Identity panel is opened using the mouse (bug 1539984).
    With the above fixes, we can now re-enable PanelMultiView keyboard navigation in the Site identity panel and thus fix these regressions.

5. Previously, PanelMultiView keyboard navigation was disabled in the main toolbar overflow menu.
    This is because the search box can be added to the overflow menu, which previously caused problems for the arrow keys.
    With the above fixes, we can now safely enable PanelMultiView keyboard navigation in the overflow menu.

6. PanelMultiView keyboard tests have been added.
    Previously, we relied on tests specific to various panels to exercise this functionality.

Differential Revision: https://phabricator.services.mozilla.com/D25905

--HG--
extra : moz-landing-system : lando
2019-04-09 09:54:39 +00:00
James Teh
5bada183cb Bug 1536521: Use a capturing listener for PanelMultiView's keydown handler. r=Gijs
PanelMultiView adds the keydown handler on the window so that it handles key presses when a panel appears but doesn't get focus, as happens when a button to open a panel is clicked with the mouse.
However, this means the listener is on an ancestor of the panel, which means that handlers such as ToolbarKeyboardNavigator are deeper in the tree.
Previously, PanelMultiView used a bubbling (default) listener.
This meant that ToolbarKeyboardNavigator handled the event first, causing it to interfere when a panel opened within the toolbar; e.g. the Library menu.
To fix this, use a capturing listener for PanelMultiView so it gets the event first.

Differential Revision: https://phabricator.services.mozilla.com/D24848

--HG--
extra : moz-landing-system : lando
2019-03-26 10:33:11 +00:00
Neil Deakin
66040975f2 Bug 1519953, replace calls to retrieve boxobject position and size with getBoundingClientRect, r=gijs
--HG--
extra : rebase_source : 65a9e08513ada3cda6beeb09d7f8a53620c2999f
2019-03-01 12:26:45 -05:00