Commit Graph

72 Commits

Author SHA1 Message Date
ramya
8c14a92baa Bug 1697226 - Added option to print current page. r=sfoster,fluent-reviewers,flod,mstriemer
Added the option to print the current page to print UI.
Added tests to check if current page is selected correctly.

Differential Revision: https://phabricator.services.mozilla.com/D152810
2022-08-11 19:47:20 +00:00
Antonin LOUBIERE
eaab02de17 Bug 35228 - Ability to print even/odd pages. r=emilio,fluent-reviewers,mstriemer
Ability to print all even pages or all odd pages.

Differential Revision: https://phabricator.services.mozilla.com/D130111
2021-11-10 20:08:58 +00:00
Mark Striemer
aefaad96af Bug 1666247 - Part 1: Add a simplify page checkbox r=emalysz,flod
Differential Revision: https://phabricator.services.mozilla.com/D102356
2021-07-08 03:54:19 +00:00
Emma Malysz
2f15254478 Bug 1685352, adjust print modal to match proton styles r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D113031
2021-04-22 18:39:09 +00:00
Sam Foster
ba63a81a83 Bug 1682162 - Use the paperSizeUnit to display and handle mm/inch custom margin values. r=emalysz,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D104291
2021-03-13 00:27:53 +00:00
Emma Malysz
5493e49179 Bug 1669732, add error message for invalid number of copies r=mstriemer,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D103385
2021-02-18 16:23:54 +00:00
Erik Nordin
74a4b0dbf2 Bug 1692316 - Part 2: Update Print UI Duplex Terminology r=dholbert,fluent-reviewers,sfoster
Updates the print UI to use the new "long edge" and "short edge"
duplex print terminology that is now used in the print platform.

Differential Revision: https://phabricator.services.mozilla.com/D105500
2021-02-17 23:57:27 +00:00
Erik Nordin
19442ae4bc Bug 1692316 - Part 1: Update Platform Duplex Print Terminology r=dholbert
This patch updates the terminology used by the print platform from
the formerly used terms of "side edge" and "top edge" to now using
terms of "long edge" and "short edge".

These terms more accurately describe our existing implementation
behavior, and they are congruent with many existing APIs that also
use "long edge" and "short edge" terminology.

Differential Revision: https://phabricator.services.mozilla.com/D105499
2021-02-17 23:57:26 +00:00
Itiel
3148a5d7de Bug 1689480 - Changes to the print UI checkboxes and radiobuttons to accomodate for the added margin-block r=mstriemer
This also gets rid of the non clickable area between the checkbox/radiobutton and its label.

Differential Revision: https://phabricator.services.mozilla.com/D103397
2021-02-12 17:05:28 +00:00
Emilio Cobos Álvarez
799d6c68a0 Bug 1671702 - Expose both duplex print settings from the print UI. r=sfoster,fluent-reviewers,nordzilla
We can't wait forever for icons, and exposing the functionality using a
`<select>` is trivial and can be changed later easily if we come up with
a better UI.

Differential Revision: https://phabricator.services.mozilla.com/D104616
2021-02-11 19:27:58 +00:00
Mark Striemer
a7894cbe31 Bug 1668849 - Part 1: Unify more print settings to PrintSettingNumber r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D101676
2021-01-18 23:01:24 +00:00
Sam Foster
9efb9f4213 Bug 1683658 - Associate the pages-per-sheet label with the select/picker. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D101410
2021-01-13 19:20:56 +00:00
Daniel Holbert
de01a4eaec Bug 1669905 part 4: Offer 2 and 6 in the "pages per sheet" dropdown-menu in modal print UI, now that they're supported on the platform side. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D99554
2021-01-11 17:44:28 +00:00
Emma Malysz
52e441a4cb Bug 1682290, set max on copies input and disable form with invalid input r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D99732
2020-12-19 01:21:11 +00:00
Emma Malysz
8647c92f00 Bug 1670122: add check box in print UI to print selection only. r=mstriemer,fluent-reviewers,flod
Uses a new printing actor to determine if there was a selection within
the browsing context.

