Commit graph

316 commits

Author SHA1 Message Date
Niklas Baumgardner
e2f7fdc56e Bug 1905468 - Prevent some more mouse events from reaching the content page. r=sfoster, a=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D215515
2024-07-08 14:41:02 +00:00
Niklas Baumgardner
6b44186ea0 Bug 1902683 - Early return on keydown when screenshots button is focused. r=sfoster a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D213811
2024-06-15 13:40:07 +00:00
Moritz Beier
47de7bd820 Bug 1610530 - Use classes instead of ids to access urlbar elements from UrlbarInput. r=dao,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D212095
2024-06-04 12:58:52 +00:00
Niklas Baumgardner
f05bdcc1af Bug 1899801 - Explicitly handle keydown events on screenshots overlay buttons. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D212132
2024-05-31 20:07:07 +00:00
Tamas Szentpeteri
ef9f0e2522 Backed out changeset 1cca8bfcc170 (bug 1899801) for causing mochitest failures on browser_overlay_keyboard_test.js. CLOSED TREE 2024-05-31 13:54:19 +03:00
Niklas Baumgardner
fd18a2a0ae Bug 1899801 - Explicitly handle keydown events on screenshots overlay buttons. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D212132
2024-05-31 09:39:18 +00:00
Niklas Baumgardner
44836c5d47 Bug 1898027 - Update max filename length for screenshots downloads.r=sfoster,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D211223
2024-05-29 20:58:42 +00:00
Niklas Baumgardner
82745ae4d2 Bug 1897371 - Handle selectionchange events in screenshots overlay.r=kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D210813
2024-05-27 16:38:53 +00:00
Niklas Baumgardner
da75251680 Bug 1890721 - Prevent events from reaching the content page. r=sfoster,smaug
Differential Revision: https://phabricator.services.mozilla.com/D207749
2024-05-15 20:17:21 +00:00
Sandor Molnar
907f5bc3c9 Backed out changeset cc14c4f9f46e (bug 1890721) for causing bc failures @ browser/components/screenshots/tests/browser/browser_screenshots_page_unload.js CLOSED TREE 2024-05-15 21:03:34 +03:00
Niklas Baumgardner
3a74a799bd Bug 1890721 - Prevent events from reaching the content page. r=sfoster,smaug
Differential Revision: https://phabricator.services.mozilla.com/D207749
2024-05-15 13:45:25 +00:00
Niklas Baumgardner
0fa91d7bb3 Bug 1896002 - Enable screenshots preview buttons if download fails. r=sfoster,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D209979
2024-05-15 13:44:24 +00:00
Niklas Baumgardner
6db09b47aa Bug 1880398 - Fix browser_screenshots_telemetry_tests test failures. r=sfoster,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D209847
2024-05-09 15:21:22 +00:00
Niklas Baumgardner
077710c6ab Bug 1893800 - Align screenshots buttons container to viewport. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D209076
2024-05-08 19:50:43 +00:00
Norisz Fay
7c44bfe946 Backed out changeset 93caa282194b (bug 1893800) for causing bc failure on browser_test_resize.js 2024-05-07 05:55:47 +03:00
Niklas Baumgardner
f2d0238866 Bug 1893800 - Align screenshots buttons container to viewport. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D209076
2024-05-06 21:35:39 +00:00
Norisz Fay
e893f3b74e Backed out changeset b41cffd6d5f2 (bug 1893800) for causing failures on browser_test_element_picker.js CLOSED TREE 2024-05-06 20:31:29 +03:00
Niklas Baumgardner
0cbb15c60f Bug 1893800 - Align screenshots buttons container to viewport. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D209076
2024-05-06 16:41:59 +00:00
Niklas Baumgardner
6eb9b2d8f2 Bug 1893680 - Offset screenshots overlay when scrollMin is negative. r=sfoster,desktop-theme-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D208769
2024-05-04 19:41:59 +00:00
Niklas Baumgardner
49219fbed3 Bug 1801957 - Create region with keyboard for screenshots. r=sfoster,firefox-desktop-core-reviewers ,accessibility-frontend-reviewers,Gijs,morgan
The problem I'm trying to solve: There is currently no way to create a selected region in the screenshots overlay with the keyboard.
I recently added support for resizing a selected region in bug 1801954, but a user still needs to create a region with the mouse before the keyboard can be used.

I tried to look at what other browsers are doing in this scenario. Unfortunately there isn't much to go off. Most browsers, I can't even take a screenshot and the only browser that I found to have keyboard support for screenshots is MS Edge. In Edge, when you open screenshots, if your mouse isn't over the content area it will immediately move your mouse to the center of the page. If your mouse is over the content, it remains in place. Then, arrow keys will move the cursor around and you can hit space/enter to start creating a region.

I didn't like that Edge moved the mouse immediately after opening screenshots so I took a different approach.

