widget/moz.build
author Noemi Erli <nerli@mozilla.com>
Tue, 26 Feb 2019 03:43:12 +0200
changeset 461110 3c030119c0dcf447dd1afe7165b2d6846a0bc7f0
parent 460736 95d0c10a390cee0b2b10bbc8452960754d88607a
child 475913 c8e48e2861c5c0a3607f8ea30fbb2a7ee349bf83
permissions -rw-r--r--
Backed out 10 changesets (bug 1505871) for wrench bustages CLOSED TREE Backed out changeset 045ab0ec3613 (bug 1505871) Backed out changeset 6486435a048d (bug 1505871) Backed out changeset 9be871042749 (bug 1505871) Backed out changeset 0007feaf988d (bug 1505871) Backed out changeset 3cb8fb01e77e (bug 1505871) Backed out changeset 2fff213d97e3 (bug 1505871) Backed out changeset 1ad20d485eca (bug 1505871) Backed out changeset 0fd8742fa662 (bug 1505871) Backed out changeset 1899600a7985 (bug 1505871) Backed out changeset f9578d20e54e (bug 1505871)

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

with Files("**"):
    BUG_COMPONENT = ("Core", "Widget")

with Files("crashtests/*1128214*"):
    BUG_COMPONENT = ("Core", "Layout")

with Files("crashtests/*303901*"):
    BUG_COMPONENT = ("Core", "Graphics")

with Files("crashtests/*380359*"):
    BUG_COMPONENT = ("Core", "Widget")

with Files("reftests/**"):
    BUG_COMPONENT = ("Core", "Widget: Cocoa")

with Files("reftests/*fallback*"):
    BUG_COMPONENT = ("Core", "Layout: Form Controls")

with Files("*CompositorWidget*"):
    BUG_COMPONENT = ("Core", "Graphics")

with Files("*Gfx*"):
    BUG_COMPONENT = ("Core", "Graphics")

with Files("*WindowSurface*"):
    BUG_COMPONENT = ("Core", "Graphics")

with Files("*FontRange*"):
    BUG_COMPONENT = ("Core", "Widget: Cocoa")

toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']

if toolkit in ('cocoa', 'android', 'uikit'):
    DIRS += [toolkit]

if toolkit == 'windows':
    DIRS += ['windows']

    XPIDL_SOURCES += [
        'nsIJumpListBuilder.idl',
        'nsIJumpListItem.idl',
        'nsIPrintSettingsWin.idl',
        'nsITaskbarOverlayIconController.idl',
        'nsITaskbarPreview.idl',
        'nsITaskbarPreviewButton.idl',
        'nsITaskbarPreviewController.idl',
        'nsITaskbarProgress.idl',
        'nsITaskbarTabPreview.idl',
        'nsITaskbarWindowPreview.idl',
        'nsIWindowsUIUtils.idl',
        'nsIWinTaskbar.idl',
    ]
elif toolkit == 'cocoa':
    XPIDL_SOURCES += [
        'nsIMacDockSupport.idl',
        'nsIMacSharingService.idl',
        'nsIMacWebAppUtils.idl',
        'nsIStandaloneNativeMenu.idl',
        'nsISystemStatusBar.idl',
        'nsITaskbarProgress.idl',
        'nsITouchBarHelper.idl',
        'nsITouchBarInput.idl',
        'nsITouchBarUpdater.idl',
    ]
    EXPORTS += [
        'nsINativeMenuService.h',
    ]

TEST_DIRS += ['tests']

DIRS += ['headless']

# Don't build the DSO under the 'build' directory as windows does.
#
# The DSOs get built in the toolkit dir itself.  Do this so that
# multiple implementations of widget can be built on the same
# source tree.
#
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
    DIRS += ['gtk']

    if CONFIG['MOZ_X11']:
        DIRS += ['gtkxtbin']

    XPIDL_SOURCES += [
        'nsIGtkTaskbarProgress.idl',
        'nsITaskbarProgress.idl',
    ]

XPIDL_SOURCES += [
    'nsIAppShell.idl',
    'nsIBaseWindow.idl',
    'nsIBidiKeyboard.idl',
    'nsIClipboard.idl',
    'nsIClipboardHelper.idl',
    'nsIClipboardOwner.idl',
    'nsIColorPicker.idl',
    'nsIDisplayInfo.idl',
    'nsIDragService.idl',
    'nsIDragSession.idl',
    'nsIFilePicker.idl',
    'nsIFormatConverter.idl',
    'nsIGfxInfo.idl',
    'nsIGfxInfoDebug.idl',
    'nsIIdleService.idl',
    'nsIIdleServiceInternal.idl',
    'nsIPrinterEnumerator.idl',
    'nsIPrintSession.idl',
    'nsIPrintSettings.idl',
    'nsIPrintSettingsService.idl',
    'nsIScreen.idl',
    'nsIScreenManager.idl',
    'nsISound.idl',
    'nsITransferable.idl',
]

XPIDL_MODULE = 'widget'

EXPORTS += [
    'GfxDriverInfo.h',
    'GfxInfoBase.h',
    'GfxInfoCollector.h',
    'InputData.h',
    'nsBaseAppShell.h',
    'nsBaseDragService.h',
    'nsBaseFilePicker.h',
    'nsBaseScreen.h',
    'nsBaseWidget.h',
    'nsIDeviceContextSpec.h',
    'nsIdleService.h',
    'nsIKeyEventInPluginCallback.h',
    'nsIPluginWidget.h',
    'nsIPrintDialogService.h',
    'nsIRollupListener.h',
    'nsIWidget.h',
    'nsIWidgetListener.h',
    'nsWidgetInitData.h',
    'nsWidgetsCID.h',
    'PuppetWidget.h',
]

