Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / widget / moz.build
blob4327ffeb16a6ec2f54445a557044837980a79fa6
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         "nsIPrintSettingsWin.idl",
84         "nsITaskbarOverlayIconController.idl",
85         "nsITaskbarPreview.idl",
86         "nsITaskbarPreviewButton.idl",
87         "nsITaskbarPreviewController.idl",
88         "nsITaskbarProgress.idl",
89         "nsITaskbarTabPreview.idl",
90         "nsITaskbarWindowPreview.idl",
91         "nsIWindowsUIUtils.idl",
92         "nsIWinTaskbar.idl",
93     ]
94 elif toolkit in ("android", "uikit"):
95     XPIDL_SOURCES += [
96         "nsIGeckoViewBridge.idl",
97     ]
99 if CONFIG["NS_PRINTING"]:
100     # Needs to go before the XPIDL_MODULE line.
101     XPIDL_SOURCES += [
102         "nsIPrintDialogService.idl",
103     ]
105 TEST_DIRS += ["tests", "tests/gtest"]
107 DIRS += ["headless"]
109 # Don't build the DSO under the 'build' directory as windows does.
111 # The DSOs get built in the toolkit dir itself.  Do this so that
112 # multiple implementations of widget can be built on the same
113 # source tree.
116 XPIDL_SOURCES += [
117     "nsIAppShell.idl",
118     "nsIBaseWindow.idl",
119     "nsIBidiKeyboard.idl",
120     "nsIClipboard.idl",
121     "nsIClipboardHelper.idl",
122     "nsIClipboardOwner.idl",
123     "nsIColorPicker.idl",
124     "nsIDisplayInfo.idl",
125     "nsIDragService.idl",
126     "nsIDragSession.idl",
127     "nsIFilePicker.idl",
128     "nsIFormatConverter.idl",
129     "nsIGfxInfo.idl",
130     "nsIGfxInfoDebug.idl",
131     "nsIMockDragServiceController.idl",
132     "nsIPaper.idl",
133     "nsIPaperMargin.idl",
134     "nsIPrinter.idl",
135     "nsIPrinterList.idl",
136     "nsIPrintSettings.idl",
137     "nsIPrintSettingsService.idl",
138     "nsIScreen.idl",
139     "nsIScreenManager.idl",
140     "nsISharePicker.idl",
141     "nsISound.idl",
142     "nsISystemStatusBar.idl",
143     "nsITransferable.idl",
144     "nsIUserIdleService.idl",
145     "nsIUserIdleServiceInternal.idl",
148 XPIDL_MODULE = "widget"
150 EXPORTS += [
151     "GfxDriverInfo.h",
152     "GfxInfoBase.h",
153     "GfxInfoCollector.h",
154     "InputData.h",
155     "nsBaseAppShell.h",
156     "nsBaseClipboard.h",
157     "nsBaseColorPicker.h",
158     "nsBaseDragService.h",
159     "nsBaseFilePicker.h",
160     "nsBaseWidget.h",
161     "nsDragServiceProxy.h",
162     "nsIDeviceContextSpec.h",
163     "nsIRollupListener.h",
164     "nsIWidget.h",
165     "nsIWidgetListener.h",
166     "nsPaper.h",
167     "nsPrinterListBase.h",
168     "nsUserIdleService.h",
169     "nsWidgetsCID.h",
170     "PuppetWidget.h",
173 EXPORTS.mozilla += [
174     "BasicEvents.h",
175     "ClipboardContentAnalysisChild.h",
176     "ClipboardContentAnalysisParent.h",
177     "ClipboardReadRequestChild.h",
178     "ClipboardReadRequestParent.h",
179     "ClipboardWriteRequestChild.h",
180     "ClipboardWriteRequestParent.h",
181     "ColorScheme.h",
182     "CommandList.h",
183     "ContentCache.h",
184     "ContentData.h",
185     "ContentEvents.h",
186     "DimensionRequest.h",
187     "EventClassList.h",
188     "EventForwards.h",
189     "EventMessageList.h",
190     "FontRange.h",
191     "LookAndFeel.h",
192     "MiscEvents.h",
193     "MouseEvents.h",
194     "NativeKeyBindingsType.h",
195     "SwipeTracker.h",
196     "TextEventDispatcher.h",
197     "TextEventDispatcherListener.h",
198     "TextEvents.h",
199     "TextRange.h",
200     "TouchEvents.h",
201     "VsyncDispatcher.h",
202     "WidgetUtils.h",
203     "WindowButtonType.h",
206 EXPORTS.mozilla.widget += [
207     "CompositorWidget.h",
208     "GfxInfoDeviceVendorDefs.h",
209     "GfxInfoDriverVendorDefs.h",
210     "GfxInfoDriverVersionCmpDefs.h",
211     "GfxInfoFeatureDefs.h",
212     "GfxInfoFeatureStatusDefs.h",
213     "GfxInfoOperatingSystemDefs.h",
214     "GfxInfoWindowProtocolDefs.h",
215     "IconLoader.h",
216     "IMEData.h",
217     "InitData.h",
218     "InProcessCompositorWidget.h",
219     "MediaKeysEventSourceFactory.h",
220     "NativeMenu.h",
221     "NativeMenuSupport.h",
222     "nsAutoRollup.h",
223     "nsXPLookAndFeel.h",
224     "PuppetBidiKeyboard.h",
225     "RemoteLookAndFeel.h",
226     "Screen.h",
227     "ScreenManager.h",
228     "TextRecognition.h",
229     "ThemeChangeKind.h",
230     "WidgetMessageUtils.h",
231     "WindowOcclusionState.h",
234 UNIFIED_SOURCES += [
235     "ClipboardContentAnalysisChild.cpp",
236     "ClipboardContentAnalysisParent.cpp",
237     "ClipboardReadRequestParent.cpp",
238     "ClipboardWriteRequestChild.cpp",
239     "ClipboardWriteRequestParent.cpp",
240     "CompositorWidget.cpp",
241     "ContentCache.cpp",
242     "ContentData.cpp",
243     "DimensionRequest.cpp",
244     "GfxDriverInfo.cpp",
245     "GfxInfoBase.cpp",
246     "GfxInfoCollector.cpp",
247     "IconLoader.cpp",
248     "IMEData.cpp",
249     "InProcessCompositorWidget.cpp",
250     "InputData.cpp",
251     "nsAutoRollup.cpp",
252     "nsBaseAppShell.cpp",
253     "nsBaseClipboard.cpp",
254     "nsClipboardHelper.cpp",
255     "nsClipboardProxy.cpp",
256     "nsColorPickerProxy.cpp",
257     "nsDragServiceProxy.cpp",
258     "nsFilePickerProxy.cpp",
259     "nsHTMLFormatConverter.cpp",
260     "nsIBaseWindow.cpp",
261     "nsIDeviceContextSpec.cpp",
262     "nsPrimitiveHelpers.cpp",
263     "nsPrintSettingsImpl.cpp",
264     "nsTransferable.cpp",
265     "nsUserIdleService.cpp",
266     "nsXPLookAndFeel.cpp",
267     "PuppetBidiKeyboard.cpp",
268     "PuppetWidget.cpp",
269     "RemoteLookAndFeel.cpp",
270     "Screen.cpp",
271     "ScrollbarDrawing.cpp",
272     "ScrollbarDrawingAndroid.cpp",
273     "ScrollbarDrawingCocoa.cpp",
274     "ScrollbarDrawingGTK.cpp",
275     "ScrollbarDrawingWin.cpp",
276     "ScrollbarDrawingWin11.cpp",
277     "SharedWidgetUtils.cpp",
278     "SwipeTracker.cpp",
279     "TextEventDispatcher.cpp",
280     "TextRecognition.cpp",
281     "Theme.cpp",
282     "ThemeCocoa.cpp",
283     "ThemeColors.cpp",
284     "ThemeDrawing.cpp",
285     "TouchResampler.cpp",
286     "VsyncDispatcher.cpp",
287     "WidgetEventImpl.cpp",
288     "WidgetUtils.cpp",
291 if CONFIG["OS_ARCH"] == "Linux":
292     EXPORTS.mozilla.widget += ["LSBUtils.h"]
293     SOURCES += ["LSBUtils.cpp"]
295 if CONFIG["NS_PRINTING"]:
296     EXPORTS += [
297         "nsDeviceContextSpecProxy.h",
298         "nsPrintSettingsService.h",
299     ]
300     UNIFIED_SOURCES += [
301         "nsDeviceContextSpecProxy.cpp",
302         "nsPaper.cpp",
303         "nsPaperMargin.cpp",
304         "nsPrinterBase.cpp",
305         "nsPrinterListBase.cpp",
306         "nsPrintSettingsService.cpp",
307     ]
309     if toolkit in ("cocoa", "gtk"):
310         UNIFIED_SOURCES += [
311             "nsCUPSShim.cpp",
312             "nsPrinterCUPS.cpp",
313             "nsPrinterListCUPS.cpp",
314         ]
316 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
317 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
318 SOURCES += [
319     "nsBaseDragService.cpp",
320     "nsBaseWidget.cpp",
321     "ScreenManager.cpp",
324 EXPORTS.ipc = [
325     "nsGUIEventIPC.h",
328 if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
329     DIRS += ["x11"]
331 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
332     UNIFIED_SOURCES += [
333         "nsBaseFilePicker.cpp",
334     ]
336 if toolkit in {"gtk", "cocoa", "windows"}:
337     UNIFIED_SOURCES += [
338         "nsBaseColorPicker.cpp",
339     ]
341 if toolkit in ("gtk", "windows", "cocoa", "uikit", "android"):
342     UNIFIED_SOURCES += [
343         "nsNativeTheme.cpp",
344     ]
346 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
348 include("/ipc/chromium/chromium-config.mozbuild")
350 LOCAL_INCLUDES += [
351     "/dom/base",
352     "/dom/ipc",
353     "/gfx/2d",
354     "/layout/base",
355     "/layout/forms",
356     "/layout/generic",
357     "/layout/painting",
358     "/layout/xul",
359     "/layout/xul/tree/",
360     "/view",
361     "/widget",
362     "/widget/headless",
365 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
366 if toolkit == "gtk":
367     LOCAL_INCLUDES += ["/third_party/cups/include"]
369 if toolkit == "windows":
370     IPDL_SOURCES = [
371         "headless/HeadlessWidgetTypes.ipdlh",
372         "windows/PCompositorWidget.ipdl",
373         "windows/PlatformWidgetTypes.ipdlh",
374     ]
375 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
376     IPDL_SOURCES = [
377         "gtk/PCompositorWidget.ipdl",
378         "gtk/PlatformWidgetTypes.ipdlh",
379         "headless/HeadlessWidgetTypes.ipdlh",
380     ]
381 elif toolkit == "android":
382     IPDL_SOURCES = [
383         "android/PCompositorWidget.ipdl",
384         "android/PlatformWidgetTypes.ipdlh",
385         "headless/HeadlessWidgetTypes.ipdlh",
386     ]
387 else:
388     IPDL_SOURCES = [
389         "generic/PCompositorWidget.ipdl",
390         "generic/PlatformWidgetTypes.ipdlh",
391         "headless/HeadlessWidgetTypes.ipdlh",
392     ]
394 IPDL_SOURCES += [
395     "LookAndFeelTypes.ipdlh",
396     "PClipboardContentAnalysis.ipdl",
397     "PClipboardReadRequest.ipdl",
398     "PClipboardWriteRequest.ipdl",
401 LOCAL_INCLUDES += [
402     "/widget/%s" % toolkit,
405 if CONFIG["ENABLE_TESTS"]:
406     UNIFIED_SOURCES += [
407         "MockDragServiceController.cpp",
408     ]
410 FINAL_LIBRARY = "xul"
412 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
413     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
414 if CONFIG["MOZ_WAYLAND"]:
415     CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]