Bug 1091112 - Add OS X-specific members to PrintData IPDL struct. r=jimm
authorMike Conley <mconley@mozilla.com>
Wed, 06 May 2015 14:09:08 -0400
changeset 246488 9b2f9883b6a8d5b787a5ba69ef1e574a19f74b9a
parent 246487 c85e82f11795ee0c8ef23539ab42876b8dc53103
child 246489 7380457b8ba00bf1a9073b7c99891d86be487e6b
push id13282
push usercbook@mozilla.com
push dateMon, 01 Jun 2015 13:38:44 +0000
treeherderfx-team@87b49eca8ced [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1091112
milestone41.0a1
Bug 1091112 - Add OS X-specific members to PrintData IPDL struct. r=jimm
embedding/components/printingui/ipc/PPrintingTypes.ipdlh
widget/nsPrintOptionsImpl.cpp
--- a/embedding/components/printingui/ipc/PPrintingTypes.ipdlh
+++ b/embedding/components/printingui/ipc/PPrintingTypes.ipdlh
@@ -87,15 +87,26 @@ struct PrintData {
    * information we're already passing, but the generalized settings that
    * we hold in nsIPrintSettings don't map perfectly to GTK's GtkPrintSettings,
    * so there are some nuances. GtkPrintSettings, for example, stores both an
    * internal name for paper size, as well as the display name.
    */
   CStringKeyValue[] GTKPrintSettings;
 
   /**
-   * TODO: OS X specific things - specifically, an array of names for the
-   * document to be supplied by nsIWebBrowserPrint::enumerateDocumentNames
+   * OS X specific things.
    */
+  nsString printJobName;
+  bool printAllPages;
+  bool mustCollate;
+  nsString disposition;
+  /** TODO: Is there an "unsigned short" primitive? **/
+  short pagesAcross;
+  short pagesDown;
+  nsString printTime;
+  bool detailedErrorReporting;
+  nsString faxNumber;
+  bool addHeaderAndFooter;
+  bool fileNameExtensionHidden;
 };
 
 } // namespace embedding
 } // namespace mozilla
--- a/widget/nsPrintOptionsImpl.cpp
+++ b/widget/nsPrintOptionsImpl.cpp
@@ -231,16 +231,27 @@ nsPrintOptions::SerializeToPrintData(nsI
   // assertions).
   // data->driverName() default-initializes
   // data->deviceName() default-initializes
   data->isFramesetDocument() = false;
   data->isFramesetFrameSelected() = false;
   data->isIFrameSelected() = false;
   data->isRangeSelection() = false;
   // data->GTKPrintSettings() default-initializes
+  // data->printJobName() default-initializes
+  data->printAllPages() = true;
+  data->mustCollate() = false;
+  // data->disposition() default-initializes
+  data->pagesAcross() = 1;
+  data->pagesDown() = 1;
+  // data->printTime() default-initializes
+  data->detailedErrorReporting() = true;
+  // data->faxNumber() default-initializes
+  data->addHeaderAndFooter() = false;
+  data->fileNameExtensionHidden() = false;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPrintOptions::DeserializeToPrintSettings(const PrintData& data,
                                            nsIPrintSettings* settings)
 {