Bug 1698786: part 1) Add some logging to `mozInlineSpellChecker`. r=masayuki
[gecko.git] / widget / moz.build
blobdf5d495f649449d3bcbbee3530b8bb0dfea45cf1
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         "nsIMacFinderProgress.idl",
63         "nsIMacSharingService.idl",
64         "nsIMacWebAppUtils.idl",
65         "nsIStandaloneNativeMenu.idl",
66         "nsITaskbarProgress.idl",
67         "nsITouchBarHelper.idl",
68         "nsITouchBarInput.idl",
69         "nsITouchBarUpdater.idl",
70     ]
72 TEST_DIRS += ["tests", "tests/gtest"]
74 DIRS += ["headless"]
76 # Don't build the DSO under the 'build' directory as windows does.
78 # The DSOs get built in the toolkit dir itself.  Do this so that
79 # multiple implementations of widget can be built on the same
80 # source tree.
82 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
83     DIRS += ["gtk"]
85     XPIDL_SOURCES += [
86         "nsIGtkTaskbarProgress.idl",
87         "nsITaskbarProgress.idl",
88     ]
90 XPIDL_SOURCES += [
91     "nsIAppShell.idl",
92     "nsIBaseWindow.idl",
93     "nsIBidiKeyboard.idl",
94     "nsIClipboard.idl",
95     "nsIClipboardHelper.idl",
96     "nsIClipboardOwner.idl",
97     "nsIColorPicker.idl",
98     "nsIDisplayInfo.idl",
99     "nsIDragService.idl",
100     "nsIDragSession.idl",
101     "nsIFilePicker.idl",
102     "nsIFormatConverter.idl",
103     "nsIGfxInfo.idl",
104     "nsIGfxInfoDebug.idl",
105     "nsIPaper.idl",
106     "nsIPaperMargin.idl",
107     "nsIPrinter.idl",
108     "nsIPrinterList.idl",
109     "nsIPrintSession.idl",
110     "nsIPrintSettings.idl",
111     "nsIPrintSettingsService.idl",
112     "nsIScreen.idl",
113     "nsIScreenManager.idl",
114     "nsISharePicker.idl",
115     "nsISound.idl",
116     "nsISystemStatusBar.idl",
117     "nsITransferable.idl",
118     "nsIUserIdleService.idl",
119     "nsIUserIdleServiceInternal.idl",
122 XPIDL_MODULE = "widget"
124 EXPORTS += [
125     "GfxDriverInfo.h",
126     "GfxInfoBase.h",
127     "GfxInfoCollector.h",
128     "InputData.h",
129     "nsBaseAppShell.h",
130     "nsBaseDragService.h",
131     "nsBaseFilePicker.h",
132     "nsBaseScreen.h",
133     "nsBaseWidget.h",
134     "nsIDeviceContextSpec.h",
135     "nsIPluginWidget.h",
136     "nsIPrintDialogService.h",
137     "nsIRollupListener.h",
138     "nsIWidget.h",
139     "nsIWidgetListener.h",
140     "nsPaper.h",
141     "nsPrinterListBase.h",
142     "nsUserIdleService.h",
143     "nsWidgetInitData.h",
144     "nsWidgetsCID.h",
145     "PuppetWidget.h",
148 EXPORTS.mozilla += [
149     "BasicEvents.h",
150     "CommandList.h",
151     "ContentCache.h",
152     "ContentEvents.h",
153     "EventClassList.h",
154     "EventForwards.h",
155     "EventMessageList.h",
156     "FontRange.h",
157     "LookAndFeel.h",
158     "MiscEvents.h",
159     "MouseEvents.h",
160     "TextEventDispatcher.h",
161     "TextEventDispatcherListener.h",
162     "TextEvents.h",
163     "TextRange.h",
164     "TouchEvents.h",
165     "VsyncDispatcher.h",
166     "WidgetUtils.h",
169 EXPORTS.mozilla.widget += [
170     "CompositorWidget.h",
171     "IconLoader.h",
172     "IMEData.h",
173     "InProcessCompositorWidget.h",
174     "MediaKeysEventSourceFactory.h",
175     "nsAutoRollup.h",
176     "nsXPLookAndFeel.h",
177     "PuppetBidiKeyboard.h",
178     "RemoteLookAndFeel.h",
179     "Screen.h",
180     "ScreenManager.h",
181     "ThemeChangeKind.h",
182     "WidgetMessageUtils.h",
183     "WindowSurface.h",
186 UNIFIED_SOURCES += [
187     "CompositorWidget.cpp",
188     "ContentCache.cpp",
189     "GfxDriverInfo.cpp",
190     "GfxInfoBase.cpp",
191     "GfxInfoCollector.cpp",
192     "IconLoader.cpp",
193     "IMEData.cpp",
194     "InProcessCompositorWidget.cpp",
195     "InputData.cpp",
196     "nsAutoRollup.cpp",
197     "nsBaseAppShell.cpp",
198     "nsBaseScreen.cpp",
199     "nsClipboardHelper.cpp",
200     "nsClipboardProxy.cpp",
201     "nsColorPickerProxy.cpp",
202     "nsContentProcessWidgetFactory.cpp",
203     "nsDragServiceProxy.cpp",
204     "nsFilePickerProxy.cpp",
205     "nsHTMLFormatConverter.cpp",
206     "nsIWidgetListener.cpp",
207     "nsNativeBasicTheme.cpp",
208     "nsPrimitiveHelpers.cpp",
209     "nsPrintSettingsImpl.cpp",
210     "nsSoundProxy.cpp",
211     "nsTransferable.cpp",
212     "nsUserIdleService.cpp",
213     "nsXPLookAndFeel.cpp",
214     "PuppetBidiKeyboard.cpp",
215     "PuppetWidget.cpp",
216     "RemoteLookAndFeel.cpp",
217     "Screen.cpp",
218     "ScrollbarDrawingMac.cpp",
219     "SharedWidgetUtils.cpp",
220     "TextEventDispatcher.cpp",
221     "TouchResampler.cpp",
222     "VsyncDispatcher.cpp",
223     "WidgetEventImpl.cpp",
224     "WidgetUtils.cpp",
227 if CONFIG["OS_ARCH"] == "Linux":
228     EXPORTS.mozilla.widget += ["LSBUtils.h"]
229     SOURCES += ["LSBUtils.cpp"]
231 if CONFIG["MOZ_XUL"] and CONFIG["NS_PRINTING"]:
232     EXPORTS += [
233         "nsDeviceContextSpecProxy.h",
234         "nsPrintSettingsService.h",
235     ]
236     UNIFIED_SOURCES += [
237         "nsDeviceContextSpecProxy.cpp",
238         "nsPaper.cpp",
239         "nsPaperMargin.cpp",
240         "nsPrinterBase.cpp",
241         "nsPrinterListBase.cpp",
242         "nsPrintSession.cpp",
243         "nsPrintSettingsService.cpp",
244     ]
246     if toolkit in ("cocoa", "gtk"):
247         UNIFIED_SOURCES += [
248             "nsCUPSShim.cpp",
249             "nsPrinterCUPS.cpp",
250             "nsPrinterListCUPS.cpp",
251         ]
253 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
254 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
255 SOURCES += [
256     "nsBaseDragService.cpp",
257     "nsBaseWidget.cpp",
258     "ScreenManager.cpp",
261 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
262     EXPORTS.mozilla += [
263         "WidgetTraceEvent.h",
264     ]
266 EXPORTS.ipc = ["nsGUIEventIPC.h"]
268 if CONFIG["MOZ_X11"]:
269     DIRS += ["x11"]
270     SOURCES += [
271         "GfxInfoX11.cpp",
272         "nsShmImage.cpp",
273         "WindowSurfaceX11SHM.cpp",
274     ]
276 if toolkit == "windows":
277     EXPORTS += [
278         "PluginWidgetProxy.h",
279     ]
280     SOURCES += [
281         "PluginWidgetProxy.cpp",
282     ]
284 if toolkit in ("cocoa", "windows"):
285     UNIFIED_SOURCES += [
286         "nsBaseClipboard.cpp",
287     ]
289 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
290     UNIFIED_SOURCES += [
291         "nsBaseFilePicker.cpp",
292     ]
294 if toolkit in ("gtk", "windows", "cocoa", "android"):
295     UNIFIED_SOURCES += [
296         "nsNativeTheme.cpp",
297     ]
298 if toolkit == "gtk":
299     XPIDL_SOURCES += [
300         "nsIApplicationChooser.idl",
301     ]
303 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
305 include("/ipc/chromium/chromium-config.mozbuild")
307 LOCAL_INCLUDES += [
308     "/dom/base",
309     "/dom/ipc",
310     "/gfx/2d",
311     "/layout/base",
312     "/layout/forms",
313     "/layout/generic",
314     "/layout/painting",
315     "/layout/xul",
316     "/layout/xul/tree/",
317     "/view",
318     "/widget",
319     "/widget/headless",
322 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
323 if toolkit == "gtk":
324     LOCAL_INCLUDES += ["/third_party/cups/include"]
326 if toolkit == "windows":
327     IPDL_SOURCES = [
328         "headless/HeadlessWidgetTypes.ipdlh",
329         "windows/PCompositorWidget.ipdl",
330         "windows/PlatformWidgetTypes.ipdlh",
331     ]
332 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
333     IPDL_SOURCES = [
334         "gtk/PCompositorWidget.ipdl",
335         "gtk/PlatformWidgetTypes.ipdlh",
336         "headless/HeadlessWidgetTypes.ipdlh",
337     ]
338 else:
339     IPDL_SOURCES = [
340         "generic/PCompositorWidget.ipdl",
341         "generic/PlatformWidgetTypes.ipdlh",
342         "headless/HeadlessWidgetTypes.ipdlh",
343     ]
345 PREPROCESSED_IPDL_SOURCES += [
346     "LookAndFeelTypes.ipdlh",
349 LOCAL_INCLUDES += [
350     "/widget/%s" % toolkit,
352 FINAL_LIBRARY = "xul"
354 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
355     DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
357 CXXFLAGS += CONFIG["TK_CFLAGS"]
358 if CONFIG["MOZ_WAYLAND"]:
359     CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]