This also corrects what I think are long standing issues with the mapping to and
from print settings on Windows.
Firstly it only uses the DEVMODE flags to decide what should get stored, in the
old code if paper size was not set, it would then use that possibly invalid
paper size to map to length and width. Paper setting prefs are mapped back if
they were stored or if they have been manually set to something sane.
Secondly it corrects the calculation that was used to convert from millimeters
to tenths of millimeters.
It also gets rid of the paperSizeType field, which was only used on Windows and
doesn't actually make sense according to the DEVMODE documentation as the
dmPaperLength and dmPaperWidth fields override the dmPaperSize, but can in
theory be specified at the same time.
The printing back-end used to be in charge of opening up an error dialog
when things go wrong with printing. Now we fire an event and let PrintUtils
do the work of showing the error message. This has the added bonus of making
the error messages work with e10s.
--HG--
extra : commitid : LPWfOvQ1TaI
extra : rebase_source : fa6f71e6c9cf9062feb2bd1d0f362680899385fc
We were passing around content window CPOWs before to indicate
which content to send to the printer. This was, naturally, causing
unsafe CPOW usage warnings - especially when attempting to get at
the content window of an iframe with the context menu printing
command.
This patch changes the printing mechanism to use outer window IDs
instead of CPOWs.
--HG--
extra : commitid : 7bG2asTYoDR
extra : rebase_source : 3d8d10dbd0d7ce4b2891d81b5f15d71341b79f84
It's possible for docShell.printPreview.printPreview to throw (if we're attempting to print preview a
XUL document, for example). If it throws, this can put printUtils.js in a funny state, since it's waiting
to hear that print preview was successfully entered.
This patch makes it possible for browser-content.js to inform the parent that printPreview failed, and for
the parent to react appropriately.
--HG--
extra : amend_source : cd6d89feb1b7e95a2a02452412580a4d00d52ad1
<xul:browser>'s do not get messageManager's constructed for them unless they
have their type attribute set to "content", "content-targetable", or
"content-primary". This patch updates the view source print preview browser
with that type attribute, and also updates the PrintUtils documentation to
mention this requirement.
--HG--
extra : amend_source : 12638e8fd0c0da9b3036d7892d02a360b7513ec5
The -*- file variable lines -*- establish per-file settings that Emacs will
pick up. This patch makes the following changes to those lines (and touches
nothing else):
- Never set the buffer's mode.
Years ago, Emacs did not have a good JavaScript mode, so it made sense
to use Java or C++ mode in .js files. However, Emacs has had js-mode for
years now; it's perfectly serviceable, and is available and enabled by
default in all major Emacs packagings.
Selecting a mode in the -*- file variable line -*- is almost always the
wrong thing to do anyway. It overrides Emacs's default choice, which is
(now) reasonable; and even worse, it overrides settings the user might
have made in their '.emacs' file for that file extension. It's only
useful when there's something specific about that particular file that
makes a particular mode appropriate.
- Correctly propagate settings that establish the correct indentation
level for this file: c-basic-offset and js2-basic-offset should be
js-indent-level. Whatever value they're given should be preserved;
different parts of our tree use different indentation styles.
- We don't use tabs in Mozilla JS code. Always set indent-tabs-mode: nil.
Remove tab-width: settings, at least in files that don't contain tab
characters.
- Remove js2-mode settings that belong in the user's .emacs file, like
js2-skip-preprocessor-directives.
Every directory with a jar.mn now has JAR_MANIFESTS defined in its
moz.build file.
We also removed the may_skip special consideration of jar.mn files
because this information is now available during tier traversal by the
reader courtesy of the variables being present in moz.build files.
--HG--
extra : rebase_source : 21049b15e6bd9cf65b0805ccaccc4ba5aae93c98
extra : amend_source : 0b1ea866d725beef92d37c6f6d475369ac002e19