Commit Graph

83 Commits

Author SHA1 Message Date
Jonathan Watt
b677f00ccc Bug 1769388 - Change nsIPrintSettingsService's 'newPrintSettings' attribute to a 'createNewPrintSettings' function. r=bobowen,webdriver-reviewers,whimboo
Having an attribute be a constructor is just...wrong.

Differential Revision: https://phabricator.services.mozilla.com/D146383
2022-05-16 11:50:34 +00:00
Jonathan Watt
e336997b9a Bug 1769129. Remove nsIPrintSettings.isPrintSelectionRBEnabled. r=emilio
nsIPrintSettings is supposed to be a collection of settings passed to the
platform code to determine how the document prints. The
isPrintSelectionRBEnabled member doesn't belong here since it is a flag that
is passed to the OS native print settings dialog to tell it whether to
display a "Print selection only" radio button.

Depends on D146232

Differential Revision: https://phabricator.services.mozilla.com/D146251
2022-05-13 15:26:07 +00:00
Cristian Tuns
cebb65e9b3 Backed out changeset 00ef44ea9e3f (bug 1769129) for causing build bustages on nsPrintDialogX.mm CLOSED TREE 2022-05-13 08:20:12 -04:00
Jonathan Watt
7509ece9d9 Bug 1769129. Remove nsIPrintSettings.isPrintSelectionRBEnabled. r=emilio
nsIPrintSettings is supposed to be a collection of settings passed to the
platform code to determine how the document prints. The
isPrintSelectionRBEnabled member doesn't belong here since it is a flag that
is passed to the OS native print settings dialog to tell it whether to
display a "Print selection only" radio button.

Differential Revision: https://phabricator.services.mozilla.com/D146251
2022-05-13 11:57:08 +00:00
Emilio Cobos Álvarez
202fcd0999 Bug 1760836 - Support printing to an nsIOutputStream. r=jfkthame,jrmuizel,webdriver-reviewers,geckoview-reviewers,agi
The trickiest bits are the PrintTargetCG ones, the rest is just plumbing
and cleanups and tests, but let me know if you want those to be split
out, can do.

The GTK change to nsPrintSettingsGTK::GetResolution is a no-op (we only
read resolution on windows), but I did that because we assume that it
doesn't fail and GTK returns a sane default anyways.

Differential Revision: https://phabricator.services.mozilla.com/D142199
2022-03-30 18:51:58 +00:00
Iulian Moraru
7106f0368c Backed out changeset d42d7505c9cf (bug 1760836) for causing mochitest failures on browser_print_stream.js. CLOSED TREE 2022-03-29 23:32:39 +03:00
Emilio Cobos Álvarez
2ee3ba7653 Bug 1760836 - Support printing to an nsIOutputStream. r=jfkthame,jrmuizel,webdriver-reviewers,geckoview-reviewers,agi
The trickiest bits are the PrintTargetCG ones, the rest is just plumbing
and cleanups and tests, but let me know if you want those to be split
out, can do.

The GTK change to nsPrintSettingsGTK::GetResolution is a no-op (we only
read resolution on windows), but I did that because we assume that it
doesn't fail and GTK returns a sane default anyways.

