Bug 1829047 - do not schedule task if all tests are skipped. r=ahal
[gecko.git] / widget / moz.build
blobc8ca32e2458c2297275eac6b824a26ae22994f42
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("*ContentCache*"):
29     BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
31 with Files("*ContentData*"):
32     BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
34 with Files("*Events.h"):
35     BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
37 with Files("*FontRange*"):
38     BUG_COMPONENT = ("Core", "Widget: Cocoa")
40 with Files("*Gfx*"):
41     BUG_COMPONENT = ("Core", "Graphics")
43 with Files("*IMEData*"):
44     BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
46 with Files("*TextEventDispatcher*"):
47     BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
49 with Files("*NativeKeyBindings*"):
50     BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
52 toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
54 XPCOM_MANIFESTS += [
55     "components.conf",
58 if toolkit in ("android", "cocoa", "gtk", "uikit", "windows"):
59     DIRS += [toolkit]
61 if toolkit == "cocoa":
62     XPIDL_SOURCES += [
63         "nsIMacDockSupport.idl",
64         "nsIMacFinderProgress.idl",
65         "nsIMacSharingService.idl",
66         "nsIMacUserActivityUpdater.idl",
67         "nsIMacWebAppUtils.idl",
68         "nsIStandaloneNativeMenu.idl",
69         "nsITaskbarProgress.idl",
70         "nsITouchBarHelper.idl",
71         "nsITouchBarInput.idl",
72         "nsITouchBarUpdater.idl",
73     ]
74 elif toolkit == "gtk":
75     XPIDL_SOURCES += [
76         "nsIApplicationChooser.idl",
77         "nsIGtkTaskbarProgress.idl",
78         "nsITaskbarProgress.idl",
79     ]
80 elif toolkit == "windows":
81     XPIDL_SOURCES += [
82         "nsIJumpListBuilder.idl",
83         "nsIJumpListItem.idl",
84         "nsIPrintSettingsWin.idl",
85         "nsITaskbarOverlayIconController.idl",
86         "nsITaskbarPreview.idl",
87         "nsITaskbarPreviewButton.idl",
88         "nsITaskbarPreviewController.idl",
89         "nsITaskbarProgress.idl",
90         "nsITaskbarTabPreview.idl",
91         "nsITaskbarWindowPreview.idl",
92         "nsIWindowsUIUtils.idl",
93         "nsIWinTaskbar.idl",
94     ]
96 if CONFIG["NS_PRINTING"]:
97     # Needs to go before the XPIDL_MODULE line.
98     XPIDL_SOURCES += [
99         "nsIPrintDialogService.idl",
100     ]
102 TEST_DIRS += ["tests", "tests/gtest"]
104 DIRS += ["headless"]
106 # Don't build the DSO under the 'build' directory as windows does.
108 # The DSOs get built in the toolkit dir itself.  Do this so that
109 # multiple implementations of widget can be built on the same
110 # source tree.
113 XPIDL_SOURCES += [
114     "nsIAppShell.idl",
115     "nsIBaseWindow.idl",
116     "nsIBidiKeyboard.idl",
117     "nsIClipboard.idl",
118     "nsIClipboardHelper.idl",
119     "nsIClipboardOwner.idl",
120     "nsIColorPicker.idl",
121     "nsIDisplayInfo.idl",
122     "nsIDragService.idl",
123     "nsIDragSession.idl",
124     "nsIFilePicker.idl",
125     "nsIFormatConverter.idl",
126     "nsIGfxInfo.idl",
127     "nsIGfxInfoDebug.idl",
128     "nsIPaper.idl",
129     "nsIPaperMargin.idl",
130     "nsIPrinter.idl",
131     "nsIPrinterList.idl",
132     "nsIPrintSettings.idl",
133     "nsIPrintSettingsService.idl",
134     "nsIScreen.idl",
135     "nsIScreenManager.idl",
136     "nsISharePicker.idl",
137     "nsISound.idl",
138     "nsISystemStatusBar.idl",
139     "nsITransferable.idl",
140     "nsIUserIdleService.idl",
141     "nsIUserIdleServiceInternal.idl",
144 XPIDL_MODULE = "widget"
146 EXPORTS += [
147     "GfxDriverInfo.h",
148     "GfxInfoBase.h",
149     "GfxInfoCollector.h",
150     "InputData.h",
151     "nsBaseAppShell.h",
152     "nsBaseDragService.h",
153     "nsBaseFilePicker.h",
154     "nsBaseWidget.h",
155     "nsIDeviceContextSpec.h",
156     "nsIRollupListener.h",
157     "nsIWidget.h",
158     "nsIWidgetListener.h",
159     "nsPaper.h",
160     "nsPrinterListBase.h",
161     "nsUserIdleService.h",
162     "nsWidgetsCID.h",
163     "PuppetWidget.h",
166 EXPORTS.mozilla += [
167     "BasicEvents.h",
168     "ColorScheme.h",
169     "CommandList.h",
170     "ContentCache.h",
171     "ContentData.h",
172     "ContentEvents.h",
173     "DimensionRequest.h",
174     "EventClassList.h",
175     "EventForwards.h",
176     "EventMessageList.h",
177     "FontRange.h",
178     "LookAndFeel.h",
179     "MiscEvents.h",
180     "MouseEvents.h",
181     "NativeKeyBindingsType.h",
182     "SwipeTracker.h",
183     "TextEventDispatcher.h",
184     "TextEventDispatcherListener.h",
185     "TextEvents.h",
186     "TextRange.h",
187     "TouchEvents.h",
188     "VsyncDispatcher.h",
189     "WidgetUtils.h",
190     "WindowButtonType.h",
193 EXPORTS.mozilla.widget += [
194     "CompositorWidget.h",
195     "IconLoader.h",
196     "IMEData.h",
197     "InitData.h",
198     "InProcessCompositorWidget.h",
199     "MediaKeysEventSourceFactory.h",
200     "NativeMenu.h",
201     "NativeMenuSupport.h",
202     "nsAutoRollup.h",
203     "nsXPLookAndFeel.h",
204     "PuppetBidiKeyboard.h",
205     "RemoteLookAndFeel.h",
206     "Screen.h",
207     "ScreenManager.h",
208     "TextRecognition.h",
209     "ThemeChangeKind.h",
210     "WidgetMessageUtils.h",
211     "WindowOcclusionState.h",
214 UNIFIED_SOURCES += [
215     "CompositorWidget.cpp",
216     "ContentCache.cpp",
217     "ContentData.cpp",
218     "DimensionRequest.cpp",
219     "GfxDriverInfo.cpp",
220     "GfxInfoBase.cpp",
221     "GfxInfoCollector.cpp",
222     "IconLoader.cpp",
223     "IMEData.cpp",
224     "InProcessCompositorWidget.cpp",
225     "InputData.cpp",
226     "nsAutoRollup.cpp",
227     "nsBaseAppShell.cpp",
228     "nsClipboardHelper.cpp",
229     "nsClipboardProxy.cpp",
230     "nsColorPickerProxy.cpp",
231     "nsDragServiceProxy.cpp",
232     "nsFilePickerProxy.cpp",
233     "nsHTMLFormatConverter.cpp",
234     "nsIBaseWindow.cpp",
235     "nsIDeviceContextSpec.cpp",
236     "nsIWidgetListener.cpp",
237     "nsPrimitiveHelpers.cpp",
238     "nsPrintSettingsImpl.cpp",
239     "nsSoundProxy.cpp",
240     "nsTransferable.cpp",
241     "nsUserIdleService.cpp",
242     "nsXPLookAndFeel.cpp",
243     "PuppetBidiKeyboard.cpp",
244     "PuppetWidget.cpp",
245     "RemoteLookAndFeel.cpp",
246     "Screen.cpp",
247     "ScrollbarDrawing.cpp",
248     "ScrollbarDrawingAndroid.cpp",
249     "ScrollbarDrawingCocoa.cpp",
250     "ScrollbarDrawingGTK.cpp",
251     "ScrollbarDrawingWin.cpp",
252     "ScrollbarDrawingWin11.cpp",
253     "SharedWidgetUtils.cpp",
254     "SwipeTracker.cpp",
255     "TextEventDispatcher.cpp",
256     "TextRecognition.cpp",
257     "Theme.cpp",
258     "ThemeCocoa.cpp",
259     "ThemeColors.cpp",
260     "ThemeDrawing.cpp",
261     "TouchResampler.cpp",
262     "VsyncDispatcher.cpp",
263     "WidgetEventImpl.cpp",
264     "WidgetUtils.cpp",
267 if CONFIG["OS_ARCH"] == "Linux":
268     EXPORTS.mozilla.widget += ["LSBUtils.h"]
269     SOURCES += ["LSBUtils.cpp"]
271 if CONFIG["NS_PRINTING"]:
272     EXPORTS += [
273         "nsDeviceContextSpecProxy.h",
274         "nsPrintSettingsService.h",
275     ]
276     UNIFIED_SOURCES += [
277         "nsDeviceContextSpecProxy.cpp",
278         "nsPaper.cpp",
279         "nsPaperMargin.cpp",
280         "nsPrinterBase.cpp",
281         "nsPrinterListBase.cpp",
282         "nsPrintSettingsService.cpp",
283     ]
285     if toolkit in ("cocoa", "gtk"):
286         UNIFIED_SOURCES += [
287             "nsCUPSShim.cpp",
288             "nsPrinterCUPS.cpp",
289             "nsPrinterListCUPS.cpp",
290         ]
292 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
293 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
294 SOURCES += [
295     "nsBaseDragService.cpp",
296     "nsBaseWidget.cpp",
297     "ScreenManager.cpp",
300 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
301     EXPORTS.mozilla += [
302         "WidgetTraceEvent.h",
303     ]
305 EXPORTS.ipc = [
306     "nsGUIEventIPC.h",
309 if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
310     DIRS += ["x11"]
312 if toolkit in ("cocoa", "windows"):
313     UNIFIED_SOURCES += [
314         "nsBaseClipboard.cpp",
315     ]
317 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
318     UNIFIED_SOURCES += [
319         "nsBaseFilePicker.cpp",
320     ]
322 if toolkit in ("gtk", "windows", "cocoa", "android"):
323     UNIFIED_SOURCES += [
324         "nsNativeTheme.cpp",
325     ]
327 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
329 include("/ipc/chromium/chromium-config.mozbuild")
331 LOCAL_INCLUDES += [
332     "/dom/base",
333     "/dom/ipc",
334     "/gfx/2d",
335     "/layout/base",
336     "/layout/forms",
337     "/layout/generic",
338     "/layout/painting",
339     "/layout/xul",
340     "/layout/xul/tree/",
341     "/view",
342     "/widget",
343     "/widget/headless",
346 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
347 if toolkit == "gtk":
348     LOCAL_INCLUDES += ["/third_party/cups/include"]
350 if toolkit == "windows":
351     IPDL_SOURCES = [
352         "headless/HeadlessWidgetTypes.ipdlh",
353         "windows/PCompositorWidget.ipdl",
354         "windows/PlatformWidgetTypes.ipdlh",
355     ]
356 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
357     IPDL_SOURCES = [
358         "gtk/PCompositorWidget.ipdl",
359         "gtk/PlatformWidgetTypes.ipdlh",
360         "headless/HeadlessWidgetTypes.ipdlh",
361     ]
362 elif toolkit == "android":
363     IPDL_SOURCES = [
364         "android/PCompositorWidget.ipdl",
365         "android/PlatformWidgetTypes.ipdlh",
366         "headless/HeadlessWidgetTypes.ipdlh",
367     ]
368 else:
369     IPDL_SOURCES = [
370         "generic/PCompositorWidget.ipdl",
371         "generic/PlatformWidgetTypes.ipdlh",
372         "headless/HeadlessWidgetTypes.ipdlh",
373     ]
375 PREPROCESSED_IPDL_SOURCES += [
376     "LookAndFeelTypes.ipdlh",
379 LOCAL_INCLUDES += [
380     "/widget/%s" % toolkit,
382 FINAL_LIBRARY = "xul"
384 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
385     DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
387 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
388     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
389 if CONFIG["MOZ_WAYLAND"]:
390     CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]