2012-05-21 04:12:37 -07:00
|
|
|
# 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/.
|
|
|
|
|
2012-03-30 21:42:20 -07:00
|
|
|
# DOM Bindings Configuration.
|
|
|
|
#
|
|
|
|
# The WebIDL interfaces are defined in dom/webidl. For each such interface, there
|
|
|
|
# is a corresponding entry in the configuration table below. The configuration
|
|
|
|
# table maps each interface name to a |descriptor| or list of |descriptor|s.
|
|
|
|
#
|
|
|
|
# Valid fields for all descriptors:
|
|
|
|
# * nativeType - The native type (concrete class or XPCOM interface) that
|
2012-08-28 10:10:09 -07:00
|
|
|
# instances of this interface will unwrap to. If not
|
|
|
|
# specified, defaults to "mozilla::dom::InterfaceName" for
|
|
|
|
# non-worker non-external-or-callback interfaces, to
|
|
|
|
# "mozilla::dom::workers::InterfaceName" for worker
|
|
|
|
# non-external interfaces, to 'nsIDOM' followed by the
|
|
|
|
# interface name for non-worker external-or-callback
|
|
|
|
# interfaces, and to "JSObject" for worker external-or-callback
|
|
|
|
# interfaces.
|
2012-03-30 21:42:20 -07:00
|
|
|
# * headerFile - The file in which the nativeType is declared (defaults
|
|
|
|
# to an educated guess).
|
|
|
|
# * castable - Indicates whether the value in the wrapper can be cast to
|
|
|
|
# nativeType, or whether it needs to be QI-ed (defaults to True
|
2012-07-19 11:48:58 -07:00
|
|
|
# for everything but callback interfaces and external interfaces,
|
|
|
|
# for which it defaults to false and is not allowed to be set
|
|
|
|
# at all).
|
2012-03-30 21:42:20 -07:00
|
|
|
# * concrete - Indicates whether there exist objects with this interface as
|
2012-10-10 12:57:57 -07:00
|
|
|
# their primary interface. Always False for callback interfaces.
|
|
|
|
# defaults to True otherwise.
|
2012-09-18 16:07:33 -07:00
|
|
|
# * prefable - Indicates whether this bindings should be disabled if the
|
|
|
|
# global pref for Web IDL bindings is set to false. This is a
|
|
|
|
# risk mitigation strategy and it will cause all of the Web IDL
|
|
|
|
# bindings marked as prefable to fall back to the xpconnect
|
|
|
|
# bindings in case something goes wrong. This defaults to False.
|
|
|
|
# Setting this on objects which only have Web IDL bindings does
|
|
|
|
# not make any sense.
|
2012-07-19 11:48:58 -07:00
|
|
|
# Cannot be set on external interfaces.
|
2012-03-30 21:42:20 -07:00
|
|
|
# * workers - Indicates whether the descriptor is intended to be used for
|
|
|
|
# worker threads (defaults to false).
|
|
|
|
# * customTrace - The native class will use a custom trace hook (defaults to
|
|
|
|
# true for workers, false otherwise).
|
|
|
|
# * customFinalize - The native class will use a custom finalize hook
|
|
|
|
# (defaults to true for workers, false otherwise).
|
|
|
|
# * notflattened - The native type does not have nsIClassInfo, so when
|
|
|
|
# wrapping it the right IID needs to be passed in.
|
2012-05-23 09:44:48 -07:00
|
|
|
# * register - True if this binding should be registered. Defaults to true.
|
2012-05-18 14:25:47 -07:00
|
|
|
# * binaryNames - Dict for mapping method and attribute names to different
|
|
|
|
# names when calling the native methods (defaults to an empty
|
|
|
|
# dict). The keys are the property names as they appear in the
|
|
|
|
# .webidl file and the values are the names as they should be
|
|
|
|
# in the WebIDL.
|
2012-06-15 13:25:50 -07:00
|
|
|
# * wrapperCache: True if this object is a wrapper cache. Objects that are
|
|
|
|
# not can only be returned from a limited set of methods,
|
|
|
|
# cannot be prefable, and must ensure that they disallow
|
2012-10-10 12:57:57 -07:00
|
|
|
# XPConnect wrapping. Always false for callback interfaces.
|
|
|
|
# Always true for worker descriptors for non-callback
|
|
|
|
# interfaces. Defaults to true for non-worker non-callback
|
|
|
|
# descriptors.
|
2012-09-19 06:02:37 -07:00
|
|
|
# * nativeOwnership: Describes how the native object is held. 4 possible
|
|
|
|
# types: worker object ("worker"), non-refcounted object
|
|
|
|
# ("owned"), refcounted non-nsISupports object
|
|
|
|
# ("refcounted") or nsISupports ("nsisupports").
|
|
|
|
# Non-refcounted objects need to inherit from
|
|
|
|
# mozilla::dom::NonRefcountedDOMObject and preferably use
|
|
|
|
# MOZ_COUNT_CTOR/MOZ_COUNT_DTOR in their
|
|
|
|
# constructor/destructor so they participate in leak
|
|
|
|
# logging.
|
|
|
|
# This mostly determines how the finalizer releases the
|
|
|
|
# binding's hold on the native object. For a worker object
|
|
|
|
# it'll call Release, for a non-refcounted object it'll
|
|
|
|
# call delete through XPConnect's deferred finalization
|
|
|
|
# mechanism, for a refcounted object it'll call Release
|
|
|
|
# through XPConnect's deferred finalization mechanism.
|
|
|
|
# Always "worker" for worker descriptors. Defaults to
|
|
|
|
# "nsisupports".
|
2012-03-30 21:42:20 -07:00
|
|
|
#
|
|
|
|
# The following fields are either a string, an array (defaults to an empty
|
|
|
|
# array) or a dictionary with three possible keys (all, getterOnly and
|
|
|
|
# setterOnly) each having such an array as the value
|
|
|
|
#
|
|
|
|
# * implicitJSContext - attributes and methods specified in the .webidl file
|
|
|
|
# that require a JSContext as the first argument
|
|
|
|
# * resultNotAddRefed - attributes and methods specified in the .webidl file
|
|
|
|
# that do not AddRef the return value
|
|
|
|
|
|
|
|
DOMInterfaces = {
|
|
|
|
|
2012-08-31 13:59:37 -07:00
|
|
|
'mozAudioContext': {
|
|
|
|
'nativeType': 'AudioContext',
|
2012-09-21 15:42:14 -07:00
|
|
|
'implicitJSContext': [ 'createBuffer' ],
|
2012-10-09 11:50:26 -07:00
|
|
|
'nativeOwnership': 'refcounted'
|
2012-09-18 16:07:33 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
'AudioNode' : {
|
|
|
|
'concrete': False,
|
|
|
|
},
|
|
|
|
|
|
|
|
'AudioSourceNode': {
|
|
|
|
'concrete': False,
|
|
|
|
},
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'Blob': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'headerFile': 'nsIDOMFile.h',
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
}],
|
|
|
|
|
2012-06-13 08:14:15 -07:00
|
|
|
'CanvasRenderingContext2D': [
|
|
|
|
{
|
|
|
|
'implicitJSContext': [
|
|
|
|
'createImageData', 'getImageData', 'putImageData', 'strokeStyle',
|
|
|
|
'fillStyle', 'mozDash'
|
|
|
|
],
|
|
|
|
'resultNotAddRefed': [ 'canvas' ],
|
|
|
|
'binaryNames': {
|
|
|
|
'mozImageSmoothingEnabled': 'imageSmoothingEnabled',
|
|
|
|
'mozFillRule': 'fillRule'
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
|
2012-09-05 13:49:53 -07:00
|
|
|
'ClientRectList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'nsClientRectList',
|
|
|
|
'headerFile': 'nsClientRect.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'item' ]
|
|
|
|
}],
|
|
|
|
|
2012-08-23 21:08:09 -07:00
|
|
|
'CSS2Properties': {
|
|
|
|
'nativeType': 'nsDOMCSSDeclaration',
|
|
|
|
'prefable': True,
|
|
|
|
},
|
|
|
|
|
|
|
|
'CSSStyleDeclaration': {
|
|
|
|
'nativeType': 'nsICSSDeclaration',
|
|
|
|
'prefable': True
|
|
|
|
},
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'Document': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIDocument',
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
}],
|
|
|
|
|
2012-09-05 13:49:53 -07:00
|
|
|
'DOMSettableTokenList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'nsDOMSettableTokenList',
|
|
|
|
'prefable': True,
|
|
|
|
'binaryNames': {
|
|
|
|
'__stringifier': 'Stringify'
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
|
|
|
|
'DOMTokenList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'nsDOMTokenList',
|
|
|
|
'prefable': True,
|
|
|
|
'binaryNames': {
|
|
|
|
'__stringifier': 'Stringify'
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'Event': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'EventListener': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'EventTarget': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsDOMEventTargetHelper',
|
|
|
|
'hasInstanceInterface': 'nsIDOMEventTarget',
|
|
|
|
'concrete': False,
|
2012-03-30 21:42:20 -07:00
|
|
|
'prefable': True,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'concrete': False
|
2012-03-30 21:42:20 -07:00
|
|
|
}],
|
|
|
|
|
2012-09-05 13:49:53 -07:00
|
|
|
'FileList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'nsDOMFileList',
|
|
|
|
'headerFile': 'nsDOMFile.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'item' ]
|
|
|
|
}],
|
|
|
|
|
2012-10-01 05:56:31 -07:00
|
|
|
'FileReaderSync': {
|
2012-09-20 19:47:47 -07:00
|
|
|
'workers': True,
|
2012-10-01 05:56:31 -07:00
|
|
|
},
|
2012-09-20 19:47:47 -07:00
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'FormData': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
}],
|
|
|
|
|
2012-09-05 13:49:53 -07:00
|
|
|
'HTMLCollection': [
|
|
|
|
{
|
|
|
|
'nativeType': 'nsIHTMLCollection',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'item' ]
|
|
|
|
}],
|
|
|
|
|
|
|
|
'HTMLOptionsCollection': [
|
|
|
|
{
|
|
|
|
'nativeType': 'nsHTMLOptionCollection',
|
|
|
|
'headerFile': 'nsHTMLSelectElement.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'item' ],
|
|
|
|
'binaryNames': {
|
|
|
|
'__indexedsettercreator': 'SetOption'
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
|
|
|
|
'HTMLPropertiesCollection': [
|
|
|
|
{
|
|
|
|
'headerFile': 'HTMLPropertiesCollection.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'item', 'namedItem', 'names' ]
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'IID': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-10-15 20:12:03 -07:00
|
|
|
'nativeType': 'nsIJSID',
|
2012-05-10 12:24:59 -07:00
|
|
|
'headerFile': 'xpcjsid.h',
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'InputStream': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIInputStream',
|
|
|
|
'notflattened': True
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
}],
|
|
|
|
|
2012-09-13 09:04:31 -07:00
|
|
|
'MediaStreamList': {
|
|
|
|
'headerFile': 'MediaStreamList.h',
|
|
|
|
'wrapperCache': False,
|
|
|
|
'nativeOwnership': 'owned',
|
|
|
|
'resultNotAddRefed': [ '__indexedGetter' ],
|
|
|
|
'binaryNames': { '__indexedGetter': 'IndexedGetter' }
|
|
|
|
},
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'MozChannel': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIChannel',
|
|
|
|
'notflattened': True
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
}],
|
|
|
|
|
2012-09-05 13:49:53 -07:00
|
|
|
'NodeList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'nsINodeList',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'item' ]
|
|
|
|
}],
|
|
|
|
|
|
|
|
'PaintRequestList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'nsPaintRequestList',
|
|
|
|
'headerFile': 'nsPaintRequest.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'item' ]
|
|
|
|
}],
|
|
|
|
|
2012-07-16 18:42:18 -07:00
|
|
|
'Performance': {
|
|
|
|
'nativeType': 'nsPerformance',
|
|
|
|
'resultNotAddRefed': [ 'timing', 'navigation' ]
|
|
|
|
},
|
|
|
|
|
|
|
|
'PerformanceTiming': {
|
|
|
|
'nativeType': 'nsPerformanceTiming',
|
|
|
|
'headerFile': 'nsPerformance.h'
|
|
|
|
},
|
|
|
|
|
|
|
|
'PerformanceNavigation': {
|
|
|
|
'nativeType': 'nsPerformanceNavigation',
|
|
|
|
'headerFile': 'nsPerformance.h'
|
|
|
|
},
|
|
|
|
|
2012-09-05 13:49:53 -07:00
|
|
|
'PropertyNodeList': [
|
|
|
|
{
|
|
|
|
'headerFile': 'HTMLPropertiesCollection.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'item' ]
|
|
|
|
}],
|
|
|
|
|
2012-10-14 00:40:11 -07:00
|
|
|
'Screen': {
|
|
|
|
'nativeType': 'nsScreen',
|
|
|
|
'prefable': True,
|
|
|
|
},
|
|
|
|
|
2012-09-05 13:49:53 -07:00
|
|
|
'SVGLengthList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'mozilla::DOMSVGLengthList',
|
|
|
|
'headerFile': 'DOMSVGLengthList.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'getItem' ]
|
|
|
|
}],
|
|
|
|
|
|
|
|
'SVGNumberList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'mozilla::DOMSVGNumberList',
|
|
|
|
'headerFile': 'DOMSVGNumberList.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'getItem' ]
|
|
|
|
}],
|
|
|
|
|
|
|
|
'SVGPathSegList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'mozilla::DOMSVGPathSegList',
|
|
|
|
'headerFile': 'DOMSVGPathSegList.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'getItem' ]
|
|
|
|
}],
|
|
|
|
|
|
|
|
'SVGPointList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'mozilla::DOMSVGPointList',
|
|
|
|
'headerFile': 'DOMSVGPointList.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'getItem' ]
|
|
|
|
}],
|
|
|
|
|
|
|
|
'SVGTransformList': [
|
|
|
|
{
|
|
|
|
'nativeType': 'mozilla::DOMSVGTransformList',
|
|
|
|
'headerFile': 'DOMSVGTransformList.h',
|
|
|
|
'prefable': True,
|
|
|
|
'resultNotAddRefed': [ 'getItem' ]
|
|
|
|
}],
|
|
|
|
|
2012-09-28 03:19:18 -07:00
|
|
|
'TextEncoder': {
|
|
|
|
'headerFile': 'mozilla/dom/TextEncoder.h',
|
|
|
|
'implicitJSContext': [ 'encode' ],
|
|
|
|
},
|
|
|
|
|
|
|
|
'TextDecoder': {
|
|
|
|
'headerFile': 'mozilla/dom/TextDecoder.h',
|
|
|
|
},
|
|
|
|
|
2012-10-09 11:39:49 -07:00
|
|
|
'WebGLActiveInfo': {
|
|
|
|
'nativeType': 'mozilla::WebGLActiveInfo',
|
|
|
|
'headerFile': 'WebGLContext.h',
|
|
|
|
'wrapperCache': False
|
|
|
|
},
|
|
|
|
|
2012-10-04 13:35:54 -07:00
|
|
|
'WebGLBuffer': {
|
|
|
|
'nativeType': 'mozilla::WebGLBuffer',
|
|
|
|
'headerFile': 'WebGLContext.h'
|
|
|
|
},
|
|
|
|
|
2012-10-03 14:13:05 -07:00
|
|
|
'WebGLExtensionCompressedTextureATC': {
|
|
|
|
'nativeType': 'mozilla::WebGLExtensionCompressedTextureATC',
|
|
|
|
'headerFile': 'WebGLExtensions.h'
|
|
|
|
},
|
|
|
|
|
|
|
|
'WebGLExtensionCompressedTexturePVRTC': {
|
|
|
|
'nativeType': 'mozilla::WebGLExtensionCompressedTexturePVRTC',
|
|
|
|
'headerFile': 'WebGLExtensions.h'
|
|
|
|
},
|
|
|
|
|
|
|
|
'WebGLExtensionCompressedTextureS3TC': {
|
|
|
|
'nativeType': 'mozilla::WebGLExtensionCompressedTextureS3TC',
|
|
|
|
'headerFile': 'WebGLExtensions.h'
|
|
|
|
},
|
|
|
|
|
|
|
|
'WebGLExtensionDepthTexture': {
|
|
|
|
'nativeType': 'mozilla::WebGLExtensionDepthTexture',
|
|
|
|
'headerFile': 'WebGLExtensions.h'
|
|
|
|
},
|
|
|
|
|
2012-10-17 12:11:51 -07:00
|
|
|
'WebGLExtensionDebugRendererInfo': {
|
|
|
|
'nativeType': 'mozilla::WebGLExtensionDebugRendererInfo',
|
|
|
|
'headerFile': 'WebGLExtensions.h'
|
|
|
|
},
|
|
|
|
|
2012-10-03 14:13:05 -07:00
|
|
|
'WebGLExtensionLoseContext': {
|
|
|
|
'nativeType': 'mozilla::WebGLExtensionLoseContext',
|
|
|
|
'headerFile': 'WebGLExtensions.h'
|
|
|
|
},
|
|
|
|
|
|
|
|
'WebGLExtensionStandardDerivatives': {
|
|
|
|
'nativeType': 'mozilla::WebGLExtensionStandardDerivatives',
|
|
|
|
'headerFile': 'WebGLExtensions.h'
|
|
|
|
},
|
|
|
|
|
|
|
|
'WebGLExtensionTextureFilterAnisotropic': {
|
|
|
|
'nativeType': 'mozilla::WebGLExtensionTextureFilterAnisotropic',
|
|
|
|
'headerFile': 'WebGLExtensions.h'
|
|
|
|
},
|
|
|
|
|
|
|
|
'WebGLExtensionTextureFloat': {
|
|
|
|
'nativeType': 'mozilla::WebGLExtensionTextureFloat',
|
|
|
|
'headerFile': 'WebGLExtensions.h'
|
|
|
|
},
|
|
|
|
|
2012-10-04 13:35:54 -07:00
|
|
|
'WebGLFramebuffer': {
|
|
|
|
'nativeType': 'mozilla::WebGLFramebuffer',
|
|
|
|
'headerFile': 'WebGLContext.h'
|
|
|
|
},
|
|
|
|
|
|
|
|
'WebGLProgram': {
|
|
|
|
'nativeType': 'mozilla::WebGLProgram',
|
|
|
|
'headerFile': 'WebGLContext.h'
|
|
|
|
},
|
|
|
|
|
|
|
|
'WebGLRenderbuffer': {
|
|
|
|
'nativeType': 'mozilla::WebGLRenderbuffer',
|
|
|
|
'headerFile': 'WebGLContext.h'
|
|
|
|
},
|
|
|
|
|
2012-05-31 11:16:48 -07:00
|
|
|
'WebGLRenderingContext': {
|
|
|
|
'nativeType': 'mozilla::WebGLContext',
|
2012-06-22 13:18:51 -07:00
|
|
|
'headerFile': 'WebGLContext.h',
|
2012-05-31 11:16:48 -07:00
|
|
|
'resultNotAddRefed': [ 'canvas', 'getContextAttributes', 'getExtension',
|
|
|
|
'getAttachedShaders' ],
|
2012-10-17 12:11:51 -07:00
|
|
|
'implicitJSContext': [ 'texImage2D', 'texSubImage2D', 'getSupportedExtensions' ],
|
2012-05-31 11:16:48 -07:00
|
|
|
},
|
|
|
|
|
2012-10-04 13:35:54 -07:00
|
|
|
'WebGLShader': {
|
|
|
|
'nativeType': 'mozilla::WebGLShader',
|
|
|
|
'headerFile': 'WebGLContext.h'
|
|
|
|
},
|
|
|
|
|
2012-10-03 14:13:05 -07:00
|
|
|
'WebGLShaderPrecisionFormat': {
|
|
|
|
'nativeType': 'mozilla::WebGLShaderPrecisionFormat',
|
2012-06-15 13:25:51 -07:00
|
|
|
'headerFile': 'WebGLContext.h',
|
|
|
|
'wrapperCache': False
|
|
|
|
},
|
|
|
|
|
2012-10-04 13:35:54 -07:00
|
|
|
'WebGLTexture': {
|
|
|
|
'nativeType': 'mozilla::WebGLTexture',
|
|
|
|
'headerFile': 'WebGLContext.h'
|
|
|
|
},
|
|
|
|
|
2012-10-03 14:13:05 -07:00
|
|
|
'WebGLUniformLocation': {
|
|
|
|
'nativeType': 'mozilla::WebGLUniformLocation',
|
2012-10-03 14:13:05 -07:00
|
|
|
'headerFile': 'WebGLContext.h',
|
|
|
|
'wrapperCache': False
|
|
|
|
},
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'XMLHttpRequest': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsXMLHttpRequest',
|
2012-06-20 03:18:39 -07:00
|
|
|
'implicitJSContext': [ 'constructor', ],
|
2012-05-10 12:24:59 -07:00
|
|
|
'resultNotAddRefed': [ 'upload', 'responseXML' ]
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
}],
|
|
|
|
|
|
|
|
'XMLHttpRequestEventTarget': [
|
|
|
|
{
|
|
|
|
'nativeType': 'nsXHREventTarget',
|
|
|
|
'headerFile': 'nsXMLHttpRequest.h',
|
|
|
|
'concrete': False,
|
|
|
|
'prefable': True,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
'concrete': False,
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'XMLHttpRequestUpload': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsXMLHttpRequestUpload',
|
|
|
|
'headerFile': 'nsXMLHttpRequest.h',
|
|
|
|
'prefable': True
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
}],
|
|
|
|
|
2012-09-10 06:48:14 -07:00
|
|
|
'WebSocket': [
|
|
|
|
{
|
|
|
|
'headerFile': 'WebSocket.h',
|
|
|
|
'implicitJSContext': [ 'constructor' ]
|
|
|
|
}],
|
|
|
|
|
2012-05-23 09:44:48 -07:00
|
|
|
####################################
|
|
|
|
# Test Interfaces of various sorts #
|
|
|
|
####################################
|
|
|
|
|
|
|
|
'TestInterface' : {
|
2012-10-17 18:17:16 -07:00
|
|
|
# Keep this in sync with TestExampleInterface
|
2012-05-23 09:44:48 -07:00
|
|
|
'headerFile': 'TestBindingHeader.h',
|
2012-05-23 09:44:48 -07:00
|
|
|
'register': False,
|
2012-05-24 22:08:26 -07:00
|
|
|
'resultNotAddRefed': [ 'receiveWeakSelf', 'receiveWeakNullableSelf',
|
2012-07-19 11:48:58 -07:00
|
|
|
'receiveWeakOther', 'receiveWeakNullableOther',
|
|
|
|
'receiveWeakExternal', 'receiveWeakNullableExternal',
|
|
|
|
'ReceiveWeakCallbackInterface',
|
|
|
|
'ReceiveWeakNullableCallbackInterface',
|
2012-05-24 22:08:26 -07:00
|
|
|
'receiveWeakCastableObjectSequence',
|
|
|
|
'receiveWeakNullableCastableObjectSequence',
|
|
|
|
'receiveWeakCastableObjectNullableSequence',
|
2012-05-18 14:25:47 -07:00
|
|
|
'receiveWeakNullableCastableObjectNullableSequence' ],
|
|
|
|
'binaryNames': { 'methodRenamedFrom': 'methodRenamedTo',
|
|
|
|
'attributeGetterRenamedFrom': 'attributeGetterRenamedTo',
|
|
|
|
'attributeRenamedFrom': 'attributeRenamedTo' }
|
2012-05-29 20:45:18 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
'TestNonCastableInterface' : {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
|
|
|
'register': False,
|
|
|
|
'castable': False
|
|
|
|
},
|
|
|
|
|
|
|
|
'TestExternalInterface' : {
|
2012-06-15 13:25:50 -07:00
|
|
|
'nativeType': 'mozilla::dom::TestExternalInterface',
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
2012-07-19 11:48:58 -07:00
|
|
|
'register': False
|
2012-06-15 13:25:50 -07:00
|
|
|
},
|
2012-05-29 20:45:18 -07:00
|
|
|
|
2012-06-15 13:25:50 -07:00
|
|
|
'TestNonWrapperCacheInterface' : {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
|
|
|
'register': False,
|
|
|
|
'wrapperCache': False
|
|
|
|
},
|
2012-07-19 11:48:58 -07:00
|
|
|
|
|
|
|
'TestCallbackInterface': {
|
|
|
|
'nativeType': 'mozilla::dom::TestCallbackInterface',
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
|
|
|
'register': False
|
|
|
|
},
|
2012-07-19 11:48:58 -07:00
|
|
|
|
|
|
|
'IndirectlyImplementedInterface': {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
|
|
|
'register': False,
|
2012-07-19 11:48:58 -07:00
|
|
|
'castable': False,
|
|
|
|
'concrete': False
|
2012-07-19 11:48:58 -07:00
|
|
|
},
|
2012-07-26 21:09:10 -07:00
|
|
|
|
|
|
|
'OnlyForUseInConstructor' : {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
|
|
|
'register': False
|
|
|
|
},
|
|
|
|
|
2012-05-22 06:46:20 -07:00
|
|
|
|
|
|
|
'TestIndexedGetterInterface' : {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
2012-09-05 06:21:33 -07:00
|
|
|
'register': False
|
2012-05-22 06:46:20 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
'TestNamedGetterInterface' : {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
|
|
|
'register': False
|
|
|
|
},
|
|
|
|
|
|
|
|
'TestIndexedAndNamedGetterInterface' : {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
2012-09-05 06:21:33 -07:00
|
|
|
'register': False
|
2012-05-22 06:46:20 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
'TestIndexedSetterInterface' : {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
|
|
|
'register': False
|
|
|
|
},
|
|
|
|
|
|
|
|
'TestNamedSetterInterface' : {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
|
|
|
'register': False
|
|
|
|
},
|
|
|
|
|
|
|
|
'TestIndexedAndNamedSetterInterface' : {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
|
|
|
'register': False
|
|
|
|
},
|
|
|
|
|
|
|
|
'TestIndexedAndNamedGetterAndSetterInterface' : {
|
|
|
|
'headerFile': 'TestBindingHeader.h',
|
|
|
|
'register': False,
|
|
|
|
'binaryNames': { '__stringifier': 'Stringify' }
|
|
|
|
},
|
2012-10-17 18:17:16 -07:00
|
|
|
|
|
|
|
'TestExampleInterface' : {
|
|
|
|
# Keep this in sync with TestInterface
|
|
|
|
'headerFile': 'TestExampleInterface-example.h',
|
|
|
|
'register': False,
|
|
|
|
'resultNotAddRefed': [ 'receiveWeakSelf', 'receiveWeakNullableSelf',
|
|
|
|
'receiveWeakOther', 'receiveWeakNullableOther',
|
|
|
|
'receiveWeakExternal', 'receiveWeakNullableExternal',
|
|
|
|
'ReceiveWeakCallbackInterface',
|
|
|
|
'ReceiveWeakNullableCallbackInterface',
|
|
|
|
'receiveWeakCastableObjectSequence',
|
|
|
|
'receiveWeakNullableCastableObjectSequence',
|
|
|
|
'receiveWeakCastableObjectNullableSequence',
|
|
|
|
'receiveWeakNullableCastableObjectNullableSequence' ],
|
|
|
|
'binaryNames': { 'methodRenamedFrom': 'methodRenamedTo',
|
|
|
|
'attributeGetterRenamedFrom': 'attributeGetterRenamedTo',
|
|
|
|
'attributeRenamedFrom': 'attributeRenamedTo' }
|
|
|
|
}
|
2012-03-30 21:42:20 -07:00
|
|
|
}
|
2012-05-31 11:16:48 -07:00
|
|
|
|
|
|
|
# These are temporary, until they've been converted to use new DOM bindings
|
|
|
|
def addExternalIface(iface, nativeType=None, headerFile=None):
|
2012-10-06 00:23:25 -07:00
|
|
|
if iface in DOMInterfaces:
|
|
|
|
raise Exception('Interface declared both as WebIDL and External interface')
|
2012-05-31 11:16:48 -07:00
|
|
|
domInterface = {
|
2012-07-19 11:48:58 -07:00
|
|
|
'concrete': False
|
2012-05-31 11:16:48 -07:00
|
|
|
}
|
2012-08-28 10:10:09 -07:00
|
|
|
if not nativeType is None:
|
|
|
|
domInterface['nativeType'] = nativeType
|
2012-05-31 11:16:48 -07:00
|
|
|
if not headerFile is None:
|
|
|
|
domInterface['headerFile'] = headerFile
|
|
|
|
DOMInterfaces[iface] = domInterface
|
|
|
|
|
|
|
|
# If you add one of these, you need to make sure nsDOMQS.h has the relevant
|
|
|
|
# macros added for it
|
|
|
|
def addExternalHTMLElement(element):
|
|
|
|
nativeElement = 'ns' + element
|
|
|
|
addExternalIface(element, nativeType=nativeElement,
|
|
|
|
headerFile=nativeElement + '.h')
|
|
|
|
|
|
|
|
addExternalHTMLElement('HTMLCanvasElement')
|
|
|
|
addExternalHTMLElement('HTMLImageElement')
|
2012-09-05 13:49:53 -07:00
|
|
|
addExternalHTMLElement('HTMLOptionElement')
|
|
|
|
addExternalHTMLElement('HTMLOptGroupElement')
|
2012-05-31 11:16:48 -07:00
|
|
|
addExternalHTMLElement('HTMLVideoElement')
|
2012-06-13 08:14:15 -07:00
|
|
|
addExternalIface('CanvasGradient', headerFile='nsIDOMCanvasRenderingContext2D.h')
|
|
|
|
addExternalIface('CanvasPattern', headerFile='nsIDOMCanvasRenderingContext2D.h')
|
2012-09-05 13:49:53 -07:00
|
|
|
addExternalIface('ClientRect')
|
2012-08-23 21:08:09 -07:00
|
|
|
addExternalIface('CSSRule')
|
|
|
|
addExternalIface('CSSValue')
|
2012-09-05 13:49:53 -07:00
|
|
|
addExternalIface('DOMStringList', nativeType='nsDOMStringList',
|
|
|
|
headerFile='nsDOMLists.h')
|
|
|
|
addExternalIface('Element', nativeType='nsGenericElement')
|
|
|
|
addExternalIface('File')
|
2012-06-13 08:14:15 -07:00
|
|
|
addExternalIface('HitRegionOptions', nativeType='nsISupports')
|
2012-09-05 13:49:53 -07:00
|
|
|
addExternalIface('HTMLElement')
|
2012-06-22 13:18:51 -07:00
|
|
|
addExternalIface('ImageData', nativeType='mozilla::dom::ImageData')
|
2012-09-13 09:04:31 -07:00
|
|
|
addExternalIface('MediaStream')
|
2012-09-05 13:49:53 -07:00
|
|
|
addExternalIface('Node', nativeType='nsINode')
|
|
|
|
addExternalIface('PaintRequest')
|
|
|
|
addExternalIface('SVGLength')
|
|
|
|
addExternalIface('SVGMatrix')
|
|
|
|
addExternalIface('SVGNumber')
|
|
|
|
addExternalIface('SVGPathSeg')
|
|
|
|
addExternalIface('SVGPoint')
|
|
|
|
addExternalIface('SVGTransform')
|
2012-06-13 08:14:15 -07:00
|
|
|
addExternalIface('TextMetrics', headerFile='nsIDOMCanvasRenderingContext2D.h')
|
2012-09-05 13:49:53 -07:00
|
|
|
addExternalIface('Touch', headerFile='nsIDOMTouchEvent.h')
|
2012-05-31 11:16:48 -07:00
|
|
|
addExternalIface('WebGLContextAttributes', nativeType='JSObject',
|
|
|
|
headerFile='jsapi.h')
|
2012-06-13 08:14:15 -07:00
|
|
|
addExternalIface('Window')
|
|
|
|
addExternalIface('XULElement')
|