Differential Revision: https://phabricator.services.mozilla.com/D142199
2022-03-29 17:50:58 +00:00
Jonathan Watt
c1297c6a6c Bug 1745325 - Remove unnecessary setting of print.tab_modal.enabled=true in tests. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D133449
2021-12-10 22:56:09 +00:00
Iulian Moraru
bfa41f4b1b Backed out changeset 01eb21de6aef (bug 1745325) for causing mochitest failures on browser_preview_print_coop.js. CLOSED TREE 2021-12-10 07:28:02 +02:00
Jonathan Watt
aa399cfa50 Bug 1745325 - Remove unnecessary setting of print.tab_modal.enabled=true in tests. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D133449
2021-12-10 03:11:13 +00:00
Christoph Kerschbaumer
83fbbc882d Bug 1742776: Update more tests within toolkit/components to work with https-first enabled r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D132003
2021-11-24 16:59:10 +00:00
Hanna Jones
84cc5d012d Bug 1670871 - truncate custom margin max attr to two decimal places r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D125879
2021-09-17 15:28:49 +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
Emilio Cobos Álvarez
bed5733dea Bug 1705757 - Add a test for this. r=nika
There was none, of course :(

Depends on D112413

Differential Revision: https://phabricator.services.mozilla.com/D112414
2021-04-17 18:41:12 +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
d63cfba21c Bug 1688099, save more settings state in a pref and honor value on subsequent prints r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D104121
2021-02-08 22:40:37 +00:00
Emilio Cobos Álvarez
5b04df4419 Bug 1618553 - Allow pdf.js to block the load event until pages are loaded. r=bdahl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D103559
2021-02-07 14:58:06 +00:00
Csoregi Natalia
66dc2760d7 Backed out changeset 8ad92a745085 (bug 1618553) for failures on browser_download_open_with_internal_handler.js. CLOSED TREE 2021-02-07 15:40:21 +02:00
Emilio Cobos Álvarez
e36009a4b0 Bug 1618553 - Allow pdf.js to block the load event until pages are loaded. r=bdahl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D103559
2021-02-07 12:04:22 +00:00
Emma Malysz
b0e5ed5625 Bug 1678293, update progress indicator string and limit how long a user has an empty document when saving a large file r=mstriemer,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D101854
2021-01-19 20:28:07 +00:00
Micah Tigley
e6541ef741 Bug 1680637 - Rename TabDialogBox's manager to tabDialogManager r=marionette-reviewers,Gijs
To clarify the two separate SubDialog managers managed by TabDialogManager, this patch renames `_.dialogManager` to `._tabDialogManager`.

Depends on D100066

Differential Revision: https://phabricator.services.mozilla.com/D100955
2021-01-14 06:55:55 +00:00
Butkovits Atila
24473dc461 Backed out 4 changesets (bug 1680637, bug 1682395) for causing Marionette failures. CLOSED TREE
Backed out changeset 073e0be7db95 (bug 1680637)
Backed out changeset 552b91b31b0f (bug 1682395)
Backed out changeset c80de6c72779 (bug 1680637)
Backed out changeset d513e228b0ad (bug 1680637)
2021-01-13 02:13:06 +02:00
Micah Tigley
6e23f8d01a Bug 1680637 - Rename TabDialogBox's manager to tabDialogManager r=marionette-reviewers,Gijs
To clarify the two separate SubDialog managers managed by TabDialogManager, this patch renames `_.dialogManager` to `._tabDialogManager`.

Depends on D100066

Differential Revision: https://phabricator.services.mozilla.com/D100955
2021-01-11 20:55:19 +00:00
Bogdan Tara
b79b69550f Backed out 3 changesets (bug 1680637, bug 1682395) for browser/base/content/* failures CLOSED TREE
Backed out changeset 270e2e3183de (bug 1682395)
Backed out changeset e3566f596187 (bug 1680637)
Backed out changeset 66563136c84e (bug 1680637)
2021-01-11 21:36:20 +02:00
Micah Tigley
294f4945cf Bug 1680637 - Rename TabDialogBox's manager to tabDialogManager r=marionette-reviewers,Gijs
To clarify the two separate SubDialog managers managed by TabDialogManager, this patch renames `_.dialogManager` to `._tabDialogManager`.

Depends on D100066

Differential Revision: https://phabricator.services.mozilla.com/D100955
2021-01-11 05:13:00 +00:00
Emilio Cobos Álvarez
62c8c19ebc Bug 1683831 - Add a test for this. r=emalysz
I thought it was going to be more annoying than this. Still I had to
make some changes to catch the bug properly, so requesting review
separately.

Differential Revision: https://phabricator.services.mozilla.com/D100374
2021-01-04 19:45:47 +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
Mark Striemer
89e9475076 Bug 1676388 - Part 1: Don't update to new printer settings if printer has since changed r=sfoster
When changing printers one of them could be slower than another. If you change
to a slow printer and back to an already loaded/fast printer then the slow
printer shouldn't overwrite the settings once it finally loads.

Example: Start print on PDF printer, switch to a physical printer and back to PDF. If
the physical printer had to be contacted to pull settings this operation could take
a few seconds, at which point the settings from the physical printer could overwrite
the PDF printer settings.

Differential Revision: https://phabricator.services.mozilla.com/D99135
2020-12-10 04:34:37 +00:00
Sam Foster
69e18b4ee0 Bug 1654684 - Add sheet-indicator and preview navigation to the print preview. r=mstriemer,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D96737
2020-12-09 20:56:28 +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
Csoregi Natalia
ab71c86aaf Backed out 2 changesets (bug 1654684) for browser chrome failures with .printPreviewCurrentPageNumber. CLOSED TREE
Backed out changeset 2fdc1b5569e1 (bug 1654684)
Backed out changeset 8ae1d037aa9c (bug 1654684)
2020-12-09 16:11:42 +02:00
Sam Foster
b39650600d Bug 1654684 - Add sheet-indicator and preview navigation to the print preview. r=mstriemer,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D96737
2020-12-09 02:59:26 +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
Brindusan Cristian
76c9db8ae8 Backed out 2 changesets (bug 1654684) for bc failures at browser_ext_tabs_printPreview. CLOSED TREE
Backed out changeset 5a0333ca8a19 (bug 1654684)
Backed out changeset 87d06a4d6ab6 (bug 1654684)
2020-12-07 12:59:10 +02:00
Sam Foster
9528af8e33 Bug 1654684 - Add sheet-indicator and preview navigation to the print preview. r=mstriemer,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D96737
2020-12-07 08:44:14 +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
Emma Malysz
1d83ba5460 Bug 1670222: do not wait for print preview to finish rendering when printing from the system dialog r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D95944
2020-11-18 16:26:24 +00:00
Bogdan Tara
a6180b1c56 Backed out changeset 66f7f7cbb92b (bug 1670222) for toolkit/components/printing/ mochitest failures CLOSED TREE 2020-11-18 03:16:31 +02:00
Emma Malysz
e77181aa20 Bug 1670222: do not wait for print preview to finish rendering when printing from the system dialog r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D95944
2020-11-17 23:03:59 +00:00
Emilio Cobos Álvarez
d1c43878e6 Bug 1669854 - Add a single pageRanges print setting. r=nordzilla
... which is an array of pairs of ranges, and use it instead of the
existing printRange / startPage / endPage settings.

Differential Revision: https://phabricator.services.mozilla.com/D96093
2020-11-07 16:01:57 +00:00
Emilio Cobos Álvarez
719e59b40f Bug 1674135 - Don't destroy frames from hideDialog() as we rely on printing hidden frames. r=Gijs,preferences-reviewers
Using `visibility` preserves frames of the content inside the dialog,
which we rely on to print the preview `<browser>` element.

This was working before bug 1662336 mostly by chance, because we were
doing an extra clone and that happened to mostly not rely on the cloned
document being rendered.

I'd rather fix it in the front-end (by not trying to print a
`display: none` <browser>) than going back to do a separate clone,
because that can get expensive (specially with fission).

It's not super-clear to me how to best test the "print from system
dialog" case, but ideas certainly welcome.

Differential Revision: https://phabricator.services.mozilla.com/D95501
2020-11-04 11:03:48 +00:00
Razvan Maries
dde7490fbf Backed out changeset b5330b68ce05 (bug 1674135) for perma failures on browser_siteData2.js and browser_pdf_printer_settings.js. CLOSED TREE 2020-11-04 02:43:34 +02:00
Emilio Cobos Álvarez
e473e3b272 Bug 1674135 - Don't destroy frames from hideDialog() as we rely on printing hidden frames. r=Gijs,preferences-reviewers
Using `visibility` preserves frames of the content inside the dialog,
which we rely on to print the preview `<browser>` element.

This was working before bug 1662336 mostly by chance, because we were
doing an extra clone and that happened to mostly not rely on the cloned
document being rendered.

I'd rather fix it in the front-end (by not trying to print a
`display: none` <browser>) than going back to do a separate clone,
because that can get expensive (specially with fission).

It's not super-clear to me how to best test the "print from system
dialog" case, but ideas certainly welcome.

Differential Revision: https://phabricator.services.mozilla.com/D95501
2020-11-03 23:36:32 +00:00
Emily McDonough
1cf8a6aad5 Bug 1663652 part 1 - Implement combined CreateDefaultSettings and GetPaperList interface for nsPrinterBase r=emilio,mstriemer
This also changes the frontend to use this interface.

This will be a bit less efficient in the general case, as it will serialize the
PaperList and DefaultSettings fetches. But most of the large delays seem to
occur when the print server is slow to respond, and ultimately using a single
live connection for both these requests when possible (particularly with CUPS)
should improve the total latency when the printer or print server is not
available, or is very slow.

Differential Revision: https://phabricator.services.mozilla.com/D93688
2020-11-03 20:35:38 +00:00
Dorel Luca
a273b913d8 Backed out changeset 3cc7771c487c (bug 1674135) for Browser-chrome failures in preferences/tests/siteData/browser_siteData.js. CLOSED TREE 2020-11-03 19:37:30 +02:00
Emilio Cobos Álvarez
67981a28a6 Bug 1674135 - Don't destroy frames from hideDialog() as we rely on printing hidden frames. r=Gijs,preferences-reviewers
Using `visibility` preserves frames of the content inside the dialog,
which we rely on to print the preview `<browser>` element.

This was working before bug 1662336 mostly by chance, because we were
doing an extra clone and that happened to mostly not rely on the cloned
document being rendered.

I'd rather fix it in the front-end (by not trying to print a
`display: none` <browser>) than going back to do a separate clone,
because that can get expensive (specially with fission).

It's not super-clear to me how to best test the "print from system
dialog" case, but ideas certainly welcome.

Differential Revision: https://phabricator.services.mozilla.com/D95501
2020-11-03 16:35:34 +00:00
Bogdan Tara
018ea545b9 Backed out changeset a7f0c3d87325 (bug 1674135) for browser/components/preferences/ mochitest failures CLOSED TREE 2020-11-02 23:13:33 +02:00
Emilio Cobos Álvarez
d77c6411b1 Bug 1674135 - Don't destroy frames from hideDialog() as we rely on printing hidden frames. r=Gijs
Using `visibility` preserves frames of the content inside the dialog,
which we rely on to print the preview `<browser>` element.

This was working before bug 1662336 mostly by chance, because we were
doing an extra clone and that happened to mostly not rely on the cloned
document being rendered.

I'd rather fix it in the front-end (by not trying to print a
`display: none` <browser>) than going back to do a separate clone,
because that can get expensive (specially with fission).

It's not super-clear to me how to best test the "print from system
dialog" case, but ideas certainly welcome.

Differential Revision: https://phabricator.services.mozilla.com/D95501
2020-11-02 19:23:23 +00:00
Neil Deakin
c75a6ce058 Bug 1669369, remove legacy actor from PrintingChild and replace with JSWindowActor, r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D92519
2020-10-28 19:19:52 +00:00