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
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
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
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
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
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
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
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
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
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
* 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
* 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
* 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