Commit Graph

111 Commits

Author SHA1 Message Date
Gregory Pappas
2f3aa191a9 Bug 1966792 - Add keyboard shortcut to screenshots tooltip r=sfoster,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D249931
2025-05-22 05:47:47 +00:00
Niklas Baumgardner
934819c080 Bug 1948366 - Remove extensions.screenshots.disabled pref. r=sfoster,webdriver-reviewers,firefox-desktop-core-reviewers ,whimboo,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D248324
2025-05-20 23:49:14 +00:00
Niklas Baumgardner
a9afc3e1a0 Bug 1908205 - Switch to OffscreenCanvas and blobs for screenshots. r=sfoster,dimi
Differential Revision: https://phabricator.services.mozilla.com/D247483
2025-05-06 20:48:20 +00:00
Luca Greco
9b62e7c434 Bug 1948364 - part 3: Adjust BrowserGlue _monitorScreenshotsPref. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D238315
2025-03-06 16:24:02 +00:00
Gijs Kruitbosch
a17f03ba3d Bug 1926378 - put screenshots panel in the tabbox instead of the toolbox, r=niklas,mconley
Differential Revision: https://phabricator.services.mozilla.com/D226676
2024-10-24 16:35:08 +00:00
Alexandru Marc
48d42baa5d Backed out changeset 8275003e3b48 (bug 1926378) for causing bc failures @ browser_keyboard_tests.js . CLOSED TREE 2024-10-24 15:18:50 +03:00
Gijs Kruitbosch
70013575ad Bug 1926378 - put screenshots panel in the browser stack instead of the toolbox, r=niklas,mconley
Differential Revision: https://phabricator.services.mozilla.com/D226676
2024-10-24 11:15:40 +00:00
Chris H-C
724b00c304 Bug 1920562 - Remove JS uses of Services.telemetry.setEventRecordingEnabled r=florian,extension-reviewers,settings-reviewers,pip-reviewers,credential-management-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,sessionstore-reviewers,omc-reviewers,migration-reviewers,firefox-desktop-core-reviewers ,urlbar-reviewers,sfoster,nchevobbe,valentin,Gijs,dimi,lina,mconley,pdahiya,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D223833
2024-10-08 20:14:42 +00:00
Sandor Molnar
92076e16a7 Backed out 5 changesets (bug 1920562) for causing xpc assertion failures. CLOSED TREE
Backed out changeset 8f085ab589a8 (bug 1920562)
Backed out changeset 4405387ae770 (bug 1920562)
Backed out changeset a68fd13a33ae (bug 1920562)
Backed out changeset cd3672fc08ed (bug 1920562)
Backed out changeset 62ab18879eea (bug 1920562)
2024-10-08 00:16:13 +03:00
Chris H-C
e944bfe7a2 Bug 1920562 - Remove JS uses of Services.telemetry.setEventRecordingEnabled r=florian,settings-reviewers,pip-reviewers,credential-management-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,sessionstore-reviewers,omc-reviewers,migration-reviewers,firefox-desktop-core-reviewers ,urlbar-reviewers,sfoster,nchevobbe,valentin,Gijs,dimi,lina,mconley,pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D223833
2024-10-07 17:29:57 +00:00
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
Noemi Erli
90b5fb50ca Backed out changeset 10ac3f66133d (bug 1896232) for causing bug 1915806 CLOSED TREE 2024-08-30 16:33:37 +03:00
Niklas Baumgardner
0fc89881f5 Bug 1896232 - Wait for screenshot to download before closing overlay. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D216083
2024-08-29 03:21:44 +00:00
Iulian Moraru
6faba7e3b9 Backed out 2 changesets (bug 1908205, bug 1896232) for causing bc assertion failures on nsUrlClassifierDBService.cpp. CLOSED TREE
Backed out changeset 859b4c639883 (bug 1908205)
Backed out changeset 519e88d21955 (bug 1896232)
2024-08-22 22:20:42 +03:00
Niklas Baumgardner
ae2879abd5 Bug 1908205 - Switch to OffscreenCanvas and blobs for screenshots. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D216723
2024-08-22 18:36:48 +00:00
Niklas Baumgardner
b0381f7136 Bug 1896232 - Wait for screenshot to download before closing overlay. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D216083
2024-08-22 18:36:48 +00:00
Narcis Beleuzu
073a988929 Backed out 2 changesets (bug 1908205, bug 1896232) for causing mochitests failures . CLOSED TREE
Backed out changeset 873bbe70aa8c (bug 1908205)
Backed out changeset 0385fdac5693 (bug 1896232)
2024-08-19 19:04:38 +03:00
Niklas Baumgardner
10850a95fb Bug 1908205 - Switch to OffscreenCanvas and blobs for screenshots. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D216723
2024-08-19 14:40:42 +00:00
Niklas Baumgardner
ee55b5699a Bug 1896232 - Wait for screenshot to download before closing overlay. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D216083
2024-08-19 14:40:42 +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
d39a577986 Bug 1902303 - Focus browser before taking screenshot. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D213673
2024-06-25 16:16:32 +00:00
Narcis Beleuzu
ef43341f2c Backed out changeset 857a001b61ac (bug 1902303) for bc failures on browser_screenshots_telemetry_tests.js. CLOSED TREE 2024-06-18 02:32:29 +03:00
Niklas Baumgardner
09746b47b2 Bug 1902303 - Focus browser before taking screenshot. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D213673
2024-06-17 15:13:44 +00:00
Niklas Baumgardner
0625ba53c8 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
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
Niklas Baumgardner
cff46be6e9 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
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
02bab4e783 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
513fc5346b 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
14c6e7ba56 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
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
c300e0b0c4 Bug 1884936 - Make sure there are no gaps in screenshots canvas. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D204367
2024-03-12 19:34:25 +00:00
Niklas Baumgardner
7515009d91 Bug 1884172 - Use x-moz-nativeimage when copying screenshots to clipboard. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D204256
2024-03-12 19:03:33 +00:00
Stanca Serban
fe83932e94 Backed out changeset 1e8ffb360c27 (bug 1884172) for causing OSX mochitests failures in browser_screenshots_test_visible.js. CLOSED TREE 2024-03-12 19:10:04 +02:00
Niklas Baumgardner
1993607fe7 Bug 1884172 - Use x-moz-nativeimage when copying screenshots to clipboard. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D204256
2024-03-12 14:22:34 +00:00
Sandor Molnar
6b82cd2685 Backed out changeset a24a00e9a529 (bug 1884172) for causing bc failures @ browser/components/screenshots/tests/browser/browser_screenshots_test_full_page.js CLOSED TREE 2024-03-12 01:03:08 +02:00
Niklas Baumgardner
5b22671ddc Bug 1884172 - Use x-moz-nativeimage when copying screenshots to clipboard. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D204256
2024-03-11 16:18:31 +00:00
Niklas Baumgardner
04d3f814c0 Bug 1882925 - Floor coordinates before drawing to canvas in screenshots. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D203769
2024-03-07 22:55:58 +00:00
Niklas Baumgardner
d918992b35 Bug 1873947 - Fix dragging screenshots tab to new window. r=sfoster,mconley
Differential Revision: https://phabricator.services.mozilla.com/D198470
2024-03-07 13:32:00 +00:00
Sam Foster
e10d714796 Bug 1789727 - Default to the component implementation of Screenshots for nightly builds. r=extension-reviewers,sfoster,robwu,chutten
* Flip the component pref to true by default for nightly builds only
* Move the pref check and initialization to a startup idle task
* And be a bit smarter about when we get and disable the addon
* Fix a bug where we try to communicate with the overlay after the window actor is destroyed when
  the component pref gets flipped off during use

Differential Revision: https://phabricator.services.mozilla.com/D196888
2024-03-04 21:13:17 +00:00