We now create two browsers, the primary browser and a selected browser,
and will use the appropriate browser depending on the settings value
for printSelectionOnly.

Differential Revision: https://phabricator.services.mozilla.com/D94467
2020-12-17 23:14:43 +00:00
Sam Foster
5edce709bf Bug 1674772 - New string for the 'Custom (inches) option and hidden described-by labels for each margin edge. r=mstriemer,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D98837
2020-12-12 23:33:06 +00:00
Mark Striemer
3647c0b05e Bug 1679133 - Show a Printing... message and spinner when printing r=sfoster,fluent-reviewers
This hides the platform provided printing dialog which shows progress while printing.
The dialog is dated but does provide an actual 0-100% progress indicator which
unfortunately this does not replace. It also provides a "Cancel" button which
also unfortunately doesn't work and gets us into a bad state.

This provides a simple spinner and a Printing... message to replace that dialog
so that the user knows that something is still happening.

Differential Revision: https://phabricator.services.mozilla.com/D99504
2020-12-12 22:34:26 +00:00
Mark Striemer
66aedbd9fe Bug 1669725 - Hide print settings that don't apply to PDF for PDFs r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D98679
2020-12-11 20:55:46 +00:00
Mihai Alexandru Michis
1bf907c941 Backed out changeset 5f2f88dae91f (bug 1669725) for causing linux bc failures in RunWatchdog.
CLOSED TREE
2020-12-09 23:44:21 +02:00
Mark Striemer
2de606025f Bug 1669725 - Hide print settings that don't apply to PDF for PDFs r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D98679
2020-12-09 20:30:04 +00:00
Emma Malysz
0d5f044762 Bug 499640: add frontend support for non-contiguous page ranges r=mstriemer,fluent-reviewers
A comma will separate the list of ranges, and a dash indicates a page range.
If the print preview returns an empty page, we send an update event
to display all pages and invalidate the form.

This patch also changes how we create deferred tasks and instead has the
PrintEventHandler create them. Depending on the type of setting changed,
the PrintEventHandler either immediately handles the event or arms the
delayed settings change task. If the input is invalid, we cancel the settings
change and disarm the task. We finalize any pending tasks when the user prints
and recreate them in case the print was "unsuccessful," meaning the form
is now invalid or the user cnacelled saving as a pdf.

Differential Revision: https://phabricator.services.mozilla.com/D95222
2020-12-07 21:19:16 +00:00
Mark Striemer
fdfc9bf4da Bug 1673713 - Part 2: Pages per sheet option behind a pref r=sfoster,fluent-reviewers,flod
This adds the pages per sheet option behind the print.pages_per_sheet.enabled
pref. Sizes of 2 and 6 aren't supported yet, so this is off by default.

Differential Revision: https://phabricator.services.mozilla.com/D95335
2020-11-30 22:46:46 +00:00
Sam Foster
efcef1ea29 Bug 1675636 - Switch cancel button label to 'close' while printing. r=mstriemer,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D97818
2020-12-01 00:41:54 +00:00
Erik Nordin
5a2b9326a7 Bug 1666734 - Add two-sided printing checkbox to print UI r=sfoster,fluent-reviewers,flod,AlaskanEmily
This patch adds a new checkbox to the print UI for two-sided printing.
The checkbox is only visible if the currently selected printer supports
two-sided printing.

Notable Changes:
  - Add new section and checkbox for two-sided printing.
  - Add new getter to settings proxy for supportsDuplex.
  - Add new setter/getter to settings proxy for printDuplex.
  - Add new test for no duplex with PDF printer.
  - Add new test for toggle duplex in portrait orientation.
  - Add new test for toggle duplex in landscape orientation.
  - Add new test for toggle orientation with duplex checked.
  - Correctly set duple mode in GTK print settings.

