Bug 1103412 - Gecko does not compile with printing disabled. r=mconley
authorOleg Romashin <romaxa@gmail.com>
Sat, 22 Nov 2014 12:15:00 +0100
changeset 219062 cadfee0aa2af0fa0c5d3e192423024d417b3183a
parent 219061 b16c42c5d3fc05115d6e53d5c22852d55f3572f2
child 219063 ac697e1121348618643867a0a6196b7a6c6f2912
push id27954
push userryanvm@gmail.com
push dateWed, 10 Dec 2014 21:10:24 +0000
treeherdermozilla-central@0cf461e62ce5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1103412
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1103412 - Gecko does not compile with printing disabled. r=mconley
dom/ipc/ContentParent.cpp
embedding/components/moz.build
embedding/components/printingui/ipc/moz.build
embedding/components/printingui/moz.build
widget/moz.build
widget/qt/nsLookAndFeel.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -3228,17 +3228,21 @@ ContentParent::DeallocPNeckoParent(PNeck
 {
     delete necko;
     return true;
 }
 
 PPrintingParent*
 ContentParent::AllocPPrintingParent()
 {
+#ifdef NS_PRINTING
     return new PrintingParent();
+#else
+    return nullptr;
+#endif
 }
 
 bool
 ContentParent::RecvPPrintingConstructor(PPrintingParent* aActor)
 {
     return true;
 }
 
--- a/embedding/components/moz.build
+++ b/embedding/components/moz.build
@@ -9,12 +9,12 @@
 DIRS += [
     'windowwatcher',
     'appstartup',
     'find',
     'webbrowserpersist',
     'commandhandler',
 ]
 
-if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
+if CONFIG['MOZ_XUL']:
     DIRS += ['printingui']
 
 DIRS += ['build']
--- a/embedding/components/printingui/ipc/moz.build
+++ b/embedding/components/printingui/ipc/moz.build
@@ -3,23 +3,24 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 EXPORTS.mozilla.embedding.printingui += [
     'PrintingParent.h',
 ]
 
-UNIFIED_SOURCES += [
-    'nsPrintingPromptServiceProxy.cpp',
-    'PrintDataUtils.cpp',
-    'PrintingParent.cpp',
-    'PrintProgressDialogChild.cpp',
-    'PrintProgressDialogParent.cpp',
-]
+if CONFIG['NS_PRINTING']:
+    UNIFIED_SOURCES += [
+        'nsPrintingPromptServiceProxy.cpp',
+        'PrintDataUtils.cpp',
+        'PrintingParent.cpp',
+        'PrintProgressDialogChild.cpp',
+        'PrintProgressDialogParent.cpp',
+    ]
 
 IPDL_SOURCES += [
     'PPrinting.ipdl',
     'PPrintProgressDialog.ipdl',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
--- a/embedding/components/printingui/moz.build
+++ b/embedding/components/printingui/moz.build
@@ -3,14 +3,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
 
 DIRS += ['ipc']
 
-if toolkit == 'windows':
-    DIRS += ['win']
-elif toolkit == 'cocoa':
-    DIRS += ['mac']
-elif CONFIG['MOZ_PDF_PRINTING']:
-    DIRS += ['unixshared']
+if CONFIG['NS_PRINTING']:
+    if toolkit == 'windows':
+        DIRS += ['win']
+    elif toolkit == 'cocoa':
+        DIRS += ['mac']
+    elif CONFIG['MOZ_PDF_PRINTING']:
+        DIRS += ['unixshared']
--- a/widget/moz.build
+++ b/widget/moz.build
@@ -100,17 +100,16 @@ EXPORTS += [
     'InputData.h',
     'nsBaseScreen.h',
     'nsBaseWidget.h',
     'nsIDeviceContextSpec.h',
     'nsIPluginWidget.h',
     'nsIRollupListener.h',
     'nsIWidget.h',
     'nsIWidgetListener.h',
-    'nsPrintOptionsImpl.h',
     'nsWidgetInitData.h',
     'nsWidgetsCID.h',
     'PluginWidgetProxy.h',
     'PuppetWidget.h',
 ]
 
 EXPORTS.mozilla += [
     'BasicEvents.h',
@@ -142,32 +141,39 @@ UNIFIED_SOURCES += [
     'nsClipboardProxy.cpp',
     'nsColorPickerProxy.cpp',
     'nsContentProcessWidgetFactory.cpp',
     'nsFilePickerProxy.cpp',
     'nsHTMLFormatConverter.cpp',
     'nsIdleService.cpp',
     'nsIWidgetListener.cpp',
     'nsPrimitiveHelpers.cpp',
-    'nsPrintOptionsImpl.cpp',
     'nsPrintSession.cpp',
     'nsPrintSettingsImpl.cpp',
     'nsScreenManagerProxy.cpp',
     'nsShmImage.cpp',
     'nsTransferable.cpp',
     'nsXPLookAndFeel.cpp',
     'PluginWidgetProxy.cpp',
     'PuppetWidget.cpp',
     'ScreenProxy.cpp',
     'SharedWidgetUtils.cpp',
     'VsyncDispatcher.cpp',
     'WidgetEventImpl.cpp',
     'WidgetUtils.cpp',
 ]
 
+if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
+    EXPORTS += [
+        'nsPrintOptionsImpl.h',
+    ]
+    UNIFIED_SOURCES += [
+        'nsPrintOptionsImpl.cpp',
+    ]
+
 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
 SOURCES += [
     'nsBaseWidget.cpp',
 ]
 
 if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
     EXPORTS.mozilla += [
         'WidgetTraceEvent.h',
--- a/widget/qt/nsLookAndFeel.cpp
+++ b/widget/qt/nsLookAndFeel.cpp
@@ -13,18 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 #include <QGuiApplication>
 #include <QFont>
 #include <QScreen>
 #include <QPalette>
-#include <QStyle>
-#include <QStyleFactory>
 
 #include "nsLookAndFeel.h"
 #include "nsStyleConsts.h"
 #include "gfxFont.h"
 #include "gfxFontConstants.h"
 #include "mozilla/gfx/2D.h"
 
 static const char16_t UNICODE_BULLET = 0x2022;