gecko-dev/dom/events/moz.build
Aryeh Gregor af57d2df0f Bug 1251198 - Remove various obsolete events from document.createEvent r=smaug
Other browsers do not support any of these (IIRC), telemetry reports
essentially zero usage, and supporting them is contrary to the DOM spec.

Notes on specific events:

CommandEvent and SimpleGestureEvent: These are not supposed to be
web-exposed APIs, so I hid the interfaces from web content too
(necessary to avoid test_all_synthetic_events.html failures).

DataContainerEvent: This was a non-standard substitute for CustomEvent
that seemed to have only one user, so I removed it entirely and switched
the user (MozillaFileLogger.js) to CustomEvent.

ScrollAreaEvent: This is entirely non-standard, but we apparently expose
it deliberately to web content, so I didn't see any reason to remove it
from createEvent.

SimpleGestureEvent and XULCommandEvent: Can still be created from
createEvent(), but not by content.

TimeEvent: This is still in because it has no constructor, so there's no
other way to create it.  Ideally we'd update the SMIL spec to add a
constructor.  I did remove TimeEvents.

MozReview-Commit-ID: 7Yi2oCl9SM2

--HG--
extra : rebase_source : 199ab921acfc531b8b85e77f90fcd799b03c887b
2017-04-20 15:45:37 +03:00

156 lines
3.6 KiB
Python

# -*- 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", "DOM: Events")
MOCHITEST_MANIFESTS += [
'test/mochitest.ini',
'test/pointerevents/mochitest.ini',
]
MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
XPIDL_SOURCES += [
'nsIEventListenerService.idl',
]
XPIDL_MODULE = 'content_events'
EXPORTS.mozilla += [
'AsyncEventDispatcher.h',
'DOMEventTargetHelper.h',
'EventDispatcher.h',
'EventListenerManager.h',
'EventNameList.h',
'EventStateManager.h',
'EventStates.h',
'IMEStateManager.h',
'InternalMutationEvent.h',
'JSEventHandler.h',
'KeyNameList.h',
'PhysicalKeyCodeNameList.h',
'TextComposition.h',
'VirtualKeyCodeList.h',
]
EXPORTS.mozilla.dom += [
'AnimationEvent.h',
'BeforeUnloadEvent.h',
'ClipboardEvent.h',
'CommandEvent.h',
'CompositionEvent.h',
'CustomEvent.h',
'DataTransfer.h',
'DataTransferItem.h',
'DataTransferItemList.h',
'DeviceMotionEvent.h',
'DragEvent.h',
'Event.h',
'EventTarget.h',
'FocusEvent.h',
'ImageCaptureError.h',
'InputEvent.h',
'KeyboardEvent.h',
'MessageEvent.h',
'MouseEvent.h',
'MouseScrollEvent.h',
'MutationEvent.h',
'NotifyPaintEvent.h',
'PaintRequest.h',
'PointerEvent.h',
'ScrollAreaEvent.h',
'SimpleGestureEvent.h',
'StorageEvent.h',
'TextClause.h',
'Touch.h',
'TouchEvent.h',
'TransitionEvent.h',
'UIEvent.h',
'WheelEvent.h',
'XULCommandEvent.h',
]
if CONFIG['MOZ_WEBSPEECH']:
EXPORTS.mozilla.dom += ['SpeechRecognitionError.h']
UNIFIED_SOURCES += [
'AnimationEvent.cpp',
'AsyncEventDispatcher.cpp',
'BeforeUnloadEvent.cpp',
'ClipboardEvent.cpp',
'CommandEvent.cpp',
'CompositionEvent.cpp',
'ContentEventHandler.cpp',
'CustomEvent.cpp',
'DataTransfer.cpp',
'DataTransferItem.cpp',
'DataTransferItemList.cpp',
'DeviceMotionEvent.cpp',
'DOMEventTargetHelper.cpp',
'DragEvent.cpp',
'Event.cpp',
'EventDispatcher.cpp',
'EventListenerManager.cpp',
'EventListenerService.cpp',
'EventTarget.cpp',
'FocusEvent.cpp',
'ImageCaptureError.cpp',
'IMEContentObserver.cpp',
'IMEStateManager.cpp',
'InputEvent.cpp',
'JSEventHandler.cpp',
'KeyboardEvent.cpp',
'MessageEvent.cpp',
'MouseEvent.cpp',
'MouseScrollEvent.cpp',
'MutationEvent.cpp',
'NotifyPaintEvent.cpp',
'PaintRequest.cpp',
'PointerEvent.cpp',
'ScrollAreaEvent.cpp',
'SimpleGestureEvent.cpp',
'StorageEvent.cpp',
'TextClause.cpp',
'TextComposition.cpp',
'Touch.cpp',
'TouchEvent.cpp',
'TransitionEvent.cpp',
'UIEvent.cpp',
'WheelEvent.cpp',
'WheelHandlingHelper.cpp',
'XULCommandEvent.cpp',
]
# nsEventStateManager.cpp should be built separately because of Mac OS X headers.
SOURCES += [
'EventStateManager.cpp',
]
if CONFIG['MOZ_WEBSPEECH']:
UNIFIED_SOURCES += ['SpeechRecognitionError.cpp']
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/docshell/base',
'/dom/base',
'/dom/html',
'/dom/storage',
'/dom/svg',
'/dom/workers',
'/dom/xml',
'/dom/xul',
'/js/xpconnect/wrappers',
'/layout/generic',
'/layout/xul',
'/layout/xul/tree/',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']