Depends on D94026

Differential Revision: https://phabricator.services.mozilla.com/D93621
2020-11-06 06:33:27 +00:00
Razvan Maries
ac68bcb8a5 Backed out changeset 905f54a1dfed (bug 1666734) for perma failures on test_get_printer_paper_sizes.html. CLOSED TREE 2020-11-06 08:01:06 +02:00
Erik Nordin
95cefa9e21 Bug 1666734 - Add two-sided printing checkbox to print UI r=sfoster,fluent-reviewers,flod,AlaskanEmily
This patch adds a new checkbox to the print UI for two-sided printing.
The checkbox is only visible if the currently selected printer supports
two-sided printing.

Notable Changes:
  - Add new section and checkbox for two-sided printing.
  - Add new getter to settings proxy for supportsDuplex.
  - Add new setter/getter to settings proxy for printDuplex.
  - Add new test for no duplex with PDF printer.
  - Add new test for toggle duplex in portrait orientation.
  - Add new test for toggle duplex in landscape orientation.
  - Add new test for toggle orientation with duplex checked.
  - Correctly set duple mode in GTK print settings.

Depends on D94026

Differential Revision: https://phabricator.services.mozilla.com/D93621
2020-11-06 01:14:15 +00:00
Mark Striemer
16049c2b0e Bug 1666776 - Start print with Enter when select is focused r=Jamie,emalysz
Pressing Enter with the initial focus of the print destination select element
will now start the print.
Move a couple :focus rules to use :-moz-focusring for consistency in the print UI.

Differential Revision: https://phabricator.services.mozilla.com/D91839
2020-10-07 03:16:22 +00:00
Emma Malysz
f3fa28a5e1 Bug 1664570: implement custom margins in new print UI r=sfoster,mstriemer,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D90636
2020-09-30 23:17:36 +00:00
Jonathan Kew
b65c4642a1 Bug 1665904 - Rename paperName to paperId for better clarity (front-end). r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D90791
2020-09-20 14:09:59 +00:00
Sebastian Hengst
b676d04b21 Backed out changeset 5d68f435c87f (bug 1661984) for failing browser-chrome's browser_system_dialog_subdialog_hidden.js. CLOSED TREE 2020-09-18 20:19:40 +02:00
Hiroyuki Ikezoe
6d71e7167f Bug 1661984 - Add a browser mochitest to make sure printing in a container tab doesn't crash. r=emilio,hiro
Differential Revision: https://phabricator.services.mozilla.com/D88927
2020-09-18 15:44:52 +00:00
Bogdan Tara
24978c1b9f Backed out changeset 0fc0697f44e7 (bug 1661984) for browser_print_in_container.js failures CLOSED TREE 2020-09-17 20:00:07 +03:00
Hiroyuki Ikezoe
a5124b9eff Bug 1661984 - Add a browser mochitest to make sure printing in a container tab doesn't crash. r=emilio,hiro
Differential Revision: https://phabricator.services.mozilla.com/D88927
2020-09-16 22:35:52 +00:00
Sam Foster
968eccaf70 Bug 1662699 - Disable margin options when they are redundant. r=emalysz
* Default margins should always be at least the unwriteable margins
* Hide redundant options - ie. they represent the same set of values as a previous option, evaluated in the order "none", "default", "minimum"

Differential Revision: https://phabricator.services.mozilla.com/D90195
2020-09-16 18:49:47 +00:00
Gijs Kruitbosch
b2e403f089 Bug 1659877 - expose print dialog error messages to assistive technology via role=alert and aria-errormessage, r=Jamie,emalysz
Differential Revision: https://phabricator.services.mozilla.com/D89225
2020-09-14 18:47:48 +00:00
Mark Striemer
556fdaa63d Bug 1662845 - Hide sheet count while loading print dialog r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D89221
2020-09-02 22:50:47 +00:00
Sam Foster
14f5243df9 Bug 1659757 - Add paper size picker. r=mstriemer
* Build dictionary of paper sizes at init and whenever the printer changes
* Fetch async margin properties on the selected paper
* Find a paper match by size to selected the correct paper when opening a print dialog or switching to a different printer
* Add virtual properties for paperSize and currentPaper
* Refresh margin settings when the paperName changes as these may be computed

