diff options
Diffstat (limited to 'dom/bindings/Bindings.conf')
-rw-r--r-- | dom/bindings/Bindings.conf | 2095 |
1 files changed, 2095 insertions, 0 deletions
diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf new file mode 100644 index 0000000000..bf736e9ac2 --- /dev/null +++ b/dom/bindings/Bindings.conf @@ -0,0 +1,2095 @@ +# -*- Mode:Python; tab-width:8; indent-tabs-mode:nil -*- */ +# vim: set ts=8 sts=4 et sw=4 tw=80: */ +# 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/. + +# DOM Bindings Configuration. +# +# The WebIDL interfaces are defined in dom/webidl. For interfaces requiring +# special handling, there are corresponding entries in the configuration table +# below. The configuration table maps each interface name to a |descriptor|. +# +# Valid fields for all descriptors: +# * nativeType - The native type (concrete class or XPCOM interface) that +# instances of this interface will unwrap to. If not +# specified, defaults to 'nsIDOM' followed by the interface +# name for external interfaces and +# 'mozilla::dom::InterfaceName' for everything else. +# * headerFile - The file in which the nativeType is declared (defaults +# to an educated guess). +# * concrete - Indicates whether there exist JS objects with this interface as +# their primary interface (and hence whose prototype is this +# interface's prototype object). Always False for callback +# interfaces. Defaults to True for leaf interfaces and +# interfaces with constructors, false otherwise. +# * notflattened - The native type does not have nsIClassInfo, so when +# wrapping it the right IID needs to be passed in. +# Only relevant for callback interfaces. +# * register - True if this binding should be registered. Defaults to true. +# * 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 +# XPConnect wrapping. Always false for callback interfaces. +# Defaults to true for non-callback descriptors. +# * implicitJSContext - Llist of names of attributes and methods specified in +# the .webidl file that require a JSContext as the first +# argument. +# +# The value for an interface is a dictionary which specifies the +# descriptor to use when generating that interface's binding. + +import buildconfig + +DOMInterfaces = { + +'AbortSignal': { + 'implicitJSContext': [ 'throwIfAborted' ], + 'concrete': True, +}, + +'AnonymousContent': { + 'wrapperCache': False +}, + +'AudioBuffer': { + 'implicitJSContext': [ 'copyToChannel' ], +}, + +'AudioBufferSourceNode': { + 'implicitJSContext': [ 'buffer' ], +}, + +'AudioWorklet': { + 'nativeType': 'mozilla::dom::Worklet', +}, + +'AudioWorkletGlobalScope': { + 'implicitJSContext': [ 'registerProcessor' ], +}, + +'BarProp': { + 'headerFile': 'mozilla/dom/BarProps.h', +}, + +'BaseAudioContext': { + 'nativeType': 'mozilla::dom::AudioContext', +}, + +'BatteryManager': { + 'nativeType': 'mozilla::dom::battery::BatteryManager', + 'headerFile': 'BatteryManager.h' +}, + +'Blob': { + 'implicitJSContext': [ 'stream' ], +}, + +'BrowsingContext': { + 'concrete': True, +}, + +'Cache': { + 'implicitJSContext': [ 'add', 'addAll', 'match', 'matchAll', 'put', + 'delete', 'keys' ], + 'nativeType': 'mozilla::dom::cache::Cache', +}, + +'CacheStorage': { + 'implicitJSContext': [ 'match' ], + 'nativeType': 'mozilla::dom::cache::CacheStorage', +}, + +'CanvasRenderingContext2D': { + 'implicitJSContext': [ + 'createImageData', 'getImageData', 'isPointInPath', 'isPointInStroke' + ], +}, + +'CaretPosition' : { + 'nativeType': 'nsDOMCaretPosition', +}, + +'ChannelWrapper': { + 'nativeType': 'mozilla::extensions::ChannelWrapper', +}, + +'Client' : { + 'concrete': True, +}, + +'ClonedErrorHolder': { + 'wrapperCache': False +}, + +'console': { + 'nativeType': 'mozilla::dom::Console', +}, + +'ConsoleInstance': { + 'implicitJSContext': ['clear', 'count', 'countReset', 'groupEnd', 'time', 'timeEnd'], +}, + +'ConvolverNode': { + 'implicitJSContext': [ 'buffer' ], +}, + +'Credential' : { + 'concrete': True, +}, + +'Crypto' : { + 'headerFile': 'Crypto.h' +}, + +'CSS2Properties': { + 'nativeType': 'nsDOMCSSDeclaration' +}, + +'CSSConditionRule': { + 'nativeType': 'mozilla::css::ConditionRule', + 'headerFile': 'mozilla/css/GroupRule.h', +}, + +'CSSGroupingRule': { + 'nativeType': 'mozilla::css::GroupRule', +}, + +'CSSRule': { + 'nativeType': 'mozilla::css::Rule' +}, + +'CSSStyleDeclaration': { + 'nativeType': 'nsICSSDeclaration', + # Concrete because of the font-face mess. + 'concrete': True, +}, + +'CSSStyleSheet': { + 'nativeType': 'mozilla::StyleSheet', +}, + +'CustomElementRegistry': { + 'implicitJSContext': ['define', 'getName'], +}, + +'DebuggerNotification': { + 'concrete': True, +}, +'CallbackDebuggerNotification': { + 'concrete': True, +}, + +'DedicatedWorkerGlobalScope': { + 'headerFile': 'mozilla/dom/WorkerScope.h', +}, + +'DeviceAcceleration': { + 'headerFile': 'mozilla/dom/DeviceMotionEvent.h', +}, + +'DeviceRotationRate': { + 'headerFile': 'mozilla/dom/DeviceMotionEvent.h', +}, + +'DominatorTree': { + 'nativeType': 'mozilla::devtools::DominatorTree' +}, + +'DOMException': { + 'implicitJSContext': [ 'filename', 'lineNumber', 'stack' ], +}, + +'DOMMatrixReadOnly': { + 'headerFile': 'mozilla/dom/DOMMatrix.h', +}, + +'DOMPointReadOnly': { + 'headerFile': 'mozilla/dom/DOMPoint.h', +}, + +'DOMRectList': { + 'headerFile': 'mozilla/dom/DOMRect.h', +}, + +'DOMRectReadOnly': { + 'headerFile': 'mozilla/dom/DOMRect.h', +}, + +'DOMStringMap': { + 'nativeType': 'nsDOMStringMap' +}, + +'DOMTokenList': { + 'nativeType': 'nsDOMTokenList', +}, + +'Element': { + 'concrete': True, +}, + +'Event': { + 'implicitJSContext': [ 'preventDefault' ], +}, + +'EventTarget': { + 'jsImplParent': 'mozilla::DOMEventTargetHelper', +}, + +'Exception': { + 'headerFile': 'mozilla/dom/DOMException.h', + 'implicitJSContext': [ '__stringifier', 'filename', 'lineNumber', 'stack' ], +}, + +'ExtendableEvent': { + 'headerFile': 'mozilla/dom/ServiceWorkerEvents.h', + 'implicitJSContext': [ 'waitUntil' ], +}, + +'ExtendableMessageEvent': { + 'headerFile': 'mozilla/dom/ServiceWorkerEvents.h', +}, + +'FetchEvent': { + 'headerFile': 'ServiceWorkerEvents.h', + 'implicitJSContext': [ 'respondWith' ], +}, + +'FileReader': { + 'implicitJSContext': [ 'readAsArrayBuffer' ], +}, + +'FileReaderSync': { + 'wrapperCache': False, +}, + +'FileSystemEntry': { + 'concrete': True, +}, + +'FileSystemHandle': { + 'concrete': True, +}, + +'FluentBundle': { + 'nativeType': 'mozilla::intl::FluentBundle', +}, + +'FluentBundleAsyncIterator': { + 'headerFile': 'mozilla/intl/L10nRegistry.h', + 'nativeType': 'mozilla::intl::FluentBundleAsyncIterator', +}, + +'FluentBundleIterator': { + 'headerFile': 'mozilla/intl/L10nRegistry.h', + 'nativeType': 'mozilla::intl::FluentBundleIterator', +}, + +'FluentPattern': { + 'headerFile': 'mozilla/intl/FluentBundle.h', + 'nativeType': 'mozilla::intl::FluentPattern', +}, + +'FluentResource': { + 'headerFile': 'mozilla/intl/FluentResource.h', + 'nativeType': 'mozilla::intl::FluentResource', +}, + +'FontFaceSet': { + 'implicitJSContext': [ 'load' ], +}, + +'FontFaceSetIterator': { + 'wrapperCache': False, +}, + +'FrameLoader': { + 'nativeType': 'nsFrameLoader', +}, + +'HeapSnapshot': { + 'nativeType': 'mozilla::devtools::HeapSnapshot' +}, + +'History': { + 'headerFile': 'nsHistory.h', + 'nativeType': 'nsHistory' +}, + +'HTMLBaseElement': { + 'nativeType': 'mozilla::dom::HTMLSharedElement' +}, + +'HTMLCollection': { + 'nativeType': 'nsIHTMLCollection', + # nsContentList.h pulls in nsIHTMLCollection.h + 'headerFile': 'nsContentList.h', + 'concrete': True, +}, + +'HTMLDirectoryElement': { + 'nativeType': 'mozilla::dom::HTMLSharedElement' +}, + +'HTMLDListElement': { + 'nativeType' : 'mozilla::dom::HTMLSharedListElement' +}, + +'HTMLDocument': { + 'nativeType': 'nsHTMLDocument', + 'concrete': True, +}, + +'HTMLElement': { + 'nativeType': 'nsGenericHTMLElement', +}, + +'HTMLHeadElement': { + 'nativeType': 'mozilla::dom::HTMLSharedElement' +}, + +'HTMLHtmlElement': { + 'nativeType': 'mozilla::dom::HTMLSharedElement' +}, + +'HTMLOListElement': { + 'nativeType' : 'mozilla::dom::HTMLSharedListElement' +}, + +'HTMLParamElement': { + 'nativeType': 'mozilla::dom::HTMLSharedElement' +}, + +'HTMLQuoteElement': { + 'nativeType': 'mozilla::dom::HTMLSharedElement' +}, + +'HTMLUListElement': { + 'nativeType' : 'mozilla::dom::HTMLSharedListElement' +}, + +'IDBCursor': { + 'implicitJSContext': [ 'delete' ], + 'concrete': True, +}, + +'IDBCursorWithValue': { + 'nativeType': 'mozilla::dom::IDBCursor', +}, + +'IDBDatabase': { + 'implicitJSContext': [ 'transaction' ], +}, + +'IDBFactory': { + 'implicitJSContext': [ 'open', 'deleteDatabase', 'openForPrincipal', + 'deleteForPrincipal' ], +}, + +'IDBKeyRange': { + 'wrapperCache': False, + 'concrete': True, +}, + +'IDBObjectStore': { + 'implicitJSContext': [ 'clear' ], +}, + +'IDBOpenDBRequest': { + 'headerFile': 'IDBRequest.h' +}, + +'IDBRequest': { + 'concrete': True, +}, + +'IDBVersionChangeEvent': { + 'headerFile': 'IDBEvents.h', +}, + +'ImageData': { + 'wrapperCache': False, +}, + +'InspectorFontFace': { + 'wrapperCache': False, +}, + +'IntersectionObserver': { + 'nativeType': 'mozilla::dom::DOMIntersectionObserver', +}, + +'IntersectionObserverEntry': { + 'nativeType': 'mozilla::dom::DOMIntersectionObserverEntry', + 'headerFile': 'DOMIntersectionObserver.h', +}, + +'KeyEvent' : { + 'concrete': False, +}, + +'L10nFileSource': { + 'headerFile': 'mozilla/intl/FileSource.h', + 'nativeType': 'mozilla::intl::L10nFileSource', +}, + +'L10nRegistry': { + 'nativeType': 'mozilla::intl::L10nRegistry', +}, + +'LegacyMozTCPSocket': { + 'headerFile': 'TCPSocket.h', + 'wrapperCache': False, +}, + +'Localization': { + 'nativeType': 'mozilla::intl::Localization', +}, + +'MatchGlob': { + 'nativeType': 'mozilla::extensions::MatchGlob', +}, + +'MatchPattern': { + 'nativeType': 'mozilla::extensions::MatchPattern', +}, + +'MatchPatternSet': { + 'headerFile': 'mozilla/extensions/MatchPattern.h', + 'nativeType': 'mozilla::extensions::MatchPatternSet', +}, + +'MediaCapabilitiesInfo' : { + 'wrapperCache': False, +}, + +'MediaStream': { + 'headerFile': 'DOMMediaStream.h', + 'nativeType': 'mozilla::DOMMediaStream' +}, + +'MediaRecorder': { + 'headerFile': 'MediaRecorder.h', +}, + +'MimeType': { + 'headerFile' : 'nsMimeTypeArray.h', + 'nativeType': 'nsMimeType', +}, + +'MimeTypeArray': { + 'nativeType': 'nsMimeTypeArray', +}, + +'MozCanvasPrintState': { + 'headerFile': 'mozilla/dom/HTMLCanvasElement.h', + 'nativeType': 'mozilla::dom::HTMLCanvasPrintState', +}, + +'MozChannel': { + 'nativeType': 'nsIChannel', + 'notflattened': True +}, + +'MozDocumentMatcher': { + 'nativeType': 'mozilla::extensions::MozDocumentMatcher', + 'headerFile': 'mozilla/extensions/WebExtensionContentScript.h', +}, + +'MozDocumentObserver': { + 'nativeType': 'mozilla::extensions::DocumentObserver', +}, + +'MozSharedMap': { + 'nativeType': 'mozilla::dom::ipc::SharedMap', + 'concrete': True, +}, + +'MozWritableSharedMap': { + 'headerFile': 'mozilla/dom/ipc/SharedMap.h', + 'nativeType': 'mozilla::dom::ipc::WritableSharedMap', +}, + +'MozSharedMapChangeEvent': { + 'nativeType': 'mozilla::dom::ipc::SharedMapChangeEvent', +}, + +'MozStorageAsyncStatementParams': { + 'headerFile': 'mozilla/storage/mozStorageAsyncStatementParams.h', + 'nativeType': 'mozilla::storage::AsyncStatementParams', +}, + +'MozStorageStatementParams': { + 'headerFile': 'mozilla/storage/mozStorageStatementParams.h', + 'nativeType': 'mozilla::storage::StatementParams', +}, + +'MozStorageStatementRow': { + 'headerFile': 'mozilla/storage/mozStorageStatementRow.h', + 'nativeType': 'mozilla::storage::StatementRow', +}, + +'MozQueryInterface': { + 'wrapperCache': False, +}, + +'MutationObserver': { + 'nativeType': 'nsDOMMutationObserver', +}, + +'MutationRecord': { + 'nativeType': 'nsDOMMutationRecord', + 'headerFile': 'nsDOMMutationObserver.h', +}, + +'NamedNodeMap': { + 'nativeType': 'nsDOMAttributeMap', +}, + +'NetworkInformation': { + 'nativeType': 'mozilla::dom::network::Connection', +}, + +'Node': { + 'nativeType': 'nsINode', + # Some WebIDL APIs that return Node use nsIContent internally (which doesn't + # have a direct correspondence with any WebIDL interface), so we need to use + # nsIContent.h so that the compiler knows nsIContent and nsINode are related + # by inheritance. + 'headerFile': 'nsIContent.h', +}, + +'NodeIterator': { + 'wrapperCache': False, +}, + +'NodeList': { + 'nativeType': 'nsINodeList', + 'concrete': True, +}, + +'OfflineAudioContext': { + 'nativeType': 'mozilla::dom::AudioContext', +}, + +'OffscreenCanvasRenderingContext2D': { + 'implicitJSContext': [ + 'createImageData', 'getImageData', 'isPointInPath', 'isPointInStroke' + ], +}, + +'PaintRequestList': { + 'headerFile': 'mozilla/dom/PaintRequest.h', +}, + +'Path2D': { + 'nativeType': 'mozilla::dom::CanvasPath', + 'headerFile': 'CanvasPath.h' +}, + +'Performance' : { + 'implicitJSContext': [ + 'mark' + ], +}, + +'PerformanceResourceTiming' : { + 'concrete': True, +}, + +'TaskController' : { + 'nativeType' : 'mozilla::dom::WebTaskController', + 'headerFile' : 'mozilla/dom/WebTaskController.h' +}, + +'TransformStreamDefaultController': { + 'implicitJSContext': ['terminate'], +}, + +'Plugin': { + 'headerFile' : 'nsPluginArray.h', + 'nativeType': 'nsPluginElement', +}, + +'PluginArray': { + 'nativeType': 'nsPluginArray', +}, + +'PromiseNativeHandler': { + 'wrapperCache': False, +}, + +'PushEvent': { + 'headerFile': 'ServiceWorkerEvents.h', +}, + +'PushMessageData': { + 'headerFile': 'ServiceWorkerEvents.h', +}, + +'Range': { + 'nativeType': 'nsRange', +}, + +# Bug 1734174: We should validate ReadableStream usage of implicitJSContext. +'ReadableByteStreamController': { + 'implicitJSContext': ['byobRequest', 'close', 'enqueue'], +}, + +'ReadableStream': { + 'implicitJSContext': ['tee'], +}, + +'ReadableStreamBYOBRequest': { + 'implicitJSContext': ['respond', 'respondWithNewView'], +}, + +'ReadableStreamDefaultController': { + 'implicitJSContext': ['close'], +}, + +'Request': { + 'implicitJSContext': [ 'arrayBuffer', 'blob', 'formData', 'json', 'text' ], +}, + +'ResizeObserverEntry': { + 'nativeType': 'mozilla::dom::ResizeObserverEntry', + 'headerFile': 'mozilla/dom/ResizeObserver.h', +}, + +'ResizeObserverSize': { + 'nativeType': 'mozilla::dom::ResizeObserverSize', + 'headerFile': 'mozilla/dom/ResizeObserver.h', +}, + +'Response': { + 'implicitJSContext': [ 'arrayBuffer', 'blob', 'body', 'formData', 'json', 'text', + 'clone', 'cloneUnfiltered' ], +}, + +'Scheduler': { + 'nativeType': 'mozilla::dom::WebTaskScheduler', + 'headerFile': 'mozilla/dom/WebTaskScheduler.h', +}, + +'Screen': { + 'nativeType': 'nsScreen', +}, + +'ServiceWorkerGlobalScope': { + 'headerFile': 'mozilla/dom/WorkerScope.h', +}, + +'ServiceWorkerRegistration': { + 'implicitJSContext': [ 'pushManager' ], +}, + +'ShadowRealmGlobalScope': { + 'hasOrdinaryObjectPrototype': True, +}, + +'SharedWorkerGlobalScope': { + 'headerFile': 'mozilla/dom/WorkerScope.h', +}, + +'StreamFilter': { + 'nativeType': 'mozilla::extensions::StreamFilter', +}, + +'StreamFilterDataEvent': { + 'nativeType': 'mozilla::extensions::StreamFilterDataEvent', + 'headerFile': 'mozilla/extensions/StreamFilterEvents.h', +}, + +'StructuredCloneHolder': { + 'nativeType': 'mozilla::dom::StructuredCloneBlob', + 'wrapperCache': False, +}, + +'StyleSheet': { + 'nativeType': 'mozilla::StyleSheet', + 'headerFile': 'mozilla/StyleSheetInlines.h', +}, + +'SVGAnimatedAngle': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedAngle', + 'headerFile': 'DOMSVGAnimatedAngle.h', +}, + +'SVGAnimatedBoolean': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedBoolean', + 'headerFile': 'DOMSVGAnimatedBoolean.h', +}, + +'SVGAnimatedEnumeration': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedEnumeration', + 'headerFile': 'DOMSVGAnimatedEnumeration.h', +}, + +'SVGAnimatedInteger': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedInteger', + 'headerFile': 'DOMSVGAnimatedInteger.h', +}, + +'SVGAnimatedPreserveAspectRatio': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedPreserveAspectRatio', + 'headerFile': 'SVGAnimatedPreserveAspectRatio.h' +}, + +'SVGAnimatedLength': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedLength', + 'headerFile': 'DOMSVGAnimatedLength.h', +}, + +'SVGAnimatedLengthList': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedLengthList', + 'headerFile': 'DOMSVGAnimatedLengthList.h', +}, + +'SVGAnimatedNumber': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedNumber', + 'headerFile': 'DOMSVGAnimatedNumber.h', +}, + +'SVGAnimatedNumberList': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedNumberList', + 'headerFile': 'DOMSVGAnimatedNumberList.h' +}, + +'SVGAnimatedString': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedString', + 'headerFile': 'DOMSVGAnimatedString.h', +}, + +'SVGAnimatedTransformList': { + 'nativeType': 'mozilla::dom::DOMSVGAnimatedTransformList', + 'headerFile': 'DOMSVGAnimatedTransformList.h' +}, + +'SVGAngle': { + 'nativeType': 'mozilla::dom::DOMSVGAngle', + 'headerFile': 'DOMSVGAngle.h' +}, + +'SVGElement': { + 'concrete': True, +}, + +'SVGFEFuncAElement': { + 'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h', +}, + +'SVGFEFuncBElement': { + 'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h', +}, + +'SVGFEFuncGElement': { + 'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h', +}, + +'SVGFEFuncRElement': { + 'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h', +}, + +'SVGLength': { + 'nativeType': 'mozilla::dom::DOMSVGLength', + 'headerFile': 'DOMSVGLength.h' +}, + +'SVGLengthList': { + 'nativeType': 'mozilla::dom::DOMSVGLengthList', + 'headerFile': 'DOMSVGLengthList.h' +}, + +'SVGLinearGradientElement': { + 'headerFile': 'mozilla/dom/SVGGradientElement.h', +}, + +'SVGNumber': { + 'nativeType': 'mozilla::dom::DOMSVGNumber', + 'headerFile': 'DOMSVGNumber.h', +}, + +'SVGNumberList': { + 'nativeType': 'mozilla::dom::DOMSVGNumberList', + 'headerFile': 'DOMSVGNumberList.h' +}, + +'SVGPathSeg': { + 'nativeType': 'mozilla::dom::DOMSVGPathSeg', + 'headerFile': 'DOMSVGPathSeg.h', +}, + +'SVGPathSegClosePath': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegClosePath', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegMovetoAbs': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegMovetoAbs', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegMovetoRel': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegMovetoRel', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegLinetoAbs': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoAbs', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegLinetoRel': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoRel', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegCurvetoCubicAbs': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoCubicAbs', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegCurvetoCubicRel': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoCubicRel', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegCurvetoQuadraticAbs': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoQuadraticAbs', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegCurvetoQuadraticRel': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoQuadraticRel', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegArcAbs': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegArcAbs', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegArcRel': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegArcRel', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegLinetoHorizontalAbs': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoHorizontalAbs', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegLinetoHorizontalRel': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoHorizontalRel', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegLinetoVerticalAbs': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoVerticalAbs', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegLinetoVerticalRel': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoVerticalRel', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegCurvetoCubicSmoothAbs': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoCubicSmoothAbs', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegCurvetoCubicSmoothRel': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoCubicSmoothRel', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegCurvetoQuadraticSmoothAbs': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoQuadraticSmoothAbs', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegCurvetoQuadraticSmoothRel': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoQuadraticSmoothRel', + 'headerFile': 'DOMSVGPathSeg.h' +}, + +'SVGPathSegList': { + 'nativeType': 'mozilla::dom::DOMSVGPathSegList', + 'headerFile': 'DOMSVGPathSegList.h' +}, + +'SVGPoint': { + 'nativeType': 'mozilla::dom::DOMSVGPoint', + 'headerFile': 'DOMSVGPoint.h' +}, + +'SVGPointList': { + 'nativeType': 'mozilla::dom::DOMSVGPointList', + 'headerFile': 'DOMSVGPointList.h' +}, + +'SVGPreserveAspectRatio': { + 'nativeType': 'mozilla::dom::DOMSVGPreserveAspectRatio', + 'headerFile': 'SVGPreserveAspectRatio.h' +}, + +'SVGRadialGradientElement': { + 'headerFile': 'mozilla/dom/SVGGradientElement.h', +}, + +'SVGStringList': { + 'nativeType': 'mozilla::dom::DOMSVGStringList', + 'headerFile': 'DOMSVGStringList.h', +}, + +'SVGTransform': { + 'nativeType': 'mozilla::dom::DOMSVGTransform', + 'headerFile': 'DOMSVGTransform.h', +}, + +'SVGTransformList': { + 'nativeType': 'mozilla::dom::DOMSVGTransformList', + 'headerFile': 'DOMSVGTransformList.h' +}, + +'SVGUnitTypes' : { + # Maybe should be a namespace. + 'concrete': False, +}, + +'SyncReadFile': { + 'headerFile': 'mozilla/dom/IOUtils.h', +}, + +'TelemetryStopwatch': { + 'nativeType': 'mozilla::telemetry::Stopwatch', +}, + +'Text': { + # Total hack to allow binding code to realize that nsTextNode can + # in fact be cast to Text. + 'headerFile': 'nsTextNode.h', +}, + +'TextDecoder': { + 'wrapperCache': False +}, + +'TextEncoder': { + 'wrapperCache': False +}, + +'TextMetrics': { + 'wrapperCache': False +}, + +'TouchList': { + 'headerFile': 'mozilla/dom/TouchEvent.h', +}, + +'TreeColumn': { + 'nativeType': 'nsTreeColumn', + 'headerFile': 'nsTreeColumns.h', +}, + +'TreeColumns': { + 'nativeType': 'nsTreeColumns', +}, + +'TreeContentView': { + 'nativeType': 'nsTreeContentView', +}, + +'TreeWalker': { + 'wrapperCache': False, +}, + +'UserInteraction': { + 'nativeType': 'mozilla::telemetry::UserInteractionStopwatch', + 'headerFile': 'mozilla/telemetry/Stopwatch.h', +}, + +'VisualViewport': { + 'nativeType': 'mozilla::dom::VisualViewport', +}, + +'VTTCue': { + 'nativeType': 'mozilla::dom::TextTrackCue' +}, + +'VTTRegion': { + 'nativeType': 'mozilla::dom::TextTrackRegion', +}, + +'WakeLock': { + 'nativeType': 'mozilla::dom::WakeLockJS' +}, + +'WebExtensionContentScript': { + 'nativeType': 'mozilla::extensions::WebExtensionContentScript', +}, + +'WebExtensionPolicy': { + 'nativeType': 'mozilla::extensions::WebExtensionPolicy', +}, + +'WindowClient': { + 'nativeType': 'mozilla::dom::Client', +}, + +'WindowGlobalChild': { + 'implicitJSContext': ['getActor'], +}, + +'WindowGlobalParent': { + 'implicitJSContext': ['getActor'], +}, + +'WebGLActiveInfo': { + 'nativeType': 'mozilla::WebGLActiveInfoJS', + 'headerFile': 'ClientWebGLContext.h', + 'wrapperCache': False +}, + +'WebGLBuffer': { + 'nativeType': 'mozilla::WebGLBufferJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'EXT_float_blend': { + 'nativeType': 'mozilla::ClientWebGLExtensionFloatBlend', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_texture_compression_bptc': { + 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureBPTC', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_texture_compression_rgtc': { + 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureRGTC', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_texture_norm16': { + 'nativeType': 'mozilla::ClientWebGLExtensionTextureNorm16', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'OES_fbo_render_mipmap': { + 'nativeType': 'mozilla::ClientWebGLExtensionFBORenderMipmap', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'OVR_multiview2': { + 'nativeType': 'mozilla::ClientWebGLExtensionMultiview', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_compressed_texture_astc': { + 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureASTC', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_compressed_texture_etc': { + 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureES3', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_compressed_texture_etc1': { + 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureETC1', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_compressed_texture_pvrtc': { + 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTexturePVRTC', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_compressed_texture_s3tc': { + 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureS3TC', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_compressed_texture_s3tc_srgb': { + 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureS3TC_SRGB', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_depth_texture': { + 'nativeType': 'mozilla::ClientWebGLExtensionDepthTexture', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_debug_renderer_info': { + 'nativeType': 'mozilla::ClientWebGLExtensionDebugRendererInfo', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_debug_shaders': { + 'nativeType': 'mozilla::ClientWebGLExtensionDebugShaders', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_explicit_present': { + 'nativeType': 'mozilla::ClientWebGLExtensionExplicitPresent', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_provoking_vertex': { + 'nativeType': 'mozilla::ClientWebGLExtensionProvokingVertex', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'OES_draw_buffers_indexed': { + 'nativeType': 'mozilla::ClientWebGLExtensionDrawBuffersIndexed', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'OES_element_index_uint': { + 'nativeType': 'mozilla::ClientWebGLExtensionElementIndexUint', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_frag_depth': { + 'nativeType': 'mozilla::ClientWebGLExtensionFragDepth', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_lose_context': { + 'nativeType': 'mozilla::ClientWebGLExtensionLoseContext', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_sRGB': { + 'nativeType': 'mozilla::ClientWebGLExtensionSRGB', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'OES_standard_derivatives': { + 'nativeType': 'mozilla::ClientWebGLExtensionStandardDerivatives', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_shader_texture_lod': { + 'nativeType': 'mozilla::ClientWebGLExtensionShaderTextureLod', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_texture_filter_anisotropic': { + 'nativeType': 'mozilla::ClientWebGLExtensionTextureFilterAnisotropic', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'OES_texture_float': { + 'nativeType': 'mozilla::ClientWebGLExtensionTextureFloat', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'OES_texture_float_linear': { + 'nativeType': 'mozilla::ClientWebGLExtensionTextureFloatLinear', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'OES_texture_half_float': { + 'nativeType': 'mozilla::ClientWebGLExtensionTextureHalfFloat', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'OES_texture_half_float_linear': { + 'nativeType': 'mozilla::ClientWebGLExtensionTextureHalfFloatLinear', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_color_buffer_float': { + 'nativeType': 'mozilla::ClientWebGLExtensionColorBufferFloat', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_color_buffer_half_float': { + 'nativeType': 'mozilla::ClientWebGLExtensionColorBufferHalfFloat', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_color_buffer_float': { + 'nativeType': 'mozilla::ClientWebGLExtensionEXTColorBufferFloat', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WEBGL_draw_buffers': { + 'nativeType': 'mozilla::ClientWebGLExtensionDrawBuffers', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'OES_vertex_array_object': { + 'nativeType': 'mozilla::ClientWebGLExtensionVertexArray', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'ANGLE_instanced_arrays': { + 'nativeType': 'mozilla::ClientWebGLExtensionInstancedArrays', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_blend_minmax': { + 'nativeType': 'mozilla::ClientWebGLExtensionBlendMinMax', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'EXT_disjoint_timer_query': { + 'nativeType': 'mozilla::ClientWebGLExtensionDisjointTimerQuery', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'MOZ_debug': { + 'nativeType': 'mozilla::ClientWebGLExtensionMOZDebug', + 'headerFile': 'ClientWebGLExtensions.h' +}, + +'WebGLFramebuffer': { + 'nativeType': 'mozilla::WebGLFramebufferJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'WebGLProgram': { + 'nativeType': 'mozilla::WebGLProgramJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'WebGLQuery': { + 'nativeType': 'mozilla::WebGLQueryJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'WebGLRenderbuffer': { + 'nativeType': 'mozilla::WebGLRenderbufferJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'WebGLRenderingContext': { + 'nativeType': 'mozilla::ClientWebGLContext', + 'headerFile': 'ClientWebGLContext.h', +}, + +'WebGL2RenderingContext': { + 'nativeType': 'mozilla::ClientWebGLContext', + 'headerFile': 'ClientWebGLContext.h', +}, + +'WebGLSampler': { + 'nativeType': 'mozilla::WebGLSamplerJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'WebGLShader': { + 'nativeType': 'mozilla::WebGLShaderJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'WebGLShaderPrecisionFormat': { + 'nativeType': 'mozilla::WebGLShaderPrecisionFormatJS', + 'headerFile': 'ClientWebGLContext.h', + 'wrapperCache': False +}, + +'WebGLSync': { + 'nativeType': 'mozilla::WebGLSyncJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'WebGLTexture': { + 'nativeType': 'mozilla::WebGLTextureJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'WebGLTransformFeedback': { + 'nativeType': 'mozilla::WebGLTransformFeedbackJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'WebGLUniformLocation': { + 'nativeType': 'mozilla::WebGLUniformLocationJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +'WebGLVertexArrayObject': { + 'nativeType': 'mozilla::WebGLVertexArrayJS', + 'headerFile': 'ClientWebGLContext.h' +}, + +# WebGPU + +'GPU': { + 'nativeType': 'mozilla::webgpu::Instance', +}, +'GPUAdapter': { + 'nativeType': 'mozilla::webgpu::Adapter', +}, +'GPUAdapterInfo': { + 'nativeType': 'mozilla::webgpu::AdapterInfo', + 'headerFile': 'mozilla/webgpu/Adapter.h', + 'wrapperCache': False +}, +'GPUBindGroup': { + 'nativeType': 'mozilla::webgpu::BindGroup', +}, +'GPUBindGroupLayout': { + 'nativeType': 'mozilla::webgpu::BindGroupLayout', +}, +'GPUBuffer': { + 'nativeType': 'mozilla::webgpu::Buffer', + 'implicitJSContext': [ 'unmap', 'destroy' ], +}, +'GPUCanvasContext': { + 'nativeType': 'mozilla::webgpu::CanvasContext', +}, +'GPUCommandBuffer': { + 'nativeType': 'mozilla::webgpu::CommandBuffer', +}, +'GPUCommandEncoder': { + 'nativeType': 'mozilla::webgpu::CommandEncoder', +}, +'GPUCompilationInfo': { + 'nativeType': 'mozilla::webgpu::CompilationInfo', +}, +'GPUCompilationMessage': { + 'nativeType': 'mozilla::webgpu::CompilationMessage', +}, +'GPUComputePassEncoder': { + 'nativeType': 'mozilla::webgpu::ComputePassEncoder', +}, +'GPUComputePipeline': { + 'nativeType': 'mozilla::webgpu::ComputePipeline', +}, +'GPUDevice': { + 'nativeType': 'mozilla::webgpu::Device', +}, +'GPUDeviceLostInfo': { + 'nativeType': 'mozilla::webgpu::DeviceLostInfo', +}, +'GPUError': { + 'nativeType': 'mozilla::webgpu::Error', +}, +'GPUInternalError': { + 'nativeType': 'mozilla::webgpu::InternalError', +}, +'GPUOutOfMemoryError': { + 'nativeType': 'mozilla::webgpu::OutOfMemoryError', +}, +'GPUPipelineLayout': { + 'nativeType': 'mozilla::webgpu::PipelineLayout', +}, +'GPUQuerySet': { + 'nativeType': 'mozilla::webgpu::QuerySet', +}, +'GPUQueue': { + 'nativeType': 'mozilla::webgpu::Queue', +}, +'GPURenderBundle': { + 'nativeType': 'mozilla::webgpu::RenderBundle', +}, +'GPURenderBundleEncoder': { + 'nativeType': 'mozilla::webgpu::RenderBundleEncoder', +}, +'GPURenderPassEncoder': { + 'nativeType': 'mozilla::webgpu::RenderPassEncoder', +}, +'GPURenderPipeline': { + 'nativeType': 'mozilla::webgpu::RenderPipeline', +}, +'GPUSampler': { + 'nativeType': 'mozilla::webgpu::Sampler', +}, +'GPUShaderModule': { + 'nativeType': 'mozilla::webgpu::ShaderModule', +}, +'GPUSupportedFeatures': { + 'nativeType': 'mozilla::webgpu::SupportedFeatures', +}, +'GPUSupportedLimits': { + 'nativeType': 'mozilla::webgpu::SupportedLimits', +}, +'GPUTexture': { + 'nativeType': 'mozilla::webgpu::Texture', +}, +'GPUTextureView': { + 'nativeType': 'mozilla::webgpu::TextureView', +}, +'GPUValidationError': { + 'nativeType': 'mozilla::webgpu::ValidationError', +}, + +'GPUBufferUsage': { + 'concrete': False, +}, +'GPUColorWrite': { + 'concrete': False, +}, +'GPUMapMode': { + 'concrete': False, +}, +'GPUShaderStage': { + 'concrete': False, +}, +'GPUTextureUsage': { + 'concrete': False, +}, + +# Glean + +'GleanImpl': { + 'nativeType': 'mozilla::glean::Glean', + 'headerFile': 'mozilla/glean/bindings/Glean.h', +}, +'GleanCategory': { + 'nativeType': 'mozilla::glean::Category', + 'headerFile': 'mozilla/glean/bindings/Category.h', +}, +'GleanPingsImpl': { + 'nativeType': 'mozilla::glean::GleanPings', + 'headerFile': 'mozilla/glean/bindings/GleanPings.h', +}, +'GleanLabeled': { + 'nativeType': 'mozilla::glean::GleanLabeled', + 'headerFile': 'mozilla/glean/bindings/Labeled.h', +}, +'GleanMetric': { + 'nativeType': 'mozilla::glean::GleanMetric', + 'headerFile': 'mozilla/glean/bindings/GleanMetric.h', +}, +'GleanBoolean': { + 'nativeType': 'mozilla::glean::GleanBoolean', + 'headerFile': 'mozilla/glean/bindings/Boolean.h', +}, +'GleanCounter': { + 'nativeType': 'mozilla::glean::GleanCounter', + 'headerFile': 'mozilla/glean/bindings/Counter.h', +}, +'GleanCustomDistribution': { + 'nativeType': 'mozilla::glean::GleanCustomDistribution', + 'headerFile': 'mozilla/glean/bindings/CustomDistribution.h', +}, +'GleanDatetime': { + 'nativeType': 'mozilla::glean::GleanDatetime', + 'headerFile': 'mozilla/glean/bindings/Datetime.h', +}, +'GleanString': { + 'nativeType': 'mozilla::glean::GleanString', + 'headerFile': 'mozilla/glean/bindings/String.h', +}, +'GleanStringList': { + 'nativeType': 'mozilla::glean::GleanStringList', + 'headerFile': 'mozilla/glean/bindings/StringList.h', +}, +'GleanTimespan': { + 'nativeType': 'mozilla::glean::GleanTimespan', + 'headerFile': 'mozilla/glean/bindings/Timespan.h', +}, +'GleanUuid': { + 'nativeType': 'mozilla::glean::GleanUuid', + 'headerFile': 'mozilla/glean/bindings/Uuid.h', +}, +'GleanEvent': { + 'nativeType': 'mozilla::glean::GleanEvent', + 'headerFile': 'mozilla/glean/bindings/Event.h', +}, +'GleanQuantity': { + 'nativeType': 'mozilla::glean::GleanQuantity', + 'headerFile': 'mozilla/glean/bindings/Quantity.h', +}, +'GleanUrl': { + 'nativeType': 'mozilla::glean::GleanUrl', + 'headerFile': 'mozilla/glean/bindings/Url.h', +}, +'GleanTimingDistribution': { + 'nativeType': 'mozilla::glean::GleanTimingDistribution', + 'headerFile': 'mozilla/glean/bindings/TimingDistribution.h', +}, +'GleanMemoryDistribution': { + 'nativeType': 'mozilla::glean::GleanMemoryDistribution', + 'headerFile': 'mozilla/glean/bindings/MemoryDistribution.h', +}, +'GleanNumerator': { + 'nativeType': 'mozilla::glean::GleanNumerator', + 'headerFile': 'mozilla/glean/bindings/Numerator.h', +}, +'GleanDenominator': { + 'nativeType': 'mozilla::glean::GleanDenominator', + 'headerFile': 'mozilla/glean/bindings/Denominator.h', +}, +'GleanRate': { + 'nativeType': 'mozilla::glean::GleanRate', + 'headerFile': 'mozilla/glean/bindings/Rate.h', +}, +'GleanText': { + 'nativeType': 'mozilla::glean::GleanText', + 'headerFile': 'mozilla/glean/bindings/Text.h', +}, + +'Window': { + 'nativeType': 'nsGlobalWindowInner', + 'headerFile': 'nsGlobalWindowInner.h', + 'implicitJSContext': [ + 'requestIdleCallback', 'indexedDB' + ], +}, + +'WindowContext': { + 'concrete': True +}, + +'WindowProxy': { + 'nativeType': 'mozilla::dom::WindowProxyHolder', + 'headerFile': 'mozilla/dom/WindowProxyHolder.h', + 'concrete': False +}, + +'WindowRoot': { + 'nativeType': 'nsWindowRoot' +}, + +'WorkerDebuggerGlobalScope': { + 'headerFile': 'mozilla/dom/WorkerScope.h', + 'implicitJSContext': [ + 'dump', 'clearConsoleEvents', 'reportError', 'setConsoleEventHandler', + ], +}, + +'WorkerGlobalScope': { + 'headerFile': 'mozilla/dom/WorkerScope.h', + 'implicitJSContext': [ 'importScripts', 'indexedDB' ], +}, + +'Worklet': { + # Paint worklets just use the Worklet interface. + 'concrete': True, + 'implicitJSContext': [ 'addModule' ], +}, + +# Bug 1734174: We should validate ReadableStream usage of implicitJSContext. +'WritableStream': { + 'implicitJSContext': ['close'], +}, + +'WritableStreamDefaultWriter': { + 'implicitJSContext': ['close', 'releaseLock'], +}, + +'XMLSerializer': { + 'nativeType': 'nsDOMSerializer', + 'wrapperCache': False +}, + +'XPathEvaluator': { + 'wrapperCache': False, +}, + +'XPathExpression': { + 'wrapperCache': False, +}, + +'XRPose': { + 'concrete': True, +}, + +'XRReferenceSpace': { + 'concrete': True, +}, + +'XRSpace': { + 'concrete': True, +}, + +'XSLTProcessor': { + 'nativeType': 'txMozillaXSLTProcessor', +}, + +'XULElement': { + 'nativeType': 'nsXULElement', +}, + +# WebExtension API + +'ExtensionBrowser': { + 'headerFile': 'mozilla/extensions/ExtensionBrowser.h', + 'nativeType': 'mozilla::extensions::ExtensionBrowser', +}, + +'ExtensionMockAPI': { + 'headerFile': 'mozilla/extensions/ExtensionMockAPI.h', + 'nativeType': 'mozilla::extensions::ExtensionMockAPI', +}, + +'ExtensionBrowserSettings': { + 'headerFile': 'mozilla/extensions/ExtensionBrowserSettings.h', + 'nativeType': 'mozilla::extensions::ExtensionBrowserSettings', +}, + +'ExtensionBrowserSettingsColorManagement': { + 'headerFile': 'mozilla/extensions/ExtensionBrowserSettingsColorManagement.h', + 'nativeType': 'mozilla::extensions::ExtensionBrowserSettingsColorManagement', +}, + +'ExtensionDns': { + 'headerFile': 'mozilla/extensions/ExtensionDns.h', + 'nativeType': 'mozilla::extensions::ExtensionDns', +}, + +'ExtensionEventManager': { + 'headerFile': 'mozilla/extensions/ExtensionEventManager.h', + 'nativeType': 'mozilla::extensions::ExtensionEventManager', +}, + +'ExtensionPort': { + 'headerFile': 'mozilla/extensions/ExtensionPort.h', + 'nativeType': 'mozilla::extensions::ExtensionPort', +}, + +'ExtensionProxy': { + 'headerFile': 'mozilla/extensions/ExtensionProxy.h', + 'nativeType': 'mozilla::extensions::ExtensionProxy', +}, + +'ExtensionRuntime': { + 'headerFile': 'mozilla/extensions/ExtensionRuntime.h', + 'nativeType': 'mozilla::extensions::ExtensionRuntime', +}, + +'ExtensionScripting': { + 'headerFile': 'mozilla/extensions/ExtensionScripting.h', + 'nativeType': 'mozilla::extensions::ExtensionScripting', +}, + +'ExtensionSetting': { + 'headerFile': 'mozilla/extensions/ExtensionSetting.h', + 'nativeType': 'mozilla::extensions::ExtensionSetting', +}, + +'ExtensionTest': { + 'headerFile': 'mozilla/extensions/ExtensionTest.h', + 'nativeType': 'mozilla::extensions::ExtensionTest', +}, + +'ExtensionAlarms': { + 'headerFile': 'mozilla/extensions/ExtensionAlarms.h', + 'nativeType': 'mozilla::extensions::ExtensionAlarms', +}, + +} + +if buildconfig.substs.get("MOZ_WEBRTC", False): + DOMInterfaces.update({ + + 'PeerConnectionImpl': { + 'nativeType': 'mozilla::PeerConnectionImpl', + 'headerFile': 'PeerConnectionImpl.h', + }, + + 'RTCDataChannel': { + 'nativeType': 'nsDOMDataChannel', + }, + + 'WebrtcGlobalInformation': { + 'headerFile': 'WebrtcGlobalInformation.h', + }, + + }) + +#################################### +# Test Interfaces of various sorts # +#################################### + +if buildconfig.substs.get("ENABLE_TESTS", False): + DOMInterfaces.update({ + + 'OnlyForUseInConstructor' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestAttributesOnTypes' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestCEReactionsInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestChildInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestCImplementedInterface' : { + 'headerFile': 'TestCImplementedInterface.h', + 'register': False, + }, + + 'TestCImplementedInterface2' : { + 'headerFile': 'TestCImplementedInterface.h', + 'register': False, + }, + + 'TestConstructorForFuncInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestConstructorForPrefInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestConstructorForSCInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestCppKeywordNamedMethodsInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestDeprecatedInterface' : { + # Keep this in sync with TestExampleInterface + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestExampleInterface' : { + # Keep this in sync with TestInterface + 'headerFile': 'TestExampleInterface-example.h', + 'register': False, + }, + + 'TestExampleProxyInterface' : { + 'headerFile': 'TestExampleProxyInterface-example.h', + 'register': False, + }, + + 'TestExampleThrowingConstructorInterface' : { + 'headerFile': 'TestExampleThrowingConstructorInterface-example.h', + 'register': False, + }, + + 'TestExampleWorkerInterface' : { + 'headerFile': 'TestExampleWorkerInterface-example.h', + 'register': False, + }, + + 'TestExternalInterface' : { + 'nativeType': 'mozilla::dom::TestExternalInterface', + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestFuncConstructorForDifferentFuncInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestFuncConstructorForInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestHTMLConstructorInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestIndexedAndNamedGetterInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestIndexedAndNamedGetterAndSetterInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestIndexedAndNamedSetterInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestIndexedGetterAndSetterAndNamedGetterInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestIndexedGetterInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestIndexedSetterInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestInterface' : { + # Keep this in sync with TestExampleInterface + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestInterfaceWithPromiseConstructorArg' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestJSImplInterface' : { + # Keep this in sync with TestExampleInterface + 'headerFile': 'TestJSImplGenBinding.h', + 'register': False, + }, + + 'TestJSImplInterface2' : { + 'headerFile': 'TestJSImplGenBinding.h', + 'register': False, + }, + + 'TestJSImplInterface3' : { + 'headerFile': 'TestJSImplGenBinding.h', + 'register': False, + }, + + 'TestJSImplInterface4' : { + 'headerFile': 'TestJSImplGenBinding.h', + 'register': False, + }, + + 'TestJSImplInterface5' : { + 'headerFile': 'TestJSImplGenBinding.h', + 'register': False, + }, + + 'TestJSImplInterface6' : { + 'headerFile': 'TestJSImplGenBinding.h', + 'register': False, + }, + + 'TestNamedDeleterInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestNamedDeleterWithRetvalInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestNamedGetterInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestNamedSetterInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestNamespace' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestNonWrapperCacheInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + 'wrapperCache': False, + }, + + 'TestParentInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestPrefChromeOnlySCFuncConstructorForInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestPrefConstructorForDifferentPrefInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestPrefConstructorForInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestProtoObjectHackedNamespace' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestRenamedInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + 'nativeType': 'nsRenamedInterface' + }, + + 'TestRenamedNamespace' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestSCConstructorForInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestSecureContextInterface' : { + # Keep this in sync with TestExampleInterface + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestThrowingConstructorInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + 'TestWorkerExposedInterface' : { + 'headerFile': 'TestBindingHeader.h', + 'register': False, + }, + + }) + + if buildconfig.substs.get("MOZ_DEBUG", False): + DOMInterfaces.update({ + + 'TestFunctions': { + 'wrapperCache': False, + }, + + }) + + +# These probably won't be converted to use new DOM bindings +def addExternalIface(iface, nativeType=None, headerFile=None, + notflattened=False): + if iface in DOMInterfaces: + raise Exception('Interface declared both as WebIDL and External interface') + domInterface = { + 'concrete': False + } + if not nativeType is None: + domInterface['nativeType'] = nativeType + if not headerFile is None: + domInterface['headerFile'] = headerFile + domInterface['notflattened'] = notflattened + DOMInterfaces[iface] = domInterface + +addExternalIface('Cookie', nativeType='nsICookie', + headerFile='nsICookie.h', notflattened=True) +addExternalIface('ContentSecurityPolicy', nativeType='nsIContentSecurityPolicy', + notflattened=True) +addExternalIface('imgINotificationObserver', nativeType='imgINotificationObserver') +addExternalIface('imgIRequest', nativeType='imgIRequest', notflattened=True) +addExternalIface('LoadContext', nativeType='nsILoadContext', notflattened=True) +addExternalIface('LoadInfo', nativeType='nsILoadInfo', + headerFile='nsILoadInfo.h', notflattened=True) +addExternalIface('XULControllers', nativeType='nsIControllers', notflattened=True) +addExternalIface('MozObserver', nativeType='nsIObserver', notflattened=True) +addExternalIface('MozTreeView', nativeType='nsITreeView', + headerFile='nsITreeView.h', notflattened=True) +addExternalIface('nsIBrowserDOMWindow', nativeType='nsIBrowserDOMWindow', + notflattened=True) +addExternalIface('nsIDOMWindowUtils', nativeType='nsIDOMWindowUtils', notflattened=True) +addExternalIface('nsIEventTarget', nativeType='nsIEventTarget', notflattened=True) +addExternalIface('nsIFile', nativeType='nsIFile', notflattened=True) +addExternalIface('nsILoadGroup', nativeType='nsILoadGroup', + headerFile='nsILoadGroup.h', notflattened=True) +addExternalIface('nsIMediaDevice', nativeType='nsIMediaDevice', + notflattened=True) +addExternalIface('nsIPrintSettings', nativeType='nsIPrintSettings', + notflattened=True) +addExternalIface('nsISelectionListener', nativeType='nsISelectionListener') +addExternalIface('nsIStreamListener', nativeType='nsIStreamListener', notflattened=True) +addExternalIface('nsISocketTransport', nativeType='nsISocketTransport', + notflattened=True) +addExternalIface('nsITransportProvider', nativeType='nsITransportProvider') +addExternalIface('nsITreeSelection', nativeType='nsITreeSelection', + notflattened=True) +addExternalIface('nsISupports', nativeType='nsISupports') +addExternalIface('nsIDocShell', nativeType='nsIDocShell', notflattened=True) +addExternalIface('nsIDOMProcessChild', nativeType='nsIDOMProcessChild', notflattened=True) +addExternalIface('nsIDOMProcessParent', nativeType='nsIDOMProcessParent', notflattened=True) +addExternalIface('nsIReferrerInfo', nativeType='nsIReferrerInfo', notflattened=True) +addExternalIface('nsISecureBrowserUI', nativeType='nsISecureBrowserUI', notflattened=True) +addExternalIface('nsIWebProgress', nativeType='nsIWebProgress', notflattened=True) +addExternalIface('nsIWebNavigation', nativeType='nsIWebNavigation', notflattened=True) +addExternalIface('nsIEditor', nativeType='nsIEditor', notflattened=True) +addExternalIface('nsIWebBrowserPersistDocumentReceiver', + nativeType='nsIWebBrowserPersistDocumentReceiver', + headerFile='nsIWebBrowserPersistDocument.h', + notflattened=True) +addExternalIface('nsIWebProgressListener', nativeType='nsIWebProgressListener', + notflattened=True) +addExternalIface('OutputStream', nativeType='nsIOutputStream', + notflattened=True) +addExternalIface('Principal', nativeType='nsIPrincipal', + headerFile='nsIPrincipal.h', notflattened=True) +addExternalIface('StackFrame', nativeType='nsIStackFrame', + headerFile='nsIException.h', notflattened=True) +addExternalIface('RemoteTab', nativeType='nsIRemoteTab', + notflattened=True) +addExternalIface('URI', nativeType='nsIURI', headerFile='nsIURI.h', + notflattened=True) +addExternalIface('XULCommandDispatcher', notflattened=True) +addExternalIface('nsISHistory', nativeType='nsISHistory', notflattened=True) +addExternalIface('nsISHEntry', nativeType='nsISHEntry', notflattened=True) +addExternalIface('ReferrerInfo', nativeType='nsIReferrerInfo') +addExternalIface('nsIPermissionDelegateHandler', + nativeType='nsIPermissionDelegateHandler', + notflattened=True) +addExternalIface('nsIOpenWindowInfo', nativeType='nsIOpenWindowInfo', + notflattened=True) +addExternalIface('nsICookieJarSettings', nativeType='nsICookieJarSettings', + notflattened=True) +addExternalIface('nsIGleanPing', headerFile='mozilla/glean/bindings/Ping.h', + nativeType='nsIGleanPing', notflattened=True) +addExternalIface('nsISessionStoreRestoreData', + nativeType='nsISessionStoreRestoreData', + headerFile='nsISessionStoreRestoreData.h', notflattened=True) +addExternalIface('nsIScreen', nativeType='nsIScreen', + headerFile='nsIScreen.h', notflattened=True) +addExternalIface('InputStream', + nativeType='nsIInputStream', notflattened=True) + +# The TemplatedAttributes dictionary has the interface name where the template +# should be generated as the key. The values are lists of dictionaries, where +# each dictionary corresponds to one template. The dictionary contains: +# +# template the template's name +# getter the name for the native getter to call +# setter the name for the native setter to call +# argument a tuple for the additional argument that should be passed to the +# native getter and setter, containing the type for the argument +# and a name for the argument. The value will be supplied by the +# [BindingTemplate] extended attribute. +# attrName a string which in the generated C++ code would yield a +# |const char*| that contains the attribute's name + +TemplatedAttributes = { + +'CSS2Properties': [ + { + 'template': 'CSS2Property', + 'getter': 'GetPropertyValue', + 'setter': 'SetPropertyValue', + 'argument': ('nsCSSPropertyID', 'id'), + 'attrName': 'nsCSSProps::PropertyIDLName(id)', + }, +], + +} |