Граф коммитов

45 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 941e868780 Bug 1668767 - Make "print selection" setting independent of page range. r=jfkthame
It conceptually is, and this will allow to have UI independent of the
page range in bug 140718.

Differential Revision: https://phabricator.services.mozilla.com/D92201
2020-10-02 13:59:48 +00:00
Bob Owen 922f287afd Bug 1668492: Stop using locale based decimals when saving printing prefs. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D92099
2020-10-01 17:55:01 +00:00
Emilio Cobos Álvarez b94fd775e1 Bug 1668406 - Fix nsIPrintSettings.showMarginGuides. r=jfkthame
So that:

 * It accounts for @page.
 * It is correctly serialized and deserialized over IPC.
 * It's nicer to use.

Depends on D92004

Differential Revision: https://phabricator.services.mozilla.com/D92005
2020-10-01 10:54:18 +00:00
Emilio Cobos Álvarez fbd95bb29e Bug 1668406 - Introduce nsIPrintSettings.honorPageRuleMargins. r=jfkthame
(Doing the obvious)

This should allow the front-end to expose it in one way or another in
bug 1661663.

Differential Revision: https://phabricator.services.mozilla.com/D92004
2020-10-01 13:18:01 +00:00
Jonathan Watt 568f31deea Bug 1668296. Remove a bunch of DEBUG_rods code. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D91939
2020-09-30 15:54:30 +00:00
Jonathan Watt 1890bfffde Bug 1667265. Remove nsIPrintSettingsService.globalPrintSettings. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D91366
2020-09-30 12:25:02 +00:00
Csoregi Natalia b3bc0b7401 Backed out changeset 0028834844d2 (bug 1668210) for web platform failures on delayed_window_print.html. CLOSED TREE 2020-09-30 14:37:59 +03:00
Jonathan Watt 85b74a2951 Bug 1668210. Prevent print settings being saved to unprefixed prefs on non-Android. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D91907
2020-09-30 09:36:40 +00:00
Jonathan Watt 3f30f74084 Bug 1667953 p1. Stop reading printer specific settings from global prefs. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D91819
2020-09-29 18:51:35 +00:00
Jonathan Watt d5de56ef43 Bug 1667285. Make nsPrintSettingsService::_CreatePrintSettings pure virtual. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D91377
2020-09-25 09:33:14 +00:00
Jonathan Kew 7fd751e756 Bug 1665904 - Rename paperName to paperId for better clarity (platform). r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D90790
2020-09-19 21:31:05 +00:00
Jonathan Kew b8b3720ae7 Bug 1665901 - Remove (Windows-specific) paperData field, as it now just duplicates the paper id. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D90686
2020-09-18 15:28:46 +00:00
Emilio Cobos Álvarez e6b821e340 Bug 968753 - Save per-printer settings on GTK. r=jwatt
I don't see any reason why this shouldn't work off-hand, there's no
gtk globals or such that fundamentally avoid sharing settings.

The PSPrinters stuff is gone so it's not needed to mess up with PS/CUPS
names.

The last used printer name stuff is now just a pref read, so there
shouldn't be sandbox violation shenanigans...

There are some restrictions on what can be set or what not (like, if you
set the paper name that may also override the paper size).

But these are problems that we have when restoring from prefs already,
so there's no reason we shouldn't do this, afaict.

Differential Revision: https://phabricator.services.mozilla.com/D90418
2020-09-16 15:31:45 +00:00
Emilio Cobos Álvarez 706ceffb4b Bug 1665125 - Make print background settings infallible. r=bobowen
This makes callers simpler.

Differential Revision: https://phabricator.services.mozilla.com/D90285
2020-09-16 11:21:41 +00:00
Narcis Beleuzu 38f63aa9b6 Backed out changeset 0834b634ea07 (bug 1665125) for reftest failures. CLOSED TREE 2020-09-15 23:32:11 +03:00
Emilio Cobos Álvarez f3927b672a Bug 1665125 - Make print background settings infallible. r=bobowen
This makes callers simpler.

