2016-07-14 16:16:42 +00:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 21:20:02 +00:00
|
|
|
# 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/.
|
|
|
|
|
|
|
|
toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
|
|
|
|
|
2016-07-07 16:14:25 +00:00
|
|
|
if toolkit in ('cocoa', 'android', 'gonk', 'uikit'):
|
2013-02-25 21:20:02 +00:00
|
|
|
DIRS += [toolkit]
|
2016-07-07 16:14:25 +00:00
|
|
|
if toolkit in ('android', 'gonk', 'gtk2', 'gtk3'):
|
2013-04-16 19:24:43 +00:00
|
|
|
EXPORTS += ['nsIPrintDialogService.h']
|
2013-02-25 21:20:02 +00:00
|
|
|
|
|
|
|
if toolkit == 'windows':
|
|
|
|
DIRS += ['windows']
|
|
|
|
|
2013-03-12 17:20:41 +00:00
|
|
|
XPIDL_SOURCES += [
|
|
|
|
'nsIJumpListBuilder.idl',
|
|
|
|
'nsIJumpListItem.idl',
|
|
|
|
'nsIPrintSettingsWin.idl',
|
2013-05-16 22:37:18 +00:00
|
|
|
'nsITaskbarOverlayIconController.idl',
|
2013-03-12 17:20:41 +00:00
|
|
|
'nsITaskbarPreview.idl',
|
2013-05-16 17:22:02 +00:00
|
|
|
'nsITaskbarPreviewButton.idl',
|
2013-05-16 22:37:18 +00:00
|
|
|
'nsITaskbarPreviewController.idl',
|
2013-05-16 17:22:02 +00:00
|
|
|
'nsITaskbarProgress.idl',
|
2013-05-16 22:37:18 +00:00
|
|
|
'nsITaskbarTabPreview.idl',
|
|
|
|
'nsITaskbarWindowPreview.idl',
|
2015-06-16 18:51:29 +00:00
|
|
|
'nsIWindowsUIUtils.idl',
|
2013-03-12 17:20:41 +00:00
|
|
|
'nsIWinTaskbar.idl',
|
|
|
|
]
|
|
|
|
elif toolkit == 'cocoa':
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
'nsIMacDockSupport.idl',
|
|
|
|
'nsIMacWebAppUtils.idl',
|
|
|
|
'nsIStandaloneNativeMenu.idl',
|
2014-07-18 19:06:02 +00:00
|
|
|
'nsISystemStatusBar.idl',
|
2013-03-12 17:20:41 +00:00
|
|
|
'nsITaskbarProgress.idl',
|
|
|
|
]
|
2013-04-16 19:24:43 +00:00
|
|
|
EXPORTS += [
|
|
|
|
'nsINativeMenuService.h',
|
|
|
|
'nsIPrintDialogService.h',
|
|
|
|
]
|
2013-03-12 17:20:41 +00:00
|
|
|
|
2014-07-28 23:55:55 +00:00
|
|
|
TEST_DIRS += ['tests']
|
2013-02-25 21:20:02 +00:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
#
|
2016-03-16 04:47:26 +00:00
|
|
|
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
|
2013-09-23 13:21:57 +00:00
|
|
|
DIRS += ['gtk']
|
2013-02-25 21:20:02 +00:00
|
|
|
|
|
|
|
if CONFIG['MOZ_X11']:
|
|
|
|
DIRS += ['gtkxtbin']
|
2013-03-12 17:17:46 +00:00
|
|
|
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
'nsIAppShell.idl',
|
|
|
|
'nsIBaseWindow.idl',
|
|
|
|
'nsIBidiKeyboard.idl',
|
|
|
|
'nsIClipboard.idl',
|
|
|
|
'nsIClipboardDragDropHookList.idl',
|
|
|
|
'nsIClipboardDragDropHooks.idl',
|
|
|
|
'nsIClipboardHelper.idl',
|
|
|
|
'nsIClipboardOwner.idl',
|
2013-07-03 10:17:26 +00:00
|
|
|
'nsIColorPicker.idl',
|
2016-06-20 13:55:00 +00:00
|
|
|
'nsIDatePicker.idl',
|
2015-06-05 03:29:30 +00:00
|
|
|
'nsIDisplayInfo.idl',
|
2013-03-12 17:17:46 +00:00
|
|
|
'nsIDragService.idl',
|
|
|
|
'nsIDragSession.idl',
|
|
|
|
'nsIFilePicker.idl',
|
|
|
|
'nsIFormatConverter.idl',
|
|
|
|
'nsIGfxInfo.idl',
|
|
|
|
'nsIGfxInfoDebug.idl',
|
|
|
|
'nsIIdleService.idl',
|
|
|
|
'nsIIdleServiceInternal.idl',
|
|
|
|
'nsIPrintOptions.idl',
|
|
|
|
'nsIPrintSession.idl',
|
|
|
|
'nsIPrintSettings.idl',
|
|
|
|
'nsIPrintSettingsService.idl',
|
|
|
|
'nsIScreen.idl',
|
|
|
|
'nsIScreenManager.idl',
|
|
|
|
'nsISound.idl',
|
|
|
|
'nsITransferable.idl',
|
|
|
|
]
|
|
|
|
|
2013-11-19 02:47:43 +00:00
|
|
|
XPIDL_MODULE = 'widget'
|
2013-03-19 18:47:00 +00:00
|
|
|
|
2013-04-16 19:24:43 +00:00
|
|
|
EXPORTS += [
|
2014-10-23 17:16:45 +00:00
|
|
|
'GfxDriverInfo.h',
|
|
|
|
'GfxInfoBase.h',
|
|
|
|
'GfxInfoCollector.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'InputData.h',
|
2014-11-12 20:59:19 +00:00
|
|
|
'nsBaseScreen.h',
|
|
|
|
'nsBaseWidget.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'nsIDeviceContextSpec.h',
|
Bug 1257759 part.5 PluginInstanceChild should post received native key event to chrome process if the key combination may be a shortcut key r=jimm
When PluginInstanceChild receives native key events, it should post the events to the chrome process first for checking if the key combination is reserved. However, posting all key events to the chrome process may make damage to the performance of text input. Therefore, this patch starts to post a key event whose key combination may be a shortcut key. However, for avoiding to shuffle the event order, it posts following key events until all posted key events are handled by the chrome process.
For receiving response from widget, this patch defines nsIKeyEventInPluginCallback. It's specified by nsIWidget::OnWindowedPluginKeyEvent() for ensuring the caller will receive the reply. Basically, the caller of nsIWidget::OnWindowedPluginKeyEvent() should reply to the child process. However, if the widget is a PuppetWidget, it cannot return the result synchronously. Therefore, PuppetWidget::OnWindowedPluginKeyEvent() returns NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY and stores the callback to mKeyEventInPluginCallbacks. Then, TabParent::HandledWindowedPluginKeyEvent() will call PuppetWidget::HandledWindowedPluginKeyEvent().
MozReview-Commit-ID: G6brOU26NwQ
--HG--
extra : rebase_source : 8140456de278956d2d594e85c7b397ae366b4962
2016-04-19 11:09:37 +00:00
|
|
|
'nsIKeyEventInPluginCallback.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'nsIPluginWidget.h',
|
|
|
|
'nsIRollupListener.h',
|
|
|
|
'nsIWidget.h',
|
|
|
|
'nsIWidgetListener.h',
|
|
|
|
'nsWidgetInitData.h',
|
|
|
|
'nsWidgetsCID.h',
|
2014-11-12 20:59:20 +00:00
|
|
|
'PluginWidgetProxy.h',
|
2014-11-12 20:59:19 +00:00
|
|
|
'PuppetWidget.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
EXPORTS.mozilla += [
|
2013-09-24 10:04:14 +00:00
|
|
|
'BasicEvents.h',
|
2014-03-14 13:13:30 +00:00
|
|
|
'CommandList.h',
|
2015-06-05 09:28:18 +00:00
|
|
|
'ContentCache.h',
|
2013-09-24 10:04:15 +00:00
|
|
|
'ContentEvents.h',
|
2013-10-18 06:10:20 +00:00
|
|
|
'EventClassList.h',
|
2013-09-24 10:04:14 +00:00
|
|
|
'EventForwards.h',
|
2015-08-22 01:34:51 +00:00
|
|
|
'EventMessageList.h',
|
2015-01-31 07:17:12 +00:00
|
|
|
'FontRange.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'LookAndFeel.h',
|
2013-09-24 10:04:15 +00:00
|
|
|
'MiscEvents.h',
|
2013-09-24 10:04:15 +00:00
|
|
|
'MouseEvents.h',
|
2015-01-28 06:27:30 +00:00
|
|
|
'TextEventDispatcher.h',
|
2015-01-28 06:27:32 +00:00
|
|
|
'TextEventDispatcherListener.h',
|
2013-09-24 10:04:15 +00:00
|
|
|
'TextEvents.h',
|
2013-10-22 13:27:36 +00:00
|
|
|
'TextRange.h',
|
2013-09-24 10:04:15 +00:00
|
|
|
'TouchEvents.h',
|
2014-11-21 18:52:24 +00:00
|
|
|
'VsyncDispatcher.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'WidgetUtils.h',
|
|
|
|
]
|
|
|
|
|
2015-04-10 22:18:05 +00:00
|
|
|
EXPORTS.mozilla.widget += [
|
2016-07-01 08:15:16 +00:00
|
|
|
'CompositorWidget.h',
|
2015-08-08 15:47:19 +00:00
|
|
|
'IMEData.h',
|
2016-07-01 08:15:16 +00:00
|
|
|
'InProcessCompositorWidget.h',
|
2015-04-10 22:18:05 +00:00
|
|
|
'PuppetBidiKeyboard.h',
|
2015-04-22 14:58:15 +00:00
|
|
|
'WidgetMessageUtils.h',
|
2016-07-11 20:08:43 +00:00
|
|
|
'WindowSurface.h'
|
2015-04-10 22:18:05 +00:00
|
|
|
]
|
|
|
|
|
2014-10-23 17:16:45 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2016-07-01 08:15:16 +00:00
|
|
|
'CompositorWidget.cpp',
|
2015-06-05 09:28:18 +00:00
|
|
|
'ContentCache.cpp',
|
2014-10-23 17:16:45 +00:00
|
|
|
'GfxDriverInfo.cpp',
|
|
|
|
'GfxInfoBase.cpp',
|
|
|
|
'GfxInfoCollector.cpp',
|
|
|
|
'GfxInfoWebGL.cpp',
|
2016-07-01 08:15:16 +00:00
|
|
|
'InProcessCompositorWidget.cpp',
|
2014-10-23 17:16:45 +00:00
|
|
|
'InputData.cpp',
|
|
|
|
'nsBaseAppShell.cpp',
|
|
|
|
'nsBaseScreen.cpp',
|
|
|
|
'nsClipboardHelper.cpp',
|
|
|
|
'nsClipboardProxy.cpp',
|
|
|
|
'nsColorPickerProxy.cpp',
|
|
|
|
'nsContentProcessWidgetFactory.cpp',
|
2016-06-20 13:55:00 +00:00
|
|
|
'nsDatePickerProxy.cpp',
|
2015-04-08 18:48:11 +00:00
|
|
|
'nsDragServiceProxy.cpp',
|
2014-10-23 17:16:45 +00:00
|
|
|
'nsFilePickerProxy.cpp',
|
|
|
|
'nsHTMLFormatConverter.cpp',
|
|
|
|
'nsIdleService.cpp',
|
|
|
|
'nsIWidgetListener.cpp',
|
|
|
|
'nsPrimitiveHelpers.cpp',
|
|
|
|
'nsPrintSettingsImpl.cpp',
|
|
|
|
'nsScreenManagerProxy.cpp',
|
|
|
|
'nsTransferable.cpp',
|
|
|
|
'nsXPLookAndFeel.cpp',
|
2014-11-12 20:59:20 +00:00
|
|
|
'PluginWidgetProxy.cpp',
|
2015-04-10 22:18:05 +00:00
|
|
|
'PuppetBidiKeyboard.cpp',
|
2014-10-23 17:16:45 +00:00
|
|
|
'PuppetWidget.cpp',
|
|
|
|
'ScreenProxy.cpp',
|
|
|
|
'SharedWidgetUtils.cpp',
|
2015-01-28 06:27:30 +00:00
|
|
|
'TextEventDispatcher.cpp',
|
2014-11-21 18:52:24 +00:00
|
|
|
'VsyncDispatcher.cpp',
|
2014-10-23 17:16:47 +00:00
|
|
|
'WidgetEventImpl.cpp',
|
2014-10-23 17:16:45 +00:00
|
|
|
'WidgetUtils.cpp',
|
|
|
|
]
|
|
|
|
|
2016-07-26 18:23:47 +00:00
|
|
|
if CONFIG['OS_ARCH'] == 'Linux':
|
|
|
|
EXPORTS.mozilla.widget += [
|
|
|
|
'LSBUtils.h'
|
|
|
|
]
|
|
|
|
SOURCES += [
|
|
|
|
'LSBUtils.cpp'
|
|
|
|
]
|
|
|
|
|
2014-11-22 11:15:00 +00:00
|
|
|
if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
|
|
|
|
EXPORTS += [
|
2016-05-19 10:25:22 +00:00
|
|
|
'nsDeviceContextSpecProxy.h',
|
2014-11-22 11:15:00 +00:00
|
|
|
'nsPrintOptionsImpl.h',
|
|
|
|
]
|
|
|
|
UNIFIED_SOURCES += [
|
2016-05-19 10:25:22 +00:00
|
|
|
'nsDeviceContextSpecProxy.cpp',
|
2014-11-22 11:15:00 +00:00
|
|
|
'nsPrintOptionsImpl.cpp',
|
2016-05-19 10:25:22 +00:00
|
|
|
'nsPrintSession.cpp',
|
2014-11-22 11:15:00 +00:00
|
|
|
]
|
|
|
|
|
2014-10-23 17:16:45 +00:00
|
|
|
# nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
|
2016-05-27 20:46:25 +00:00
|
|
|
# nsBaseDragService.cpp moved out of UNIFIED to fix xgill crash (bug 1259850) after moving widget/ContentHelper -> apz/util/TouchActionHelper
|
2014-10-23 17:16:45 +00:00
|
|
|
SOURCES += [
|
2016-05-27 20:46:25 +00:00
|
|
|
'nsBaseDragService.cpp',
|
|
|
|
'nsBaseWidget.cpp'
|
2014-10-23 17:16:45 +00:00
|
|
|
]
|
|
|
|
|
2013-04-16 19:24:43 +00:00
|
|
|
if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'WidgetTraceEvent.h',
|
|
|
|
]
|
|
|
|
|
2013-07-10 19:08:23 +00:00
|
|
|
EXPORTS.ipc = ['nsGUIEventIPC.h']
|
2013-04-16 19:24:43 +00:00
|
|
|
|
2014-10-23 17:16:45 +00:00
|
|
|
if CONFIG['MOZ_X11']:
|
2014-10-23 17:16:47 +00:00
|
|
|
DIRS += ['x11']
|
2014-10-23 17:16:45 +00:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'GfxInfoX11.cpp'
|
|
|
|
]
|
2016-02-28 04:16:57 +00:00
|
|
|
SOURCES += [
|
2016-07-11 20:08:43 +00:00
|
|
|
'nsShmImage.cpp',
|
|
|
|
'WindowSurfaceX11SHM.cpp',
|
2016-02-28 04:16:57 +00:00
|
|
|
]
|
2014-10-23 17:16:45 +00:00
|
|
|
|
|
|
|
if toolkit in ('cocoa', 'windows'):
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'nsBaseClipboard.cpp',
|
|
|
|
]
|
|
|
|
|
2016-07-07 16:14:25 +00:00
|
|
|
if toolkit in {'gtk2', 'gtk3', 'cocoa', 'windows',
|
2015-06-12 12:49:57 +00:00
|
|
|
'android', 'gonk', 'uikit'}:
|
2014-10-23 17:16:45 +00:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'nsBaseFilePicker.cpp',
|
|
|
|
]
|
|
|
|
|
2016-07-07 16:14:25 +00:00
|
|
|
if toolkit in ('gtk2', 'gtk3', 'windows', 'cocoa'):
|
2014-10-23 17:16:45 +00:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'nsNativeTheme.cpp',
|
|
|
|
]
|
2015-06-08 08:41:00 +00:00
|
|
|
if toolkit == 'gtk3':
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
'nsIApplicationChooser.idl',
|
|
|
|
]
|
2014-10-23 17:16:45 +00:00
|
|
|
|
|
|
|
if not CONFIG['MOZ_B2G']:
|
|
|
|
DEFINES['MOZ_CROSS_PROCESS_IME'] = True
|
|
|
|
|
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
|
|
|
LOCAL_INCLUDES += [
|
2015-04-08 18:48:11 +00:00
|
|
|
'/dom/base',
|
|
|
|
'/dom/ipc',
|
2014-10-23 17:16:45 +00:00
|
|
|
'/layout/base',
|
|
|
|
'/layout/forms',
|
|
|
|
'/layout/generic',
|
|
|
|
'/layout/xul',
|
|
|
|
'/view',
|
2014-10-23 17:16:47 +00:00
|
|
|
'/widget',
|
2014-10-23 17:16:45 +00:00
|
|
|
]
|
|
|
|
|
2016-07-01 08:15:16 +00:00
|
|
|
if toolkit == 'windows':
|
|
|
|
IPDL_SOURCES = [
|
2016-07-01 08:15:16 +00:00
|
|
|
'windows/PCompositorWidget.ipdl',
|
2016-07-01 08:15:16 +00:00
|
|
|
'windows/PlatformWidgetTypes.ipdlh',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
IPDL_SOURCES = [
|
2016-07-01 08:15:16 +00:00
|
|
|
'PCompositorWidget.ipdl',
|
2016-07-01 08:15:16 +00:00
|
|
|
'PlatformWidgetTypes.ipdlh',
|
|
|
|
]
|
|
|
|
|
2014-10-23 17:16:45 +00:00
|
|
|
widget_dir = toolkit
|
|
|
|
if widget_dir in ('gtk3', 'gtk2'):
|
|
|
|
# gtk3 shares includes with gtk2
|
|
|
|
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']
|
2016-05-11 07:00:01 +00:00
|
|
|
|
|
|
|
if CONFIG['GNU_CXX']:
|
|
|
|
CXXFLAGS += ['-Wno-error=shadow']
|