Bug 1734943 [wpt PR 31170] - Correct scrolling contents cull rect, a=testonly
[gecko.git] / widget / moz.build
blob6f6efa6c3092233ed8c1ca34faf11eb74b3f7d66
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",
177     "WindowOcclusionState.h",
180 UNIFIED_SOURCES += [
181     "CompositorWidget.cpp",
182     "ContentCache.cpp",
183     "GfxDriverInfo.cpp",
184     "GfxInfoBase.cpp",
185     "GfxInfoCollector.cpp",
186     "IconLoader.cpp",
187     "IMEData.cpp",
188     "InProcessCompositorWidget.cpp",
189     "InputData.cpp",
190     "nsAutoRollup.cpp",
191     "nsBaseAppShell.cpp",
192     "nsBaseScreen.cpp",
193     "nsClipboardHelper.cpp",
194     "nsClipboardProxy.cpp",
195     "nsColorPickerProxy.cpp",
196     "nsContentProcessWidgetFactory.cpp",
197     "nsDragServiceProxy.cpp",
198     "nsFilePickerProxy.cpp",
199     "nsHTMLFormatConverter.cpp",
200     "nsIWidgetListener.cpp",
201     "nsNativeBasicTheme.cpp",
202     # Android non-native theme is built on all platforms for RDM.
203     "nsNativeBasicThemeAndroid.cpp",
204     "nsPrimitiveHelpers.cpp",
205     "nsPrintSettingsImpl.cpp",
206     "nsSoundProxy.cpp",
207     "nsTransferable.cpp",
208     "nsUserIdleService.cpp",
209     "nsXPLookAndFeel.cpp",
210     "PuppetBidiKeyboard.cpp",
211     "PuppetWidget.cpp",
212     "RemoteLookAndFeel.cpp",
213     "Screen.cpp",
214     "ScrollbarDrawingMac.cpp",
215     "SharedWidgetUtils.cpp",
216     "TextEventDispatcher.cpp",
217     "TouchResampler.cpp",
218     "VsyncDispatcher.cpp",
219     "WidgetEventImpl.cpp",
220     "WidgetUtils.cpp",
223 if CONFIG["OS_ARCH"] == "Linux":
224     EXPORTS.mozilla.widget += ["LSBUtils.h"]
225     SOURCES += ["LSBUtils.cpp"]
227 if CONFIG["MOZ_XUL"] and CONFIG["NS_PRINTING"]:
228     EXPORTS += [
229         "nsDeviceContextSpecProxy.h",
230         "nsPrintSettingsService.h",
231     ]
232     UNIFIED_SOURCES += [
233         "nsDeviceContextSpecProxy.cpp",
234         "nsPaper.cpp",
235         "nsPaperMargin.cpp",
236         "nsPrinterBase.cpp",
237         "nsPrinterListBase.cpp",
238         "nsPrintSession.cpp",
239         "nsPrintSettingsService.cpp",
240     ]
242     if toolkit in ("cocoa", "gtk"):
243         UNIFIED_SOURCES += [
244             "nsCUPSShim.cpp",
245             "nsPrinterCUPS.cpp",
246             "nsPrinterListCUPS.cpp",
247         ]
249 # nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
250 # nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
251 SOURCES += [
252     "nsBaseDragService.cpp",
253     "nsBaseWidget.cpp",
254     "ScreenManager.cpp",
257 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
258     EXPORTS.mozilla += [
259         "WidgetTraceEvent.h",
260     ]
262 EXPORTS.ipc = ["nsGUIEventIPC.h"]
264 if CONFIG["MOZ_X11"]:
265     DIRS += ["x11"]
267 if toolkit in ("cocoa", "windows"):
268     UNIFIED_SOURCES += [
269         "nsBaseClipboard.cpp",
270     ]
272 if toolkit in {"gtk", "cocoa", "windows", "android", "uikit"}:
273     UNIFIED_SOURCES += [
274         "nsBaseFilePicker.cpp",
275     ]
277 if toolkit in ("gtk", "windows", "cocoa", "android"):
278     UNIFIED_SOURCES += [
279         "nsNativeTheme.cpp",
280     ]
282 DEFINES["MOZ_CROSS_PROCESS_IME"] = True
284 include("/ipc/chromium/chromium-config.mozbuild")
286 LOCAL_INCLUDES += [
287     "/dom/base",
288     "/dom/ipc",
289     "/gfx/2d",
290     "/layout/base",
291     "/layout/forms",
292     "/layout/generic",
293     "/layout/painting",
294     "/layout/xul",
295     "/layout/xul/tree/",
296     "/view",
297     "/widget",
298     "/widget/headless",
301 # We use the CUPS headers on Cocoa and GTK, but on GTK we don't depend on there being system headers.
302 if toolkit == "gtk":
303     LOCAL_INCLUDES += ["/third_party/cups/include"]
305 if toolkit == "windows":
306     IPDL_SOURCES = [
307         "headless/HeadlessWidgetTypes.ipdlh",
308         "windows/PCompositorWidget.ipdl",
309         "windows/PlatformWidgetTypes.ipdlh",
310     ]
311 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
312     IPDL_SOURCES = [
313         "gtk/PCompositorWidget.ipdl",
314         "gtk/PlatformWidgetTypes.ipdlh",
315         "headless/HeadlessWidgetTypes.ipdlh",
316     ]
317 else:
318     IPDL_SOURCES = [
319         "generic/PCompositorWidget.ipdl",
320         "generic/PlatformWidgetTypes.ipdlh",
321         "headless/HeadlessWidgetTypes.ipdlh",
322     ]
324 PREPROCESSED_IPDL_SOURCES += [
325     "LookAndFeelTypes.ipdlh",
328 LOCAL_INCLUDES += [
329     "/widget/%s" % toolkit,
331 FINAL_LIBRARY = "xul"
333 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
334     DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
336 CXXFLAGS += CONFIG["TK_CFLAGS"]
337 if CONFIG["MOZ_WAYLAND"]:
338     CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
340 REQUIRES_UNIFIED_BUILD = True