Differential Revision: https://phabricator.services.mozilla.com/D87943
2020-09-02 16:30:55 +00:00
James Teh
b03735d5a8 Bug 1661382: Remove header and footer a11y semantics for print modal. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D88368
2020-08-27 19:53:02 +00:00
James Teh
18a7d0a452 Bug 1660400: Include sheet count in Print modal a11y description and make it a live region. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D87978
2020-08-27 13:58:33 +00:00
Emilio Cobos Álvarez
72b9881e7e Bug 1660857 - Disable color switch for print-to-pdf and on mac. r=emalysz
See the comments as for why.

Differential Revision: https://phabricator.services.mozilla.com/D88301
2020-08-27 10:05:24 +00:00
Narcis Beleuzu
75e7fe235b Backed out 2 changesets (bug 1660857) for bc failures on browser_parsable_css.js . CLOSED TREE
Backed out changeset 1378546cc0db (bug 1660857)
Backed out changeset 6c8985ac1d4c (bug 1660857)
2020-08-27 00:28:58 +03:00
Emilio Cobos Álvarez
10c7dbdd9c Bug 1660857 - Disable color switch for print-to-pdf and on mac. r=emalysz
See the comments as for why.

Differential Revision: https://phabricator.services.mozilla.com/D88301
2020-08-26 19:12:20 +00:00
Mark Striemer
ee698e951e Bug 1661020 - Only update the copies count when it's valid r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D88159
2020-08-25 17:24:28 +00:00
Emma Malysz
b570816e35 Bug 1658833: disable color option if the selected printer does not support printing in color r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D87653
2020-08-22 01:33:36 +00:00
Emma Malysz
f8b98f827b Bug 1653389, show clearer error message if the start range is greater than the end range r=fluent-reviewers,mstriemer,flod
Differential Revision: https://phabricator.services.mozilla.com/D87676
2020-08-21 15:10:21 +00:00
Jonathan Watt
9221a668cb Bug 1659870. Rename print scaling 'Fit to page' to 'Fit to page width'. r=mstriemer,fluent-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D87792
2020-08-20 20:32:24 +00:00
Emma Malysz
4ffa8e011f Bug 1653389, show error if page range input is invalid r=fluent-reviewers,sfoster,flod
Matches scale naming format.

Differential Revision: https://phabricator.services.mozilla.com/D87396
2020-08-19 22:17:03 +00:00
Emma Malysz
15a3804a78 Bug 1653389, validate page range setting r=sfoster,mstriemer,fluent-reviewers,flod
Creates two input elements for the start and end range.

Differential Revision: https://phabricator.services.mozilla.com/D85349
2020-08-19 22:17:00 +00:00
Sam Foster
c515e0f438 Bug 1653607 - Add margins, color mode controls to the print UI. r=emalysz,fluent-reviewers,mstriemer,flod
* New PrintSettingSelect element for the margin and color-mode picker
* The destination-picker and color-mode picker now extend the PrintSettingSelect
* Drive-by change to have numCopies info use the PrintSettingNumber for consistency & code reuse
* Margin presets are retrieved from a defaultSettings object which is the settings for the current printer without the user pref values

Differential Revision: https://phabricator.services.mozilla.com/D86849
2020-08-19 17:23:18 +00:00
Mark Striemer
68ce237c61 Bug 1659463 - Include spin button for print zoom setting r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D87344
2020-08-19 14:18:42 +00:00