From e64e34ae51680451bd99ef3f9ee35470b6fc89e7 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Wed, 4 Dec 2013 14:06:16 +1300 Subject: [PATCH] Bug 945097. Build widget/gtk in unified mode. r=karl,ehsan --- widget/gtk/maiRedundantObjectFactory.c | 4 --- widget/gtk/moz.build | 39 +++++++++++++++----------- widget/gtk/mozcontainer.c | 4 --- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/widget/gtk/maiRedundantObjectFactory.c b/widget/gtk/maiRedundantObjectFactory.c index c76585bc0002..3db26c8bb70e 100644 --- a/widget/gtk/maiRedundantObjectFactory.c +++ b/widget/gtk/maiRedundantObjectFactory.c @@ -15,8 +15,6 @@ static AtkObject* mai_redundant_object_factory_create_accessible ( GObject *obj); static GType mai_redundant_object_factory_get_accessible_type (void); -static gpointer parent_class = NULL; - GType mai_redundant_object_factory_get_type (void) { @@ -50,8 +48,6 @@ mai_redundant_object_factory_class_init (maiRedundantObjectFactoryClass *klass) { AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - class->create_accessible = mai_redundant_object_factory_create_accessible; class->get_accessible_type = mai_redundant_object_factory_get_accessible_type; } diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build index 762bc463f0be..6ce0c6fa0390 100644 --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build @@ -15,12 +15,11 @@ EXPORTS += [ 'nsIImageToPixbuf.h', ] -SOURCES += [ - 'nsAppShell.cpp', +UNIFIED_SOURCES += [ + 'mozcontainer.c', 'nsBidiKeyboard.cpp', 'nsColorPicker.cpp', 'nsFilePicker.cpp', - 'nsGtkIMModule.cpp', 'nsGtkKeyUtils.cpp', 'nsImageToPixbuf.cpp', 'nsLookAndFeel.cpp', @@ -30,50 +29,58 @@ SOURCES += [ 'nsScreenManagerGtk.cpp', 'nsSound.cpp', 'nsToolkit.cpp', - 'nsWidgetFactory.cpp', - 'nsWindow.cpp', 'WidgetTraceEvent.cpp', ] +# These files force-enable NSPR logging and thus cannot be built in unified mode +SOURCES += [ + 'nsAppShell.cpp', + 'nsGtkIMModule.cpp', + 'nsWidgetFactory.cpp', + 'nsWindow.cpp', +] + if CONFIG['MOZ_X11']: - SOURCES += [ + UNIFIED_SOURCES += [ 'nsIdleServiceGTK.cpp', ] if CONFIG['NS_PRINTING']: - SOURCES += [ + UNIFIED_SOURCES += [ 'nsCUPSShim.cpp', - 'nsDeviceContextSpecG.cpp', 'nsPaperPS.cpp', 'nsPrintDialogGTK.cpp', 'nsPrintOptionsGTK.cpp', 'nsPrintSettingsGTK.cpp', 'nsPSPrinters.cpp', ] + # This file force-enables NSPR logging and thus cannot be built in unified mode + SOURCES += [ + 'nsDeviceContextSpecG.cpp', + ] if CONFIG['MOZ_X11']: - SOURCES += [ + UNIFIED_SOURCES += [ 'nsClipboard.cpp', + ] + # This file force-enables NSPR logging and thus cannot be built in unified mode + SOURCES += [ 'nsDragService.cpp', ] FAIL_ON_WARNINGS = True -SOURCES += [ - 'mozcontainer.c', -] - if CONFIG['ACCESSIBILITY']: - SOURCES += [ + UNIFIED_SOURCES += [ 'maiRedundantObjectFactory.c', ] if CONFIG['MOZ_ENABLE_GTK2']: - SOURCES += [ + UNIFIED_SOURCES += [ 'gtk2drawing.c', ] else: - SOURCES += [ + UNIFIED_SOURCES += [ 'gtk3drawing.c', ] diff --git a/widget/gtk/mozcontainer.c b/widget/gtk/mozcontainer.c index ded61f678b55..34d2d006c612 100644 --- a/widget/gtk/mozcontainer.c +++ b/widget/gtk/mozcontainer.c @@ -48,8 +48,6 @@ static void moz_container_allocate_child (MozContainer *container, static MozContainerChild * moz_container_get_child (MozContainer *container, GtkWidget *child); -static GtkContainerClass *parent_class = NULL; - /* public methods */ GType @@ -153,8 +151,6 @@ moz_container_class_init (MozContainerClass *klass) GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - widget_class->map = moz_container_map; widget_class->unmap = moz_container_unmap; widget_class->realize = moz_container_realize;