Bug 1523562 [wpt PR 14965] - Sync Mozilla CSS tests as of 2019-01-20, a=testonly
[gecko.git] / widget / moz.build
blobe1a4b1259331d5d1d9cb6bfc02c8427ef3ddaf77
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 with Files("**"):
8     BUG_COMPONENT = ("Core", "Widget")
10 with Files("crashtests/*1128214*"):
11     BUG_COMPONENT = ("Core", "Layout")
13 with Files("crashtests/*303901*"):
14     BUG_COMPONENT = ("Core", "Graphics")
16 with Files("crashtests/*380359*"):
17     BUG_COMPONENT = ("Core", "Widget")
19 with Files("reftests/**"):
20     BUG_COMPONENT = ("Core", "Widget: Cocoa")
22 with Files("reftests/*fallback*"):
23     BUG_COMPONENT = ("Core", "Layout: Form Controls")
25 with Files("*CompositorWidget*"):
26     BUG_COMPONENT = ("Core", "Graphics")
28 with Files("*Gfx*"):
29     BUG_COMPONENT = ("Core", "Graphics")
31 with Files("*WindowSurface*"):
32     BUG_COMPONENT = ("Core", "Graphics")
34 with Files("*FontRange*"):
35     BUG_COMPONENT = ("Core", "Widget: Cocoa")
37 toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
39 if toolkit in ('cocoa', 'android', 'uikit'):
40     DIRS += [toolkit]
42 if toolkit == 'windows':
43     DIRS += ['windows']
45     XPIDL_SOURCES += [
46         'nsIJumpListBuilder.idl',
47         'nsIJumpListItem.idl',
48         'nsIPrintSettingsWin.idl',
49         'nsITaskbarOverlayIconController.idl',
50         'nsITaskbarPreview.idl',
51         'nsITaskbarPreviewButton.idl',
52         'nsITaskbarPreviewController.idl',
53         'nsITaskbarProgress.idl',
54         'nsITaskbarTabPreview.idl',
55         'nsITaskbarWindowPreview.idl',
56         'nsIWindowsUIUtils.idl',
57         'nsIWinTaskbar.idl',
58     ]
59 elif toolkit == 'cocoa':
60     XPIDL_SOURCES += [
61         'nsIMacDockSupport.idl',
62         'nsIMacSharingService.idl',
63         'nsIMacWebAppUtils.idl',
64         'nsIStandaloneNativeMenu.idl',
65         'nsISystemStatusBar.idl',
66         'nsITaskbarProgress.idl',
67         'nsITouchBarHelper.idl',
68         'nsITouchBarInput.idl',
69         'nsITouchBarUpdater.idl',
70     ]
71     EXPORTS += [
72         'nsINativeMenuService.h',
73     ]
75 TEST_DIRS += ['tests']
77 DIRS += ['headless']
79 # Don't build the DSO under the 'build' directory as windows does.
81 # The DSOs get built in the toolkit dir itself.  Do this so that
82 # multiple implementations of widget can be built on the same
83 # source tree.
85 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
86     DIRS += ['gtk']
88     if CONFIG['MOZ_X11']:
89         DIRS += ['gtkxtbin']
91     XPIDL_SOURCES += [
92         'nsIGtkTaskbarProgress.idl',
93         'nsITaskbarProgress.idl',
94     ]
96 XPIDL_SOURCES += [
97     'nsIAppShell.idl',
98     'nsIBaseWindow.idl',
99     'nsIBidiKeyboard.idl',
100     'nsIClipboard.idl',
101     'nsIClipboardHelper.idl',
102     'nsIClipboardOwner.idl',
103     'nsIColorPicker.idl',
104     'nsIDisplayInfo.idl',
105     'nsIDragService.idl',
106     'nsIDragSession.idl',
107     'nsIFilePicker.idl',
108     'nsIFormatConverter.idl',
109     'nsIGfxInfo.idl',
110     'nsIGfxInfoDebug.idl',
111     'nsIIdleService.idl',
112     'nsIIdleServiceInternal.idl',
113     'nsIPrinterEnumerator.idl',
114     'nsIPrintSession.idl',
115     'nsIPrintSettings.idl',
116     'nsIPrintSettingsService.idl',
117     'nsIScreen.idl',
118     'nsIScreenManager.idl',
119     'nsISound.idl',
120     'nsITransferable.idl',
123 XPIDL_MODULE = 'widget'
125 EXPORTS += [
126     'GfxDriverInfo.h',
127     'GfxInfoBase.h',
128     'GfxInfoCollector.h',
129     'InputData.h',
130     'nsBaseScreen.h',
131     'nsBaseWidget.h',
132     'nsIDeviceContextSpec.h',
133     'nsIKeyEventInPluginCallback.h',
134     'nsIPluginWidget.h',
135     'nsIPrintDialogService.h',
136     'nsIRollupListener.h',
137     'nsIWidget.h',
138     'nsIWidgetListener.h',
139     'nsWidgetInitData.h',
140     'nsWidgetsCID.h',
141     'PuppetWidget.h',
144 EXPORTS.mozilla += [
145     'BasicEvents.h',
146     'CommandList.h',
147     'ContentCache.h',
148     'ContentEvents.h',
149     'EventClassList.h',
150     'EventForwards.h',
151     'EventMessageList.h',
152     'FontRange.h',
153     'LookAndFeel.h',
154     'MiscEvents.h',
155     'MouseEvents.h',
156     'TextEventDispatcher.h',
157     'TextEventDispatcherListener.h',
158     'TextEvents.h',
159     'TextRange.h',
160     'TouchEvents.h',
161     'VsyncDispatcher.h',
162     'WidgetUtils.h',
165 EXPORTS.mozilla.widget += [
166     'CompositorWidget.h',
167     'IMEData.h',
168     'InProcessCompositorWidget.h',
169     'nsAutoRollup.h',
170     'PuppetBidiKeyboard.h',
171     'Screen.h',
172     'ScreenManager.h',
173     'WidgetMessageUtils.h',
174     'WindowSurface.h'
177 UNIFIED_SOURCES += [
178     'CompositorWidget.cpp',
179     'ContentCache.cpp',
180     'GfxDriverInfo.cpp',
181     'GfxInfoBase.cpp',
182     'GfxInfoCollector.cpp',
183     'InProcessCompositorWidget.cpp',
184     'InputData.cpp',
185     'nsAutoRollup.cpp',
186     'nsBaseAppShell.cpp',
187     'nsBaseScreen.cpp',
188     'nsClipboardHelper.cpp',
189     'nsClipboardProxy.cpp',
190     'nsColorPickerProxy.cpp',
191     'nsContentProcessWidgetFactory.cpp',
192     'nsDragServiceProxy.cpp',
193     'nsFilePickerProxy.cpp',
194     'nsHTMLFormatConverter.cpp',
195     'nsIdleService.cpp',
196     'nsIWidgetListener.cpp',
197     'nsPrimitiveHelpers.cpp',
198     'nsPrintSettingsImpl.cpp',
199     'nsSoundProxy.cpp',
200     'nsTransferable.cpp',
201     'nsXPLookAndFeel.cpp',
202     'PuppetBidiKeyboard.cpp',
203     'PuppetWidget.cpp',
204     'Screen.cpp',
205     'ScreenManager.cpp',
206     'SharedWidgetUtils.cpp',
207     'TextEventDispatcher.cpp',
208     'VsyncDispatcher.cpp',
209     'WidgetEventImpl.cpp',
210     'WidgetUtils.cpp',
213 if CONFIG['OS_ARCH'] == 'Linux':
214     EXPORTS.mozilla.widget += [
215         'LSBUtils.h'
216     ]
217     SOURCES += [
218         'LSBUtils.cpp'
219     ]
221 if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
222     EXPORTS += [
223         'nsDeviceContextSpecProxy.h',
224         'nsPrintSettingsService.h',
225     ]
226     UNIFIED_SOURCES += [
227         'nsDeviceContextSpecProxy.cpp',
228         'nsPrintSession.cpp',
229         'nsPrintSettingsService.cpp',
230     ]
232 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
233 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
234 SOURCES += [
235     'nsBaseDragService.cpp',
236     'nsBaseWidget.cpp',
239 if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
240     EXPORTS.mozilla += [
241         'WidgetTraceEvent.h',
242     ]
244 EXPORTS.ipc = ['nsGUIEventIPC.h']
246 if CONFIG['MOZ_X11']:
247     DIRS += ['x11']
248     UNIFIED_SOURCES += [
249         'GfxInfoX11.cpp'
250     ]
251     SOURCES += [
252         'nsShmImage.cpp',
253         'WindowSurfaceX11SHM.cpp',
254     ]
256 if toolkit == 'windows':
257     EXPORTS += [
258         'PluginWidgetProxy.h',
259     ]
260     SOURCES += [
261         'PluginWidgetProxy.cpp',
262     ]
264 if toolkit in ('cocoa', 'windows'):
265     UNIFIED_SOURCES += [
266         'nsBaseClipboard.cpp',
267     ]
269 if toolkit in {'gtk3', 'cocoa', 'windows',
270                'android', 'uikit'}:
271     UNIFIED_SOURCES += [
272         'nsBaseFilePicker.cpp',
273     ]
275 if toolkit in ('gtk3', 'windows', 'cocoa', 'android'):
276     UNIFIED_SOURCES += [
277         'nsNativeTheme.cpp',
278     ]
279 if toolkit == 'gtk3':
280     XPIDL_SOURCES += [
281         'nsIApplicationChooser.idl',
282     ]
284 DEFINES['MOZ_CROSS_PROCESS_IME'] = True
286 include('/ipc/chromium/chromium-config.mozbuild')
288 LOCAL_INCLUDES += [
289     '/dom/base',
290     '/dom/ipc',
291     '/layout/base',
292     '/layout/forms',
293     '/layout/generic',
294     '/layout/painting',
295     '/layout/xul',
296     '/layout/xul/tree/',
297     '/view',
298     '/widget',
299     '/widget/headless',
302 if toolkit == 'windows':
303     IPDL_SOURCES = [
304         'headless/HeadlessWidgetTypes.ipdlh',
305         'windows/PCompositorWidget.ipdl',
306         'windows/PlatformWidgetTypes.ipdlh',
307     ]
308 elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT'] and CONFIG['MOZ_X11']:
309     IPDL_SOURCES = [
310         'gtk/PCompositorWidget.ipdl',
311         'gtk/PlatformWidgetTypes.ipdlh',
312         'headless/HeadlessWidgetTypes.ipdlh',
313     ]
314 else:
315     IPDL_SOURCES = [
316         'headless/HeadlessWidgetTypes.ipdlh',
317         'PCompositorWidget.ipdl',
318         'PlatformWidgetTypes.ipdlh',
319     ]
321 widget_dir = toolkit
322 if widget_dir == 'gtk3':
323     widget_dir = 'gtk'
325 LOCAL_INCLUDES += [
326     '/widget/%s' % widget_dir,
328 FINAL_LIBRARY = 'xul'
330 if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
331     DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True
333 CXXFLAGS += CONFIG['TK_CFLAGS']