Differential Revision: https://phabricator.services.mozilla.com/D90285
2020-09-15 16:19:20 +00:00
Bob Owen c6fa9e48a9 Bug 1663940: Ensure the unwriteable margins are populated in the print settings. r=emilio
This updates the settings with the correct paper ID as well.
It also removes the printable size fields from the Windows settings now that
unwriteable margins are being used consistently.

Differential Revision: https://phabricator.services.mozilla.com/D89911
2020-09-11 15:00:18 +00:00
Emilio Cobos Álvarez 5ed9da2bf7 Bug 1664205 - Simplify rect getters in nsIPrintSettings. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D89778
2020-09-10 15:25:59 +00:00
Emilio Cobos Álvarez 2b38c4883a Bug 1661436 - Fix documentation and simplify nsIPrintSettingsService.globalPrintSettings. r=jwatt
It always returns a new print settings object, so the docs are just
wrong. At that point it is just an alias of thew newPrintSettings
attribute, so document it as such.

Differential Revision: https://phabricator.services.mozilla.com/D88399
2020-08-27 11:05:32 +00:00
Emilio Cobos Álvarez 19fd1264ab Bug 1661388 - Factor out the default print settings code. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D88397
2020-08-27 10:58:19 +00:00
Emilio Cobos Álvarez 2b6c7db4e8 Bug 1657363 - Make nsIPrinterList.printers return a promise. r=jwatt
I intentionally removed the "move the default printer to the front" in
windows because that's not a guarantee that we provide in CUPS, but lmk
if you want it back.

I have zero idea about why the GlobalPrinters code was so ridiculously
complex.

Depends on D86396

Differential Revision: https://phabricator.services.mozilla.com/D86397
2020-08-09 22:05:57 +00:00
Bob Owen c4f92dc077 Bug 1653334 part 1: Remove unused isRangeSelection and isIFrameSelected. r=jwatt
These unused members are removed from nsIWebBrowserPrint and PPrintingTypes
along with their supporting functions.

Differential Revision: https://phabricator.services.mozilla.com/D85007
2020-08-03 14:23:27 +00:00
Butkovits Atila 076d3aa7ed Backed out 2 changesets (bug 1653334) for reftest failures at test-print-selection.html. CLOSED TREE
Backed out changeset 6cc6bbaa91f0 (bug 1653334)
Backed out changeset 75a5873f02a4 (bug 1653334)
2020-08-03 15:35:37 +03:00
Bob Owen d5715ceb42 Bug 1653334 part 1: Remove unused isRangeSelection and isIFrameSelected. r=jwatt
These unused members are removed from nsIWebBrowserPrint and PPrintingTypes
along with their supporting functions.

Differential Revision: https://phabricator.services.mozilla.com/D85007
2020-08-03 08:53:44 +00:00
Erik Nordin ce70595b23 Bug 1651532 - Change systemDefaultPrinter to systemDefaultPrinterName r=jwatt
The `systemDefaultPrinter` attribute in `nsIPrinterList` currently has
only one usage: to retrieve the printer's name. This patch changes the
attribute to be the name instead of the whole printer until such
funcationality is needed.

Differential Revision: https://phabricator.services.mozilla.com/D82951
2020-07-10 19:00:17 +00:00
Erik Nordin f7c0bd0aa2 Bug 1647480 - Refactor Printer Enumeration to Use nsIPrinter r=jwatt
- Add new interface for `nsIPrinter`.
- Add readonly attribute for printer name.
- Add implementation of interface: `nsPrinter`.
- Rename `nsIPrinterEnumerator` to `nsIPrinterList`.
- Refactor `nsIPrinterList` to use `nsIPrinter`.

