Bug 1835241 - Part 3: Concatenate nested namespaces in GC code as per the coding...
[gecko.git] / widget / moz.build
blobe235869060ddcf5928068b05610d8817ce3a282c
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     "nsBaseClipboard.h",
153     "nsBaseDragService.h",
154     "nsBaseFilePicker.h",
155     "nsBaseWidget.h",
156     "nsIDeviceContextSpec.h",
157     "nsIRollupListener.h",
158     "nsIWidget.h",
159     "nsIWidgetListener.h",
160     "nsPaper.h",
161     "nsPrinterListBase.h",
162     "nsUserIdleService.h",
163     "nsWidgetsCID.h",
164     "PuppetWidget.h",
167 EXPORTS.mozilla += [
168     "BasicEvents.h",
169     "ClipboardWriteRequestChild.h",
170     "ClipboardWriteRequestParent.h",
171     "ColorScheme.h",
172     "CommandList.h",
173     "ContentCache.h",
174     "ContentData.h",
175     "ContentEvents.h",
176     "DimensionRequest.h",
177     "EventClassList.h",
178     "EventForwards.h",
179     "EventMessageList.h",
180     "FontRange.h",
181     "LookAndFeel.h",
182     "MiscEvents.h",
183     "MouseEvents.h",
184     "NativeKeyBindingsType.h",
185     "SwipeTracker.h",
186     "TextEventDispatcher.h",
187     "TextEventDispatcherListener.h",
188     "TextEvents.h",
189     "TextRange.h",
190     "TouchEvents.h",
191     "VsyncDispatcher.h",
192     "WidgetUtils.h",
193     "WindowButtonType.h",
196 EXPORTS.mozilla.widget += [
197     "CompositorWidget.h",
198     "IconLoader.h",
199     "IMEData.h",
200     "InitData.h",
201     "InProcessCompositorWidget.h",
202     "MediaKeysEventSourceFactory.h",
203     "NativeMenu.h",
204     "NativeMenuSupport.h",
205     "nsAutoRollup.h",
206     "nsXPLookAndFeel.h",
207     "PuppetBidiKeyboard.h",
208     "RemoteLookAndFeel.h",
209     "Screen.h",
210     "ScreenManager.h",
211     "TextRecognition.h",
212     "ThemeChangeKind.h",
213     "WidgetMessageUtils.h",
214     "WindowOcclusionState.h",
217 UNIFIED_SOURCES += [
218     "ClipboardWriteRequestChild.cpp",
219     "ClipboardWriteRequestParent.cpp",
220     "CompositorWidget.cpp",
221     "ContentCache.cpp",
222     "ContentData.cpp",
223     "DimensionRequest.cpp",
224     "GfxDriverInfo.cpp",
225     "GfxInfoBase.cpp",
226     "GfxInfoCollector.cpp",
227     "IconLoader.cpp",
228     "IMEData.cpp",
229     "InProcessCompositorWidget.cpp",
230     "InputData.cpp",
231     "nsAutoRollup.cpp",
232     "nsBaseAppShell.cpp",
233     "nsBaseClipboard.cpp",
234     "nsClipboardHelper.cpp",
235     "nsClipboardProxy.cpp",
236     "nsColorPickerProxy.cpp",
237     "nsDragServiceProxy.cpp",
238     "nsFilePickerProxy.cpp",
239     "nsHTMLFormatConverter.cpp",
240     "nsIBaseWindow.cpp",
241     "nsIDeviceContextSpec.cpp",
242     "nsIWidgetListener.cpp",
243     "nsPrimitiveHelpers.cpp",
244     "nsPrintSettingsImpl.cpp",
245     "nsSoundProxy.cpp",
246     "nsTransferable.cpp",
247     "nsUserIdleService.cpp",
248     "nsXPLookAndFeel.cpp",
249     "PuppetBidiKeyboard.cpp",
250     "PuppetWidget.cpp",
251     "RemoteLookAndFeel.cpp",
252     "Screen.cpp",
253     "ScrollbarDrawing.cpp",
254     "ScrollbarDrawingAndroid.cpp",
255     "ScrollbarDrawingCocoa.cpp",
256     "ScrollbarDrawingGTK.cpp",
257     "ScrollbarDrawingWin.cpp",
258     "ScrollbarDrawingWin11.cpp",
259     "SharedWidgetUtils.cpp",
260     "SwipeTracker.cpp",
261     "TextEventDispatcher.cpp",
262     "TextRecognition.cpp",
263     "Theme.cpp",
264     "ThemeCocoa.cpp",
265     "ThemeColors.cpp",
266     "ThemeDrawing.cpp",
267     "TouchResampler.cpp",
268     "VsyncDispatcher.cpp",
269     "WidgetEventImpl.cpp",
270     "WidgetUtils.cpp",
273 if CONFIG["OS_ARCH"] == "Linux":
274     EXPORTS.mozilla.widget += ["LSBUtils.h"]
275     SOURCES += ["LSBUtils.cpp"]
277 if CONFIG["NS_PRINTING"]:
278     EXPORTS += [
279         "nsDeviceContextSpecProxy.h",
280         "nsPrintSettingsService.h",
281     ]
282     UNIFIED_SOURCES += [
283         "nsDeviceContextSpecProxy.cpp",
284         "nsPaper.cpp",
285         "nsPaperMargin.cpp",
286         "nsPrinterBase.cpp",
287         "nsPrinterListBase.cpp",
288         "nsPrintSettingsService.cpp",
289     ]
291     if toolkit in ("cocoa", "gtk"):
292         UNIFIED_SOURCES += [
293             "nsCUPSShim.cpp",
294             "nsPrinterCUPS.cpp",
295             "nsPrinterListCUPS.cpp",
296         ]
298 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
299 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
300 SOURCES += [
301     "nsBaseDragService.cpp",
302     "nsBaseWidget.cpp",
303     "ScreenManager.cpp",
306 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
307     EXPORTS.mozilla += [
308         "WidgetTraceEvent.h",
309     ]
311 EXPORTS.ipc = [
312     "nsGUIEventIPC.h",
315 if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
316     DIRS += ["x11"]
318 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
319     UNIFIED_SOURCES += [
320         "nsBaseFilePicker.cpp",
321     ]
323 if toolkit in ("gtk", "windows", "cocoa", "android"):
324     UNIFIED_SOURCES += [
325         "nsNativeTheme.cpp",
326     ]
328 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
330 include("/ipc/chromium/chromium-config.mozbuild")
332 LOCAL_INCLUDES += [
333     "/dom/base",
334     "/dom/ipc",
335     "/gfx/2d",
336     "/layout/base",
337     "/layout/forms",
338     "/layout/generic",
339     "/layout/painting",
340     "/layout/xul",
341     "/layout/xul/tree/",
342     "/view",
343     "/widget",
344     "/widget/headless",
347 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
348 if toolkit == "gtk":
349     LOCAL_INCLUDES += ["/third_party/cups/include"]
351 if toolkit == "windows":
352     IPDL_SOURCES = [
353         "headless/HeadlessWidgetTypes.ipdlh",
354         "windows/PCompositorWidget.ipdl",
355         "windows/PlatformWidgetTypes.ipdlh",
356     ]
357 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
358     IPDL_SOURCES = [
359         "gtk/PCompositorWidget.ipdl",
360         "gtk/PlatformWidgetTypes.ipdlh",
361         "headless/HeadlessWidgetTypes.ipdlh",
362     ]
363 elif toolkit == "android":
364     IPDL_SOURCES = [
365         "android/PCompositorWidget.ipdl",
366         "android/PlatformWidgetTypes.ipdlh",
367         "headless/HeadlessWidgetTypes.ipdlh",
368     ]
369 else:
370     IPDL_SOURCES = [
371         "generic/PCompositorWidget.ipdl",
372         "generic/PlatformWidgetTypes.ipdlh",
373         "headless/HeadlessWidgetTypes.ipdlh",
374     ]
376 IPDL_SOURCES += [
377     "LookAndFeelTypes.ipdlh",
378     "PClipboardWriteRequest.ipdl",
381 LOCAL_INCLUDES += [
382     "/widget/%s" % toolkit,
384 FINAL_LIBRARY = "xul"
386 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
387     DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
389 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
390     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
391 if CONFIG["MOZ_WAYLAND"]:
392     CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]