My approach:
Screenshots will not move the mouse until an arrow key is pressed.
How it works:
If your cursor is above the content and an arrow key is pressed, the cursor will move in the direction of the arrow key that was pressed.
If your cursor is not above the content and a arrow key is pressed, the cursor will be moved to the middle of the content. Screenshots will not move the cursor until an arrow key is pressed.

When moving around the overlay with the keyboard: only hitting an arrow key will move the cursor around by 1px. If shift + arrow key, the cursor will move around by 10px.
When space is clicked while moving the cursor, it will start a region. Moving the arrow keys allows the region to sized.
When the cursor is above an element and the hover element rect is visible, hitting enter will select that region. If no hover element region exists, enter will behave the same as space.

I am also keeping the screenshots UI focused in this patch. Tab/shift + tab will keep focus to screenshots UI. Shift + F6 will escape the focus loop I've made in this patch if needed. Although, if a user has entered screenshots, it makes sense that for the current time, only screenshots UI is focusable.

Differential Revision: https://phabricator.services.mozilla.com/D197703
2024-05-03 22:05:52 +00:00
Niklas Baumgardner
4de00c46ab Bug 1894740 = Wait for image load before trying to save or copy. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D209295
2024-05-03 14:29:40 +00:00
Cristian Tuns
f388d3e51f Backed out changeset 91e7087aef18 (bug 1801957) for causing bc failures in browser_keyboard_tests.js CLOSED TREE 2024-05-02 12:14:10 -04:00
Niklas Baumgardner
83b479b588 Bug 1801957 - Create region with keyboard for screenshots. r=sfoster,firefox-desktop-core-reviewers ,accessibility-frontend-reviewers,Gijs,morgan
The problem I'm trying to solve: There is currently no way to create a selected region in the screenshots overlay with the keyboard.
I recently added support for resizing a selected region in bug 1801954, but a user still needs to create a region with the mouse before the keyboard can be used.

I tried to look at what other browsers are doing in this scenario. Unfortunately there isn't much to go off. Most browsers, I can't even take a screenshot and the only browser that I found to have keyboard support for screenshots is MS Edge. In Edge, when you open screenshots, if your mouse isn't over the content area it will immediately move your mouse to the center of the page. If your mouse is over the content, it remains in place. Then, arrow keys will move the cursor around and you can hit space/enter to start creating a region.

I didn't like that Edge moved the mouse immediately after opening screenshots so I took a different approach.

My approach:
Screenshots will not move the mouse until an arrow key is pressed.
How it works:
If your cursor is above the content and an arrow key is pressed, the cursor will move in the direction of the arrow key that was pressed.
If your cursor is not above the content and a arrow key is pressed, the cursor will be moved to the middle of the content. Screenshots will not move the cursor until an arrow key is pressed.

When moving around the overlay with the keyboard: only hitting an arrow key will move the cursor around by 1px. If shift + arrow key, the cursor will move around by 10px.
When space is clicked while moving the cursor, it will start a region. Moving the arrow keys allows the region to sized.
When the cursor is above an element and the hover element rect is visible, hitting enter will select that region. If no hover element region exists, enter will behave the same as space.

I am also keeping the screenshots UI focused in this patch. Tab/shift + tab will keep focus to screenshots UI. Shift + F6 will escape the focus loop I've made in this patch if needed. Although, if a user has entered screenshots, it makes sense that for the current time, only screenshots UI is focusable.