Differential Revision: https://phabricator.services.mozilla.com/D81414
2020-07-05 19:00:43 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Jonathan Watt 974e4621b9 Bug 1641949. Removing the rest of the hacky print prefs code introduced by bug 1276717. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D77506
2020-05-29 19:07:39 +00:00
Erik Nordin 4c06dea151 Bug 1639990 - Rename defaultPrinterName to lastUsedPrinterName r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D76955
2020-05-29 17:37:01 +00:00
Hiroyuki Ikezoe 2971a5b04a Bug 1636678 - Drop unnecessary `if (kInitSaveOddEvenPages)` blocks. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D75898
2020-05-19 22:30:20 +00:00
Jonathan Watt 3199185dcc Bug 1636636. Remove old printing pref paper size fixup code. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D74714
2020-05-11 18:00:26 +00:00
Jonathan Watt ac1ef7b1a2 Bug 1636623. Remove some old DEBUG_rods_X from nsPrintSettingsService.cpp. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D74522
2020-05-09 12:34:55 +00:00
Jonathan Watt 2f4b27a303 Bug 1602125. Remove nsIPrintingPromptService.showPrintDialog's nsIWebBrowserPrint parameter and MockWebBrowserPrint. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D56249

--HG--
extra : moz-landing-system : lando
2019-12-09 09:04:29 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55444

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Gabriele Svelto 10d41866a5 Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47678

--HG--
extra : moz-landing-system : lando
2019-09-30 22:06:47 +00:00
Jonathan Watt 39945059b3 Bug 1552785. Remove printing related isFramesetDocument and isFramesetFrameSelected code. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33696

--HG--
extra : rebase_source : 2e7f854a808059b4955ffaad425fe8b68263883e
2019-05-21 23:25:57 +01:00
Jonathan Watt 098392f093 Bug 1552785. Remove internal code for various frameset printing behaviors. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D33624

--HG--
extra : rebase_source : 336e87a05970895684602c9db3e5222918f861c8
extra : source : 98fbf1ed617549496036099b5aee333aa6b29925
2019-05-21 16:01:34 +01:00
Jonathan Watt cb54619aa0 Bug 1553324. Remove nsIPrintSettings.printFrameTypeUsage. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D32068

--HG--
extra : rebase_source : 939cce38c90a39bd002f95e71e1de94a62f895e1
extra : amend_source : 1be783028096f61145727492fa3c3f41e363c205
2019-05-13 16:30:20 +01:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Boris Zbarsky 0216588e17 Bug 1507540 part 5. Use more notxpcom attributes in widget/. r=ehsan 2018-11-19 20:17:54 -05:00
Jonathan Watt f38fde0cc7 Bug 144114 part 3 - Clean up the headers of the nsPrintSettingsService subclasses. r=bobowen
* * *
[mq]: dtor

MozReview-Commit-ID: 8ghrXxeKiHF
2017-12-19 11:05:37 +00:00
Jonathan Watt f9157dfa53 Bug 144114 part 2 - Rename nsPrintOptions and its subclasses to nsPrintSettingsService*. r=bobowen
MozReview-Commit-ID: HQSmyrMBdS8
2017-12-19 10:42:15 +00:00
Jonathan Watt 94df748ddb Bug 144114 part 1 - Rename the files for nsPrintOptions and its subclasses. r=bobowen
MozReview-Commit-ID: EcotGH6pXCR

--HG--
rename : widget/android/nsPrintOptionsAndroid.cpp => widget/android/nsPrintSettingsServiceAndroid.cpp
rename : widget/android/nsPrintOptionsAndroid.h => widget/android/nsPrintSettingsServiceAndroid.h
rename : widget/cocoa/nsPrintOptionsX.h => widget/cocoa/nsPrintSettingsServiceX.h
rename : widget/cocoa/nsPrintOptionsX.mm => widget/cocoa/nsPrintSettingsServiceX.mm
rename : widget/gtk/nsPrintOptionsGTK.cpp => widget/gtk/nsPrintSettingsServiceGTK.cpp
rename : widget/gtk/nsPrintOptionsGTK.h => widget/gtk/nsPrintSettingsServiceGTK.h
rename : widget/nsPrintOptionsImpl.cpp => widget/nsPrintSettingsService.cpp
rename : widget/nsPrintOptionsImpl.h => widget/nsPrintSettingsService.h
rename : widget/windows/nsPrintOptionsWin.cpp => widget/windows/nsPrintSettingsServiceWin.cpp
rename : widget/windows/nsPrintOptionsWin.h => widget/windows/nsPrintSettingsServiceWin.h
2017-12-19 10:06:39 +00:00