1 # -*- Mode:Python; tab-width:8; indent-tabs-mode:nil -*- */
2 # vim: set ts=8 sts=4 et sw=4 tw=80: */
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 # DOM Bindings Configuration.
9 # The WebIDL interfaces are defined in dom/webidl. For interfaces requiring
10 # special handling, there are corresponding entries in the configuration table
11 # below. The configuration table maps each interface name to a |descriptor|.
13 # Valid fields for all descriptors:
14 # * nativeType - The native type (concrete class or XPCOM interface) that
15 # instances of this interface will unwrap to. If not
16 # specified, defaults to 'nsIDOM' followed by the interface
17 # name for external interfaces and
18 # 'mozilla::dom::InterfaceName' for everything else.
19 # * headerFile - The file in which the nativeType is declared (defaults
20 # to an educated guess).
21 # * concrete - Indicates whether there exist JS objects with this interface as
22 # their primary interface (and hence whose prototype is this
23 # interface's prototype object). Always False for callback
24 # interfaces. Defaults to True for leaf interfaces and
25 # interfaces with constructors, false otherwise.
26 # * notflattened - The native type does not have nsIClassInfo, so when
27 # wrapping it the right IID needs to be passed in.
28 # Only relevant for callback interfaces.
29 # * register - True if this binding should be registered. Defaults to true.
30 # * wrapperCache: True if this object is a wrapper cache. Objects that are
31 # not can only be returned from a limited set of methods,
32 # cannot be prefable, and must ensure that they disallow
33 # XPConnect wrapping. Always false for callback interfaces.
34 # Defaults to true for non-callback descriptors.
35 # * implicitJSContext - Llist of names of attributes and methods specified in
36 # the .webidl file that require a JSContext as the first
39 # The value for an interface is a dictionary which specifies the
40 # descriptor to use when generating that interface's binding.
47 'implicitJSContext': [ 'throwIfAborted' ],
56 'implicitJSContext': [ 'copyToChannel' ],
59 'AudioBufferSourceNode': {
60 'implicitJSContext': [ 'buffer' ],
64 'nativeType': 'mozilla::dom::Worklet',
67 'AudioWorkletGlobalScope': {
68 'implicitJSContext': [ 'registerProcessor' ],
72 'headerFile': 'mozilla/dom/BarProps.h',
76 'nativeType': 'mozilla::dom::AudioContext',
80 'nativeType': 'mozilla::dom::battery::BatteryManager',
81 'headerFile': 'BatteryManager.h'
85 'implicitJSContext': [ 'stream' ],
93 'implicitJSContext': [ 'add', 'addAll', 'match', 'matchAll', 'put',
95 'nativeType': 'mozilla::dom::cache::Cache',
99 'implicitJSContext': [ 'match' ],
100 'nativeType': 'mozilla::dom::cache::CacheStorage',
103 'CanvasRenderingContext2D': {
104 'implicitJSContext': [
105 'createImageData', 'getImageData', 'isPointInPath', 'isPointInStroke'
110 'nativeType': 'nsDOMCaretPosition',
114 'nativeType': 'mozilla::extensions::ChannelWrapper',
121 'ClonedErrorHolder': {
122 'wrapperCache': False
126 'nativeType': 'mozilla::dom::Console',
130 'implicitJSContext': ['clear', 'count', 'countReset', 'groupEnd', 'time', 'timeEnd'],
134 'implicitJSContext': [ 'buffer' ],
142 'headerFile': 'Crypto.h'
146 'nativeType': 'nsDOMCSSDeclaration'
149 'CSSConditionRule': {
150 'nativeType': 'mozilla::css::ConditionRule',
151 'headerFile': 'mozilla/css/GroupRule.h',
155 'nativeType': 'mozilla::css::GroupRule',
159 'nativeType': 'mozilla::css::Rule'
162 'CSSStyleDeclaration': {
163 'nativeType': 'nsICSSDeclaration',
164 # Concrete because of the font-face mess.
169 'nativeType': 'mozilla::StyleSheet',
172 'CustomElementRegistry': {
173 'implicitJSContext': ['define', 'getName'],
176 'DebuggerNotification': {
179 'CallbackDebuggerNotification': {
183 'DedicatedWorkerGlobalScope': {
184 'headerFile': 'mozilla/dom/WorkerScope.h',
187 'DeviceAcceleration': {
188 'headerFile': 'mozilla/dom/DeviceMotionEvent.h',
191 'DeviceRotationRate': {
192 'headerFile': 'mozilla/dom/DeviceMotionEvent.h',
196 'nativeType': 'mozilla::devtools::DominatorTree'
200 'implicitJSContext': [ 'filename', 'lineNumber', 'stack' ],
203 'DOMMatrixReadOnly': {
204 'headerFile': 'mozilla/dom/DOMMatrix.h',
207 'DOMPointReadOnly': {
208 'headerFile': 'mozilla/dom/DOMPoint.h',
212 'headerFile': 'mozilla/dom/DOMRect.h',
216 'headerFile': 'mozilla/dom/DOMRect.h',
220 'nativeType': 'nsDOMStringMap'
224 'nativeType': 'nsDOMTokenList',
232 'implicitJSContext': [ 'preventDefault' ],
236 'jsImplParent': 'mozilla::DOMEventTargetHelper',
240 'headerFile': 'mozilla/dom/DOMException.h',
241 'implicitJSContext': [ '__stringifier', 'filename', 'lineNumber', 'stack' ],
245 'headerFile': 'mozilla/dom/ServiceWorkerEvents.h',
246 'implicitJSContext': [ 'waitUntil' ],
249 'ExtendableMessageEvent': {
250 'headerFile': 'mozilla/dom/ServiceWorkerEvents.h',
254 'headerFile': 'ServiceWorkerEvents.h',
255 'implicitJSContext': [ 'respondWith' ],
259 'implicitJSContext': [ 'readAsArrayBuffer' ],
263 'wrapperCache': False,
270 'FileSystemHandle': {
275 'nativeType': 'mozilla::intl::FluentBundle',
278 'FluentBundleAsyncIterator': {
279 'headerFile': 'mozilla/intl/L10nRegistry.h',
280 'nativeType': 'mozilla::intl::FluentBundleAsyncIterator',
283 'FluentBundleIterator': {
284 'headerFile': 'mozilla/intl/L10nRegistry.h',
285 'nativeType': 'mozilla::intl::FluentBundleIterator',
289 'headerFile': 'mozilla/intl/FluentBundle.h',
290 'nativeType': 'mozilla::intl::FluentPattern',
294 'headerFile': 'mozilla/intl/FluentResource.h',
295 'nativeType': 'mozilla::intl::FluentResource',
299 'implicitJSContext': [ 'load' ],
302 'FontFaceSetIterator': {
303 'wrapperCache': False,
307 'nativeType': 'nsFrameLoader',
311 'nativeType': 'mozilla::devtools::HeapSnapshot'
315 'headerFile': 'nsHistory.h',
316 'nativeType': 'nsHistory'
320 'nativeType': 'mozilla::dom::HTMLSharedElement'
324 'nativeType': 'nsIHTMLCollection',
325 # nsContentList.h pulls in nsIHTMLCollection.h
326 'headerFile': 'nsContentList.h',
330 'HTMLDirectoryElement': {
331 'nativeType': 'mozilla::dom::HTMLSharedElement'
334 'HTMLDListElement': {
335 'nativeType' : 'mozilla::dom::HTMLSharedListElement'
339 'nativeType': 'nsHTMLDocument',
344 'nativeType': 'nsGenericHTMLElement',
348 'nativeType': 'mozilla::dom::HTMLSharedElement'
352 'nativeType': 'mozilla::dom::HTMLSharedElement'
355 'HTMLOListElement': {
356 'nativeType' : 'mozilla::dom::HTMLSharedListElement'
359 'HTMLParamElement': {
360 'nativeType': 'mozilla::dom::HTMLSharedElement'
363 'HTMLQuoteElement': {
364 'nativeType': 'mozilla::dom::HTMLSharedElement'
367 'HTMLUListElement': {
368 'nativeType' : 'mozilla::dom::HTMLSharedListElement'
372 'implicitJSContext': [ 'delete' ],
376 'IDBCursorWithValue': {
377 'nativeType': 'mozilla::dom::IDBCursor',
381 'implicitJSContext': [ 'transaction' ],
385 'implicitJSContext': [ 'open', 'deleteDatabase', 'databases',
386 'openForPrincipal', 'deleteForPrincipal' ],
390 'wrapperCache': False,
395 'implicitJSContext': [ 'clear' ],
398 'IDBOpenDBRequest': {
399 'headerFile': 'IDBRequest.h'
406 'IDBVersionChangeEvent': {
407 'headerFile': 'IDBEvents.h',
411 'wrapperCache': False,
414 'InspectorFontFace': {
415 'wrapperCache': False,
418 'InspectorCSSParser': {
419 'wrapperCache': False,
422 'IntersectionObserver': {
423 'nativeType': 'mozilla::dom::DOMIntersectionObserver',
426 'IntersectionObserverEntry': {
427 'nativeType': 'mozilla::dom::DOMIntersectionObserverEntry',
428 'headerFile': 'DOMIntersectionObserver.h',
436 'headerFile': 'mozilla/intl/FileSource.h',
437 'nativeType': 'mozilla::intl::L10nFileSource',
441 'nativeType': 'mozilla::intl::L10nRegistry',
444 'LegacyMozTCPSocket': {
445 'headerFile': 'TCPSocket.h',
446 'wrapperCache': False,
450 'nativeType': 'mozilla::intl::Localization',
454 'nativeType': 'mozilla::extensions::MatchGlob',
458 'nativeType': 'mozilla::extensions::MatchPattern',
462 'headerFile': 'mozilla/extensions/MatchPattern.h',
463 'nativeType': 'mozilla::extensions::MatchPatternSet',
466 'MediaCapabilitiesInfo' : {
467 'wrapperCache': False,
471 'headerFile': 'DOMMediaStream.h',
472 'nativeType': 'mozilla::DOMMediaStream'
476 'headerFile': 'MediaRecorder.h',
480 'headerFile' : 'nsMimeTypeArray.h',
481 'nativeType': 'nsMimeType',
485 'nativeType': 'nsMimeTypeArray',
488 'MozCanvasPrintState': {
489 'headerFile': 'mozilla/dom/HTMLCanvasElement.h',
490 'nativeType': 'mozilla::dom::HTMLCanvasPrintState',
494 'nativeType': 'nsIChannel',
498 'MozDocumentMatcher': {
499 'nativeType': 'mozilla::extensions::MozDocumentMatcher',
500 'headerFile': 'mozilla/extensions/WebExtensionContentScript.h',
503 'MozDocumentObserver': {
504 'nativeType': 'mozilla::extensions::DocumentObserver',
508 'nativeType': 'mozilla::dom::ipc::SharedMap',
512 'MozWritableSharedMap': {
513 'headerFile': 'mozilla/dom/ipc/SharedMap.h',
514 'nativeType': 'mozilla::dom::ipc::WritableSharedMap',
517 'MozSharedMapChangeEvent': {
518 'nativeType': 'mozilla::dom::ipc::SharedMapChangeEvent',
521 'MozStorageAsyncStatementParams': {
522 'headerFile': 'mozilla/storage/mozStorageAsyncStatementParams.h',
523 'nativeType': 'mozilla::storage::AsyncStatementParams',
526 'MozStorageStatementParams': {
527 'headerFile': 'mozilla/storage/mozStorageStatementParams.h',
528 'nativeType': 'mozilla::storage::StatementParams',
531 'MozStorageStatementRow': {
532 'headerFile': 'mozilla/storage/mozStorageStatementRow.h',
533 'nativeType': 'mozilla::storage::StatementRow',
536 'MozQueryInterface': {
537 'wrapperCache': False,
540 'MutationObserver': {
541 'nativeType': 'nsDOMMutationObserver',
545 'nativeType': 'nsDOMMutationRecord',
546 'headerFile': 'nsDOMMutationObserver.h',
550 'nativeType': 'nsDOMAttributeMap',
553 'NetworkInformation': {
554 'nativeType': 'mozilla::dom::network::Connection',
558 'nativeType': 'nsINode',
559 # Some WebIDL APIs that return Node use nsIContent internally (which doesn't
560 # have a direct correspondence with any WebIDL interface), so we need to use
561 # nsIContent.h so that the compiler knows nsIContent and nsINode are related
563 'headerFile': 'nsIContent.h',
567 'wrapperCache': False,
571 'nativeType': 'nsINodeList',
575 'OfflineAudioContext': {
576 'nativeType': 'mozilla::dom::AudioContext',
579 'OffscreenCanvasRenderingContext2D': {
580 'implicitJSContext': [
581 'createImageData', 'getImageData', 'isPointInPath', 'isPointInStroke'
585 'PaintRequestList': {
586 'headerFile': 'mozilla/dom/PaintRequest.h',
590 'nativeType': 'mozilla::dom::CanvasPath',
591 'headerFile': 'CanvasPath.h'
595 'implicitJSContext': [
600 'PerformanceResourceTiming' : {
605 'nativeType' : 'mozilla::dom::WebTaskController',
606 'headerFile' : 'mozilla/dom/WebTaskController.h'
609 'TransformStreamDefaultController': {
610 'implicitJSContext': ['terminate'],
614 'headerFile' : 'nsPluginArray.h',
615 'nativeType': 'nsPluginElement',
619 'nativeType': 'nsPluginArray',
622 'PromiseNativeHandler': {
623 'wrapperCache': False,
627 'headerFile': 'ServiceWorkerEvents.h',
631 'headerFile': 'ServiceWorkerEvents.h',
635 'nativeType': 'nsRange',
638 # Bug 1734174: We should validate ReadableStream usage of implicitJSContext.
639 'ReadableByteStreamController': {
640 'implicitJSContext': ['byobRequest', 'close', 'enqueue'],
644 'implicitJSContext': ['tee'],
647 'ReadableStreamBYOBRequest': {
648 'implicitJSContext': ['respond', 'respondWithNewView'],
651 'ReadableStreamDefaultController': {
652 'implicitJSContext': ['close'],
656 'implicitJSContext': [ 'arrayBuffer', 'blob', 'formData', 'json', 'text' ],
659 'ResizeObserverEntry': {
660 'nativeType': 'mozilla::dom::ResizeObserverEntry',
661 'headerFile': 'mozilla/dom/ResizeObserver.h',
664 'ResizeObserverSize': {
665 'nativeType': 'mozilla::dom::ResizeObserverSize',
666 'headerFile': 'mozilla/dom/ResizeObserver.h',
670 'implicitJSContext': [ 'arrayBuffer', 'blob', 'body', 'formData', 'json', 'text',
671 'clone', 'cloneUnfiltered' ],
675 'nativeType': 'mozilla::dom::WebTaskScheduler',
676 'headerFile': 'mozilla/dom/WebTaskScheduler.h',
680 'nativeType': 'nsScreen',
683 'ServiceWorkerGlobalScope': {
684 'headerFile': 'mozilla/dom/WorkerScope.h',
687 'ServiceWorkerRegistration': {
688 'implicitJSContext': [ 'pushManager' ],
691 'ShadowRealmGlobalScope': {
692 'hasOrdinaryObjectPrototype': True,
695 'SharedWorkerGlobalScope': {
696 'headerFile': 'mozilla/dom/WorkerScope.h',
700 'nativeType': 'mozilla::extensions::StreamFilter',
703 'StreamFilterDataEvent': {
704 'nativeType': 'mozilla::extensions::StreamFilterDataEvent',
705 'headerFile': 'mozilla/extensions/StreamFilterEvents.h',
708 'StructuredCloneHolder': {
709 'nativeType': 'mozilla::dom::StructuredCloneBlob',
710 'wrapperCache': False,
714 'nativeType': 'mozilla::StyleSheet',
715 'headerFile': 'mozilla/StyleSheetInlines.h',
718 'SVGAnimatedAngle': {
719 'nativeType': 'mozilla::dom::DOMSVGAnimatedAngle',
720 'headerFile': 'DOMSVGAnimatedAngle.h',
723 'SVGAnimatedBoolean': {
724 'nativeType': 'mozilla::dom::DOMSVGAnimatedBoolean',
725 'headerFile': 'DOMSVGAnimatedBoolean.h',
728 'SVGAnimatedEnumeration': {
729 'nativeType': 'mozilla::dom::DOMSVGAnimatedEnumeration',
730 'headerFile': 'DOMSVGAnimatedEnumeration.h',
733 'SVGAnimatedInteger': {
734 'nativeType': 'mozilla::dom::DOMSVGAnimatedInteger',
735 'headerFile': 'DOMSVGAnimatedInteger.h',
738 'SVGAnimatedPreserveAspectRatio': {
739 'nativeType': 'mozilla::dom::DOMSVGAnimatedPreserveAspectRatio',
740 'headerFile': 'SVGAnimatedPreserveAspectRatio.h'
743 'SVGAnimatedLength': {
744 'nativeType': 'mozilla::dom::DOMSVGAnimatedLength',
745 'headerFile': 'DOMSVGAnimatedLength.h',
748 'SVGAnimatedLengthList': {
749 'nativeType': 'mozilla::dom::DOMSVGAnimatedLengthList',
750 'headerFile': 'DOMSVGAnimatedLengthList.h',
753 'SVGAnimatedNumber': {
754 'nativeType': 'mozilla::dom::DOMSVGAnimatedNumber',
755 'headerFile': 'DOMSVGAnimatedNumber.h',
758 'SVGAnimatedNumberList': {
759 'nativeType': 'mozilla::dom::DOMSVGAnimatedNumberList',
760 'headerFile': 'DOMSVGAnimatedNumberList.h'
763 'SVGAnimatedString': {
764 'nativeType': 'mozilla::dom::DOMSVGAnimatedString',
765 'headerFile': 'DOMSVGAnimatedString.h',
768 'SVGAnimatedTransformList': {
769 'nativeType': 'mozilla::dom::DOMSVGAnimatedTransformList',
770 'headerFile': 'DOMSVGAnimatedTransformList.h'
774 'nativeType': 'mozilla::dom::DOMSVGAngle',
775 'headerFile': 'DOMSVGAngle.h'
782 'SVGFEFuncAElement': {
783 'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
786 'SVGFEFuncBElement': {
787 'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
790 'SVGFEFuncGElement': {
791 'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
794 'SVGFEFuncRElement': {
795 'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
799 'nativeType': 'mozilla::dom::DOMSVGLength',
800 'headerFile': 'DOMSVGLength.h'
804 'nativeType': 'mozilla::dom::DOMSVGLengthList',
805 'headerFile': 'DOMSVGLengthList.h'
808 'SVGLinearGradientElement': {
809 'headerFile': 'mozilla/dom/SVGGradientElement.h',
813 'nativeType': 'mozilla::dom::DOMSVGNumber',
814 'headerFile': 'DOMSVGNumber.h',
818 'nativeType': 'mozilla::dom::DOMSVGNumberList',
819 'headerFile': 'DOMSVGNumberList.h'
823 'nativeType': 'mozilla::dom::DOMSVGPathSeg',
824 'headerFile': 'DOMSVGPathSeg.h',
827 'SVGPathSegClosePath': {
828 'nativeType': 'mozilla::dom::DOMSVGPathSegClosePath',
829 'headerFile': 'DOMSVGPathSeg.h'
832 'SVGPathSegMovetoAbs': {
833 'nativeType': 'mozilla::dom::DOMSVGPathSegMovetoAbs',
834 'headerFile': 'DOMSVGPathSeg.h'
837 'SVGPathSegMovetoRel': {
838 'nativeType': 'mozilla::dom::DOMSVGPathSegMovetoRel',
839 'headerFile': 'DOMSVGPathSeg.h'
842 'SVGPathSegLinetoAbs': {
843 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoAbs',
844 'headerFile': 'DOMSVGPathSeg.h'
847 'SVGPathSegLinetoRel': {
848 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoRel',
849 'headerFile': 'DOMSVGPathSeg.h'
852 'SVGPathSegCurvetoCubicAbs': {
853 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoCubicAbs',
854 'headerFile': 'DOMSVGPathSeg.h'
857 'SVGPathSegCurvetoCubicRel': {
858 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoCubicRel',
859 'headerFile': 'DOMSVGPathSeg.h'
862 'SVGPathSegCurvetoQuadraticAbs': {
863 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoQuadraticAbs',
864 'headerFile': 'DOMSVGPathSeg.h'
867 'SVGPathSegCurvetoQuadraticRel': {
868 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoQuadraticRel',
869 'headerFile': 'DOMSVGPathSeg.h'
872 'SVGPathSegArcAbs': {
873 'nativeType': 'mozilla::dom::DOMSVGPathSegArcAbs',
874 'headerFile': 'DOMSVGPathSeg.h'
877 'SVGPathSegArcRel': {
878 'nativeType': 'mozilla::dom::DOMSVGPathSegArcRel',
879 'headerFile': 'DOMSVGPathSeg.h'
882 'SVGPathSegLinetoHorizontalAbs': {
883 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoHorizontalAbs',
884 'headerFile': 'DOMSVGPathSeg.h'
887 'SVGPathSegLinetoHorizontalRel': {
888 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoHorizontalRel',
889 'headerFile': 'DOMSVGPathSeg.h'
892 'SVGPathSegLinetoVerticalAbs': {
893 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoVerticalAbs',
894 'headerFile': 'DOMSVGPathSeg.h'
897 'SVGPathSegLinetoVerticalRel': {
898 'nativeType': 'mozilla::dom::DOMSVGPathSegLinetoVerticalRel',
899 'headerFile': 'DOMSVGPathSeg.h'
902 'SVGPathSegCurvetoCubicSmoothAbs': {
903 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoCubicSmoothAbs',
904 'headerFile': 'DOMSVGPathSeg.h'
907 'SVGPathSegCurvetoCubicSmoothRel': {
908 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoCubicSmoothRel',
909 'headerFile': 'DOMSVGPathSeg.h'
912 'SVGPathSegCurvetoQuadraticSmoothAbs': {
913 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoQuadraticSmoothAbs',
914 'headerFile': 'DOMSVGPathSeg.h'
917 'SVGPathSegCurvetoQuadraticSmoothRel': {
918 'nativeType': 'mozilla::dom::DOMSVGPathSegCurvetoQuadraticSmoothRel',
919 'headerFile': 'DOMSVGPathSeg.h'
923 'nativeType': 'mozilla::dom::DOMSVGPathSegList',
924 'headerFile': 'DOMSVGPathSegList.h'
928 'nativeType': 'mozilla::dom::DOMSVGPoint',
929 'headerFile': 'DOMSVGPoint.h'
933 'nativeType': 'mozilla::dom::DOMSVGPointList',
934 'headerFile': 'DOMSVGPointList.h'
937 'SVGPreserveAspectRatio': {
938 'nativeType': 'mozilla::dom::DOMSVGPreserveAspectRatio',
939 'headerFile': 'SVGPreserveAspectRatio.h'
942 'SVGRadialGradientElement': {
943 'headerFile': 'mozilla/dom/SVGGradientElement.h',
947 'nativeType': 'mozilla::dom::DOMSVGStringList',
948 'headerFile': 'DOMSVGStringList.h',
952 'nativeType': 'mozilla::dom::DOMSVGTransform',
953 'headerFile': 'DOMSVGTransform.h',
956 'SVGTransformList': {
957 'nativeType': 'mozilla::dom::DOMSVGTransformList',
958 'headerFile': 'DOMSVGTransformList.h'
962 # Maybe should be a namespace.
967 'headerFile': 'mozilla/dom/IOUtils.h',
970 'TelemetryStopwatch': {
971 'nativeType': 'mozilla::telemetry::Stopwatch',
975 # Total hack to allow binding code to realize that nsTextNode can
976 # in fact be cast to Text.
977 'headerFile': 'nsTextNode.h',
981 'wrapperCache': False
985 'wrapperCache': False
989 'wrapperCache': False
993 'headerFile': 'mozilla/dom/TouchEvent.h',
997 'nativeType': 'nsTreeColumn',
998 'headerFile': 'nsTreeColumns.h',
1002 'nativeType': 'nsTreeColumns',
1005 'TreeContentView': {
1006 'nativeType': 'nsTreeContentView',
1010 'wrapperCache': False,
1014 'wrapperCache': False,
1018 'wrapperCache': False,
1021 'TrustedScriptURL': {
1022 'wrapperCache': False,
1025 'UserInteraction': {
1026 'nativeType': 'mozilla::telemetry::UserInteractionStopwatch',
1027 'headerFile': 'mozilla/telemetry/Stopwatch.h',
1031 'nativeType': 'mozilla::dom::VisualViewport',
1035 'nativeType': 'mozilla::dom::TextTrackCue'
1039 'nativeType': 'mozilla::dom::TextTrackRegion',
1043 'nativeType': 'mozilla::dom::WakeLockJS'
1046 'WebExtensionContentScript': {
1047 'nativeType': 'mozilla::extensions::WebExtensionContentScript',
1050 'WebExtensionPolicy': {
1051 'nativeType': 'mozilla::extensions::WebExtensionPolicy',
1055 'nativeType': 'mozilla::dom::Client',
1058 'WindowGlobalChild': {
1059 'implicitJSContext': ['getActor'],
1062 'WindowGlobalParent': {
1063 'implicitJSContext': ['getActor'],
1066 'WebGLActiveInfo': {
1067 'nativeType': 'mozilla::WebGLActiveInfoJS',
1068 'headerFile': 'ClientWebGLContext.h',
1069 'wrapperCache': False
1073 'nativeType': 'mozilla::WebGLBufferJS',
1074 'headerFile': 'ClientWebGLContext.h'
1077 'EXT_float_blend': {
1078 'nativeType': 'mozilla::ClientWebGLExtensionFloatBlend',
1079 'headerFile': 'ClientWebGLExtensions.h'
1082 'EXT_texture_compression_bptc': {
1083 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureBPTC',
1084 'headerFile': 'ClientWebGLExtensions.h'
1087 'EXT_texture_compression_rgtc': {
1088 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureRGTC',
1089 'headerFile': 'ClientWebGLExtensions.h'
1092 'EXT_texture_norm16': {
1093 'nativeType': 'mozilla::ClientWebGLExtensionTextureNorm16',
1094 'headerFile': 'ClientWebGLExtensions.h'
1097 'OES_fbo_render_mipmap': {
1098 'nativeType': 'mozilla::ClientWebGLExtensionFBORenderMipmap',
1099 'headerFile': 'ClientWebGLExtensions.h'
1103 'nativeType': 'mozilla::ClientWebGLExtensionMultiview',
1104 'headerFile': 'ClientWebGLExtensions.h'
1107 'WEBGL_compressed_texture_astc': {
1108 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureASTC',
1109 'headerFile': 'ClientWebGLExtensions.h'
1112 'WEBGL_compressed_texture_etc': {
1113 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureES3',
1114 'headerFile': 'ClientWebGLExtensions.h'
1117 'WEBGL_compressed_texture_etc1': {
1118 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureETC1',
1119 'headerFile': 'ClientWebGLExtensions.h'
1122 'WEBGL_compressed_texture_pvrtc': {
1123 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTexturePVRTC',
1124 'headerFile': 'ClientWebGLExtensions.h'
1127 'WEBGL_compressed_texture_s3tc': {
1128 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureS3TC',
1129 'headerFile': 'ClientWebGLExtensions.h'
1132 'WEBGL_compressed_texture_s3tc_srgb': {
1133 'nativeType': 'mozilla::ClientWebGLExtensionCompressedTextureS3TC_SRGB',
1134 'headerFile': 'ClientWebGLExtensions.h'
1137 'WEBGL_depth_texture': {
1138 'nativeType': 'mozilla::ClientWebGLExtensionDepthTexture',
1139 'headerFile': 'ClientWebGLExtensions.h'
1142 'WEBGL_debug_renderer_info': {
1143 'nativeType': 'mozilla::ClientWebGLExtensionDebugRendererInfo',
1144 'headerFile': 'ClientWebGLExtensions.h'
1147 'WEBGL_debug_shaders': {
1148 'nativeType': 'mozilla::ClientWebGLExtensionDebugShaders',
1149 'headerFile': 'ClientWebGLExtensions.h'
1152 'WEBGL_explicit_present': {
1153 'nativeType': 'mozilla::ClientWebGLExtensionExplicitPresent',
1154 'headerFile': 'ClientWebGLExtensions.h'
1157 'WEBGL_provoking_vertex': {
1158 'nativeType': 'mozilla::ClientWebGLExtensionProvokingVertex',
1159 'headerFile': 'ClientWebGLExtensions.h'
1162 'OES_draw_buffers_indexed': {
1163 'nativeType': 'mozilla::ClientWebGLExtensionDrawBuffersIndexed',
1164 'headerFile': 'ClientWebGLExtensions.h'
1167 'OES_element_index_uint': {
1168 'nativeType': 'mozilla::ClientWebGLExtensionElementIndexUint',
1169 'headerFile': 'ClientWebGLExtensions.h'
1173 'nativeType': 'mozilla::ClientWebGLExtensionFragDepth',
1174 'headerFile': 'ClientWebGLExtensions.h'
1177 'WEBGL_lose_context': {
1178 'nativeType': 'mozilla::ClientWebGLExtensionLoseContext',
1179 'headerFile': 'ClientWebGLExtensions.h'
1183 'nativeType': 'mozilla::ClientWebGLExtensionSRGB',
1184 'headerFile': 'ClientWebGLExtensions.h'
1187 'OES_standard_derivatives': {
1188 'nativeType': 'mozilla::ClientWebGLExtensionStandardDerivatives',
1189 'headerFile': 'ClientWebGLExtensions.h'
1192 'EXT_shader_texture_lod': {
1193 'nativeType': 'mozilla::ClientWebGLExtensionShaderTextureLod',
1194 'headerFile': 'ClientWebGLExtensions.h'
1197 'EXT_texture_filter_anisotropic': {
1198 'nativeType': 'mozilla::ClientWebGLExtensionTextureFilterAnisotropic',
1199 'headerFile': 'ClientWebGLExtensions.h'
1202 'OES_texture_float': {
1203 'nativeType': 'mozilla::ClientWebGLExtensionTextureFloat',
1204 'headerFile': 'ClientWebGLExtensions.h'
1207 'OES_texture_float_linear': {
1208 'nativeType': 'mozilla::ClientWebGLExtensionTextureFloatLinear',
1209 'headerFile': 'ClientWebGLExtensions.h'
1212 'OES_texture_half_float': {
1213 'nativeType': 'mozilla::ClientWebGLExtensionTextureHalfFloat',
1214 'headerFile': 'ClientWebGLExtensions.h'
1217 'OES_texture_half_float_linear': {
1218 'nativeType': 'mozilla::ClientWebGLExtensionTextureHalfFloatLinear',
1219 'headerFile': 'ClientWebGLExtensions.h'
1222 'WEBGL_color_buffer_float': {
1223 'nativeType': 'mozilla::ClientWebGLExtensionColorBufferFloat',
1224 'headerFile': 'ClientWebGLExtensions.h'
1227 'EXT_color_buffer_half_float': {
1228 'nativeType': 'mozilla::ClientWebGLExtensionColorBufferHalfFloat',
1229 'headerFile': 'ClientWebGLExtensions.h'
1232 'EXT_color_buffer_float': {
1233 'nativeType': 'mozilla::ClientWebGLExtensionEXTColorBufferFloat',
1234 'headerFile': 'ClientWebGLExtensions.h'
1237 'WEBGL_draw_buffers': {
1238 'nativeType': 'mozilla::ClientWebGLExtensionDrawBuffers',
1239 'headerFile': 'ClientWebGLExtensions.h'
1242 'OES_vertex_array_object': {
1243 'nativeType': 'mozilla::ClientWebGLExtensionVertexArray',
1244 'headerFile': 'ClientWebGLExtensions.h'
1247 'ANGLE_instanced_arrays': {
1248 'nativeType': 'mozilla::ClientWebGLExtensionInstancedArrays',
1249 'headerFile': 'ClientWebGLExtensions.h'
1252 'EXT_blend_minmax': {
1253 'nativeType': 'mozilla::ClientWebGLExtensionBlendMinMax',
1254 'headerFile': 'ClientWebGLExtensions.h'
1257 'EXT_disjoint_timer_query': {
1258 'nativeType': 'mozilla::ClientWebGLExtensionDisjointTimerQuery',
1259 'headerFile': 'ClientWebGLExtensions.h'
1263 'nativeType': 'mozilla::ClientWebGLExtensionMOZDebug',
1264 'headerFile': 'ClientWebGLExtensions.h'
1267 'WebGLFramebuffer': {
1268 'nativeType': 'mozilla::WebGLFramebufferJS',
1269 'headerFile': 'ClientWebGLContext.h'
1273 'nativeType': 'mozilla::WebGLProgramJS',
1274 'headerFile': 'ClientWebGLContext.h'
1278 'nativeType': 'mozilla::WebGLQueryJS',
1279 'headerFile': 'ClientWebGLContext.h'
1282 'WebGLRenderbuffer': {
1283 'nativeType': 'mozilla::WebGLRenderbufferJS',
1284 'headerFile': 'ClientWebGLContext.h'
1287 'WebGLRenderingContext': {
1288 'nativeType': 'mozilla::ClientWebGLContext',
1289 'headerFile': 'ClientWebGLContext.h',
1292 'WebGL2RenderingContext': {
1293 'nativeType': 'mozilla::ClientWebGLContext',
1294 'headerFile': 'ClientWebGLContext.h',
1298 'nativeType': 'mozilla::WebGLSamplerJS',
1299 'headerFile': 'ClientWebGLContext.h'
1303 'nativeType': 'mozilla::WebGLShaderJS',
1304 'headerFile': 'ClientWebGLContext.h'
1307 'WebGLShaderPrecisionFormat': {
1308 'nativeType': 'mozilla::WebGLShaderPrecisionFormatJS',
1309 'headerFile': 'ClientWebGLContext.h',
1310 'wrapperCache': False
1314 'nativeType': 'mozilla::WebGLSyncJS',
1315 'headerFile': 'ClientWebGLContext.h'
1319 'nativeType': 'mozilla::WebGLTextureJS',
1320 'headerFile': 'ClientWebGLContext.h'
1323 'WebGLTransformFeedback': {
1324 'nativeType': 'mozilla::WebGLTransformFeedbackJS',
1325 'headerFile': 'ClientWebGLContext.h'
1328 'WebGLUniformLocation': {
1329 'nativeType': 'mozilla::WebGLUniformLocationJS',
1330 'headerFile': 'ClientWebGLContext.h'
1333 'WebGLVertexArrayObject': {
1334 'nativeType': 'mozilla::WebGLVertexArrayJS',
1335 'headerFile': 'ClientWebGLContext.h'
1341 'nativeType': 'mozilla::webgpu::Instance',
1344 'nativeType': 'mozilla::webgpu::Adapter',
1347 'nativeType': 'mozilla::webgpu::AdapterInfo',
1348 'headerFile': 'mozilla/webgpu/Adapter.h',
1349 'wrapperCache': False
1352 'nativeType': 'mozilla::webgpu::BindGroup',
1354 'GPUBindGroupLayout': {
1355 'nativeType': 'mozilla::webgpu::BindGroupLayout',
1358 'nativeType': 'mozilla::webgpu::Buffer',
1359 'implicitJSContext': [ 'unmap', 'destroy' ],
1361 'GPUCanvasContext': {
1362 'nativeType': 'mozilla::webgpu::CanvasContext',
1364 'GPUCommandBuffer': {
1365 'nativeType': 'mozilla::webgpu::CommandBuffer',
1367 'GPUCommandEncoder': {
1368 'nativeType': 'mozilla::webgpu::CommandEncoder',
1370 'GPUCompilationInfo': {
1371 'nativeType': 'mozilla::webgpu::CompilationInfo',
1373 'GPUCompilationMessage': {
1374 'nativeType': 'mozilla::webgpu::CompilationMessage',
1376 'GPUComputePassEncoder': {
1377 'nativeType': 'mozilla::webgpu::ComputePassEncoder',
1379 'GPUComputePipeline': {
1380 'nativeType': 'mozilla::webgpu::ComputePipeline',
1383 'nativeType': 'mozilla::webgpu::Device',
1385 'GPUDeviceLostInfo': {
1386 'nativeType': 'mozilla::webgpu::DeviceLostInfo',
1389 'nativeType': 'mozilla::webgpu::Error',
1391 'GPUInternalError': {
1392 'nativeType': 'mozilla::webgpu::InternalError',
1394 'GPUOutOfMemoryError': {
1395 'nativeType': 'mozilla::webgpu::OutOfMemoryError',
1397 'GPUPipelineLayout': {
1398 'nativeType': 'mozilla::webgpu::PipelineLayout',
1401 'nativeType': 'mozilla::webgpu::QuerySet',
1404 'nativeType': 'mozilla::webgpu::Queue',
1406 'GPURenderBundle': {
1407 'nativeType': 'mozilla::webgpu::RenderBundle',
1409 'GPURenderBundleEncoder': {
1410 'nativeType': 'mozilla::webgpu::RenderBundleEncoder',
1412 'GPURenderPassEncoder': {
1413 'nativeType': 'mozilla::webgpu::RenderPassEncoder',
1415 'GPURenderPipeline': {
1416 'nativeType': 'mozilla::webgpu::RenderPipeline',
1419 'nativeType': 'mozilla::webgpu::Sampler',
1421 'GPUShaderModule': {
1422 'nativeType': 'mozilla::webgpu::ShaderModule',
1424 'GPUSupportedFeatures': {
1425 'nativeType': 'mozilla::webgpu::SupportedFeatures',
1427 'GPUSupportedLimits': {
1428 'nativeType': 'mozilla::webgpu::SupportedLimits',
1431 'nativeType': 'mozilla::webgpu::Texture',
1434 'nativeType': 'mozilla::webgpu::TextureView',
1436 'GPUValidationError': {
1437 'nativeType': 'mozilla::webgpu::ValidationError',
1452 'GPUTextureUsage': {
1459 'nativeType': 'mozilla::glean::Glean',
1460 'headerFile': 'mozilla/glean/bindings/Glean.h',
1463 'nativeType': 'mozilla::glean::Category',
1464 'headerFile': 'mozilla/glean/bindings/Category.h',
1467 'nativeType': 'mozilla::glean::GleanPings',
1468 'headerFile': 'mozilla/glean/bindings/GleanPings.h',
1471 'nativeType': 'mozilla::glean::GleanLabeled',
1472 'headerFile': 'mozilla/glean/bindings/Labeled.h',
1475 'nativeType': 'mozilla::glean::GleanMetric',
1476 'headerFile': 'mozilla/glean/bindings/GleanMetric.h',
1479 'nativeType': 'mozilla::glean::GleanBoolean',
1480 'headerFile': 'mozilla/glean/bindings/Boolean.h',
1483 'nativeType': 'mozilla::glean::GleanCounter',
1484 'headerFile': 'mozilla/glean/bindings/Counter.h',
1486 'GleanCustomDistribution': {
1487 'nativeType': 'mozilla::glean::GleanCustomDistribution',
1488 'headerFile': 'mozilla/glean/bindings/CustomDistribution.h',
1491 'nativeType': 'mozilla::glean::GleanDatetime',
1492 'headerFile': 'mozilla/glean/bindings/Datetime.h',
1495 'nativeType': 'mozilla::glean::GleanString',
1496 'headerFile': 'mozilla/glean/bindings/String.h',
1498 'GleanStringList': {
1499 'nativeType': 'mozilla::glean::GleanStringList',
1500 'headerFile': 'mozilla/glean/bindings/StringList.h',
1503 'nativeType': 'mozilla::glean::GleanTimespan',
1504 'headerFile': 'mozilla/glean/bindings/Timespan.h',
1507 'nativeType': 'mozilla::glean::GleanUuid',
1508 'headerFile': 'mozilla/glean/bindings/Uuid.h',
1511 'nativeType': 'mozilla::glean::GleanEvent',
1512 'headerFile': 'mozilla/glean/bindings/Event.h',
1515 'nativeType': 'mozilla::glean::GleanQuantity',
1516 'headerFile': 'mozilla/glean/bindings/Quantity.h',
1519 'nativeType': 'mozilla::glean::GleanUrl',
1520 'headerFile': 'mozilla/glean/bindings/Url.h',
1522 'GleanTimingDistribution': {
1523 'nativeType': 'mozilla::glean::GleanTimingDistribution',
1524 'headerFile': 'mozilla/glean/bindings/TimingDistribution.h',
1526 'GleanMemoryDistribution': {
1527 'nativeType': 'mozilla::glean::GleanMemoryDistribution',
1528 'headerFile': 'mozilla/glean/bindings/MemoryDistribution.h',
1531 'nativeType': 'mozilla::glean::GleanNumerator',
1532 'headerFile': 'mozilla/glean/bindings/Numerator.h',
1534 'GleanDenominator': {
1535 'nativeType': 'mozilla::glean::GleanDenominator',
1536 'headerFile': 'mozilla/glean/bindings/Denominator.h',
1539 'nativeType': 'mozilla::glean::GleanRate',
1540 'headerFile': 'mozilla/glean/bindings/Rate.h',
1543 'nativeType': 'mozilla::glean::GleanText',
1544 'headerFile': 'mozilla/glean/bindings/Text.h',
1547 'nativeType': 'mozilla::glean::GleanObject',
1548 'headerFile': 'mozilla/glean/bindings/Object.h',
1552 'nativeType': 'nsGlobalWindowInner',
1553 'headerFile': 'nsGlobalWindowInner.h',
1554 'implicitJSContext': [
1555 'requestIdleCallback', 'indexedDB'
1564 'nativeType': 'mozilla::dom::WindowProxyHolder',
1565 'headerFile': 'mozilla/dom/WindowProxyHolder.h',
1570 'nativeType': 'nsWindowRoot'
1573 'WorkerDebuggerGlobalScope': {
1574 'headerFile': 'mozilla/dom/WorkerScope.h',
1575 'implicitJSContext': [
1576 'dump', 'clearConsoleEvents', 'reportError', 'setConsoleEventHandler',
1580 'WorkerGlobalScope': {
1581 'headerFile': 'mozilla/dom/WorkerScope.h',
1582 'implicitJSContext': [ 'importScripts', 'indexedDB' ],
1586 # Paint worklets just use the Worklet interface.
1588 'implicitJSContext': [ 'addModule' ],
1591 # Bug 1734174: We should validate ReadableStream usage of implicitJSContext.
1593 'implicitJSContext': ['close'],
1596 'WritableStreamDefaultWriter': {
1597 'implicitJSContext': ['close', 'releaseLock'],
1601 'nativeType': 'nsDOMSerializer',
1602 'wrapperCache': False
1606 'wrapperCache': False,
1609 'XPathExpression': {
1610 'wrapperCache': False,
1617 'XRReferenceSpace': {
1626 'nativeType': 'txMozillaXSLTProcessor',
1630 'nativeType': 'nsXULElement',
1635 'ExtensionBrowser': {
1636 'headerFile': 'mozilla/extensions/ExtensionBrowser.h',
1637 'nativeType': 'mozilla::extensions::ExtensionBrowser',
1640 'ExtensionMockAPI': {
1641 'headerFile': 'mozilla/extensions/ExtensionMockAPI.h',
1642 'nativeType': 'mozilla::extensions::ExtensionMockAPI',
1645 'ExtensionBrowserSettings': {
1646 'headerFile': 'mozilla/extensions/ExtensionBrowserSettings.h',
1647 'nativeType': 'mozilla::extensions::ExtensionBrowserSettings',
1650 'ExtensionBrowserSettingsColorManagement': {
1651 'headerFile': 'mozilla/extensions/ExtensionBrowserSettingsColorManagement.h',
1652 'nativeType': 'mozilla::extensions::ExtensionBrowserSettingsColorManagement',
1656 'headerFile': 'mozilla/extensions/ExtensionDns.h',
1657 'nativeType': 'mozilla::extensions::ExtensionDns',
1660 'ExtensionEventManager': {
1661 'headerFile': 'mozilla/extensions/ExtensionEventManager.h',
1662 'nativeType': 'mozilla::extensions::ExtensionEventManager',
1666 'headerFile': 'mozilla/extensions/ExtensionPort.h',
1667 'nativeType': 'mozilla::extensions::ExtensionPort',
1671 'headerFile': 'mozilla/extensions/ExtensionProxy.h',
1672 'nativeType': 'mozilla::extensions::ExtensionProxy',
1675 'ExtensionRuntime': {
1676 'headerFile': 'mozilla/extensions/ExtensionRuntime.h',
1677 'nativeType': 'mozilla::extensions::ExtensionRuntime',
1680 'ExtensionScripting': {
1681 'headerFile': 'mozilla/extensions/ExtensionScripting.h',
1682 'nativeType': 'mozilla::extensions::ExtensionScripting',
1685 'ExtensionSetting': {
1686 'headerFile': 'mozilla/extensions/ExtensionSetting.h',
1687 'nativeType': 'mozilla::extensions::ExtensionSetting',
1691 'headerFile': 'mozilla/extensions/ExtensionTest.h',
1692 'nativeType': 'mozilla::extensions::ExtensionTest',
1695 'ExtensionAlarms': {
1696 'headerFile': 'mozilla/extensions/ExtensionAlarms.h',
1697 'nativeType': 'mozilla::extensions::ExtensionAlarms',
1702 if buildconfig.substs.get("MOZ_WEBRTC", False):
1703 DOMInterfaces.update({
1705 'PeerConnectionImpl': {
1706 'nativeType': 'mozilla::PeerConnectionImpl',
1707 'headerFile': 'PeerConnectionImpl.h',
1711 'nativeType': 'nsDOMDataChannel',
1714 'WebrtcGlobalInformation': {
1715 'headerFile': 'WebrtcGlobalInformation.h',
1720 ####################################
1721 # Test Interfaces of various sorts #
1722 ####################################
1724 if buildconfig.substs.get("ENABLE_TESTS", False):
1725 DOMInterfaces.update({
1727 'OnlyForUseInConstructor' : {
1728 'headerFile': 'TestBindingHeader.h',
1732 'TestAttributesOnTypes' : {
1733 'headerFile': 'TestBindingHeader.h',
1737 'TestCEReactionsInterface' : {
1738 'headerFile': 'TestBindingHeader.h',
1742 'TestChildInterface' : {
1743 'headerFile': 'TestBindingHeader.h',
1747 'TestCImplementedInterface' : {
1748 'headerFile': 'TestCImplementedInterface.h',
1752 'TestCImplementedInterface2' : {
1753 'headerFile': 'TestCImplementedInterface.h',
1757 'TestConstructorForFuncInterface' : {
1758 'headerFile': 'TestBindingHeader.h',
1762 'TestConstructorForPrefInterface' : {
1763 'headerFile': 'TestBindingHeader.h',
1767 'TestConstructorForSCInterface' : {
1768 'headerFile': 'TestBindingHeader.h',
1772 'TestCppKeywordNamedMethodsInterface' : {
1773 'headerFile': 'TestBindingHeader.h',
1777 'TestDeprecatedInterface' : {
1778 # Keep this in sync with TestExampleInterface
1779 'headerFile': 'TestBindingHeader.h',
1783 'TestExampleInterface' : {
1784 # Keep this in sync with TestInterface
1785 'headerFile': 'TestExampleInterface-example.h',
1789 'TestExampleProxyInterface' : {
1790 'headerFile': 'TestExampleProxyInterface-example.h',
1794 'TestExampleThrowingConstructorInterface' : {
1795 'headerFile': 'TestExampleThrowingConstructorInterface-example.h',
1799 'TestExampleWorkerInterface' : {
1800 'headerFile': 'TestExampleWorkerInterface-example.h',
1804 'TestExternalInterface' : {
1805 'nativeType': 'mozilla::dom::TestExternalInterface',
1806 'headerFile': 'TestBindingHeader.h',
1810 'TestFuncConstructorForDifferentFuncInterface' : {
1811 'headerFile': 'TestBindingHeader.h',
1815 'TestFuncConstructorForInterface' : {
1816 'headerFile': 'TestBindingHeader.h',
1820 'TestHTMLConstructorInterface' : {
1821 'headerFile': 'TestBindingHeader.h',
1825 'TestIndexedAndNamedGetterInterface' : {
1826 'headerFile': 'TestBindingHeader.h',
1830 'TestIndexedAndNamedGetterAndSetterInterface' : {
1831 'headerFile': 'TestBindingHeader.h',
1835 'TestIndexedAndNamedSetterInterface' : {
1836 'headerFile': 'TestBindingHeader.h',
1840 'TestIndexedGetterAndSetterAndNamedGetterInterface' : {
1841 'headerFile': 'TestBindingHeader.h',
1845 'TestIndexedGetterInterface' : {
1846 'headerFile': 'TestBindingHeader.h',
1850 'TestIndexedSetterInterface' : {
1851 'headerFile': 'TestBindingHeader.h',
1856 # Keep this in sync with TestExampleInterface
1857 'headerFile': 'TestBindingHeader.h',
1861 'TestInterfaceWithPromiseConstructorArg' : {
1862 'headerFile': 'TestBindingHeader.h',
1866 'TestJSImplInterface' : {
1867 # Keep this in sync with TestExampleInterface
1868 'headerFile': 'TestJSImplGenBinding.h',
1872 'TestJSImplInterface2' : {
1873 'headerFile': 'TestJSImplGenBinding.h',
1877 'TestJSImplInterface3' : {
1878 'headerFile': 'TestJSImplGenBinding.h',
1882 'TestJSImplInterface4' : {
1883 'headerFile': 'TestJSImplGenBinding.h',
1887 'TestJSImplInterface5' : {
1888 'headerFile': 'TestJSImplGenBinding.h',
1892 'TestJSImplInterface6' : {
1893 'headerFile': 'TestJSImplGenBinding.h',
1897 'TestLegacyFactoryFunctionInterface' : {
1898 'headerFile': 'TestBindingHeader.h',
1902 'TestLegacyFactoryFunctionInterface2' : {
1903 'headerFile': 'TestBindingHeader.h',
1907 'TestNamedDeleterInterface' : {
1908 'headerFile': 'TestBindingHeader.h',
1912 'TestNamedDeleterWithRetvalInterface' : {
1913 'headerFile': 'TestBindingHeader.h',
1917 'TestNamedGetterInterface' : {
1918 'headerFile': 'TestBindingHeader.h',
1922 'TestNamedSetterInterface' : {
1923 'headerFile': 'TestBindingHeader.h',
1928 'headerFile': 'TestBindingHeader.h',
1932 'TestNonWrapperCacheInterface' : {
1933 'headerFile': 'TestBindingHeader.h',
1935 'wrapperCache': False,
1938 'TestParentInterface' : {
1939 'headerFile': 'TestBindingHeader.h',
1943 'TestPrefChromeOnlySCFuncConstructorForInterface' : {
1944 'headerFile': 'TestBindingHeader.h',
1948 'TestPrefConstructorForDifferentPrefInterface' : {
1949 'headerFile': 'TestBindingHeader.h',
1953 'TestPrefConstructorForInterface' : {
1954 'headerFile': 'TestBindingHeader.h',
1958 'TestProtoObjectHackedNamespace' : {
1959 'headerFile': 'TestBindingHeader.h',
1963 'TestRenamedInterface' : {
1964 'headerFile': 'TestBindingHeader.h',
1966 'nativeType': 'nsRenamedInterface'
1969 'TestRenamedNamespace' : {
1970 'headerFile': 'TestBindingHeader.h',
1974 'TestSCConstructorForInterface' : {
1975 'headerFile': 'TestBindingHeader.h',
1979 'TestSecureContextInterface' : {
1980 # Keep this in sync with TestExampleInterface
1981 'headerFile': 'TestBindingHeader.h',
1985 'TestThrowingConstructorInterface' : {
1986 'headerFile': 'TestBindingHeader.h',
1990 'TestWorkerExposedInterface' : {
1991 'headerFile': 'TestBindingHeader.h',
1995 'TestCallbackDictUnionOverload' : {
1996 'headerFile': 'TestBindingHeader.h',
2002 if buildconfig.substs.get("MOZ_DEBUG", False):
2003 DOMInterfaces.update({
2006 'wrapperCache': False,
2012 # These probably won't be converted to use new DOM bindings
2013 def addExternalIface(iface, nativeType=None, headerFile=None,
2014 notflattened=False):
2015 if iface in DOMInterfaces:
2016 raise Exception('Interface declared both as WebIDL and External interface')
2020 if not nativeType is None:
2021 domInterface['nativeType'] = nativeType
2022 if not headerFile is None:
2023 domInterface['headerFile'] = headerFile
2024 domInterface['notflattened'] = notflattened
2025 DOMInterfaces[iface] = domInterface
2027 addExternalIface('Cookie', nativeType='nsICookie',
2028 headerFile='nsICookie.h', notflattened=True)
2029 addExternalIface('ContentSecurityPolicy', nativeType='nsIContentSecurityPolicy',
2031 addExternalIface('imgINotificationObserver', nativeType='imgINotificationObserver')
2032 addExternalIface('imgIRequest', nativeType='imgIRequest', notflattened=True)
2033 addExternalIface('LoadContext', nativeType='nsILoadContext', notflattened=True)
2034 addExternalIface('LoadInfo', nativeType='nsILoadInfo',
2035 headerFile='nsILoadInfo.h', notflattened=True)
2036 addExternalIface('XULControllers', nativeType='nsIControllers', notflattened=True)
2037 addExternalIface('MozObserver', nativeType='nsIObserver', notflattened=True)
2038 addExternalIface('MozTreeView', nativeType='nsITreeView',
2039 headerFile='nsITreeView.h', notflattened=True)
2040 addExternalIface('nsIBrowserDOMWindow', nativeType='nsIBrowserDOMWindow',
2042 addExternalIface('nsIDOMWindowUtils', nativeType='nsIDOMWindowUtils', notflattened=True)
2043 addExternalIface('nsIEventTarget', nativeType='nsIEventTarget', notflattened=True)
2044 addExternalIface('nsIFile', nativeType='nsIFile', notflattened=True)
2045 addExternalIface('nsILoadGroup', nativeType='nsILoadGroup',
2046 headerFile='nsILoadGroup.h', notflattened=True)
2047 addExternalIface('nsIMediaDevice', nativeType='nsIMediaDevice',
2049 addExternalIface('nsIPrintSettings', nativeType='nsIPrintSettings',
2051 addExternalIface('nsISelectionListener', nativeType='nsISelectionListener')
2052 addExternalIface('nsIStreamListener', nativeType='nsIStreamListener', notflattened=True)
2053 addExternalIface('nsISocketTransport', nativeType='nsISocketTransport',
2055 addExternalIface('nsITransportProvider', nativeType='nsITransportProvider')
2056 addExternalIface('nsITreeSelection', nativeType='nsITreeSelection',
2058 addExternalIface('nsISupports', nativeType='nsISupports')
2059 addExternalIface('nsIDocShell', nativeType='nsIDocShell', notflattened=True)
2060 addExternalIface('nsIDOMProcessChild', nativeType='nsIDOMProcessChild', notflattened=True)
2061 addExternalIface('nsIDOMProcessParent', nativeType='nsIDOMProcessParent', notflattened=True)
2062 addExternalIface('nsIReferrerInfo', nativeType='nsIReferrerInfo', notflattened=True)
2063 addExternalIface('nsISecureBrowserUI', nativeType='nsISecureBrowserUI', notflattened=True)
2064 addExternalIface('nsIWebProgress', nativeType='nsIWebProgress', notflattened=True)
2065 addExternalIface('nsIWebNavigation', nativeType='nsIWebNavigation', notflattened=True)
2066 addExternalIface('nsIEditor', nativeType='nsIEditor', notflattened=True)
2067 addExternalIface('nsIWebBrowserPersistDocumentReceiver',
2068 nativeType='nsIWebBrowserPersistDocumentReceiver',
2069 headerFile='nsIWebBrowserPersistDocument.h',
2071 addExternalIface('nsIWebProgressListener', nativeType='nsIWebProgressListener',
2073 addExternalIface('OutputStream', nativeType='nsIOutputStream',
2075 addExternalIface('Principal', nativeType='nsIPrincipal',
2076 headerFile='nsIPrincipal.h', notflattened=True)
2077 addExternalIface('StackFrame', nativeType='nsIStackFrame',
2078 headerFile='nsIException.h', notflattened=True)
2079 addExternalIface('RemoteTab', nativeType='nsIRemoteTab',
2081 addExternalIface('URI', nativeType='nsIURI', headerFile='nsIURI.h',
2083 addExternalIface('XULCommandDispatcher', notflattened=True)
2084 addExternalIface('nsISHistory', nativeType='nsISHistory', notflattened=True)
2085 addExternalIface('nsISHEntry', nativeType='nsISHEntry', notflattened=True)
2086 addExternalIface('ReferrerInfo', nativeType='nsIReferrerInfo')
2087 addExternalIface('nsIPermissionDelegateHandler',
2088 nativeType='nsIPermissionDelegateHandler',
2090 addExternalIface('nsIOpenWindowInfo', nativeType='nsIOpenWindowInfo',
2092 addExternalIface('nsICookieJarSettings', nativeType='nsICookieJarSettings',
2094 addExternalIface('nsIGleanPing', headerFile='mozilla/glean/bindings/Ping.h',
2095 nativeType='nsIGleanPing', notflattened=True)
2096 addExternalIface('nsISessionStoreRestoreData',
2097 nativeType='nsISessionStoreRestoreData',
2098 headerFile='nsISessionStoreRestoreData.h', notflattened=True)
2099 addExternalIface('nsIScreen', nativeType='nsIScreen',
2100 headerFile='nsIScreen.h', notflattened=True)
2101 addExternalIface('InputStream',
2102 nativeType='nsIInputStream', notflattened=True)
2104 # The TemplatedAttributes dictionary has the interface name where the template
2105 # should be generated as the key. The values are lists of dictionaries, where
2106 # each dictionary corresponds to one template. The dictionary contains:
2108 # template the template's name
2109 # getter the name for the native getter to call
2110 # setter the name for the native setter to call
2111 # argument a tuple for the additional argument that should be passed to the
2112 # native getter and setter, containing the type for the argument
2113 # and a name for the argument. The value will be supplied by the
2114 # [BindingTemplate] extended attribute.
2115 # attrName a string which in the generated C++ code would yield a
2116 # |const char*| that contains the attribute's name
2118 TemplatedAttributes = {
2122 'template': 'CSS2Property',
2123 'getter': 'GetPropertyValue',
2124 'setter': 'SetPropertyValue',
2125 'argument': ('nsCSSPropertyID', 'id'),
2126 'attrName': 'nsCSSProps::PropertyIDLName(id)',