EXPORTS.mozilla += [
    'BasicEvents.h',
    'CommandList.h',
    'ContentCache.h',
    'ContentEvents.h',
    'EventClassList.h',
    'EventForwards.h',
    'EventMessageList.h',
    'FontRange.h',
    'LookAndFeel.h',
    'MiscEvents.h',
    'MouseEvents.h',
    'ProcInfo.h',
    'TextEventDispatcher.h',
    'TextEventDispatcherListener.h',
    'TextEvents.h',
    'TextRange.h',
    'TouchEvents.h',
    'VsyncDispatcher.h',
    'WidgetUtils.h',
]

EXPORTS.mozilla.widget += [
    'CompositorWidget.h',
    'IMEData.h',
    'InProcessCompositorWidget.h',
    'nsAutoRollup.h',
    'PuppetBidiKeyboard.h',
    'Screen.h',
    'ScreenManager.h',
    'WidgetMessageUtils.h',
    'WindowSurface.h'
]

UNIFIED_SOURCES += [
    'CompositorWidget.cpp',
    'ContentCache.cpp',
    'GfxDriverInfo.cpp',
    'GfxInfoBase.cpp',
    'GfxInfoCollector.cpp',
    'InProcessCompositorWidget.cpp',
    'InputData.cpp',
    'nsAutoRollup.cpp',
    'nsBaseAppShell.cpp',
    'nsBaseScreen.cpp',
    'nsClipboardHelper.cpp',
    'nsClipboardProxy.cpp',
    'nsColorPickerProxy.cpp',
    'nsContentProcessWidgetFactory.cpp',
    'nsDragServiceProxy.cpp',
    'nsFilePickerProxy.cpp',
    'nsHTMLFormatConverter.cpp',
    'nsIdleService.cpp',
    'nsIWidgetListener.cpp',
    'nsPrimitiveHelpers.cpp',
    'nsPrintSettingsImpl.cpp',
    'nsSoundProxy.cpp',
    'nsTransferable.cpp',
    'nsXPLookAndFeel.cpp',
    'PuppetBidiKeyboard.cpp',
    'PuppetWidget.cpp',
    'Screen.cpp',
    'ScreenManager.cpp',
    'SharedWidgetUtils.cpp',
    'TextEventDispatcher.cpp',
    'VsyncDispatcher.cpp',
    'WidgetEventImpl.cpp',
    'WidgetUtils.cpp',
]

if CONFIG['OS_ARCH'] == 'Linux':
    EXPORTS.mozilla.widget += [
        'LSBUtils.h'
    ]
    SOURCES += [
        'LSBUtils.cpp'
    ]

if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
    EXPORTS += [
        'nsDeviceContextSpecProxy.h',
        'nsPrintSettingsService.h',
    ]
    UNIFIED_SOURCES += [
        'nsDeviceContextSpecProxy.cpp',
        'nsPrintSession.cpp',
        'nsPrintSettingsService.cpp',
    ]

# nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
# nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
SOURCES += [
    'nsBaseDragService.cpp',
    'nsBaseWidget.cpp',
]

if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
    EXPORTS.mozilla += [
        'WidgetTraceEvent.h',
    ]

EXPORTS.ipc = ['nsGUIEventIPC.h']

if CONFIG['MOZ_X11']:
    DIRS += ['x11']
    UNIFIED_SOURCES += [
        'GfxInfoX11.cpp'
    ]
    SOURCES += [
        'nsShmImage.cpp',
        'WindowSurfaceX11SHM.cpp',
    ]

if toolkit == 'windows':
    EXPORTS += [
        'PluginWidgetProxy.h',
    ]
    SOURCES += [
        'PluginWidgetProxy.cpp',
    ]

if toolkit in ('cocoa', 'windows'):
    UNIFIED_SOURCES += [
        'nsBaseClipboard.cpp',
    ]

if toolkit in {'gtk3', 'cocoa', 'windows',
               'android', 'uikit'}:
    UNIFIED_SOURCES += [
        'nsBaseFilePicker.cpp',
    ]

if toolkit in ('gtk3', 'windows', 'cocoa', 'android'):
    UNIFIED_SOURCES += [
        'nsNativeTheme.cpp',
    ]
if toolkit == 'gtk3':
    XPIDL_SOURCES += [
        'nsIApplicationChooser.idl',
    ]

DEFINES['MOZ_CROSS_PROCESS_IME'] = True

include('/ipc/chromium/chromium-config.mozbuild')

LOCAL_INCLUDES += [
    '/dom/base',
    '/dom/ipc',
    '/layout/base',
    '/layout/forms',
    '/layout/generic',
    '/layout/painting',
    '/layout/xul',
    '/layout/xul/tree/',
    '/view',
    '/widget',
    '/widget/headless',
]

if toolkit == 'windows':
    IPDL_SOURCES = [
        'headless/HeadlessWidgetTypes.ipdlh',
        'windows/PCompositorWidget.ipdl',
        'windows/PlatformWidgetTypes.ipdlh',
    ]
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT'] and CONFIG['MOZ_X11']:
    IPDL_SOURCES = [
        'gtk/PCompositorWidget.ipdl',
        'gtk/PlatformWidgetTypes.ipdlh',
        'headless/HeadlessWidgetTypes.ipdlh',
    ]
else:
    IPDL_SOURCES = [
        'headless/HeadlessWidgetTypes.ipdlh',
        'PCompositorWidget.ipdl',
        'PlatformWidgetTypes.ipdlh',
    ]

widget_dir = toolkit
if widget_dir == 'gtk3':
    widget_dir = 'gtk'

LOCAL_INCLUDES += [
    '/widget/%s' % widget_dir,
]
FINAL_LIBRARY = 'xul'

if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
    DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True

CXXFLAGS += CONFIG['TK_CFLAGS']