Differential Revision: https://phabricator.services.mozilla.com/D197703
2024-05-02 15:34:39 +00:00
Niklas Baumgardner
b3205338ac Bug 1892125 - Refactor screenshots preview. r=sfoster,fluent-reviewers,desktop-theme-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D207884
2024-04-30 23:55:55 +00:00
Niklas Baumgardner
5b6673f0bc Bug 1880529 - Requst animation frame at start of browser_test_resize. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D208036
2024-04-30 13:22:00 +00:00
Sam Foster
0accdc5e7f Bug 1893460 - Align overlay buttons to the end-edge of the selection box for LTR and RTL. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D208684
2024-04-26 23:45:25 +00:00
Niklas Baumgardner
c24dc60295 Bug 1873862 - Add border to screenshots selection size text. r=sfoster,kcochrane,desktop-theme-reviewers,jules
Differential Revision: https://phabricator.services.mozilla.com/D208408
2024-04-26 18:48:15 +00:00
Hanna Jones
36a699b418 Bug 1803678 - enable lazy loading of ESModule based moz- custom elements r=reusable-components-reviewers,pip-reviewers,credential-management-reviewers,translations-reviewers,kpatenio,issammani,mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D207445
2024-04-24 19:16:46 +00:00
Stanca Serban
72bee76688 Backed out changeset 58e1e96263b7 (bug 1803678) mochitests failures in test_confirm_delete_dialog.html. CLOSED TREE 2024-04-24 03:14:45 +03:00
Hanna Jones
dfc2a2c958 Bug 1803678 - enable lazy loading of ESModule based moz- custom elements r=reusable-components-reviewers,pip-reviewers,credential-management-reviewers,translations-reviewers,kpatenio,issammani,mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D207445
2024-04-23 19:28:47 +00:00
Aron Cseh
a3a7c8505a Backed out changeset 421fd8a0360c (bug 1803678) for causing mochitest failures on browser_translations_select_panel_init_failure.js CLOSED TREE 2024-04-23 18:16:55 +03:00
Hanna Jones
a1661cdc87 Bug 1803678 - enable lazy loading of ESModule based moz- custom elements r=reusable-components-reviewers,pip-reviewers,credential-management-reviewers,translations-reviewers,kpatenio,issammani,mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D207445
2024-04-23 13:52:27 +00:00
Dale Harvey
237dc6e110 Bug 1871206 - Implement secondary actions for the urlbar. r=mak,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203381
2024-04-23 11:33:33 +00:00
Anna Yeddi
a3d520fca1 Bug 1890802 - Update overlay.css in Screenshots to use forced-colors instead of prefers-contrast where appropriate. r=niklas,morgan,desktop-theme-reviewers,dao
As part of the [HCM and Increased Contrast Support in FX project](https://docs.google.com/document/d/1x37hxRrP9B2c3luy7sz748PCuVygvD3REsluQRQpfYE/edit?usp=sharing), the Accessibility team is auditing existing `prefers-contrast` media query blocks in mozilla-central. For each block with `prefers-contrast` media we want to convert it to `forced-colors` where appropriate.

Refer to the [bug 1877780 #c0](https://bugzilla.mozilla.org/show_bug.cgi?id=1877780#c0) for more information about the project.

Differential Revision: https://phabricator.services.mozilla.com/D207468
2024-04-19 16:56:04 +00:00
Sam Foster
83d5383b9b Bug 1818862 - Revise how we generate a filename to fit inside platform pathname length constraints. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D171632
2024-04-18 23:44:17 +00:00
Iulian Moraru
ca23572bdd Backed out changeset a188fd9e5365 (bug 1818862) for causing bc failures on browser_screenshots_download_filenames.js. CLOSED TREE 2024-04-18 06:40:48 +03:00
Sam Foster
465b642e9e Bug 1818862 - Revise how we generate a filename to fit inside platform pathname length constraints. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D171632
2024-04-17 23:37:19 +00:00
Niklas Baumgardner
2d0c9cc18c Bug 1887093 - Remember text selection regions during screenshots interactions. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D206696
2024-04-17 19:49:50 +00:00
Itiel
64b1ada9cb Bug 1891604 - Change the x sign in the Screenshots overlay to × r=niklas,sfoster,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D207480
2024-04-16 23:30:45 +00:00
Itiel
262930449f Bug 1891247 - Force LTR to the selection overlay size in the Screenshots overlay r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D207369
2024-04-16 04:15:26 +00:00
Niklas Baumgardner
c195ac253f Bug 1889797 - Remove screenshots-component-cancel-mac-button reference. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D206775
2024-04-07 12:26:48 +00:00
Niklas Baumgardner
75c9e75617 Bug 1886843 - Use moz-button-group for screenshots-buttons. r=sfoster,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D205389
2024-04-04 20:18:33 +00:00
Niklas Baumgardner
c3a7319e09 Bug 1889438 - Dragging scrollbar should not select region in screenshots. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D206534
2024-04-04 20:17:26 +00:00
Niklas Baumgardner
6e8c7cb8ac Bug 1889473 - Do not scroll when focusing screenshots buttons. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D206549
2024-04-04 20:06:35 +00:00
Niklas Baumgardner
9639f49368 Bug 1864038 - Add keyboard shortcuts for screenshots overlay. r=sfoster,fluent-reviewers,bolsson,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D193847
2024-04-03 23:51:56 +00:00
Cristian Tuns
74d7116454 Backed out changeset d41d18cecc78 (bug 1864038) for causing bc failures in browser_screenshots_drag_scroll_test.js CLOSED TREE 2024-04-02 12:41:01 -04:00
Niklas Baumgardner
ad214075f8 Bug 1864038 - Add keyboard shortcuts for screenshots overlay. r=sfoster,fluent-reviewers,bolsson,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D193847
2024-04-02 15:53:57 +00:00
Norisz Fay
d358fd5803 Backed out changeset 13111643fbf4 (bug 1864038) for causing bc failures on browser_screenshots_drag_scroll_test.js CLOSED TREE 2024-04-02 05:04:20 +03:00
Niklas Baumgardner
f92101ac64 Bug 1864038 - Add keyboard shortcuts for screenshots overlay. r=sfoster,fluent-reviewers,bolsson,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D193847
2024-04-01 22:33:12 +00:00
Narcis Beleuzu
4519bb1532 Backed out changeset 4bcd94d558a6 (bug 1864038) for bc failure on browser_screenshots_drag_scroll_test.js 2024-04-01 17:29:08 +03:00