101 Commits

Author SHA1 Message Date
Florian Quèze
cd093f0a88 Bug 1918702 - Migrate telemetry events to use Glean APIs for screenshots, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D222607
2024-09-20 13:58:19 +00:00
Niklas Baumgardner
0e39bf8f0c Bug 1894516 - Make screenshots face focusable via the keyboard. r=sfoster,desktop-theme-reviewers,fluent-reviewers,bolsson,ayeddi
Differential Revision: https://phabricator.services.mozilla.com/D213100
2024-07-29 16:59:14 +00:00
Norisz Fay
57a529f668 Backed out changeset 41d7f0b670ae (bug 1894516) for causing bc failures on browser_screenshots_focus_test.js CLOSED TREE 2024-07-25 23:50:34 +03:00
Niklas Baumgardner
68f4030f56 Bug 1894516 - Make screenshots face focusable via the keyboard. r=sfoster,desktop-theme-reviewers,fluent-reviewers,bolsson,ayeddi
Differential Revision: https://phabricator.services.mozilla.com/D213100
2024-07-25 14:32:27 +00:00
Niklas Baumgardner
0f68e482f0 Bug 1902683 - Early return on keydown when screenshots button is focused. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D213811
2024-06-15 13:40:07 +00:00
Niklas Baumgardner
2f657dabda 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
823f1023c3 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
6f36bc4b5e 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
71cbca48c0 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
f041168171 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
6a43a1bc2f 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
d7c54500fe 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
601e0ec15d 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
e0f484f1b4 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
9bcd4d4100 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
Cristian Tuns
f3f0feda63 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
f00889c4fc 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
286abf76a1 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
Sam Foster
1da0f7cb9e 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
1dd7d9353d 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
9c5308cf95 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
89ee64f0b2 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
4d48f422ce 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
702322e242 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
1abddd1c95 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
83896edc65 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
c7874fdeb6 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
61257b3d08 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
70450dd2d1 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
8e1286070a Backed out changeset 4bcd94d558a6 (bug 1864038) for bc failure on browser_screenshots_drag_scroll_test.js 2024-04-01 17:29:08 +03:00
Niklas Baumgardner
9be70cc492 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 13:51:16 +00:00
Niklas Baumgardner
fa642985ac Bug 1881506 - Handle all button clicks in screenshots overlay. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D204985
2024-03-25 20:55:13 +00:00
Niklas Baumgardner
fa1d4eb19d Bug 1883717 - Correctly display screenshot size in overlay. r=sfoster,firefox-desktop-core-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D204946
2024-03-25 20:35:03 +00:00
Niklas Baumgardner
410fa07e7a Bug 1883765 - Screenshots direction should match browser direction. r=sfoster,Itiel
Differential Revision: https://phabricator.services.mozilla.com/D205338
2024-03-25 13:40:39 +00:00
Niklas Baumgardner
33c3a923a1 Bug 1883678 - Dispatch screenshots events to chrome only. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D203631
2024-03-05 18:52:34 +00:00
Niklas Baumgardner
4a088b2a9e Bug 1874026 - Be careful not to draw screenshots overlay outside document. r=sfoster,desktop-theme-reviewers,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D198467
2024-02-14 15:16:12 +00:00
Niklas Baumgardner
bb40d6b5a8 Bug 1791086 - Select elements within iframes in screenshots. r=sfoster,mconley
Differential Revision: https://phabricator.services.mozilla.com/D195165
2024-02-09 22:02:51 +00:00
Niklas Baumgardner
d4bf26d83f Bug 1878141 - Move focus by key in screenshots. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D200381
2024-02-06 14:37:21 +00:00
Iulian Moraru
0f47785cac Backed out changeset 4726abbc0c2c (bug 1874026) for causing multiple frequent bc failures. CLOSED TREE 2024-02-02 21:23:59 +02:00
Niklas Baumgardner
6b3e9794e8 Bug 1874026 - Be careful not to draw screenshots overlay outside document. r=sfoster,desktop-theme-reviewers,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D198467
2024-02-02 14:16:53 +00:00
Niklas Baumgardner
1b14ee1867 Bug 1874380 - Fix HCM for screenshots initial state. r=sfoster,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D198868
2024-02-01 22:10:12 +00:00
Cristian Tuns
e2d969d64e Backed out changeset e1b248076131 (bug 1874026) for causing bc failures in browser_test_resize.js CLOSED TREE 2024-01-30 17:16:32 -05:00
Niklas Baumgardner
3f4770864a Bug 1874026 - Be careful not to draw screenshots overlay outside document. r=sfoster,desktop-theme-reviewers,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D198467
2024-01-30 21:30:04 +00:00
Niklas Baumgardner
9b5daf0abd Bug 1867644 - Focus last used button for screenshots UI. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D197348
2024-01-19 22:08:30 +00:00
Stanca Serban
458c9f5419 Backed out changeset 9df2731a0530 (bug 1867644) for causing mochitests failures in browser_contentAltClick.js on OSX. CLOSED TREE 2024-01-20 03:59:49 +02:00
Niklas Baumgardner
dd6b11b910 Bug 1867644 - Focus last used button for screenshots UI. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D197348
2024-01-19 22:08:30 +00:00
Natalia Csoregi
eb2e3cf8cb Backed out changeset c6a30d94edf2 (bug 1867644) for causing failures on browser_screenshots_drag_test.js. CLOSED TREE 2024-01-19 03:46:03 +02:00
Niklas Baumgardner
729c5b4066 Bug 1867644 - Focus last used button for screenshots UI. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D197348
2024-01-19 00:07:46 +00:00
Iulian Moraru
e1d66150c9 Backed out changeset 2b70f662a797 (bug 1867644) for causing bc failures on browser_overlay_keyboard_test.js. CLOSED TREE 2024-01-18 22:14:11 +02:00
Niklas Baumgardner
6dd5c4f60b Bug 1867644 - Focus last used button for screenshots UI. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D197348
2024-01-18 17:47:54 +00:00