Bug 1717224 [wpt PR 29434] - Make the Referrer-Policy tests allow further truncated...
[gecko.git] / widget / moz.build
blob07e6970e56212c50fe91020e6c4e7787c42aaa55
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("*FontRange*"):
32     BUG_COMPONENT = ("Core", "Widget: Cocoa")
34 toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
36 if toolkit in ("android", "cocoa", "gtk", "uikit", "windows"):
37     DIRS += [toolkit]
39 if toolkit == "cocoa":
40     XPIDL_SOURCES += [
41         "nsIMacDockSupport.idl",
42         "nsIMacFinderProgress.idl",
43         "nsIMacSharingService.idl",
44         "nsIMacWebAppUtils.idl",
45         "nsIStandaloneNativeMenu.idl",
46         "nsITaskbarProgress.idl",
47         "nsITouchBarHelper.idl",
48         "nsITouchBarInput.idl",
49         "nsITouchBarUpdater.idl",
50     ]
51 elif toolkit == "gtk":
52     XPIDL_SOURCES += [
53         "nsIApplicationChooser.idl",
54         "nsIGtkTaskbarProgress.idl",
55         "nsITaskbarProgress.idl",
56     ]
57 elif toolkit == "windows":
58     XPIDL_SOURCES += [
59         "nsIJumpListBuilder.idl",
60         "nsIJumpListItem.idl",
61         "nsIPrintSettingsWin.idl",
62         "nsITaskbarOverlayIconController.idl",
63         "nsITaskbarPreview.idl",
64         "nsITaskbarPreviewButton.idl",
65         "nsITaskbarPreviewController.idl",
66         "nsITaskbarProgress.idl",
67         "nsITaskbarTabPreview.idl",
68         "nsITaskbarWindowPreview.idl",
69         "nsIWindowsUIUtils.idl",
70         "nsIWinTaskbar.idl",
71     ]
73 TEST_DIRS += ["tests", "tests/gtest"]
75 DIRS += ["headless"]
77 # Don't build the DSO under the 'build' directory as windows does.
79 # The DSOs get built in the toolkit dir itself.  Do this so that
80 # multiple implementations of widget can be built on the same
81 # source tree.
84 XPIDL_SOURCES += [
85     "nsIAppShell.idl",
86     "nsIBaseWindow.idl",
87     "nsIBidiKeyboard.idl",
88     "nsIClipboard.idl",
89     "nsIClipboardHelper.idl",
90     "nsIClipboardOwner.idl",
91     "nsIColorPicker.idl",
92     "nsIDisplayInfo.idl",
93     "nsIDragService.idl",
94     "nsIDragSession.idl",
95     "nsIFilePicker.idl",
96     "nsIFormatConverter.idl",
97     "nsIGfxInfo.idl",
98     "nsIGfxInfoDebug.idl",
99     "nsIPaper.idl",
100     "nsIPaperMargin.idl",
101     "nsIPrinter.idl",
102     "nsIPrinterList.idl",
103     "nsIPrintSession.idl",
104     "nsIPrintSettings.idl",
105     "nsIPrintSettingsService.idl",
106     "nsIScreen.idl",
107     "nsIScreenManager.idl",
108     "nsISharePicker.idl",
109     "nsISound.idl",
110     "nsISystemStatusBar.idl",
111     "nsITransferable.idl",
112     "nsIUserIdleService.idl",
113     "nsIUserIdleServiceInternal.idl",
116 XPIDL_MODULE = "widget"
118 EXPORTS += [
119     "GfxDriverInfo.h",
120     "GfxInfoBase.h",
121     "GfxInfoCollector.h",
122     "InputData.h",
123     "nsBaseAppShell.h",
124     "nsBaseDragService.h",
125     "nsBaseFilePicker.h",
126     "nsBaseScreen.h",
127     "nsBaseWidget.h",
128     "nsIDeviceContextSpec.h",
129     "nsIPrintDialogService.h",
130     "nsIRollupListener.h",
131     "nsIWidget.h",
132     "nsIWidgetListener.h",
133     "nsPaper.h",
134     "nsPrinterListBase.h",
135     "nsUserIdleService.h",
136     "nsWidgetInitData.h",
137     "nsWidgetsCID.h",
138     "PuppetWidget.h",
141 EXPORTS.mozilla += [
142     "BasicEvents.h",
143     "CommandList.h",
144     "ContentCache.h",
145     "ContentEvents.h",
146     "EventClassList.h",
147     "EventForwards.h",
148     "EventMessageList.h",
149     "FontRange.h",
150     "LookAndFeel.h",
151     "MiscEvents.h",
152     "MouseEvents.h",
153     "TextEventDispatcher.h",
154     "TextEventDispatcherListener.h",
155     "TextEvents.h",
156     "TextRange.h",
157     "TouchEvents.h",
158     "VsyncDispatcher.h",
159     "WidgetUtils.h",
162 EXPORTS.mozilla.widget += [
163     "CompositorWidget.h",
164     "IconLoader.h",
165     "IMEData.h",
166     "InProcessCompositorWidget.h",
167     "MediaKeysEventSourceFactory.h",
168     "NativeMenu.h",
169     "nsAutoRollup.h",
170     "nsXPLookAndFeel.h",
171     "PuppetBidiKeyboard.h",
172     "RemoteLookAndFeel.h",
173     "Screen.h",
174     "ScreenManager.h",
175     "ThemeChangeKind.h",
176     "WidgetMessageUtils.h",
179 UNIFIED_SOURCES += [
180     "CompositorWidget.cpp",
181     "ContentCache.cpp",
182     "GfxDriverInfo.cpp",
183     "GfxInfoBase.cpp",
184     "GfxInfoCollector.cpp",
185     "IconLoader.cpp",
186     "IMEData.cpp",
187     "InProcessCompositorWidget.cpp",
188     "InputData.cpp",
189     "nsAutoRollup.cpp",
190     "nsBaseAppShell.cpp",
191     "nsBaseScreen.cpp",
192     "nsClipboardHelper.cpp",
193     "nsClipboardProxy.cpp",
194     "nsColorPickerProxy.cpp",
195     "nsContentProcessWidgetFactory.cpp",
196     "nsDragServiceProxy.cpp",
197     "nsFilePickerProxy.cpp",
198     "nsHTMLFormatConverter.cpp",
199     "nsIWidgetListener.cpp",
200     "nsNativeBasicTheme.cpp",
201     "nsPrimitiveHelpers.cpp",
202     "nsPrintSettingsImpl.cpp",
203     "nsSoundProxy.cpp",
204     "nsTransferable.cpp",
205     "nsUserIdleService.cpp",
206     "nsXPLookAndFeel.cpp",
207     "PuppetBidiKeyboard.cpp",
208     "PuppetWidget.cpp",
209     "RemoteLookAndFeel.cpp",
210     "Screen.cpp",
211     "ScrollbarDrawingMac.cpp",
212     "SharedWidgetUtils.cpp",
213     "TextEventDispatcher.cpp",
214     "TouchResampler.cpp",
215     "VsyncDispatcher.cpp",
216     "WidgetEventImpl.cpp",
217     "WidgetUtils.cpp",
220 if CONFIG["OS_ARCH"] == "Linux":
221     EXPORTS.mozilla.widget += ["LSBUtils.h"]
222     SOURCES += ["LSBUtils.cpp"]
224 if CONFIG["MOZ_XUL"] and CONFIG["NS_PRINTING"]:
225     EXPORTS += [
226         "nsDeviceContextSpecProxy.h",
227         "nsPrintSettingsService.h",
228     ]
229     UNIFIED_SOURCES += [
230         "nsDeviceContextSpecProxy.cpp",
231         "nsPaper.cpp",
232         "nsPaperMargin.cpp",
233         "nsPrinterBase.cpp",
234         "nsPrinterListBase.cpp",
235         "nsPrintSession.cpp",
236         "nsPrintSettingsService.cpp",
237     ]
239     if toolkit in ("cocoa", "gtk"):
240         UNIFIED_SOURCES += [
241             "nsCUPSShim.cpp",
242             "nsPrinterCUPS.cpp",
243             "nsPrinterListCUPS.cpp",
244         ]
246 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
247 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
248 SOURCES += [
249     "nsBaseDragService.cpp",
250     "nsBaseWidget.cpp",
251     "ScreenManager.cpp",
254 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
255     EXPORTS.mozilla += [
256         "WidgetTraceEvent.h",
257     ]
259 EXPORTS.ipc = ["nsGUIEventIPC.h"]
261 if CONFIG["MOZ_X11"]:
262     DIRS += ["x11"]
264 if toolkit in ("cocoa", "windows"):
265     UNIFIED_SOURCES += [
266         "nsBaseClipboard.cpp",
267     ]
269 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
270     UNIFIED_SOURCES += [
271         "nsBaseFilePicker.cpp",
272     ]
274 if toolkit in ("gtk", "windows", "cocoa", "android"):
275     UNIFIED_SOURCES += [
276         "nsNativeTheme.cpp",
277     ]
279 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
281 include("/ipc/chromium/chromium-config.mozbuild")
283 LOCAL_INCLUDES += [
284     "/dom/base",
285     "/dom/ipc",
286     "/gfx/2d",
287     "/layout/base",
288     "/layout/forms",
289     "/layout/generic",
290     "/layout/painting",
291     "/layout/xul",
292     "/layout/xul/tree/",
293     "/view",
294     "/widget",
295     "/widget/headless",
298 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
299 if toolkit == "gtk":
300     LOCAL_INCLUDES += ["/third_party/cups/include"]
302 if toolkit == "windows":
303     IPDL_SOURCES = [
304         "headless/HeadlessWidgetTypes.ipdlh",
305         "windows/PCompositorWidget.ipdl",
306         "windows/PlatformWidgetTypes.ipdlh",
307     ]
308 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" 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         "generic/PCompositorWidget.ipdl",
317         "generic/PlatformWidgetTypes.ipdlh",
318         "headless/HeadlessWidgetTypes.ipdlh",
319     ]
321 PREPROCESSED_IPDL_SOURCES += [
322     "LookAndFeelTypes.ipdlh",
325 LOCAL_INCLUDES += [
326     "/widget/%s" % toolkit,
328 FINAL_LIBRARY = "xul"
330 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
331     DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
333 CXXFLAGS += CONFIG["TK_CFLAGS"]
334 if CONFIG["MOZ_WAYLAND"]:
335     CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]