summaryrefslogtreecommitdiffstats
path: root/dom/webidl
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/webidl
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/APZTestData.webidl47
-rw-r--r--dom/webidl/AbstractWorker.webidl10
-rw-r--r--dom/webidl/AccessibleNode.webidl11
-rw-r--r--dom/webidl/AddonEvent.webidl12
-rw-r--r--dom/webidl/AddonManager.webidl91
-rw-r--r--dom/webidl/AnalyserNode.webidl41
-rw-r--r--dom/webidl/Animatable.webidl28
-rw-r--r--dom/webidl/Animation.webidl52
-rw-r--r--dom/webidl/AnimationEffectReadOnly.webidl53
-rw-r--r--dom/webidl/AnimationEffectTiming.webidl27
-rw-r--r--dom/webidl/AnimationEffectTimingReadOnly.webidl23
-rw-r--r--dom/webidl/AnimationEvent.webidl25
-rw-r--r--dom/webidl/AnimationPlaybackEvent.webidl24
-rw-r--r--dom/webidl/AnimationTimeline.webidl17
-rw-r--r--dom/webidl/AnonymousContent.webidl80
-rw-r--r--dom/webidl/AppInfo.webidl12
-rw-r--r--dom/webidl/AppNotificationServiceOptions.webidl19
-rw-r--r--dom/webidl/ArchiveReader.webidl16
-rw-r--r--dom/webidl/ArchiveRequest.webidl10
-rw-r--r--dom/webidl/Attr.webidl33
-rw-r--r--dom/webidl/AudioBuffer.webidl32
-rw-r--r--dom/webidl/AudioBufferSourceNode.webidl35
-rw-r--r--dom/webidl/AudioChannel.webidl50
-rw-r--r--dom/webidl/AudioChannelManager.webidl37
-rw-r--r--dom/webidl/AudioContext.webidl122
-rw-r--r--dom/webidl/AudioDestinationNode.webidl19
-rw-r--r--dom/webidl/AudioListener.webidl31
-rw-r--r--dom/webidl/AudioNode.webidl69
-rw-r--r--dom/webidl/AudioParam.webidl50
-rw-r--r--dom/webidl/AudioProcessingEvent.webidl24
-rw-r--r--dom/webidl/AudioStreamTrack.webidl16
-rw-r--r--dom/webidl/AudioTrack.webidl17
-rw-r--r--dom/webidl/AudioTrackList.webidl19
-rw-r--r--dom/webidl/AutocompleteErrorEvent.webidl23
-rw-r--r--dom/webidl/AutocompleteInfo.webidl17
-rw-r--r--dom/webidl/BarProp.webidl11
-rw-r--r--dom/webidl/BaseKeyframeTypes.webidl48
-rw-r--r--dom/webidl/BatteryManager.webidl23
-rw-r--r--dom/webidl/BeforeAfterKeyboardEvent.webidl24
-rw-r--r--dom/webidl/BeforeUnloadEvent.webidl12
-rw-r--r--dom/webidl/BiquadFilterNode.webidl41
-rw-r--r--dom/webidl/Blob.webidl42
-rw-r--r--dom/webidl/BlobEvent.webidl16
-rw-r--r--dom/webidl/BoxObject.webidl33
-rw-r--r--dom/webidl/BroadcastChannel.webidl21
-rw-r--r--dom/webidl/BrowserElement.webidl178
-rw-r--r--dom/webidl/BrowserElementAudioChannel.webidl77
-rw-r--r--dom/webidl/BrowserElementDictionaries.webidl20
-rw-r--r--dom/webidl/BrowserElementProxy.webidl15
-rw-r--r--dom/webidl/BrowserFeedWriter.webidl20
-rw-r--r--dom/webidl/CDATASection.webidl8
-rw-r--r--dom/webidl/CSPDictionaries.webidl37
-rw-r--r--dom/webidl/CSPReport.webidl23
-rw-r--r--dom/webidl/CSS.webidl24
-rw-r--r--dom/webidl/CSS2Properties.webidl.in3
-rw-r--r--dom/webidl/CSSAnimation.webidl17
-rw-r--r--dom/webidl/CSSLexer.webidl168
-rw-r--r--dom/webidl/CSSPrimitiveValue.webidl56
-rw-r--r--dom/webidl/CSSPseudoElement.webidl25
-rw-r--r--dom/webidl/CSSRuleList.webidl10
-rw-r--r--dom/webidl/CSSStyleDeclaration.webidl37
-rw-r--r--dom/webidl/CSSStyleSheet.webidl29
-rw-r--r--dom/webidl/CSSTransition.webidl17
-rw-r--r--dom/webidl/CSSValue.webidl19
-rw-r--r--dom/webidl/CSSValueList.webidl10
-rw-r--r--dom/webidl/Cache.webidl44
-rw-r--r--dom/webidl/CacheStorage.webidl34
-rw-r--r--dom/webidl/CanvasCaptureMediaStream.webidl17
-rw-r--r--dom/webidl/CanvasRenderingContext2D.webidl337
-rw-r--r--dom/webidl/CaretPosition.webidl20
-rw-r--r--dom/webidl/CaretStateChangedEvent.webidl39
-rw-r--r--dom/webidl/ChannelMergerNode.webidl17
-rw-r--r--dom/webidl/ChannelSplitterNode.webidl17
-rw-r--r--dom/webidl/CharacterData.webidl31
-rw-r--r--dom/webidl/CheckerboardReportService.webidl58
-rw-r--r--dom/webidl/ChildNode.webidl28
-rw-r--r--dom/webidl/ChromeNodeList.webidl13
-rw-r--r--dom/webidl/ChromeUtils.webidl92
-rw-r--r--dom/webidl/Client.webidl38
-rw-r--r--dom/webidl/Clients.webidl36
-rw-r--r--dom/webidl/ClipboardEvent.webidl23
-rw-r--r--dom/webidl/CloseEvent.webidl26
-rw-r--r--dom/webidl/CommandEvent.webidl14
-rw-r--r--dom/webidl/Comment.webidl15
-rw-r--r--dom/webidl/CompositionEvent.webidl33
-rw-r--r--dom/webidl/Console.webidl109
-rw-r--r--dom/webidl/ConstantSourceNode.webidl26
-rw-r--r--dom/webidl/ContainerBoxObject.webidl12
-rw-r--r--dom/webidl/ConvolverNode.webidl24
-rw-r--r--dom/webidl/Coordinates.webidl22
-rw-r--r--dom/webidl/CreateOfferRequest.webidl16
-rw-r--r--dom/webidl/Crypto.webidl21
-rw-r--r--dom/webidl/CustomElementRegistry.webidl19
-rw-r--r--dom/webidl/CustomEvent.webidl30
-rw-r--r--dom/webidl/DOMCursor.webidl13
-rw-r--r--dom/webidl/DOMError.webidl21
-rw-r--r--dom/webidl/DOMException.webidl110
-rw-r--r--dom/webidl/DOMImplementation.webidl26
-rw-r--r--dom/webidl/DOMMatrix.webidl148
-rw-r--r--dom/webidl/DOMParser.webidl46
-rw-r--r--dom/webidl/DOMPoint.webidl37
-rw-r--r--dom/webidl/DOMQuad.webidl23
-rw-r--r--dom/webidl/DOMRect.webidl39
-rw-r--r--dom/webidl/DOMRectList.webidl11
-rw-r--r--dom/webidl/DOMRequest.webidl29
-rw-r--r--dom/webidl/DOMStringList.webidl18
-rw-r--r--dom/webidl/DOMStringMap.webidl20
-rw-r--r--dom/webidl/DOMTokenList.webidl31
-rw-r--r--dom/webidl/DataChannel.webidl48
-rw-r--r--dom/webidl/DataContainerEvent.webidl30
-rw-r--r--dom/webidl/DataTransfer.webidl148
-rw-r--r--dom/webidl/DataTransferItem.webidl25
-rw-r--r--dom/webidl/DataTransferItemList.webidl21
-rw-r--r--dom/webidl/DecoderDoctorNotification.webidl23
-rw-r--r--dom/webidl/DedicatedWorkerGlobalScope.webidl22
-rw-r--r--dom/webidl/DelayNode.webidl22
-rw-r--r--dom/webidl/DesktopNotification.webidl26
-rw-r--r--dom/webidl/DeviceLightEvent.webidl16
-rw-r--r--dom/webidl/DeviceMotionEvent.webidl57
-rw-r--r--dom/webidl/DeviceOrientationEvent.webidl31
-rw-r--r--dom/webidl/DeviceProximityEvent.webidl20
-rw-r--r--dom/webidl/Directory.webidl53
-rw-r--r--dom/webidl/Document.webidl452
-rw-r--r--dom/webidl/DocumentFragment.webidl27
-rw-r--r--dom/webidl/DocumentTimeline.webidl20
-rw-r--r--dom/webidl/DocumentType.webidl19
-rw-r--r--dom/webidl/DominatorTree.webidl70
-rw-r--r--dom/webidl/DownloadEvent.webidl18
-rw-r--r--dom/webidl/Downloads.webidl166
-rw-r--r--dom/webidl/DragEvent.webidl33
-rw-r--r--dom/webidl/DynamicsCompressorNode.webidl27
-rw-r--r--dom/webidl/Element.webidl259
-rw-r--r--dom/webidl/ErrorEvent.webidl24
-rw-r--r--dom/webidl/Event.webidl75
-rw-r--r--dom/webidl/EventHandler.webidl178
-rw-r--r--dom/webidl/EventListener.webidl15
-rw-r--r--dom/webidl/EventSource.webidl36
-rw-r--r--dom/webidl/EventTarget.webidl67
-rw-r--r--dom/webidl/ExtendableEvent.webidl20
-rw-r--r--dom/webidl/ExtendableMessageEvent.webidl44
-rw-r--r--dom/webidl/External.webidl19
-rw-r--r--dom/webidl/FakePluginTagInit.webidl39
-rw-r--r--dom/webidl/Fetch.webidl26
-rw-r--r--dom/webidl/FetchEvent.webidl26
-rw-r--r--dom/webidl/File.webidl50
-rw-r--r--dom/webidl/FileList.webidl16
-rw-r--r--dom/webidl/FileMode.webidl5
-rw-r--r--dom/webidl/FileReader.webidl55
-rw-r--r--dom/webidl/FileReaderSync.webidl27
-rw-r--r--dom/webidl/FileSystem.webidl28
-rw-r--r--dom/webidl/FileSystemDirectoryEntry.webidl19
-rw-r--r--dom/webidl/FileSystemDirectoryReader.webidl18
-rw-r--r--dom/webidl/FileSystemEntry.webidl21
-rw-r--r--dom/webidl/FileSystemFileEntry.webidl15
-rw-r--r--dom/webidl/FlyWebDiscoveryManager.webidl39
-rw-r--r--dom/webidl/FlyWebFetchEvent.webidl13
-rw-r--r--dom/webidl/FlyWebPublish.webidl23
-rw-r--r--dom/webidl/FlyWebWebSocketEvent.webidl16
-rw-r--r--dom/webidl/FocusEvent.webidl21
-rw-r--r--dom/webidl/FontFace.webidl50
-rw-r--r--dom/webidl/FontFaceSet.webidl64
-rw-r--r--dom/webidl/FontFaceSetLoadEvent.webidl21
-rw-r--r--dom/webidl/FontFaceSource.webidl18
-rw-r--r--dom/webidl/FormData.webidl28
-rw-r--r--dom/webidl/Function.webidl14
-rw-r--r--dom/webidl/GainNode.webidl22
-rw-r--r--dom/webidl/Gamepad.webidl65
-rw-r--r--dom/webidl/GamepadAxisMoveEvent.webidl19
-rw-r--r--dom/webidl/GamepadButtonEvent.webidl17
-rw-r--r--dom/webidl/GamepadEvent.webidl17
-rw-r--r--dom/webidl/GamepadPose.webidl27
-rw-r--r--dom/webidl/GamepadServiceTest.webidl31
-rw-r--r--dom/webidl/Geolocation.webidl36
-rw-r--r--dom/webidl/GeometryUtils.webidl38
-rw-r--r--dom/webidl/GetUserMediaRequest.webidl16
-rw-r--r--dom/webidl/Grid.webidl113
-rw-r--r--dom/webidl/HTMLAllCollection.webidl14
-rw-r--r--dom/webidl/HTMLAnchorElement.webidl51
-rw-r--r--dom/webidl/HTMLAppletElement.webidl43
-rw-r--r--dom/webidl/HTMLAreaElement.webidl43
-rw-r--r--dom/webidl/HTMLAudioElement.webidl16
-rw-r--r--dom/webidl/HTMLBRElement.webidl23
-rw-r--r--dom/webidl/HTMLBaseElement.webidl21
-rw-r--r--dom/webidl/HTMLBodyElement.webidl26
-rw-r--r--dom/webidl/HTMLButtonElement.webidl49
-rw-r--r--dom/webidl/HTMLCanvasElement.webidl67
-rw-r--r--dom/webidl/HTMLCollection.webidl18
-rw-r--r--dom/webidl/HTMLContentElement.webidl20
-rw-r--r--dom/webidl/HTMLDListElement.webidl23
-rw-r--r--dom/webidl/HTMLDataElement.webidl13
-rw-r--r--dom/webidl/HTMLDataListElement.webidl16
-rw-r--r--dom/webidl/HTMLDetailsElement.webidl18
-rw-r--r--dom/webidl/HTMLDirectoryElement.webidl19
-rw-r--r--dom/webidl/HTMLDivElement.webidl19
-rw-r--r--dom/webidl/HTMLDocument.webidl101
-rw-r--r--dom/webidl/HTMLElement.webidl107
-rw-r--r--dom/webidl/HTMLEmbedElement.webidl46
-rw-r--r--dom/webidl/HTMLFieldSetElement.webidl33
-rw-r--r--dom/webidl/HTMLFontElement.webidl18
-rw-r--r--dom/webidl/HTMLFormControlsCollection.webidl17
-rw-r--r--dom/webidl/HTMLFormElement.webidl52
-rw-r--r--dom/webidl/HTMLFrameElement.webidl35
-rw-r--r--dom/webidl/HTMLFrameSetElement.webidl21
-rw-r--r--dom/webidl/HTMLHRElement.webidl30
-rw-r--r--dom/webidl/HTMLHeadElement.webidl16
-rw-r--r--dom/webidl/HTMLHeadingElement.webidl22
-rw-r--r--dom/webidl/HTMLHtmlElement.webidl22
-rw-r--r--dom/webidl/HTMLHyperlinkElementUtils.webidl34
-rw-r--r--dom/webidl/HTMLIFrameElement.webidl70
-rw-r--r--dom/webidl/HTMLImageElement.webidl109
-rw-r--r--dom/webidl/HTMLInputElement.webidl261
-rw-r--r--dom/webidl/HTMLLIElement.webidl25
-rw-r--r--dom/webidl/HTMLLabelElement.webidl18
-rw-r--r--dom/webidl/HTMLLegendElement.webidl24
-rw-r--r--dom/webidl/HTMLLinkElement.webidl58
-rw-r--r--dom/webidl/HTMLMapElement.webidl21
-rw-r--r--dom/webidl/HTMLMediaElement.webidl224
-rw-r--r--dom/webidl/HTMLMenuElement.webidl59
-rw-r--r--dom/webidl/HTMLMenuItemElement.webidl36
-rw-r--r--dom/webidl/HTMLMetaElement.webidl28
-rw-r--r--dom/webidl/HTMLMeterElement.webidl33
-rw-r--r--dom/webidl/HTMLModElement.webidl19
-rw-r--r--dom/webidl/HTMLOListElement.webidl29
-rw-r--r--dom/webidl/HTMLObjectElement.webidl225
-rw-r--r--dom/webidl/HTMLOptGroupElement.webidl19
-rw-r--r--dom/webidl/HTMLOptionElement.webidl31
-rw-r--r--dom/webidl/HTMLOptionsCollection.webidl23
-rw-r--r--dom/webidl/HTMLOutputElement.webidl38
-rw-r--r--dom/webidl/HTMLParagraphElement.webidl22
-rw-r--r--dom/webidl/HTMLParamElement.webidl29
-rw-r--r--dom/webidl/HTMLPictureElement.webidl8
-rw-r--r--dom/webidl/HTMLPreElement.webidl22
-rw-r--r--dom/webidl/HTMLProgressElement.webidl25
-rw-r--r--dom/webidl/HTMLQuoteElement.webidl19
-rw-r--r--dom/webidl/HTMLScriptElement.webidl40
-rw-r--r--dom/webidl/HTMLSelectElement.webidl65
-rw-r--r--dom/webidl/HTMLShadowElement.webidl19
-rw-r--r--dom/webidl/HTMLSourceElement.webidl28
-rw-r--r--dom/webidl/HTMLSpanElement.webidl15
-rw-r--r--dom/webidl/HTMLStyleElement.webidl22
-rw-r--r--dom/webidl/HTMLTableCaptionElement.webidl19
-rw-r--r--dom/webidl/HTMLTableCellElement.webidl51
-rw-r--r--dom/webidl/HTMLTableColElement.webidl30
-rw-r--r--dom/webidl/HTMLTableElement.webidl55
-rw-r--r--dom/webidl/HTMLTableRowElement.webidl35
-rw-r--r--dom/webidl/HTMLTableSectionElement.webidl31
-rw-r--r--dom/webidl/HTMLTemplateElement.webidl15
-rw-r--r--dom/webidl/HTMLTextAreaElement.webidl99
-rw-r--r--dom/webidl/HTMLTimeElement.webidl13
-rw-r--r--dom/webidl/HTMLTitleElement.webidl13
-rw-r--r--dom/webidl/HTMLTrackElement.webidl29
-rw-r--r--dom/webidl/HTMLUListElement.webidl25
-rw-r--r--dom/webidl/HTMLVideoElement.webidl57
-rw-r--r--dom/webidl/HashChangeEvent.webidl24
-rw-r--r--dom/webidl/Headers.webidl34
-rw-r--r--dom/webidl/HeapSnapshot.webidl105
-rw-r--r--dom/webidl/HiddenPluginEvent.webidl12
-rw-r--r--dom/webidl/History.webidl33
-rw-r--r--dom/webidl/IDBCursor.webidl49
-rw-r--r--dom/webidl/IDBDatabase.webidl48
-rw-r--r--dom/webidl/IDBFactory.webidl65
-rw-r--r--dom/webidl/IDBFileHandle.webidl43
-rw-r--r--dom/webidl/IDBFileRequest.webidl14
-rw-r--r--dom/webidl/IDBIndex.webidl71
-rw-r--r--dom/webidl/IDBKeyRange.webidl41
-rw-r--r--dom/webidl/IDBMutableFile.webidl21
-rw-r--r--dom/webidl/IDBObjectStore.webidl74
-rw-r--r--dom/webidl/IDBOpenDBRequest.webidl15
-rw-r--r--dom/webidl/IDBRequest.webidl31
-rw-r--r--dom/webidl/IDBTransaction.webidl44
-rw-r--r--dom/webidl/IDBVersionChangeEvent.webidl24
-rw-r--r--dom/webidl/IIRFilterNode.webidl18
-rw-r--r--dom/webidl/IdleDeadline.webidl14
-rw-r--r--dom/webidl/ImageBitmap.webidl412
-rw-r--r--dom/webidl/ImageBitmapRenderingContext.webidl40
-rw-r--r--dom/webidl/ImageCapture.webidl28
-rw-r--r--dom/webidl/ImageCaptureErrorEvent.webidl32
-rw-r--r--dom/webidl/ImageData.webidl23
-rw-r--r--dom/webidl/ImageDocument.webidl41
-rw-r--r--dom/webidl/InputEvent.webidl16
-rw-r--r--dom/webidl/InputMethod.webidl738
-rw-r--r--dom/webidl/InspectorUtils.webidl29
-rw-r--r--dom/webidl/InstallTrigger.webidl90
-rw-r--r--dom/webidl/IntersectionObserver.webidl60
-rw-r--r--dom/webidl/IterableIterator.webidl15
-rw-r--r--dom/webidl/KeyAlgorithm.webidl37
-rw-r--r--dom/webidl/KeyEvent.webidl237
-rw-r--r--dom/webidl/KeyIdsInitData.webidl11
-rw-r--r--dom/webidl/KeyboardEvent.webidl54
-rw-r--r--dom/webidl/KeyframeAnimationOptions.webidl14
-rw-r--r--dom/webidl/KeyframeEffect.webidl78
-rw-r--r--dom/webidl/LegacyQueryInterface.webidl90
-rw-r--r--dom/webidl/LinkStyle.webidl14
-rw-r--r--dom/webidl/ListBoxObject.webidl21
-rw-r--r--dom/webidl/LocalMediaStream.webidl15
-rw-r--r--dom/webidl/Location.webidl53
-rw-r--r--dom/webidl/MediaDeviceInfo.webidl24
-rw-r--r--dom/webidl/MediaDevices.webidl24
-rw-r--r--dom/webidl/MediaElementAudioSourceNode.webidl20
-rw-r--r--dom/webidl/MediaEncryptedEvent.webidl23
-rw-r--r--dom/webidl/MediaError.webidl24
-rw-r--r--dom/webidl/MediaKeyError.webidl19
-rw-r--r--dom/webidl/MediaKeyMessageEvent.webidl30
-rw-r--r--dom/webidl/MediaKeySession.webidl47
-rw-r--r--dom/webidl/MediaKeyStatusMap.webidl30
-rw-r--r--dom/webidl/MediaKeySystemAccess.webidl41
-rw-r--r--dom/webidl/MediaKeys.webidl30
-rw-r--r--dom/webidl/MediaKeysRequestStatus.webidl23
-rw-r--r--dom/webidl/MediaList.webidl19
-rw-r--r--dom/webidl/MediaQueryList.webidl20
-rw-r--r--dom/webidl/MediaRecorder.webidl59
-rw-r--r--dom/webidl/MediaSource.webidl47
-rw-r--r--dom/webidl/MediaStream.webidl43
-rw-r--r--dom/webidl/MediaStreamAudioDestinationNode.webidl18
-rw-r--r--dom/webidl/MediaStreamAudioSourceNode.webidl20
-rw-r--r--dom/webidl/MediaStreamError.webidl21
-rw-r--r--dom/webidl/MediaStreamEvent.webidl18
-rw-r--r--dom/webidl/MediaStreamList.webidl11
-rw-r--r--dom/webidl/MediaStreamTrack.webidl93
-rw-r--r--dom/webidl/MediaStreamTrackEvent.webidl19
-rw-r--r--dom/webidl/MediaTrackConstraintSet.webidl38
-rw-r--r--dom/webidl/MediaTrackSettings.webidl36
-rw-r--r--dom/webidl/MediaTrackSupportedConstraints.webidl42
-rw-r--r--dom/webidl/MenuBoxObject.webidl19
-rw-r--r--dom/webidl/MessageChannel.webidl14
-rw-r--r--dom/webidl/MessageEvent.webidl58
-rw-r--r--dom/webidl/MessagePort.webidl21
-rw-r--r--dom/webidl/MimeType.webidl12
-rw-r--r--dom/webidl/MimeTypeArray.webidl15
-rw-r--r--dom/webidl/MouseEvent.webidl114
-rw-r--r--dom/webidl/MouseScrollEvent.webidl30
-rw-r--r--dom/webidl/MozApplicationEvent.webidl16
-rw-r--r--dom/webidl/MozNetworkStats.webidl73
-rw-r--r--dom/webidl/MozNetworkStatsAlarm.webidl13
-rw-r--r--dom/webidl/MozNetworkStatsData.webidl12
-rw-r--r--dom/webidl/MozNetworkStatsInterface.webidl26
-rw-r--r--dom/webidl/MozNetworkStatsManager.webidl96
-rw-r--r--dom/webidl/MozPowerManager.webidl97
-rw-r--r--dom/webidl/MozSelfSupport.webidl77
-rw-r--r--dom/webidl/MozSettingsEvent.webidl19
-rw-r--r--dom/webidl/MozSettingsTransactionEvent.webidl17
-rw-r--r--dom/webidl/MozSpeakerManager.webidl18
-rw-r--r--dom/webidl/MozTetheringManager.webidl57
-rw-r--r--dom/webidl/MozTimeManager.webidl18
-rw-r--r--dom/webidl/MozWakeLock.webidl18
-rw-r--r--dom/webidl/MozWifiCapabilities.webidl46
-rw-r--r--dom/webidl/MozWifiConnectionInfoEvent.webidl43
-rw-r--r--dom/webidl/MozWifiManager.webidl347
-rw-r--r--dom/webidl/MozWifiP2pManager.webidl147
-rw-r--r--dom/webidl/MozWifiP2pStatusChangeEvent.webidl20
-rw-r--r--dom/webidl/MozWifiStationInfoEvent.webidl19
-rw-r--r--dom/webidl/MozWifiStatusChangeEvent.webidl27
-rw-r--r--dom/webidl/MutationEvent.webidl33
-rw-r--r--dom/webidl/MutationObserver.webidl74
-rw-r--r--dom/webidl/NamedNodeMap.webidl22
-rw-r--r--dom/webidl/NativeOSFileInternals.webidl21
-rw-r--r--dom/webidl/Navigator.webidl368
-rw-r--r--dom/webidl/NetDashboard.webidl77
-rw-r--r--dom/webidl/NetworkInformation.webidl25
-rw-r--r--dom/webidl/NetworkOptions.webidl109
-rw-r--r--dom/webidl/Node.webidl115
-rw-r--r--dom/webidl/NodeFilter.webidl32
-rw-r--r--dom/webidl/NodeIterator.webidl31
-rw-r--r--dom/webidl/NodeList.webidl17
-rw-r--r--dom/webidl/Notification.webidl105
-rw-r--r--dom/webidl/NotificationEvent.webidl27
-rw-r--r--dom/webidl/NotifyPaintEvent.webidl18
-rw-r--r--dom/webidl/OfflineAudioCompletionEvent.webidl19
-rw-r--r--dom/webidl/OfflineAudioContext.webidl23
-rw-r--r--dom/webidl/OfflineResourceList.webidl116
-rw-r--r--dom/webidl/OffscreenCanvas.webidl29
-rw-r--r--dom/webidl/OscillatorNode.webidl42
-rw-r--r--dom/webidl/PageTransitionEvent.webidl27
-rw-r--r--dom/webidl/PaintRequest.webidl24
-rw-r--r--dom/webidl/PaintRequestList.webidl10
-rw-r--r--dom/webidl/PannerNode.webidl61
-rw-r--r--dom/webidl/ParentNode.webidl25
-rw-r--r--dom/webidl/PeerConnectionImpl.webidl107
-rw-r--r--dom/webidl/PeerConnectionImplEnums.webidl42
-rw-r--r--dom/webidl/PeerConnectionObserver.webidl50
-rw-r--r--dom/webidl/PeerConnectionObserverEnums.webidl16
-rw-r--r--dom/webidl/Performance.webidl74
-rw-r--r--dom/webidl/PerformanceEntry.webidl22
-rw-r--r--dom/webidl/PerformanceEntryEvent.webidl27
-rw-r--r--dom/webidl/PerformanceMark.webidl13
-rw-r--r--dom/webidl/PerformanceMeasure.webidl13
-rw-r--r--dom/webidl/PerformanceNavigation.webidl23
-rw-r--r--dom/webidl/PerformanceObserver.webidl23
-rw-r--r--dom/webidl/PerformanceObserverEntryList.webidl24
-rw-r--r--dom/webidl/PerformanceResourceTiming.webidl40
-rw-r--r--dom/webidl/PerformanceTiming.webidl38
-rw-r--r--dom/webidl/PeriodicWave.webidl17
-rw-r--r--dom/webidl/PermissionSettings.webidl20
-rw-r--r--dom/webidl/PermissionStatus.webidl20
-rw-r--r--dom/webidl/Permissions.webidl30
-rw-r--r--dom/webidl/Plugin.webidl19
-rw-r--r--dom/webidl/PluginArray.webidl17
-rw-r--r--dom/webidl/PluginCrashedEvent.webidl28
-rw-r--r--dom/webidl/PointerEvent.webidl37
-rw-r--r--dom/webidl/PopStateEvent.webidl16
-rw-r--r--dom/webidl/PopupBlockedEvent.webidl23
-rw-r--r--dom/webidl/PopupBoxObject.webidl191
-rw-r--r--dom/webidl/Position.webidl17
-rw-r--r--dom/webidl/PositionError.webidl20
-rw-r--r--dom/webidl/Presentation.webidl30
-rw-r--r--dom/webidl/PresentationAvailability.webidl22
-rw-r--r--dom/webidl/PresentationConnection.webidl96
-rw-r--r--dom/webidl/PresentationConnectionAvailableEvent.webidl22
-rw-r--r--dom/webidl/PresentationConnectionCloseEvent.webidl41
-rw-r--r--dom/webidl/PresentationConnectionList.webidl25
-rw-r--r--dom/webidl/PresentationDeviceInfoManager.webidl26
-rw-r--r--dom/webidl/PresentationReceiver.webidl18
-rw-r--r--dom/webidl/PresentationRequest.webidl86
-rw-r--r--dom/webidl/ProcessingInstruction.webidl15
-rw-r--r--dom/webidl/ProfileTimelineMarker.webidl74
-rw-r--r--dom/webidl/ProgressEvent.webidl20
-rw-r--r--dom/webidl/Promise.webidl77
-rw-r--r--dom/webidl/PromiseDebugging.webidl152
-rw-r--r--dom/webidl/PushEvent.webidl21
-rw-r--r--dom/webidl/PushManager.webidl41
-rw-r--r--dom/webidl/PushMessageData.webidl21
-rw-r--r--dom/webidl/PushSubscription.webidl53
-rw-r--r--dom/webidl/PushSubscriptionOptions.webidl15
-rw-r--r--dom/webidl/RGBColor.webidl17
-rw-r--r--dom/webidl/RTCCertificate.webidl17
-rw-r--r--dom/webidl/RTCConfiguration.webidl40
-rw-r--r--dom/webidl/RTCDTMFSender.webidl17
-rw-r--r--dom/webidl/RTCDTMFToneChangeEvent.webidl8
-rw-r--r--dom/webidl/RTCDataChannelEvent.webidl20
-rw-r--r--dom/webidl/RTCIceCandidate.webidl25
-rw-r--r--dom/webidl/RTCIdentityAssertion.webidl13
-rw-r--r--dom/webidl/RTCIdentityProvider.webidl57
-rw-r--r--dom/webidl/RTCPeerConnection.webidl184
-rw-r--r--dom/webidl/RTCPeerConnectionIceEvent.webidl19
-rw-r--r--dom/webidl/RTCPeerConnectionStatic.webidl39
-rw-r--r--dom/webidl/RTCRtpReceiver.webidl14
-rw-r--r--dom/webidl/RTCRtpSender.webidl78
-rw-r--r--dom/webidl/RTCSessionDescription.webidl30
-rw-r--r--dom/webidl/RTCStatsReport.webidl177
-rw-r--r--dom/webidl/RTCTrackEvent.webidl27
-rw-r--r--dom/webidl/RadioNodeList.webidl16
-rw-r--r--dom/webidl/Range.webidl98
-rw-r--r--dom/webidl/RecordErrorEvent.webidl16
-rw-r--r--dom/webidl/Rect.webidl12
-rw-r--r--dom/webidl/Request.webidl66
-rw-r--r--dom/webidl/Response.webidl39
-rw-r--r--dom/webidl/SVGAElement.webidl21
-rw-r--r--dom/webidl/SVGAngle.webidl35
-rw-r--r--dom/webidl/SVGAnimateElement.webidl15
-rw-r--r--dom/webidl/SVGAnimateMotionElement.webidl15
-rw-r--r--dom/webidl/SVGAnimateTransformElement.webidl15
-rw-r--r--dom/webidl/SVGAnimatedAngle.webidl19
-rw-r--r--dom/webidl/SVGAnimatedBoolean.webidl17
-rw-r--r--dom/webidl/SVGAnimatedEnumeration.webidl17
-rw-r--r--dom/webidl/SVGAnimatedInteger.webidl16
-rw-r--r--dom/webidl/SVGAnimatedLength.webidl19
-rw-r--r--dom/webidl/SVGAnimatedLengthList.webidl19
-rw-r--r--dom/webidl/SVGAnimatedNumber.webidl16
-rw-r--r--dom/webidl/SVGAnimatedNumberList.webidl19
-rw-r--r--dom/webidl/SVGAnimatedPathData.webidl20
-rw-r--r--dom/webidl/SVGAnimatedPoints.webidl20
-rw-r--r--dom/webidl/SVGAnimatedPreserveAspectRatio.webidl19
-rw-r--r--dom/webidl/SVGAnimatedRect.webidl16
-rw-r--r--dom/webidl/SVGAnimatedString.webidl16
-rw-r--r--dom/webidl/SVGAnimatedTransformList.webidl19
-rw-r--r--dom/webidl/SVGAnimationElement.webidl34
-rw-r--r--dom/webidl/SVGCircleElement.webidl21
-rw-r--r--dom/webidl/SVGClipPathElement.webidl21
-rw-r--r--dom/webidl/SVGComponentTransferFunctionElement.webidl36
-rw-r--r--dom/webidl/SVGDefsElement.webidl15
-rw-r--r--dom/webidl/SVGDescElement.webidl15
-rw-r--r--dom/webidl/SVGElement.webidl37
-rw-r--r--dom/webidl/SVGEllipseElement.webidl23
-rw-r--r--dom/webidl/SVGFEBlendElement.webidl41
-rw-r--r--dom/webidl/SVGFEColorMatrixElement.webidl30
-rw-r--r--dom/webidl/SVGFEComponentTransferElement.webidl18
-rw-r--r--dom/webidl/SVGFECompositeElement.webidl40
-rw-r--r--dom/webidl/SVGFEConvolveMatrixElement.webidl47
-rw-r--r--dom/webidl/SVGFEDiffuseLightingElement.webidl26
-rw-r--r--dom/webidl/SVGFEDisplacementMapElement.webidl34
-rw-r--r--dom/webidl/SVGFEDistantLightElement.webidl18
-rw-r--r--dom/webidl/SVGFEDropShadowElement.webidl28
-rw-r--r--dom/webidl/SVGFEFloodElement.webidl16
-rw-r--r--dom/webidl/SVGFEFuncAElement.webidl14
-rw-r--r--dom/webidl/SVGFEFuncBElement.webidl14
-rw-r--r--dom/webidl/SVGFEFuncGElement.webidl14
-rw-r--r--dom/webidl/SVGFEFuncRElement.webidl14
-rw-r--r--dom/webidl/SVGFEGaussianBlurElement.webidl24
-rw-r--r--dom/webidl/SVGFEImageElement.webidl19
-rw-r--r--dom/webidl/SVGFEMergeElement.webidl16
-rw-r--r--dom/webidl/SVGFEMergeNodeElement.webidl16
-rw-r--r--dom/webidl/SVGFEMorphologyElement.webidl30
-rw-r--r--dom/webidl/SVGFEOffsetElement.webidl22
-rw-r--r--dom/webidl/SVGFEPointLightElement.webidl20
-rw-r--r--dom/webidl/SVGFESpecularLightingElement.webidl28
-rw-r--r--dom/webidl/SVGFESpotLightElement.webidl30
-rw-r--r--dom/webidl/SVGFETileElement.webidl18
-rw-r--r--dom/webidl/SVGFETurbulenceElement.webidl39
-rw-r--r--dom/webidl/SVGFilterElement.webidl32
-rw-r--r--dom/webidl/SVGFilterPrimitiveStandardAttributes.webidl25
-rw-r--r--dom/webidl/SVGFitToViewBox.webidl20
-rw-r--r--dom/webidl/SVGForeignObjectElement.webidl23
-rw-r--r--dom/webidl/SVGGElement.webidl15
-rw-r--r--dom/webidl/SVGGradientElement.webidl30
-rw-r--r--dom/webidl/SVGGraphicsElement.webidl36
-rw-r--r--dom/webidl/SVGImageElement.webidl28
-rw-r--r--dom/webidl/SVGLength.webidl40
-rw-r--r--dom/webidl/SVGLengthList.webidl32
-rw-r--r--dom/webidl/SVGLineElement.webidl23
-rw-r--r--dom/webidl/SVGLinearGradientElement.webidl22
-rw-r--r--dom/webidl/SVGMPathElement.webidl17
-rw-r--r--dom/webidl/SVGMarkerElement.webidl46
-rw-r--r--dom/webidl/SVGMaskElement.webidl34
-rw-r--r--dom/webidl/SVGMatrix.webidl51
-rw-r--r--dom/webidl/SVGMetadataElement.webidl15
-rw-r--r--dom/webidl/SVGNumber.webidl18
-rw-r--r--dom/webidl/SVGNumberList.webidl32
-rw-r--r--dom/webidl/SVGPathElement.webidl62
-rw-r--r--dom/webidl/SVGPathSeg.webidl215
-rw-r--r--dom/webidl/SVGPathSegList.webidl32
-rw-r--r--dom/webidl/SVGPatternElement.webidl32
-rw-r--r--dom/webidl/SVGPoint.webidl23
-rw-r--r--dom/webidl/SVGPointList.webidl32
-rw-r--r--dom/webidl/SVGPolygonElement.webidl17
-rw-r--r--dom/webidl/SVGPolylineElement.webidl17
-rw-r--r--dom/webidl/SVGPreserveAspectRatio.webidl38
-rw-r--r--dom/webidl/SVGRadialGradientElement.webidl25
-rw-r--r--dom/webidl/SVGRect.webidl22
-rw-r--r--dom/webidl/SVGRectElement.webidl27
-rw-r--r--dom/webidl/SVGSVGElement.webidl80
-rw-r--r--dom/webidl/SVGScriptElement.webidl23
-rw-r--r--dom/webidl/SVGSetElement.webidl15
-rw-r--r--dom/webidl/SVGStopElement.webidl17
-rw-r--r--dom/webidl/SVGStringList.webidl32
-rw-r--r--dom/webidl/SVGStyleElement.webidl26
-rw-r--r--dom/webidl/SVGSwitchElement.webidl15
-rw-r--r--dom/webidl/SVGSymbolElement.webidl17
-rw-r--r--dom/webidl/SVGTSpanElement.webidl15
-rw-r--r--dom/webidl/SVGTests.webidl22
-rw-r--r--dom/webidl/SVGTextContentElement.webidl42
-rw-r--r--dom/webidl/SVGTextElement.webidl15
-rw-r--r--dom/webidl/SVGTextPathElement.webidl34
-rw-r--r--dom/webidl/SVGTextPositioningElement.webidl25
-rw-r--r--dom/webidl/SVGTitleElement.webidl15
-rw-r--r--dom/webidl/SVGTransform.webidl41
-rw-r--r--dom/webidl/SVGTransformList.webidl35
-rw-r--r--dom/webidl/SVGURIReference.webidl18
-rw-r--r--dom/webidl/SVGUnitTypeValues.webidl19
-rw-r--r--dom/webidl/SVGUnitTypes.webidl16
-rw-r--r--dom/webidl/SVGUseElement.webidl26
-rw-r--r--dom/webidl/SVGViewElement.webidl19
-rw-r--r--dom/webidl/SVGZoomAndPan.webidl16
-rw-r--r--dom/webidl/SVGZoomAndPanValues.webidl24
-rw-r--r--dom/webidl/SVGZoomEvent.webidl25
-rw-r--r--dom/webidl/Screen.webidl61
-rw-r--r--dom/webidl/ScreenOrientation.webidl42
-rw-r--r--dom/webidl/ScriptProcessorNode.webidl24
-rw-r--r--dom/webidl/ScrollAreaEvent.webidl23
-rw-r--r--dom/webidl/ScrollBoxObject.webidl70
-rw-r--r--dom/webidl/ScrollViewChangeEvent.webidl17
-rw-r--r--dom/webidl/SecureElement.webidl158
-rw-r--r--dom/webidl/SecureElementManager.webidl22
-rw-r--r--dom/webidl/Selection.webidl88
-rw-r--r--dom/webidl/ServiceWorker.webidl35
-rw-r--r--dom/webidl/ServiceWorkerContainer.webidl45
-rw-r--r--dom/webidl/ServiceWorkerGlobalScope.webidl36
-rw-r--r--dom/webidl/ServiceWorkerMessageEvent.webidl48
-rw-r--r--dom/webidl/ServiceWorkerRegistration.webidl33
-rw-r--r--dom/webidl/SettingChangeNotification.webidl12
-rw-r--r--dom/webidl/SettingsManager.webidl42
-rw-r--r--dom/webidl/ShadowRoot.webidl27
-rw-r--r--dom/webidl/SharedWorker.webidl12
-rw-r--r--dom/webidl/SharedWorkerGlobalScope.webidl20
-rw-r--r--dom/webidl/SimpleGestureEvent.webidl46
-rw-r--r--dom/webidl/SocketCommon.webidl16
-rw-r--r--dom/webidl/SourceBuffer.webidl49
-rw-r--r--dom/webidl/SourceBufferList.webidl19
-rw-r--r--dom/webidl/SpeechGrammar.webidl22
-rw-r--r--dom/webidl/SpeechGrammarList.webidl23
-rw-r--r--dom/webidl/SpeechRecognition.webidl45
-rw-r--r--dom/webidl/SpeechRecognitionAlternative.webidl18
-rw-r--r--dom/webidl/SpeechRecognitionError.webidl31
-rw-r--r--dom/webidl/SpeechRecognitionEvent.webidl25
-rw-r--r--dom/webidl/SpeechRecognitionResult.webidl19
-rw-r--r--dom/webidl/SpeechRecognitionResultList.webidl18
-rw-r--r--dom/webidl/SpeechSynthesis.webidl32
-rw-r--r--dom/webidl/SpeechSynthesisErrorEvent.webidl36
-rw-r--r--dom/webidl/SpeechSynthesisEvent.webidl29
-rw-r--r--dom/webidl/SpeechSynthesisUtterance.webidl34
-rw-r--r--dom/webidl/SpeechSynthesisVoice.webidl20
-rw-r--r--dom/webidl/StereoPannerNode.webidl20
-rw-r--r--dom/webidl/Storage.webidl35
-rw-r--r--dom/webidl/StorageEvent.webidl40
-rw-r--r--dom/webidl/StorageManager.webidl25
-rw-r--r--dom/webidl/StorageType.webidl7
-rw-r--r--dom/webidl/StyleRuleChangeEvent.webidl19
-rw-r--r--dom/webidl/StyleSheet.webidl29
-rw-r--r--dom/webidl/StyleSheetApplicableStateChangeEvent.webidl18
-rw-r--r--dom/webidl/StyleSheetChangeEvent.webidl18
-rw-r--r--dom/webidl/StyleSheetList.webidl8
-rw-r--r--dom/webidl/SubtleCrypto.webidl232
-rw-r--r--dom/webidl/SystemUpdate.webidl48
-rw-r--r--dom/webidl/TCPServerSocket.webidl42
-rw-r--r--dom/webidl/TCPServerSocketEvent.webidl15
-rw-r--r--dom/webidl/TCPSocket.webidl210
-rw-r--r--dom/webidl/TCPSocketErrorEvent.webidl24
-rw-r--r--dom/webidl/TCPSocketEvent.webidl30
-rw-r--r--dom/webidl/TestFunctions.webidl41
-rw-r--r--dom/webidl/TestInterfaceJS.webidl84
-rw-r--r--dom/webidl/TestInterfaceJSDictionaries.webidl27
-rw-r--r--dom/webidl/TestInterfaceJSMaplikeSetlikeIterable.webidl68
-rw-r--r--dom/webidl/Text.webidl21
-rw-r--r--dom/webidl/TextClause.webidl21
-rw-r--r--dom/webidl/TextDecoder.webidl31
-rw-r--r--dom/webidl/TextEncoder.webidl20
-rw-r--r--dom/webidl/TextTrack.webidl48
-rw-r--r--dom/webidl/TextTrackCue.webidl20
-rw-r--r--dom/webidl/TextTrackCueList.webidl14
-rw-r--r--dom/webidl/TextTrackList.webidl24
-rw-r--r--dom/webidl/ThreadSafeChromeUtils.webidl140
-rw-r--r--dom/webidl/TimeEvent.webidl20
-rw-r--r--dom/webidl/TimeRanges.webidl22
-rw-r--r--dom/webidl/Touch.webidl43
-rw-r--r--dom/webidl/TouchEvent.webidl37
-rw-r--r--dom/webidl/TouchList.webidl18
-rw-r--r--dom/webidl/TrackEvent.webidl19
-rw-r--r--dom/webidl/TransitionEvent.webidl25
-rw-r--r--dom/webidl/TreeBoxObject.webidl207
-rw-r--r--dom/webidl/TreeColumn.webidl36
-rw-r--r--dom/webidl/TreeColumns.webidl54
-rw-r--r--dom/webidl/TreeWalker.webidl37
-rw-r--r--dom/webidl/U2F.webidl96
-rw-r--r--dom/webidl/UDPMessageEvent.webidl24
-rw-r--r--dom/webidl/UDPSocket.webidl40
-rw-r--r--dom/webidl/UIEvent.webidl64
-rw-r--r--dom/webidl/URL.webidl72
-rw-r--r--dom/webidl/URLSearchParams.webidl28
-rw-r--r--dom/webidl/UserProximityEvent.webidl16
-rw-r--r--dom/webidl/VRDisplay.webidl286
-rw-r--r--dom/webidl/VTTCue.webidl71
-rw-r--r--dom/webidl/VTTRegion.webidl27
-rw-r--r--dom/webidl/ValidityState.webidl26
-rw-r--r--dom/webidl/VideoPlaybackQuality.webidl21
-rw-r--r--dom/webidl/VideoStreamTrack.webidl19
-rw-r--r--dom/webidl/VideoTrack.webidl17
-rw-r--r--dom/webidl/VideoTrackList.webidl21
-rw-r--r--dom/webidl/WaveShaperNode.webidl30
-rw-r--r--dom/webidl/WebComponents.webidl28
-rw-r--r--dom/webidl/WebGL2RenderingContext.webidl701
-rw-r--r--dom/webidl/WebGLContextEvent.webidl20
-rw-r--r--dom/webidl/WebGLRenderingContext.webidl1048
-rw-r--r--dom/webidl/WebKitCSSMatrix.webidl39
-rw-r--r--dom/webidl/WebSocket.webidl77
-rw-r--r--dom/webidl/WebrtcDeprecated.webidl29
-rw-r--r--dom/webidl/WebrtcGlobalInformation.webidl39
-rw-r--r--dom/webidl/WheelEvent.webidl33
-rw-r--r--dom/webidl/WidevineCDMManifest.webidl15
-rw-r--r--dom/webidl/WifiOptions.webidl38
-rw-r--r--dom/webidl/Window.webidl521
-rw-r--r--dom/webidl/WindowOrWorkerGlobalScope.webidl83
-rw-r--r--dom/webidl/WindowRoot.webidl9
-rw-r--r--dom/webidl/Worker.webidl33
-rw-r--r--dom/webidl/WorkerDebuggerGlobalScope.webidl40
-rw-r--r--dom/webidl/WorkerGlobalScope.webidl52
-rw-r--r--dom/webidl/WorkerLocation.webidl33
-rw-r--r--dom/webidl/WorkerNavigator.webidl14
-rw-r--r--dom/webidl/Worklet.webidl14
-rw-r--r--dom/webidl/WorkletGlobalScope.webidl17
-rw-r--r--dom/webidl/XMLDocument.webidl23
-rw-r--r--dom/webidl/XMLHttpRequest.webidl160
-rw-r--r--dom/webidl/XMLHttpRequestEventTarget.webidl29
-rw-r--r--dom/webidl/XMLHttpRequestUpload.webidl16
-rw-r--r--dom/webidl/XMLSerializer.webidl20
-rw-r--r--dom/webidl/XMLStylesheetProcessingInstruction.webidl9
-rw-r--r--dom/webidl/XPathEvaluator.webidl19
-rw-r--r--dom/webidl/XPathExpression.webidl22
-rw-r--r--dom/webidl/XPathNSResolver.webidl10
-rw-r--r--dom/webidl/XPathResult.webidl38
-rw-r--r--dom/webidl/XSLTProcessor.webidl109
-rw-r--r--dom/webidl/XULCommandEvent.webidl27
-rw-r--r--dom/webidl/XULDocument.webidl57
-rw-r--r--dom/webidl/XULElement.webidl141
-rw-r--r--dom/webidl/moz.build788
683 files changed, 31236 insertions, 0 deletions
diff --git a/dom/webidl/APZTestData.webidl b/dom/webidl/APZTestData.webidl
new file mode 100644
index 000000000..227f4b0b9
--- /dev/null
+++ b/dom/webidl/APZTestData.webidl
@@ -0,0 +1,47 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/*
+ * This file declares data structures used to communicate data logged by
+ * various components for the purpose of APZ testing (see bug 961289 and
+ * gfx/layers/apz/test/APZTestData.h) to JS test code.
+ */
+
+// A single key-value pair in the data.
+dictionary ScrollFrameDataEntry {
+ DOMString key;
+ DOMString value;
+};
+
+// All the key-value pairs associated with a given scrollable frame.
+// The scrollable frame is identified by a scroll id.
+dictionary ScrollFrameData {
+ unsigned long long scrollId;
+ sequence<ScrollFrameDataEntry> entries;
+};
+
+// All the scrollable frames associated with a given paint or repaint request.
+// The paint or repaint request is identified by a sequence number.
+dictionary APZBucket {
+ unsigned long sequenceNumber;
+ sequence<ScrollFrameData> scrollFrames;
+};
+
+// All the paints and repaint requests. This is the top-level data structure.
+dictionary APZTestData {
+ sequence<APZBucket> paints;
+ sequence<APZBucket> repaintRequests;
+};
+
+// A frame uniformity measurement for every scrollable layer
+dictionary FrameUniformity {
+ unsigned long layerAddress;
+ float frameUniformity;
+};
+
+dictionary FrameUniformityResults {
+ sequence<FrameUniformity> layerUniformities;
+};
diff --git a/dom/webidl/AbstractWorker.webidl b/dom/webidl/AbstractWorker.webidl
new file mode 100644
index 000000000..7ea6e367b
--- /dev/null
+++ b/dom/webidl/AbstractWorker.webidl
@@ -0,0 +1,10 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[NoInterfaceObject, Exposed=(Window,Worker,System)]
+interface AbstractWorker {
+ attribute EventHandler onerror;
+};
diff --git a/dom/webidl/AccessibleNode.webidl b/dom/webidl/AccessibleNode.webidl
new file mode 100644
index 000000000..42bc93aa9
--- /dev/null
+++ b/dom/webidl/AccessibleNode.webidl
@@ -0,0 +1,11 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Pref="accessibility.AOM.enabled"]
+interface AccessibleNode {
+ readonly attribute DOMString role;
+ readonly attribute Node? DOMNode;
+};
diff --git a/dom/webidl/AddonEvent.webidl b/dom/webidl/AddonEvent.webidl
new file mode 100644
index 000000000..235f81ec2
--- /dev/null
+++ b/dom/webidl/AddonEvent.webidl
@@ -0,0 +1,12 @@
+[ Func="mozilla::AddonManagerWebAPI::IsAPIEnabled",
+ Constructor(DOMString type, AddonEventInit eventInitDict)]
+interface AddonEvent : Event {
+ readonly attribute DOMString id;
+ readonly attribute boolean needsRestart;
+};
+
+dictionary AddonEventInit : EventInit {
+ required DOMString id;
+ required boolean needsRestart;
+};
+
diff --git a/dom/webidl/AddonManager.webidl b/dom/webidl/AddonManager.webidl
new file mode 100644
index 000000000..02c7953e6
--- /dev/null
+++ b/dom/webidl/AddonManager.webidl
@@ -0,0 +1,91 @@
+/* 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/.
+ */
+
+/* We need a JSImplementation but cannot get one without a contract ID.
+ Since Addon and AddonInstall are only ever created from JS they don't need
+ real contract IDs. */
+[ChromeOnly, JSImplementation="dummy"]
+interface Addon {
+ // The add-on's ID.
+ readonly attribute DOMString id;
+ // The add-on's version.
+ readonly attribute DOMString version;
+ // The add-on's type (extension, theme, etc.).
+ readonly attribute DOMString type;
+ // The add-on's name in the current locale.
+ readonly attribute DOMString name;
+ // The add-on's description in the current locale.
+ readonly attribute DOMString description;
+ // If the user has enabled this add-on, note that it still may not be running
+ // depending on whether enabling requires a restart or if the add-on is
+ // incompatible in some way.
+ readonly attribute boolean isEnabled;
+ // If the add-on is currently active in the browser.
+ readonly attribute boolean isActive;
+ // If the add-on may be uninstalled
+ readonly attribute boolean canUninstall;
+
+ Promise<boolean> uninstall();
+ Promise<void> setEnabled(boolean value);
+};
+
+[ChromeOnly, JSImplementation="dummy"]
+interface AddonInstall : EventTarget {
+ // One of the STATE_* symbols from AddonManager.jsm
+ readonly attribute DOMString state;
+ // One of the ERROR_* symbols from AddonManager.jsm, or null
+ readonly attribute DOMString? error;
+ // How many bytes have been downloaded
+ readonly attribute long long progress;
+ // How many total bytes will need to be downloaded or -1 if unknown
+ readonly attribute long long maxProgress;
+
+ Promise<void> install();
+ Promise<void> cancel();
+};
+
+dictionary addonInstallOptions {
+ required DOMString url;
+ // If a non-empty string is passed for "hash", it is used to verify the
+ // checksum of the downloaded XPI before installing. If is omitted or if
+ // it is null or empty string, no checksum verification is performed.
+ DOMString? hash = null;
+};
+
+[HeaderFile="mozilla/AddonManagerWebAPI.h",
+ Func="mozilla::AddonManagerWebAPI::IsAPIEnabled",
+ NavigatorProperty="mozAddonManager",
+ JSImplementation="@mozilla.org/addon-web-api/manager;1"]
+interface AddonManager : EventTarget {
+ /**
+ * Gets information about an add-on
+ *
+ * @param id
+ * The ID of the add-on to test for.
+ * @return A promise. It will resolve to an Addon if the add-on is installed.
+ */
+ Promise<Addon> getAddonByID(DOMString id);
+
+ /**
+ * Creates an AddonInstall object for a given URL.
+ *
+ * @param options
+ * Only one supported option: 'url', the URL of the addon to install.
+ * @return A promise that resolves to an instance of AddonInstall.
+ */
+ Promise<AddonInstall> createInstall(optional addonInstallOptions options);
+
+ /* Hooks for managing event listeners */
+ [ChromeOnly]
+ void eventListenerWasAdded(DOMString type);
+ [ChromeOnly]
+ void eventListenerWasRemoved(DOMString type);
+};
+
+[ChromeOnly,Exposed=System,HeaderFile="mozilla/AddonManagerWebAPI.h"]
+interface AddonManagerPermissions {
+ static boolean isHostPermitted(DOMString host);
+};
+
diff --git a/dom/webidl/AnalyserNode.webidl b/dom/webidl/AnalyserNode.webidl
new file mode 100644
index 000000000..5b4be8822
--- /dev/null
+++ b/dom/webidl/AnalyserNode.webidl
@@ -0,0 +1,41 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface AnalyserNode : AudioNode {
+
+ // Real-time frequency-domain data
+ void getFloatFrequencyData(Float32Array array);
+ void getByteFrequencyData(Uint8Array array);
+
+ // Real-time waveform data
+ void getFloatTimeDomainData(Float32Array array);
+ void getByteTimeDomainData(Uint8Array array);
+
+ [SetterThrows, Pure]
+ attribute unsigned long fftSize;
+ [Pure]
+ readonly attribute unsigned long frequencyBinCount;
+
+ [SetterThrows, Pure]
+ attribute double minDecibels;
+ [SetterThrows, Pure]
+ attribute double maxDecibels;
+
+ [SetterThrows, Pure]
+ attribute double smoothingTimeConstant;
+
+};
+
+// Mozilla extension
+AnalyserNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/Animatable.webidl b/dom/webidl/Animatable.webidl
new file mode 100644
index 000000000..4c1396c99
--- /dev/null
+++ b/dom/webidl/Animatable.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/fxtf/web-animations/#the-animatable-interface
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+dictionary KeyframeAnimationOptions : KeyframeEffectOptions {
+ DOMString id = "";
+};
+
+dictionary AnimationFilter {
+ boolean subtree = false;
+};
+
+[NoInterfaceObject]
+interface Animatable {
+ [Func="nsDocument::IsElementAnimateEnabled", Throws]
+ Animation animate(object? keyframes,
+ optional UnrestrictedDoubleOrKeyframeAnimationOptions options);
+ [Func="nsDocument::IsWebAnimationsEnabled"]
+ sequence<Animation> getAnimations(optional AnimationFilter filter);
+};
diff --git a/dom/webidl/Animation.webidl b/dom/webidl/Animation.webidl
new file mode 100644
index 000000000..615084f75
--- /dev/null
+++ b/dom/webidl/Animation.webidl
@@ -0,0 +1,52 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c.github.io/web-animations/#the-animation-interface
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" };
+
+[Func="nsDocument::IsElementAnimateEnabled",
+ Constructor (optional AnimationEffectReadOnly? effect = null,
+ optional AnimationTimeline? timeline)]
+interface Animation : EventTarget {
+ attribute DOMString id;
+ [Func="nsDocument::IsWebAnimationsEnabled", Pure]
+ attribute AnimationEffectReadOnly? effect;
+ [Func="nsDocument::IsWebAnimationsEnabled"]
+ attribute AnimationTimeline? timeline;
+ [BinaryName="startTimeAsDouble"]
+ attribute double? startTime;
+ [SetterThrows, BinaryName="currentTimeAsDouble"]
+ attribute double? currentTime;
+
+ attribute double playbackRate;
+ [BinaryName="playStateFromJS"]
+ readonly attribute AnimationPlayState playState;
+ [Func="nsDocument::IsWebAnimationsEnabled", Throws]
+ readonly attribute Promise<Animation> ready;
+ [Func="nsDocument::IsWebAnimationsEnabled", Throws]
+ readonly attribute Promise<Animation> finished;
+ attribute EventHandler onfinish;
+ attribute EventHandler oncancel;
+ void cancel ();
+ [Throws]
+ void finish ();
+ [Throws, BinaryName="playFromJS"]
+ void play ();
+ [Throws, BinaryName="pauseFromJS"]
+ void pause ();
+ [Throws]
+ void reverse ();
+};
+
+// Non-standard extensions
+partial interface Animation {
+ [ChromeOnly] readonly attribute boolean isRunningOnCompositor;
+};
diff --git a/dom/webidl/AnimationEffectReadOnly.webidl b/dom/webidl/AnimationEffectReadOnly.webidl
new file mode 100644
index 000000000..063cce1f8
--- /dev/null
+++ b/dom/webidl/AnimationEffectReadOnly.webidl
@@ -0,0 +1,53 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c.github.io/web-animations/#animationeffectreadonly
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum FillMode {
+ "none",
+ "forwards",
+ "backwards",
+ "both",
+ "auto"
+};
+
+enum PlaybackDirection {
+ "normal",
+ "reverse",
+ "alternate",
+ "alternate-reverse"
+};
+
+dictionary AnimationEffectTimingProperties {
+ double delay = 0.0;
+ double endDelay = 0.0;
+ FillMode fill = "auto";
+ double iterationStart = 0.0;
+ unrestricted double iterations = 1.0;
+ (unrestricted double or DOMString) duration = "auto";
+ PlaybackDirection direction = "normal";
+ DOMString easing = "linear";
+};
+
+dictionary ComputedTimingProperties : AnimationEffectTimingProperties {
+ unrestricted double endTime = 0.0;
+ unrestricted double activeDuration = 0.0;
+ double? localTime = null;
+ double? progress = null;
+ unrestricted double? currentIteration = null;
+};
+
+[Func="nsDocument::IsWebAnimationsEnabled"]
+interface AnimationEffectReadOnly {
+ [Cached, Constant]
+ readonly attribute AnimationEffectTimingReadOnly timing;
+ [BinaryName="getComputedTimingAsDict"]
+ ComputedTimingProperties getComputedTiming();
+};
diff --git a/dom/webidl/AnimationEffectTiming.webidl b/dom/webidl/AnimationEffectTiming.webidl
new file mode 100644
index 000000000..c2d8564c7
--- /dev/null
+++ b/dom/webidl/AnimationEffectTiming.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/web-animations/#animationeffecttiming
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="nsDocument::IsWebAnimationsEnabled"]
+interface AnimationEffectTiming : AnimationEffectTimingReadOnly {
+ inherit attribute double delay;
+ inherit attribute double endDelay;
+ inherit attribute FillMode fill;
+ [SetterThrows]
+ inherit attribute double iterationStart;
+ [SetterThrows]
+ inherit attribute unrestricted double iterations;
+ [SetterThrows]
+ inherit attribute (unrestricted double or DOMString) duration;
+ inherit attribute PlaybackDirection direction;
+ [SetterThrows]
+ inherit attribute DOMString easing;
+};
diff --git a/dom/webidl/AnimationEffectTimingReadOnly.webidl b/dom/webidl/AnimationEffectTimingReadOnly.webidl
new file mode 100644
index 000000000..4aff51e01
--- /dev/null
+++ b/dom/webidl/AnimationEffectTimingReadOnly.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/web-animations/#animationeffecttimingreadonly
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="nsDocument::IsWebAnimationsEnabled"]
+interface AnimationEffectTimingReadOnly {
+ readonly attribute double delay;
+ readonly attribute double endDelay;
+ readonly attribute FillMode fill;
+ readonly attribute double iterationStart;
+ readonly attribute unrestricted double iterations;
+ readonly attribute (unrestricted double or DOMString) duration;
+ readonly attribute PlaybackDirection direction;
+ readonly attribute DOMString easing;
+};
diff --git a/dom/webidl/AnimationEvent.webidl b/dom/webidl/AnimationEvent.webidl
new file mode 100644
index 000000000..e48ed571c
--- /dev/null
+++ b/dom/webidl/AnimationEvent.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/css3-animations/#animation-events-
+ * http://dev.w3.org/csswg/css3-animations/#animation-events-
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString type, optional AnimationEventInit eventInitDict)]
+interface AnimationEvent : Event {
+ readonly attribute DOMString animationName;
+ readonly attribute float elapsedTime;
+ readonly attribute DOMString pseudoElement;
+};
+
+dictionary AnimationEventInit : EventInit {
+ DOMString animationName = "";
+ float elapsedTime = 0;
+ DOMString pseudoElement = "";
+};
diff --git a/dom/webidl/AnimationPlaybackEvent.webidl b/dom/webidl/AnimationPlaybackEvent.webidl
new file mode 100644
index 000000000..52f5f501a
--- /dev/null
+++ b/dom/webidl/AnimationPlaybackEvent.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c.github.io/web-animations/#the-animationplaybackevent-interface
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="nsDocument::IsWebAnimationsEnabled",
+ Constructor(DOMString type,
+ optional AnimationPlaybackEventInit eventInitDict)]
+interface AnimationPlaybackEvent : Event {
+ readonly attribute double? currentTime;
+ readonly attribute double? timelineTime;
+};
+
+dictionary AnimationPlaybackEventInit : EventInit {
+ double? currentTime = null;
+ double? timelineTime = null;
+};
diff --git a/dom/webidl/AnimationTimeline.webidl b/dom/webidl/AnimationTimeline.webidl
new file mode 100644
index 000000000..fe3d0fb49
--- /dev/null
+++ b/dom/webidl/AnimationTimeline.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/web-animations/#animationtimeline
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="nsDocument::IsWebAnimationsEnabled"]
+interface AnimationTimeline {
+ [BinaryName="currentTimeAsDouble"]
+ readonly attribute double? currentTime;
+};
diff --git a/dom/webidl/AnonymousContent.webidl b/dom/webidl/AnonymousContent.webidl
new file mode 100644
index 000000000..6755fe598
--- /dev/null
+++ b/dom/webidl/AnonymousContent.webidl
@@ -0,0 +1,80 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/*
+ * This file declares the AnonymousContent interface which is used to
+ * manipulate content that has been inserted into the document's canvasFrame
+ * anonymous container.
+ * See Document.insertAnonymousContent.
+ *
+ * This API never returns a reference to the actual inserted DOM node on
+ * purpose. This is to make sure the content cannot be randomly changed and the
+ * DOM cannot be traversed from the node, so that Gecko can remain in control of
+ * the inserted content.
+ */
+
+[ChromeOnly]
+interface AnonymousContent {
+ /**
+ * Get the text content of an element inside this custom anonymous content.
+ */
+ [Throws]
+ DOMString getTextContentForElement(DOMString elementId);
+
+ /**
+ * Set the text content of an element inside this custom anonymous content.
+ */
+ [Throws]
+ void setTextContentForElement(DOMString elementId, DOMString text);
+
+ /**
+ * Get the value of an attribute of an element inside this custom anonymous
+ * content.
+ */
+ [Throws]
+ DOMString? getAttributeForElement(DOMString elementId,
+ DOMString attributeName);
+
+ /**
+ * Set the value of an attribute of an element inside this custom anonymous
+ * content.
+ */
+ [Throws]
+ void setAttributeForElement(DOMString elementId,
+ DOMString attributeName,
+ DOMString value);
+
+ /**
+ * Remove an attribute from an element inside this custom anonymous content.
+ */
+ [Throws]
+ void removeAttributeForElement(DOMString elementId,
+ DOMString attributeName);
+
+ /**
+ * Get the canvas' context for the element specified if it's a <canvas>
+ * node, `null` otherwise.
+ */
+ [Throws]
+ nsISupports? getCanvasContext(DOMString elementId,
+ DOMString contextId);
+
+ [Func="nsDocument::IsElementAnimateEnabled", Throws]
+ Animation setAnimationForElement(DOMString elementId,
+ object? keyframes,
+ optional UnrestrictedDoubleOrKeyframeAnimationOptions
+ options);
+
+ /**
+ * Accepts a list of (possibly overlapping) DOMRects which describe a shape
+ * in CSS pixels relative to the element's border box. This shape will be
+ * excluded from the element's background color rendering. The element will
+ * not render any background images once this method has been called.
+ */
+ [Throws]
+ void setCutoutRectsForElement(DOMString elementId,
+ sequence<DOMRect> rects);
+};
diff --git a/dom/webidl/AppInfo.webidl b/dom/webidl/AppInfo.webidl
new file mode 100644
index 000000000..a4f44d46c
--- /dev/null
+++ b/dom/webidl/AppInfo.webidl
@@ -0,0 +1,12 @@
+/* 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/. */
+
+/**
+ * This dictionnary holds the parameters supporting the app:// protocol.
+ */
+dictionary AppInfo
+{
+ DOMString path = "";
+ boolean isCoreApp = false;
+};
diff --git a/dom/webidl/AppNotificationServiceOptions.webidl b/dom/webidl/AppNotificationServiceOptions.webidl
new file mode 100644
index 000000000..f5addc92a
--- /dev/null
+++ b/dom/webidl/AppNotificationServiceOptions.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface MozObserver;
+
+dictionary AppNotificationServiceOptions {
+ boolean textClickable = false;
+ DOMString manifestURL = "";
+ DOMString id = "";
+ DOMString dbId = "";
+ DOMString dir = "";
+ DOMString lang = "";
+ DOMString tag = "";
+ DOMString data = "";
+ NotificationBehavior mozbehavior = null;
+};
diff --git a/dom/webidl/ArchiveReader.webidl b/dom/webidl/ArchiveReader.webidl
new file mode 100644
index 000000000..028712c12
--- /dev/null
+++ b/dom/webidl/ArchiveReader.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[Pref="dom.archivereader.enabled",
+ Constructor(Blob blob, optional ArchiveReaderOptions options)]
+interface ArchiveReader {
+ ArchiveRequest getFilenames();
+ ArchiveRequest getFile(DOMString filename);
+ ArchiveRequest getFiles();
+};
+
+dictionary ArchiveReaderOptions {
+ DOMString encoding = "windows-1252"; // Default fallback encoding
+};
diff --git a/dom/webidl/ArchiveRequest.webidl b/dom/webidl/ArchiveRequest.webidl
new file mode 100644
index 000000000..24b79cf33
--- /dev/null
+++ b/dom/webidl/ArchiveRequest.webidl
@@ -0,0 +1,10 @@
+/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 et sw=2 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/. */
+
+[Pref="dom.archivereader.enabled"]
+interface ArchiveRequest : DOMRequest {
+ readonly attribute ArchiveReader reader;
+};
diff --git a/dom/webidl/Attr.webidl b/dom/webidl/Attr.webidl
new file mode 100644
index 000000000..c836afd9b
--- /dev/null
+++ b/dom/webidl/Attr.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface Attr : Node {
+ readonly attribute DOMString localName;
+ [SetterThrows]
+ attribute DOMString value;
+
+ [Constant]
+ readonly attribute DOMString name;
+ [Constant]
+ readonly attribute DOMString? namespaceURI;
+ [Constant]
+ readonly attribute DOMString? prefix;
+
+ readonly attribute boolean specified;
+};
+
+// Mozilla extensions
+
+partial interface Attr {
+ [GetterThrows]
+ readonly attribute Element? ownerElement;
+};
diff --git a/dom/webidl/AudioBuffer.webidl b/dom/webidl/AudioBuffer.webidl
new file mode 100644
index 000000000..ab45268f3
--- /dev/null
+++ b/dom/webidl/AudioBuffer.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface AudioBuffer {
+
+ readonly attribute float sampleRate;
+ readonly attribute unsigned long length;
+
+ // in seconds
+ readonly attribute double duration;
+
+ readonly attribute unsigned long numberOfChannels;
+
+ [Throws]
+ Float32Array getChannelData(unsigned long channel);
+
+ [Throws]
+ void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long startInChannel = 0);
+ [Throws]
+ void copyToChannel(Float32Array source, long channelNumber, optional unsigned long startInChannel = 0);
+};
+
diff --git a/dom/webidl/AudioBufferSourceNode.webidl b/dom/webidl/AudioBufferSourceNode.webidl
new file mode 100644
index 000000000..f74a968ec
--- /dev/null
+++ b/dom/webidl/AudioBufferSourceNode.webidl
@@ -0,0 +1,35 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface AudioBufferSourceNode : AudioNode {
+
+ attribute AudioBuffer? buffer;
+
+ readonly attribute AudioParam playbackRate;
+ readonly attribute AudioParam detune;
+
+ attribute boolean loop;
+ attribute double loopStart;
+ attribute double loopEnd;
+
+ [Throws, UnsafeInPrerendering]
+ void start(optional double when = 0, optional double grainOffset = 0,
+ optional double grainDuration);
+ [Throws, UnsafeInPrerendering]
+ void stop(optional double when = 0);
+
+ attribute EventHandler onended;
+};
+
+// Mozilla extensions
+AudioBufferSourceNode implements AudioNodePassThrough;
diff --git a/dom/webidl/AudioChannel.webidl b/dom/webidl/AudioChannel.webidl
new file mode 100644
index 000000000..6e0ccf0b9
--- /dev/null
+++ b/dom/webidl/AudioChannel.webidl
@@ -0,0 +1,50 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+// AudioChannels are used by:
+// * HTMLMediaElement
+// * AudioContext (WebAudio)
+// When used, it has to throw an exception if the app tries to change the audio
+// channel type without the permission (manifest file for B2G apps).
+// The supported values are:
+// * normal (default value)
+// Automatically paused if "notification" or higher priority channel
+// is played
+// Use case: normal applications
+// * content
+// Automatically paused if "notification" or higher priority channel
+// is played. Also paused if another app starts using "content"
+// channel. Using this channel never affects applications using
+// the "normal" channel.
+// Use case: video/audio players
+// * notification
+// Automatically paused if "alarm" or higher priority channel is played.
+// Use case: New email, incoming SMS
+// * alarm
+// Automatically paused if "telephony" or higher priority channel is
+// played.
+// User case: Alarm clock, calendar alarms
+// * telephony
+// Automatically paused if "ringer" or higher priority
+// channel is played.
+// Use case: dialer, voip
+// * ringer
+// Automatically paused if "publicnotification" or higher priority
+// channel is played.
+// Use case: dialer, voip
+// * publicnotification
+// Always plays in speaker, even when headphones are plugged in.
+// Use case: Camera shutter sound.
+enum AudioChannel {
+ "normal",
+ "content",
+ "notification",
+ "alarm",
+ "telephony",
+ "ringer",
+ "publicnotification",
+ "system"
+};
diff --git a/dom/webidl/AudioChannelManager.webidl b/dom/webidl/AudioChannelManager.webidl
new file mode 100644
index 000000000..86bfd65da
--- /dev/null
+++ b/dom/webidl/AudioChannelManager.webidl
@@ -0,0 +1,37 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface AudioChannelManager : EventTarget {
+ /**
+ * Indicates whether the headphones are plugged in or not.
+ */
+ readonly attribute boolean headphones;
+
+ /**
+ * Fired when the headphones are plugged or unplugged.
+ *
+ * When the headphones are unplugged, we may start playing audio through the
+ * system's speakers. Similarly, when headphones are plugged in, we may
+ * switch audio from speakers to headphones.
+ *
+ * If audio is currently playing in this window or in one of its children, we
+ * will fire this event before we switch the audio output from headphones to
+ * speakers (or vice versa). This allows you to, for example, pause your
+ * window's audio when the headphones are unplugged.
+ */
+ attribute EventHandler onheadphoneschange;
+
+ /**
+ * Indicates which audio channel is used to adjust volume when pressing HW
+ * volume keys.
+ */
+ attribute DOMString volumeControlChannel;
+
+ [Pure, Cached, Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ readonly attribute sequence<BrowserElementAudioChannel> allowedAudioChannels;
+};
diff --git a/dom/webidl/AudioContext.webidl b/dom/webidl/AudioContext.webidl
new file mode 100644
index 000000000..c2f65abaf
--- /dev/null
+++ b/dom/webidl/AudioContext.webidl
@@ -0,0 +1,122 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+callback DecodeSuccessCallback = void (AudioBuffer decodedData);
+callback DecodeErrorCallback = void ();
+
+enum AudioContextState {
+ "suspended",
+ "running",
+ "closed"
+};
+
+dictionary PeriodicWaveConstraints {
+ boolean disableNormalization = false;
+};
+
+[Constructor,
+ Constructor(AudioChannel audioChannelType),
+ Pref="dom.webaudio.enabled"]
+interface AudioContext : EventTarget {
+
+ readonly attribute AudioDestinationNode destination;
+ readonly attribute float sampleRate;
+ readonly attribute double currentTime;
+ readonly attribute AudioListener listener;
+ readonly attribute AudioContextState state;
+ [Throws]
+ Promise<void> suspend();
+ [Throws]
+ Promise<void> resume();
+ [Throws]
+ Promise<void> close();
+ attribute EventHandler onstatechange;
+
+ [NewObject, Throws]
+ AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long length, float sampleRate);
+
+ [Throws]
+ Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData,
+ optional DecodeSuccessCallback successCallback,
+ optional DecodeErrorCallback errorCallback);
+
+ // AudioNode creation
+ [NewObject, Throws]
+ AudioBufferSourceNode createBufferSource();
+
+ [NewObject, Throws]
+ ConstantSourceNode createConstantSource();
+
+ [NewObject, Throws]
+ MediaStreamAudioDestinationNode createMediaStreamDestination();
+
+ [NewObject, Throws]
+ ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0,
+ optional unsigned long numberOfInputChannels = 2,
+ optional unsigned long numberOfOutputChannels = 2);
+
+ [NewObject, Throws]
+ StereoPannerNode createStereoPanner();
+ [NewObject, Throws]
+ AnalyserNode createAnalyser();
+ [NewObject, Throws, UnsafeInPrerendering]
+ MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
+ [NewObject, Throws, UnsafeInPrerendering]
+ MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
+ [NewObject, Throws]
+ GainNode createGain();
+ [NewObject, Throws]
+ DelayNode createDelay(optional double maxDelayTime = 1);
+ [NewObject, Throws]
+ BiquadFilterNode createBiquadFilter();
+ [NewObject, Throws]
+ IIRFilterNode createIIRFilter(sequence<double> feedforward, sequence<double> feedback);
+ [NewObject, Throws]
+ WaveShaperNode createWaveShaper();
+ [NewObject, Throws]
+ PannerNode createPanner();
+ [NewObject, Throws]
+ ConvolverNode createConvolver();
+
+ [NewObject, Throws]
+ ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6);
+ [NewObject, Throws]
+ ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6);
+
+ [NewObject, Throws]
+ DynamicsCompressorNode createDynamicsCompressor();
+
+ [NewObject, Throws]
+ OscillatorNode createOscillator();
+ [NewObject, Throws]
+ PeriodicWave createPeriodicWave(Float32Array real, Float32Array imag, optional PeriodicWaveConstraints constraints);
+
+};
+
+// Mozilla extensions
+partial interface AudioContext {
+ // Read AudioChannel.webidl for more information about this attribute.
+ [Pref="media.useAudioChannelAPI"]
+ readonly attribute AudioChannel mozAudioChannelType;
+
+ // These 2 events are dispatched when the AudioContext object is muted by
+ // the AudioChannelService. It's call 'interrupt' because when this event is
+ // dispatched on a HTMLMediaElement, the audio stream is paused.
+ [Pref="media.useAudioChannelAPI"]
+ attribute EventHandler onmozinterruptbegin;
+
+ [Pref="media.useAudioChannelAPI"]
+ attribute EventHandler onmozinterruptend;
+
+ // This method is for test only.
+ [ChromeOnly] AudioChannel testAudioChannelInAudioNodeStream();
+};
diff --git a/dom/webidl/AudioDestinationNode.webidl b/dom/webidl/AudioDestinationNode.webidl
new file mode 100644
index 000000000..e5c6db868
--- /dev/null
+++ b/dom/webidl/AudioDestinationNode.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface AudioDestinationNode : AudioNode {
+
+ readonly attribute unsigned long maxChannelCount;
+
+};
+
diff --git a/dom/webidl/AudioListener.webidl b/dom/webidl/AudioListener.webidl
new file mode 100644
index 000000000..8970e6b98
--- /dev/null
+++ b/dom/webidl/AudioListener.webidl
@@ -0,0 +1,31 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface AudioListener {
+
+ // same as OpenAL (default 1)
+ [Deprecated="PannerNodeDoppler"]
+ attribute double dopplerFactor;
+
+ // in meters / second (default 343.3)
+ [Deprecated="PannerNodeDoppler"]
+ attribute double speedOfSound;
+
+ // Uses a 3D cartesian coordinate system
+ void setPosition(double x, double y, double z);
+ void setOrientation(double x, double y, double z, double xUp, double yUp, double zUp);
+ [Deprecated="PannerNodeDoppler"]
+ void setVelocity(double x, double y, double z);
+
+};
+
diff --git a/dom/webidl/AudioNode.webidl b/dom/webidl/AudioNode.webidl
new file mode 100644
index 000000000..d6aa577c0
--- /dev/null
+++ b/dom/webidl/AudioNode.webidl
@@ -0,0 +1,69 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum ChannelCountMode {
+ "max",
+ "clamped-max",
+ "explicit"
+};
+
+enum ChannelInterpretation {
+ "speakers",
+ "discrete"
+};
+
+[Pref="dom.webaudio.enabled"]
+interface AudioNode : EventTarget {
+
+ [Throws]
+ AudioNode connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
+ [Throws]
+ void connect(AudioParam destination, optional unsigned long output = 0);
+ [Throws]
+ void disconnect();
+ [Throws]
+ void disconnect(unsigned long output);
+ [Throws]
+ void disconnect(AudioNode destination);
+ [Throws]
+ void disconnect(AudioNode destination, unsigned long output);
+ [Throws]
+ void disconnect(AudioNode destination, unsigned long output, unsigned long input);
+ [Throws]
+ void disconnect(AudioParam destination);
+ [Throws]
+ void disconnect(AudioParam destination, unsigned long output);
+
+ readonly attribute AudioContext context;
+ readonly attribute unsigned long numberOfInputs;
+ readonly attribute unsigned long numberOfOutputs;
+
+ // Channel up-mixing and down-mixing rules for all inputs.
+ [SetterThrows]
+ attribute unsigned long channelCount;
+ [SetterThrows]
+ attribute ChannelCountMode channelCountMode;
+ attribute ChannelInterpretation channelInterpretation;
+
+};
+
+// Mozilla extension
+partial interface AudioNode {
+ [ChromeOnly]
+ readonly attribute unsigned long id;
+};
+[NoInterfaceObject]
+interface AudioNodePassThrough {
+ [ChromeOnly]
+ attribute boolean passThrough;
+};
+
diff --git a/dom/webidl/AudioParam.webidl b/dom/webidl/AudioParam.webidl
new file mode 100644
index 000000000..ee5514f34
--- /dev/null
+++ b/dom/webidl/AudioParam.webidl
@@ -0,0 +1,50 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface AudioParam {
+
+ attribute float value;
+ readonly attribute float defaultValue;
+
+ // Parameter automation.
+ [Throws]
+ AudioParam setValueAtTime(float value, double startTime);
+ [Throws]
+ AudioParam linearRampToValueAtTime(float value, double endTime);
+ [Throws]
+ AudioParam exponentialRampToValueAtTime(float value, double endTime);
+
+ // Exponentially approach the target value with a rate having the given time constant.
+ [Throws]
+ AudioParam setTargetAtTime(float target, double startTime, double timeConstant);
+
+ // Sets an array of arbitrary parameter values starting at time for the given duration.
+ // The number of values will be scaled to fit into the desired duration.
+ [Throws]
+ AudioParam setValueCurveAtTime(Float32Array values, double startTime, double duration);
+
+ // Cancels all scheduled parameter changes with times greater than or equal to startTime.
+ [Throws]
+ AudioParam cancelScheduledValues(double startTime);
+
+};
+
+// Mozilla extension
+partial interface AudioParam {
+ // The ID of the AudioNode this AudioParam belongs to.
+ [ChromeOnly]
+ readonly attribute unsigned long parentNodeId;
+ // The name of the AudioParam
+ [ChromeOnly]
+ readonly attribute DOMString name;
+};
diff --git a/dom/webidl/AudioProcessingEvent.webidl b/dom/webidl/AudioProcessingEvent.webidl
new file mode 100644
index 000000000..8cf3d9cc2
--- /dev/null
+++ b/dom/webidl/AudioProcessingEvent.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface AudioProcessingEvent : Event {
+
+ readonly attribute double playbackTime;
+
+ [Throws]
+ readonly attribute AudioBuffer inputBuffer;
+ [Throws]
+ readonly attribute AudioBuffer outputBuffer;
+
+};
+
diff --git a/dom/webidl/AudioStreamTrack.webidl b/dom/webidl/AudioStreamTrack.webidl
new file mode 100644
index 000000000..9fff71ced
--- /dev/null
+++ b/dom/webidl/AudioStreamTrack.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+// [Constructor(optional MediaTrackConstraints audioConstraints)]
+interface AudioStreamTrack : MediaStreamTrack {
+// static sequence<DOMString> getSourceIds ();
+};
diff --git a/dom/webidl/AudioTrack.webidl b/dom/webidl/AudioTrack.webidl
new file mode 100644
index 000000000..e70456a37
--- /dev/null
+++ b/dom/webidl/AudioTrack.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#audiotrack
+ */
+
+[Pref="media.track.enabled"]
+interface AudioTrack {
+ readonly attribute DOMString id;
+ readonly attribute DOMString kind;
+ readonly attribute DOMString label;
+ readonly attribute DOMString language;
+ attribute boolean enabled;
+};
diff --git a/dom/webidl/AudioTrackList.webidl b/dom/webidl/AudioTrackList.webidl
new file mode 100644
index 000000000..2c229a67a
--- /dev/null
+++ b/dom/webidl/AudioTrackList.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#audiotracklist
+ */
+
+[Pref="media.track.enabled"]
+interface AudioTrackList : EventTarget {
+ readonly attribute unsigned long length;
+ getter AudioTrack (unsigned long index);
+ AudioTrack? getTrackById(DOMString id);
+
+ attribute EventHandler onchange;
+ attribute EventHandler onaddtrack;
+ attribute EventHandler onremovetrack;
+};
diff --git a/dom/webidl/AutocompleteErrorEvent.webidl b/dom/webidl/AutocompleteErrorEvent.webidl
new file mode 100644
index 000000000..23b8ae739
--- /dev/null
+++ b/dom/webidl/AutocompleteErrorEvent.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+enum AutoCompleteErrorReason {
+ "",
+ "cancel",
+ "disabled",
+ "invalid"
+};
+
+[Pref="dom.forms.requestAutocomplete",
+ Constructor(DOMString type, optional AutocompleteErrorEventInit eventInitDict)]
+interface AutocompleteErrorEvent : Event
+{
+ readonly attribute AutoCompleteErrorReason reason;
+};
+
+dictionary AutocompleteErrorEventInit : EventInit
+{
+ AutoCompleteErrorReason reason = "";
+};
diff --git a/dom/webidl/AutocompleteInfo.webidl b/dom/webidl/AutocompleteInfo.webidl
new file mode 100644
index 000000000..ad32ff6d3
--- /dev/null
+++ b/dom/webidl/AutocompleteInfo.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * This dictionary is used for the input, textarea and select element's
+ * getAutocompleteInfo method.
+ */
+
+dictionary AutocompleteInfo {
+ DOMString section = "";
+ DOMString addressType = "";
+ DOMString contactType = "";
+ DOMString fieldName = "";
+};
diff --git a/dom/webidl/BarProp.webidl b/dom/webidl/BarProp.webidl
new file mode 100644
index 000000000..76e5edeb5
--- /dev/null
+++ b/dom/webidl/BarProp.webidl
@@ -0,0 +1,11 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface BarProp
+{
+ [Throws]
+ attribute boolean visible;
+};
diff --git a/dom/webidl/BaseKeyframeTypes.webidl b/dom/webidl/BaseKeyframeTypes.webidl
new file mode 100644
index 000000000..f0b0e68b5
--- /dev/null
+++ b/dom/webidl/BaseKeyframeTypes.webidl
@@ -0,0 +1,48 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/web-animations/#the-compositeoperation-enumeration
+ * https://w3c.github.io/web-animations/#dictdef-basepropertyindexedkeyframe
+ * https://w3c.github.io/web-animations/#dictdef-basekeyframe
+ * https://w3c.github.io/web-animations/#dictdef-basecomputedkeyframe
+ *
+ * Copyright © 2016 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum CompositeOperation { "replace", "add", "accumulate" };
+
+// The following dictionary types are not referred to by other .webidl files,
+// but we use it for manual JS->IDL and IDL->JS conversions in
+// KeyframeEffectReadOnly's implementation.
+
+dictionary BasePropertyIndexedKeyframe {
+ DOMString easing = "linear";
+ CompositeOperation composite;
+};
+
+dictionary BaseKeyframe {
+ double? offset = null;
+ DOMString easing = "linear";
+ CompositeOperation composite;
+
+ // Non-standard extensions
+
+ // Member to allow testing when StyleAnimationValue::ComputeValues fails.
+ //
+ // Note that we currently only apply this to shorthand properties since
+ // it's easier to annotate shorthand property values and because we have
+ // only ever observed ComputeValues failing on shorthand values.
+ //
+ // Bug 1216844 should remove this member since after that bug is fixed we will
+ // have a well-defined behavior to use when animation endpoints are not
+ // available.
+ [ChromeOnly] boolean simulateComputeValuesFailure = false;
+};
+
+dictionary BaseComputedKeyframe : BaseKeyframe {
+ double computedOffset;
+};
diff --git a/dom/webidl/BatteryManager.webidl b/dom/webidl/BatteryManager.webidl
new file mode 100644
index 000000000..a964f3b0b
--- /dev/null
+++ b/dom/webidl/BatteryManager.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/battery-status/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface BatteryManager : EventTarget {
+ readonly attribute boolean charging;
+ readonly attribute unrestricted double chargingTime;
+ readonly attribute unrestricted double dischargingTime;
+ readonly attribute double level;
+
+ attribute EventHandler onchargingchange;
+ attribute EventHandler onchargingtimechange;
+ attribute EventHandler ondischargingtimechange;
+ attribute EventHandler onlevelchange;
+};
diff --git a/dom/webidl/BeforeAfterKeyboardEvent.webidl b/dom/webidl/BeforeAfterKeyboardEvent.webidl
new file mode 100644
index 000000000..32c582f17
--- /dev/null
+++ b/dom/webidl/BeforeAfterKeyboardEvent.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString typeArg,
+ optional BeforeAfterKeyboardEventInit eventInitDict),
+ Pref="dom.beforeAfterKeyboardEvent.enabled",
+ ChromeOnly]
+interface BeforeAfterKeyboardEvent : KeyboardEvent
+{
+ // The valid value of embeddedCancelled is:
+ // - "mozbrowserbeforekeydown": null
+ // - "mozbrowserbeforekeyup": null
+ // - "mozbrowserafterkeydown": true/false
+ // - "mozbrowserafterkeyup": true/false
+ readonly attribute boolean? embeddedCancelled;
+};
+
+dictionary BeforeAfterKeyboardEventInit : KeyboardEventInit
+{
+ boolean? embeddedCancelled = null;
+};
diff --git a/dom/webidl/BeforeUnloadEvent.webidl b/dom/webidl/BeforeUnloadEvent.webidl
new file mode 100644
index 000000000..e64e1b2c2
--- /dev/null
+++ b/dom/webidl/BeforeUnloadEvent.webidl
@@ -0,0 +1,12 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface, please see
+ * http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent
+ */
+
+interface BeforeUnloadEvent : Event {
+ attribute DOMString returnValue;
+};
diff --git a/dom/webidl/BiquadFilterNode.webidl b/dom/webidl/BiquadFilterNode.webidl
new file mode 100644
index 000000000..7a9efb77d
--- /dev/null
+++ b/dom/webidl/BiquadFilterNode.webidl
@@ -0,0 +1,41 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum BiquadFilterType {
+ "lowpass",
+ "highpass",
+ "bandpass",
+ "lowshelf",
+ "highshelf",
+ "peaking",
+ "notch",
+ "allpass"
+};
+
+[Pref="dom.webaudio.enabled"]
+interface BiquadFilterNode : AudioNode {
+
+ attribute BiquadFilterType type;
+ readonly attribute AudioParam frequency; // in Hertz
+ readonly attribute AudioParam detune; // in Cents
+ readonly attribute AudioParam Q; // Quality factor
+ readonly attribute AudioParam gain; // in Decibels
+
+ void getFrequencyResponse(Float32Array frequencyHz,
+ Float32Array magResponse,
+ Float32Array phaseResponse);
+
+};
+
+// Mozilla extension
+BiquadFilterNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/Blob.webidl b/dom/webidl/Blob.webidl
new file mode 100644
index 000000000..4df66630d
--- /dev/null
+++ b/dom/webidl/Blob.webidl
@@ -0,0 +1,42 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2006/webapi/FileAPI/#blob
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+typedef (ArrayBuffer or ArrayBufferView or Blob or USVString) BlobPart;
+
+[Constructor(optional sequence<BlobPart> blobParts,
+ optional BlobPropertyBag options),
+ Exposed=(Window,Worker)]
+interface Blob {
+
+ [GetterThrows]
+ readonly attribute unsigned long long size;
+
+ readonly attribute DOMString type;
+
+ // readonly attribute boolean isClosed; TODO bug 1048321
+
+ //slice Blob into byte-ranged chunks
+
+ [Throws]
+ Blob slice([Clamp] optional long long start,
+ [Clamp] optional long long end,
+ optional DOMString contentType = "");
+
+ // void close(); TODO bug 1048325
+};
+
+enum EndingTypes { "transparent", "native" };
+
+dictionary BlobPropertyBag {
+ DOMString type = "";
+ EndingTypes endings = "transparent";
+};
diff --git a/dom/webidl/BlobEvent.webidl b/dom/webidl/BlobEvent.webidl
new file mode 100644
index 000000000..8d0418701
--- /dev/null
+++ b/dom/webidl/BlobEvent.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional BlobEventInit eventInitDict)]
+interface BlobEvent : Event
+{
+ readonly attribute Blob? data;
+};
+
+dictionary BlobEventInit : EventInit
+{
+ Blob? data = null;
+};
diff --git a/dom/webidl/BoxObject.webidl b/dom/webidl/BoxObject.webidl
new file mode 100644
index 000000000..8bebd6c9e
--- /dev/null
+++ b/dom/webidl/BoxObject.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Func="IsChromeOrXBL"]
+interface BoxObject {
+ readonly attribute Element? element;
+
+ readonly attribute long x;
+ readonly attribute long y;
+ [Throws]
+ readonly attribute long screenX;
+ [Throws]
+ readonly attribute long screenY;
+ readonly attribute long width;
+ readonly attribute long height;
+
+ nsISupports? getPropertyAsSupports(DOMString propertyName);
+ void setPropertyAsSupports(DOMString propertyName, nsISupports value);
+ [Throws]
+ DOMString? getProperty(DOMString propertyName);
+ void setProperty(DOMString propertyName, DOMString propertyValue);
+ void removeProperty(DOMString propertyName);
+
+ // for stepping through content in the expanded dom with box-ordinal-group order
+ readonly attribute Element? parentBox;
+ readonly attribute Element? firstChild;
+ readonly attribute Element? lastChild;
+ readonly attribute Element? nextSibling;
+ readonly attribute Element? previousSibling;
+};
diff --git a/dom/webidl/BroadcastChannel.webidl b/dom/webidl/BroadcastChannel.webidl
new file mode 100644
index 000000000..70be23522
--- /dev/null
+++ b/dom/webidl/BroadcastChannel.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface, please see
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts
+ */
+
+[Constructor(DOMString channel),
+ Exposed=(Window,Worker)]
+interface BroadcastChannel : EventTarget {
+ readonly attribute DOMString name;
+
+ [Throws]
+ void postMessage(any message);
+
+ void close();
+
+ attribute EventHandler onmessage;
+};
diff --git a/dom/webidl/BrowserElement.webidl b/dom/webidl/BrowserElement.webidl
new file mode 100644
index 000000000..2516d7da5
--- /dev/null
+++ b/dom/webidl/BrowserElement.webidl
@@ -0,0 +1,178 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+callback BrowserElementNextPaintEventCallback = void ();
+
+enum BrowserFindCaseSensitivity { "case-sensitive", "case-insensitive" };
+enum BrowserFindDirection { "forward", "backward" };
+
+dictionary BrowserElementDownloadOptions {
+ DOMString? filename;
+ DOMString? referrer;
+};
+
+dictionary BrowserElementExecuteScriptOptions {
+ DOMString? url;
+ DOMString? origin;
+};
+
+[NoInterfaceObject]
+interface BrowserElement {
+};
+
+BrowserElement implements BrowserElementCommon;
+BrowserElement implements BrowserElementPrivileged;
+
+[NoInterfaceObject]
+interface BrowserElementCommon {
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void setVisible(boolean visible);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest getVisible();
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void setActive(boolean active);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ boolean getActive();
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void addNextPaintListener(BrowserElementNextPaintEventCallback listener);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void removeNextPaintListener(BrowserElementNextPaintEventCallback listener);
+};
+
+[NoInterfaceObject]
+interface BrowserElementPrivileged {
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void sendMouseEvent(DOMString type,
+ unsigned long x,
+ unsigned long y,
+ unsigned long button,
+ unsigned long clickCount,
+ unsigned long modifiers);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ Func="TouchEvent::PrefEnabled",
+ ChromeOnly]
+ void sendTouchEvent(DOMString type,
+ sequence<unsigned long> identifiers,
+ sequence<long> x,
+ sequence<long> y,
+ sequence<unsigned long> rx,
+ sequence<unsigned long> ry,
+ sequence<float> rotationAngles,
+ sequence<float> forces,
+ unsigned long count,
+ unsigned long modifiers);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void goBack();
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void goForward();
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void reload(optional boolean hardReload = false);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void stop();
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest download(DOMString url,
+ optional BrowserElementDownloadOptions options);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest purgeHistory();
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest getScreenshot([EnforceRange] unsigned long width,
+ [EnforceRange] unsigned long height,
+ optional DOMString mimeType="");
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void zoom(float zoom);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest getCanGoBack();
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest getCanGoForward();
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest getContentDimensions();
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest setInputMethodActive(boolean isActive);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void findAll(DOMString searchString, BrowserFindCaseSensitivity caseSensitivity);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void findNext(BrowserFindDirection direction);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void clearMatch();
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest executeScript(DOMString script,
+ optional BrowserElementExecuteScriptOptions options);
+
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest getWebManifest();
+
+};
diff --git a/dom/webidl/BrowserElementAudioChannel.webidl b/dom/webidl/BrowserElementAudioChannel.webidl
new file mode 100644
index 000000000..55dbe3fb4
--- /dev/null
+++ b/dom/webidl/BrowserElementAudioChannel.webidl
@@ -0,0 +1,77 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+interface BrowserElementAudioChannel : EventTarget {
+ readonly attribute AudioChannel name;
+
+ // This event is dispatched when this audiochannel is actually in used by the
+ // app or one of the sub-iframes.
+ attribute EventHandler onactivestatechanged;
+
+ [Throws]
+ DOMRequest getVolume();
+
+ [Throws]
+ DOMRequest setVolume(float aVolume);
+
+ [Throws]
+ DOMRequest getMuted();
+
+ [Throws]
+ DOMRequest setMuted(boolean aMuted);
+
+ [Throws]
+ DOMRequest isActive();
+};
+
+partial interface BrowserElementPrivileged {
+ [Pure, Cached, Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ readonly attribute sequence<BrowserElementAudioChannel> allowedAudioChannels;
+
+ /**
+ * Mutes all audio in this browser.
+ */
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void mute();
+
+ /**
+ * Unmutes all audio in this browser.
+ */
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void unmute();
+
+ /**
+ * Obtains whether or not the browser is muted.
+ */
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest getMuted();
+
+ /**
+ * Sets the volume for the browser.
+ */
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ void setVolume(float volume);
+
+ /**
+ * Gets the volume for the browser.
+ */
+ [Throws,
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+ DOMRequest getVolume();
+};
diff --git a/dom/webidl/BrowserElementDictionaries.webidl b/dom/webidl/BrowserElementDictionaries.webidl
new file mode 100644
index 000000000..400e40253
--- /dev/null
+++ b/dom/webidl/BrowserElementDictionaries.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+dictionary OpenWindowEventDetail {
+ DOMString url = "";
+ DOMString name = "";
+ DOMString features = "";
+ Node? frameElement = null;
+};
+
+dictionary DOMWindowResizeEventDetail {
+ long width = 0;
+ long height = 0;
+};
diff --git a/dom/webidl/BrowserElementProxy.webidl b/dom/webidl/BrowserElementProxy.webidl
new file mode 100644
index 000000000..6f6fb5ebe
--- /dev/null
+++ b/dom/webidl/BrowserElementProxy.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor,
+ JSImplementation="@mozilla.org/dom/browser-element-proxy;1",
+ NavigatorProperty="mozBrowserElementProxy",
+ Pref="dom.mozBrowserFramesEnabled",
+ ChromeOnly]
+interface BrowserElementProxy : EventTarget {
+};
+BrowserElementProxy implements BrowserElementCommon;
+BrowserElementProxy implements BrowserElementPrivileged;
diff --git a/dom/webidl/BrowserFeedWriter.webidl b/dom/webidl/BrowserFeedWriter.webidl
new file mode 100644
index 000000000..d756a8837
--- /dev/null
+++ b/dom/webidl/BrowserFeedWriter.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[JSImplementation="@mozilla.org/browser/feeds/result-writer;1",
+ Func="mozilla::FeedWriterEnabled::IsEnabled",
+ Constructor]
+interface BrowserFeedWriter {
+ /**
+ * Writes the feed content, assumes that the feed writer is initialized.
+ */
+ void writeContent();
+
+ /**
+ * Uninitialize the feed writer.
+ */
+ void close();
+};
diff --git a/dom/webidl/CDATASection.webidl b/dom/webidl/CDATASection.webidl
new file mode 100644
index 000000000..895dae089
--- /dev/null
+++ b/dom/webidl/CDATASection.webidl
@@ -0,0 +1,8 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface CDATASection : Text {
+};
diff --git a/dom/webidl/CSPDictionaries.webidl b/dom/webidl/CSPDictionaries.webidl
new file mode 100644
index 000000000..54008f13a
--- /dev/null
+++ b/dom/webidl/CSPDictionaries.webidl
@@ -0,0 +1,37 @@
+/* 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/. */
+
+/**
+ * Dictionary used to display CSP info.
+ */
+
+dictionary CSP {
+ boolean report-only = false;
+
+ sequence<DOMString> default-src;
+ sequence<DOMString> script-src;
+ sequence<DOMString> object-src;
+ sequence<DOMString> style-src;
+ sequence<DOMString> img-src;
+ sequence<DOMString> media-src;
+ sequence<DOMString> frame-src;
+ sequence<DOMString> font-src;
+ sequence<DOMString> connect-src;
+ sequence<DOMString> report-uri;
+ sequence<DOMString> frame-ancestors;
+ // sequence<DOMString> reflected-xss; // not supported in Firefox
+ sequence<DOMString> base-uri;
+ sequence<DOMString> form-action;
+ sequence<DOMString> referrer;
+ sequence<DOMString> manifest-src;
+ sequence<DOMString> upgrade-insecure-requests;
+ sequence<DOMString> child-src;
+ sequence<DOMString> block-all-mixed-content;
+ sequence<DOMString> require-sri-for;
+ sequence<DOMString> sandbox;
+};
+
+dictionary CSPPolicies {
+ sequence<CSP> csp-policies;
+};
diff --git a/dom/webidl/CSPReport.webidl b/dom/webidl/CSPReport.webidl
new file mode 100644
index 000000000..390898c83
--- /dev/null
+++ b/dom/webidl/CSPReport.webidl
@@ -0,0 +1,23 @@
+/* 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/. */
+
+/**
+ * This dictionary holds the parameters used to send
+ * CSP reports in JSON format.
+ */
+
+dictionary CSPReportProperties {
+ DOMString document-uri = "";
+ DOMString referrer = "";
+ DOMString blocked-uri = "";
+ DOMString violated-directive = "";
+ DOMString original-policy= "";
+ DOMString source-file;
+ DOMString script-sample;
+ long line-number;
+};
+
+dictionary CSPReport {
+ CSPReportProperties csp-report;
+};
diff --git a/dom/webidl/CSS.webidl b/dom/webidl/CSS.webidl
new file mode 100644
index 000000000..b5cdab2d1
--- /dev/null
+++ b/dom/webidl/CSS.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/css3-conditional/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface CSS {
+ [Throws]
+ static boolean supports(DOMString property, DOMString value);
+
+ [Throws]
+ static boolean supports(DOMString conditionText);
+};
+
+// http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method
+partial interface CSS {
+ static DOMString escape(DOMString ident);
+};
diff --git a/dom/webidl/CSS2Properties.webidl.in b/dom/webidl/CSS2Properties.webidl.in
new file mode 100644
index 000000000..62603b229
--- /dev/null
+++ b/dom/webidl/CSS2Properties.webidl.in
@@ -0,0 +1,3 @@
+interface CSS2Properties : CSSStyleDeclaration {
+${props}
+};
diff --git a/dom/webidl/CSSAnimation.webidl b/dom/webidl/CSSAnimation.webidl
new file mode 100644
index 000000000..8799bfadb
--- /dev/null
+++ b/dom/webidl/CSSAnimation.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/css-animations-2/#the-CSSAnimation-interface
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="nsDocument::IsWebAnimationsEnabled",
+ HeaderFile="nsAnimationManager.h"]
+interface CSSAnimation : Animation {
+ [Constant] readonly attribute DOMString animationName;
+};
diff --git a/dom/webidl/CSSLexer.webidl b/dom/webidl/CSSLexer.webidl
new file mode 100644
index 000000000..86fbfcfff
--- /dev/null
+++ b/dom/webidl/CSSLexer.webidl
@@ -0,0 +1,168 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+// The possible values for CSSToken.tokenType.
+enum CSSTokenType {
+ // Whitespace.
+ "whitespace",
+ // A CSS comment.
+ "comment",
+ // An identifier. |text| holds the identifier text.
+ "ident",
+ // A function token. |text| holds the function name. Note that the
+ // function token includes (i.e., consumes) the "(" -- but this is
+ // not included in |text|.
+ "function",
+ // "@word". |text| holds "word", without the "@".
+ "at",
+ // "#word". |text| holds "word", without the "#".
+ "id",
+ // "#word". ID is used when "word" would have been a valid IDENT
+ // token without the "#"; otherwise, HASH is used.
+ "hash",
+ // A number.
+ "number",
+ // A dimensioned number.
+ "dimension",
+ // A percentage.
+ "percentage",
+ // A string.
+ "string",
+ // A "bad string". This can only be returned when a string is
+ // unterminated at EOF. (However, currently the lexer returns
+ // ordinary STRING tokens in this situation.)
+ "bad_string",
+ // A URL. |text| holds the URL.
+ "url",
+ // A "bad URL". This is a URL that is unterminated at EOF. |text|
+ // holds the URL.
+ "bad_url",
+ // A "symbol" is any one-character symbol. This corresponds to the
+ // DELIM token in the CSS specification.
+ "symbol",
+ // The "~=" token.
+ "includes",
+ // The "|=" token.
+ "dashmatch",
+ // The "^=" token.
+ "beginsmatch",
+ // The "$=" token.
+ "endsmatch",
+ // The "*=" token.
+ "containsmatch",
+ // A unicode-range token. This is currently not fully represented
+ // by CSSToken.
+ "urange",
+ // HTML comment delimiters, either "<!--" or "-->". Note that each
+ // is emitted as a separate token, and the intervening text is lexed
+ // as normal; whereas ordinary CSS comments are lexed as a unit.
+ "htmlcomment"
+};
+
+dictionary CSSToken {
+ // The token type.
+ CSSTokenType tokenType = "whitespace";
+
+ // Offset of the first character of the token.
+ unsigned long startOffset = 0;
+ // Offset of the character after the final character of the token.
+ // This is chosen so that the offsets can be passed to |substring|
+ // to yield the exact contents of the token.
+ unsigned long endOffset = 0;
+
+ // If the token is a number, percentage, or dimension, this holds
+ // the value. This is not present for other token types.
+ double number;
+ // If the token is a number, percentage, or dimension, this is true
+ // iff the number had an explicit sign. This is not present for
+ // other token types.
+ boolean hasSign;
+ // If the token is a number, percentage, or dimension, this is true
+ // iff the number was specified as an integer. This is not present
+ // for other token types.
+ boolean isInteger;
+
+ // Text associated with the token. This is not present for all
+ // token types. In particular it is:
+ //
+ // Token type Meaning
+ // ===============================
+ // ident The identifier.
+ // function The function name. Note that the "(" is part
+ // of the token but is not present in |text|.
+ // at The word.
+ // id The word.
+ // hash The word.
+ // dimension The dimension.
+ // string The string contents after escape processing.
+ // bad_string Ditto.
+ // url The URL after escape processing.
+ // bad_url Ditto.
+ // symbol The symbol text.
+ DOMString text;
+};
+
+/**
+ * CSSLexer is an interface to the CSS lexer. It tokenizes an
+ * input stream and returns CSS tokens.
+ *
+ * @see inIDOMUtils.getCSSLexer to create an instance of the lexer.
+ */
+[ChromeOnly]
+interface CSSLexer
+{
+ /**
+ * The line number of the most recently returned token. Line
+ * numbers are 0-based.
+ */
+ readonly attribute unsigned long lineNumber;
+
+ /**
+ * The column number of the most recently returned token. Column
+ * numbers are 0-based.
+ */
+ readonly attribute unsigned long columnNumber;
+
+ /**
+ * When EOF is reached, the last token might be unterminated in some
+ * ways. This method takes an input string and appends the needed
+ * terminators. In particular:
+ *
+ * 1. If EOF occurs mid-string, this will append the correct quote.
+ * 2. If EOF occurs in a url token, this will append the close paren.
+ * 3. If EOF occurs in a comment this will append the comment closer.
+ *
+ * A trailing backslash might also have been present in the input
+ * string. This is handled in different ways, depending on the
+ * context and arguments.
+ *
+ * If preserveBackslash is true, then the existing backslash at the
+ * end of inputString is preserved, and a new backslash is appended.
+ * That is, the input |\| is transformed to |\\|, and the
+ * input |'\| is transformed to |'\\'|.
+ *
+ * Otherwise, preserveBackslash is false:
+ * If the backslash appears in a string context, then the trailing
+ * backslash is dropped from inputString. That is, |"\| is
+ * transformed to |""|.
+ * If the backslash appears outside of a string context, then
+ * U+FFFD is appended. That is, |\| is transformed to a string
+ * with two characters: backslash followed by U+FFFD.
+ *
+ * Passing false for preserveBackslash makes the result conform to
+ * the CSS Syntax specification. However, passing true may give
+ * somewhat more intuitive behavior.
+ *
+ * @param inputString the input string
+ * @param preserveBackslash how to handle trailing backslashes
+ * @return the input string with the termination characters appended
+ */
+ DOMString performEOFFixup(DOMString inputString, boolean preserveBackslash);
+
+ /**
+ * Return the next token, or null at EOF.
+ */
+ CSSToken? nextToken();
+};
diff --git a/dom/webidl/CSSPrimitiveValue.webidl b/dom/webidl/CSSPrimitiveValue.webidl
new file mode 100644
index 000000000..87141fee2
--- /dev/null
+++ b/dom/webidl/CSSPrimitiveValue.webidl
@@ -0,0 +1,56 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface Counter;
+
+interface CSSPrimitiveValue : CSSValue {
+
+ // UnitTypes
+ const unsigned short CSS_UNKNOWN = 0;
+ const unsigned short CSS_NUMBER = 1;
+ const unsigned short CSS_PERCENTAGE = 2;
+ const unsigned short CSS_EMS = 3;
+ const unsigned short CSS_EXS = 4;
+ const unsigned short CSS_PX = 5;
+ const unsigned short CSS_CM = 6;
+ const unsigned short CSS_MM = 7;
+ const unsigned short CSS_IN = 8;
+ const unsigned short CSS_PT = 9;
+ const unsigned short CSS_PC = 10;
+ const unsigned short CSS_DEG = 11;
+ const unsigned short CSS_RAD = 12;
+ const unsigned short CSS_GRAD = 13;
+ const unsigned short CSS_MS = 14;
+ const unsigned short CSS_S = 15;
+ const unsigned short CSS_HZ = 16;
+ const unsigned short CSS_KHZ = 17;
+ const unsigned short CSS_DIMENSION = 18;
+ const unsigned short CSS_STRING = 19;
+ const unsigned short CSS_URI = 20;
+ const unsigned short CSS_IDENT = 21;
+ const unsigned short CSS_ATTR = 22;
+ const unsigned short CSS_COUNTER = 23;
+ const unsigned short CSS_RECT = 24;
+ const unsigned short CSS_RGBCOLOR = 25;
+
+ readonly attribute unsigned short primitiveType;
+ [Throws]
+ void setFloatValue(unsigned short unitType,
+ float floatValue);
+ [Throws]
+ float getFloatValue(unsigned short unitType);
+ [Throws]
+ void setStringValue(unsigned short stringType,
+ DOMString stringValue);
+ [Throws]
+ DOMString getStringValue();
+ [Throws]
+ Counter getCounterValue();
+ [Throws]
+ Rect getRectValue();
+ [Throws]
+ RGBColor getRGBColorValue();
+};
diff --git a/dom/webidl/CSSPseudoElement.webidl b/dom/webidl/CSSPseudoElement.webidl
new file mode 100644
index 000000000..96d191e3a
--- /dev/null
+++ b/dom/webidl/CSSPseudoElement.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://drafts.csswg.org/css-pseudo/#CSSPseudoElement-interface
+ * https://drafts.csswg.org/cssom/#pseudoelement
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+// Both CSSOM and CSS Pseudo-Elements 4 provide contradictory definitions for
+// this interface.
+// What we implement here is a minimal subset of the two definitions which we
+// ship behind a pref until the specification issues have been resolved.
+[Func="nsDocument::IsWebAnimationsEnabled"]
+interface CSSPseudoElement {
+ readonly attribute DOMString type;
+ readonly attribute Element parentElement;
+};
+
+// https://w3c.github.io/web-animations/#extensions-to-the-pseudoelement-interface
+CSSPseudoElement implements Animatable;
diff --git a/dom/webidl/CSSRuleList.webidl b/dom/webidl/CSSRuleList.webidl
new file mode 100644
index 000000000..c4faec148
--- /dev/null
+++ b/dom/webidl/CSSRuleList.webidl
@@ -0,0 +1,10 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface CSSRuleList {
+ readonly attribute unsigned long length;
+ getter CSSRule? item(unsigned long index);
+};
diff --git a/dom/webidl/CSSStyleDeclaration.webidl b/dom/webidl/CSSStyleDeclaration.webidl
new file mode 100644
index 000000000..d9b2511de
--- /dev/null
+++ b/dom/webidl/CSSStyleDeclaration.webidl
@@ -0,0 +1,37 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/cssom/
+ */
+
+interface CSSRule;
+
+interface CSSStyleDeclaration {
+ [SetterThrows]
+ attribute DOMString cssText;
+
+ readonly attribute unsigned long length;
+ getter DOMString item(unsigned long index);
+
+ [Throws]
+ DOMString getPropertyValue(DOMString property);
+ // Mozilla extension, sort of
+ [Throws]
+ CSSValue? getPropertyCSSValue(DOMString property);
+ DOMString getPropertyPriority(DOMString property);
+ [Throws]
+ void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = "");
+ [Throws]
+ DOMString removeProperty(DOMString property);
+
+ readonly attribute CSSRule? parentRule;
+};
+
+// Mozilla extensions
+partial interface CSSStyleDeclaration {
+ [ChromeOnly,Throws]
+ DOMString getAuthoredPropertyValue(DOMString property);
+};
diff --git a/dom/webidl/CSSStyleSheet.webidl b/dom/webidl/CSSStyleSheet.webidl
new file mode 100644
index 000000000..48fb89db1
--- /dev/null
+++ b/dom/webidl/CSSStyleSheet.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/cssom/
+ */
+
+interface CSSRule;
+
+enum CSSStyleSheetParsingMode {
+ "author",
+ "user",
+ "agent"
+};
+
+interface CSSStyleSheet : StyleSheet {
+ [Pure]
+ readonly attribute CSSRule? ownerRule;
+ [Throws, NeedsSubjectPrincipal]
+ readonly attribute CSSRuleList cssRules;
+ [ChromeOnly, BinaryName="parsingModeDOM"]
+ readonly attribute CSSStyleSheetParsingMode parsingMode;
+ [Throws, NeedsSubjectPrincipal]
+ unsigned long insertRule(DOMString rule, unsigned long index);
+ [Throws, NeedsSubjectPrincipal]
+ void deleteRule(unsigned long index);
+};
diff --git a/dom/webidl/CSSTransition.webidl b/dom/webidl/CSSTransition.webidl
new file mode 100644
index 000000000..44ffb79f2
--- /dev/null
+++ b/dom/webidl/CSSTransition.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/css-transitions-2/#the-CSSTransition-interface
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="nsDocument::IsWebAnimationsEnabled",
+ HeaderFile="nsTransitionManager.h"]
+interface CSSTransition : Animation {
+ [Constant] readonly attribute DOMString transitionProperty;
+};
diff --git a/dom/webidl/CSSValue.webidl b/dom/webidl/CSSValue.webidl
new file mode 100644
index 000000000..03bcb0a7e
--- /dev/null
+++ b/dom/webidl/CSSValue.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface CSSValue {
+
+ // UnitTypes
+ const unsigned short CSS_INHERIT = 0;
+ const unsigned short CSS_PRIMITIVE_VALUE = 1;
+ const unsigned short CSS_VALUE_LIST = 2;
+ const unsigned short CSS_CUSTOM = 3;
+
+ [Throws]
+ attribute DOMString cssText;
+
+ readonly attribute unsigned short cssValueType;
+};
diff --git a/dom/webidl/CSSValueList.webidl b/dom/webidl/CSSValueList.webidl
new file mode 100644
index 000000000..d2a14b5fb
--- /dev/null
+++ b/dom/webidl/CSSValueList.webidl
@@ -0,0 +1,10 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface CSSValueList : CSSValue {
+ readonly attribute unsigned long length;
+ getter CSSValue? item(unsigned long index);
+};
diff --git a/dom/webidl/Cache.webidl b/dom/webidl/Cache.webidl
new file mode 100644
index 000000000..b2c698bb0
--- /dev/null
+++ b/dom/webidl/Cache.webidl
@@ -0,0 +1,44 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
+ *
+ */
+
+// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::cache::Cache::PrefEnabled"]
+interface Cache {
+ [NewObject]
+ Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
+ [NewObject]
+ Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
+ [NewObject]
+ Promise<void> add(RequestInfo request);
+ [NewObject]
+ Promise<void> addAll(sequence<RequestInfo> requests);
+ [NewObject]
+ Promise<void> put(RequestInfo request, Response response);
+ [NewObject]
+ Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
+ [NewObject]
+ Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
+};
+
+dictionary CacheQueryOptions {
+ boolean ignoreSearch = false;
+ boolean ignoreMethod = false;
+ boolean ignoreVary = false;
+ DOMString cacheName;
+};
+
+dictionary CacheBatchOperation {
+ DOMString type;
+ Request request;
+ Response response;
+ CacheQueryOptions options;
+};
diff --git a/dom/webidl/CacheStorage.webidl b/dom/webidl/CacheStorage.webidl
new file mode 100644
index 000000000..cf5bad44b
--- /dev/null
+++ b/dom/webidl/CacheStorage.webidl
@@ -0,0 +1,34 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
+ *
+ */
+
+// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache-storage
+
+interface Principal;
+
+[Exposed=(Window,Worker),
+ ChromeConstructor(CacheStorageNamespace namespace, Principal principal),
+ Func="mozilla::dom::cache::CacheStorage::PrefEnabled"]
+interface CacheStorage {
+ [NewObject]
+ Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
+ [NewObject]
+ Promise<boolean> has(DOMString cacheName);
+ [NewObject]
+ Promise<Cache> open(DOMString cacheName);
+ [NewObject]
+ Promise<boolean> delete(DOMString cacheName);
+ [NewObject]
+ Promise<sequence<DOMString>> keys();
+};
+
+// chrome-only, gecko specific extension
+enum CacheStorageNamespace {
+ "content", "chrome"
+};
diff --git a/dom/webidl/CanvasCaptureMediaStream.webidl b/dom/webidl/CanvasCaptureMediaStream.webidl
new file mode 100644
index 000000000..98b1adbf6
--- /dev/null
+++ b/dom/webidl/CanvasCaptureMediaStream.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/mediacapture-fromelement/index.html
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+[Pref="canvas.capturestream.enabled"]
+interface CanvasCaptureMediaStream : MediaStream {
+ readonly attribute HTMLCanvasElement canvas;
+ void requestFrame();
+};
diff --git a/dom/webidl/CanvasRenderingContext2D.webidl b/dom/webidl/CanvasRenderingContext2D.webidl
new file mode 100644
index 000000000..38a30f9e3
--- /dev/null
+++ b/dom/webidl/CanvasRenderingContext2D.webidl
@@ -0,0 +1,337 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+enum CanvasWindingRule { "nonzero", "evenodd" };
+
+dictionary ContextAttributes2D {
+ // whether or not we're planning to do a lot of readback operations
+ boolean willReadFrequently = false;
+ // signal if the canvas contains an alpha channel
+ boolean alpha = true;
+};
+
+dictionary HitRegionOptions {
+ Path2D? path = null;
+ DOMString id = "";
+ Element? control = null;
+};
+
+typedef (HTMLImageElement or
+ HTMLCanvasElement or
+ HTMLVideoElement or
+ ImageBitmap) CanvasImageSource;
+
+interface CanvasRenderingContext2D {
+
+ // back-reference to the canvas. Might be null if we're not
+ // associated with a canvas.
+ readonly attribute HTMLCanvasElement? canvas;
+
+ // state
+ void save(); // push state on state stack
+ void restore(); // pop state stack and restore state
+
+ // transformations (default transform is the identity matrix)
+// NOT IMPLEMENTED attribute SVGMatrix currentTransform;
+ [Throws, LenientFloat]
+ void scale(double x, double y);
+ [Throws, LenientFloat]
+ void rotate(double angle);
+ [Throws, LenientFloat]
+ void translate(double x, double y);
+ [Throws, LenientFloat]
+ void transform(double a, double b, double c, double d, double e, double f);
+ [Throws, LenientFloat]
+ void setTransform(double a, double b, double c, double d, double e, double f);
+ [Throws]
+ void resetTransform();
+
+ // compositing
+ attribute unrestricted double globalAlpha; // (default 1.0)
+ [Throws]
+ attribute DOMString globalCompositeOperation; // (default source-over)
+
+ // colors and styles (see also the CanvasDrawingStyles interface)
+ attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
+ attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
+ [NewObject]
+ CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
+ [NewObject, Throws]
+ CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
+ [NewObject, Throws]
+ CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
+
+ // shadows
+ [LenientFloat]
+ attribute double shadowOffsetX; // (default 0)
+ [LenientFloat]
+ attribute double shadowOffsetY; // (default 0)
+ [LenientFloat]
+ attribute double shadowBlur; // (default 0)
+ attribute DOMString shadowColor; // (default transparent black)
+
+ [Pref="canvas.filters.enabled", SetterThrows]
+ attribute DOMString filter; // (default empty string = no filter)
+
+ // rects
+ [LenientFloat]
+ void clearRect(double x, double y, double w, double h);
+ [LenientFloat]
+ void fillRect(double x, double y, double w, double h);
+ [LenientFloat]
+ void strokeRect(double x, double y, double w, double h);
+
+ // path API (see also CanvasPathMethods)
+ void beginPath();
+ void fill(optional CanvasWindingRule winding = "nonzero");
+ void fill(Path2D path, optional CanvasWindingRule winding = "nonzero");
+ void stroke();
+ void stroke(Path2D path);
+ [Pref="canvas.focusring.enabled", Throws] void drawFocusIfNeeded(Element element);
+// NOT IMPLEMENTED void drawSystemFocusRing(Path path, HTMLElement element);
+ [Pref="canvas.customfocusring.enabled"] boolean drawCustomFocusRing(Element element);
+// NOT IMPLEMENTED boolean drawCustomFocusRing(Path path, HTMLElement element);
+// NOT IMPLEMENTED void scrollPathIntoView();
+// NOT IMPLEMENTED void scrollPathIntoView(Path path);
+ void clip(optional CanvasWindingRule winding = "nonzero");
+ void clip(Path2D path, optional CanvasWindingRule winding = "nonzero");
+// NOT IMPLEMENTED void resetClip();
+ boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero");
+ boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero");
+ boolean isPointInStroke(double x, double y);
+ boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
+
+ // text (see also the CanvasDrawingStyles interface)
+ [Throws, LenientFloat]
+ void fillText(DOMString text, double x, double y, optional double maxWidth);
+ [Throws, LenientFloat]
+ void strokeText(DOMString text, double x, double y, optional double maxWidth);
+ [NewObject, Throws]
+ TextMetrics measureText(DOMString text);
+
+ // drawing images
+ attribute boolean imageSmoothingEnabled;
+
+ [Throws, LenientFloat]
+ void drawImage(CanvasImageSource image, double dx, double dy);
+ [Throws, LenientFloat]
+ void drawImage(CanvasImageSource image, double dx, double dy, double dw, double dh);
+ [Throws, LenientFloat]
+ void drawImage(CanvasImageSource image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
+
+ // hit regions
+ [Pref="canvas.hitregions.enabled", Throws] void addHitRegion(optional HitRegionOptions options);
+ [Pref="canvas.hitregions.enabled"] void removeHitRegion(DOMString id);
+ [Pref="canvas.hitregions.enabled"] void clearHitRegions();
+
+ // pixel manipulation
+ [NewObject, Throws]
+ ImageData createImageData(double sw, double sh);
+ [NewObject, Throws]
+ ImageData createImageData(ImageData imagedata);
+ [NewObject, Throws]
+ ImageData getImageData(double sx, double sy, double sw, double sh);
+ [Throws]
+ void putImageData(ImageData imagedata, double dx, double dy);
+ [Throws]
+ void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
+
+ // Mozilla-specific stuff
+ // FIXME Bug 768048 mozCurrentTransform/mozCurrentTransformInverse should return a WebIDL array.
+ [Throws]
+ attribute object mozCurrentTransform; // [ m11, m12, m21, m22, dx, dy ], i.e. row major
+ [Throws]
+ attribute object mozCurrentTransformInverse;
+
+ [SetterThrows]
+ attribute DOMString mozTextStyle;
+
+ // image smoothing mode -- if disabled, images won't be smoothed
+ // if scaled.
+ [Deprecated="PrefixedImageSmoothingEnabled"]
+ attribute boolean mozImageSmoothingEnabled;
+
+ // Show the caret if appropriate when drawing
+ [ChromeOnly]
+ const unsigned long DRAWWINDOW_DRAW_CARET = 0x01;
+ // Don't flush pending layout notifications that could otherwise
+ // be batched up
+ [ChromeOnly]
+ const unsigned long DRAWWINDOW_DO_NOT_FLUSH = 0x02;
+ // Draw scrollbars and scroll the viewport if they are present
+ [ChromeOnly]
+ const unsigned long DRAWWINDOW_DRAW_VIEW = 0x04;
+ // Use the widget layer manager if available. This means hardware
+ // acceleration may be used, but it might actually be slower or
+ // lower quality than normal. It will however more accurately reflect
+ // the pixels rendered to the screen.
+ [ChromeOnly]
+ const unsigned long DRAWWINDOW_USE_WIDGET_LAYERS = 0x08;
+ // Don't synchronously decode images - draw what we have
+ [ChromeOnly]
+ const unsigned long DRAWWINDOW_ASYNC_DECODE_IMAGES = 0x10;
+
+ /**
+ * Renders a region of a window into the canvas. The contents of
+ * the window's viewport are rendered, ignoring viewport clipping
+ * and scrolling.
+ *
+ * @param x
+ * @param y
+ * @param w
+ * @param h specify the area of the window to render, in CSS
+ * pixels.
+ *
+ * @param backgroundColor the canvas is filled with this color
+ * before we render the window into it. This color may be
+ * transparent/translucent. It is given as a CSS color string
+ * (e.g., rgb() or rgba()).
+ *
+ * @param flags Used to better control the drawWindow call.
+ * Flags can be ORed together.
+ *
+ * Of course, the rendering obeys the current scale, transform and
+ * globalAlpha values.
+ *
+ * Hints:
+ * -- If 'rgba(0,0,0,0)' is used for the background color, the
+ * drawing will be transparent wherever the window is transparent.
+ * -- Top-level browsed documents are usually not transparent
+ * because the user's background-color preference is applied,
+ * but IFRAMEs are transparent if the page doesn't set a background.
+ * -- If an opaque color is used for the background color, rendering
+ * will be faster because we won't have to compute the window's
+ * transparency.
+ *
+ * This API cannot currently be used by Web content. It is chrome
+ * only.
+ */
+ [Throws, ChromeOnly]
+ void drawWindow(Window window, double x, double y, double w, double h,
+ DOMString bgColor, optional unsigned long flags = 0);
+ [Throws, ChromeOnly]
+ void asyncDrawXULElement(XULElement elem, double x, double y, double w,
+ double h, DOMString bgColor,
+ optional unsigned long flags = 0);
+
+ /**
+ * This causes a context that is currently using a hardware-accelerated
+ * backend to fallback to a software one. All state should be preserved.
+ */
+ [ChromeOnly]
+ void demote();
+};
+CanvasRenderingContext2D implements CanvasDrawingStyles;
+CanvasRenderingContext2D implements CanvasPathMethods;
+
+[NoInterfaceObject]
+interface CanvasDrawingStyles {
+ // line caps/joins
+ [LenientFloat]
+ attribute double lineWidth; // (default 1)
+ attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
+ [GetterThrows]
+ attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
+ [LenientFloat]
+ attribute double miterLimit; // (default 10)
+
+ // dashed lines
+ [LenientFloat, Throws] void setLineDash(sequence<double> segments); // default empty
+ sequence<double> getLineDash();
+ [LenientFloat] attribute double lineDashOffset;
+
+ // text
+ [SetterThrows]
+ attribute DOMString font; // (default 10px sans-serif)
+ attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start")
+ attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
+};
+
+[NoInterfaceObject]
+interface CanvasPathMethods {
+ // shared path API methods
+ void closePath();
+ [LenientFloat]
+ void moveTo(double x, double y);
+ [LenientFloat]
+ void lineTo(double x, double y);
+ [LenientFloat]
+ void quadraticCurveTo(double cpx, double cpy, double x, double y);
+
+ [LenientFloat]
+ void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
+
+ [Throws, LenientFloat]
+ void arcTo(double x1, double y1, double x2, double y2, double radius);
+// NOT IMPLEMENTED [LenientFloat] void arcTo(double x1, double y1, double x2, double y2, double radiusX, double radiusY, double rotation);
+
+ [LenientFloat]
+ void rect(double x, double y, double w, double h);
+
+ [Throws, LenientFloat]
+ void arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false);
+
+ [Throws, LenientFloat]
+ void ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, optional boolean anticlockwise = false);
+};
+
+interface CanvasGradient {
+ // opaque object
+ [Throws]
+ // addColorStop should take a double
+ void addColorStop(float offset, DOMString color);
+};
+
+interface CanvasPattern {
+ // opaque object
+ // [Throws, LenientFloat] - could not do this overload because of bug 1020975
+ // void setTransform(double a, double b, double c, double d, double e, double f);
+
+ // No throw necessary here - SVGMatrix is always good.
+ void setTransform(SVGMatrix matrix);
+};
+
+interface TextMetrics {
+
+ // x-direction
+ readonly attribute double width; // advance width
+
+ /*
+ * NOT IMPLEMENTED YET
+
+ readonly attribute double actualBoundingBoxLeft;
+ readonly attribute double actualBoundingBoxRight;
+
+ // y-direction
+ readonly attribute double fontBoundingBoxAscent;
+ readonly attribute double fontBoundingBoxDescent;
+ readonly attribute double actualBoundingBoxAscent;
+ readonly attribute double actualBoundingBoxDescent;
+ readonly attribute double emHeightAscent;
+ readonly attribute double emHeightDescent;
+ readonly attribute double hangingBaseline;
+ readonly attribute double alphabeticBaseline;
+ readonly attribute double ideographicBaseline;
+ */
+
+};
+
+[Pref="canvas.path.enabled",
+ Constructor,
+ Constructor(Path2D other),
+ Constructor(DOMString pathString)]
+interface Path2D
+{
+ void addPath(Path2D path, optional SVGMatrix transformation);
+};
+Path2D implements CanvasPathMethods;
diff --git a/dom/webidl/CaretPosition.webidl b/dom/webidl/CaretPosition.webidl
new file mode 100644
index 000000000..5907b40d5
--- /dev/null
+++ b/dom/webidl/CaretPosition.webidl
@@ -0,0 +1,20 @@
+/* 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/. */
+
+interface CaretPosition {
+
+ /**
+ * The offsetNode could potentially be null due to anonymous content.
+ */
+ readonly attribute Node? offsetNode;
+ readonly attribute unsigned long offset;
+
+};
+
+/**
+ * Gecko specific methods and properties for CaretPosition.
+ */
+partial interface CaretPosition {
+ DOMRect? getClientRect();
+};
diff --git a/dom/webidl/CaretStateChangedEvent.webidl b/dom/webidl/CaretStateChangedEvent.webidl
new file mode 100644
index 000000000..39edd4d8f
--- /dev/null
+++ b/dom/webidl/CaretStateChangedEvent.webidl
@@ -0,0 +1,39 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+enum CaretChangedReason {
+ "visibilitychange",
+ "updateposition",
+ "longpressonemptycontent",
+ "taponcaret",
+ "presscaret",
+ "releasecaret",
+ "scroll"
+};
+
+dictionary CaretStateChangedEventInit : EventInit {
+ boolean collapsed = true;
+ DOMRectReadOnly? boundingClientRect = null;
+ CaretChangedReason reason = "visibilitychange";
+ boolean caretVisible = false;
+ boolean caretVisuallyVisible = false;
+ boolean selectionVisible = false;
+ boolean selectionEditable = false;
+ DOMString selectedTextContent = "";
+};
+
+[Constructor(DOMString type, optional CaretStateChangedEventInit eventInit),
+ ChromeOnly]
+interface CaretStateChangedEvent : Event {
+ readonly attribute boolean collapsed;
+ readonly attribute DOMRectReadOnly? boundingClientRect;
+ readonly attribute CaretChangedReason reason;
+ readonly attribute boolean caretVisible;
+ readonly attribute boolean caretVisuallyVisible;
+ readonly attribute boolean selectionVisible;
+ readonly attribute boolean selectionEditable;
+ readonly attribute DOMString selectedTextContent;
+};
diff --git a/dom/webidl/ChannelMergerNode.webidl b/dom/webidl/ChannelMergerNode.webidl
new file mode 100644
index 000000000..a1a7148f2
--- /dev/null
+++ b/dom/webidl/ChannelMergerNode.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface ChannelMergerNode : AudioNode {
+
+};
+
diff --git a/dom/webidl/ChannelSplitterNode.webidl b/dom/webidl/ChannelSplitterNode.webidl
new file mode 100644
index 000000000..c7c0be498
--- /dev/null
+++ b/dom/webidl/ChannelSplitterNode.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface ChannelSplitterNode : AudioNode {
+
+};
+
diff --git a/dom/webidl/CharacterData.webidl b/dom/webidl/CharacterData.webidl
new file mode 100644
index 000000000..8d6a214e5
--- /dev/null
+++ b/dom/webidl/CharacterData.webidl
@@ -0,0 +1,31 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#characterdata
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface CharacterData : Node {
+ [TreatNullAs=EmptyString, Pure, SetterThrows]
+ attribute DOMString data;
+ [Pure]
+ readonly attribute unsigned long length;
+ [Throws]
+ DOMString substringData(unsigned long offset, unsigned long count);
+ [Throws]
+ void appendData(DOMString data);
+ [Throws]
+ void insertData(unsigned long offset, DOMString data);
+ [Throws]
+ void deleteData(unsigned long offset, unsigned long count);
+ [Throws]
+ void replaceData(unsigned long offset, unsigned long count, DOMString data);
+};
+
+CharacterData implements ChildNode;
+CharacterData implements NonDocumentTypeChildNode;
diff --git a/dom/webidl/CheckerboardReportService.webidl b/dom/webidl/CheckerboardReportService.webidl
new file mode 100644
index 000000000..d5a624e0f
--- /dev/null
+++ b/dom/webidl/CheckerboardReportService.webidl
@@ -0,0 +1,58 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/*
+ * This file declares data structures used to communicate checkerboard reports
+ * from C++ code to about:checkerboard (see bug 1238042). These dictionaries
+ * are NOT exposed to standard web content.
+ */
+
+enum CheckerboardReason {
+ "severe",
+ "recent"
+};
+
+// Individual checkerboard report. Contains fields for the severity of the
+// checkerboard event, the timestamp at which it was reported, the detailed
+// log of the event, and the reason this report was saved (currently either
+// "severe" or "recent").
+dictionary CheckerboardReport {
+ unsigned long severity;
+ DOMTimeStamp timestamp; // milliseconds since epoch
+ DOMString log;
+ CheckerboardReason reason;
+};
+
+// The guard function only allows creation of this interface on the
+// about:checkerboard page, and only if it's in the parent process.
+[Func="mozilla::dom::CheckerboardReportService::IsEnabled",
+ Constructor]
+interface CheckerboardReportService {
+ /**
+ * Gets the available checkerboard reports.
+ */
+ sequence<CheckerboardReport> getReports();
+
+ /**
+ * Gets the state of the apz.record_checkerboarding pref.
+ */
+ boolean isRecordingEnabled();
+
+ /**
+ * Sets the state of the apz.record_checkerboarding pref.
+ */
+ void setRecordingEnabled(boolean aEnabled);
+
+ /**
+ * Flush any in-progress checkerboard reports. Since this happens
+ * asynchronously, the caller may register an observer with the observer
+ * service to be notified when this operation is complete. The observer should
+ * listen for the topic "APZ:FlushActiveCheckerboard:Done". Upon receiving
+ * this notification, the caller may call getReports() to obtain the flushed
+ * reports, along with any other reports that are available.
+ */
+ void flushActiveReports();
+};
diff --git a/dom/webidl/ChildNode.webidl b/dom/webidl/ChildNode.webidl
new file mode 100644
index 000000000..fcf388059
--- /dev/null
+++ b/dom/webidl/ChildNode.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#interface-childnode
+ */
+
+[NoInterfaceObject]
+interface ChildNode {
+ [Throws, Unscopable]
+ void before((Node or DOMString)... nodes);
+ [Throws, Unscopable]
+ void after((Node or DOMString)... nodes);
+ [Throws, Unscopable]
+ void replaceWith((Node or DOMString)... nodes);
+ [Unscopable]
+ void remove();
+};
+
+[NoInterfaceObject]
+interface NonDocumentTypeChildNode {
+ [Pure]
+ readonly attribute Element? previousElementSibling;
+ [Pure]
+ readonly attribute Element? nextElementSibling;
+};
diff --git a/dom/webidl/ChromeNodeList.webidl b/dom/webidl/ChromeNodeList.webidl
new file mode 100644
index 000000000..3f062f2a3
--- /dev/null
+++ b/dom/webidl/ChromeNodeList.webidl
@@ -0,0 +1,13 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor, Func="IsChromeOrXBL"]
+interface ChromeNodeList : NodeList {
+ [Throws]
+ void append(Node aNode);
+ [Throws]
+ void remove(Node aNode);
+};
diff --git a/dom/webidl/ChromeUtils.webidl b/dom/webidl/ChromeUtils.webidl
new file mode 100644
index 000000000..a66590e84
--- /dev/null
+++ b/dom/webidl/ChromeUtils.webidl
@@ -0,0 +1,92 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * A collection of static utility methods that are only exposed to Chrome. This
+ * interface is not exposed in workers, while ThreadSafeChromeUtils is.
+ */
+[ChromeOnly, Exposed=(Window,System)]
+interface ChromeUtils : ThreadSafeChromeUtils {
+ /**
+ * A helper that converts OriginAttributesDictionary to a opaque suffix string.
+ *
+ * @param originAttrs The originAttributes from the caller.
+ */
+ static ByteString
+ originAttributesToSuffix(optional OriginAttributesDictionary originAttrs);
+
+ /**
+ * Returns true if the members of |originAttrs| match the provided members
+ * of |pattern|.
+ *
+ * @param originAttrs The originAttributes under consideration.
+ * @param pattern The pattern to use for matching.
+ */
+ static boolean
+ originAttributesMatchPattern(optional OriginAttributesDictionary originAttrs,
+ optional OriginAttributesPatternDictionary pattern);
+
+ /**
+ * Returns an OriginAttributesDictionary with values from the |origin| suffix
+ * and unspecified attributes added and assigned default values.
+ *
+ * @param origin The origin URI to create from.
+ * @returns An OriginAttributesDictionary with values from
+ * the origin suffix and unspecified attributes
+ * added and assigned default values.
+ */
+ [Throws]
+ static OriginAttributesDictionary
+ createOriginAttributesFromOrigin(DOMString origin);
+
+ /**
+ * Returns an OriginAttributesDictionary that is a copy of |originAttrs| with
+ * unspecified attributes added and assigned default values.
+ *
+ * @param originAttrs The origin attributes to copy.
+ * @returns An OriginAttributesDictionary copy of |originAttrs|
+ * with unspecified attributes added and assigned
+ * default values.
+ */
+ static OriginAttributesDictionary
+ fillNonDefaultOriginAttributes(optional OriginAttributesDictionary originAttrs);
+
+ /**
+ * Returns true if the 2 OriginAttributes are equal.
+ */
+ static boolean
+ isOriginAttributesEqual(optional OriginAttributesDictionary aA,
+ optional OriginAttributesDictionary aB);
+};
+
+/**
+ * Used by principals and the script security manager to represent origin
+ * attributes. The first dictionary is designed to contain the full set of
+ * OriginAttributes, the second is used for pattern-matching (i.e. does this
+ * OriginAttributesDictionary match the non-empty attributes in this pattern).
+ *
+ * IMPORTANT: If you add any members here, you need to do the following:
+ * (1) Add them to both dictionaries.
+ * (2) Update the methods on mozilla::OriginAttributes, including equality,
+ * serialization, deserialization, and inheritance.
+ * (3) Update the methods on mozilla::OriginAttributesPattern, including matching.
+ */
+dictionary OriginAttributesDictionary {
+ unsigned long appId = 0;
+ unsigned long userContextId = 0;
+ boolean inIsolatedMozBrowser = false;
+ DOMString addonId = "";
+ unsigned long privateBrowsingId = 0;
+ DOMString firstPartyDomain = "";
+};
+dictionary OriginAttributesPatternDictionary {
+ unsigned long appId;
+ unsigned long userContextId;
+ boolean inIsolatedMozBrowser;
+ DOMString addonId;
+ unsigned long privateBrowsingId;
+ DOMString firstPartyDomain;
+};
diff --git a/dom/webidl/Client.webidl b/dom/webidl/Client.webidl
new file mode 100644
index 000000000..3e79c6a63
--- /dev/null
+++ b/dom/webidl/Client.webidl
@@ -0,0 +1,38 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
+ *
+ */
+
+[Exposed=ServiceWorker]
+interface Client {
+ readonly attribute USVString url;
+ readonly attribute FrameType frameType;
+ readonly attribute DOMString id;
+
+ [Throws]
+ void postMessage(any message, optional sequence<Transferable> transfer);
+};
+
+[Exposed=ServiceWorker]
+interface WindowClient : Client {
+ readonly attribute VisibilityState visibilityState;
+ readonly attribute boolean focused;
+
+ [Throws, NewObject]
+ Promise<WindowClient> focus();
+
+ [Throws, NewObject]
+ Promise<WindowClient> navigate(USVString url);
+};
+
+enum FrameType {
+ "auxiliary",
+ "top-level",
+ "nested",
+ "none"
+};
diff --git a/dom/webidl/Clients.webidl b/dom/webidl/Clients.webidl
new file mode 100644
index 000000000..ebe7bf8f2
--- /dev/null
+++ b/dom/webidl/Clients.webidl
@@ -0,0 +1,36 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
+ *
+ */
+
+[Exposed=ServiceWorker]
+interface Clients {
+ // The objects returned will be new instances every time
+ [NewObject]
+ Promise<any> get(DOMString id);
+ [NewObject]
+ Promise<sequence<Client>> matchAll(optional ClientQueryOptions options);
+ [NewObject,
+ Func="mozilla::dom::ServiceWorkerGlobalScope::OpenWindowEnabled"]
+ Promise<WindowClient?> openWindow(USVString url);
+ [NewObject]
+ Promise<void> claim();
+};
+
+dictionary ClientQueryOptions {
+ boolean includeUncontrolled = false;
+ ClientType type = "window";
+};
+
+enum ClientType {
+ "window",
+ "worker",
+ "sharedworker",
+ "all"
+};
+
diff --git a/dom/webidl/ClipboardEvent.webidl b/dom/webidl/ClipboardEvent.webidl
new file mode 100644
index 000000000..8fe8a4935
--- /dev/null
+++ b/dom/webidl/ClipboardEvent.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface please see
+ * http://dev.w3.org/2006/webapi/clipops/#x5-clipboard-event-interfaces
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString type, optional ClipboardEventInit eventInitDict)]
+interface ClipboardEvent : Event
+{
+ readonly attribute DataTransfer? clipboardData;
+};
+
+dictionary ClipboardEventInit : EventInit
+{
+ DOMString data = "";
+ DOMString dataType = "";
+};
diff --git a/dom/webidl/CloseEvent.webidl b/dom/webidl/CloseEvent.webidl
new file mode 100644
index 000000000..946fdbebd
--- /dev/null
+++ b/dom/webidl/CloseEvent.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The nsIDOMCloseEvent interface is the interface to the event
+ * close on a WebSocket object.
+ *
+ * For more information on this interface, please see
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#closeevent
+ */
+
+[Constructor(DOMString type, optional CloseEventInit eventInitDict),LegacyEventInit]
+interface CloseEvent : Event
+{
+ readonly attribute boolean wasClean;
+ readonly attribute unsigned short code;
+ readonly attribute DOMString reason;
+};
+
+dictionary CloseEventInit : EventInit
+{
+ boolean wasClean = false;
+ unsigned short code = 0;
+ DOMString reason = "";
+};
diff --git a/dom/webidl/CommandEvent.webidl b/dom/webidl/CommandEvent.webidl
new file mode 100644
index 000000000..8c16e856c
--- /dev/null
+++ b/dom/webidl/CommandEvent.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface CommandEvent : Event {
+ readonly attribute DOMString? command;
+
+ void initCommandEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ DOMString? command);
+};
diff --git a/dom/webidl/Comment.webidl b/dom/webidl/Comment.webidl
new file mode 100644
index 000000000..023335f16
--- /dev/null
+++ b/dom/webidl/Comment.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#comment
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(optional DOMString data = "")]
+interface Comment : CharacterData {
+};
diff --git a/dom/webidl/CompositionEvent.webidl b/dom/webidl/CompositionEvent.webidl
new file mode 100644
index 000000000..c293683ce
--- /dev/null
+++ b/dom/webidl/CompositionEvent.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-CompositionEvent
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface CompositionEvent : UIEvent
+{
+ readonly attribute DOMString? data;
+ readonly attribute DOMString locale;
+
+ /**
+ * ranges is trying to expose TextRangeArray in Gecko so a
+ * js-plugin couble be able to know the clauses information
+ */
+ [ChromeOnly,Cached,Pure]
+ readonly attribute sequence<TextClause> ranges;
+};
+
+partial interface CompositionEvent
+{
+ void initCompositionEvent(DOMString typeArg,
+ boolean canBubbleArg,
+ boolean cancelableArg,
+ Window? viewArg,
+ DOMString? dataArg,
+ DOMString localeArg);
+};
diff --git a/dom/webidl/Console.webidl b/dom/webidl/Console.webidl
new file mode 100644
index 000000000..2e8d6b1cf
--- /dev/null
+++ b/dom/webidl/Console.webidl
@@ -0,0 +1,109 @@
+/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 et sw=2 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/. */
+
+[Exposed=(Window,Worker,WorkerDebugger,Worklet),
+ ClassString="Console",
+ ProtoObjectHack]
+namespace console {
+ void log(any... data);
+ void info(any... data);
+ void warn(any... data);
+ void error(any... data);
+ void _exception(any... data);
+ void debug(any... data);
+ void table(any... data);
+ void trace();
+ void dir(any... data);
+ void dirxml(any... data);
+ void group(any... data);
+ void groupCollapsed(any... data);
+ void groupEnd(any... data);
+ void time(optional any time);
+ void timeEnd(optional any time);
+ void timeStamp(optional any data);
+ void clear(any... data);
+
+ void profile(any... data);
+ void profileEnd(any... data);
+
+ void assert(boolean condition, any... data);
+ void count(any... data);
+
+ // No-op methods for compatibility with other browsers.
+ [BinaryName="noopMethod"]
+ void markTimeline();
+ [BinaryName="noopMethod"]
+ void timeline();
+ [BinaryName="noopMethod"]
+ void timelineEnd();
+
+ [ChromeOnly]
+ const boolean IS_NATIVE_CONSOLE = true;
+};
+
+// This is used to propagate console events to the observers.
+dictionary ConsoleEvent {
+ (unsigned long long or DOMString) ID;
+ (unsigned long long or DOMString) innerID;
+ any originAttributes = null;
+ DOMString level = "";
+ DOMString filename = "";
+ unsigned long lineNumber = 0;
+ unsigned long columnNumber = 0;
+ DOMString functionName = "";
+ double timeStamp = 0;
+ sequence<any> arguments;
+ sequence<DOMString?> styles;
+ boolean private = false;
+ // stacktrace is handled via a getter in some cases so we can construct it
+ // lazily. Note that we're not making this whole thing an interface because
+ // consumers expect to see own properties on it, which would mean making the
+ // props unforgeable, which means lots of JSFunction allocations. Maybe we
+ // should fix those consumers, of course....
+ // sequence<ConsoleStackEntry> stacktrace;
+ DOMString groupName = "";
+ any timer = null;
+ any counter = null;
+};
+
+// Event for profile operations
+dictionary ConsoleProfileEvent {
+ DOMString action = "";
+ sequence<any> arguments;
+};
+
+// This dictionary is used to manage stack trace data.
+dictionary ConsoleStackEntry {
+ DOMString filename = "";
+ unsigned long lineNumber = 0;
+ unsigned long columnNumber = 0;
+ DOMString functionName = "";
+ unsigned long language = 0;
+ DOMString? asyncCause;
+};
+
+dictionary ConsoleTimerStart {
+ DOMString name = "";
+ double started = 0;
+};
+
+dictionary ConsoleTimerEnd {
+ DOMString name = "";
+ double duration = 0;
+};
+
+dictionary ConsoleTimerError {
+ DOMString error = "maxTimersExceeded";
+};
+
+dictionary ConsoleCounter {
+ DOMString label = "";
+ unsigned long count = 0;
+};
+
+dictionary ConsoleCounterError {
+ DOMString error = "maxCountersExceeded";
+};
diff --git a/dom/webidl/ConstantSourceNode.webidl b/dom/webidl/ConstantSourceNode.webidl
new file mode 100644
index 000000000..eabdc304c
--- /dev/null
+++ b/dom/webidl/ConstantSourceNode.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+dictionary ConstantSourceOptions {
+ float offset = 1;
+};
+
+[Pref="dom.webaudio.enabled",
+ Constructor(AudioContext context, optional ConstantSourceOptions options)]
+interface ConstantSourceNode : AudioNode {
+ readonly attribute AudioParam offset;
+ attribute EventHandler onended;
+ [Throws, UnsafeInPrerendering]
+ void start (optional double when = 0);
+ [Throws, UnsafeInPrerendering]
+ void stop (optional double when = 0);
+};
diff --git a/dom/webidl/ContainerBoxObject.webidl b/dom/webidl/ContainerBoxObject.webidl
new file mode 100644
index 000000000..f2dd9ffa5
--- /dev/null
+++ b/dom/webidl/ContainerBoxObject.webidl
@@ -0,0 +1,12 @@
+
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[NoInterfaceObject]
+interface ContainerBoxObject : BoxObject {
+ [ChromeOnly]
+ readonly attribute nsIDocShell? docShell;
+};
diff --git a/dom/webidl/ConvolverNode.webidl b/dom/webidl/ConvolverNode.webidl
new file mode 100644
index 000000000..b49af0400
--- /dev/null
+++ b/dom/webidl/ConvolverNode.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface ConvolverNode : AudioNode {
+
+ [SetterThrows]
+ attribute AudioBuffer? buffer;
+ attribute boolean normalize;
+
+};
+
+// Mozilla extension
+ConvolverNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/Coordinates.webidl b/dom/webidl/Coordinates.webidl
new file mode 100644
index 000000000..840782f74
--- /dev/null
+++ b/dom/webidl/Coordinates.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/geolocation-API
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface Coordinates {
+ readonly attribute double latitude;
+ readonly attribute double longitude;
+ readonly attribute double? altitude;
+ readonly attribute double accuracy;
+ readonly attribute double? altitudeAccuracy;
+ readonly attribute double? heading;
+ readonly attribute double? speed;
+};
diff --git a/dom/webidl/CreateOfferRequest.webidl b/dom/webidl/CreateOfferRequest.webidl
new file mode 100644
index 000000000..134fe33fa
--- /dev/null
+++ b/dom/webidl/CreateOfferRequest.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * This is an internal IDL file
+ */
+
+[ChromeOnly,
+ JSImplementation="@mozilla.org/dom/createofferrequest;1"]
+interface CreateOfferRequest {
+ readonly attribute unsigned long long windowID;
+ readonly attribute unsigned long long innerWindowID;
+ readonly attribute DOMString callID;
+ readonly attribute boolean isSecure;
+};
diff --git a/dom/webidl/Crypto.webidl b/dom/webidl/Crypto.webidl
new file mode 100644
index 000000000..31574a219
--- /dev/null
+++ b/dom/webidl/Crypto.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#crypto-interface
+ */
+
+[NoInterfaceObject, Exposed=(Window,Worker)]
+interface GlobalCrypto {
+ [Throws] readonly attribute Crypto crypto;
+};
+
+[Exposed=(Window,Worker)]
+interface Crypto {
+ readonly attribute SubtleCrypto subtle;
+
+ [Throws]
+ ArrayBufferView getRandomValues(ArrayBufferView array);
+};
diff --git a/dom/webidl/CustomElementRegistry.webidl b/dom/webidl/CustomElementRegistry.webidl
new file mode 100644
index 000000000..dff612174
--- /dev/null
+++ b/dom/webidl/CustomElementRegistry.webidl
@@ -0,0 +1,19 @@
+/* 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/. */
+
+// https://html.spec.whatwg.org/#dom-window-customelements
+[Func="CustomElementRegistry::IsCustomElementEnabled"]
+interface CustomElementRegistry {
+ [Throws]
+ void define(DOMString name, Function functionConstructor,
+ optional ElementDefinitionOptions options);
+ any get(DOMString name);
+ [Throws]
+ Promise<void> whenDefined(DOMString name);
+};
+
+dictionary ElementDefinitionOptions {
+ DOMString extends;
+};
+
diff --git a/dom/webidl/CustomEvent.webidl b/dom/webidl/CustomEvent.webidl
new file mode 100644
index 000000000..299a41ec0
--- /dev/null
+++ b/dom/webidl/CustomEvent.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString type, optional CustomEventInit eventInitDict),
+ Exposed=(Window, Worker)]
+interface CustomEvent : Event
+{
+ readonly attribute any detail;
+
+ // initCustomEvent is a Gecko specific deprecated method.
+ [Throws]
+ void initCustomEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ any detail);
+};
+
+dictionary CustomEventInit : EventInit
+{
+ any detail = null;
+};
diff --git a/dom/webidl/DOMCursor.webidl b/dom/webidl/DOMCursor.webidl
new file mode 100644
index 000000000..f5d0447ea
--- /dev/null
+++ b/dom/webidl/DOMCursor.webidl
@@ -0,0 +1,13 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[Exposed=(Window,Worker)]
+interface DOMCursor : EventTarget {
+ readonly attribute boolean done;
+ [Throws]
+ void continue();
+};
+
+DOMCursor implements DOMRequestShared;
diff --git a/dom/webidl/DOMError.webidl b/dom/webidl/DOMError.webidl
new file mode 100644
index 000000000..bd4a7b39d
--- /dev/null
+++ b/dom/webidl/DOMError.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#domerror
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString name, optional DOMString message = ""),
+ Exposed=(Window,Worker,System)]
+interface DOMError {
+ [Constant]
+ readonly attribute DOMString name;
+
+ [Constant]
+ readonly attribute DOMString message;
+};
diff --git a/dom/webidl/DOMException.webidl b/dom/webidl/DOMException.webidl
new file mode 100644
index 000000000..e91e20cca
--- /dev/null
+++ b/dom/webidl/DOMException.webidl
@@ -0,0 +1,110 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#exception-domexception
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+
+// This is the WebIDL version of nsIException. This is mostly legacy stuff.
+
+interface StackFrame;
+
+[NoInterfaceObject,
+ Exposed=(Window,Worker)]
+interface ExceptionMembers
+{
+ // A custom message set by the thrower. LenientThis so it can be
+ // gotten on the prototype, which Error.prototype.toString will do
+ // if someone tries to stringify DOMException.prototype.
+ [LenientThis]
+ readonly attribute DOMString message;
+ // The nsresult associated with this exception.
+ readonly attribute unsigned long result;
+ // The name of the error code (ie, a string repr of |result|).
+ // LenientThis so it can be gotten on the prototype, which
+ // Error.prototype.toString will do if someone tries to stringify
+ // DOMException.prototype.
+ [LenientThis]
+ readonly attribute DOMString name;
+
+ // Filename location. This is the location that caused the
+ // error, which may or may not be a source file location.
+ // For example, standard language errors would generally have
+ // the same location as their top stack entry. File
+ // parsers may put the location of the file they were parsing,
+ // etc.
+
+ // null indicates "no data"
+ readonly attribute DOMString filename;
+ // Valid line numbers begin at '1'. '0' indicates unknown.
+ readonly attribute unsigned long lineNumber;
+ // Valid column numbers begin at 0.
+ // We don't have an unambiguous indicator for unknown.
+ readonly attribute unsigned long columnNumber;
+
+ // A stack trace, if available. nsIStackFrame does not have classinfo so
+ // this was only ever usefully available to chrome JS.
+ [ChromeOnly, Exposed=Window]
+ readonly attribute StackFrame? location;
+
+ // Arbitary data for the implementation.
+ [Exposed=Window]
+ readonly attribute nsISupports? data;
+
+ // Formatted exception stack
+ [Throws, Replaceable]
+ readonly attribute DOMString stack;
+};
+
+[NoInterfaceObject, Exposed=(Window,Worker)]
+interface Exception {
+ // A generic formatter - make it suitable to print, etc.
+ stringifier;
+};
+
+Exception implements ExceptionMembers;
+
+// XXXkhuey this is an 'exception', not an interface, but we don't have any
+// parser or codegen mechanisms for dealing with exceptions.
+[ExceptionClass,
+ Exposed=(Window, Worker),
+ Constructor(optional DOMString message = "", optional DOMString name)]
+interface DOMException {
+ const unsigned short INDEX_SIZE_ERR = 1;
+ const unsigned short DOMSTRING_SIZE_ERR = 2; // historical
+ const unsigned short HIERARCHY_REQUEST_ERR = 3;
+ const unsigned short WRONG_DOCUMENT_ERR = 4;
+ const unsigned short INVALID_CHARACTER_ERR = 5;
+ const unsigned short NO_DATA_ALLOWED_ERR = 6; // historical
+ const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
+ const unsigned short NOT_FOUND_ERR = 8;
+ const unsigned short NOT_SUPPORTED_ERR = 9;
+ const unsigned short INUSE_ATTRIBUTE_ERR = 10; // historical
+ const unsigned short INVALID_STATE_ERR = 11;
+ const unsigned short SYNTAX_ERR = 12;
+ const unsigned short INVALID_MODIFICATION_ERR = 13;
+ const unsigned short NAMESPACE_ERR = 14;
+ const unsigned short INVALID_ACCESS_ERR = 15;
+ const unsigned short VALIDATION_ERR = 16; // historical
+ const unsigned short TYPE_MISMATCH_ERR = 17; // historical; use JavaScript's TypeError instead
+ const unsigned short SECURITY_ERR = 18;
+ const unsigned short NETWORK_ERR = 19;
+ const unsigned short ABORT_ERR = 20;
+ const unsigned short URL_MISMATCH_ERR = 21;
+ const unsigned short QUOTA_EXCEEDED_ERR = 22;
+ const unsigned short TIMEOUT_ERR = 23;
+ const unsigned short INVALID_NODE_TYPE_ERR = 24;
+ const unsigned short DATA_CLONE_ERR = 25;
+
+ readonly attribute unsigned short code;
+};
+
+// XXXkhuey copy all of Gecko's non-standard stuff onto DOMException, but leave
+// the prototype chain sane.
+DOMException implements ExceptionMembers;
diff --git a/dom/webidl/DOMImplementation.webidl b/dom/webidl/DOMImplementation.webidl
new file mode 100644
index 000000000..5fa3c8592
--- /dev/null
+++ b/dom/webidl/DOMImplementation.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#interface-domimplementation
+ *
+ * Copyright:
+ * To the extent possible under law, the editors have waived all copyright and
+ * related or neighboring rights to this work.
+ */
+
+interface DOMImplementation {
+ boolean hasFeature();
+
+ [Throws]
+ DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId,
+ DOMString systemId);
+ [Throws]
+ Document createDocument(DOMString? namespace,
+ [TreatNullAs=EmptyString] DOMString qualifiedName,
+ optional DocumentType? doctype = null);
+ [Throws]
+ Document createHTMLDocument(optional DOMString title);
+};
diff --git a/dom/webidl/DOMMatrix.webidl b/dom/webidl/DOMMatrix.webidl
new file mode 100644
index 000000000..6b236ae66
--- /dev/null
+++ b/dom/webidl/DOMMatrix.webidl
@@ -0,0 +1,148 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/fxtf/geometry/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="layout.css.DOMMatrix.enabled"]
+interface DOMMatrixReadOnly {
+ // These attributes are simple aliases for certain elements of the 4x4 matrix
+ readonly attribute unrestricted double a;
+ readonly attribute unrestricted double b;
+ readonly attribute unrestricted double c;
+ readonly attribute unrestricted double d;
+ readonly attribute unrestricted double e;
+ readonly attribute unrestricted double f;
+
+ readonly attribute unrestricted double m11;
+ readonly attribute unrestricted double m12;
+ readonly attribute unrestricted double m13;
+ readonly attribute unrestricted double m14;
+ readonly attribute unrestricted double m21;
+ readonly attribute unrestricted double m22;
+ readonly attribute unrestricted double m23;
+ readonly attribute unrestricted double m24;
+ readonly attribute unrestricted double m31;
+ readonly attribute unrestricted double m32;
+ readonly attribute unrestricted double m33;
+ readonly attribute unrestricted double m34;
+ readonly attribute unrestricted double m41;
+ readonly attribute unrestricted double m42;
+ readonly attribute unrestricted double m43;
+ readonly attribute unrestricted double m44;
+
+ // Immutable transform methods
+ DOMMatrix translate(unrestricted double tx,
+ unrestricted double ty,
+ optional unrestricted double tz = 0);
+ DOMMatrix scale(unrestricted double scale,
+ optional unrestricted double originX = 0,
+ optional unrestricted double originY = 0);
+ DOMMatrix scale3d(unrestricted double scale,
+ optional unrestricted double originX = 0,
+ optional unrestricted double originY = 0,
+ optional unrestricted double originZ = 0);
+ DOMMatrix scaleNonUniform(unrestricted double scaleX,
+ optional unrestricted double scaleY = 1,
+ optional unrestricted double scaleZ = 1,
+ optional unrestricted double originX = 0,
+ optional unrestricted double originY = 0,
+ optional unrestricted double originZ = 0);
+ DOMMatrix rotate(unrestricted double angle,
+ optional unrestricted double originX = 0,
+ optional unrestricted double originY = 0);
+ DOMMatrix rotateFromVector(unrestricted double x,
+ unrestricted double y);
+ DOMMatrix rotateAxisAngle(unrestricted double x,
+ unrestricted double y,
+ unrestricted double z,
+ unrestricted double angle);
+ DOMMatrix skewX(unrestricted double sx);
+ DOMMatrix skewY(unrestricted double sy);
+ DOMMatrix multiply(DOMMatrix other);
+ DOMMatrix flipX();
+ DOMMatrix flipY();
+ DOMMatrix inverse();
+
+ // Helper methods
+ readonly attribute boolean is2D;
+ readonly attribute boolean identity;
+ DOMPoint transformPoint(optional DOMPointInit point);
+ [Throws] Float32Array toFloat32Array();
+ [Throws] Float64Array toFloat64Array();
+ stringifier;
+};
+
+[Pref="layout.css.DOMMatrix.enabled",
+ Constructor,
+ Constructor(DOMString transformList),
+ Constructor(DOMMatrixReadOnly other),
+ Constructor(Float32Array array32),
+ Constructor(Float64Array array64),
+ Constructor(sequence<unrestricted double> numberSequence)]
+interface DOMMatrix : DOMMatrixReadOnly {
+ // These attributes are simple aliases for certain elements of the 4x4 matrix
+ inherit attribute unrestricted double a;
+ inherit attribute unrestricted double b;
+ inherit attribute unrestricted double c;
+ inherit attribute unrestricted double d;
+ inherit attribute unrestricted double e;
+ inherit attribute unrestricted double f;
+
+ inherit attribute unrestricted double m11;
+ inherit attribute unrestricted double m12;
+ inherit attribute unrestricted double m13;
+ inherit attribute unrestricted double m14;
+ inherit attribute unrestricted double m21;
+ inherit attribute unrestricted double m22;
+ inherit attribute unrestricted double m23;
+ inherit attribute unrestricted double m24;
+ inherit attribute unrestricted double m31;
+ inherit attribute unrestricted double m32;
+ inherit attribute unrestricted double m33;
+ inherit attribute unrestricted double m34;
+ inherit attribute unrestricted double m41;
+ inherit attribute unrestricted double m42;
+ inherit attribute unrestricted double m43;
+ inherit attribute unrestricted double m44;
+
+ // Mutable transform methods
+ DOMMatrix multiplySelf(DOMMatrix other);
+ DOMMatrix preMultiplySelf(DOMMatrix other);
+ DOMMatrix translateSelf(unrestricted double tx,
+ unrestricted double ty,
+ optional unrestricted double tz = 0);
+ DOMMatrix scaleSelf(unrestricted double scale,
+ optional unrestricted double originX = 0,
+ optional unrestricted double originY = 0);
+ DOMMatrix scale3dSelf(unrestricted double scale,
+ optional unrestricted double originX = 0,
+ optional unrestricted double originY = 0,
+ optional unrestricted double originZ = 0);
+ DOMMatrix scaleNonUniformSelf(unrestricted double scaleX,
+ optional unrestricted double scaleY = 1,
+ optional unrestricted double scaleZ = 1,
+ optional unrestricted double originX = 0,
+ optional unrestricted double originY = 0,
+ optional unrestricted double originZ = 0);
+ DOMMatrix rotateSelf(unrestricted double angle,
+ optional unrestricted double originX = 0,
+ optional unrestricted double originY = 0);
+ DOMMatrix rotateFromVectorSelf(unrestricted double x,
+ unrestricted double y);
+ DOMMatrix rotateAxisAngleSelf(unrestricted double x,
+ unrestricted double y,
+ unrestricted double z,
+ unrestricted double angle);
+ DOMMatrix skewXSelf(unrestricted double sx);
+ DOMMatrix skewYSelf(unrestricted double sy);
+ DOMMatrix invertSelf();
+ [Throws] DOMMatrix setMatrixValue(DOMString transformList);
+};
+
diff --git a/dom/webidl/DOMParser.webidl b/dom/webidl/DOMParser.webidl
new file mode 100644
index 000000000..154666697
--- /dev/null
+++ b/dom/webidl/DOMParser.webidl
@@ -0,0 +1,46 @@
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://domparsing.spec.whatwg.org/#the-domparser-interface
+ */
+
+interface Principal;
+interface URI;
+interface InputStream;
+
+enum SupportedType {
+ "text/html",
+ "text/xml",
+ "application/xml",
+ "application/xhtml+xml",
+ "image/svg+xml"
+};
+
+// the latter is Mozilla-specific
+[Constructor,
+ Constructor(Principal? prin, optional URI? documentURI = null,
+ optional URI? baseURI = null)]
+interface DOMParser {
+ [NewObject, Throws]
+ Document parseFromString(DOMString str, SupportedType type);
+
+ // Mozilla-specific stuff
+ // Throws if the passed-in length is greater than the actual sequence length
+ [NewObject, Throws, ChromeOnly]
+ Document parseFromBuffer(sequence<octet> buf, unsigned long bufLen,
+ SupportedType type);
+ // Throws if the passed-in length is greater than the actual typed array length
+ [NewObject, Throws, ChromeOnly]
+ Document parseFromBuffer(Uint8Array buf, unsigned long bufLen,
+ SupportedType type);
+ [NewObject, Throws, ChromeOnly]
+ Document parseFromStream(InputStream stream, DOMString? charset,
+ long contentLength, SupportedType type);
+ [Throws, ChromeOnly]
+ void init(optional Principal? principal = null,
+ optional URI? documentURI = null,
+ optional URI? baseURI = null);
+};
+
diff --git a/dom/webidl/DOMPoint.webidl b/dom/webidl/DOMPoint.webidl
new file mode 100644
index 000000000..d092d900f
--- /dev/null
+++ b/dom/webidl/DOMPoint.webidl
@@ -0,0 +1,37 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/fxtf/geometry/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="layout.css.DOMPoint.enabled"]
+interface DOMPointReadOnly {
+ readonly attribute unrestricted double x;
+ readonly attribute unrestricted double y;
+ readonly attribute unrestricted double z;
+ readonly attribute unrestricted double w;
+};
+
+[Pref="layout.css.DOMPoint.enabled",
+ Constructor(optional DOMPointInit point),
+ Constructor(unrestricted double x, unrestricted double y,
+ optional unrestricted double z = 0, optional unrestricted double w = 1)]
+interface DOMPoint : DOMPointReadOnly {
+ inherit attribute unrestricted double x;
+ inherit attribute unrestricted double y;
+ inherit attribute unrestricted double z;
+ inherit attribute unrestricted double w;
+};
+
+dictionary DOMPointInit {
+ unrestricted double x = 0;
+ unrestricted double y = 0;
+ unrestricted double z = 0;
+ unrestricted double w = 1;
+}; \ No newline at end of file
diff --git a/dom/webidl/DOMQuad.webidl b/dom/webidl/DOMQuad.webidl
new file mode 100644
index 000000000..b933987d5
--- /dev/null
+++ b/dom/webidl/DOMQuad.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/fxtf/geometry/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="layout.css.DOMQuad.enabled",
+ Constructor(optional DOMPointInit p1, optional DOMPointInit p2,
+ optional DOMPointInit p3, optional DOMPointInit p4),
+ Constructor(DOMRectReadOnly rect)]
+interface DOMQuad {
+ [SameObject] readonly attribute DOMPoint p1;
+ [SameObject] readonly attribute DOMPoint p2;
+ [SameObject] readonly attribute DOMPoint p3;
+ [SameObject] readonly attribute DOMPoint p4;
+ [SameObject] readonly attribute DOMRectReadOnly bounds;
+}; \ No newline at end of file
diff --git a/dom/webidl/DOMRect.webidl b/dom/webidl/DOMRect.webidl
new file mode 100644
index 000000000..24a07900c
--- /dev/null
+++ b/dom/webidl/DOMRect.webidl
@@ -0,0 +1,39 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/fxtf/geometry/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor,
+ Constructor(unrestricted double x, unrestricted double y,
+ unrestricted double width, unrestricted double height)]
+interface DOMRect : DOMRectReadOnly {
+ inherit attribute unrestricted double x;
+ inherit attribute unrestricted double y;
+ inherit attribute unrestricted double width;
+ inherit attribute unrestricted double height;
+};
+
+interface DOMRectReadOnly {
+ readonly attribute unrestricted double x;
+ readonly attribute unrestricted double y;
+ readonly attribute unrestricted double width;
+ readonly attribute unrestricted double height;
+ readonly attribute unrestricted double top;
+ readonly attribute unrestricted double right;
+ readonly attribute unrestricted double bottom;
+ readonly attribute unrestricted double left;
+};
+
+dictionary DOMRectInit {
+ unrestricted double x = 0;
+ unrestricted double y = 0;
+ unrestricted double width = 0;
+ unrestricted double height = 0;
+};
diff --git a/dom/webidl/DOMRectList.webidl b/dom/webidl/DOMRectList.webidl
new file mode 100644
index 000000000..172235e17
--- /dev/null
+++ b/dom/webidl/DOMRectList.webidl
@@ -0,0 +1,11 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[ArrayClass]
+interface DOMRectList {
+ readonly attribute unsigned long length;
+ getter DOMRect? item(unsigned long index);
+};
diff --git a/dom/webidl/DOMRequest.webidl b/dom/webidl/DOMRequest.webidl
new file mode 100644
index 000000000..60dc022a4
--- /dev/null
+++ b/dom/webidl/DOMRequest.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+enum DOMRequestReadyState { "pending", "done" };
+
+[Exposed=(Window,Worker,System), NoInterfaceObject]
+interface DOMRequestShared {
+ readonly attribute DOMRequestReadyState readyState;
+
+ readonly attribute any result;
+ readonly attribute DOMError? error;
+
+ attribute EventHandler onsuccess;
+ attribute EventHandler onerror;
+};
+
+[Exposed=(Window,Worker,System)]
+interface DOMRequest : EventTarget {
+ // The [TreatNonCallableAsNull] annotation is required since then() should do
+ // nothing instead of throwing errors when non-callable arguments are passed.
+ // See documentation for Promise.then to see why we return "any".
+ [NewObject, Throws]
+ any then([TreatNonCallableAsNull] optional AnyCallback? fulfillCallback = null,
+ [TreatNonCallableAsNull] optional AnyCallback? rejectCallback = null);
+};
+
+DOMRequest implements DOMRequestShared;
diff --git a/dom/webidl/DOMStringList.webidl b/dom/webidl/DOMStringList.webidl
new file mode 100644
index 000000000..56c5836ff
--- /dev/null
+++ b/dom/webidl/DOMStringList.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Exposed=(Window,Worker,System)]
+interface DOMStringList {
+ readonly attribute unsigned long length;
+ getter DOMString? item(unsigned long index);
+ boolean contains(DOMString string);
+};
diff --git a/dom/webidl/DOMStringMap.webidl b/dom/webidl/DOMStringMap.webidl
new file mode 100644
index 000000000..0ed98e148
--- /dev/null
+++ b/dom/webidl/DOMStringMap.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#domstringmap-0
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[OverrideBuiltins]
+interface DOMStringMap {
+ getter DOMString (DOMString name);
+ [Throws]
+ setter creator void (DOMString name, DOMString value);
+ deleter void (DOMString name);
+};
diff --git a/dom/webidl/DOMTokenList.webidl b/dom/webidl/DOMTokenList.webidl
new file mode 100644
index 000000000..a1ea243b3
--- /dev/null
+++ b/dom/webidl/DOMTokenList.webidl
@@ -0,0 +1,31 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface DOMTokenList {
+ readonly attribute unsigned long length;
+ getter DOMString? item(unsigned long index);
+ boolean contains(DOMString token);
+ [Throws]
+ void add(DOMString... tokens);
+ [Throws]
+ void remove(DOMString... tokens);
+ [Throws]
+ void replace(DOMString token, DOMString newToken);
+ [Throws]
+ boolean toggle(DOMString token, optional boolean force);
+ [Throws]
+ boolean supports(DOMString token);
+ [SetterThrows]
+ attribute DOMString value;
+ stringifier DOMString ();
+ iterable<DOMString?>;
+};
diff --git a/dom/webidl/DataChannel.webidl b/dom/webidl/DataChannel.webidl
new file mode 100644
index 000000000..43955745e
--- /dev/null
+++ b/dom/webidl/DataChannel.webidl
@@ -0,0 +1,48 @@
+/* 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/. */
+
+enum RTCDataChannelState {
+ "connecting",
+ "open",
+ "closing",
+ "closed"
+};
+
+enum RTCDataChannelType {
+ "arraybuffer",
+ "blob"
+};
+
+// XXX This interface is called RTCDataChannel in the spec.
+interface DataChannel : EventTarget
+{
+ readonly attribute DOMString label;
+ readonly attribute boolean reliable;
+ readonly attribute RTCDataChannelState readyState;
+ readonly attribute unsigned long bufferedAmount;
+ attribute unsigned long bufferedAmountLowThreshold;
+ attribute EventHandler onopen;
+ attribute EventHandler onerror;
+ attribute EventHandler onclose;
+ void close();
+ attribute EventHandler onmessage;
+ attribute EventHandler onbufferedamountlow;
+ attribute RTCDataChannelType binaryType;
+ [Throws]
+ void send(DOMString data);
+ [Throws]
+ void send(Blob data);
+ [Throws]
+ void send(ArrayBuffer data);
+ [Throws]
+ void send(ArrayBufferView data);
+};
+
+// Mozilla extensions.
+partial interface DataChannel
+{
+ readonly attribute DOMString protocol;
+ readonly attribute boolean ordered;
+ readonly attribute unsigned short id;
+};
diff --git a/dom/webidl/DataContainerEvent.webidl b/dom/webidl/DataContainerEvent.webidl
new file mode 100644
index 000000000..968421040
--- /dev/null
+++ b/dom/webidl/DataContainerEvent.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface nsIVariant;
+
+[ChromeOnly]
+interface DataContainerEvent : Event {
+ /**
+ * Return the data associated with the given key.
+ *
+ * @param key the key
+ * @return the data associated with the key
+ */
+ nsIVariant? getData(DOMString? key);
+
+ /**
+ * Set the data for the given key.
+ *
+ * @param key the data key
+ * @param data the data
+ * @throws NS_ERROR_UNEXPECTED if the method is called during event
+ * dispatch
+ */
+ [Throws]
+ void setData(DOMString? key, any data);
+};
+
diff --git a/dom/webidl/DataTransfer.webidl b/dom/webidl/DataTransfer.webidl
new file mode 100644
index 000000000..206d80804
--- /dev/null
+++ b/dom/webidl/DataTransfer.webidl
@@ -0,0 +1,148 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is:
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-datatransfer-interface
+ */
+
+[ChromeConstructor(DOMString eventType, boolean isExternal)]
+interface DataTransfer {
+ attribute DOMString dropEffect;
+ attribute DOMString effectAllowed;
+
+ readonly attribute DataTransferItemList items;
+
+ [Throws]
+ void setDragImage(Element image, long x, long y);
+
+ // ReturnValueNeedsContainsHack on .types because lots of extension
+ // code was expecting .contains() back when it was a DOMStringList.
+ [Pure, Cached, Frozen, NeedsSubjectPrincipal, ReturnValueNeedsContainsHack]
+ readonly attribute sequence<DOMString> types;
+ [Throws, NeedsSubjectPrincipal]
+ DOMString getData(DOMString format);
+ [Throws, NeedsSubjectPrincipal]
+ void setData(DOMString format, DOMString data);
+ [Throws, NeedsSubjectPrincipal]
+ void clearData(optional DOMString format);
+ [Throws, NeedsSubjectPrincipal]
+ readonly attribute FileList? files;
+};
+
+partial interface DataTransfer {
+ [Throws, Pref="dom.input.dirpicker", NeedsSubjectPrincipal]
+ Promise<sequence<(File or Directory)>> getFilesAndDirectories();
+
+ [Throws, Pref="dom.input.dirpicker", NeedsSubjectPrincipal]
+ Promise<sequence<File>> getFiles(optional boolean recursiveFlag = false);
+};
+
+// Mozilla specific stuff
+partial interface DataTransfer {
+ /*
+ * Set the drag source. Usually you would not change this, but it will
+ * affect which node the drag and dragend events are fired at. The
+ * default target is the node that was dragged.
+ *
+ * @param element drag source to use
+ * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
+ */
+ [Throws]
+ void addElement(Element element);
+
+ /**
+ * The number of items being dragged.
+ */
+ readonly attribute unsigned long mozItemCount;
+
+ /**
+ * Sets the drag cursor state. Primarily used to control the cursor during
+ * tab drags, but could be expanded to other uses. XXX Currently implemented
+ * on Win32 only.
+ *
+ * Possible values:
+ * auto - use default system behavior.
+ * default - set the cursor to an arrow during the drag operation.
+ *
+ * Values other than 'default' are indentical to setting mozCursor to
+ * 'auto'.
+ */
+ attribute DOMString mozCursor;
+
+ /**
+ * Holds a list of the format types of the data that is stored for an item
+ * at the specified index. If the index is not in the range from 0 to
+ * itemCount - 1, an empty string list is returned.
+ */
+ [Throws]
+ DOMStringList mozTypesAt(unsigned long index);
+
+ /**
+ * Remove the data associated with the given format for an item at the
+ * specified index. The index is in the range from zero to itemCount - 1.
+ *
+ * If the last format for the item is removed, the entire item is removed,
+ * reducing the itemCount by one.
+ *
+ * If format is empty, then the data associated with all formats is removed.
+ * If the format is not found, then this method has no effect.
+ *
+ * @param format the format to remove
+ * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount
+ * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
+ */
+ [Throws, NeedsSubjectPrincipal]
+ void mozClearDataAt(DOMString format, unsigned long index);
+
+ /*
+ * A data transfer may store multiple items, each at a given zero-based
+ * index. setDataAt may only be called with an index argument less than
+ * itemCount in which case an existing item is modified, or equal to
+ * itemCount in which case a new item is added, and the itemCount is
+ * incremented by one.
+ *
+ * Data should be added in order of preference, with the most specific
+ * format added first and the least specific format added last. If data of
+ * the given format already exists, it is replaced in the same position as
+ * the old data.
+ *
+ * The data should be either a string, a primitive boolean or number type
+ * (which will be converted into a string) or an nsISupports.
+ *
+ * @param format the format to add
+ * @param data the data to add
+ * @throws NS_ERROR_NULL_POINTER if the data is null
+ * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater than itemCount
+ * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
+ */
+ [Throws, NeedsSubjectPrincipal]
+ void mozSetDataAt(DOMString format, any data, unsigned long index);
+
+ /**
+ * Retrieve the data associated with the given format for an item at the
+ * specified index, or null if it does not exist. The index should be in the
+ * range from zero to itemCount - 1.
+ *
+ * @param format the format of the data to look up
+ * @returns the data of the given format, or null if it doesn't exist.
+ * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount
+ */
+ [Throws, NeedsSubjectPrincipal]
+ any mozGetDataAt(DOMString format, unsigned long index);
+
+ /**
+ * Will be true when the user has cancelled the drag (typically by pressing
+ * Escape) and when the drag has been cancelled unexpectedly. This will be
+ * false otherwise, including when the drop has been rejected by its target.
+ * This property is only relevant for the dragend event.
+ */
+ readonly attribute boolean mozUserCancelled;
+
+ /**
+ * The node that the mouse was pressed over to begin the drag. For external
+ * drags, or if the caller cannot access this node, this will be null.
+ */
+ readonly attribute Node? mozSourceNode;
+};
diff --git a/dom/webidl/DataTransferItem.webidl b/dom/webidl/DataTransferItem.webidl
new file mode 100644
index 000000000..449498104
--- /dev/null
+++ b/dom/webidl/DataTransferItem.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is:
+ * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitem-interface
+ */
+
+interface DataTransferItem {
+ readonly attribute DOMString kind;
+ readonly attribute DOMString type;
+ [Throws, NeedsSubjectPrincipal]
+ void getAsString(FunctionStringCallback? _callback);
+ [Throws, NeedsSubjectPrincipal]
+ File? getAsFile();
+};
+
+callback FunctionStringCallback = void (DOMString data);
+
+partial interface DataTransferItem {
+ [Pref="dom.webkitBlink.filesystem.enabled", BinaryName="getAsEntry", Throws,
+ NeedsSubjectPrincipal]
+ FileSystemEntry? webkitGetAsEntry();
+};
diff --git a/dom/webidl/DataTransferItemList.webidl b/dom/webidl/DataTransferItemList.webidl
new file mode 100644
index 000000000..079afdd14
--- /dev/null
+++ b/dom/webidl/DataTransferItemList.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is:
+ * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitemlist-interface
+ */
+
+interface DataTransferItemList {
+ readonly attribute unsigned long length;
+ getter DataTransferItem (unsigned long index);
+ [Throws, NeedsSubjectPrincipal]
+ DataTransferItem? add(DOMString data, DOMString type);
+ [Throws, NeedsSubjectPrincipal]
+ DataTransferItem? add(File data);
+ [Throws, NeedsSubjectPrincipal]
+ void remove(unsigned long index);
+ [Throws, NeedsSubjectPrincipal]
+ void clear();
+};
diff --git a/dom/webidl/DecoderDoctorNotification.webidl b/dom/webidl/DecoderDoctorNotification.webidl
new file mode 100644
index 000000000..ef4ca8311
--- /dev/null
+++ b/dom/webidl/DecoderDoctorNotification.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+enum DecoderDoctorNotificationType {
+ "cannot-play",
+ "platform-decoder-not-found",
+ "can-play-but-some-missing-decoders",
+ "cannot-initialize-pulseaudio",
+ "unsupported-libavcodec",
+};
+
+dictionary DecoderDoctorNotification {
+ required DecoderDoctorNotificationType type;
+ // True when the issue has been solved.
+ required boolean isSolved;
+ // Key from dom.properties, used for telemetry and prefs.
+ required DOMString decoderDoctorReportId;
+ // If provided, formats (or key systems) at issue.
+ DOMString formats;
+};
diff --git a/dom/webidl/DedicatedWorkerGlobalScope.webidl b/dom/webidl/DedicatedWorkerGlobalScope.webidl
new file mode 100644
index 000000000..26dca58da
--- /dev/null
+++ b/dom/webidl/DedicatedWorkerGlobalScope.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
+ * Software ASA.
+ * You are granted a license to use, reproduce and create derivative works of
+ * this document.
+ */
+
+[Global=(Worker,DedicatedWorker),
+ Exposed=DedicatedWorker]
+interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
+ [Throws]
+ void postMessage(any message, optional sequence<any> transfer);
+
+ attribute EventHandler onmessage;
+};
diff --git a/dom/webidl/DelayNode.webidl b/dom/webidl/DelayNode.webidl
new file mode 100644
index 000000000..6a8fb5c3a
--- /dev/null
+++ b/dom/webidl/DelayNode.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface DelayNode : AudioNode {
+
+ readonly attribute AudioParam delayTime;
+
+};
+
+// Mozilla extension
+DelayNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/DesktopNotification.webidl b/dom/webidl/DesktopNotification.webidl
new file mode 100644
index 000000000..18bfce9dc
--- /dev/null
+++ b/dom/webidl/DesktopNotification.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface MozObserver;
+
+[HeaderFile="mozilla/dom/DesktopNotification.h"]
+interface DesktopNotificationCenter
+{
+ [NewObject]
+ DesktopNotification createNotification(DOMString title,
+ DOMString description,
+ optional DOMString iconURL = "");
+};
+
+interface DesktopNotification : EventTarget
+{
+ [Throws]
+ void show();
+
+ attribute EventHandler onclick;
+
+ attribute EventHandler onclose;
+};
diff --git a/dom/webidl/DeviceLightEvent.webidl b/dom/webidl/DeviceLightEvent.webidl
new file mode 100644
index 000000000..453c67613
--- /dev/null
+++ b/dom/webidl/DeviceLightEvent.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional DeviceLightEventInit eventInitDict)]
+interface DeviceLightEvent : Event
+{
+ readonly attribute unrestricted double value;
+};
+
+dictionary DeviceLightEventInit : EventInit
+{
+ unrestricted double value = Infinity;
+};
diff --git a/dom/webidl/DeviceMotionEvent.webidl b/dom/webidl/DeviceMotionEvent.webidl
new file mode 100644
index 000000000..fa4ecf3ca
--- /dev/null
+++ b/dom/webidl/DeviceMotionEvent.webidl
@@ -0,0 +1,57 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[NoInterfaceObject]
+interface DeviceAcceleration {
+ readonly attribute double? x;
+ readonly attribute double? y;
+ readonly attribute double? z;
+};
+
+[NoInterfaceObject]
+interface DeviceRotationRate {
+ readonly attribute double? alpha;
+ readonly attribute double? beta;
+ readonly attribute double? gamma;
+};
+
+[Constructor(DOMString type, optional DeviceMotionEventInit eventInitDict)]
+interface DeviceMotionEvent : Event {
+ readonly attribute DeviceAcceleration? acceleration;
+ readonly attribute DeviceAcceleration? accelerationIncludingGravity;
+ readonly attribute DeviceRotationRate? rotationRate;
+ readonly attribute double? interval;
+};
+
+dictionary DeviceAccelerationInit {
+ double? x = null;
+ double? y = null;
+ double? z = null;
+};
+
+dictionary DeviceRotationRateInit {
+ double? alpha = null;
+ double? beta = null;
+ double? gamma = null;
+};
+
+dictionary DeviceMotionEventInit : EventInit {
+ DeviceAccelerationInit acceleration;
+ DeviceAccelerationInit accelerationIncludingGravity;
+ DeviceRotationRateInit rotationRate;
+ double? interval = null;
+};
+
+// Mozilla extensions.
+partial interface DeviceMotionEvent {
+ void initDeviceMotionEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ DeviceAccelerationInit acceleration,
+ DeviceAccelerationInit accelerationIncludingGravity,
+ DeviceRotationRateInit rotationRate,
+ double? interval);
+};
diff --git a/dom/webidl/DeviceOrientationEvent.webidl b/dom/webidl/DeviceOrientationEvent.webidl
new file mode 100644
index 000000000..46194453e
--- /dev/null
+++ b/dom/webidl/DeviceOrientationEvent.webidl
@@ -0,0 +1,31 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional DeviceOrientationEventInit eventInitDict), LegacyEventInit]
+interface DeviceOrientationEvent : Event
+{
+ readonly attribute double? alpha;
+ readonly attribute double? beta;
+ readonly attribute double? gamma;
+ readonly attribute boolean absolute;
+
+ // initDeviceOrientationEvent is a Gecko specific deprecated method.
+ void initDeviceOrientationEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ double? alpha,
+ double? beta,
+ double? gamma,
+ boolean absolute);
+};
+
+dictionary DeviceOrientationEventInit : EventInit
+{
+ double? alpha = null;
+ double? beta = null;
+ double? gamma = null;
+ boolean absolute = false;
+};
diff --git a/dom/webidl/DeviceProximityEvent.webidl b/dom/webidl/DeviceProximityEvent.webidl
new file mode 100644
index 000000000..0d3dc1275
--- /dev/null
+++ b/dom/webidl/DeviceProximityEvent.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional DeviceProximityEventInit eventInitDict)]
+interface DeviceProximityEvent : Event
+{
+ readonly attribute double value;
+ readonly attribute double min;
+ readonly attribute double max;
+};
+
+dictionary DeviceProximityEventInit : EventInit
+{
+ unrestricted double value = Infinity;
+ unrestricted double min = -Infinity;
+ unrestricted double max = Infinity;
+};
diff --git a/dom/webidl/Directory.webidl b/dom/webidl/Directory.webidl
new file mode 100644
index 000000000..942d50c7c
--- /dev/null
+++ b/dom/webidl/Directory.webidl
@@ -0,0 +1,53 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/*
+ * All functions on Directory that accept DOMString arguments for file or
+ * directory names only allow relative path to current directory itself. The
+ * path should be a descendent path like "path/to/file.txt" and not contain a
+ * segment of ".." or ".". So the paths aren't allowed to walk up the directory
+ * tree. For example, paths like "../foo", "..", "/foo/bar" or "foo/../bar" are
+ * not allowed.
+ *
+ * http://w3c.github.io/filesystem-api/#idl-def-Directory
+ * https://microsoftedge.github.io/directory-upload/proposal.html#directory-interface
+ */
+
+// This chromeConstructor is used by the MockFilePicker for testing only.
+[ChromeConstructor(DOMString path),
+ Exposed=(Window,Worker)]
+interface Directory {
+ /*
+ * The leaf name of the directory.
+ */
+ [Throws]
+ readonly attribute DOMString name;
+};
+
+[Exposed=(Window,Worker)]
+partial interface Directory {
+ // Already defined in the main interface declaration:
+ //readonly attribute DOMString name;
+
+ /*
+ * The path of the Directory (includes both its basename and leafname).
+ * The path begins with the name of the ancestor Directory that was
+ * originally exposed to content (say via a directory picker) and traversed
+ * to obtain this Directory. Full filesystem paths are not exposed to
+ * unprivilaged content.
+ */
+ [Throws]
+ readonly attribute DOMString path;
+
+ /*
+ * Getter for the immediate children of this directory.
+ */
+ [Throws]
+ Promise<sequence<(File or Directory)>> getFilesAndDirectories();
+
+ [Throws]
+ Promise<sequence<File>> getFiles(optional boolean recursiveFlag = false);
+};
diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl
new file mode 100644
index 000000000..c895fad39
--- /dev/null
+++ b/dom/webidl/Document.webidl
@@ -0,0 +1,452 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * http://dxr.mozilla.org/mozilla-central/source/dom/interfaces/core/nsIDOMDocument.idl
+ */
+
+interface WindowProxy;
+interface nsISupports;
+interface URI;
+interface nsIDocShell;
+interface nsILoadGroup;
+
+enum VisibilityState { "hidden", "visible", "prerender" };
+
+/* https://dom.spec.whatwg.org/#dictdef-elementcreationoptions */
+dictionary ElementCreationOptions {
+ DOMString is;
+};
+
+/* http://dom.spec.whatwg.org/#interface-document */
+[Constructor]
+interface Document : Node {
+ [Throws]
+ readonly attribute DOMImplementation implementation;
+ [Pure, Throws]
+ readonly attribute DOMString URL;
+ [Pure, Throws]
+ readonly attribute DOMString documentURI;
+ [Pure]
+ readonly attribute DOMString compatMode;
+ [Pure]
+ readonly attribute DOMString characterSet;
+ [Pure,BinaryName="characterSet"]
+ readonly attribute DOMString charset; // legacy alias of .characterSet
+ [Pure,BinaryName="characterSet"]
+ readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
+ [Pure]
+ readonly attribute DOMString contentType;
+
+ [Pure]
+ readonly attribute DocumentType? doctype;
+ [Pure]
+ readonly attribute Element? documentElement;
+ [Pure]
+ HTMLCollection getElementsByTagName(DOMString localName);
+ [Pure, Throws]
+ HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
+ [Pure]
+ HTMLCollection getElementsByClassName(DOMString classNames);
+ [Pure]
+ Element? getElementById(DOMString elementId);
+
+ [NewObject, Throws]
+ Element createElement(DOMString localName, optional (ElementCreationOptions or DOMString) options);
+ [NewObject, Throws]
+ Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (ElementCreationOptions or DOMString) options);
+ [NewObject]
+ DocumentFragment createDocumentFragment();
+ [NewObject]
+ Text createTextNode(DOMString data);
+ [NewObject]
+ Comment createComment(DOMString data);
+ [NewObject, Throws]
+ ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
+
+ [Throws]
+ Node importNode(Node node, optional boolean deep = false);
+ [Throws]
+ Node adoptNode(Node node);
+
+ [NewObject, Throws]
+ Event createEvent(DOMString interface);
+
+ [NewObject, Throws]
+ Range createRange();
+
+ // NodeFilter.SHOW_ALL = 0xFFFFFFFF
+ [NewObject, Throws]
+ NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
+ [NewObject, Throws]
+ TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
+
+ // NEW
+ // No support for prepend/append yet
+ // void prepend((Node or DOMString)... nodes);
+ // void append((Node or DOMString)... nodes);
+
+ // These are not in the spec, but leave them for now for backwards compat.
+ // So sort of like Gecko extensions
+ [NewObject, Throws]
+ CDATASection createCDATASection(DOMString data);
+ [NewObject, Throws]
+ Attr createAttribute(DOMString name);
+ [NewObject, Throws]
+ Attr createAttributeNS(DOMString? namespace, DOMString name);
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-document-object
+partial interface Document {
+ [PutForwards=href, Unforgeable] readonly attribute Location? location;
+ //(HTML only) attribute DOMString domain;
+ readonly attribute DOMString referrer;
+ //(HTML only) attribute DOMString cookie;
+ readonly attribute DOMString lastModified;
+ readonly attribute DOMString readyState;
+
+ // DOM tree accessors
+ //(Not proxy yet)getter object (DOMString name);
+ [SetterThrows, Pure]
+ attribute DOMString title;
+ [Pure]
+ attribute DOMString dir;
+ //(HTML only) attribute HTMLElement? body;
+ //(HTML only)readonly attribute HTMLHeadElement? head;
+ //(HTML only)readonly attribute HTMLCollection images;
+ //(HTML only)readonly attribute HTMLCollection embeds;
+ //(HTML only)readonly attribute HTMLCollection plugins;
+ //(HTML only)readonly attribute HTMLCollection links;
+ //(HTML only)readonly attribute HTMLCollection forms;
+ //(HTML only)readonly attribute HTMLCollection scripts;
+ //(HTML only)NodeList getElementsByName(DOMString elementName);
+ //(Not implemented)readonly attribute DOMElementMap cssElementMap;
+
+ // dynamic markup insertion
+ //(HTML only)Document open(optional DOMString type, optional DOMString replace);
+ //(HTML only)WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace);
+ //(HTML only)void close();
+ //(HTML only)void write(DOMString... text);
+ //(HTML only)void writeln(DOMString... text);
+
+ // user interaction
+ [Pure]
+ readonly attribute WindowProxy? defaultView;
+ readonly attribute Element? activeElement;
+ [Throws]
+ boolean hasFocus();
+ //(HTML only) attribute DOMString designMode;
+ //(HTML only)boolean execCommand(DOMString commandId);
+ //(HTML only)boolean execCommand(DOMString commandId, boolean showUI);
+ //(HTML only)boolean execCommand(DOMString commandId, boolean showUI, DOMString value);
+ //(HTML only)boolean queryCommandEnabled(DOMString commandId);
+ //(HTML only)boolean queryCommandIndeterm(DOMString commandId);
+ //(HTML only)boolean queryCommandState(DOMString commandId);
+ //(HTML only)boolean queryCommandSupported(DOMString commandId);
+ //(HTML only)DOMString queryCommandValue(DOMString commandId);
+ //(Not implemented)readonly attribute HTMLCollection commands;
+
+ // special event handler IDL attributes that only apply to Document objects
+ [LenientThis] attribute EventHandler onreadystatechange;
+
+ // Gecko extensions?
+ attribute EventHandler onwheel;
+ attribute EventHandler oncopy;
+ attribute EventHandler oncut;
+ attribute EventHandler onpaste;
+ attribute EventHandler onbeforescriptexecute;
+ attribute EventHandler onafterscriptexecute;
+
+ [Pref="dom.select_events.enabled"]
+ attribute EventHandler onselectionchange;
+
+ /**
+ * True if this document is synthetic : stand alone image, video, audio file,
+ * etc.
+ */
+ [Func="IsChromeOrXBL"] readonly attribute boolean mozSyntheticDocument;
+ /**
+ * Returns the script element whose script is currently being processed.
+ *
+ * @see <https://developer.mozilla.org/en/DOM/document.currentScript>
+ */
+ [Pure]
+ readonly attribute Element? currentScript;
+ /**
+ * Release the current mouse capture if it is on an element within this
+ * document.
+ *
+ * @see <https://developer.mozilla.org/en/DOM/document.releaseCapture>
+ */
+ void releaseCapture();
+ /**
+ * Use the given DOM element as the source image of target |-moz-element()|.
+ *
+ * This function introduces a new special ID (called "image element ID"),
+ * which is only used by |-moz-element()|, and associates it with the given
+ * DOM element. Image elements ID's have the higher precedence than general
+ * HTML id's, so if |document.mozSetImageElement(<id>, <element>)| is called,
+ * |-moz-element(#<id>)| uses |<element>| as the source image even if there
+ * is another element with id attribute = |<id>|. To unregister an image
+ * element ID |<id>|, call |document.mozSetImageElement(<id>, null)|.
+ *
+ * Example:
+ * <script>
+ * canvas = document.createElement("canvas");
+ * canvas.setAttribute("width", 100);
+ * canvas.setAttribute("height", 100);
+ * // draw to canvas
+ * document.mozSetImageElement("canvasbg", canvas);
+ * </script>
+ * <div style="background-image: -moz-element(#canvasbg);"></div>
+ *
+ * @param aImageElementId an image element ID to associate with
+ * |aImageElement|
+ * @param aImageElement a DOM element to be used as the source image of
+ * |-moz-element(#aImageElementId)|. If this is null, the function will
+ * unregister the image element ID |aImageElementId|.
+ *
+ * @see <https://developer.mozilla.org/en/DOM/document.mozSetImageElement>
+ */
+ void mozSetImageElement(DOMString aImageElementId,
+ Element? aImageElement);
+
+ [ChromeOnly]
+ readonly attribute URI? documentURIObject;
+
+ /**
+ * Current referrer policy - one of the REFERRER_POLICY_* constants
+ * from nsIHttpChannel.
+ */
+ [ChromeOnly]
+ readonly attribute unsigned long referrerPolicy;
+
+};
+
+// https://fullscreen.spec.whatwg.org/#api
+partial interface Document {
+ // Note: Per spec the 'S' in these two is lowercase, but the "Moz"
+ // versions have it uppercase.
+ [LenientSetter, Func="nsDocument::IsUnprefixedFullscreenEnabled"]
+ readonly attribute boolean fullscreen;
+ [BinaryName="fullscreen"]
+ readonly attribute boolean mozFullScreen;
+ [LenientSetter, Func="nsDocument::IsUnprefixedFullscreenEnabled"]
+ readonly attribute boolean fullscreenEnabled;
+ [BinaryName="fullscreenEnabled"]
+ readonly attribute boolean mozFullScreenEnabled;
+ [LenientSetter, Func="nsDocument::IsUnprefixedFullscreenEnabled"]
+ readonly attribute Element? fullscreenElement;
+ [BinaryName="fullscreenElement"]
+ readonly attribute Element? mozFullScreenElement;
+
+ [Func="nsDocument::IsUnprefixedFullscreenEnabled"]
+ void exitFullscreen();
+ [BinaryName="exitFullscreen"]
+ void mozCancelFullScreen();
+
+ // Events handlers
+ [Func="nsDocument::IsUnprefixedFullscreenEnabled"]
+ attribute EventHandler onfullscreenchange;
+ [Func="nsDocument::IsUnprefixedFullscreenEnabled"]
+ attribute EventHandler onfullscreenerror;
+};
+
+// https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
+// https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
+partial interface Document {
+ readonly attribute Element? pointerLockElement;
+ [BinaryName="pointerLockElement", Pref="pointer-lock-api.prefixed.enabled"]
+ readonly attribute Element? mozPointerLockElement;
+ void exitPointerLock();
+ [BinaryName="exitPointerLock", Pref="pointer-lock-api.prefixed.enabled"]
+ void mozExitPointerLock();
+
+ // Event handlers
+ attribute EventHandler onpointerlockchange;
+ attribute EventHandler onpointerlockerror;
+};
+
+//http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-document-register
+partial interface Document {
+ // this is deprecated from CustomElements v0
+ [Throws, Func="CustomElementRegistry::IsCustomElementEnabled"]
+ object registerElement(DOMString name, optional ElementRegistrationOptions options);
+};
+
+// http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#sec-document-interface
+partial interface Document {
+ readonly attribute boolean hidden;
+ readonly attribute VisibilityState visibilityState;
+};
+
+// http://dev.w3.org/csswg/cssom/#extensions-to-the-document-interface
+partial interface Document {
+ [Constant]
+ readonly attribute StyleSheetList styleSheets;
+ attribute DOMString? selectedStyleSheetSet;
+ readonly attribute DOMString? lastStyleSheetSet;
+ readonly attribute DOMString? preferredStyleSheetSet;
+ [Constant]
+ readonly attribute DOMStringList styleSheetSets;
+ void enableStyleSheetsForSet (DOMString? name);
+};
+
+// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-document-interface
+partial interface Document {
+ Element? elementFromPoint (float x, float y);
+ sequence<Element> elementsFromPoint (float x, float y);
+ CaretPosition? caretPositionFromPoint (float x, float y);
+
+ readonly attribute Element? scrollingElement;
+};
+
+// http://dev.w3.org/2006/webapi/selectors-api2/#interface-definitions
+partial interface Document {
+ [Throws, Pure]
+ Element? querySelector(DOMString selectors);
+ [Throws, Pure]
+ NodeList querySelectorAll(DOMString selectors);
+
+ //(Not implemented)Element? find(DOMString selectors, optional (Element or sequence<Node>)? refNodes);
+ //(Not implemented)NodeList findAll(DOMString selectors, optional (Element or sequence<Node>)? refNodes);
+};
+
+// http://w3c.github.io/web-animations/#extensions-to-the-document-interface
+partial interface Document {
+ [Func="nsDocument::IsWebAnimationsEnabled"]
+ readonly attribute DocumentTimeline timeline;
+ [Func="nsDocument::IsWebAnimationsEnabled"]
+ sequence<Animation> getAnimations();
+};
+
+// https://svgwg.org/svg2-draft/struct.html#InterfaceDocumentExtensions
+partial interface Document {
+ [BinaryName="SVGRootElement"]
+ readonly attribute SVGSVGElement? rootElement;
+};
+
+// Mozilla extensions of various sorts
+partial interface Document {
+ // nsIDOMDocumentXBL. Wish we could make these [ChromeOnly], but
+ // that would likely break bindings running with the page principal.
+ [Func="IsChromeOrXBL"]
+ NodeList? getAnonymousNodes(Element elt);
+ [Func="IsChromeOrXBL"]
+ Element? getAnonymousElementByAttribute(Element elt, DOMString attrName,
+ DOMString attrValue);
+ [Func="IsChromeOrXBL"]
+ Element? getBindingParent(Node node);
+ [Throws, Func="IsChromeOrXBL", NeedsSubjectPrincipal]
+ void loadBindingDocument(DOMString documentURL);
+
+ // nsIDOMDocumentTouch
+ // XXXbz I can't find the sane spec for this stuff, so just cribbing
+ // from our xpidl for now.
+ [NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
+ Touch createTouch(optional Window? view = null,
+ optional EventTarget? target = null,
+ optional long identifier = 0,
+ optional long pageX = 0,
+ optional long pageY = 0,
+ optional long screenX = 0,
+ optional long screenY = 0,
+ optional long clientX = 0,
+ optional long clientY = 0,
+ optional long radiusX = 0,
+ optional long radiusY = 0,
+ optional float rotationAngle = 0,
+ optional float force = 0);
+ // XXXbz a hack to get around the fact that we don't support variadics as
+ // distinguishing arguments yet. Once this hack is removed. we can also
+ // remove the corresponding overload on nsIDocument, since Touch... and
+ // sequence<Touch> look the same in the C++.
+ [NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
+ TouchList createTouchList(Touch touch, Touch... touches);
+ // XXXbz and another hack for the fact that we can't usefully have optional
+ // distinguishing arguments but need a working zero-arg form of
+ // createTouchList().
+ [NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
+ TouchList createTouchList();
+ [NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
+ TouchList createTouchList(sequence<Touch> touches);
+
+ [ChromeOnly]
+ attribute boolean styleSheetChangeEventsEnabled;
+
+ [ChromeOnly, Throws]
+ void obsoleteSheet(URI sheetURI);
+ [ChromeOnly, Throws]
+ void obsoleteSheet(DOMString sheetURI);
+
+ [ChromeOnly] readonly attribute nsIDocShell? docShell;
+
+ [ChromeOnly] readonly attribute DOMString contentLanguage;
+
+ [ChromeOnly] readonly attribute nsILoadGroup? documentLoadGroup;
+
+ // like documentURI, except that for error pages, it returns the URI we were
+ // trying to load when we hit an error, rather than the error page's own URI.
+ [ChromeOnly] readonly attribute URI? mozDocumentURIIfNotForErrorPages;
+};
+
+// Extension to give chrome JS the ability to determine when a document was
+// created to satisfy an iframe with srcdoc attribute.
+partial interface Document {
+ [ChromeOnly] readonly attribute boolean isSrcdocDocument;
+};
+
+
+// Extension to give chrome JS the ability to get the underlying
+// sandbox flag attribute
+partial interface Document {
+ [ChromeOnly] readonly attribute DOMString? sandboxFlagsAsString;
+};
+
+
+/**
+ * Chrome document anonymous content management.
+ * This is a Chrome-only API that allows inserting fixed positioned anonymous
+ * content on top of the current page displayed in the document.
+ * The supplied content is cloned and inserted into the document's CanvasFrame.
+ * Note that this only works for HTML documents.
+ */
+partial interface Document {
+ /**
+ * Deep-clones the provided element and inserts it into the CanvasFrame.
+ * Returns an AnonymousContent instance that can be used to manipulate the
+ * inserted element.
+ */
+ [ChromeOnly, NewObject, Throws]
+ AnonymousContent insertAnonymousContent(Element aElement);
+
+ /**
+ * Removes the element inserted into the CanvasFrame given an AnonymousContent
+ * instance.
+ */
+ [ChromeOnly, Throws]
+ void removeAnonymousContent(AnonymousContent aContent);
+};
+
+// Extension to give chrome JS the ability to determine whether
+// the user has interacted with the document or not.
+partial interface Document {
+ [ChromeOnly] readonly attribute boolean userHasInteracted;
+};
+
+// Extension to give chrome and XBL JS the ability to determine whether
+// the document is sandboxed without permission to run scripts
+// and whether inline scripts are blocked by the document's CSP.
+partial interface Document {
+ [Func="IsChromeOrXBL"] readonly attribute boolean hasScriptsBlockedBySandbox;
+ [Func="IsChromeOrXBL"] readonly attribute boolean inlineScriptAllowedByCSP;
+};
+
+Document implements XPathEvaluator;
+Document implements GlobalEventHandlers;
+Document implements TouchEventHandlers;
+Document implements ParentNode;
+Document implements OnErrorEventHandlerForNodes;
+Document implements GeometryUtils;
+Document implements FontFaceSource;
diff --git a/dom/webidl/DocumentFragment.webidl b/dom/webidl/DocumentFragment.webidl
new file mode 100644
index 000000000..0f814666f
--- /dev/null
+++ b/dom/webidl/DocumentFragment.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120405/#interface-documentfragment
+ * http://www.w3.org/TR/2012/WD-selectors-api-20120628/#interface-definitions
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor]
+interface DocumentFragment : Node {
+ Element? getElementById(DOMString elementId);
+};
+
+// http://www.w3.org/TR/2012/WD-selectors-api-20120628/#interface-definitions
+partial interface DocumentFragment {
+ [Throws]
+ Element? querySelector(DOMString selectors);
+ [Throws]
+ NodeList querySelectorAll(DOMString selectors);
+};
+
+DocumentFragment implements ParentNode;
diff --git a/dom/webidl/DocumentTimeline.webidl b/dom/webidl/DocumentTimeline.webidl
new file mode 100644
index 000000000..916b1a491
--- /dev/null
+++ b/dom/webidl/DocumentTimeline.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/web-animations/#documenttimeline
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+dictionary DocumentTimelineOptions {
+ DOMHighResTimeStamp originTime = 0;
+};
+
+[Func="nsDocument::IsWebAnimationsEnabled",
+ Constructor (optional DocumentTimelineOptions options)]
+interface DocumentTimeline : AnimationTimeline {
+};
diff --git a/dom/webidl/DocumentType.webidl b/dom/webidl/DocumentType.webidl
new file mode 100644
index 000000000..89190266f
--- /dev/null
+++ b/dom/webidl/DocumentType.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#documenttype
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface DocumentType : Node {
+ readonly attribute DOMString name;
+ readonly attribute DOMString publicId;
+ readonly attribute DOMString systemId;
+};
+
+DocumentType implements ChildNode;
diff --git a/dom/webidl/DominatorTree.webidl b/dom/webidl/DominatorTree.webidl
new file mode 100644
index 000000000..7eac4a8be
--- /dev/null
+++ b/dom/webidl/DominatorTree.webidl
@@ -0,0 +1,70 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+typedef unsigned long long NodeId;
+typedef unsigned long long NodeSize;
+
+/**
+ * In a directed graph with a root node `R`, a node `A` is said to "dominate" a
+ * node `B` iff every path from `R` to `B` contains `A`. A node `A` is said to
+ * be the "immediate dominator" of a node `B` iff it dominates `B`, is not `B`
+ * itself, and does not dominate any other nodes which also dominate `B` in
+ * turn.
+ *
+ * If we take every node from a graph `G` and create a new graph `T` with edges
+ * to each node from its immediate dominator, then `T` is a tree (each node has
+ * only one immediate dominator, or none if it is the root). This tree is called
+ * a "dominator tree".
+ *
+ * This interface represents a dominator tree constructed from a HeapSnapshot's
+ * heap graph. The domination relationship and dominator trees are useful tools
+ * for analyzing heap graphs because they tell you:
+ *
+ * - Exactly what could be reclaimed by the GC if some node `A` became
+ * unreachable: those nodes which are dominated by `A`,
+ *
+ * - The "retained size" of a node in the heap graph, in contrast to its
+ * "shallow size". The "shallow size" is the space taken by a node itself,
+ * not counting anything it references. The "retained size" of a node is its
+ * shallow size plus the size of all the things that would be collected if
+ * the original node wasn't (directly or indirectly) referencing them. In
+ * other words, the retained size is the shallow size of a node plus the
+ * shallow sizes of every other node it dominates. For example, the root
+ * node in a binary tree might have a small shallow size that does not take
+ * up much space itself, but it dominates the rest of the binary tree and
+ * its retained size is therefore significant (assuming no external
+ * references into the tree).
+ */
+[ChromeOnly, Exposed=(Window,System,Worker)]
+interface DominatorTree {
+ /**
+ * The `NodeId` for the root of the dominator tree. This is a "meta-root" in
+ * that it has an edge to each GC root in the heap snapshot this dominator
+ * tree was created from.
+ */
+ readonly attribute NodeId root;
+
+ /**
+ * Get the retained size of the node with the given id. If given an invalid
+ * id, null is returned. Throws an error on OOM.
+ */
+ [Throws]
+ NodeSize? getRetainedSize(NodeId node);
+
+ /**
+ * Get the set of ids of nodes immediately dominated by the node with the
+ * given id. The resulting array is sorted by greatest to least retained
+ * size. If given an invalid id, null is returned. Throws an error on OOM.
+ */
+ [Throws]
+ sequence<NodeId>? getImmediatelyDominated(NodeId node);
+
+ /**
+ * Get the immediate dominator of the node with the given id. Returns null if
+ * given an invalid id, or the id of the root node.
+ */
+ NodeId? getImmediateDominator(NodeId node);
+};
diff --git a/dom/webidl/DownloadEvent.webidl b/dom/webidl/DownloadEvent.webidl
new file mode 100644
index 000000000..8422ba62b
--- /dev/null
+++ b/dom/webidl/DownloadEvent.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional DownloadEventInit eventInitDict),
+ Pref="dom.mozDownloads.enabled",
+ ChromeOnly]
+interface DownloadEvent : Event
+{
+ readonly attribute DOMDownload? download;
+};
+
+dictionary DownloadEventInit : EventInit
+{
+ DOMDownload? download = null;
+};
diff --git a/dom/webidl/Downloads.webidl b/dom/webidl/Downloads.webidl
new file mode 100644
index 000000000..ff840eac6
--- /dev/null
+++ b/dom/webidl/Downloads.webidl
@@ -0,0 +1,166 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+// Represents the state of a download.
+// "downloading": The resource is actively transfering.
+// "stopped" : No network tranfer is happening.
+// "succeeded" : The resource has been downloaded successfully.
+// "finalized" : We won't try to download this resource, but the DOM
+// object is still alive.
+enum DownloadState {
+ "downloading",
+ "stopped",
+ "succeeded",
+ "finalized"
+};
+
+[NoInterfaceObject,
+ NavigatorProperty="mozDownloadManager",
+ JSImplementation="@mozilla.org/downloads/manager;1",
+ Pref="dom.mozDownloads.enabled",
+ ChromeOnly]
+interface DOMDownloadManager : EventTarget {
+ // This promise returns an array of downloads with all the current
+ // download objects.
+ Promise<sequence<DOMDownload>> getDownloads();
+
+ // Removes one download from the downloads set. Returns a promise resolved
+ // with the finalized download.
+ [UnsafeInPrerendering]
+ Promise<DOMDownload> remove(DOMDownload download);
+
+ // Removes all completed downloads. This kicks off an asynchronous process
+ // that will eventually complete, but will not have completed by the time this
+ // method returns. If you care about the side-effects of this method, know
+ // that each existing download will have its onstatechange method invoked and
+ // will have a new state of "finalized". (After the download is finalized, no
+ // further events will be generated on it.)
+ [UnsafeInPrerendering]
+ void clearAllDone();
+
+ // Add completed downloads from applications that must perform the download
+ // process themselves. For example, email. The method is resolved with a
+ // fully populated DOMDownload instance on success, or rejected in the
+ // event all required options were not provided.
+ //
+ // The adopted download will also be reported via the ondownloadstart event
+ // handler.
+ //
+ // Applications must currently be certified to use this, but it could be
+ // widened at a later time.
+ //
+ // Note that "download" is not actually optional, but WebIDL requires that it
+ // be marked as such because it is not followed by a required argument. The
+ // promise will be rejected if the dictionary is omitted or the specified
+ // file does not exist on disk.
+ Promise<DOMDownload> adoptDownload(optional AdoptDownloadDict download);
+
+ // Fires when a new download starts.
+ attribute EventHandler ondownloadstart;
+};
+
+[JSImplementation="@mozilla.org/downloads/download;1",
+ Pref="dom.mozDownloads.enabled",
+ ChromeOnly]
+interface DOMDownload : EventTarget {
+ // The full size of the resource.
+ readonly attribute long long totalBytes;
+
+ // The number of bytes that we have currently downloaded.
+ readonly attribute long long currentBytes;
+
+ // The url of the resource.
+ readonly attribute DOMString url;
+
+ // The full path in local storage where the file will end up once the download
+ // is complete. This is equivalent to the concatenation of the 'storagePath'
+ // to the 'mountPoint' of the nsIVolume associated with the 'storageName'
+ // (with delimiter).
+ readonly attribute DOMString path;
+
+ // The DeviceStorage volume name on which the file is being downloaded.
+ readonly attribute DOMString storageName;
+
+ // The DeviceStorage path on the volume with 'storageName' of the file being
+ // downloaded.
+ readonly attribute DOMString storagePath;
+
+ // The state of the download. One of: downloading, stopped, succeeded, or
+ // finalized. A finalized download is a download that has been removed /
+ // cleared and is no longer tracked by the download manager and will not
+ // receive any further onstatechange updates.
+ readonly attribute DownloadState state;
+
+ // The mime type for this resource.
+ readonly attribute DOMString contentType;
+
+ // The timestamp this download started.
+ readonly attribute Date startTime;
+
+ // An opaque identifier for this download. All instances of the same
+ // download (eg. in different windows) will have the same id.
+ readonly attribute DOMString id;
+
+ // The manifestURL of the application that added this download. Only used for
+ // downloads added via the adoptDownload API call.
+ readonly attribute DOMString? sourceAppManifestURL;
+
+ // A DOM error object, that will be not null when a download is stopped
+ // because something failed.
+ readonly attribute DOMError? error;
+
+ // Pauses the download.
+ [UnsafeInPrerendering]
+ Promise<DOMDownload> pause();
+
+ // Resumes the download. This resolves only once the download has
+ // succeeded.
+ [UnsafeInPrerendering]
+ Promise<DOMDownload> resume();
+
+ // This event is triggered anytime a property of the object changes:
+ // - when the transfer progresses, updating currentBytes.
+ // - when the state and/or error attributes change.
+ attribute EventHandler onstatechange;
+};
+
+// Used to initialize the DOMDownload object for adopted downloads.
+// fields directly maps to the DOMDownload fields.
+dictionary AdoptDownloadDict {
+ // The URL of this resource if there is one available. An empty string if
+ // the download is not accessible via URL. An empty string is chosen over
+ // null so that existinc code does not need to null-check but the value is
+ // still falsey. (Note: If you do have a usable URL, you should probably not
+ // be using the adoptDownload API and instead be initiating downloads the
+ // normal way.)
+ DOMString url;
+
+ // The storageName of the DeviceStorage instance the file was saved to.
+ // Required but marked as optional so the bindings don't auto-coerce the value
+ // null to "null".
+ DOMString? storageName;
+ // The path of the file within the DeviceStorage instance named by
+ // 'storageName'. This is used to automatically compute the 'path' of the
+ // download. Note that when DeviceStorage gives you a path to a file, the
+ // first path segment is the name of the specific device storage and you do
+ // *not* want to include this. For example, if DeviceStorage tells you the
+ // file has a path of '/sdcard1/actual/path/file.ext', then the storageName
+ // should be 'sdcard1' and the storagePath should be 'actual/path/file.ext'.
+ //
+ // The existence of the file will be validated will be validated with stat()
+ // and the size the file-system tells us will be what we use.
+ //
+ // Required but marked as optional so the bindings don't auto-coerce the value
+ // null to "null".
+ DOMString? storagePath;
+
+ // The mime type for this resource. Required, but marked as optional because
+ // WebIDL otherwise auto-coerces the value null to "null".
+ DOMString? contentType;
+
+ // The time the download was started. If omitted, the current time is used.
+ Date? startTime;
+};
diff --git a/dom/webidl/DragEvent.webidl b/dom/webidl/DragEvent.webidl
new file mode 100644
index 000000000..2cc173d5c
--- /dev/null
+++ b/dom/webidl/DragEvent.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional DragEventInit eventInitDict)]
+interface DragEvent : MouseEvent
+{
+ readonly attribute DataTransfer? dataTransfer;
+
+ void initDragEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ Window? aView,
+ long aDetail,
+ long aScreenX,
+ long aScreenY,
+ long aClientX,
+ long aClientY,
+ boolean aCtrlKey,
+ boolean aAltKey,
+ boolean aShiftKey,
+ boolean aMetaKey,
+ unsigned short aButton,
+ EventTarget? aRelatedTarget,
+ DataTransfer? aDataTransfer);
+};
+
+dictionary DragEventInit : MouseEventInit
+{
+ DataTransfer? dataTransfer = null;
+};
diff --git a/dom/webidl/DynamicsCompressorNode.webidl b/dom/webidl/DynamicsCompressorNode.webidl
new file mode 100644
index 000000000..dc0e46f63
--- /dev/null
+++ b/dom/webidl/DynamicsCompressorNode.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface DynamicsCompressorNode : AudioNode {
+
+ readonly attribute AudioParam threshold; // in Decibels
+ readonly attribute AudioParam knee; // in Decibels
+ readonly attribute AudioParam ratio; // unit-less
+ readonly attribute float reduction; // in Decibels
+ readonly attribute AudioParam attack; // in Seconds
+ readonly attribute AudioParam release; // in Seconds
+
+};
+
+// Mozilla extension
+DynamicsCompressorNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/Element.webidl b/dom/webidl/Element.webidl
new file mode 100644
index 000000000..ca5f1b35c
--- /dev/null
+++ b/dom/webidl/Element.webidl
@@ -0,0 +1,259 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#element and
+ * http://domparsing.spec.whatwg.org/ and
+ * http://dev.w3.org/csswg/cssom-view/ and
+ * http://www.w3.org/TR/selectors-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface Element : Node {
+ [Constant]
+ readonly attribute DOMString? namespaceURI;
+ [Constant]
+ readonly attribute DOMString? prefix;
+ [Constant]
+ readonly attribute DOMString localName;
+
+ // Not [Constant] because it depends on which document we're in
+ [Pure]
+ readonly attribute DOMString tagName;
+
+ [Pure]
+ attribute DOMString id;
+ [Pure]
+ attribute DOMString className;
+ [Constant, PutForwards=value]
+ readonly attribute DOMTokenList classList;
+
+ [SameObject]
+ readonly attribute NamedNodeMap attributes;
+ [Pure]
+ sequence<DOMString> getAttributeNames();
+ [Pure]
+ DOMString? getAttribute(DOMString name);
+ [Pure]
+ DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
+ [Throws]
+ void setAttribute(DOMString name, DOMString value);
+ [Throws]
+ void setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
+ [Throws]
+ void removeAttribute(DOMString name);
+ [Throws]
+ void removeAttributeNS(DOMString? namespace, DOMString localName);
+ [Pure]
+ boolean hasAttribute(DOMString name);
+ [Pure]
+ boolean hasAttributeNS(DOMString? namespace, DOMString localName);
+ [Pure]
+ boolean hasAttributes();
+
+ [Throws, Pure]
+ Element? closest(DOMString selector);
+
+ [Throws, Pure]
+ boolean matches(DOMString selector);
+ [Throws, Pure, BinaryName="matches"]
+ boolean webkitMatchesSelector(DOMString selector);
+
+ [Pure]
+ HTMLCollection getElementsByTagName(DOMString localName);
+ [Throws, Pure]
+ HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
+ [Pure]
+ HTMLCollection getElementsByClassName(DOMString classNames);
+
+ [Throws, Pure]
+ Element? insertAdjacentElement(DOMString where, Element element); // historical
+
+ [Throws]
+ void insertAdjacentText(DOMString where, DOMString data); // historical
+
+ /**
+ * The ratio of font-size-inflated text font size to computed font
+ * size for this element. This will query the element for its primary frame,
+ * and then use this to get font size inflation information about the frame.
+ * This will be 1.0 if font size inflation is not enabled, and -1.0 if an
+ * error occurred during the retrieval of the font size inflation.
+ *
+ * @note The font size inflation ratio that is returned is actually the
+ * font size inflation data for the element's _primary frame_, not the
+ * element itself, but for most purposes, this should be sufficient.
+ */
+ [ChromeOnly]
+ readonly attribute float fontSizeInflation;
+
+ // Mozilla specific stuff
+ [Pure]
+ attribute EventHandler onwheel;
+
+ // Selectors API
+ /**
+ * Returns whether this element would be selected by the given selector
+ * string.
+ *
+ * See <http://dev.w3.org/2006/webapi/selectors-api2/#matchesselector>
+ */
+ [Throws, Pure, BinaryName="matches"]
+ boolean mozMatchesSelector(DOMString selector);
+
+ // Pointer events methods.
+ [Throws, Pref="dom.w3c_pointer_events.enabled", UnsafeInPrerendering]
+ void setPointerCapture(long pointerId);
+
+ [Throws, Pref="dom.w3c_pointer_events.enabled"]
+ void releasePointerCapture(long pointerId);
+
+ [Pref="dom.w3c_pointer_events.enabled"]
+ boolean hasPointerCapture(long pointerId);
+
+ // Proprietary extensions
+ /**
+ * Set this during a mousedown event to grab and retarget all mouse events
+ * to this element until the mouse button is released or releaseCapture is
+ * called. If retargetToElement is true, then all events are targetted at
+ * this element. If false, events can also fire at descendants of this
+ * element.
+ *
+ */
+ void setCapture(optional boolean retargetToElement = false);
+
+ /**
+ * If this element has captured the mouse, release the capture. If another
+ * element has captured the mouse, this method has no effect.
+ */
+ void releaseCapture();
+
+ // Mozilla extensions
+
+ // Obsolete methods.
+ Attr? getAttributeNode(DOMString name);
+ [Throws]
+ Attr? setAttributeNode(Attr newAttr);
+ [Throws]
+ Attr? removeAttributeNode(Attr oldAttr);
+ Attr? getAttributeNodeNS(DOMString? namespaceURI, DOMString localName);
+ [Throws]
+ Attr? setAttributeNodeNS(Attr newAttr);
+
+ [ChromeOnly]
+ /**
+ * Scrolls the element by (dx, dy) CSS pixels without doing any
+ * layout flushing.
+ */
+ boolean scrollByNoFlush(long dx, long dy);
+
+ // Support reporting of Grid properties
+
+ /**
+ * If this element has a display:grid or display:inline-grid style,
+ * this property returns an object with computed values for grid
+ * tracks and lines.
+ */
+ [ChromeOnly, Pure]
+ sequence<Grid> getGridFragments();
+};
+
+// http://dev.w3.org/csswg/cssom-view/
+enum ScrollLogicalPosition { "start", "end" };
+dictionary ScrollIntoViewOptions : ScrollOptions {
+ ScrollLogicalPosition block = "start";
+};
+
+// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-element-interface
+partial interface Element {
+ DOMRectList getClientRects();
+ DOMRect getBoundingClientRect();
+
+ // scrolling
+ void scrollIntoView(boolean top);
+ void scrollIntoView(optional ScrollIntoViewOptions options);
+ // None of the CSSOM attributes are [Pure], because they flush
+ attribute long scrollTop; // scroll on setting
+ attribute long scrollLeft; // scroll on setting
+ readonly attribute long scrollWidth;
+ readonly attribute long scrollHeight;
+
+ void scroll(unrestricted double x, unrestricted double y);
+ void scroll(optional ScrollToOptions options);
+ void scrollTo(unrestricted double x, unrestricted double y);
+ void scrollTo(optional ScrollToOptions options);
+ void scrollBy(unrestricted double x, unrestricted double y);
+ void scrollBy(optional ScrollToOptions options);
+ // mozScrollSnap is used by chrome to perform scroll snapping after the
+ // user performs actions that may affect scroll position
+ // mozScrollSnap is deprecated, to be replaced by a web accessible API, such
+ // as an extension to the ScrollOptions dictionary. See bug 1137937.
+ [ChromeOnly] void mozScrollSnap();
+
+ readonly attribute long clientTop;
+ readonly attribute long clientLeft;
+ readonly attribute long clientWidth;
+ readonly attribute long clientHeight;
+
+ // Mozilla specific stuff
+ /* The minimum/maximum offset that the element can be scrolled to
+ (i.e., the value that scrollLeft/scrollTop would be clamped to if they were
+ set to arbitrarily large values. */
+ [ChromeOnly] readonly attribute long scrollTopMin;
+ readonly attribute long scrollTopMax;
+ [ChromeOnly] readonly attribute long scrollLeftMin;
+ readonly attribute long scrollLeftMax;
+};
+
+// http://domparsing.spec.whatwg.org/#extensions-to-the-element-interface
+partial interface Element {
+ [Pure,SetterThrows,TreatNullAs=EmptyString]
+ attribute DOMString innerHTML;
+ [Pure,SetterThrows,TreatNullAs=EmptyString]
+ attribute DOMString outerHTML;
+ [Throws]
+ void insertAdjacentHTML(DOMString position, DOMString text);
+};
+
+// http://www.w3.org/TR/selectors-api/#interface-definitions
+partial interface Element {
+ [Throws, Pure]
+ Element? querySelector(DOMString selectors);
+ [Throws, Pure]
+ NodeList querySelectorAll(DOMString selectors);
+};
+
+// http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-element-interface
+partial interface Element {
+ [Throws,Func="nsDocument::IsWebComponentsEnabled"]
+ ShadowRoot createShadowRoot();
+ [Func="nsDocument::IsWebComponentsEnabled"]
+ NodeList getDestinationInsertionPoints();
+ [Func="nsDocument::IsWebComponentsEnabled"]
+ readonly attribute ShadowRoot? shadowRoot;
+};
+
+Element implements ChildNode;
+Element implements NonDocumentTypeChildNode;
+Element implements ParentNode;
+Element implements Animatable;
+Element implements GeometryUtils;
+
+// https://fullscreen.spec.whatwg.org/#api
+partial interface Element {
+ [Throws, UnsafeInPrerendering, Func="nsDocument::IsUnprefixedFullscreenEnabled"]
+ void requestFullscreen();
+ [Throws, UnsafeInPrerendering, BinaryName="requestFullscreen"]
+ void mozRequestFullScreen();
+};
+
+// https://w3c.github.io/pointerlock/#extensions-to-the-element-interface
+partial interface Element {
+ [UnsafeInPrerendering]
+ void requestPointerLock();
+ [UnsafeInPrerendering, BinaryName="requestPointerLock", Pref="pointer-lock-api.prefixed.enabled"]
+ void mozRequestPointerLock();
+};
diff --git a/dom/webidl/ErrorEvent.webidl b/dom/webidl/ErrorEvent.webidl
new file mode 100644
index 000000000..5d12b879f
--- /dev/null
+++ b/dom/webidl/ErrorEvent.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[Constructor(DOMString type, optional ErrorEventInit eventInitDict),
+ Exposed=(Window,System)]
+interface ErrorEvent : Event
+{
+ readonly attribute DOMString message;
+ readonly attribute DOMString filename;
+ readonly attribute unsigned long lineno;
+ readonly attribute unsigned long colno;
+ readonly attribute any error;
+};
+
+dictionary ErrorEventInit : EventInit
+{
+ DOMString message = "";
+ DOMString filename = "";
+ unsigned long lineno = 0;
+ unsigned long colno = 0;
+ any error = null;
+};
diff --git a/dom/webidl/Event.webidl b/dom/webidl/Event.webidl
new file mode 100644
index 000000000..f87dc195c
--- /dev/null
+++ b/dom/webidl/Event.webidl
@@ -0,0 +1,75 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString type, optional EventInit eventInitDict),
+ Exposed=(Window,Worker,System), ProbablyShortLivingObject]
+interface Event {
+ [Pure]
+ readonly attribute DOMString type;
+ [Pure]
+ readonly attribute EventTarget? target;
+ [Pure]
+ readonly attribute EventTarget? currentTarget;
+
+ const unsigned short NONE = 0;
+ const unsigned short CAPTURING_PHASE = 1;
+ const unsigned short AT_TARGET = 2;
+ const unsigned short BUBBLING_PHASE = 3;
+ [Pure]
+ readonly attribute unsigned short eventPhase;
+
+ void stopPropagation();
+ void stopImmediatePropagation();
+
+ [Pure]
+ readonly attribute boolean bubbles;
+ [Pure]
+ readonly attribute boolean cancelable;
+ void preventDefault();
+ [Pure]
+ readonly attribute boolean defaultPrevented;
+ [ChromeOnly, Pure]
+ readonly attribute boolean defaultPreventedByChrome;
+ [ChromeOnly, Pure]
+ readonly attribute boolean defaultPreventedByContent;
+ [Pure]
+ readonly attribute boolean composed;
+
+ [Unforgeable, Pure]
+ readonly attribute boolean isTrusted;
+ [Pure]
+ readonly attribute DOMHighResTimeStamp timeStamp;
+
+ void initEvent(DOMString type, boolean bubbles, boolean cancelable);
+ attribute boolean cancelBubble;
+};
+
+// Mozilla specific legacy stuff.
+partial interface Event {
+ const long ALT_MASK = 0x00000001;
+ const long CONTROL_MASK = 0x00000002;
+ const long SHIFT_MASK = 0x00000004;
+ const long META_MASK = 0x00000008;
+
+ readonly attribute EventTarget? originalTarget;
+ readonly attribute EventTarget? explicitOriginalTarget;
+ [ChromeOnly] readonly attribute EventTarget? composedTarget;
+ [ChromeOnly] readonly attribute boolean multipleActionsPrevented;
+ [ChromeOnly] readonly attribute boolean isSynthesized;
+ boolean getPreventDefault();
+};
+
+dictionary EventInit {
+ boolean bubbles = false;
+ boolean cancelable = false;
+ boolean composed = false;
+};
diff --git a/dom/webidl/EventHandler.webidl b/dom/webidl/EventHandler.webidl
new file mode 100644
index 000000000..e65a75787
--- /dev/null
+++ b/dom/webidl/EventHandler.webidl
@@ -0,0 +1,178 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#eventhandler
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+[TreatNonObjectAsNull]
+callback EventHandlerNonNull = any (Event event);
+typedef EventHandlerNonNull? EventHandler;
+
+[TreatNonObjectAsNull]
+// https://www.w3.org/Bugs/Public/show_bug.cgi?id=23489
+//callback OnBeforeUnloadEventHandlerNonNull = DOMString (Event event);
+callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
+typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
+
+[TreatNonObjectAsNull]
+callback OnErrorEventHandlerNonNull = boolean ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error);
+typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
+
+[NoInterfaceObject]
+interface GlobalEventHandlers {
+ attribute EventHandler onabort;
+ attribute EventHandler onblur;
+// We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
+// below.
+// attribute OnErrorEventHandler onerror;
+ attribute EventHandler onfocus;
+ //(Not implemented)attribute EventHandler oncancel;
+ attribute EventHandler oncanplay;
+ attribute EventHandler oncanplaythrough;
+ attribute EventHandler onchange;
+ attribute EventHandler onclick;
+ //(Not implemented)attribute EventHandler onclose;
+ attribute EventHandler oncontextmenu;
+ //(Not implemented)attribute EventHandler oncuechange;
+ attribute EventHandler ondblclick;
+ attribute EventHandler ondrag;
+ attribute EventHandler ondragend;
+ attribute EventHandler ondragenter;
+ attribute EventHandler ondragexit;
+ attribute EventHandler ondragleave;
+ attribute EventHandler ondragover;
+ attribute EventHandler ondragstart;
+ attribute EventHandler ondrop;
+ attribute EventHandler ondurationchange;
+ attribute EventHandler onemptied;
+ attribute EventHandler onended;
+ attribute EventHandler oninput;
+ attribute EventHandler oninvalid;
+ attribute EventHandler onkeydown;
+ attribute EventHandler onkeypress;
+ attribute EventHandler onkeyup;
+ attribute EventHandler onload;
+ attribute EventHandler onloadeddata;
+ attribute EventHandler onloadedmetadata;
+ attribute EventHandler onloadend;
+ attribute EventHandler onloadstart;
+ attribute EventHandler onmousedown;
+ [LenientThis] attribute EventHandler onmouseenter;
+ [LenientThis] attribute EventHandler onmouseleave;
+ attribute EventHandler onmousemove;
+ attribute EventHandler onmouseout;
+ attribute EventHandler onmouseover;
+ attribute EventHandler onmouseup;
+ //(Not implemented)attribute EventHandler onmousewheel;
+ attribute EventHandler onpause;
+ attribute EventHandler onplay;
+ attribute EventHandler onplaying;
+ attribute EventHandler onprogress;
+ attribute EventHandler onratechange;
+ attribute EventHandler onreset;
+ attribute EventHandler onresize;
+ attribute EventHandler onscroll;
+ attribute EventHandler onseeked;
+ attribute EventHandler onseeking;
+ attribute EventHandler onselect;
+ attribute EventHandler onshow;
+ //(Not implemented)attribute EventHandler onsort;
+ attribute EventHandler onstalled;
+ attribute EventHandler onsubmit;
+ attribute EventHandler onsuspend;
+ attribute EventHandler ontimeupdate;
+ attribute EventHandler onvolumechange;
+ attribute EventHandler onwaiting;
+
+ [Pref="dom.select_events.enabled"]
+ attribute EventHandler onselectstart;
+
+ [Pref="dom.details_element.enabled"]
+ attribute EventHandler ontoggle;
+
+ // Pointer events handlers
+ [Pref="dom.w3c_pointer_events.enabled"]
+ attribute EventHandler onpointercancel;
+ [Pref="dom.w3c_pointer_events.enabled"]
+ attribute EventHandler onpointerdown;
+ [Pref="dom.w3c_pointer_events.enabled"]
+ attribute EventHandler onpointerup;
+ [Pref="dom.w3c_pointer_events.enabled"]
+ attribute EventHandler onpointermove;
+ [Pref="dom.w3c_pointer_events.enabled"]
+ attribute EventHandler onpointerout;
+ [Pref="dom.w3c_pointer_events.enabled"]
+ attribute EventHandler onpointerover;
+ [Pref="dom.w3c_pointer_events.enabled"]
+ attribute EventHandler onpointerenter;
+ [Pref="dom.w3c_pointer_events.enabled"]
+ attribute EventHandler onpointerleave;
+ [Pref="dom.w3c_pointer_events.enabled"]
+ attribute EventHandler ongotpointercapture;
+ [Pref="dom.w3c_pointer_events.enabled"]
+ attribute EventHandler onlostpointercapture;
+
+ // Mozilla-specific handlers. Unprefixed handlers live in
+ // Document rather than here.
+ attribute EventHandler onmozfullscreenchange;
+ attribute EventHandler onmozfullscreenerror;
+ [Pref="pointer-lock-api.prefixed.enabled"]
+ attribute EventHandler onmozpointerlockchange;
+ [Pref="pointer-lock-api.prefixed.enabled"]
+ attribute EventHandler onmozpointerlockerror;
+
+ // CSS-Animation and CSS-Transition handlers.
+ attribute EventHandler onanimationend;
+ attribute EventHandler onanimationiteration;
+ attribute EventHandler onanimationstart;
+ attribute EventHandler ontransitionend;
+ // We will ship transitionrun and transitionstart events
+ // on Firefox 53. (For detail, see bug 1324985)
+// attribute EventHandler ontransitionrun;
+// attribute EventHandler ontransitionstart;
+
+ // CSS-Animation and CSS-Transition legacy handlers.
+ // This handler isn't standard.
+ attribute EventHandler onwebkitanimationend;
+ attribute EventHandler onwebkitanimationiteration;
+ attribute EventHandler onwebkitanimationstart;
+ attribute EventHandler onwebkittransitionend;
+};
+
+[NoInterfaceObject]
+interface WindowEventHandlers {
+ attribute EventHandler onafterprint;
+ attribute EventHandler onbeforeprint;
+ attribute OnBeforeUnloadEventHandler onbeforeunload;
+ attribute EventHandler onhashchange;
+ attribute EventHandler onlanguagechange;
+ attribute EventHandler onmessage;
+ attribute EventHandler onoffline;
+ attribute EventHandler ononline;
+ attribute EventHandler onpagehide;
+ attribute EventHandler onpageshow;
+ attribute EventHandler onpopstate;
+ attribute EventHandler onstorage;
+ attribute EventHandler onunload;
+};
+
+// The spec has |attribute OnErrorEventHandler onerror;| on
+// GlobalEventHandlers, and calls the handler differently depending on
+// whether an ErrorEvent was fired. We don't do that, and until we do we'll
+// need to distinguish between onerror on Window or on nodes.
+
+[NoInterfaceObject]
+interface OnErrorEventHandlerForNodes {
+ attribute EventHandler onerror;
+};
+
+[NoInterfaceObject]
+interface OnErrorEventHandlerForWindow {
+ attribute OnErrorEventHandler onerror;
+};
diff --git a/dom/webidl/EventListener.webidl b/dom/webidl/EventListener.webidl
new file mode 100644
index 000000000..46aa748d6
--- /dev/null
+++ b/dom/webidl/EventListener.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+callback interface EventListener {
+ void handleEvent(Event event);
+};
diff --git a/dom/webidl/EventSource.webidl b/dom/webidl/EventSource.webidl
new file mode 100644
index 000000000..1e8e9978e
--- /dev/null
+++ b/dom/webidl/EventSource.webidl
@@ -0,0 +1,36 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://html.spec.whatwg.org/multipage/comms.html#the-eventsource-interface
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[Constructor(USVString url, optional EventSourceInit eventSourceInitDict)]
+interface EventSource : EventTarget {
+ [Constant]
+ readonly attribute DOMString url;
+ [Constant]
+ readonly attribute boolean withCredentials;
+
+ // ready state
+ const unsigned short CONNECTING = 0;
+ const unsigned short OPEN = 1;
+ const unsigned short CLOSED = 2;
+ readonly attribute unsigned short readyState;
+
+ // networking
+ attribute EventHandler onopen;
+ attribute EventHandler onmessage;
+ attribute EventHandler onerror;
+ void close();
+};
+
+dictionary EventSourceInit {
+ boolean withCredentials = false;
+};
diff --git a/dom/webidl/EventTarget.webidl b/dom/webidl/EventTarget.webidl
new file mode 100644
index 000000000..9e8a267ff
--- /dev/null
+++ b/dom/webidl/EventTarget.webidl
@@ -0,0 +1,67 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+
+dictionary EventListenerOptions {
+ boolean capture = false;
+ /* Setting to true make the listener be added to the system group. */
+ [Func="ThreadSafeIsChromeOrXBL"]
+ boolean mozSystemGroup = false;
+};
+
+dictionary AddEventListenerOptions : EventListenerOptions {
+ boolean passive = false;
+ boolean once = false;
+};
+
+[Exposed=(Window,Worker,WorkerDebugger,System)]
+interface EventTarget {
+ /* Passing null for wantsUntrusted means "default behavior", which
+ differs in content and chrome. In content that default boolean
+ value is true, while in chrome the default boolean value is
+ false. */
+ [Throws]
+ void addEventListener(DOMString type,
+ EventListener? listener,
+ optional (AddEventListenerOptions or boolean) options,
+ optional boolean? wantsUntrusted = null);
+ [Throws]
+ void removeEventListener(DOMString type,
+ EventListener? listener,
+ optional (EventListenerOptions or boolean) options);
+ [Throws]
+ boolean dispatchEvent(Event event);
+};
+
+// Mozilla extensions for use by JS-implemented event targets to
+// implement on* properties.
+partial interface EventTarget {
+ // The use of [TreatNonCallableAsNull] here is a bit of a hack: it just makes
+ // the codegen check whether the type involved is either
+ // [TreatNonCallableAsNull] or [TreatNonObjectAsNull] and if it is handle it
+ // accordingly. In particular, it will NOT actually treat a non-null
+ // non-callable object as null here.
+ [ChromeOnly, Throws]
+ void setEventHandler(DOMString type,
+ [TreatNonCallableAsNull] EventHandler handler);
+
+ [ChromeOnly]
+ EventHandler getEventHandler(DOMString type);
+};
+
+// Mozilla extension to make firing events on event targets from
+// chrome easier. This returns the window which can be used to create
+// events to fire at this EventTarget, or null if there isn't one.
+partial interface EventTarget {
+ [ChromeOnly, Exposed=(Window,System), BinaryName="ownerGlobalForBindings"]
+ readonly attribute WindowProxy? ownerGlobal;
+};
diff --git a/dom/webidl/ExtendableEvent.webidl b/dom/webidl/ExtendableEvent.webidl
new file mode 100644
index 000000000..01dc545ef
--- /dev/null
+++ b/dom/webidl/ExtendableEvent.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface, please see
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
+ */
+
+[Constructor(DOMString type, optional ExtendableEventInit eventInitDict),
+ Exposed=ServiceWorker]
+interface ExtendableEvent : Event {
+ // https://github.com/slightlyoff/ServiceWorker/issues/261
+ [Throws]
+ void waitUntil(Promise<any> p);
+};
+
+dictionary ExtendableEventInit : EventInit {
+ // Defined for the forward compatibility across the derived events
+};
diff --git a/dom/webidl/ExtendableMessageEvent.webidl b/dom/webidl/ExtendableMessageEvent.webidl
new file mode 100644
index 000000000..b2bdf6792
--- /dev/null
+++ b/dom/webidl/ExtendableMessageEvent.webidl
@@ -0,0 +1,44 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface, please see
+ * https://w3c.github.io/ServiceWorker/#extendablemessage-event-section
+ */
+
+[Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict),
+ Exposed=(ServiceWorker)]
+interface ExtendableMessageEvent : ExtendableEvent {
+ /**
+ * Custom data associated with this event.
+ */
+ [GetterThrows]
+ readonly attribute any data;
+
+ /**
+ * The origin of the site from which this event originated.
+ */
+ readonly attribute DOMString origin;
+
+ /**
+ * The last event ID string of the event source.
+ */
+ readonly attribute DOMString lastEventId;
+
+ /**
+ * The client, service worker or port which originated this event.
+ */
+ readonly attribute (Client or ServiceWorker or MessagePort)? source;
+
+ [Constant, Cached, Frozen]
+ readonly attribute sequence<MessagePort> ports;
+};
+
+dictionary ExtendableMessageEventInit : ExtendableEventInit {
+ any data = null;
+ DOMString origin = "";
+ DOMString lastEventId = "";
+ (Client or ServiceWorker or MessagePort)? source = null;
+ sequence<MessagePort> ports = [];
+};
diff --git a/dom/webidl/External.webidl b/dom/webidl/External.webidl
new file mode 100644
index 000000000..890dff306
--- /dev/null
+++ b/dom/webidl/External.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[JSImplementation="@mozilla.org/sidebar;1"]
+interface External
+{
+ [UnsafeInPrerendering] void AddSearchProvider(DOMString aDescriptionURL);
+ unsigned long IsSearchProviderInstalled(DOMString aSearchURL);
+};
+
+// Mozilla extension
+partial interface External {
+ [UnsafeInPrerendering, UseCounter]
+ void addSearchEngine(DOMString engineURL, DOMString iconURL,
+ DOMString suggestedTitle, DOMString suggestedCategory);
+};
diff --git a/dom/webidl/FakePluginTagInit.webidl b/dom/webidl/FakePluginTagInit.webidl
new file mode 100644
index 000000000..93cbad7f8
--- /dev/null
+++ b/dom/webidl/FakePluginTagInit.webidl
@@ -0,0 +1,39 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * A fake plugin is fundamentally identified by its handlerURI.
+ *
+ * In addition to that, a fake plugin registration needs to provide at least one
+ * FakePluginMimeEntry so we'll know what types(s) the plugin is registered for.
+ * Other information is optional, though having usable niceName is highly
+ * recommended.
+ */
+dictionary FakePluginTagInit {
+ required DOMString handlerURI;
+ required sequence<FakePluginMimeEntry> mimeEntries;
+
+ // The niceName should really be provided, and be unique, if possible; it can
+ // be used as a key to persist state for this plug-in.
+ DOMString niceName = "";
+
+ // Other things can be provided but don't really matter that much.
+ DOMString fullPath = "";
+ DOMString name = "";
+ DOMString description = "";
+ DOMString fileName = "";
+ DOMString version = "";
+};
+
+/**
+ * A single MIME entry for the fake plugin.
+ */
+dictionary FakePluginMimeEntry {
+ required DOMString type;
+ DOMString description = "";
+ DOMString extension = "";
+};
+
diff --git a/dom/webidl/Fetch.webidl b/dom/webidl/Fetch.webidl
new file mode 100644
index 000000000..4b2a0af7d
--- /dev/null
+++ b/dom/webidl/Fetch.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://fetch.spec.whatwg.org/
+ */
+
+typedef object JSON;
+typedef (ArrayBuffer or ArrayBufferView or Blob or FormData or USVString or URLSearchParams) BodyInit;
+
+[NoInterfaceObject, Exposed=(Window,Worker)]
+interface Body {
+ readonly attribute boolean bodyUsed;
+ [Throws]
+ Promise<ArrayBuffer> arrayBuffer();
+ [Throws]
+ Promise<Blob> blob();
+ [Throws]
+ Promise<FormData> formData();
+ [Throws]
+ Promise<JSON> json();
+ [Throws]
+ Promise<USVString> text();
+};
diff --git a/dom/webidl/FetchEvent.webidl b/dom/webidl/FetchEvent.webidl
new file mode 100644
index 000000000..3967c122e
--- /dev/null
+++ b/dom/webidl/FetchEvent.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface, please see
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
+ */
+
+[Constructor(DOMString type, FetchEventInit eventInitDict),
+ Func="mozilla::dom::workers::ServiceWorkerVisible",
+ Exposed=(ServiceWorker)]
+interface FetchEvent : ExtendableEvent {
+ [SameObject] readonly attribute Request request;
+ readonly attribute DOMString? clientId;
+ readonly attribute boolean isReload;
+
+ [Throws]
+ void respondWith(Promise<Response> r);
+};
+
+dictionary FetchEventInit : EventInit {
+ required Request request;
+ DOMString? clientId = null;
+ boolean isReload = false;
+};
diff --git a/dom/webidl/File.webidl b/dom/webidl/File.webidl
new file mode 100644
index 000000000..cd3241c52
--- /dev/null
+++ b/dom/webidl/File.webidl
@@ -0,0 +1,50 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/FileAPI/#file
+ */
+
+interface nsIFile;
+
+[Constructor(sequence<BlobPart> fileBits,
+ USVString fileName, optional FilePropertyBag options),
+ Exposed=(Window,Worker)]
+interface File : Blob {
+ readonly attribute DOMString name;
+
+ [GetterThrows]
+ readonly attribute long long lastModified;
+};
+
+dictionary FilePropertyBag {
+ DOMString type = "";
+ long long lastModified;
+};
+
+dictionary ChromeFilePropertyBag : FilePropertyBag {
+ DOMString name = "";
+ boolean temporary = false;
+};
+
+// Mozilla extensions
+partial interface File {
+ [GetterThrows, Deprecated="FileLastModifiedDate"]
+ readonly attribute Date lastModifiedDate;
+
+ [BinaryName="relativePath", Func="mozilla::dom::Directory::WebkitBlinkDirectoryPickerEnabled"]
+ readonly attribute USVString webkitRelativePath;
+
+ [GetterThrows, ChromeOnly]
+ readonly attribute DOMString mozFullPath;
+
+ [ChromeOnly, Throws]
+ static File createFromNsIFile(nsIFile file,
+ optional ChromeFilePropertyBag options);
+
+ [ChromeOnly, Throws]
+ static File createFromFileName(USVString fileName,
+ optional ChromeFilePropertyBag options);
+};
diff --git a/dom/webidl/FileList.webidl b/dom/webidl/FileList.webidl
new file mode 100644
index 000000000..84a56be1b
--- /dev/null
+++ b/dom/webidl/FileList.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2006/webapi/FileAPI/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface FileList {
+ getter File? item(unsigned long index);
+ readonly attribute unsigned long length;
+};
diff --git a/dom/webidl/FileMode.webidl b/dom/webidl/FileMode.webidl
new file mode 100644
index 000000000..788c2c9bf
--- /dev/null
+++ b/dom/webidl/FileMode.webidl
@@ -0,0 +1,5 @@
+/* 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/. */
+
+enum FileMode { "readonly", "readwrite" };
diff --git a/dom/webidl/FileReader.webidl b/dom/webidl/FileReader.webidl
new file mode 100644
index 000000000..f3647aea4
--- /dev/null
+++ b/dom/webidl/FileReader.webidl
@@ -0,0 +1,55 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2006/webapi/FileAPI/#dfn-filereader
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor,
+ Exposed=(Window,Worker,System)]
+interface FileReader : EventTarget {
+ // async read methods
+ [Throws]
+ void readAsArrayBuffer(Blob blob);
+ [Throws]
+ void readAsText(Blob blob, optional DOMString label = "");
+ [Throws]
+ void readAsDataURL(Blob blob);
+
+ [Throws]
+ void abort();
+
+ // states
+ const unsigned short EMPTY = 0;
+ const unsigned short LOADING = 1;
+ const unsigned short DONE = 2;
+
+
+ readonly attribute unsigned short readyState;
+
+ // File or Blob data
+ // bug 858217: readonly attribute (DOMString or ArrayBuffer)? result;
+ [Throws]
+ readonly attribute any result;
+
+ readonly attribute DOMError? error;
+
+ // event handler attributes
+ attribute EventHandler onloadstart;
+ attribute EventHandler onprogress;
+ attribute EventHandler onload;
+ attribute EventHandler onabort;
+ attribute EventHandler onerror;
+ attribute EventHandler onloadend;
+};
+
+// Mozilla extensions.
+partial interface FileReader {
+ [Throws]
+ void readAsBinaryString(Blob filedata);
+};
diff --git a/dom/webidl/FileReaderSync.webidl b/dom/webidl/FileReaderSync.webidl
new file mode 100644
index 000000000..8b586f4a7
--- /dev/null
+++ b/dom/webidl/FileReaderSync.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2006/webapi/FileAPI/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor,
+ Exposed=Worker]
+interface FileReaderSync {
+
+ // Synchronously return strings
+
+ [Throws]
+ ArrayBuffer readAsArrayBuffer(Blob blob);
+ [Throws]
+ DOMString readAsBinaryString(Blob blob);
+ [Throws]
+ DOMString readAsText(Blob blob, optional DOMString encoding);
+ [Throws]
+ DOMString readAsDataURL(Blob blob);
+};
diff --git a/dom/webidl/FileSystem.webidl b/dom/webidl/FileSystem.webidl
new file mode 100644
index 000000000..06b88c5ce
--- /dev/null
+++ b/dom/webidl/FileSystem.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+
+dictionary FileSystemFlags {
+ boolean create = false;
+ boolean exclusive = false;
+};
+
+callback interface FileSystemEntryCallback {
+ void handleEvent(FileSystemEntry entry);
+};
+
+callback interface VoidCallback {
+ void handleEvent();
+};
+
+callback interface ErrorCallback {
+ void handleEvent(DOMException err);
+};
+
+interface FileSystem {
+ readonly attribute USVString name;
+ readonly attribute FileSystemDirectoryEntry root;
+};
diff --git a/dom/webidl/FileSystemDirectoryEntry.webidl b/dom/webidl/FileSystemDirectoryEntry.webidl
new file mode 100644
index 000000000..f972d216f
--- /dev/null
+++ b/dom/webidl/FileSystemDirectoryEntry.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface FileSystemDirectoryEntry : FileSystemEntry {
+ FileSystemDirectoryReader createReader();
+
+ void getFile(optional USVString? path,
+ optional FileSystemFlags options,
+ optional FileSystemEntryCallback successCallback,
+ optional ErrorCallback errorCallback);
+
+ void getDirectory(optional USVString? path,
+ optional FileSystemFlags options,
+ optional FileSystemEntryCallback successCallback,
+ optional ErrorCallback errorCallback);
+};
diff --git a/dom/webidl/FileSystemDirectoryReader.webidl b/dom/webidl/FileSystemDirectoryReader.webidl
new file mode 100644
index 000000000..3be94830c
--- /dev/null
+++ b/dom/webidl/FileSystemDirectoryReader.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+callback interface FileSystemEntriesCallback {
+ void handleEvent(sequence<FileSystemEntry> entries);
+};
+
+interface FileSystemDirectoryReader {
+
+ // readEntries can be called just once. The second time it returns no data.
+
+ [Throws]
+ void readEntries(FileSystemEntriesCallback successCallback,
+ optional ErrorCallback errorCallback);
+};
diff --git a/dom/webidl/FileSystemEntry.webidl b/dom/webidl/FileSystemEntry.webidl
new file mode 100644
index 000000000..af112282d
--- /dev/null
+++ b/dom/webidl/FileSystemEntry.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface FileSystemEntry {
+ readonly attribute boolean isFile;
+ readonly attribute boolean isDirectory;
+
+ [GetterThrows]
+ readonly attribute USVString name;
+
+ [GetterThrows]
+ readonly attribute USVString fullPath;
+
+ readonly attribute FileSystem filesystem;
+
+ void getParent(optional FileSystemEntryCallback successCallback,
+ optional ErrorCallback errorCallback);
+};
diff --git a/dom/webidl/FileSystemFileEntry.webidl b/dom/webidl/FileSystemFileEntry.webidl
new file mode 100644
index 000000000..3f141e54a
--- /dev/null
+++ b/dom/webidl/FileSystemFileEntry.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+callback interface FileCallback {
+ void handleEvent(File file);
+};
+
+interface FileSystemFileEntry : FileSystemEntry {
+ [BinaryName="GetFile"]
+ void file (FileCallback successCallback,
+ optional ErrorCallback errorCallback);
+};
diff --git a/dom/webidl/FlyWebDiscoveryManager.webidl b/dom/webidl/FlyWebDiscoveryManager.webidl
new file mode 100644
index 000000000..963cebf20
--- /dev/null
+++ b/dom/webidl/FlyWebDiscoveryManager.webidl
@@ -0,0 +1,39 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+dictionary FlyWebDiscoveredService {
+ DOMString serviceId = "";
+ DOMString displayName = "";
+ DOMString transport = "";
+ DOMString serviceType = "";
+ DOMString cert = "";
+ DOMString path = "";
+};
+
+dictionary FlyWebPairedService {
+ FlyWebDiscoveredService discoveredService;
+ DOMString hostname = "";
+ DOMString uiUrl = "";
+};
+
+callback interface FlyWebPairingCallback {
+ void pairingSucceeded(optional FlyWebPairedService service);
+ void pairingFailed(DOMString error);
+};
+
+callback interface FlyWebDiscoveryCallback {
+ void onDiscoveredServicesChanged(sequence<FlyWebDiscoveredService> serviceList);
+};
+
+[ChromeOnly, ChromeConstructor, Exposed=(Window,System)]
+interface FlyWebDiscoveryManager {
+ sequence<FlyWebDiscoveredService> listServices();
+
+ unsigned long startDiscovery(FlyWebDiscoveryCallback aCallback);
+ void stopDiscovery(unsigned long aId);
+
+ void pairWithService(DOMString serviceId, FlyWebPairingCallback callback);
+};
diff --git a/dom/webidl/FlyWebFetchEvent.webidl b/dom/webidl/FlyWebFetchEvent.webidl
new file mode 100644
index 000000000..4bee424e5
--- /dev/null
+++ b/dom/webidl/FlyWebFetchEvent.webidl
@@ -0,0 +1,13 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Pref="dom.flyweb.enabled"]
+interface FlyWebFetchEvent : Event {
+ [SameObject] readonly attribute Request request;
+
+ [Throws]
+ void respondWith(Promise<Response> r);
+};
diff --git a/dom/webidl/FlyWebPublish.webidl b/dom/webidl/FlyWebPublish.webidl
new file mode 100644
index 000000000..0c8714a2a
--- /dev/null
+++ b/dom/webidl/FlyWebPublish.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Pref="dom.flyweb.enabled"]
+interface FlyWebPublishedServer : EventTarget {
+ readonly attribute DOMString name;
+ readonly attribute DOMString? uiUrl;
+
+ void close();
+
+ attribute EventHandler onclose;
+ attribute EventHandler onfetch;
+ attribute EventHandler onwebsocket;
+};
+
+dictionary FlyWebPublishOptions {
+ DOMString? uiUrl = null; // URL to user interface. Can be different server. Makes
+ // endpoint show up in browser's "local services" UI.
+ // If relative, resolves against the root of the server.
+};
diff --git a/dom/webidl/FlyWebWebSocketEvent.webidl b/dom/webidl/FlyWebWebSocketEvent.webidl
new file mode 100644
index 000000000..9a47c6dec
--- /dev/null
+++ b/dom/webidl/FlyWebWebSocketEvent.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Pref="dom.flyweb.enabled"]
+interface FlyWebWebSocketEvent : Event {
+ [SameObject] readonly attribute Request request;
+
+ [Throws]
+ WebSocket accept(optional DOMString protocol);
+
+ [Throws]
+ void respondWith(Promise<Response> r);
+};
diff --git a/dom/webidl/FocusEvent.webidl b/dom/webidl/FocusEvent.webidl
new file mode 100644
index 000000000..52a2f1fde
--- /dev/null
+++ b/dom/webidl/FocusEvent.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface please see
+ * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString typeArg, optional FocusEventInit focusEventInitDict)]
+interface FocusEvent : UIEvent {
+ // Introduced in DOM Level 3:
+ readonly attribute EventTarget? relatedTarget;
+};
+
+dictionary FocusEventInit : UIEventInit {
+ EventTarget? relatedTarget = null;
+};
diff --git a/dom/webidl/FontFace.webidl b/dom/webidl/FontFace.webidl
new file mode 100644
index 000000000..136658cc7
--- /dev/null
+++ b/dom/webidl/FontFace.webidl
@@ -0,0 +1,50 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/css-font-loading/#fontface-interface
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+typedef (ArrayBuffer or ArrayBufferView) BinaryData;
+
+dictionary FontFaceDescriptors {
+ DOMString style = "normal";
+ DOMString weight = "normal";
+ DOMString stretch = "normal";
+ DOMString unicodeRange = "U+0-10FFFF";
+ DOMString variant = "normal";
+ DOMString featureSettings = "normal";
+ DOMString display = "auto";
+};
+
+enum FontFaceLoadStatus { "unloaded", "loading", "loaded", "error" };
+
+// Bug 1072107 is for exposing this in workers.
+// [Exposed=(Window,Worker)]
+[Constructor(DOMString family,
+ (DOMString or BinaryData) source,
+ optional FontFaceDescriptors descriptors),
+ Pref="layout.css.font-loading-api.enabled"]
+interface FontFace {
+ [SetterThrows] attribute DOMString family;
+ [SetterThrows] attribute DOMString style;
+ [SetterThrows] attribute DOMString weight;
+ [SetterThrows] attribute DOMString stretch;
+ [SetterThrows] attribute DOMString unicodeRange;
+ [SetterThrows] attribute DOMString variant;
+ [SetterThrows] attribute DOMString featureSettings;
+ [SetterThrows, Pref="layout.css.font-display.enabled"] attribute DOMString display;
+
+ readonly attribute FontFaceLoadStatus status;
+
+ [Throws]
+ Promise<FontFace> load();
+
+ [Throws]
+ readonly attribute Promise<FontFace> loaded;
+};
diff --git a/dom/webidl/FontFaceSet.webidl b/dom/webidl/FontFaceSet.webidl
new file mode 100644
index 000000000..7f58fbe5e
--- /dev/null
+++ b/dom/webidl/FontFaceSet.webidl
@@ -0,0 +1,64 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-interface
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+// To implement FontFaceSet's iterator until we can use setlike.
+dictionary FontFaceSetIteratorResult
+{
+ required any value;
+ required boolean done;
+};
+
+// To implement FontFaceSet's iterator until we can use setlike.
+[NoInterfaceObject]
+interface FontFaceSetIterator {
+ [Throws] FontFaceSetIteratorResult next();
+};
+
+callback FontFaceSetForEachCallback = void (FontFace value, FontFace key, FontFaceSet set);
+
+enum FontFaceSetLoadStatus { "loading", "loaded" };
+
+// Bug 1072762 is for the FontFaceSet constructor.
+// [Constructor(sequence<FontFace> initialFaces)]
+[Pref="layout.css.font-loading-api.enabled"]
+interface FontFaceSet : EventTarget {
+
+ // Emulate setlike behavior until we can use that directly.
+ readonly attribute unsigned long size;
+ [Throws] void add(FontFace font);
+ boolean has(FontFace font);
+ boolean delete(FontFace font);
+ void clear();
+ [NewObject] FontFaceSetIterator entries();
+ // Iterator keys();
+ [NewObject, Alias=keys, Alias="@@iterator"] FontFaceSetIterator values();
+ [Throws] void forEach(FontFaceSetForEachCallback cb, optional any thisArg);
+
+ // -- events for when loading state changes
+ attribute EventHandler onloading;
+ attribute EventHandler onloadingdone;
+ attribute EventHandler onloadingerror;
+
+ // check and start loads if appropriate
+ // and fulfill promise when all loads complete
+ [NewObject] Promise<sequence<FontFace>> load(DOMString font, optional DOMString text = " ");
+
+ // return whether all fonts in the fontlist are loaded
+ // (does not initiate load if not available)
+ [Throws] boolean check(DOMString font, optional DOMString text = " ");
+
+ // async notification that font loading and layout operations are done
+ [Throws] readonly attribute Promise<void> ready;
+
+ // loading state, "loading" while one or more fonts loading, "loaded" otherwise
+ readonly attribute FontFaceSetLoadStatus status;
+};
diff --git a/dom/webidl/FontFaceSetLoadEvent.webidl b/dom/webidl/FontFaceSetLoadEvent.webidl
new file mode 100644
index 000000000..6090d194e
--- /dev/null
+++ b/dom/webidl/FontFaceSetLoadEvent.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-interface
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+dictionary FontFaceSetLoadEventInit : EventInit {
+ sequence<FontFace> fontfaces = [];
+};
+
+[Constructor(DOMString type, optional FontFaceSetLoadEventInit eventInitDict),
+ Pref="layout.css.font-loading-api.enabled"]
+interface FontFaceSetLoadEvent : Event {
+ [Cached, Constant] readonly attribute sequence<FontFace> fontfaces;
+};
diff --git a/dom/webidl/FontFaceSource.webidl b/dom/webidl/FontFaceSource.webidl
new file mode 100644
index 000000000..96e1c6d76
--- /dev/null
+++ b/dom/webidl/FontFaceSource.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/css-font-loading/#font-face-source
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface FontFaceSource {
+
+ [Pref="layout.css.font-loading-api.enabled"]
+ readonly attribute FontFaceSet fonts;
+};
diff --git a/dom/webidl/FormData.webidl b/dom/webidl/FormData.webidl
new file mode 100644
index 000000000..16f780d5d
--- /dev/null
+++ b/dom/webidl/FormData.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://xhr.spec.whatwg.org
+ */
+
+typedef (Blob or Directory or USVString) FormDataEntryValue;
+
+[Constructor(optional HTMLFormElement form),
+ Exposed=(Window,Worker)]
+interface FormData {
+ [Throws]
+ void append(USVString name, Blob value, optional USVString filename);
+ [Throws]
+ void append(USVString name, USVString value);
+ void delete(USVString name);
+ FormDataEntryValue? get(USVString name);
+ sequence<FormDataEntryValue> getAll(USVString name);
+ boolean has(USVString name);
+ [Throws]
+ void set(USVString name, Blob value, optional USVString filename);
+ [Throws]
+ void set(USVString name, USVString value);
+ iterable<USVString, FormDataEntryValue>;
+};
diff --git a/dom/webidl/Function.webidl b/dom/webidl/Function.webidl
new file mode 100644
index 000000000..55bec0811
--- /dev/null
+++ b/dom/webidl/Function.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#functiocn
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+callback Function = any(any... arguments);
diff --git a/dom/webidl/GainNode.webidl b/dom/webidl/GainNode.webidl
new file mode 100644
index 000000000..143325c70
--- /dev/null
+++ b/dom/webidl/GainNode.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface GainNode : AudioNode {
+
+ readonly attribute AudioParam gain;
+
+};
+
+// Mozilla extension
+GainNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/Gamepad.webidl b/dom/webidl/Gamepad.webidl
new file mode 100644
index 000000000..d36df735d
--- /dev/null
+++ b/dom/webidl/Gamepad.webidl
@@ -0,0 +1,65 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[Pref="dom.gamepad.enabled"]
+interface GamepadButton {
+ readonly attribute boolean pressed;
+ readonly attribute double value;
+};
+
+enum GamepadMappingType {
+ "",
+ "standard"
+};
+
+[Pref="dom.gamepad.enabled"]
+interface Gamepad {
+ /**
+ * An identifier, unique per type of device.
+ */
+ readonly attribute DOMString id;
+
+ /**
+ * The game port index for the device. Unique per device
+ * attached to this system.
+ */
+ readonly attribute unsigned long index;
+
+ /**
+ * The mapping in use for this device. The empty string
+ * indicates that no mapping is in use.
+ */
+ readonly attribute GamepadMappingType mapping;
+
+ /**
+ * true if this gamepad is currently connected to the system.
+ */
+ readonly attribute boolean connected;
+
+ /**
+ * The current state of all buttons on the device, an
+ * array of GamepadButton.
+ */
+ [Pure, Cached, Frozen]
+ readonly attribute sequence<GamepadButton> buttons;
+
+ /**
+ * The current position of all axes on the device, an
+ * array of doubles.
+ */
+ [Pure, Cached, Frozen]
+ readonly attribute sequence<double> axes;
+
+ /**
+ * Timestamp from when the data of this device was last updated.
+ */
+ readonly attribute DOMHighResTimeStamp timestamp;
+
+ /**
+ * The current pose of the device, a GamepadPose.
+ */
+ [Pref="dom.gamepad.extensions.enabled"]
+ readonly attribute GamepadPose? pose;
+};
diff --git a/dom/webidl/GamepadAxisMoveEvent.webidl b/dom/webidl/GamepadAxisMoveEvent.webidl
new file mode 100644
index 000000000..7699674b4
--- /dev/null
+++ b/dom/webidl/GamepadAxisMoveEvent.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Pref="dom.gamepad.non_standard_events.enabled",
+ Constructor(DOMString type, optional GamepadAxisMoveEventInit eventInitDict)]
+interface GamepadAxisMoveEvent : GamepadEvent
+{
+ readonly attribute unsigned long axis;
+ readonly attribute double value;
+};
+
+dictionary GamepadAxisMoveEventInit : GamepadEventInit
+{
+ unsigned long axis = 0;
+ double value = 0;
+};
diff --git a/dom/webidl/GamepadButtonEvent.webidl b/dom/webidl/GamepadButtonEvent.webidl
new file mode 100644
index 000000000..b8a9e086b
--- /dev/null
+++ b/dom/webidl/GamepadButtonEvent.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Pref="dom.gamepad.non_standard_events.enabled",
+ Constructor(DOMString type, optional GamepadButtonEventInit eventInitDict)]
+interface GamepadButtonEvent : GamepadEvent
+{
+ readonly attribute unsigned long button;
+};
+
+dictionary GamepadButtonEventInit : GamepadEventInit
+{
+ unsigned long button = 0;
+};
diff --git a/dom/webidl/GamepadEvent.webidl b/dom/webidl/GamepadEvent.webidl
new file mode 100644
index 000000000..f4c3092ac
--- /dev/null
+++ b/dom/webidl/GamepadEvent.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Pref="dom.gamepad.enabled",
+ Constructor(DOMString type, optional GamepadEventInit eventInitDict)]
+interface GamepadEvent : Event
+{
+ readonly attribute Gamepad? gamepad;
+};
+
+dictionary GamepadEventInit : EventInit
+{
+ Gamepad? gamepad = null;
+};
diff --git a/dom/webidl/GamepadPose.webidl b/dom/webidl/GamepadPose.webidl
new file mode 100644
index 000000000..4b8420090
--- /dev/null
+++ b/dom/webidl/GamepadPose.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Pref="dom.gamepad.extensions.enabled"]
+interface GamepadPose
+{
+ readonly attribute boolean hasOrientation;
+ readonly attribute boolean hasPosition;
+
+ /**
+ * position, linearVelocity, and linearAcceleration are 3-component vectors.
+ * position is relative to a sitting space. Transforming this point with
+ * VRStageParameters.sittingToStandingTransform converts this to standing space.
+ */
+ [Constant, Throws] readonly attribute Float32Array? position;
+ [Constant, Throws] readonly attribute Float32Array? linearVelocity;
+ [Constant, Throws] readonly attribute Float32Array? linearAcceleration;
+
+ /* orientation is a 4-entry array representing the components of a quaternion. */
+ [Constant, Throws] readonly attribute Float32Array? orientation;
+ /* angularVelocity and angularAcceleration are the components of 3-dimensional vectors. */
+ [Constant, Throws] readonly attribute Float32Array? angularVelocity;
+ [Constant, Throws] readonly attribute Float32Array? angularAcceleration;
+};
diff --git a/dom/webidl/GamepadServiceTest.webidl b/dom/webidl/GamepadServiceTest.webidl
new file mode 100644
index 000000000..7b52625c1
--- /dev/null
+++ b/dom/webidl/GamepadServiceTest.webidl
@@ -0,0 +1,31 @@
+/* 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/. */
+
+[Pref="dom.gamepad.test.enabled"]
+interface GamepadServiceTest
+{
+ readonly attribute unsigned long noMapping;
+ readonly attribute unsigned long standardMapping;
+
+ [Throws]
+ Promise<unsigned long> addGamepad(DOMString id,
+ unsigned long mapping,
+ unsigned long numButtons,
+ unsigned long numAxes);
+
+ void removeGamepad(unsigned long index);
+
+ void newButtonEvent(unsigned long index,
+ unsigned long button,
+ boolean pressed);
+
+ void newButtonValueEvent(unsigned long index,
+ unsigned long button,
+ boolean pressed,
+ double value);
+
+ void newAxisMoveEvent(unsigned long index,
+ unsigned long axis,
+ double value);
+}; \ No newline at end of file
diff --git a/dom/webidl/Geolocation.webidl b/dom/webidl/Geolocation.webidl
new file mode 100644
index 000000000..35acaa186
--- /dev/null
+++ b/dom/webidl/Geolocation.webidl
@@ -0,0 +1,36 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/geolocation-API
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+dictionary PositionOptions {
+ boolean enableHighAccuracy = false;
+ [Clamp] unsigned long timeout = 0x7fffffff;
+ [Clamp] unsigned long maximumAge = 0;
+};
+
+[NoInterfaceObject]
+interface Geolocation {
+ [Throws]
+ void getCurrentPosition(PositionCallback successCallback,
+ optional PositionErrorCallback? errorCallback = null,
+ optional PositionOptions options);
+
+ [Throws]
+ long watchPosition(PositionCallback successCallback,
+ optional PositionErrorCallback? errorCallback = null,
+ optional PositionOptions options);
+
+ void clearWatch(long watchId);
+};
+
+callback PositionCallback = void (Position position);
+
+callback PositionErrorCallback = void (PositionError positionError);
diff --git a/dom/webidl/GeometryUtils.webidl b/dom/webidl/GeometryUtils.webidl
new file mode 100644
index 000000000..7a468baa1
--- /dev/null
+++ b/dom/webidl/GeometryUtils.webidl
@@ -0,0 +1,38 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/cssom-view/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum CSSBoxType { "margin", "border", "padding", "content" };
+dictionary BoxQuadOptions {
+ CSSBoxType box = "border";
+ GeometryNode relativeTo;
+};
+
+dictionary ConvertCoordinateOptions {
+ CSSBoxType fromBox = "border";
+ CSSBoxType toBox = "border";
+};
+
+[NoInterfaceObject]
+interface GeometryUtils {
+ [Throws, Func="nsINode::HasBoxQuadsSupport"]
+ sequence<DOMQuad> getBoxQuads(optional BoxQuadOptions options);
+ [Throws, Pref="layout.css.convertFromNode.enabled"]
+ DOMQuad convertQuadFromNode(DOMQuad quad, GeometryNode from, optional ConvertCoordinateOptions options);
+ [Throws, Pref="layout.css.convertFromNode.enabled"]
+ DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options);
+ [Throws, Pref="layout.css.convertFromNode.enabled"]
+ DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options);
+};
+
+// PseudoElement implements GeometryUtils;
+
+typedef (Text or Element /* or PseudoElement */ or Document) GeometryNode;
diff --git a/dom/webidl/GetUserMediaRequest.webidl b/dom/webidl/GetUserMediaRequest.webidl
new file mode 100644
index 000000000..9fd378e6e
--- /dev/null
+++ b/dom/webidl/GetUserMediaRequest.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * This is an internal IDL file
+ */
+
+[NoInterfaceObject]
+interface GetUserMediaRequest {
+ readonly attribute unsigned long long windowID;
+ readonly attribute unsigned long long innerWindowID;
+ readonly attribute DOMString callID;
+ MediaStreamConstraints getConstraints();
+ readonly attribute boolean isSecure;
+};
diff --git a/dom/webidl/Grid.webidl b/dom/webidl/Grid.webidl
new file mode 100644
index 000000000..b10de9383
--- /dev/null
+++ b/dom/webidl/Grid.webidl
@@ -0,0 +1,113 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/* These objects support visualization of a css-grid by the dev tools. */
+
+/**
+ * Explicit and implicit types apply to tracks, lines, and areas.
+ * https://drafts.csswg.org/css-grid/#explicit-grids
+ * https://drafts.csswg.org/css-grid/#implicit-grids
+ */
+enum GridDeclaration { "explicit", "implicit" };
+
+/**
+ * Tracks expanded from auto-fill are repeat , auto-fits with elements are
+ * also repeat, auto-fits with no elements are removed, other tracks are static.
+ */
+enum GridTrackState { "static", "repeat", "removed" };
+
+[ChromeOnly]
+interface Grid
+{
+ readonly attribute GridDimension rows;
+ readonly attribute GridDimension cols;
+ [Cached, Constant]
+ readonly attribute sequence<GridArea> areas;
+};
+
+[ChromeOnly]
+interface GridDimension
+{
+ readonly attribute GridLines lines;
+ readonly attribute GridTracks tracks;
+};
+
+[ChromeOnly]
+interface GridLines
+{
+ readonly attribute unsigned long length;
+
+ /**
+ * This accessor method allows array-like access to lines.
+ * @param index A 0-indexed value.
+ */
+ getter GridLine? item(unsigned long index);
+};
+
+[ChromeOnly]
+interface GridLine
+{
+ /**
+ * Names include both explicit names and implicit names, which will be
+ * assigned if the line contributes to a named area.
+ * https://drafts.csswg.org/css-grid/#implicit-named-lines
+ */
+ [Cached, Constant]
+ readonly attribute sequence<DOMString> names;
+
+ readonly attribute double start;
+
+ /**
+ * Breadth is the gap between the start of this line and the start of the
+ * next track in flow direction. It primarily is set by use of the -gap
+ * properties.
+ * https://drafts.csswg.org/css-grid/#gutters
+ */
+ readonly attribute double breadth;
+
+ readonly attribute GridDeclaration type;
+
+ /**
+ * Number is the 1-indexed index of the line in flow order.
+ */
+ readonly attribute unsigned long number;
+};
+
+[ChromeOnly]
+interface GridTracks
+{
+ readonly attribute unsigned long length;
+
+ /**
+ * This accessor method allows array-like access to tracks.
+ * @param index A 0-indexed value.
+ */
+ getter GridTrack? item(unsigned long index);
+};
+
+[ChromeOnly]
+interface GridTrack
+{
+ readonly attribute double start;
+ readonly attribute double breadth;
+ readonly attribute GridDeclaration type;
+ readonly attribute GridTrackState state;
+};
+
+[ChromeOnly]
+interface GridArea
+{
+ readonly attribute DOMString name;
+ readonly attribute GridDeclaration type;
+
+ /**
+ * These values are 1-indexed line numbers bounding the area.
+ */
+ readonly attribute unsigned long rowStart;
+ readonly attribute unsigned long rowEnd;
+ readonly attribute unsigned long columnStart;
+ readonly attribute unsigned long columnEnd;
+};
diff --git a/dom/webidl/HTMLAllCollection.webidl b/dom/webidl/HTMLAllCollection.webidl
new file mode 100644
index 000000000..b35213888
--- /dev/null
+++ b/dom/webidl/HTMLAllCollection.webidl
@@ -0,0 +1,14 @@
+/* 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/. */
+
+/* Emulates undefined through Codegen.py. */
+[LegacyUnenumerableNamedProperties]
+interface HTMLAllCollection {
+ readonly attribute unsigned long length;
+ getter Node? (unsigned long index);
+ Node? item(unsigned long index);
+ (Node or HTMLCollection)? item(DOMString name);
+ legacycaller (Node or HTMLCollection)? (DOMString name);
+ getter (Node or HTMLCollection)? namedItem(DOMString name);
+};
diff --git a/dom/webidl/HTMLAnchorElement.webidl b/dom/webidl/HTMLAnchorElement.webidl
new file mode 100644
index 000000000..0b8ded6d7
--- /dev/null
+++ b/dom/webidl/HTMLAnchorElement.webidl
@@ -0,0 +1,51 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-a-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-a-element
+interface HTMLAnchorElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString target;
+ [SetterThrows]
+ attribute DOMString download;
+ [SetterThrows]
+ attribute DOMString ping;
+ [SetterThrows]
+ attribute DOMString rel;
+ [SetterThrows, Pref="network.http.enablePerElementReferrer"]
+ attribute DOMString referrerPolicy;
+ [PutForwards=value]
+ readonly attribute DOMTokenList relList;
+ [SetterThrows]
+ attribute DOMString hreflang;
+ [SetterThrows]
+ attribute DOMString type;
+
+ [SetterThrows]
+ attribute DOMString text;
+};
+
+HTMLAnchorElement implements HTMLHyperlinkElementUtils;
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLAnchorElement {
+ [SetterThrows]
+ attribute DOMString coords;
+ [SetterThrows]
+ attribute DOMString charset;
+ [SetterThrows]
+ attribute DOMString name;
+ [SetterThrows]
+ attribute DOMString rev;
+ [SetterThrows]
+ attribute DOMString shape;
+};
diff --git a/dom/webidl/HTMLAppletElement.webidl b/dom/webidl/HTMLAppletElement.webidl
new file mode 100644
index 000000000..d75c42d15
--- /dev/null
+++ b/dom/webidl/HTMLAppletElement.webidl
@@ -0,0 +1,43 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-applet-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-applet-element
+[NeedResolve, UnsafeInPrerendering]
+interface HTMLAppletElement : HTMLElement {
+ [Pure, SetterThrows]
+ attribute DOMString align;
+ [Pure, SetterThrows]
+ attribute DOMString alt;
+ [Pure, SetterThrows]
+ attribute DOMString archive;
+ [Pure, SetterThrows]
+ attribute DOMString code;
+ [Pure, SetterThrows]
+ attribute DOMString codeBase;
+ [Pure, SetterThrows]
+ attribute DOMString height;
+ [Pure, SetterThrows]
+ attribute unsigned long hspace;
+ [Pure, SetterThrows]
+ attribute DOMString name;
+ [Pure, SetterThrows]
+ attribute DOMString _object;
+ [Pure, SetterThrows]
+ attribute unsigned long vspace;
+ [Pure, SetterThrows]
+ attribute DOMString width;
+};
+
+HTMLAppletElement implements MozImageLoadingContent;
+HTMLAppletElement implements MozFrameLoaderOwner;
+HTMLAppletElement implements MozObjectLoadingContent;
diff --git a/dom/webidl/HTMLAreaElement.webidl b/dom/webidl/HTMLAreaElement.webidl
new file mode 100644
index 000000000..be3f37885
--- /dev/null
+++ b/dom/webidl/HTMLAreaElement.webidl
@@ -0,0 +1,43 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-area-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ &
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-area-element
+interface HTMLAreaElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString alt;
+ [SetterThrows]
+ attribute DOMString coords;
+ [SetterThrows]
+ attribute DOMString shape;
+ [SetterThrows]
+ attribute DOMString target;
+ [SetterThrows]
+ attribute DOMString download;
+ [SetterThrows]
+ attribute DOMString ping;
+ [SetterThrows]
+ attribute DOMString rel;
+ [SetterThrows, Pref="network.http.enablePerElementReferrer"]
+ attribute DOMString referrerPolicy;
+ [PutForwards=value]
+ readonly attribute DOMTokenList relList;
+};
+
+HTMLAreaElement implements HTMLHyperlinkElementUtils;
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLAreaElement {
+ [SetterThrows]
+ attribute boolean noHref;
+};
diff --git a/dom/webidl/HTMLAudioElement.webidl b/dom/webidl/HTMLAudioElement.webidl
new file mode 100644
index 000000000..8537453c0
--- /dev/null
+++ b/dom/webidl/HTMLAudioElement.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-audio-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[NamedConstructor=Audio(optional DOMString src)]
+interface HTMLAudioElement : HTMLMediaElement {};
+
diff --git a/dom/webidl/HTMLBRElement.webidl b/dom/webidl/HTMLBRElement.webidl
new file mode 100644
index 000000000..cf5cb8a67
--- /dev/null
+++ b/dom/webidl/HTMLBRElement.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-br-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-br-element
+interface HTMLBRElement : HTMLElement {};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLBRElement {
+ [SetterThrows]
+ attribute DOMString clear;
+};
+
diff --git a/dom/webidl/HTMLBaseElement.webidl b/dom/webidl/HTMLBaseElement.webidl
new file mode 100644
index 000000000..d982f4654
--- /dev/null
+++ b/dom/webidl/HTMLBaseElement.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
+interface HTMLBaseElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute DOMString href;
+ [SetterThrows, Pure]
+ attribute DOMString target;
+};
+
diff --git a/dom/webidl/HTMLBodyElement.webidl b/dom/webidl/HTMLBodyElement.webidl
new file mode 100644
index 000000000..95df2d43a
--- /dev/null
+++ b/dom/webidl/HTMLBodyElement.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLBodyElement : HTMLElement {
+};
+
+partial interface HTMLBodyElement {
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString text;
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString link;
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString vLink;
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString aLink;
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString bgColor;
+ [SetterThrows] attribute DOMString background;
+};
+
+HTMLBodyElement implements WindowEventHandlers;
diff --git a/dom/webidl/HTMLButtonElement.webidl b/dom/webidl/HTMLButtonElement.webidl
new file mode 100644
index 000000000..c50e09ae0
--- /dev/null
+++ b/dom/webidl/HTMLButtonElement.webidl
@@ -0,0 +1,49 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
+interface HTMLButtonElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute boolean autofocus;
+ [SetterThrows, Pure]
+ attribute boolean disabled;
+ [Pure]
+ readonly attribute HTMLFormElement? form;
+ [SetterThrows, Pure]
+ attribute DOMString formAction;
+ [SetterThrows, Pure]
+ attribute DOMString formEnctype;
+ [SetterThrows, Pure]
+ attribute DOMString formMethod;
+ [SetterThrows, Pure]
+ attribute boolean formNoValidate;
+ [SetterThrows, Pure]
+ attribute DOMString formTarget;
+ [SetterThrows, Pure]
+ attribute DOMString name;
+ [SetterThrows, Pure]
+ attribute DOMString type;
+ [SetterThrows, Pure]
+ attribute DOMString value;
+// Not yet implemented:
+// attribute HTMLMenuElement? menu;
+
+ readonly attribute boolean willValidate;
+ readonly attribute ValidityState validity;
+ readonly attribute DOMString validationMessage;
+ boolean checkValidity();
+ boolean reportValidity();
+ void setCustomValidity(DOMString error);
+
+// Not yet implemented:
+// readonly attribute NodeList labels;
+};
diff --git a/dom/webidl/HTMLCanvasElement.webidl b/dom/webidl/HTMLCanvasElement.webidl
new file mode 100644
index 000000000..15e94f154
--- /dev/null
+++ b/dom/webidl/HTMLCanvasElement.webidl
@@ -0,0 +1,67 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-canvas-element
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface nsISupports;
+interface Variant;
+
+interface HTMLCanvasElement : HTMLElement {
+ [Pure, SetterThrows]
+ attribute unsigned long width;
+ [Pure, SetterThrows]
+ attribute unsigned long height;
+
+ [Throws]
+ nsISupports? getContext(DOMString contextId, optional any contextOptions = null);
+
+ [Throws]
+ DOMString toDataURL(optional DOMString type = "",
+ optional any encoderOptions);
+ [Throws]
+ void toBlob(BlobCallback _callback,
+ optional DOMString type = "",
+ optional any encoderOptions);
+};
+
+// Mozilla specific bits
+partial interface HTMLCanvasElement {
+ [Pure, SetterThrows]
+ attribute boolean mozOpaque;
+ [Throws]
+ File mozGetAsFile(DOMString name, optional DOMString? type = null);
+ [ChromeOnly, Throws]
+ nsISupports? MozGetIPCContext(DOMString contextId);
+ attribute PrintCallback? mozPrintCallback;
+
+ [Throws, UnsafeInPrerendering, Pref="canvas.capturestream.enabled"]
+ CanvasCaptureMediaStream captureStream(optional double frameRate);
+};
+
+// For OffscreenCanvas
+// Reference: https://wiki.whatwg.org/wiki/OffscreenCanvas
+partial interface HTMLCanvasElement {
+ [Pref="gfx.offscreencanvas.enabled", Throws]
+ OffscreenCanvas transferControlToOffscreen();
+};
+
+[ChromeOnly]
+interface MozCanvasPrintState
+{
+ // A canvas rendering context.
+ readonly attribute nsISupports context;
+
+ // To be called when rendering to the context is done.
+ void done();
+};
+
+callback PrintCallback = void(MozCanvasPrintState ctx);
+
+callback BlobCallback = void(Blob blob);
diff --git a/dom/webidl/HTMLCollection.webidl b/dom/webidl/HTMLCollection.webidl
new file mode 100644
index 000000000..f7f020c0f
--- /dev/null
+++ b/dom/webidl/HTMLCollection.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[LegacyUnenumerableNamedProperties]
+interface HTMLCollection {
+ readonly attribute unsigned long length;
+ getter Element? item(unsigned long index);
+ getter Element? namedItem(DOMString name);
+};
diff --git a/dom/webidl/HTMLContentElement.webidl b/dom/webidl/HTMLContentElement.webidl
new file mode 100644
index 000000000..ea809f120
--- /dev/null
+++ b/dom/webidl/HTMLContentElement.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[Func="nsDocument::IsWebComponentsEnabled"]
+interface HTMLContentElement : HTMLElement
+{
+ attribute DOMString select;
+ NodeList getDistributedNodes();
+};
+
diff --git a/dom/webidl/HTMLDListElement.webidl b/dom/webidl/HTMLDListElement.webidl
new file mode 100644
index 000000000..08020a497
--- /dev/null
+++ b/dom/webidl/HTMLDListElement.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element
+interface HTMLDListElement : HTMLElement {
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLDListElement {
+ [SetterThrows]
+ attribute boolean compact;
+};
diff --git a/dom/webidl/HTMLDataElement.webidl b/dom/webidl/HTMLDataElement.webidl
new file mode 100644
index 000000000..821b8b483
--- /dev/null
+++ b/dom/webidl/HTMLDataElement.webidl
@@ -0,0 +1,13 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-data-element
+ */
+
+interface HTMLDataElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString value;
+};
diff --git a/dom/webidl/HTMLDataListElement.webidl b/dom/webidl/HTMLDataListElement.webidl
new file mode 100644
index 000000000..83b20cd2b
--- /dev/null
+++ b/dom/webidl/HTMLDataListElement.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLDataListElement : HTMLElement {
+ readonly attribute HTMLCollection options;
+};
diff --git a/dom/webidl/HTMLDetailsElement.webidl b/dom/webidl/HTMLDetailsElement.webidl
new file mode 100644
index 000000000..133ecf125
--- /dev/null
+++ b/dom/webidl/HTMLDetailsElement.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://html.spec.whatwg.org/multipage/forms.html#the-details-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[Pref="dom.details_element.enabled"]
+interface HTMLDetailsElement : HTMLElement {
+ [SetterThrows]
+ attribute boolean open;
+};
diff --git a/dom/webidl/HTMLDirectoryElement.webidl b/dom/webidl/HTMLDirectoryElement.webidl
new file mode 100644
index 000000000..9d5160af1
--- /dev/null
+++ b/dom/webidl/HTMLDirectoryElement.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+interface HTMLDirectoryElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute boolean compact;
+};
+
diff --git a/dom/webidl/HTMLDivElement.webidl b/dom/webidl/HTMLDivElement.webidl
new file mode 100644
index 000000000..f50e2aad0
--- /dev/null
+++ b/dom/webidl/HTMLDivElement.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLDivElement : HTMLElement {};
+
+partial interface HTMLDivElement {
+ [SetterThrows]
+ attribute DOMString align;
+};
diff --git a/dom/webidl/HTMLDocument.webidl b/dom/webidl/HTMLDocument.webidl
new file mode 100644
index 000000000..61b466ff0
--- /dev/null
+++ b/dom/webidl/HTMLDocument.webidl
@@ -0,0 +1,101 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[OverrideBuiltins]
+interface HTMLDocument : Document {
+ [SetterThrows]
+ attribute DOMString? domain;
+ [Throws]
+ attribute DOMString cookie;
+ // DOM tree accessors
+ [Throws]
+ getter object (DOMString name);
+ [Pure, SetterThrows]
+ attribute HTMLElement? body;
+ [Pure]
+ readonly attribute HTMLHeadElement? head;
+ [Pure]
+ readonly attribute HTMLCollection images;
+ [Pure]
+ readonly attribute HTMLCollection embeds;
+ [Pure]
+ readonly attribute HTMLCollection plugins;
+ [Pure]
+ readonly attribute HTMLCollection links;
+ [Pure]
+ readonly attribute HTMLCollection forms;
+ [Pure]
+ readonly attribute HTMLCollection scripts;
+ NodeList getElementsByName(DOMString elementName);
+
+ // dynamic markup insertion
+ [Throws]
+ Document open(optional DOMString type = "text/html", optional DOMString replace = "");
+ [Throws]
+ WindowProxy? open(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
+ [Throws]
+ void close();
+ [Throws]
+ void write(DOMString... text);
+ [Throws]
+ void writeln(DOMString... text);
+
+ [SetterThrows, NeedsSubjectPrincipal]
+ attribute DOMString designMode;
+ [Throws]
+ boolean execCommand(DOMString commandId, optional boolean showUI = false,
+ optional DOMString value = "");
+ [Throws]
+ boolean queryCommandEnabled(DOMString commandId);
+ [Throws]
+ boolean queryCommandIndeterm(DOMString commandId);
+ [Throws]
+ boolean queryCommandState(DOMString commandId);
+ boolean queryCommandSupported(DOMString commandId);
+ [Throws]
+ DOMString queryCommandValue(DOMString commandId);
+
+ [TreatNullAs=EmptyString] attribute DOMString fgColor;
+ [TreatNullAs=EmptyString] attribute DOMString linkColor;
+ [TreatNullAs=EmptyString] attribute DOMString vlinkColor;
+ [TreatNullAs=EmptyString] attribute DOMString alinkColor;
+ [TreatNullAs=EmptyString] attribute DOMString bgColor;
+
+ [Pure]
+ readonly attribute HTMLCollection anchors;
+ [Pure]
+ readonly attribute HTMLCollection applets;
+
+ void clear();
+
+ readonly attribute HTMLAllCollection all;
+
+ // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#selections
+ [Throws]
+ Selection? getSelection();
+
+ // @deprecated These are old Netscape 4 methods. Do not use,
+ // the implementation is no-op.
+ // XXXbz do we actually need these anymore?
+ void captureEvents();
+ void releaseEvents();
+};
+
+partial interface HTMLDocument {
+ /*
+ * Number of nodes that have been blocked by
+ * the Safebrowsing API to prevent tracking.
+ */
+ [ChromeOnly, Pure]
+ readonly attribute long blockedTrackingNodeCount;
+
+ /*
+ * List of nodes that have been blocked by
+ * the Safebrowsing API to prevent tracking.
+ */
+ [ChromeOnly, Pure]
+ readonly attribute NodeList blockedTrackingNodes;
+};
diff --git a/dom/webidl/HTMLElement.webidl b/dom/webidl/HTMLElement.webidl
new file mode 100644
index 000000000..5ce5024e6
--- /dev/null
+++ b/dom/webidl/HTMLElement.webidl
@@ -0,0 +1,107 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/ and
+ * http://dev.w3.org/csswg/cssom-view/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLElement : Element {
+ // metadata attributes
+ attribute DOMString title;
+ attribute DOMString lang;
+ // attribute boolean translate;
+ [SetterThrows, Pure]
+ attribute DOMString dir;
+ [Constant]
+ readonly attribute DOMStringMap dataset;
+
+ [GetterThrows, Pure, TreatNullAs=EmptyString]
+ attribute DOMString innerText;
+
+ // user interaction
+ [SetterThrows, Pure]
+ attribute boolean hidden;
+ void click();
+ [SetterThrows, Pure]
+ attribute long tabIndex;
+ [Throws]
+ void focus();
+ [Throws]
+ void blur();
+ [SetterThrows, Pure]
+ attribute DOMString accessKey;
+ [Pure]
+ readonly attribute DOMString accessKeyLabel;
+ [SetterThrows, Pure]
+ attribute boolean draggable;
+ //[PutForwards=value] readonly attribute DOMTokenList dropzone;
+ [SetterThrows, Pure]
+ attribute DOMString contentEditable;
+ [Pure]
+ readonly attribute boolean isContentEditable;
+ [Pure]
+ readonly attribute HTMLMenuElement? contextMenu;
+ //[SetterThrows]
+ // attribute HTMLMenuElement? contextMenu;
+ [SetterThrows, Pure]
+ attribute boolean spellcheck;
+
+ // command API
+ //readonly attribute DOMString? commandType;
+ //readonly attribute DOMString? commandLabel;
+ //readonly attribute DOMString? commandIcon;
+ //readonly attribute boolean? commandHidden;
+ //readonly attribute boolean? commandDisabled;
+ //readonly attribute boolean? commandChecked;
+
+ // styling
+ [PutForwards=cssText, Constant]
+ readonly attribute CSSStyleDeclaration style;
+
+ // Mozilla specific stuff
+ attribute EventHandler oncopy;
+ attribute EventHandler oncut;
+ attribute EventHandler onpaste;
+};
+
+// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
+partial interface HTMLElement {
+ // CSSOM things are not [Pure] because they can flush
+ readonly attribute Element? offsetParent;
+ readonly attribute long offsetTop;
+ readonly attribute long offsetLeft;
+ readonly attribute long offsetWidth;
+ readonly attribute long offsetHeight;
+};
+
+// Extension for scroll-grabbing, used in the B2G dynamic toolbar.
+// This is likely to be revised.
+partial interface HTMLElement {
+ [Func="nsGenericHTMLElement::IsScrollGrabAllowed"]
+ attribute boolean scrollgrab;
+};
+
+[NoInterfaceObject]
+interface TouchEventHandlers {
+ [Func="nsGenericHTMLElement::TouchEventsEnabled"]
+ attribute EventHandler ontouchstart;
+ [Func="nsGenericHTMLElement::TouchEventsEnabled"]
+ attribute EventHandler ontouchend;
+ [Func="nsGenericHTMLElement::TouchEventsEnabled"]
+ attribute EventHandler ontouchmove;
+ [Func="nsGenericHTMLElement::TouchEventsEnabled"]
+ attribute EventHandler ontouchcancel;
+};
+
+HTMLElement implements GlobalEventHandlers;
+HTMLElement implements TouchEventHandlers;
+HTMLElement implements OnErrorEventHandlerForNodes;
+
+interface HTMLUnknownElement : HTMLElement {};
diff --git a/dom/webidl/HTMLEmbedElement.webidl b/dom/webidl/HTMLEmbedElement.webidl
new file mode 100644
index 000000000..36668595b
--- /dev/null
+++ b/dom/webidl/HTMLEmbedElement.webidl
@@ -0,0 +1,46 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#HTMLEmbedElement-partial
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
+[NeedResolve]
+interface HTMLEmbedElement : HTMLElement {
+ [Pure, SetterThrows]
+ attribute DOMString src;
+ [Pure, SetterThrows]
+ attribute DOMString type;
+ [Pure, SetterThrows]
+ attribute DOMString width;
+ [Pure, SetterThrows]
+ attribute DOMString height;
+ [Throws]
+ legacycaller any (any... arguments);
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#HTMLEmbedElement-partial
+partial interface HTMLEmbedElement {
+ [Pure, SetterThrows]
+ attribute DOMString align;
+ [Pure, SetterThrows]
+ attribute DOMString name;
+};
+
+partial interface HTMLEmbedElement {
+ // GetSVGDocument
+ [NeedsSubjectPrincipal]
+ Document? getSVGDocument();
+};
+
+HTMLEmbedElement implements MozImageLoadingContent;
+HTMLEmbedElement implements MozFrameLoaderOwner;
+HTMLEmbedElement implements MozObjectLoadingContent;
diff --git a/dom/webidl/HTMLFieldSetElement.webidl b/dom/webidl/HTMLFieldSetElement.webidl
new file mode 100644
index 000000000..6c9eee52b
--- /dev/null
+++ b/dom/webidl/HTMLFieldSetElement.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-fieldset-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLFieldSetElement : HTMLElement {
+ [SetterThrows]
+ attribute boolean disabled;
+ readonly attribute HTMLFormElement? form;
+ [SetterThrows]
+ attribute DOMString name;
+
+ readonly attribute DOMString type;
+
+ readonly attribute HTMLCollection elements;
+
+ readonly attribute boolean willValidate;
+ readonly attribute ValidityState validity;
+ readonly attribute DOMString validationMessage;
+
+ boolean checkValidity();
+ boolean reportValidity();
+
+ void setCustomValidity(DOMString error);
+};
diff --git a/dom/webidl/HTMLFontElement.webidl b/dom/webidl/HTMLFontElement.webidl
new file mode 100644
index 000000000..781dabb88
--- /dev/null
+++ b/dom/webidl/HTMLFontElement.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLFontElement : HTMLElement {
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString color;
+ [SetterThrows] attribute DOMString face;
+ [SetterThrows] attribute DOMString size;
+};
diff --git a/dom/webidl/HTMLFormControlsCollection.webidl b/dom/webidl/HTMLFormControlsCollection.webidl
new file mode 100644
index 000000000..eb2d83d42
--- /dev/null
+++ b/dom/webidl/HTMLFormControlsCollection.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#htmlformcontrolscollection
+ *
+ * © Copyright 2004-2013 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLFormControlsCollection : HTMLCollection {
+ // inherits length and item()
+ /* legacycaller */ getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
+};
diff --git a/dom/webidl/HTMLFormElement.webidl b/dom/webidl/HTMLFormElement.webidl
new file mode 100644
index 000000000..8d248e1a5
--- /dev/null
+++ b/dom/webidl/HTMLFormElement.webidl
@@ -0,0 +1,52 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[OverrideBuiltins, LegacyUnenumerableNamedProperties]
+interface HTMLFormElement : HTMLElement {
+ [Pure, SetterThrows]
+ attribute DOMString acceptCharset;
+ [Pure, SetterThrows]
+ attribute DOMString action;
+ [Pure, SetterThrows]
+ attribute DOMString autocomplete;
+ [Pure, SetterThrows]
+ attribute DOMString enctype;
+ [Pure, SetterThrows]
+ attribute DOMString encoding;
+ [Pure, SetterThrows]
+ attribute DOMString method;
+ [Pure, SetterThrows]
+ attribute DOMString name;
+ [Pure, SetterThrows]
+ attribute boolean noValidate;
+ [Pure, SetterThrows]
+ attribute DOMString target;
+
+ [Constant]
+ readonly attribute HTMLCollection elements;
+ [Pure]
+ readonly attribute long length;
+
+ getter Element (unsigned long index);
+ // TODO this should be: getter (RadioNodeList or HTMLInputElement or HTMLImageElement) (DOMString name);
+ getter nsISupports (DOMString name);
+
+ [Throws]
+ void submit();
+ void reset();
+ boolean checkValidity();
+ boolean reportValidity();
+
+ [Pref="dom.forms.requestAutocomplete"]
+ void requestAutocomplete();
+};
diff --git a/dom/webidl/HTMLFrameElement.webidl b/dom/webidl/HTMLFrameElement.webidl
new file mode 100644
index 000000000..9c5aca7c4
--- /dev/null
+++ b/dom/webidl/HTMLFrameElement.webidl
@@ -0,0 +1,35 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#htmlframeelement
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#htmlframeelement
+interface HTMLFrameElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString name;
+ [SetterThrows]
+ attribute DOMString scrolling;
+ [SetterThrows]
+ attribute DOMString src;
+ [SetterThrows]
+ attribute DOMString frameBorder;
+ [SetterThrows]
+ attribute DOMString longDesc;
+ [SetterThrows]
+ attribute boolean noResize;
+ [NeedsSubjectPrincipal]
+ readonly attribute Document? contentDocument;
+ readonly attribute WindowProxy? contentWindow;
+
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString marginHeight;
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString marginWidth;
+};
+
+HTMLFrameElement implements MozFrameLoaderOwner;
diff --git a/dom/webidl/HTMLFrameSetElement.webidl b/dom/webidl/HTMLFrameSetElement.webidl
new file mode 100644
index 000000000..ce00d487f
--- /dev/null
+++ b/dom/webidl/HTMLFrameSetElement.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLFrameSetElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString cols;
+ [SetterThrows]
+ attribute DOMString rows;
+};
+
+HTMLFrameSetElement implements WindowEventHandlers;
diff --git a/dom/webidl/HTMLHRElement.webidl b/dom/webidl/HTMLHRElement.webidl
new file mode 100644
index 000000000..0495e43b3
--- /dev/null
+++ b/dom/webidl/HTMLHRElement.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-hr-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-hr-element
+interface HTMLHRElement : HTMLElement {
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLHRElement {
+ [SetterThrows]
+ attribute DOMString align;
+ [SetterThrows]
+ attribute DOMString color;
+ [SetterThrows]
+ attribute boolean noShade;
+ [SetterThrows]
+ attribute DOMString size;
+ [SetterThrows]
+ attribute DOMString width;
+};
diff --git a/dom/webidl/HTMLHeadElement.webidl b/dom/webidl/HTMLHeadElement.webidl
new file mode 100644
index 000000000..0ad45e384
--- /dev/null
+++ b/dom/webidl/HTMLHeadElement.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
+interface HTMLHeadElement : HTMLElement {};
+
diff --git a/dom/webidl/HTMLHeadingElement.webidl b/dom/webidl/HTMLHeadingElement.webidl
new file mode 100644
index 000000000..c07e5cb99
--- /dev/null
+++ b/dom/webidl/HTMLHeadingElement.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
+interface HTMLHeadingElement : HTMLElement {
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLHeadingElement {
+ [SetterThrows]
+ attribute DOMString align;
+};
diff --git a/dom/webidl/HTMLHtmlElement.webidl b/dom/webidl/HTMLHtmlElement.webidl
new file mode 100644
index 000000000..b06de7761
--- /dev/null
+++ b/dom/webidl/HTMLHtmlElement.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
+interface HTMLHtmlElement : HTMLElement {};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLHtmlElement {
+ [SetterThrows, Pure]
+ attribute DOMString version;
+};
diff --git a/dom/webidl/HTMLHyperlinkElementUtils.webidl b/dom/webidl/HTMLHyperlinkElementUtils.webidl
new file mode 100644
index 000000000..25f175db9
--- /dev/null
+++ b/dom/webidl/HTMLHyperlinkElementUtils.webidl
@@ -0,0 +1,34 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://html.spec.whatwg.org/multipage/semantics.html#htmlhyperlinkelementutils
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[NoInterfaceObject]
+interface HTMLHyperlinkElementUtils {
+ // Bug 824857: no support for stringifier attributes yet.
+ // stringifier attribute USVString href;
+
+ // Bug 824857 should remove this.
+ stringifier;
+
+ [SetterThrows]
+ attribute USVString href;
+
+ readonly attribute USVString origin;
+ attribute USVString protocol;
+ attribute USVString username;
+ attribute USVString password;
+ attribute USVString host;
+ attribute USVString hostname;
+ attribute USVString port;
+ attribute USVString pathname;
+ attribute USVString search;
+ attribute USVString hash;
+};
diff --git a/dom/webidl/HTMLIFrameElement.webidl b/dom/webidl/HTMLIFrameElement.webidl
new file mode 100644
index 000000000..0a1b49aff
--- /dev/null
+++ b/dom/webidl/HTMLIFrameElement.webidl
@@ -0,0 +1,70 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-iframe-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLIFrameElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute DOMString src;
+ [SetterThrows, Pure]
+ attribute DOMString srcdoc;
+ [SetterThrows, Pure]
+ attribute DOMString name;
+ [PutForwards=value] readonly attribute DOMTokenList sandbox;
+ // attribute boolean seamless;
+ [SetterThrows, Pure]
+ attribute boolean allowFullscreen;
+ [SetterThrows, Pure]
+ attribute DOMString width;
+ [SetterThrows, Pure]
+ attribute DOMString height;
+ [SetterThrows, Pure, Pref="network.http.enablePerElementReferrer"]
+ attribute DOMString referrerPolicy;
+ [NeedsSubjectPrincipal]
+ readonly attribute Document? contentDocument;
+ readonly attribute WindowProxy? contentWindow;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLIFrameElement {
+ [SetterThrows, Pure]
+ attribute DOMString align;
+ [SetterThrows, Pure]
+ attribute DOMString scrolling;
+ [SetterThrows, Pure]
+ attribute DOMString frameBorder;
+ [SetterThrows, Pure]
+ attribute DOMString longDesc;
+
+ [TreatNullAs=EmptyString,SetterThrows,Pure] attribute DOMString marginHeight;
+ [TreatNullAs=EmptyString,SetterThrows,Pure] attribute DOMString marginWidth;
+};
+
+partial interface HTMLIFrameElement {
+ // GetSVGDocument
+ [NeedsSubjectPrincipal]
+ Document? getSVGDocument();
+};
+
+partial interface HTMLIFrameElement {
+ // nsIDOMMozBrowserFrame
+ [ChromeOnly,SetterThrows]
+ attribute boolean mozbrowser;
+};
+
+partial interface HTMLIFrameElement {
+ // nsIMozBrowserFrame
+ [ChromeOnly]
+ readonly attribute DOMString appManifestURL;
+};
+
+HTMLIFrameElement implements MozFrameLoaderOwner;
+HTMLIFrameElement implements BrowserElement;
diff --git a/dom/webidl/HTMLImageElement.webidl b/dom/webidl/HTMLImageElement.webidl
new file mode 100644
index 000000000..243c65509
--- /dev/null
+++ b/dom/webidl/HTMLImageElement.webidl
@@ -0,0 +1,109 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#htmlimageelement
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface imgINotificationObserver;
+interface imgIRequest;
+interface URI;
+interface nsIStreamListener;
+
+[NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
+interface HTMLImageElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString alt;
+ [SetterThrows]
+ attribute DOMString src;
+ [SetterThrows]
+ attribute DOMString srcset;
+ [SetterThrows]
+ attribute DOMString? crossOrigin;
+ [SetterThrows]
+ attribute DOMString useMap;
+ [SetterThrows, Pref="network.http.enablePerElementReferrer"]
+ attribute DOMString referrerPolicy;
+ [SetterThrows]
+ attribute boolean isMap;
+ [SetterThrows]
+ attribute unsigned long width;
+ [SetterThrows]
+ attribute unsigned long height;
+ readonly attribute unsigned long naturalWidth;
+ readonly attribute unsigned long naturalHeight;
+ readonly attribute boolean complete;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLImageElement {
+ [SetterThrows]
+ attribute DOMString name;
+ [SetterThrows]
+ attribute DOMString align;
+ [SetterThrows]
+ attribute unsigned long hspace;
+ [SetterThrows]
+ attribute unsigned long vspace;
+ [SetterThrows]
+ attribute DOMString longDesc;
+
+ [TreatNullAs=EmptyString,SetterThrows] attribute DOMString border;
+};
+
+// [Update me: not in whatwg spec yet]
+// http://picture.responsiveimages.org/#the-img-element
+partial interface HTMLImageElement {
+ [SetterThrows]
+ attribute DOMString sizes;
+ readonly attribute DOMString currentSrc;
+};
+
+// Mozilla extensions.
+partial interface HTMLImageElement {
+ attribute DOMString lowsrc;
+
+ // These attributes are offsets from the closest view (to mimic
+ // NS4's "offset-from-layer" behavior).
+ readonly attribute long x;
+ readonly attribute long y;
+};
+
+[NoInterfaceObject]
+interface MozImageLoadingContent {
+ // Mirrored chrome-only nsIImageLoadingContent methods. Please make sure
+ // to update this list if nsIImageLoadingContent changes.
+ [ChromeOnly]
+ const long UNKNOWN_REQUEST = -1;
+ [ChromeOnly]
+ const long CURRENT_REQUEST = 0;
+ [ChromeOnly]
+ const long PENDING_REQUEST = 1;
+
+ [ChromeOnly]
+ attribute boolean loadingEnabled;
+ [ChromeOnly]
+ readonly attribute short imageBlockingStatus;
+ [ChromeOnly]
+ void addObserver(imgINotificationObserver aObserver);
+ [ChromeOnly]
+ void removeObserver(imgINotificationObserver aObserver);
+ [ChromeOnly,Throws]
+ imgIRequest? getRequest(long aRequestType);
+ [ChromeOnly,Throws]
+ long getRequestType(imgIRequest aRequest);
+ [ChromeOnly,Throws]
+ readonly attribute URI? currentURI;
+ [ChromeOnly,Throws]
+ void forceReload(optional boolean aNotify);
+ [ChromeOnly]
+ void forceImageState(boolean aForce, unsigned long long aState);
+};
+
+HTMLImageElement implements MozImageLoadingContent;
diff --git a/dom/webidl/HTMLInputElement.webidl b/dom/webidl/HTMLInputElement.webidl
new file mode 100644
index 000000000..d3d537f84
--- /dev/null
+++ b/dom/webidl/HTMLInputElement.webidl
@@ -0,0 +1,261 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-input-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+enum SelectionMode {
+ "select",
+ "start",
+ "end",
+ "preserve",
+};
+
+interface nsIControllers;
+
+interface HTMLInputElement : HTMLElement {
+ [Pure, SetterThrows]
+ attribute DOMString accept;
+ [Pure, SetterThrows]
+ attribute DOMString alt;
+ [Pure, SetterThrows]
+ attribute DOMString autocomplete;
+ [Pure, SetterThrows]
+ attribute boolean autofocus;
+ [Pure, SetterThrows]
+ attribute boolean defaultChecked;
+ [Pure]
+ attribute boolean checked;
+ // Bug 850337 - attribute DOMString dirName;
+ [Pure, SetterThrows]
+ attribute boolean disabled;
+ readonly attribute HTMLFormElement? form;
+ [Pure]
+ readonly attribute FileList? files;
+ [Pure, SetterThrows]
+ attribute DOMString formAction;
+ [Pure, SetterThrows]
+ attribute DOMString formEnctype;
+ [Pure, SetterThrows]
+ attribute DOMString formMethod;
+ [Pure, SetterThrows]
+ attribute boolean formNoValidate;
+ [Pure, SetterThrows]
+ attribute DOMString formTarget;
+ [Pure, SetterThrows]
+ attribute unsigned long height;
+ [Pure]
+ attribute boolean indeterminate;
+ [Pure, SetterThrows, Pref="dom.forms.inputmode"]
+ attribute DOMString inputMode;
+ [Pure]
+ readonly attribute HTMLElement? list;
+ [Pure, SetterThrows]
+ attribute DOMString max;
+ [Pure, SetterThrows]
+ attribute long maxLength;
+ [Pure, SetterThrows]
+ attribute DOMString min;
+ [Pure, SetterThrows]
+ attribute long minLength;
+ [Pure, SetterThrows]
+ attribute boolean multiple;
+ [Pure, SetterThrows]
+ attribute DOMString name;
+ [Pure, SetterThrows]
+ attribute DOMString pattern;
+ [Pure, SetterThrows]
+ attribute DOMString placeholder;
+ [Pure, SetterThrows]
+ attribute boolean readOnly;
+ [Pure, SetterThrows]
+ attribute boolean required;
+ [Pure, SetterThrows]
+ attribute unsigned long size;
+ [Pure, SetterThrows]
+ attribute DOMString src;
+ [Pure, SetterThrows]
+ attribute DOMString step;
+ [Pure, SetterThrows]
+ attribute DOMString type;
+ [Pure, SetterThrows]
+ attribute DOMString defaultValue;
+ [Pure, TreatNullAs=EmptyString, Throws]
+ attribute DOMString value;
+ [Throws, Func="HTMLInputElement::ValueAsDateEnabled"]
+ attribute Date? valueAsDate;
+ [Pure, SetterThrows]
+ attribute unrestricted double valueAsNumber;
+ attribute unsigned long width;
+
+ [Throws]
+ void stepUp(optional long n = 1);
+ [Throws]
+ void stepDown(optional long n = 1);
+
+ [Pure]
+ readonly attribute boolean willValidate;
+ [Pure]
+ readonly attribute ValidityState validity;
+ [GetterThrows]
+ readonly attribute DOMString validationMessage;
+ boolean checkValidity();
+ boolean reportValidity();
+ void setCustomValidity(DOMString error);
+
+ // Bug 850365 readonly attribute NodeList labels;
+
+ void select();
+
+ [Throws]
+ // TODO: unsigned vs signed
+ attribute long? selectionStart;
+ [Throws]
+ attribute long? selectionEnd;
+ [Throws]
+ attribute DOMString? selectionDirection;
+ [Throws]
+ void setRangeText(DOMString replacement);
+ [Throws]
+ void setRangeText(DOMString replacement, unsigned long start,
+ unsigned long end, optional SelectionMode selectionMode = "preserve");
+
+ // also has obsolete members
+};
+
+partial interface HTMLInputElement {
+ [Pure, SetterThrows]
+ attribute DOMString align;
+ [Pure, SetterThrows]
+ attribute DOMString useMap;
+};
+
+// Mozilla extensions
+
+partial interface HTMLInputElement {
+ [Throws]
+ void setSelectionRange(long start, long end, optional DOMString direction);
+
+ [GetterThrows, ChromeOnly]
+ readonly attribute nsIControllers controllers;
+ [GetterThrows]
+ readonly attribute long textLength;
+
+ [Throws, ChromeOnly]
+ sequence<DOMString> mozGetFileNameArray();
+
+ [ChromeOnly, Throws]
+ void mozSetFileNameArray(sequence<DOMString> fileNames);
+
+ [ChromeOnly]
+ void mozSetFileArray(sequence<File> files);
+
+ // This method is meant to use for testing only.
+ [ChromeOnly, Throws]
+ void mozSetDirectory(DOMString directoryPath);
+
+ // This method is meant to use for testing only.
+ [ChromeOnly]
+ void mozSetDndFilesAndDirectories(sequence<(File or Directory)> list);
+
+ // Number controls (<input type=number>) have an anonymous text control
+ // (<input type=text>) in the anonymous shadow tree that they contain. On
+ // such an anonymous text control this property provides access to the
+ // number control that owns the text control. This is useful, for example,
+ // in code that looks at the currently focused element to make decisions
+ // about which IME to bring up. Such code needs to be able to check for any
+ // owning number control since it probably wants to bring up a number pad
+ // instead of the standard keyboard, even when the anonymous text control has
+ // focus.
+ [ChromeOnly]
+ readonly attribute HTMLInputElement? ownerNumberControl;
+
+ boolean mozIsTextField(boolean aExcludePassword);
+
+ [ChromeOnly]
+ // This function will return null if @autocomplete is not defined for the
+ // current @type
+ AutocompleteInfo? getAutocompleteInfo();
+};
+
+partial interface HTMLInputElement {
+ // Mirrored chrome-only nsIDOMNSEditableElement methods. Please make sure
+ // to update this list if nsIDOMNSEditableElement changes.
+
+ [Pure, ChromeOnly]
+ readonly attribute nsIEditor? editor;
+
+ // This is similar to set .value on nsIDOMInput/TextAreaElements, but handling
+ // of the value change is closer to the normal user input, so 'change' event
+ // for example will be dispatched when focusing out the element.
+ [Func="IsChromeOrXBL", NeedsSubjectPrincipal]
+ void setUserInput(DOMString input);
+};
+
+partial interface HTMLInputElement {
+ [Pref="dom.input.dirpicker", SetterThrows]
+ attribute boolean allowdirs;
+
+ [Pref="dom.input.dirpicker"]
+ readonly attribute boolean isFilesAndDirectoriesSupported;
+
+ [Throws, Pref="dom.input.dirpicker"]
+ Promise<sequence<(File or Directory)>> getFilesAndDirectories();
+
+ [Throws, Pref="dom.input.dirpicker"]
+ Promise<sequence<File>> getFiles(optional boolean recursiveFlag = false);
+
+ [Throws, Pref="dom.input.dirpicker"]
+ void chooseDirectory();
+};
+
+[NoInterfaceObject]
+interface MozPhonetic {
+ [Pure, ChromeOnly]
+ readonly attribute DOMString phonetic;
+};
+
+HTMLInputElement implements MozImageLoadingContent;
+HTMLInputElement implements MozPhonetic;
+
+// Webkit/Blink
+partial interface HTMLInputElement {
+ [Pref="dom.webkitBlink.filesystem.enabled", Frozen, Cached, Pure]
+ readonly attribute sequence<FileSystemEntry> webkitEntries;
+
+ [Pref="dom.webkitBlink.dirPicker.enabled", BinaryName="WebkitDirectoryAttr", SetterThrows]
+ attribute boolean webkitdirectory;
+};
+
+dictionary DateTimeValue {
+ long hour;
+ long minute;
+};
+
+partial interface HTMLInputElement {
+ [Pref="dom.forms.datetime", ChromeOnly]
+ DateTimeValue getDateTimeInputBoxValue();
+
+ [Pref="dom.forms.datetime", ChromeOnly]
+ void updateDateTimeInputBox(optional DateTimeValue value);
+
+ [Pref="dom.forms.datetime", ChromeOnly]
+ void setDateTimePickerState(boolean open);
+
+ [Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
+ void openDateTimePicker(optional DateTimeValue initialValue);
+
+ [Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
+ void updateDateTimePicker(optional DateTimeValue value);
+
+ [Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
+ void closeDateTimePicker();
+};
diff --git a/dom/webidl/HTMLLIElement.webidl b/dom/webidl/HTMLLIElement.webidl
new file mode 100644
index 000000000..c20e00846
--- /dev/null
+++ b/dom/webidl/HTMLLIElement.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
+interface HTMLLIElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute long value;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLLIElement {
+ [SetterThrows, Pure]
+ attribute DOMString type;
+};
diff --git a/dom/webidl/HTMLLabelElement.webidl b/dom/webidl/HTMLLabelElement.webidl
new file mode 100644
index 000000000..f44a56219
--- /dev/null
+++ b/dom/webidl/HTMLLabelElement.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLLabelElement : HTMLElement {
+ readonly attribute HTMLFormElement? form;
+ attribute DOMString htmlFor;
+ readonly attribute HTMLElement? control;
+};
diff --git a/dom/webidl/HTMLLegendElement.webidl b/dom/webidl/HTMLLegendElement.webidl
new file mode 100644
index 000000000..0ce4ae88b
--- /dev/null
+++ b/dom/webidl/HTMLLegendElement.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-legend-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-legend-element
+interface HTMLLegendElement : HTMLElement {
+ readonly attribute HTMLFormElement? form;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLLegendElement {
+ [SetterThrows]
+ attribute DOMString align;
+};
diff --git a/dom/webidl/HTMLLinkElement.webidl b/dom/webidl/HTMLLinkElement.webidl
new file mode 100644
index 000000000..ec094e55e
--- /dev/null
+++ b/dom/webidl/HTMLLinkElement.webidl
@@ -0,0 +1,58 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-link-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-link-element
+interface HTMLLinkElement : HTMLElement {
+ [Pure]
+ attribute boolean disabled;
+ [SetterThrows, Pure]
+ attribute DOMString href;
+ [SetterThrows, Pure]
+ attribute DOMString? crossOrigin;
+ [SetterThrows, Pure]
+ attribute DOMString rel;
+ [PutForwards=value]
+ readonly attribute DOMTokenList relList;
+ [SetterThrows, Pure]
+ attribute DOMString media;
+ [SetterThrows, Pure]
+ attribute DOMString hreflang;
+ [SetterThrows, Pure]
+ attribute DOMString type;
+ [SetterThrows, Pure, Pref="network.http.enablePerElementReferrer"]
+ attribute DOMString referrerPolicy;
+ [PutForwards=value] readonly attribute DOMTokenList sizes;
+};
+HTMLLinkElement implements LinkStyle;
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLLinkElement {
+ [SetterThrows, Pure]
+ attribute DOMString charset;
+ [SetterThrows, Pure]
+ attribute DOMString rev;
+ [SetterThrows, Pure]
+ attribute DOMString target;
+};
+
+// http://w3c.github.io/webcomponents/spec/imports/#interface-import
+partial interface HTMLLinkElement {
+ [Func="nsDocument::IsWebComponentsEnabled"]
+ readonly attribute Document? import;
+};
+
+// https://w3c.github.io/webappsec/specs/subresourceintegrity/#htmllinkelement-1
+partial interface HTMLLinkElement {
+ [SetterThrows]
+ attribute DOMString integrity;
+};
diff --git a/dom/webidl/HTMLMapElement.webidl b/dom/webidl/HTMLMapElement.webidl
new file mode 100644
index 000000000..88fe4e54c
--- /dev/null
+++ b/dom/webidl/HTMLMapElement.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-map-element
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-map-element
+interface HTMLMapElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute DOMString name;
+ [Constant]
+ readonly attribute HTMLCollection areas;
+ // Not supported yet.
+ //readonly attribute HTMLCollection images;
+};
diff --git a/dom/webidl/HTMLMediaElement.webidl b/dom/webidl/HTMLMediaElement.webidl
new file mode 100644
index 000000000..456579ec1
--- /dev/null
+++ b/dom/webidl/HTMLMediaElement.webidl
@@ -0,0 +1,224 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#media-elements
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLMediaElement : HTMLElement {
+
+ // error state
+ readonly attribute MediaError? error;
+
+ // network state
+ [SetterThrows]
+ attribute DOMString src;
+ readonly attribute DOMString currentSrc;
+
+ [SetterThrows]
+ attribute DOMString? crossOrigin;
+ const unsigned short NETWORK_EMPTY = 0;
+ const unsigned short NETWORK_IDLE = 1;
+ const unsigned short NETWORK_LOADING = 2;
+ const unsigned short NETWORK_NO_SOURCE = 3;
+ readonly attribute unsigned short networkState;
+ [SetterThrows]
+ attribute DOMString preload;
+ [NewObject]
+ readonly attribute TimeRanges buffered;
+ void load();
+ DOMString canPlayType(DOMString type);
+
+ // ready state
+ const unsigned short HAVE_NOTHING = 0;
+ const unsigned short HAVE_METADATA = 1;
+ const unsigned short HAVE_CURRENT_DATA = 2;
+ const unsigned short HAVE_FUTURE_DATA = 3;
+ const unsigned short HAVE_ENOUGH_DATA = 4;
+ readonly attribute unsigned short readyState;
+ readonly attribute boolean seeking;
+
+ // playback state
+ [SetterThrows]
+ attribute double currentTime;
+ [Throws]
+ void fastSeek(double time);
+ readonly attribute unrestricted double duration;
+ [ChromeOnly]
+ readonly attribute boolean isEncrypted;
+ // TODO: Bug 847376 - readonly attribute any startDate;
+ readonly attribute boolean paused;
+ [SetterThrows]
+ attribute double defaultPlaybackRate;
+ [SetterThrows]
+ attribute double playbackRate;
+ [NewObject]
+ readonly attribute TimeRanges played;
+ [NewObject]
+ readonly attribute TimeRanges seekable;
+ readonly attribute boolean ended;
+ [SetterThrows]
+ attribute boolean autoplay;
+ [SetterThrows]
+ attribute boolean loop;
+ [Throws]
+ void play();
+ [Throws]
+ void pause();
+
+ // TODO: Bug 847377 - mediaGroup and MediaController
+ // media controller
+ // attribute DOMString mediaGroup;
+ // attribute MediaController? controller;
+
+ // controls
+ [SetterThrows]
+ attribute boolean controls;
+ [SetterThrows]
+ attribute double volume;
+ attribute boolean muted;
+ [SetterThrows]
+ attribute boolean defaultMuted;
+
+ // TODO: Bug 847379
+ // tracks
+ [Pref="media.track.enabled"]
+ readonly attribute AudioTrackList audioTracks;
+ [Pref="media.track.enabled"]
+ readonly attribute VideoTrackList videoTracks;
+ readonly attribute TextTrackList? textTracks;
+ TextTrack addTextTrack(TextTrackKind kind,
+ optional DOMString label = "",
+ optional DOMString language = "");
+};
+
+// Mozilla extensions:
+partial interface HTMLMediaElement {
+ [ChromeOnly]
+ readonly attribute MediaSource? mozMediaSourceObject;
+ [ChromeOnly]
+ readonly attribute DOMString mozDebugReaderData;
+
+ [Pref="media.test.dumpDebugInfo"]
+ void mozDumpDebugInfo();
+
+ attribute MediaStream? srcObject;
+ // TODO: remove prefixed version soon (1183495).
+ attribute MediaStream? mozSrcObject;
+
+ attribute boolean mozPreservesPitch;
+ readonly attribute boolean mozAutoplayEnabled;
+
+ // NB: for internal use with the video controls:
+ [Func="IsChromeOrXBL"] attribute boolean mozAllowCasting;
+ [Func="IsChromeOrXBL"] attribute boolean mozIsCasting;
+
+ // Mozilla extension: stream capture
+ [Throws, UnsafeInPrerendering]
+ MediaStream mozCaptureStream();
+ [Throws, UnsafeInPrerendering]
+ MediaStream mozCaptureStreamUntilEnded();
+ readonly attribute boolean mozAudioCaptured;
+
+ // Mozilla extension: return embedded metadata from the stream as a
+ // JSObject with key:value pairs for each tag. This can be used by
+ // player interfaces to display the song title, artist, etc.
+ [Throws]
+ object? mozGetMetadata();
+
+ // Mozilla extension: provides access to the fragment end time if
+ // the media element has a fragment URI for the currentSrc, otherwise
+ // it is equal to the media duration.
+ readonly attribute double mozFragmentEnd;
+
+ // Mozilla extension: an audio channel type for media elements.
+ // Read AudioChannel.webidl for more information about this attribute.
+ [SetterThrows, Pref="media.useAudioChannelAPI"]
+ attribute AudioChannel mozAudioChannelType;
+
+ // In addition the media element has this new events:
+ // * onmozinterruptbegin - called when the media element is interrupted
+ // because of the audiochannel manager.
+ // * onmozinterruptend - called when the interruption is concluded
+ [Pref="media.useAudioChannelAPI"]
+ attribute EventHandler onmozinterruptbegin;
+
+ [Pref="media.useAudioChannelAPI"]
+ attribute EventHandler onmozinterruptend;
+};
+
+// Encrypted Media Extensions
+partial interface HTMLMediaElement {
+ [Pref="media.eme.apiVisible"]
+ readonly attribute MediaKeys? mediaKeys;
+
+ // void, not any: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26457
+ [Pref="media.eme.apiVisible", NewObject]
+ Promise<void> setMediaKeys(MediaKeys? mediaKeys);
+
+ [Pref="media.eme.apiVisible"]
+ attribute EventHandler onencrypted;
+
+ [Pref="media.eme.apiVisible"]
+ attribute EventHandler onwaitingforkey;
+};
+
+// This is just for testing
+partial interface HTMLMediaElement {
+ [Pref="media.useAudioChannelService.testing"]
+ readonly attribute double computedVolume;
+ [Pref="media.useAudioChannelService.testing"]
+ readonly attribute boolean computedMuted;
+ [Pref="media.useAudioChannelService.testing"]
+ readonly attribute unsigned long computedSuspended;
+};
+
+/*
+ * HTMLMediaElement::seekToNextFrame() is a Mozilla experimental feature.
+ *
+ * The SeekToNextFrame() method provides a way to access a video element's video
+ * frames one by one without going through the realtime playback. So, it lets
+ * authors use "frame" as unit to access the video element's underlying data,
+ * instead of "time".
+ *
+ * The SeekToNextFrame() is a kind of seek operation, so normally, once it is
+ * invoked, a "seeking" event is dispatched. However, if the media source has no
+ * video data or is not seekable, the operation is ignored without filing the
+ * "seeking" event.
+ *
+ * Once the SeekToNextFrame() is done, a "seeked" event should always be filed
+ * and a "ended" event might also be filed depends on where the media element's
+ * position before seeking was. There are two cases:
+ * Assume the media source has n+1 video frames where n is a non-negative
+ * integers and the frame sequence is indexed from zero.
+ * (1) If the currentTime is at anywhere smaller than the n-th frame's beginning
+ * time, say the currentTime is now pointing to a position which is smaller
+ * than the x-th frame's beginning time and larger or equal to the (x-1)-th
+ * frame's beginning time, where x belongs to [1, n], then the
+ * SeekToNextFrame() operation seeks the media to the x-th frame, sets the
+ * media's currentTime to the x-th frame's beginning time and dispatches a
+ * "seeked" event.
+ * (2) Otherwise, if the currentTime is larger or equal to the n-th frame's
+ * beginning time, then the SeekToNextFrame() operation sets the media's
+ * currentTime to the duration of the media source and dispatches a "seeked"
+ * event and an "ended" event.
+ */
+partial interface HTMLMediaElement {
+ [Throws, Pref="media.seekToNextFrame.enabled"]
+ Promise<void> seekToNextFrame();
+};
+
+/*
+ * This is an API for simulating visibility changes to help debug and write
+ * tests about suspend-video-decoding.
+ */
+partial interface HTMLMediaElement {
+ [Pref="media.test.setVisible"]
+ void setVisible(boolean aVisible);
+};
diff --git a/dom/webidl/HTMLMenuElement.webidl b/dom/webidl/HTMLMenuElement.webidl
new file mode 100644
index 000000000..ff81a7c80
--- /dev/null
+++ b/dom/webidl/HTMLMenuElement.webidl
@@ -0,0 +1,59 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-menu-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface MenuBuilder;
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-menu-element
+interface HTMLMenuElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString type;
+ [SetterThrows]
+ attribute DOMString label;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLMenuElement {
+ [SetterThrows]
+ attribute boolean compact;
+};
+
+// Mozilla specific stuff
+partial interface HTMLMenuElement {
+ /**
+ * Creates and dispatches a trusted event named "show".
+ * The event is not cancelable and does not bubble.
+ * See http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#context-menus
+ */
+ [ChromeOnly]
+ void sendShowEvent();
+
+ /**
+ * Creates a native menu builder. The builder type is dependent on menu type.
+ * Currently, it returns the @mozilla.org/content/html-menu-builder;1
+ * component. Toolbar menus are not yet supported (the method returns null).
+ */
+ [ChromeOnly]
+ MenuBuilder? createBuilder();
+
+ /*
+ * Builds a menu by iterating over menu children.
+ * See http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#building-menus-and-toolbars
+ * The caller can use a native builder by calling createBuilder() or provide
+ * a custom builder that implements the nsIMenuBuilder interface.
+ * A custom builder can be used for example to build native context menus
+ * that are not defined using <menupopup>.
+ */
+ [ChromeOnly]
+ void build(MenuBuilder aBuilder);
+};
diff --git a/dom/webidl/HTMLMenuItemElement.webidl b/dom/webidl/HTMLMenuItemElement.webidl
new file mode 100644
index 000000000..7064885a1
--- /dev/null
+++ b/dom/webidl/HTMLMenuItemElement.webidl
@@ -0,0 +1,36 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-menuitem-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-menuitem-element
+interface HTMLMenuItemElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString type;
+ [SetterThrows]
+ attribute DOMString label;
+ [SetterThrows]
+ attribute DOMString icon;
+ [SetterThrows]
+ attribute boolean disabled;
+ [SetterThrows]
+ attribute boolean checked;
+ [SetterThrows]
+ attribute DOMString radiogroup;
+
+ // This should be 'default' but in the IDL implementation
+ // this has been renamed 'defaultChecked'.
+ [SetterThrows]
+ attribute boolean defaultChecked;
+
+ // Currently not implemented.
+// readonly attribute HTMLElement? command;
+};
diff --git a/dom/webidl/HTMLMetaElement.webidl b/dom/webidl/HTMLMetaElement.webidl
new file mode 100644
index 000000000..5b7b0f92c
--- /dev/null
+++ b/dom/webidl/HTMLMetaElement.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-meta-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-meta-element
+interface HTMLMetaElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute DOMString name;
+ [SetterThrows, Pure]
+ attribute DOMString httpEquiv;
+ [SetterThrows, Pure]
+ attribute DOMString content;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLMetaElement {
+ [SetterThrows, Pure]
+ attribute DOMString scheme;
+};
diff --git a/dom/webidl/HTMLMeterElement.webidl b/dom/webidl/HTMLMeterElement.webidl
new file mode 100644
index 000000000..1f80764e9
--- /dev/null
+++ b/dom/webidl/HTMLMeterElement.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-meter-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-meter-element
+interface HTMLMeterElement : HTMLElement {
+ [SetterThrows]
+ attribute double value;
+ [SetterThrows]
+ attribute double min;
+ [SetterThrows]
+ attribute double max;
+ [SetterThrows]
+ attribute double low;
+ [SetterThrows]
+ attribute double high;
+ [SetterThrows]
+ attribute double optimum;
+
+ /**
+ * The labels attribute will be done with bug 556743.
+ */
+ //readonly attribute NodeList labels;
+};
diff --git a/dom/webidl/HTMLModElement.webidl b/dom/webidl/HTMLModElement.webidl
new file mode 100644
index 000000000..45086cceb
--- /dev/null
+++ b/dom/webidl/HTMLModElement.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#attributes-common-to-ins-and-del-elements
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#attributes-common-to-ins-and-del-elements
+interface HTMLModElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute DOMString cite;
+ [SetterThrows, Pure]
+ attribute DOMString dateTime;
+};
diff --git a/dom/webidl/HTMLOListElement.webidl b/dom/webidl/HTMLOListElement.webidl
new file mode 100644
index 000000000..f41abf3ea
--- /dev/null
+++ b/dom/webidl/HTMLOListElement.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-ol-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-ol-element
+interface HTMLOListElement : HTMLElement {
+ [SetterThrows]
+ attribute boolean reversed;
+ [SetterThrows]
+ attribute long start;
+ [SetterThrows]
+ attribute DOMString type;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLOListElement {
+ [SetterThrows]
+ attribute boolean compact;
+};
diff --git a/dom/webidl/HTMLObjectElement.webidl b/dom/webidl/HTMLObjectElement.webidl
new file mode 100644
index 000000000..ebb95ab09
--- /dev/null
+++ b/dom/webidl/HTMLObjectElement.webidl
@@ -0,0 +1,225 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
+[NeedResolve, UnsafeInPrerendering]
+interface HTMLObjectElement : HTMLElement {
+ [Pure, SetterThrows]
+ attribute DOMString data;
+ [Pure, SetterThrows]
+ attribute DOMString type;
+ [Pure, SetterThrows]
+ attribute boolean typeMustMatch;
+ [Pure, SetterThrows]
+ attribute DOMString name;
+ [Pure, SetterThrows]
+ attribute DOMString useMap;
+ [Pure]
+ readonly attribute HTMLFormElement? form;
+ [Pure, SetterThrows]
+ attribute DOMString width;
+ [Pure, SetterThrows]
+ attribute DOMString height;
+ // Not pure: can trigger about:blank instantiation
+ [NeedsSubjectPrincipal]
+ readonly attribute Document? contentDocument;
+ // Not pure: can trigger about:blank instantiation
+ [NeedsSubjectPrincipal]
+ readonly attribute WindowProxy? contentWindow;
+
+ readonly attribute boolean willValidate;
+ readonly attribute ValidityState validity;
+ readonly attribute DOMString validationMessage;
+ boolean checkValidity();
+ boolean reportValidity();
+ void setCustomValidity(DOMString error);
+
+ [Throws]
+ legacycaller any (any... arguments);
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
+partial interface HTMLObjectElement {
+ [Pure, SetterThrows]
+ attribute DOMString align;
+ [Pure, SetterThrows]
+ attribute DOMString archive;
+ [Pure, SetterThrows]
+ attribute DOMString code;
+ [Pure, SetterThrows]
+ attribute boolean declare;
+ [Pure, SetterThrows]
+ attribute unsigned long hspace;
+ [Pure, SetterThrows]
+ attribute DOMString standby;
+ [Pure, SetterThrows]
+ attribute unsigned long vspace;
+ [Pure, SetterThrows]
+ attribute DOMString codeBase;
+ [Pure, SetterThrows]
+ attribute DOMString codeType;
+
+ [TreatNullAs=EmptyString, Pure, SetterThrows]
+ attribute DOMString border;
+};
+
+partial interface HTMLObjectElement {
+ // GetSVGDocument
+ [NeedsSubjectPrincipal]
+ Document? getSVGDocument();
+};
+
+[NoInterfaceObject]
+interface MozObjectLoadingContent {
+ // Mirrored chrome-only scriptable nsIObjectLoadingContent methods. Please
+ // make sure to update this list if nsIObjectLoadingContent changes. Also,
+ // make sure everything on here is [ChromeOnly].
+ [ChromeOnly]
+ const unsigned long TYPE_LOADING = 0;
+ [ChromeOnly]
+ const unsigned long TYPE_IMAGE = 1;
+ [ChromeOnly]
+ const unsigned long TYPE_PLUGIN = 2;
+ [ChromeOnly]
+ const unsigned long TYPE_DOCUMENT = 3;
+ [ChromeOnly]
+ const unsigned long TYPE_NULL = 4;
+
+ // The content type is not supported (e.g. plugin not installed)
+ [ChromeOnly]
+ const unsigned long PLUGIN_UNSUPPORTED = 0;
+ // Showing alternate content
+ [ChromeOnly]
+ const unsigned long PLUGIN_ALTERNATE = 1;
+ // The plugin exists, but is disabled
+ [ChromeOnly]
+ const unsigned long PLUGIN_DISABLED = 2;
+ // The plugin is blocklisted and disabled
+ [ChromeOnly]
+ const unsigned long PLUGIN_BLOCKLISTED = 3;
+ // The plugin is considered outdated, but not disabled
+ [ChromeOnly]
+ const unsigned long PLUGIN_OUTDATED = 4;
+ // The plugin has crashed
+ [ChromeOnly]
+ const unsigned long PLUGIN_CRASHED = 5;
+ // Suppressed by security policy
+ [ChromeOnly]
+ const unsigned long PLUGIN_SUPPRESSED = 6;
+ // Blocked by content policy
+ [ChromeOnly]
+ const unsigned long PLUGIN_USER_DISABLED = 7;
+ /// ** All values >= PLUGIN_CLICK_TO_PLAY are plugin placeholder types that
+ /// would be replaced by a real plugin if activated (playPlugin())
+ /// ** Furthermore, values >= PLUGIN_CLICK_TO_PLAY and
+ /// <= PLUGIN_VULNERABLE_NO_UPDATE are click-to-play types.
+ // The plugin is disabled until the user clicks on it
+ [ChromeOnly]
+ const unsigned long PLUGIN_CLICK_TO_PLAY = 8;
+ // The plugin is vulnerable (update available)
+ [ChromeOnly]
+ const unsigned long PLUGIN_VULNERABLE_UPDATABLE = 9;
+ // The plugin is vulnerable (no update available)
+ [ChromeOnly]
+ const unsigned long PLUGIN_VULNERABLE_NO_UPDATE = 10;
+
+ /**
+ * The actual mime type (the one we got back from the network
+ * request) for the element.
+ */
+ [ChromeOnly]
+ readonly attribute DOMString actualType;
+
+ /**
+ * Gets the type of the content that's currently loaded. See
+ * the constants above for the list of possible values.
+ */
+ [ChromeOnly]
+ readonly attribute unsigned long displayedType;
+
+ /**
+ * Gets the content type that corresponds to the give MIME type. See the
+ * constants above for the list of possible values. If nothing else fits,
+ * TYPE_NULL will be returned.
+ */
+ [ChromeOnly]
+ unsigned long getContentTypeForMIMEType(DOMString aMimeType);
+
+
+ [ChromeOnly]
+ sequence<MozPluginParameter> getPluginAttributes();
+
+ [ChromeOnly]
+ sequence<MozPluginParameter> getPluginParameters();
+
+ /**
+ * This method will play a plugin that has been stopped by the click-to-play
+ * feature.
+ */
+ [ChromeOnly, Throws]
+ void playPlugin();
+
+ /**
+ * Forces a re-evaluation and reload of the tag, optionally invalidating its
+ * click-to-play state. This can be used when the MIME type that provides a
+ * type has changed, for instance, to force the tag to re-evalulate the
+ * handler to use.
+ */
+ [ChromeOnly, Throws]
+ void reload(boolean aClearActivation);
+
+ /**
+ * This attribute will return true if the current content type has been
+ * activated, either explicitly or by passing checks that would have it be
+ * click-to-play.
+ */
+ [ChromeOnly]
+ readonly attribute boolean activated;
+
+ /**
+ * The URL of the data/src loaded in the object. This may be null (i.e.
+ * an <embed> with no src).
+ */
+ [ChromeOnly]
+ readonly attribute URI? srcURI;
+
+ [ChromeOnly]
+ readonly attribute unsigned long defaultFallbackType;
+
+ [ChromeOnly]
+ readonly attribute unsigned long pluginFallbackType;
+
+ /**
+ * If this object currently owns a running plugin, regardless of whether or
+ * not one is pending spawn/despawn.
+ */
+ [ChromeOnly]
+ readonly attribute boolean hasRunningPlugin;
+
+ [ChromeOnly, Throws]
+ readonly attribute unsigned long runID;
+};
+
+/**
+ * Name:Value pair type used for passing parameters to NPAPI or javascript
+ * plugins.
+ */
+dictionary MozPluginParameter {
+ DOMString name = "";
+ DOMString value = "";
+};
+
+HTMLObjectElement implements MozImageLoadingContent;
+HTMLObjectElement implements MozFrameLoaderOwner;
+HTMLObjectElement implements MozObjectLoadingContent;
diff --git a/dom/webidl/HTMLOptGroupElement.webidl b/dom/webidl/HTMLOptGroupElement.webidl
new file mode 100644
index 000000000..a23aee30d
--- /dev/null
+++ b/dom/webidl/HTMLOptGroupElement.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-optgroup-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLOptGroupElement : HTMLElement {
+ [SetterThrows]
+ attribute boolean disabled;
+ [SetterThrows]
+ attribute DOMString label;
+};
diff --git a/dom/webidl/HTMLOptionElement.webidl b/dom/webidl/HTMLOptionElement.webidl
new file mode 100644
index 000000000..c80bedeef
--- /dev/null
+++ b/dom/webidl/HTMLOptionElement.webidl
@@ -0,0 +1,31 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-option-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[NamedConstructor=Option(optional DOMString text, optional DOMString value, optional boolean defaultSelected, optional boolean selected)]
+interface HTMLOptionElement : HTMLElement {
+ [SetterThrows]
+ attribute boolean disabled;
+ readonly attribute HTMLFormElement? form;
+ [SetterThrows]
+ attribute DOMString label;
+ [SetterThrows]
+ attribute boolean defaultSelected;
+ [SetterThrows]
+ attribute boolean selected;
+ [SetterThrows]
+ attribute DOMString value;
+
+ [SetterThrows]
+ attribute DOMString text;
+ readonly attribute long index;
+};
diff --git a/dom/webidl/HTMLOptionsCollection.webidl b/dom/webidl/HTMLOptionsCollection.webidl
new file mode 100644
index 000000000..4d4385d82
--- /dev/null
+++ b/dom/webidl/HTMLOptionsCollection.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-html5-20120329/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface HTMLOptionsCollection : HTMLCollection {
+ attribute unsigned long length;
+ [Throws]
+ setter creator void (unsigned long index, HTMLOptionElement? option);
+ [Throws]
+ void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
+ [Throws]
+ void remove(long index);
+ [Throws]
+ attribute long selectedIndex;
+};
diff --git a/dom/webidl/HTMLOutputElement.webidl b/dom/webidl/HTMLOutputElement.webidl
new file mode 100644
index 000000000..05dcf1800
--- /dev/null
+++ b/dom/webidl/HTMLOutputElement.webidl
@@ -0,0 +1,38 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
+interface HTMLOutputElement : HTMLElement {
+ [PutForwards=value, Constant]
+ readonly attribute DOMTokenList htmlFor;
+ readonly attribute HTMLFormElement? form;
+ [SetterThrows, Pure]
+ attribute DOMString name;
+
+ [Constant]
+ readonly attribute DOMString type;
+ [SetterThrows, Pure]
+ attribute DOMString defaultValue;
+ [SetterThrows, Pure]
+ attribute DOMString value;
+
+ readonly attribute boolean willValidate;
+ readonly attribute ValidityState validity;
+ readonly attribute DOMString validationMessage;
+ boolean checkValidity();
+ boolean reportValidity();
+ void setCustomValidity(DOMString error);
+
+// Not yet implemented (bug 556743).
+// readonly attribute NodeList labels;
+};
diff --git a/dom/webidl/HTMLParagraphElement.webidl b/dom/webidl/HTMLParagraphElement.webidl
new file mode 100644
index 000000000..2a626d257
--- /dev/null
+++ b/dom/webidl/HTMLParagraphElement.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-p-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-p-element
+interface HTMLParagraphElement : HTMLElement {
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLParagraphElement {
+ [SetterThrows]
+ attribute DOMString align;
+};
diff --git a/dom/webidl/HTMLParamElement.webidl b/dom/webidl/HTMLParamElement.webidl
new file mode 100644
index 000000000..e2c7e8d7f
--- /dev/null
+++ b/dom/webidl/HTMLParamElement.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
+interface HTMLParamElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute DOMString name;
+ [SetterThrows, Pure]
+ attribute DOMString value;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLParamElement {
+ [SetterThrows, Pure]
+ attribute DOMString type;
+ [SetterThrows, Pure]
+ attribute DOMString valueType;
+};
diff --git a/dom/webidl/HTMLPictureElement.webidl b/dom/webidl/HTMLPictureElement.webidl
new file mode 100644
index 000000000..eff30f750
--- /dev/null
+++ b/dom/webidl/HTMLPictureElement.webidl
@@ -0,0 +1,8 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface HTMLPictureElement : HTMLElement {
+};
diff --git a/dom/webidl/HTMLPreElement.webidl b/dom/webidl/HTMLPreElement.webidl
new file mode 100644
index 000000000..db220b74c
--- /dev/null
+++ b/dom/webidl/HTMLPreElement.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element
+interface HTMLPreElement : HTMLElement {
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLPreElement {
+ [SetterThrows]
+ attribute long width;
+};
diff --git a/dom/webidl/HTMLProgressElement.webidl b/dom/webidl/HTMLProgressElement.webidl
new file mode 100644
index 000000000..3d1000d22
--- /dev/null
+++ b/dom/webidl/HTMLProgressElement.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-progress-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLProgressElement : HTMLElement {
+ [SetterThrows]
+ attribute double value;
+ [SetterThrows]
+ attribute double max;
+ readonly attribute double position;
+
+ /**
+ * The labels attribute will be done with bug 567740.
+ */
+ //readonly attribute NodeList labels;
+};
diff --git a/dom/webidl/HTMLQuoteElement.webidl b/dom/webidl/HTMLQuoteElement.webidl
new file mode 100644
index 000000000..a266dd353
--- /dev/null
+++ b/dom/webidl/HTMLQuoteElement.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
+interface HTMLQuoteElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute DOMString cite;
+};
+
diff --git a/dom/webidl/HTMLScriptElement.webidl b/dom/webidl/HTMLScriptElement.webidl
new file mode 100644
index 000000000..377056366
--- /dev/null
+++ b/dom/webidl/HTMLScriptElement.webidl
@@ -0,0 +1,40 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-script-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ */
+
+interface HTMLScriptElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString src;
+ [SetterThrows]
+ attribute DOMString type;
+ [SetterThrows]
+ attribute DOMString charset;
+ [SetterThrows]
+ attribute boolean async;
+ [SetterThrows]
+ attribute boolean defer;
+ [SetterThrows]
+ attribute DOMString? crossOrigin;
+ [SetterThrows]
+ attribute DOMString text;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLScriptElement {
+ [SetterThrows]
+ attribute DOMString event;
+ [SetterThrows]
+ attribute DOMString htmlFor;
+};
+
+// https://w3c.github.io/webappsec/specs/subresourceintegrity/#htmlscriptelement-1
+partial interface HTMLScriptElement {
+ [SetterThrows]
+ attribute DOMString integrity;
+};
diff --git a/dom/webidl/HTMLSelectElement.webidl b/dom/webidl/HTMLSelectElement.webidl
new file mode 100644
index 000000000..74fc7b2cf
--- /dev/null
+++ b/dom/webidl/HTMLSelectElement.webidl
@@ -0,0 +1,65 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/html/#the-select-element
+ */
+
+interface HTMLSelectElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute boolean autofocus;
+ [Pref="dom.forms.autocomplete.experimental", SetterThrows, Pure]
+ attribute DOMString autocomplete;
+ [SetterThrows, Pure]
+ attribute boolean disabled;
+ [Pure]
+ readonly attribute HTMLFormElement? form;
+ [SetterThrows, Pure]
+ attribute boolean multiple;
+ [SetterThrows, Pure]
+ attribute DOMString name;
+ [SetterThrows, Pure]
+ attribute boolean required;
+ [SetterThrows, Pure]
+ attribute unsigned long size;
+
+ [Pure]
+ readonly attribute DOMString type;
+
+ [Constant]
+ readonly attribute HTMLOptionsCollection options;
+ [SetterThrows, Pure]
+ attribute unsigned long length;
+ getter Element? item(unsigned long index);
+ HTMLOptionElement? namedItem(DOMString name);
+ [Throws]
+ void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
+ void remove(long index);
+ [Throws]
+ setter creator void (unsigned long index, HTMLOptionElement? option);
+
+ readonly attribute HTMLCollection selectedOptions;
+ [SetterThrows, Pure]
+ attribute long selectedIndex;
+ [Pure]
+ attribute DOMString value;
+
+ readonly attribute boolean willValidate;
+ readonly attribute ValidityState validity;
+ readonly attribute DOMString validationMessage;
+ boolean checkValidity();
+ boolean reportValidity();
+ void setCustomValidity(DOMString error);
+
+// NYI: readonly attribute NodeList labels;
+
+ // https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720
+ void remove();
+};
+
+partial interface HTMLSelectElement {
+ [ChromeOnly]
+ attribute boolean openInParentProcess;
+};
diff --git a/dom/webidl/HTMLShadowElement.webidl b/dom/webidl/HTMLShadowElement.webidl
new file mode 100644
index 000000000..f72cd06e1
--- /dev/null
+++ b/dom/webidl/HTMLShadowElement.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[Func="nsDocument::IsWebComponentsEnabled"]
+interface HTMLShadowElement : HTMLElement
+{
+ readonly attribute ShadowRoot? olderShadowRoot;
+};
+
diff --git a/dom/webidl/HTMLSourceElement.webidl b/dom/webidl/HTMLSourceElement.webidl
new file mode 100644
index 000000000..10b8e6fd5
--- /dev/null
+++ b/dom/webidl/HTMLSourceElement.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-source-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLSourceElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString src;
+ [SetterThrows]
+ attribute DOMString type;
+};
+
+partial interface HTMLSourceElement {
+ [SetterThrows]
+ attribute DOMString srcset;
+ [SetterThrows]
+ attribute DOMString sizes;
+ [SetterThrows]
+ attribute DOMString media;
+};
diff --git a/dom/webidl/HTMLSpanElement.webidl b/dom/webidl/HTMLSpanElement.webidl
new file mode 100644
index 000000000..43a2d97f2
--- /dev/null
+++ b/dom/webidl/HTMLSpanElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-span-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-span-element
+interface HTMLSpanElement : HTMLElement {};
diff --git a/dom/webidl/HTMLStyleElement.webidl b/dom/webidl/HTMLStyleElement.webidl
new file mode 100644
index 000000000..7ed01a8f1
--- /dev/null
+++ b/dom/webidl/HTMLStyleElement.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-style-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ */
+
+interface HTMLStyleElement : HTMLElement {
+ [Pure]
+ attribute boolean disabled;
+ [SetterThrows, Pure]
+ attribute DOMString media;
+ [SetterThrows, Pure]
+ attribute DOMString type;
+ [SetterThrows, Pure]
+ attribute boolean scoped;
+};
+HTMLStyleElement implements LinkStyle;
+
diff --git a/dom/webidl/HTMLTableCaptionElement.webidl b/dom/webidl/HTMLTableCaptionElement.webidl
new file mode 100644
index 000000000..688b9f925
--- /dev/null
+++ b/dom/webidl/HTMLTableCaptionElement.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLTableCaptionElement : HTMLElement {};
+
+partial interface HTMLTableCaptionElement {
+ [SetterThrows]
+ attribute DOMString align;
+};
diff --git a/dom/webidl/HTMLTableCellElement.webidl b/dom/webidl/HTMLTableCellElement.webidl
new file mode 100644
index 000000000..e970a5040
--- /dev/null
+++ b/dom/webidl/HTMLTableCellElement.webidl
@@ -0,0 +1,51 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLTableCellElement : HTMLElement {
+ [SetterThrows]
+ attribute unsigned long colSpan;
+ [SetterThrows]
+ attribute unsigned long rowSpan;
+ //[PutForwards=value] readonly attribute DOMTokenList headers;
+ [SetterThrows]
+ attribute DOMString headers;
+ readonly attribute long cellIndex;
+
+ // Mozilla-specific extensions
+ [SetterThrows]
+ attribute DOMString abbr;
+ [SetterThrows]
+ attribute DOMString scope;
+};
+
+partial interface HTMLTableCellElement {
+ [SetterThrows]
+ attribute DOMString align;
+ [SetterThrows]
+ attribute DOMString axis;
+ [SetterThrows]
+ attribute DOMString height;
+ [SetterThrows]
+ attribute DOMString width;
+
+ [SetterThrows]
+ attribute DOMString ch;
+ [SetterThrows]
+ attribute DOMString chOff;
+ [SetterThrows]
+ attribute boolean noWrap;
+ [SetterThrows]
+ attribute DOMString vAlign;
+
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString bgColor;
+};
diff --git a/dom/webidl/HTMLTableColElement.webidl b/dom/webidl/HTMLTableColElement.webidl
new file mode 100644
index 000000000..c927541a3
--- /dev/null
+++ b/dom/webidl/HTMLTableColElement.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLTableColElement : HTMLElement {
+ [SetterThrows]
+ attribute unsigned long span;
+};
+
+partial interface HTMLTableColElement {
+ [SetterThrows]
+ attribute DOMString align;
+ [SetterThrows]
+ attribute DOMString ch;
+ [SetterThrows]
+ attribute DOMString chOff;
+ [SetterThrows]
+ attribute DOMString vAlign;
+ [SetterThrows]
+ attribute DOMString width;
+};
diff --git a/dom/webidl/HTMLTableElement.webidl b/dom/webidl/HTMLTableElement.webidl
new file mode 100644
index 000000000..a06f590e0
--- /dev/null
+++ b/dom/webidl/HTMLTableElement.webidl
@@ -0,0 +1,55 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLTableElement : HTMLElement {
+ [SetterThrows]
+ attribute HTMLTableCaptionElement? caption;
+ HTMLElement createCaption();
+ void deleteCaption();
+ [SetterThrows]
+ attribute HTMLTableSectionElement? tHead;
+ HTMLElement createTHead();
+ void deleteTHead();
+ [SetterThrows]
+ attribute HTMLTableSectionElement? tFoot;
+ HTMLElement createTFoot();
+ void deleteTFoot();
+ readonly attribute HTMLCollection tBodies;
+ HTMLElement createTBody();
+ readonly attribute HTMLCollection rows;
+ [Throws]
+ HTMLElement insertRow(optional long index = -1);
+ [Throws]
+ void deleteRow(long index);
+ // attribute boolean sortable;
+ //void stopSorting();
+};
+
+partial interface HTMLTableElement {
+ [SetterThrows]
+ attribute DOMString align;
+ [SetterThrows]
+ attribute DOMString border;
+ [SetterThrows]
+ attribute DOMString frame;
+ [SetterThrows]
+ attribute DOMString rules;
+ [SetterThrows]
+ attribute DOMString summary;
+ [SetterThrows]
+ attribute DOMString width;
+
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString bgColor;
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString cellPadding;
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString cellSpacing;
+};
diff --git a/dom/webidl/HTMLTableRowElement.webidl b/dom/webidl/HTMLTableRowElement.webidl
new file mode 100644
index 000000000..2a356a20e
--- /dev/null
+++ b/dom/webidl/HTMLTableRowElement.webidl
@@ -0,0 +1,35 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLTableRowElement : HTMLElement {
+ readonly attribute long rowIndex;
+ readonly attribute long sectionRowIndex;
+ readonly attribute HTMLCollection cells;
+ [Throws]
+ HTMLElement insertCell(optional long index = -1);
+ [Throws]
+ void deleteCell(long index);
+};
+
+partial interface HTMLTableRowElement {
+ [SetterThrows]
+ attribute DOMString align;
+ [SetterThrows]
+ attribute DOMString ch;
+ [SetterThrows]
+ attribute DOMString chOff;
+ [SetterThrows]
+ attribute DOMString vAlign;
+
+ [TreatNullAs=EmptyString, SetterThrows] attribute DOMString bgColor;
+};
diff --git a/dom/webidl/HTMLTableSectionElement.webidl b/dom/webidl/HTMLTableSectionElement.webidl
new file mode 100644
index 000000000..310d0ece6
--- /dev/null
+++ b/dom/webidl/HTMLTableSectionElement.webidl
@@ -0,0 +1,31 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLTableSectionElement : HTMLElement {
+ readonly attribute HTMLCollection rows;
+ [Throws]
+ HTMLElement insertRow(optional long index = -1);
+ [Throws]
+ void deleteRow(long index);
+};
+
+partial interface HTMLTableSectionElement {
+ [SetterThrows]
+ attribute DOMString align;
+ [SetterThrows]
+ attribute DOMString ch;
+ [SetterThrows]
+ attribute DOMString chOff;
+ [SetterThrows]
+ attribute DOMString vAlign;
+};
diff --git a/dom/webidl/HTMLTemplateElement.webidl b/dom/webidl/HTMLTemplateElement.webidl
new file mode 100644
index 000000000..c518995f6
--- /dev/null
+++ b/dom/webidl/HTMLTemplateElement.webidl
@@ -0,0 +1,15 @@
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface HTMLTemplateElement : HTMLElement {
+ readonly attribute DocumentFragment content;
+};
+
diff --git a/dom/webidl/HTMLTextAreaElement.webidl b/dom/webidl/HTMLTextAreaElement.webidl
new file mode 100644
index 000000000..b1005ed42
--- /dev/null
+++ b/dom/webidl/HTMLTextAreaElement.webidl
@@ -0,0 +1,99 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-textarea-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface nsIEditor;
+interface MozControllers;
+
+interface HTMLTextAreaElement : HTMLElement {
+ // attribute DOMString autocomplete;
+ [SetterThrows, Pure]
+ attribute boolean autofocus;
+ [SetterThrows, Pure]
+ attribute unsigned long cols;
+ // attribute DOMString dirName;
+ [SetterThrows, Pure]
+ attribute boolean disabled;
+ [Pure]
+ readonly attribute HTMLFormElement? form;
+ // attribute DOMString inputMode;
+ [SetterThrows, Pure]
+ attribute long maxLength;
+ [SetterThrows, Pure]
+ attribute long minLength;
+ [SetterThrows, Pure]
+ attribute DOMString name;
+ [SetterThrows, Pure]
+ attribute DOMString placeholder;
+ [SetterThrows, Pure]
+ attribute boolean readOnly;
+ [SetterThrows, Pure]
+ attribute boolean required;
+ [SetterThrows, Pure]
+ attribute unsigned long rows;
+ [SetterThrows, Pure]
+ attribute DOMString wrap;
+
+ [Constant]
+ readonly attribute DOMString type;
+ [SetterThrows, Pure]
+ attribute DOMString defaultValue;
+ [TreatNullAs=EmptyString] attribute DOMString value;
+ readonly attribute unsigned long textLength;
+
+ readonly attribute boolean willValidate;
+ readonly attribute ValidityState validity;
+ readonly attribute DOMString validationMessage;
+ boolean checkValidity();
+ boolean reportValidity();
+ void setCustomValidity(DOMString error);
+
+ // readonly attribute NodeList labels;
+
+ void select();
+ [Throws]
+ attribute unsigned long? selectionStart;
+ [Throws]
+ attribute unsigned long? selectionEnd;
+ [Throws]
+ attribute DOMString? selectionDirection;
+ [Throws]
+ void setRangeText(DOMString replacement);
+ [Throws]
+ void setRangeText(DOMString replacement, unsigned long start,
+ unsigned long end, optional SelectionMode selectionMode = "preserve");
+ [Throws]
+ void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
+};
+
+partial interface HTMLTextAreaElement {
+ // Mirrored chrome-only Mozilla extensions to nsIDOMHTMLTextAreaElement.
+ // Please make sure to update this list of nsIDOMHTMLTextAreaElement changes.
+
+ [Throws, ChromeOnly]
+ readonly attribute MozControllers controllers;
+};
+
+partial interface HTMLTextAreaElement {
+ // Mirrored chrome-only nsIDOMNSEditableElement methods. Please make sure
+ // to update this list if nsIDOMNSEditableElement changes.
+
+ [ChromeOnly]
+ readonly attribute nsIEditor? editor;
+
+ // This is similar to set .value on nsIDOMInput/TextAreaElements, but
+ // handling of the value change is closer to the normal user input, so
+ // 'change' event for example will be dispatched when focusing out the
+ // element.
+ [ChromeOnly]
+ void setUserInput(DOMString input);
+};
diff --git a/dom/webidl/HTMLTimeElement.webidl b/dom/webidl/HTMLTimeElement.webidl
new file mode 100644
index 000000000..517ca9981
--- /dev/null
+++ b/dom/webidl/HTMLTimeElement.webidl
@@ -0,0 +1,13 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element
+ */
+
+interface HTMLTimeElement : HTMLElement {
+ [SetterThrows]
+ attribute DOMString dateTime;
+};
diff --git a/dom/webidl/HTMLTitleElement.webidl b/dom/webidl/HTMLTitleElement.webidl
new file mode 100644
index 000000000..e6c8f2c61
--- /dev/null
+++ b/dom/webidl/HTMLTitleElement.webidl
@@ -0,0 +1,13 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-title-element
+ */
+
+interface HTMLTitleElement : HTMLElement {
+ [Throws]
+ attribute DOMString text;
+};
diff --git a/dom/webidl/HTMLTrackElement.webidl b/dom/webidl/HTMLTrackElement.webidl
new file mode 100644
index 000000000..dd88e9beb
--- /dev/null
+++ b/dom/webidl/HTMLTrackElement.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-track-element
+ */
+
+interface HTMLTrackElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute DOMString kind;
+ [SetterThrows, Pure]
+ attribute DOMString src;
+ [SetterThrows, Pure]
+ attribute DOMString srclang;
+ [SetterThrows, Pure]
+ attribute DOMString label;
+ [SetterThrows, Pure]
+ attribute boolean default;
+
+ const unsigned short NONE = 0;
+ const unsigned short LOADING = 1;
+ const unsigned short LOADED = 2;
+ const unsigned short ERROR = 3;
+ readonly attribute unsigned short readyState;
+
+ readonly attribute TextTrack? track;
+};
diff --git a/dom/webidl/HTMLUListElement.webidl b/dom/webidl/HTMLUListElement.webidl
new file mode 100644
index 000000000..0528198c9
--- /dev/null
+++ b/dom/webidl/HTMLUListElement.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-ul-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-ul-element
+interface HTMLUListElement : HTMLElement {
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLUListElement {
+ [SetterThrows]
+ attribute boolean compact;
+ [SetterThrows]
+ attribute DOMString type;
+};
diff --git a/dom/webidl/HTMLVideoElement.webidl b/dom/webidl/HTMLVideoElement.webidl
new file mode 100644
index 000000000..af28d5418
--- /dev/null
+++ b/dom/webidl/HTMLVideoElement.webidl
@@ -0,0 +1,57 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-video-element
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLVideoElement : HTMLMediaElement {
+ [SetterThrows]
+ attribute unsigned long width;
+ [SetterThrows]
+ attribute unsigned long height;
+ readonly attribute unsigned long videoWidth;
+ readonly attribute unsigned long videoHeight;
+ [SetterThrows]
+ attribute DOMString poster;
+};
+
+partial interface HTMLVideoElement {
+ // A count of the number of video frames that have demuxed from the media
+ // resource. If we were playing perfectly, we'd be able to paint this many
+ // frames.
+ readonly attribute unsigned long mozParsedFrames;
+
+ // A count of the number of frames that have been decoded. We may drop
+ // frames if the decode is taking too much time.
+ readonly attribute unsigned long mozDecodedFrames;
+
+ // A count of the number of frames that have been presented to the rendering
+ // pipeline. We may drop frames if they arrive late at the renderer.
+ readonly attribute unsigned long mozPresentedFrames;
+
+ // Number of presented frames which were painted on screen.
+ readonly attribute unsigned long mozPaintedFrames;
+
+ // Time which the last painted video frame was late by, in seconds.
+ readonly attribute double mozFrameDelay;
+
+ // True if the video has an audio track available.
+ readonly attribute boolean mozHasAudio;
+
+ // True if the video should use a screen wake lock.
+ [Pref="dom.wakelock.enabled", Func="Navigator::HasWakeLockSupport"]
+ attribute boolean mozUseScreenWakeLock;
+};
+
+// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#idl-def-HTMLVideoElement
+partial interface HTMLVideoElement {
+ [Func="mozilla::dom::MediaSource::Enabled", NewObject]
+ VideoPlaybackQuality getVideoPlaybackQuality();
+};
diff --git a/dom/webidl/HashChangeEvent.webidl b/dom/webidl/HashChangeEvent.webidl
new file mode 100644
index 000000000..735e8eb28
--- /dev/null
+++ b/dom/webidl/HashChangeEvent.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), LegacyEventInit]
+interface HashChangeEvent : Event
+{
+ readonly attribute DOMString oldURL;
+ readonly attribute DOMString newURL;
+
+ void initHashChangeEvent(DOMString typeArg,
+ boolean canBubbleArg,
+ boolean cancelableArg,
+ DOMString oldURLArg,
+ DOMString newURLArg);
+};
+
+dictionary HashChangeEventInit : EventInit
+{
+ DOMString oldURL = "";
+ DOMString newURL = "";
+};
diff --git a/dom/webidl/Headers.webidl b/dom/webidl/Headers.webidl
new file mode 100644
index 000000000..205ab9f9e
--- /dev/null
+++ b/dom/webidl/Headers.webidl
@@ -0,0 +1,34 @@
+/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 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/.
+ *
+ * The origin of this IDL file is
+ * http://fetch.spec.whatwg.org/#headers-class
+ */
+
+typedef (Headers or sequence<sequence<ByteString>> or MozMap<ByteString>) HeadersInit;
+
+enum HeadersGuardEnum {
+ "none",
+ "request",
+ "request-no-cors",
+ "response",
+ "immutable"
+};
+
+[Constructor(optional HeadersInit init),
+ Exposed=(Window,Worker)]
+interface Headers {
+ [Throws] void append(ByteString name, ByteString value);
+ [Throws] void delete(ByteString name);
+ [Throws] ByteString? get(ByteString name);
+ [Throws] boolean has(ByteString name);
+ [Throws] void set(ByteString name, ByteString value);
+ iterable<ByteString, ByteString>;
+
+ // Used to test different guard states from mochitest.
+ // Note: Must be set prior to populating headers or will throw.
+ [ChromeOnly, SetterThrows] attribute HeadersGuardEnum guard;
+};
diff --git a/dom/webidl/HeapSnapshot.webidl b/dom/webidl/HeapSnapshot.webidl
new file mode 100644
index 000000000..f1418dc28
--- /dev/null
+++ b/dom/webidl/HeapSnapshot.webidl
@@ -0,0 +1,105 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * A HeapSnapshot represents a snapshot of the heap graph
+ */
+[ChromeOnly, Exposed=(Window,System,Worker)]
+interface HeapSnapshot {
+ /**
+ * A time stamp of when the heap snapshot was taken, if available. Units are
+ * microseconds since midnight (00:00:00) 1 January 1970 UTC.
+ */
+ readonly attribute unsigned long long? creationTime;
+
+ /**
+ * Take a census of the heap snapshot.
+ *
+ * This is the same as |Debugger.Memory.prototype.takeCensus|, but operates on
+ * the offline heap snapshot's serialized heap graph rather than the live heap
+ * graph. The same optional configuration options that can be passed to that
+ * function can be passed here.
+ *
+ * The returned value is determined by the `"breakdown"` option used, and is
+ * usually a `Map`, `Object`, or `Array`. For example, the following breakdown
+ *
+ * {
+ * by: "coarseType",
+ * objects: { by: "objectClass" },
+ * other: { by: "internalType" }
+ * }
+ *
+ * produces a result like this:
+ *
+ * {
+ * "objects": {
+ * "Function": { "count": 404, "bytes": 37328 },
+ * "Object": { "count": 11, "bytes": 1264 },
+ * "Debugger": { "count": 1, "bytes": 416 },
+ * "ScriptSource": { "count": 1, "bytes": 64 },
+ * // ... omitted for brevity...
+ * },
+ * "scripts": { "count": 1, "bytes": 0 },
+ * "strings": { "count": 701, "bytes": 49080 },
+ * "other": {
+ * "js::Shape": { "count": 450, "bytes": 0 },
+ * "js::BaseShape": { "count": 21, "bytes": 0 },
+ * "js::ObjectGroup": { "count": 17, "bytes": 0 }
+ * }
+ * }
+ *
+ * See the `takeCensus` section of the `js/src/doc/Debugger/Debugger.Memory.md`
+ * file for detailed documentation.
+ */
+ [Throws]
+ any takeCensus(object? options);
+
+ /**
+ * Describe `node` with the specified `breakdown`. See the comment above
+ * `takeCensus` or `js/src/doc/Debugger/Debugger.Memory.md` for detailed
+ * documentation on breakdowns.
+ *
+ * Throws an error when `node` is not the id of a node in the heap snapshot,
+ * or if the breakdown is invalid.
+ */
+ [Throws]
+ any describeNode(object breakdown, NodeId node);
+
+ /**
+ * Compute the dominator tree for this heap snapshot.
+ *
+ * @see DominatorTree.webidl
+ */
+ [Throws]
+ DominatorTree computeDominatorTree();
+
+ /**
+ * Find the shortest retaining paths from the node associated with the ID
+ * `start` to each node associated with the IDs in `targets`. Find at most
+ * `maxNumPaths` retaining paths for each target node.
+ *
+ * The return value is a Map object mapping from each target node ID to an
+ * array of retaining paths. The array may be empty if we did not find any
+ * retaining paths.
+ *
+ * A path is an array of objects of the form:
+ *
+ * {
+ * predecessor: <node ID>,
+ * edge: <string or null>,
+ * }
+ *
+ * The first `predecessor` will always be `start`. The last edge in the path
+ * leads to the `target` node that is mapped to the path; the `target` does
+ * not appear as a `predecessor` in the path.
+ *
+ * Throws when `start` or any of the elements of `targets` are not an ID of a
+ * node in the snapshot, or if we encounter an out of memory exception.
+ */
+ [Throws]
+ object computeShortestPaths(NodeId start, sequence<NodeId> targets,
+ unsigned long long maxNumPaths);
+};
diff --git a/dom/webidl/HiddenPluginEvent.webidl b/dom/webidl/HiddenPluginEvent.webidl
new file mode 100644
index 000000000..1ba09acb6
--- /dev/null
+++ b/dom/webidl/HiddenPluginEvent.webidl
@@ -0,0 +1,12 @@
+interface PluginTag;
+
+[Constructor(DOMString type, optional HiddenPluginEventInit eventInit), ChromeOnly]
+interface HiddenPluginEvent : Event
+{
+ readonly attribute PluginTag? tag;
+};
+
+dictionary HiddenPluginEventInit : EventInit
+{
+ PluginTag? tag = null;
+};
diff --git a/dom/webidl/History.webidl b/dom/webidl/History.webidl
new file mode 100644
index 000000000..48032212a
--- /dev/null
+++ b/dom/webidl/History.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-history-interface
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+enum ScrollRestoration { "auto", "manual" };
+
+interface History {
+ [Throws]
+ readonly attribute unsigned long length;
+ [Throws]
+ attribute ScrollRestoration scrollRestoration;
+ [Throws]
+ readonly attribute any state;
+ [Throws, UnsafeInPrerendering]
+ void go(optional long delta = 0);
+ [Throws, UnsafeInPrerendering]
+ void back();
+ [Throws, UnsafeInPrerendering]
+ void forward();
+ [Throws]
+ void pushState(any data, DOMString title, optional DOMString? url = null);
+ [Throws]
+ void replaceState(any data, DOMString title, optional DOMString? url = null);
+};
diff --git a/dom/webidl/IDBCursor.webidl b/dom/webidl/IDBCursor.webidl
new file mode 100644
index 000000000..159f9ba87
--- /dev/null
+++ b/dom/webidl/IDBCursor.webidl
@@ -0,0 +1,49 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBCursorDirection
+ */
+
+enum IDBCursorDirection {
+ "next",
+ "nextunique",
+ "prev",
+ "prevunique"
+};
+
+[Exposed=(Window,Worker,System)]
+interface IDBCursor {
+ readonly attribute (IDBObjectStore or IDBIndex) source;
+
+ readonly attribute IDBCursorDirection direction;
+
+ [Throws]
+ readonly attribute any key;
+
+ [Throws]
+ readonly attribute any primaryKey;
+
+ [Throws]
+ IDBRequest update (any value);
+
+ [Throws]
+ void advance ([EnforceRange] unsigned long count);
+
+ [Throws]
+ void continue (optional any key);
+
+ [Throws]
+ void continuePrimaryKey(any key, any primaryKey);
+
+ [Throws]
+ IDBRequest delete ();
+};
+
+[Exposed=(Window,Worker,System)]
+interface IDBCursorWithValue : IDBCursor {
+ [Throws]
+ readonly attribute any value;
+};
diff --git a/dom/webidl/IDBDatabase.webidl b/dom/webidl/IDBDatabase.webidl
new file mode 100644
index 000000000..36fe465f3
--- /dev/null
+++ b/dom/webidl/IDBDatabase.webidl
@@ -0,0 +1,48 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBObjectStoreParameters
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Exposed=(Window,Worker,System)]
+interface IDBDatabase : EventTarget {
+ readonly attribute DOMString name;
+ readonly attribute unsigned long long version;
+
+ readonly attribute DOMStringList objectStoreNames;
+
+ [Throws]
+ IDBObjectStore createObjectStore (DOMString name, optional IDBObjectStoreParameters optionalParameters);
+
+ [Throws]
+ void deleteObjectStore (DOMString name);
+
+ [Throws]
+ IDBTransaction transaction ((DOMString or sequence<DOMString>) storeNames,
+ optional IDBTransactionMode mode = "readonly");
+
+ void close ();
+
+ attribute EventHandler onabort;
+ attribute EventHandler onclose;
+ attribute EventHandler onerror;
+ attribute EventHandler onversionchange;
+};
+
+partial interface IDBDatabase {
+ [Func="mozilla::dom::IndexedDatabaseManager::ExperimentalFeaturesEnabled"]
+ readonly attribute StorageType storage;
+
+ [Exposed=Window, Throws]
+ IDBRequest createMutableFile (DOMString name, optional DOMString type);
+
+ // this is deprecated due to renaming in the spec
+ [Exposed=Window, Throws]
+ IDBRequest mozCreateFileHandle (DOMString name, optional DOMString type); // now createMutableFile
+};
diff --git a/dom/webidl/IDBFactory.webidl b/dom/webidl/IDBFactory.webidl
new file mode 100644
index 000000000..2fdaf7b57
--- /dev/null
+++ b/dom/webidl/IDBFactory.webidl
@@ -0,0 +1,65 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface Principal;
+
+dictionary IDBOpenDBOptions
+{
+ [EnforceRange] unsigned long long version;
+ StorageType storage;
+};
+
+/**
+ * Interface that defines the indexedDB property on a window. See
+ * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
+ * for more information.
+ */
+[Exposed=(Window,Worker,System)]
+interface IDBFactory {
+ [Throws]
+ IDBOpenDBRequest
+ open(DOMString name,
+ [EnforceRange] unsigned long long version);
+
+ [Throws]
+ IDBOpenDBRequest
+ open(DOMString name,
+ optional IDBOpenDBOptions options);
+
+ [Throws]
+ IDBOpenDBRequest
+ deleteDatabase(DOMString name,
+ optional IDBOpenDBOptions options);
+
+ [Throws]
+ short
+ cmp(any first,
+ any second);
+
+ [Throws, ChromeOnly]
+ IDBOpenDBRequest
+ openForPrincipal(Principal principal,
+ DOMString name,
+ [EnforceRange] unsigned long long version);
+
+ [Throws, ChromeOnly]
+ IDBOpenDBRequest
+ openForPrincipal(Principal principal,
+ DOMString name,
+ optional IDBOpenDBOptions options);
+
+ [Throws, ChromeOnly]
+ IDBOpenDBRequest
+ deleteForPrincipal(Principal principal,
+ DOMString name,
+ optional IDBOpenDBOptions options);
+};
diff --git a/dom/webidl/IDBFileHandle.webidl b/dom/webidl/IDBFileHandle.webidl
new file mode 100644
index 000000000..e312742c6
--- /dev/null
+++ b/dom/webidl/IDBFileHandle.webidl
@@ -0,0 +1,43 @@
+/* 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 obtaone at http://mozilla.org/MPL/2.0/. */
+
+dictionary IDBFileMetadataParameters
+{
+ boolean size = true;
+ boolean lastModified = true;
+};
+
+[Exposed=(Window,System)]
+interface IDBFileHandle : EventTarget
+{
+ readonly attribute IDBMutableFile? mutableFile;
+ // this is deprecated due to renaming in the spec
+ readonly attribute IDBMutableFile? fileHandle; // now mutableFile
+ readonly attribute FileMode mode;
+ readonly attribute boolean active;
+ attribute unsigned long long? location;
+
+ [Throws]
+ IDBFileRequest? getMetadata(optional IDBFileMetadataParameters parameters);
+ [Throws]
+ IDBFileRequest? readAsArrayBuffer(unsigned long long size);
+ [Throws]
+ IDBFileRequest? readAsText(unsigned long long size,
+ optional DOMString? encoding = null);
+
+ [Throws]
+ IDBFileRequest? write((DOMString or ArrayBuffer or ArrayBufferView or Blob) value);
+ [Throws]
+ IDBFileRequest? append((DOMString or ArrayBuffer or ArrayBufferView or Blob) value);
+ [Throws]
+ IDBFileRequest? truncate(optional unsigned long long size);
+ [Throws]
+ IDBFileRequest? flush();
+ [Throws]
+ void abort();
+
+ attribute EventHandler oncomplete;
+ attribute EventHandler onabort;
+ attribute EventHandler onerror;
+};
diff --git a/dom/webidl/IDBFileRequest.webidl b/dom/webidl/IDBFileRequest.webidl
new file mode 100644
index 000000000..fc3a8c5b6
--- /dev/null
+++ b/dom/webidl/IDBFileRequest.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 et sw=2 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/. */
+
+[Exposed=(Window,System)]
+interface IDBFileRequest : DOMRequest {
+ readonly attribute IDBFileHandle? fileHandle;
+ // this is deprecated due to renaming in the spec
+ readonly attribute IDBFileHandle? lockedFile; // now fileHandle
+
+ attribute EventHandler onprogress;
+};
diff --git a/dom/webidl/IDBIndex.webidl b/dom/webidl/IDBIndex.webidl
new file mode 100644
index 000000000..0e436650a
--- /dev/null
+++ b/dom/webidl/IDBIndex.webidl
@@ -0,0 +1,71 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBIndexParameters
+ */
+
+dictionary IDBIndexParameters {
+ boolean unique = false;
+ boolean multiEntry = false;
+ // <null>: Not locale-aware, uses normal JS sorting.
+ // <string>: Always sorted based on the rules of the specified
+ // locale (e.g. "en-US", etc.).
+ // "auto": Sorted by the platform default, may change based on
+ // user agent options.
+ DOMString? locale = null;
+};
+
+[Exposed=(Window,Worker,System)]
+interface IDBIndex {
+ [SetterThrows]
+ attribute DOMString name;
+
+ readonly attribute IDBObjectStore objectStore;
+
+ [Throws]
+ readonly attribute any keyPath;
+
+ readonly attribute boolean multiEntry;
+ readonly attribute boolean unique;
+
+ // <null>: Not locale-aware, uses normal JS sorting.
+ // <string>: Sorted based on the rules of the specified locale.
+ // Note: never returns "auto", only the current locale.
+ [Func="mozilla::dom::IndexedDatabaseManager::ExperimentalFeaturesEnabled"]
+ readonly attribute DOMString? locale;
+
+ [Func="mozilla::dom::IndexedDatabaseManager::ExperimentalFeaturesEnabled"]
+ readonly attribute boolean isAutoLocale;
+
+ [Throws]
+ IDBRequest openCursor (optional any range, optional IDBCursorDirection direction = "next");
+
+ [Throws]
+ IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection direction = "next");
+
+ [Throws]
+ IDBRequest get (any key);
+
+ [Throws]
+ IDBRequest getKey (any key);
+
+ [Throws]
+ IDBRequest count (optional any key);
+};
+
+partial interface IDBIndex {
+ [Throws]
+ IDBRequest mozGetAll (optional any key, [EnforceRange] optional unsigned long limit);
+
+ [Throws]
+ IDBRequest mozGetAllKeys (optional any key, [EnforceRange] optional unsigned long limit);
+
+ [Throws]
+ IDBRequest getAll (optional any key, [EnforceRange] optional unsigned long limit);
+
+ [Throws]
+ IDBRequest getAllKeys (optional any key, [EnforceRange] optional unsigned long limit);
+};
diff --git a/dom/webidl/IDBKeyRange.webidl b/dom/webidl/IDBKeyRange.webidl
new file mode 100644
index 000000000..1caba7618
--- /dev/null
+++ b/dom/webidl/IDBKeyRange.webidl
@@ -0,0 +1,41 @@
+/* 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/. */
+/*
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Exposed=(Window,Worker,System)]
+interface IDBKeyRange {
+ [Throws]
+ readonly attribute any lower;
+ [Throws]
+ readonly attribute any upper;
+ [Constant]
+ readonly attribute boolean lowerOpen;
+ [Constant]
+ readonly attribute boolean upperOpen;
+ [Throws]
+ boolean includes(any key);
+
+
+ [NewObject, Throws]
+ static IDBKeyRange only (any value);
+ [NewObject, Throws]
+ static IDBKeyRange lowerBound (any lower, optional boolean open = false);
+ [NewObject, Throws]
+ static IDBKeyRange upperBound (any upper, optional boolean open = false);
+ [NewObject, Throws]
+ static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
+};
+
+[Exposed=(Window,Worker,System),
+ Func="mozilla::dom::IndexedDatabaseManager::ExperimentalFeaturesEnabled"]
+interface IDBLocaleAwareKeyRange : IDBKeyRange {
+ [NewObject, Throws]
+ static IDBLocaleAwareKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
+};
diff --git a/dom/webidl/IDBMutableFile.webidl b/dom/webidl/IDBMutableFile.webidl
new file mode 100644
index 000000000..945a79d77
--- /dev/null
+++ b/dom/webidl/IDBMutableFile.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[Exposed=(Window,System)]
+interface IDBMutableFile : EventTarget {
+ readonly attribute DOMString name;
+ readonly attribute DOMString type;
+
+ readonly attribute IDBDatabase database;
+
+ [Throws]
+ IDBFileHandle open(optional FileMode mode = "readonly");
+
+ [Throws]
+ DOMRequest getFile();
+
+ attribute EventHandler onabort;
+ attribute EventHandler onerror;
+};
diff --git a/dom/webidl/IDBObjectStore.webidl b/dom/webidl/IDBObjectStore.webidl
new file mode 100644
index 000000000..a06ac8897
--- /dev/null
+++ b/dom/webidl/IDBObjectStore.webidl
@@ -0,0 +1,74 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBObjectStore
+ */
+
+dictionary IDBObjectStoreParameters {
+ (DOMString or sequence<DOMString>)? keyPath = null;
+ boolean autoIncrement = false;
+};
+
+[Exposed=(Window,Worker,System)]
+interface IDBObjectStore {
+ [SetterThrows]
+ attribute DOMString name;
+
+ [Throws]
+ readonly attribute any keyPath;
+
+ readonly attribute DOMStringList indexNames;
+ readonly attribute IDBTransaction transaction;
+ readonly attribute boolean autoIncrement;
+
+ [Throws]
+ IDBRequest put (any value, optional any key);
+
+ [Throws]
+ IDBRequest add (any value, optional any key);
+
+ [Throws]
+ IDBRequest delete (any key);
+
+ [Throws]
+ IDBRequest get (any key);
+
+ [Throws]
+ IDBRequest getKey (any key);
+
+ [Throws]
+ IDBRequest clear ();
+
+ [Throws]
+ IDBRequest openCursor (optional any range, optional IDBCursorDirection direction = "next");
+
+ [Throws]
+ IDBIndex createIndex (DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters optionalParameters);
+
+ [Throws]
+ IDBIndex index (DOMString name);
+
+ [Throws]
+ void deleteIndex (DOMString indexName);
+
+ [Throws]
+ IDBRequest count (optional any key);
+};
+
+partial interface IDBObjectStore {
+ // Success fires IDBTransactionEvent, result == array of values for given keys
+ [Throws]
+ IDBRequest mozGetAll (optional any key, [EnforceRange] optional unsigned long limit);
+
+ [Throws]
+ IDBRequest getAll (optional any key, [EnforceRange] optional unsigned long limit);
+
+ [Throws]
+ IDBRequest getAllKeys (optional any key, [EnforceRange] optional unsigned long limit);
+
+ [Throws]
+ IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection direction = "next");
+};
diff --git a/dom/webidl/IDBOpenDBRequest.webidl b/dom/webidl/IDBOpenDBRequest.webidl
new file mode 100644
index 000000000..ba0ebf837
--- /dev/null
+++ b/dom/webidl/IDBOpenDBRequest.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBOpenDBRequest
+ */
+
+[Exposed=(Window,Worker,System)]
+interface IDBOpenDBRequest : IDBRequest {
+ attribute EventHandler onblocked;
+
+ attribute EventHandler onupgradeneeded;
+};
diff --git a/dom/webidl/IDBRequest.webidl b/dom/webidl/IDBRequest.webidl
new file mode 100644
index 000000000..623e6c16a
--- /dev/null
+++ b/dom/webidl/IDBRequest.webidl
@@ -0,0 +1,31 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBRequest
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBRequestReadyState
+ */
+
+enum IDBRequestReadyState {
+ "pending",
+ "done"
+};
+
+[Exposed=(Window,Worker,System)]
+interface IDBRequest : EventTarget {
+ [Throws]
+ readonly attribute any result;
+
+ [Throws]
+ readonly attribute DOMError? error;
+
+ readonly attribute (IDBObjectStore or IDBIndex or IDBCursor)? source;
+ readonly attribute IDBTransaction? transaction;
+ readonly attribute IDBRequestReadyState readyState;
+
+ attribute EventHandler onsuccess;
+
+ attribute EventHandler onerror;
+};
diff --git a/dom/webidl/IDBTransaction.webidl b/dom/webidl/IDBTransaction.webidl
new file mode 100644
index 000000000..44628432a
--- /dev/null
+++ b/dom/webidl/IDBTransaction.webidl
@@ -0,0 +1,44 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBTransaction
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBTransactionMode
+ */
+
+enum IDBTransactionMode {
+ "readonly",
+ "readwrite",
+ // The "readwriteflush" mode is only available when the
+ // |IndexedDatabaseManager::ExperimentalFeaturesEnabled()| function returns
+ // true. This mode is not yet part of the standard.
+ "readwriteflush",
+ "cleanup",
+ "versionchange"
+};
+
+[Exposed=(Window,Worker,System)]
+interface IDBTransaction : EventTarget {
+ [Throws]
+ readonly attribute IDBTransactionMode mode;
+ readonly attribute IDBDatabase db;
+
+ readonly attribute DOMError? error;
+
+ [Throws]
+ IDBObjectStore objectStore (DOMString name);
+
+ [Throws]
+ void abort();
+
+ attribute EventHandler onabort;
+ attribute EventHandler oncomplete;
+ attribute EventHandler onerror;
+};
+
+// This seems to be custom
+partial interface IDBTransaction {
+ readonly attribute DOMStringList objectStoreNames;
+};
diff --git a/dom/webidl/IDBVersionChangeEvent.webidl b/dom/webidl/IDBVersionChangeEvent.webidl
new file mode 100644
index 000000000..1c9385004
--- /dev/null
+++ b/dom/webidl/IDBVersionChangeEvent.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBVersionChangeEvent
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+dictionary IDBVersionChangeEventInit : EventInit {
+ unsigned long long oldVersion = 0;
+ unsigned long long? newVersion = null;
+};
+
+[Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict),
+ Exposed=(Window,Worker,System)]
+interface IDBVersionChangeEvent : Event {
+ readonly attribute unsigned long long oldVersion;
+ readonly attribute unsigned long long? newVersion;
+};
+
diff --git a/dom/webidl/IIRFilterNode.webidl b/dom/webidl/IIRFilterNode.webidl
new file mode 100644
index 000000000..a1164b6ae
--- /dev/null
+++ b/dom/webidl/IIRFilterNode.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is https://www.w3.org/TR/webaudio
+ *
+ * Copyright © 2016 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface IIRFilterNode : AudioNode {
+ void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse);
+};
+
+// Mozilla extension
+IIRFilterNode implements AudioNodePassThrough;
diff --git a/dom/webidl/IdleDeadline.webidl b/dom/webidl/IdleDeadline.webidl
new file mode 100644
index 000000000..983c97996
--- /dev/null
+++ b/dom/webidl/IdleDeadline.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is:
+ * https://w3c.github.io/requestidlecallback/
+ */
+
+[Pref="dom.requestIdleCallback.enabled"]
+interface IdleDeadline {
+ DOMHighResTimeStamp timeRemaining();
+ readonly attribute boolean didTimeout;
+};
diff --git a/dom/webidl/ImageBitmap.webidl b/dom/webidl/ImageBitmap.webidl
new file mode 100644
index 000000000..3cfabff12
--- /dev/null
+++ b/dom/webidl/ImageBitmap.webidl
@@ -0,0 +1,412 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://html.spec.whatwg.org/multipage/webappapis.html#images
+ *
+ * The origin of the extended IDL file is
+ * http://w3c.github.io/mediacapture-worker/#imagebitmap-extensions
+ */
+
+// Extensions
+// Bug 1141979 - [FoxEye] Extend ImageBitmap with interfaces to access its
+// underlying image data
+//
+// Note:
+// Our overload resolution implementation doesn't deal with a union as the
+// distinguishing argument which means we cannot overload functions via union
+// types, a.k.a. we cannot overload createImageBitmap() via ImageBitmapSource
+// and BufferSource. Here, we work around this issue by adding the BufferSource
+// into ImageBitmapSource.
+
+typedef (HTMLImageElement or
+ HTMLVideoElement or
+ HTMLCanvasElement or
+ Blob or
+ ImageData or
+ CanvasRenderingContext2D or
+ ImageBitmap or
+ BufferSource) ImageBitmapSource;
+
+[Exposed=(Window,Worker)]
+interface ImageBitmap {
+ [Constant]
+ readonly attribute unsigned long width;
+ [Constant]
+ readonly attribute unsigned long height;
+};
+
+// It's crucial that there be a way to explicitly dispose of ImageBitmaps
+// since they refer to potentially large graphics resources. Some uses
+// of this API proposal will result in repeated allocations of ImageBitmaps,
+// and garbage collection will not reliably reclaim them quickly enough.
+// Here we reuse close(), which also exists on another Transferable type,
+// MessagePort. Potentially, all Transferable types should inherit from a
+// new interface type "Closeable".
+partial interface ImageBitmap {
+ // Dispose of all graphical resources associated with this ImageBitmap.
+ void close();
+};
+
+// ImageBitmap-extensions
+// Bug 1141979 - [FoxEye] Extend ImageBitmap with interfaces to access its
+// underlying image data
+
+/*
+ * An image or a video frame is conceptually a two-dimensional array of data and
+ * each element in the array is called a pixel. The pixels are usually stored in
+ * a one-dimensional array and could be arranged in a variety of image formats.
+ * Developers need to know how the pixels are formatted so that they are able to
+ * process them.
+ *
+ * The image format describes how pixels in an image are arranged. A single
+ * pixel has at least one, but usually multiple pixel values. The range of a
+ * pixel value varies, which means different image formats use different data
+ * types to store a single pixel value.
+ *
+ * The most frequently used data type is 8-bit unsigned integer whose range is
+ * from 0 to 255, others could be 16-bit integer or 32-bit floating points and
+ * so forth. The number of pixel values of a single pixel is called the number
+ * of channels of the image format. Multiple pixel values of a pixel are used
+ * together to describe the captured property which could be color or depth
+ * information. For example, if the data is a color image in RGB color space,
+ * then it is a three-channel image format and a pixel is described by R, G and
+ * B three pixel values with range from 0 to 255. As another example, if the
+ * data is a gray image, then it is a single-channel image format with 8-bit
+ * unsigned integer data type and the pixel value describes the gray scale. For
+ * depth data, it is a single channel image format too, but the data type is
+ * 16-bit unsigned integer and the pixel value is the depth level.
+ *
+ * For those image formats whose pixels contain multiple pixel values, the pixel
+ * values might be arranged in one of the following ways:
+ * 1) Planar pixel layout:
+ * each channel has its pixel values stored consecutively in separated
+ * buffers (a.k.a. planes) and then all channel buffers are stored
+ * consecutively in memory.
+ * (Ex: RRRRRR......GGGGGG......BBBBBB......)
+ * 2) Interleaving pixel layout:
+ * each pixel has its pixel values from all channels stored together and
+ * interleaves all channels.
+ * (Ex: RGBRGBRGBRGBRGB......)
+ */
+
+
+/*
+ * The ImageBitmap extensions use this enumeration to negotiate the image format
+ * while 1) accessing the underlying data of an ImageBitmap and
+ * 2) creating a new ImageBitmap.
+ *
+ * For each format in this enumeration, we use a 2x2 small image (4 pixels) as
+ * example to illustrate the pixel layout.
+ *
+ * 2x2 image: +--------+--------+
+ * | pixel1 | pixel2 |
+ * +--------+--------+
+ * | pixel3 | pixel4 |
+ * +--------+--------+
+ *
+ */
+enum ImageBitmapFormat {
+ /*
+ * Channel order: R, G, B, A
+ * Channel size: full rgba-chennels
+ * Pixel layout: interleaving rgba-channels
+ * Pixel layout illustration:
+ * [Plane1]: R1 G1 B1 A1 R2 G2 B2 A2 R3 G3 B3 A3 R4 G4 B4 A4
+ * Data type: 8-bit unsigned integer
+ */
+ "RGBA32",
+
+ /*
+ * Channel order: B, G, R, A
+ * Channel size: full bgra-channels
+ * Pixel layout: interleaving bgra-channels
+ * Pixel layout illustration:
+ * [Plane1]: B1 G1 R1 A1 B2 G2 R2 A2 B3 G3 R3 A3 B4 G4 R4 A4
+ * Data type: 8-bit unsigned integer
+ */
+ "BGRA32",
+
+ /*
+ * Channel order: R, G, B
+ * Channel size: full rgb-channels
+ * Pixel layout: interleaving rgb-channels
+ * Pixel layout illustration:
+ * [Plane1]: R1 G1 B1 R2 G2 B2 R3 G3 B3 R4 G4 B4
+ * Data type: 8-bit unsigned integer
+ */
+ "RGB24",
+
+ /*
+ * Channel order: B, G, R
+ * Channel size: full bgr-channels
+ * Pixel layout: interleaving bgr-channels
+ * Pixel layout illustration:
+ * [Plane1]: B1 G1 R1 B2 G2 R2 B3 G3 R3 B4 G4 R4
+ * Data type: 8-bit unsigned integer
+ */
+ "BGR24",
+
+ /*
+ * Channel order: GRAY
+ * Channel size: full gray-channel
+ * Pixel layout: planar gray-channel
+ * Pixel layout illustration:
+ * [Plane1]: GRAY1 GRAY2 GRAY3 GRAY4
+ * Data type: 8-bit unsigned integer
+ */
+ "GRAY8",
+
+ /*
+ * Channel order: Y, U, V
+ * Channel size: full yuv-channels
+ * Pixel layout: planar yuv-channels
+ * Pixel layout illustration:
+ * [Plane1]: Y1 Y2 Y3 Y4
+ * [Plane2]: U1 U2 U3 U4
+ * [Plane3]: V1 V2 V3 V4
+ * Data type: 8-bit unsigned integer
+ */
+ "YUV444P",
+
+ /*
+ * Channel order: Y, U, V
+ * Channel size: full y-channel, half uv-channels
+ * Pixel layout: planar yuv-channels
+ * Pixel layout illustration:
+ * [Plane1]: Y1 Y2 Y3 Y4
+ * [Plane2]: U1 U3
+ * [Plane3]: V1 V3
+ * Data type: 8-bit unsigned integer
+ */
+ "YUV422P",
+
+ /*
+ * Channel order: Y, U, V
+ * Channel size: full y-channel, quarter uv-channels
+ * Pixel layout: planar yuv-channels
+ * Pixel layout illustration:
+ * [Plane1]: Y1 Y2 Y3 Y4
+ * [Plane2]: U1
+ * [Plane3]: V1
+ * Data type: 8-bit unsigned integer
+ */
+ "YUV420P",
+
+ /*
+ * Channel order: Y, U, V
+ * Channel size: full y-channel, quarter uv-channels
+ * Pixel layout: planar y-channel, interleaving uv-channels
+ * Pixel layout illustration:
+ * [Plane1]: Y1 Y2 Y3 Y4
+ * [Plane2]: U1 V1
+ * Data type: 8-bit unsigned integer
+ */
+ "YUV420SP_NV12",
+
+ /*
+ * Channel order: Y, V, U
+ * Channel size: full y-channel, quarter vu-channels
+ * Pixel layout: planar y-channel, interleaving vu-channels
+ * Pixel layout illustration:
+ * [Plane1]: Y1 Y2 Y3 Y4
+ * [Plane2]: V1 U1
+ * Data type: 8-bit unsigned integer
+ */
+ "YUV420SP_NV21",
+
+ /*
+ * Channel order: H, S, V
+ * Channel size: full hsv-channels
+ * Pixel layout: interleaving hsv-channels
+ * Pixel layout illustration:
+ * [Plane1]: H1 S1 V1 H2 S2 V2 H3 S3 V3
+ * Data type: 32-bit floating point value
+ */
+ "HSV",
+
+ /*
+ * Channel order: l, a, b
+ * Channel size: full lab-channels
+ * Pixel layout: interleaving lab-channels
+ * Pixel layout illustration:
+ * [Plane1]: l1 a1 b1 l2 a2 b2 l3 a3 b3
+ * Data type: 32-bit floating point value
+ */
+ "Lab",
+
+ /*
+ * Channel order: DEPTH
+ * Channel size: full depth-channel
+ * Pixel layout: planar depth-channel
+ * Pixel layout illustration:
+ * [Plane1]: DEPTH1 DEPTH2 DEPTH3 DEPTH4
+ * Data type: 16-bit unsigned integer
+ */
+ "DEPTH",
+};
+
+enum ChannelPixelLayoutDataType {
+ "uint8",
+ "int8",
+ "uint16",
+ "int16",
+ "uint32",
+ "int32",
+ "float32",
+ "float64"
+};
+
+/*
+ * Two concepts, ImagePixelLayout and ChannelPixelLayout, together generalize
+ * the variety of pixel layouts among image formats.
+ *
+ * The ChannelPixelLayout represents the pixel layout of a single channel in a
+ * certain image format and the ImagePixelLayout is just the collection of
+ * ChannelPixelLayouts. So, the ChannelPixelLayout is defined as a dictionary
+ * type with properties to describe the layout and the ImagePixelLayout is just
+ * an alias name to a sequence of ChannelPixelLayout objects.
+ *
+ * Since an image format is composed of at least one channel, an
+ * ImagePixelLayout object contains at least one ChannelPixelLayout object.
+ *
+ * Although an image or a video frame is a two-dimensional structure, its data
+ * is usually stored in a one-dimensional array in the row-major way and the
+ * ChannelPixelLayout objects use the following properties to describe the
+ * layout of pixel values in the buffer.
+ *
+ * 1) offset:
+ * denotes the beginning position of the channel's data relative to the
+ * beginning position of the one-dimensional array.
+ * 2) width & height:
+ * denote the width and height of the channel respectively. Each channel in
+ * an image format may have different height and width.
+ * 3) data type:
+ * denotes the format used to store one single pixel value.
+ * 4) stride:
+ * the number of bytes between the beginning two consecutive rows in memory.
+ * (The total bytes of each row plus the padding bytes of each raw.)
+ * 5) skip value:
+ * the value is zero for the planar pixel layout, and a positive integer for
+ * the interleaving pixel layout. (Describes how many bytes there are between
+ * two adjacent pixel values in this channel.)
+ */
+
+/*
+ * Example1: RGBA image, width = 620, height = 480, stride = 2560
+ *
+ * chanel_r: offset = 0, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
+ * chanel_g: offset = 1, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
+ * chanel_b: offset = 2, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
+ * chanel_a: offset = 3, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
+ *
+ * <---------------------------- stride ---------------------------->
+ * <---------------------- width x 4 ---------------------->
+ * [index] 01234 8 12 16 20 24 28 2479 2559
+ * |||||---|---|---|---|---|---|----------------------------|-------|
+ * [data] RGBARGBARGBARGBARGBAR___R___R... A%%%%%%%%
+ * [data] RGBARGBARGBARGBARGBAR___R___R... A%%%%%%%%
+ * [data] RGBARGBARGBARGBARGBAR___R___R... A%%%%%%%%
+ * ^^^
+ * r-skip
+ */
+
+/*
+ * Example2: YUV420P image, width = 620, height = 480, stride = 640
+ *
+ * chanel_y: offset = 0, width = 620, height = 480, stride = 640, skip = 0
+ * chanel_u: offset = 307200, width = 310, height = 240, data type = uint8, stride = 320, skip = 0
+ * chanel_v: offset = 384000, width = 310, height = 240, data type = uint8, stride = 320, skip = 0
+ *
+ * <--------------------------- y-stride --------------------------->
+ * <----------------------- y-width ----------------------->
+ * [index] 012345 619 639
+ * ||||||--------------------------------------------------|--------|
+ * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
+ * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
+ * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
+ * [data] ......
+ * <-------- u-stride ---------->
+ * <----- u-width ----->
+ * [index] 307200 307509 307519
+ * |-------------------|--------|
+ * [data] UUUUUUUUUU... U%%%%%%%%%
+ * [data] UUUUUUUUUU... U%%%%%%%%%
+ * [data] UUUUUUUUUU... U%%%%%%%%%
+ * [data] ......
+ * <-------- v-stride ---------->
+ * <- --- v-width ----->
+ * [index] 384000 384309 384319
+ * |-------------------|--------|
+ * [data] VVVVVVVVVV... V%%%%%%%%%
+ * [data] VVVVVVVVVV... V%%%%%%%%%
+ * [data] VVVVVVVVVV... V%%%%%%%%%
+ * [data] ......
+ */
+
+/*
+ * Example3: YUV420SP_NV12 image, width = 620, height = 480, stride = 640
+ *
+ * chanel_y: offset = 0, width = 620, height = 480, stride = 640, skip = 0
+ * chanel_u: offset = 307200, width = 310, height = 240, data type = uint8, stride = 640, skip = 1
+ * chanel_v: offset = 307201, width = 310, height = 240, data type = uint8, stride = 640, skip = 1
+ *
+ * <--------------------------- y-stride -------------------------->
+ * <----------------------- y-width ---------------------->
+ * [index] 012345 619 639
+ * ||||||-------------------------------------------------|--------|
+ * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
+ * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
+ * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
+ * [data] ......
+ * <--------------------- u-stride / v-stride -------------------->
+ * <------------------ u-width + v-width ----------------->
+ * [index] 307200(u-offset) 307819 307839
+ * |------------------------------------------------------|-------|
+ * [index] |307201(v-offset) |307820 |
+ * ||-----------------------------------------------------||------|
+ * [data] UVUVUVUVUVUVUVUVUVUVUVUVUVUVUV... UV%%%%%%%
+ * [data] UVUVUVUVUVUVUVUVUVUVUVUVUVUVUV... UV%%%%%%%
+ * [data] UVUVUVUVUVUVUVUVUVUVUVUVUVUVUV... UV%%%%%%%
+ * ^ ^
+ * u-skip v-skip
+ */
+
+/*
+ * Example4: DEPTH image, width = 640, height = 480, stride = 1280
+ *
+ * chanel_d: offset = 0, width = 640, height = 480, data type = uint16, stride = 1280, skip = 0
+ *
+ * note: each DEPTH value uses two bytes
+ *
+ * <----------------------- d-stride ---------------------->
+ * <----------------------- d-width ----------------------->
+ * [index] 02468 1278
+ * |||||---------------------------------------------------|
+ * [data] DDDDDDDDDDDDDDDDDDDDDDDDDDDDD... D
+ * [data] DDDDDDDDDDDDDDDDDDDDDDDDDDDDD... D
+ * [data] DDDDDDDDDDDDDDDDDDDDDDDDDDDDD... D
+ * [data] ......
+ */
+
+dictionary ChannelPixelLayout {
+ required unsigned long offset;
+ required unsigned long width;
+ required unsigned long height;
+ required ChannelPixelLayoutDataType dataType;
+ required unsigned long stride;
+ required unsigned long skip;
+};
+
+typedef sequence<ChannelPixelLayout> ImagePixelLayout;
+
+partial interface ImageBitmap {
+ [Throws, Func="mozilla::dom::ImageBitmap::ExtensionsEnabled"]
+ ImageBitmapFormat findOptimalFormat (optional sequence<ImageBitmapFormat> aPossibleFormats);
+ [Throws, Func="mozilla::dom::ImageBitmap::ExtensionsEnabled"]
+ long mappedDataLength (ImageBitmapFormat aFormat);
+ [Throws, Func="mozilla::dom::ImageBitmap::ExtensionsEnabled"]
+ Promise<ImagePixelLayout> mapDataInto (ImageBitmapFormat aFormat, BufferSource aBuffer, long aOffset);
+};
diff --git a/dom/webidl/ImageBitmapRenderingContext.webidl b/dom/webidl/ImageBitmapRenderingContext.webidl
new file mode 100644
index 000000000..b94447cd9
--- /dev/null
+++ b/dom/webidl/ImageBitmapRenderingContext.webidl
@@ -0,0 +1,40 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://wiki.whatwg.org/wiki/OffscreenCanvas
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// The new ImageBitmapRenderingContext is a canvas rendering context
+// which only provides the functionality to replace the canvas's
+// contents with the given ImageBitmap. Its context id (the first argument
+// to getContext) is "bitmaprenderer".
+[Exposed=(Window,Worker)]
+interface ImageBitmapRenderingContext {
+ // Displays the given ImageBitmap in the canvas associated with this
+ // rendering context. Ownership of the ImageBitmap is transferred to
+ // the canvas. The caller may not use its reference to the ImageBitmap
+ // after making this call. (This semantic is crucial to enable prompt
+ // reclamation of expensive graphics resources, rather than relying on
+ // garbage collection to do so.)
+ //
+ // The ImageBitmap conceptually replaces the canvas's bitmap, but
+ // it does not change the canvas's intrinsic width or height.
+ //
+ // The ImageBitmap, when displayed, is clipped to the rectangle
+ // defined by the canvas's instrinsic width and height. Pixels that
+ // would be covered by the canvas's bitmap which are not covered by
+ // the supplied ImageBitmap are rendered transparent black. Any CSS
+ // styles affecting the display of the canvas are applied as usual.
+ void transferFromImageBitmap(ImageBitmap bitmap);
+
+ // Deprecated version of transferFromImageBitmap
+ [Deprecated="ImageBitmapRenderingContext_TransferImageBitmap"]
+ void transferImageBitmap(ImageBitmap bitmap);
+};
diff --git a/dom/webidl/ImageCapture.webidl b/dom/webidl/ImageCapture.webidl
new file mode 100644
index 000000000..22f330335
--- /dev/null
+++ b/dom/webidl/ImageCapture.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html
+ *
+ * Copyright © 2012-2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.imagecapture.enabled", Constructor(VideoStreamTrack track)]
+interface ImageCapture : EventTarget {
+ // readonly attribute PhotoSettingsOptions photoSettingsOptions;
+ readonly attribute VideoStreamTrack videoStreamTrack;
+ attribute EventHandler onphoto;
+ attribute EventHandler onerror;
+ // attribute EventHandler onphotosettingschange;
+ // attribute EventHandler onframegrab;
+
+ // [Throws]
+ // void setOptions (PhotoSettings? photoSettings);
+ [Throws]
+ void takePhoto();
+ // [Throws]
+ // void getFrame();
+};
diff --git a/dom/webidl/ImageCaptureErrorEvent.webidl b/dom/webidl/ImageCaptureErrorEvent.webidl
new file mode 100644
index 000000000..b7300aa30
--- /dev/null
+++ b/dom/webidl/ImageCaptureErrorEvent.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html
+ *
+ * Copyright © 2012-2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.imagecapture.enabled",
+Constructor(DOMString type, optional ImageCaptureErrorEventInit imageCaptureErrorInitDict)]
+interface ImageCaptureErrorEvent : Event {
+ readonly attribute ImageCaptureError? imageCaptureError;
+};
+
+dictionary ImageCaptureErrorEventInit : EventInit {
+ ImageCaptureError? imageCaptureError = null;
+};
+
+[NoInterfaceObject]
+interface ImageCaptureError {
+ const unsigned short FRAME_GRAB_ERROR = 1;
+ const unsigned short SETTINGS_ERROR = 2;
+ const unsigned short PHOTO_ERROR = 3;
+ const unsigned short ERROR_UNKNOWN = 4;
+ readonly attribute unsigned short code;
+ readonly attribute DOMString message;
+};
+
diff --git a/dom/webidl/ImageData.webidl b/dom/webidl/ImageData.webidl
new file mode 100644
index 000000000..f6000bd05
--- /dev/null
+++ b/dom/webidl/ImageData.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#imagedata
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera Software ASA.
+ * You are granted a license to use, reproduce and create derivative works of this document.
+ */
+
+[Constructor(unsigned long sw, unsigned long sh),
+ Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh),
+ Exposed=(Window,Worker)]
+interface ImageData {
+ [Constant]
+ readonly attribute unsigned long width;
+ [Constant]
+ readonly attribute unsigned long height;
+ [Constant, StoreInSlot]
+ readonly attribute Uint8ClampedArray data;
+};
diff --git a/dom/webidl/ImageDocument.webidl b/dom/webidl/ImageDocument.webidl
new file mode 100644
index 000000000..571e345dd
--- /dev/null
+++ b/dom/webidl/ImageDocument.webidl
@@ -0,0 +1,41 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is:
+ * dom/html/public/nsIImageDocument.idl
+ */
+
+interface imgIRequest;
+
+[ChromeOnly, OverrideBuiltins]
+interface ImageDocument : HTMLDocument {
+ /* Whether the image is overflowing visible area. */
+ readonly attribute boolean imageIsOverflowing;
+
+ /* Whether the image has been resized to fit visible area. */
+ readonly attribute boolean imageIsResized;
+
+ /* The image request being displayed in the content area */
+ [Throws]
+ readonly attribute imgIRequest? imageRequest;
+
+ /* Resize the image to fit visible area. */
+ void shrinkToFit();
+
+ /* Restore image original size. */
+ void restoreImage();
+
+ /* Restore the image, trying to keep a certain pixel in the same position.
+ * The coordinate system is that of the shrunken image.
+ */
+ void restoreImageTo(long x, long y);
+
+ /* A helper method for switching between states.
+ * The switching logic is as follows. If the image has been resized
+ * restore image original size, otherwise if the image is overflowing
+ * current visible area resize the image to fit the area.
+ */
+ void toggleImageSize();
+};
diff --git a/dom/webidl/InputEvent.webidl b/dom/webidl/InputEvent.webidl
new file mode 100644
index 000000000..805b0510c
--- /dev/null
+++ b/dom/webidl/InputEvent.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional InputEventInit eventInitDict)]
+interface InputEvent : UIEvent
+{
+ readonly attribute boolean isComposing;
+};
+
+dictionary InputEventInit : UIEventInit
+{
+ boolean isComposing = false;
+};
diff --git a/dom/webidl/InputMethod.webidl b/dom/webidl/InputMethod.webidl
new file mode 100644
index 000000000..ca22dcc1b
--- /dev/null
+++ b/dom/webidl/InputMethod.webidl
@@ -0,0 +1,738 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * InputMethod API implements a bridge between the web content hosting an input
+ * element and the input content (a.k.a. input app, virtual keyboard app,
+ * or IME). This API is input content facing in order for it to interact with
+ * the remote input element.
+ * The API also contains a few Gaia System app only methods
+ * (marked with "input-manage" permission) for Gaia System app to interact with
+ * some types of inputs and to regulate the input apps.
+ */
+[JSImplementation="@mozilla.org/b2g-inputmethod;1",
+ NavigatorProperty="mozInputMethod",
+ Pref="dom.mozInputMethod.enabled",
+ ChromeOnly]
+interface MozInputMethod : EventTarget {
+ /**
+ * Activate or decactive current API instance.
+ * Gaia System app call this method via BrowserElement#setInputMethodActive.
+ */
+ [ChromeOnly]
+ void setActive(boolean isActive);
+
+ /**
+ * InputMethodManager contain a few global methods expose to input apps.
+ */
+ readonly attribute MozInputMethodManager mgmt;
+
+ /**
+ * Fired when the input context changes, include changes from and to null.
+ * The new InputContext instance will be available in the event
+ * object under |inputcontext| property. When it changes to null it
+ * means the app (the user of this API) no longer has the control of
+ * the original focused input field.
+ * Note that if the app saves the original context, it might get
+ * void; implementation decides when to void the input context.
+ */
+ attribute EventHandler oninputcontextchange;
+
+ /**
+ * An "input context" is mapped to a text field that the app is
+ * allow to mutate. This attribute should be null when there is no
+ * text field currently focused.
+ */
+ readonly attribute MozInputContext? inputcontext;
+
+ /**
+ * Add a dynamically declared input.
+ *
+ * The id must not be the same with any statically declared input in the app
+ * manifest. If an input of the same id is already declared, the info of that
+ * input will be updated.
+ */
+ Promise<void> addInput(DOMString inputId,
+ MozInputMethodInputManifest inputManifest);
+
+ /**
+ * Remove a dynamically declared input.
+ *
+ * The id must not be the same with any statically declared input in the app
+ * manifest. Silently resolves if the input is not previously declared;
+ * rejects if attempt to remove a statically declared input.
+ */
+ Promise<void> removeInput(DOMString id);
+
+ /**
+ * Remove focus from the current input, usable by Gaia System app, globally,
+ * regardless of the current focus state.
+ */
+ void removeFocus();
+
+ /**
+ * The following are internal methods for Firefox OS System app only,
+ * for handling the "option" group inputs.
+ */
+
+ /**
+ * Set the value on the currently focused element. This has to be used
+ * for special situations where the value had to be chosen amongst a
+ * list (type=month) or a widget (type=date, time, etc.).
+ * If the value passed in parameter isn't valid (in the term of HTML5
+ * Forms Validation), the value will simply be ignored by the element.
+ */
+ void setValue(DOMString value);
+
+ /**
+ * Select the <select> option specified by index.
+ * If this method is called on a <select> that support multiple
+ * selection, then the option specified by index will be added to
+ * the selection.
+ * If this method is called for a select that does not support multiple
+ * selection the previous element will be unselected.
+ */
+ void setSelectedOption(long index);
+
+ /**
+ * Select the <select> options specified by indexes. All other options
+ * will be deselected.
+ * If this method is called for a <select> that does not support multiple
+ * selection, then the last index specified in indexes will be selected.
+ */
+ void setSelectedOptions(sequence<long> indexes);
+};
+
+/**
+ * InputMethodManager contains a few of the global methods for the input app.
+ */
+[JSImplementation="@mozilla.org/b2g-imm;1",
+ Pref="dom.mozInputMethod.enabled",
+ ChromeOnly]
+interface MozInputMethodManager : EventTarget {
+ /**
+ * Ask the OS to show a list of available inputs for users to switch from.
+ * OS should sliently ignore this request if the app is currently not the
+ * active one.
+ */
+ void showAll();
+
+ /**
+ * Ask the OS to switch away from the current active input app.
+ * OS should sliently ignore this request if the app is currently not the
+ * active one.
+ */
+ void next();
+
+ /**
+ * If this method returns true, it is recommended that the input app provides
+ * a shortcut that would invoke the next() method above, for easy switching
+ * between inputs -- i.e. show a "global" button on screen if the input app
+ * implements an on-screen virtual keyboard.
+ *
+ * The returning value is depend on the inputType of the current input context.
+ */
+ boolean supportsSwitching();
+
+ /**
+ * Ask the OS to remove the input focus, will cause the lost of input context.
+ * OS should sliently ignore this request if the app is currently not the
+ * active one.
+ */
+ void hide();
+
+ /**
+ * Update Gecko with information on the input types which supportsSwitching()
+ * should return ture.
+ *
+ * @param types Array of input types in which supportsSwitching() should
+ * return true.
+ */
+ void setSupportsSwitchingTypes(sequence<MozInputMethodInputContextInputTypes> types);
+
+ /**
+ * CustomEvent dispatches to System when there is an input to handle.
+ * If the API consumer failed to handle and call preventDefault(),
+ * there will be a message printed on the console.
+ *
+ * evt.detail is defined by MozInputContextFocusEventDetail.
+ */
+ attribute EventHandler oninputcontextfocus;
+
+ /**
+ * Event dispatches to System when there is no longer an input to handle.
+ * If the API consumer failed to handle and call preventDefault(),
+ * there will be a message printed on the console.
+ */
+ attribute EventHandler oninputcontextblur;
+
+ /**
+ * Event dispatches to System when there is a showAll() call.
+ * If the API consumer failed to handle and call preventDefault(),
+ * there will be a message printed on the console.
+ */
+ attribute EventHandler onshowallrequest;
+
+ /**
+ * Event dispatches to System when there is a next() call.
+ * If the API consumer failed to handle and call preventDefault(),
+ * there will be a message printed on the console.
+ */
+ attribute EventHandler onnextrequest;
+
+ /**
+ * Event dispatches to System when there is a addInput() call.
+ * The API consumer must call preventDefault() to indicate the event is
+ * consumed, otherwise the request is not considered handled even if
+ * waitUntil() was called.
+ *
+ * evt.detail is defined by MozInputRegistryEventDetail.
+ */
+ attribute EventHandler onaddinputrequest;
+
+ /**
+ * Event dispatches to System when there is a removeInput() call.
+ * The API consumer must call preventDefault() to indicate the event is
+ * consumed, otherwise the request is not considered handled even if
+ * waitUntil() was called.
+ *
+ * evt.detail is defined by MozInputRegistryEventDetail.
+ */
+ attribute EventHandler onremoveinputrequest;
+};
+
+/**
+ * Detail of the inputcontextfocus event.
+ */
+[JSImplementation="@mozilla.org/b2g-imm-focus;1",
+ Pref="dom.mozInputMethod.enabled",
+ ChromeOnly]
+interface MozInputContextFocusEventDetail {
+ /**
+ * The type of the focused input.
+ */
+ readonly attribute MozInputMethodInputContextTypes type;
+ /**
+ * The input type of the focused input.
+ */
+ readonly attribute MozInputMethodInputContextInputTypes inputType;
+
+ /**
+ * The following is only needed for rendering and handling "option" input types,
+ * in System app.
+ */
+
+ /**
+ * Current value of the input.
+ */
+ readonly attribute DOMString? value;
+ /**
+ * An object representing all the <optgroup> and <option> elements
+ * in the <select> element.
+ */
+ [Pure, Cached, Frozen]
+ readonly attribute MozInputContextChoicesInfo? choices;
+ /**
+ * Max/min value of <input>
+ */
+ readonly attribute DOMString? min;
+ readonly attribute DOMString? max;
+};
+
+/**
+ * Information about the options within the <select> element.
+ */
+dictionary MozInputContextChoicesInfo {
+ boolean multiple;
+ sequence<MozInputMethodChoiceDict> choices;
+};
+
+/**
+ * Content of the option header (<optgroup>) or an option (<option>).
+ */
+dictionary MozInputMethodChoiceDict {
+ boolean group;
+ DOMString text;
+ boolean disabled;
+ boolean? inGroup;
+ boolean? selected;
+ long? optionIndex;
+};
+
+/**
+ * detail of addinputrequest or removeinputrequest event.
+ */
+[JSImplementation="@mozilla.org/b2g-imm-input-registry;1",
+ Pref="dom.mozInputMethod.enabled",
+ ChromeOnly]
+interface MozInputRegistryEventDetail {
+ /**
+ * Manifest URL of the requesting app.
+ */
+ readonly attribute DOMString manifestURL;
+ /**
+ * ID of the input
+ */
+ readonly attribute DOMString inputId;
+ /**
+ * Input manifest of the input to add.
+ * Null for removeinputrequest event.
+ */
+ [Pure, Cached, Frozen]
+ readonly attribute MozInputMethodInputManifest? inputManifest;
+ /**
+ * Resolve or Reject the addInput() or removeInput() call when the passed
+ * promises are resolved.
+ */
+ [Throws]
+ void waitUntil(Promise<any> p);
+};
+
+/**
+ * The input context, which consists of attributes and information of current
+ * input field. It also hosts the methods available to the keyboard app to
+ * mutate the input field represented. An "input context" gets void when the
+ * app is no longer allowed to interact with the text field,
+ * e.g., the text field does no longer exist, the app is being switched to
+ * background, and etc.
+ */
+[JSImplementation="@mozilla.org/b2g-inputcontext;1",
+ Pref="dom.mozInputMethod.enabled",
+ ChromeOnly]
+interface MozInputContext: EventTarget {
+ /**
+ * Type of the InputContext. See MozInputMethodInputContextTypes
+ */
+ readonly attribute MozInputMethodInputContextTypes? type;
+
+ /**
+ * InputType of the InputContext. See MozInputMethodInputContextInputTypes.
+ */
+ readonly attribute MozInputMethodInputContextInputTypes? inputType;
+
+ /**
+ * The inputmode string, representing the inputmode of the input.
+ * See http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#input-modalities:-the-inputmode-attribute
+ */
+ readonly attribute DOMString? inputMode;
+
+ /**
+ * The primary language for the input field.
+ * It is the value of HTMLElement.lang.
+ * See http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#htmlelement
+ */
+ readonly attribute DOMString? lang;
+
+ /**
+ * Get the whole text content of the input field.
+ * @return DOMString
+ */
+ Promise<DOMString> getText(optional long offset, optional long length);
+
+ /**
+ * The start and stop position of the current selection.
+ */
+ readonly attribute long selectionStart;
+ readonly attribute long selectionEnd;
+
+ /**
+ * The text in the current input.
+ */
+ readonly attribute DOMString? text;
+
+ /**
+ * The text before and after the begining of the selected text.
+ *
+ * You should use the text property instead because these properties are
+ * truncated at 100 characters.
+ */
+ readonly attribute DOMString? textBeforeCursor;
+ readonly attribute DOMString? textAfterCursor;
+
+ /**
+ * Set the selection range of the the editable text.
+ * Note: This method cannot be used to move the cursor during composition. Calling this
+ * method will cancel composition.
+ * @param start The beginning of the selected text.
+ * @param length The length of the selected text.
+ *
+ * Note that the start position should be less or equal to the end position.
+ * To move the cursor, set the start and end position to the same value.
+ *
+ * @return boolean
+ */
+ Promise<boolean> setSelectionRange(long start, long length);
+
+ /* User moves the cursor, or changes the selection with other means. If the text around
+ * cursor has changed, but the cursor has not been moved, the IME won't get notification.
+ *
+ * evt.detail is defined by MozInputContextSelectionChangeEventDetail.
+ */
+ attribute EventHandler onselectionchange;
+
+ /**
+ * Commit text to current input field and replace text around
+ * cursor position. It will clear the current composition.
+ *
+ * @param text The string to be replaced with.
+ * @param offset The offset from the cursor position where replacing starts. Defaults to 0.
+ * @param length The length of text to replace. Defaults to 0.
+ * @return boolean
+ */
+ Promise<boolean> replaceSurroundingText(DOMString text, optional long offset, optional long length);
+
+ /**
+ * Delete text around the cursor.
+ * @param offset The offset from the cursor position where deletion starts.
+ * @param length The length of text to delete.
+ * TODO: maybe updateSurroundingText(DOMString beforeText, DOMString afterText); ?
+ * @return boolean
+ */
+ Promise<boolean> deleteSurroundingText(long offset, long length);
+
+ /**
+ * Notifies when the text around the cursor is changed, due to either text
+ * editing or cursor movement. If the cursor has been moved, but the text around has not
+ * changed, the IME won't get notification.
+ *
+ * evt.detail is defined by MozInputContextSurroundingTextChangeEventDetail.
+ */
+ attribute EventHandler onsurroundingtextchange;
+
+ /**
+ * Send a string/character with its key events. There are two ways of invocating
+ * the method for backward compability purpose.
+ *
+ * (1) The recommended way, allow specifying DOM level 3 properties like |code|.
+ * @param dictOrKeyCode See MozInputMethodKeyboardEventDict.
+ * @param charCode disregarded
+ * @param modifiers disregarded
+ * @param repeat disregarded
+ *
+ * (2) Deprecated, reserved for backward compability.
+ * @param dictOrKeyCode keyCode of the key to send, should be one of the DOM_VK_ value in KeyboardEvent.
+ * @param charCode charCode of the character, should be 0 for non-printable keys.
+ * @param modifiers this paramater is no longer honored.
+ * @param repeat indicates whether a key would be sent repeatedly.
+ *
+ * @return A promise. Resolve to true if succeeds.
+ * Rejects to a string indicating the error.
+ *
+ * Note that, if you want to send a key n times repeatedly, make sure set
+ * parameter repeat to true and invoke sendKey n times, and invoke keyup
+ * after the end of the input.
+ */
+ Promise<boolean> sendKey((MozInputMethodRequiredKeyboardEventDict or long) dictOrKeyCode,
+ optional long charCode,
+ optional long modifiers,
+ optional boolean repeat);
+
+ /**
+ * Send a string/character with keydown, and keypress events.
+ * keyup should be called afterwards to ensure properly sequence.
+ *
+ * @param dict See MozInputMethodKeyboardEventDict.
+ *
+ * @return A promise. Resolve to true if succeeds.
+ * Rejects to a string indicating the error.
+ */
+ Promise<boolean> keydown(MozInputMethodRequiredKeyboardEventDict dict);
+
+ /**
+ * Send a keyup event. keydown should be called first to ensure properly sequence.
+ *
+ * @param dict See MozInputMethodKeyboardEventDict.
+ *
+ * @return A promise. Resolve to true if succeeds.
+ * Rejects to a string indicating the error.
+ */
+ Promise<boolean> keyup(MozInputMethodRequiredKeyboardEventDict dict);
+
+ /**
+ * Set current composing text. This method will start composition or update
+ * composition if it has started. The composition will be started right
+ * before the cursor position and any selected text will be replaced by the
+ * composing text. When the composition is started, calling this method can
+ * update the text and move cursor winthin the range of the composing text.
+ * @param text The new composition text to show.
+ * @param cursor The new cursor position relative to the start of the
+ * composition text. The cursor should be positioned within the composition
+ * text. This means the value should be >= 0 and <= the length of
+ * composition text. Defaults to the lenght of composition text, i.e., the
+ * cursor will be positioned after the composition text.
+ * @param clauses The array of composition clause information. If not set,
+ * only one clause is supported.
+ * @param dict The properties of the keyboard event that cause the composition
+ * to set. keydown or keyup event will be fired if it's necessary.
+ * For compatibility, we recommend that you should always set this argument
+ * if it's caused by a key operation.
+ *
+ * The composing text, which is shown with underlined style to distinguish
+ * from the existing text, is used to compose non-ASCII characters from
+ * keystrokes, e.g. Pinyin or Hiragana. The composing text is the
+ * intermediate text to help input complex character and is not committed to
+ * current input field. Therefore if any text operation other than
+ * composition is performed, the composition will automatically end. Same
+ * apply when the inputContext is lost during an unfinished composition
+ * session.
+ *
+ * To finish composition and commit text to current input field, an IME
+ * should call |endComposition|.
+ */
+ Promise<boolean> setComposition(DOMString text,
+ optional long cursor,
+ optional sequence<CompositionClauseParameters> clauses,
+ optional MozInputMethodKeyboardEventDict dict);
+
+ /**
+ * End composition, clear the composing text and commit given text to
+ * current input field. The text will be committed before the cursor
+ * position.
+ * @param text The text to commited before cursor position. If empty string
+ * is given, no text will be committed.
+ * @param dict The properties of the keyboard event that cause the composition
+ * to end. keydown or keyup event will be fired if it's necessary.
+ * For compatibility, we recommend that you should always set this argument
+ * if it's caused by a key operation.
+ *
+ * Note that composition always ends automatically with nothing to commit if
+ * the composition does not explicitly end by calling |endComposition|, but
+ * is interrupted by |sendKey|, |setSelectionRange|,
+ * |replaceSurroundingText|, |deleteSurroundingText|, user moving the
+ * cursor, changing the focus, etc.
+ */
+ Promise<boolean> endComposition(optional DOMString text,
+ optional MozInputMethodKeyboardEventDict dict);
+
+ /**
+ * The interface used to receive the native events from hardware keyboard
+ */
+ readonly attribute MozHardwareInput? hardwareinput;
+};
+
+/*
+ * This interface will be added into inputcontext and used to receive the
+ * events from the hardware keyboard.
+ * Example:
+ * mozInputMethod.inputcontext.hardwareinput.addEventListener('keyup', this);
+ * mozInputMethod.inputcontext.hardwareinput.removeEventListener('keyup', this);
+ */
+[JSImplementation="@mozilla.org/b2g-hardwareinput;1",
+ Pref="dom.mozInputMethod.enabled",
+ ChromeOnly]
+interface MozHardwareInput: EventTarget {
+};
+
+/**
+ * Detail of the selectionchange event.
+ */
+[JSImplementation="@mozilla.org/b2g-imm-selectionchange;1",
+ Pref="dom.mozInputMethod.enabled",
+ ChromeOnly]
+interface MozInputContextSelectionChangeEventDetail {
+ /**
+ * Indicate whether or not the change is due to our own action from,
+ * for example, sendKey() call.
+ *
+ * Note: this property is untrustworthy because it would still be true even
+ * if script in the page changed the text synchronously upon responding to
+ * events trigger by the call.
+ */
+ readonly attribute boolean ownAction;
+
+ /**
+ * The start and stop position of the current selection.
+ */
+ readonly attribute long selectionStart;
+ readonly attribute long selectionEnd;
+};
+
+/**
+ * Detail of the surroundingtextchange event.
+ */
+[JSImplementation="@mozilla.org/b2g-imm-surroundingtextchange;1",
+ Pref="dom.mozInputMethod.enabled",
+ ChromeOnly]
+interface MozInputContextSurroundingTextChangeEventDetail {
+ /**
+ * Indicate whether or not the change is due to our own action from,
+ * for example, sendKey() call.
+ *
+ * Note: this property is untrustworthy because it would still be true even
+ * if script in the page changed the text synchronously upon responding to
+ * events trigger by the call.
+ */
+ readonly attribute boolean ownAction;
+
+ /**
+ * The text in the current input.
+ */
+ readonly attribute DOMString? text;
+
+ /**
+ * The text before and after the begining of the selected text.
+ *
+ * You should use the text property instead because these properties are
+ * truncated at 100 characters.
+ */
+ readonly attribute DOMString? textBeforeCursor;
+ readonly attribute DOMString? textAfterCursor;
+};
+
+enum CompositionClauseSelectionType {
+ "raw-input",
+ "selected-raw-text",
+ "converted-text",
+ "selected-converted-text"
+};
+
+dictionary CompositionClauseParameters {
+ CompositionClauseSelectionType selectionType = "raw-input";
+ long length;
+};
+
+/**
+ * Types are HTML tag names of the inputs that is explosed with InputContext,
+ * *and* the special keyword "contenteditable" for contenteditable element.
+ */
+enum MozInputMethodInputContextTypes {
+ "input", "textarea", "contenteditable",
+ /**
+ * <select> is managed by the API but it is handled by the System app only,
+ * so this value is only accessible by System app from inputcontextfocus event.
+ */
+ "select"
+};
+
+/**
+ * InputTypes of the input that InputContext is representing. The value
+ * is inferred from the type attribute of element.
+ *
+ * See https://html.spec.whatwg.org/multipage/forms.html#states-of-the-type-attribute
+ * for types of HTMLInputElement.
+ *
+ * They are divided into groups -- an layout/input capable of handling one type
+ * in the group is considered as capable of handling all of the types in the
+ * same group.
+ * The layout/input that could handle type "text" is considered as the fallback
+ * if none of layout/input installed can handle a specific type.
+ *
+ * Groups and fallbacks is enforced in Gaia System app currently.
+ *
+ * Noted that the actual virtual keyboard to show, for example in the case of
+ * Gaia Keyboard app, will also depend on the inputMode of the input element.
+ */
+enum MozInputMethodInputContextInputTypes {
+ /**
+ * Group "text". Be reminded that contenteditable element is assigned with
+ * an input type of "textarea".
+ */
+ "text", "search", "textarea",
+ /**
+ * Group "number"
+ */
+ "number", "tel",
+ /**
+ * Group "url"
+ */
+ "url",
+ /**
+ * Group "email"
+ */
+ "email",
+ /**
+ * Group "password".
+ * An non-Latin alphabet layout/input should not be able to handle this type.
+ */
+ "password",
+ /**
+ * Group "option". These types are handled by System app itself currently, so
+ * no input app will be set to active for these input types.
+ * System app access these types from inputcontextfocus event.
+ * ("select-one" and "select-multiple" are valid HTMLSelectElement#type.)
+ */
+ "datetime", "date", "month", "week", "time", "datetime-local", "color",
+ "select-one", "select-multiple"
+ /**
+ * These types are ignored by the API even though they are valid
+ * HTMLInputElement#type.
+ */
+ //"checkbox", "radio", "file", "submit", "image", "range", "reset", "button"
+};
+
+/**
+ * An input app can host multiple inputs (a.k.a. layouts) and the capability of
+ * the input is described by the input manifest.
+ */
+dictionary MozInputMethodInputManifest {
+ required DOMString launch_path;
+ required DOMString name;
+ DOMString? description;
+ sequence<MozInputMethodInputContextInputTypes> types;
+};
+
+/**
+ * A MozInputMethodKeyboardEventDictBase contains the following properties,
+ * indicating the properties of the keyboard event caused.
+ *
+ * This is the base dictionary type for us to create two child types that could
+ * be used as argument type in two types of methods, as WebIDL parser required.
+ *
+ */
+dictionary MozInputMethodKeyboardEventDictBase {
+ /**
+ * String/character to output, or a registered name of non-printable key.
+ * (To be defined in the inheriting dictionary types.)
+ */
+ // DOMString key;
+ /**
+ * String/char indicating the virtual hardware key pressed. Optional.
+ * Must be a value defined in
+ * http://www.w3.org/TR/DOM-Level-3-Events-code/#keyboard-chording-virtual
+ * If your keyboard app emulates physical keyboard layout, this value should
+ * not be empty string. Otherwise, it should be empty string.
+ */
+ DOMString code = "";
+ /**
+ * keyCode of the keyboard event. Optional.
+ * To be disregarded if |key| is an alphanumeric character.
+ * If the key causes inputting a character and if your keyboard app emulates
+ * a physical keyboard layout, this value should be same as the value used
+ * by Firefox for desktop. If the key causes inputting an ASCII character
+ * but if your keyboard app doesn't emulate any physical keyboard layouts,
+ * the value should be proper value for the key value.
+ */
+ long? keyCode;
+ /**
+ * Indicates whether a key would be sent repeatedly. Optional.
+ */
+ boolean repeat = false;
+ /**
+ * Optional. True if |key| property is explicitly referring to a printable key.
+ * When this is set, key will be printable even if the |key| value matches any
+ * of the registered name of non-printable keys.
+ */
+ boolean printable = false;
+};
+
+/**
+ * For methods like setComposition() and endComposition(), the optional
+ * dictionary type argument is really optional when all of it's property
+ * are optional.
+ * This dictionary type is used to denote that argument.
+ */
+dictionary MozInputMethodKeyboardEventDict : MozInputMethodKeyboardEventDictBase {
+ DOMString? key;
+};
+
+/**
+ * For methods like keydown() and keyup(), the dictionary type argument is
+ * considered required only if at least one of it's property is required.
+ * This dictionary type is used to denote that argument.
+ */
+dictionary MozInputMethodRequiredKeyboardEventDict : MozInputMethodKeyboardEventDictBase {
+ required DOMString key;
+};
diff --git a/dom/webidl/InspectorUtils.webidl b/dom/webidl/InspectorUtils.webidl
new file mode 100644
index 000000000..289fafaf5
--- /dev/null
+++ b/dom/webidl/InspectorUtils.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+dictionary InspectorRGBTriple {
+ /*
+ * NOTE: Using octet for RGB components is not generally OK, because
+ * they can be outside the 0-255 range, but for backwards-compatible
+ * named colors (which is what we use this dictionary for) the 0-255
+ * assumption is fine.
+ */
+ octet r = 0;
+ octet g = 0;
+ octet b = 0;
+};
+
+dictionary InspectorRGBATuple {
+ /*
+ * NOTE: This tuple is in the normal 0-255-sized RGB space but can be
+ * fractional and may extend outside the 0-255 range.
+ *
+ * a is in the range 0 - 1.
+ */
+ double r = 0;
+ double g = 0;
+ double b = 0;
+ double a = 1;
+};
diff --git a/dom/webidl/InstallTrigger.webidl b/dom/webidl/InstallTrigger.webidl
new file mode 100644
index 000000000..789fb2bc4
--- /dev/null
+++ b/dom/webidl/InstallTrigger.webidl
@@ -0,0 +1,90 @@
+/* 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/.
+ */
+
+
+/**
+ * A callback function that webpages can implement to be notified when triggered
+ * installs complete.
+ */
+callback InstallTriggerCallback = void(DOMString url, short status);
+
+dictionary InstallTriggerData {
+ DOMString URL;
+ DOMString? IconURL;
+ DOMString? Hash;
+};
+
+/**
+ * The interface for the InstallTrigger object available to all websites.
+ */
+[ChromeOnly,
+ JSImplementation="@mozilla.org/addons/installtrigger;1"]
+interface InstallTriggerImpl {
+ /**
+ * Retained for backwards compatibility.
+ */
+ const unsigned short SKIN = 1;
+ const unsigned short LOCALE = 2;
+ const unsigned short CONTENT = 4;
+ const unsigned short PACKAGE = 7;
+
+ /**
+ * Tests if installation is enabled.
+ */
+ boolean enabled();
+
+ /**
+ * Tests if installation is enabled.
+ *
+ * @deprecated Use "enabled" in the future.
+ */
+ boolean updateEnabled();
+
+ /**
+ * Starts a new installation of a set of add-ons.
+ *
+ * @param aArgs
+ * The add-ons to install. This should be a JS object, each property
+ * is the name of an add-on to be installed. The value of the
+ * property should either be a string URL, or an object with the
+ * following properties:
+ * * URL for the add-on's URL
+ * * IconURL for an icon for the add-on
+ * * Hash for a hash of the add-on
+ * @param aCallback
+ * A callback to call as each installation succeeds or fails
+ * @return true if the installations were successfully started
+ */
+ boolean install(MozMap<(DOMString or InstallTriggerData)> installs,
+ optional InstallTriggerCallback callback);
+
+ /**
+ * Starts installing a new add-on.
+ *
+ * @deprecated use "install" in the future.
+ *
+ * @param aType
+ * Unused, retained for backwards compatibility
+ * @param aUrl
+ * The URL of the add-on
+ * @param aSkin
+ * Unused, retained for backwards compatibility
+ * @return true if the installation was successfully started
+ */
+ boolean installChrome(unsigned short type, DOMString url, DOMString skin);
+
+ /**
+ * Starts installing a new add-on.
+ *
+ * @deprecated use "install" in the future.
+ *
+ * @param aUrl
+ * The URL of the add-on
+ * @param aFlags
+ * Unused, retained for backwards compatibility
+ * @return true if the installation was successfully started
+ */
+ boolean startSoftwareUpdate(DOMString url, optional unsigned short flags);
+};
diff --git a/dom/webidl/IntersectionObserver.webidl b/dom/webidl/IntersectionObserver.webidl
new file mode 100644
index 000000000..dbe8f428d
--- /dev/null
+++ b/dom/webidl/IntersectionObserver.webidl
@@ -0,0 +1,60 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://wicg.github.io/IntersectionObserver/
+ */
+
+[ProbablyShortLivingObject, Pref="dom.IntersectionObserver.enabled"]
+interface IntersectionObserverEntry {
+ [Constant]
+ readonly attribute DOMHighResTimeStamp time;
+ [Constant]
+ readonly attribute DOMRectReadOnly? rootBounds;
+ [Constant]
+ readonly attribute DOMRectReadOnly boundingClientRect;
+ [Constant]
+ readonly attribute DOMRectReadOnly intersectionRect;
+ [Constant]
+ readonly attribute double intersectionRatio;
+ [Constant]
+ readonly attribute Element target;
+};
+
+[Constructor(IntersectionCallback intersectionCallback,
+ optional IntersectionObserverInit options),
+ Pref="dom.IntersectionObserver.enabled"]
+interface IntersectionObserver {
+ [Constant]
+ readonly attribute Element? root;
+ [Constant]
+ readonly attribute DOMString rootMargin;
+ [Constant,Cached]
+ readonly attribute sequence<double> thresholds;
+ void observe(Element target);
+ void unobserve(Element target);
+ void disconnect();
+ sequence<IntersectionObserverEntry> takeRecords();
+
+ [ChromeOnly]
+ readonly attribute IntersectionCallback intersectionCallback;
+};
+
+callback IntersectionCallback =
+ void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
+
+dictionary IntersectionObserverEntryInit {
+ required DOMHighResTimeStamp time;
+ required DOMRectInit rootBounds;
+ required DOMRectInit boundingClientRect;
+ required DOMRectInit intersectionRect;
+ required Element target;
+};
+
+dictionary IntersectionObserverInit {
+ Element? root = null;
+ DOMString rootMargin = "0px";
+ (double or sequence<double>) threshold = 0;
+};
diff --git a/dom/webidl/IterableIterator.webidl b/dom/webidl/IterableIterator.webidl
new file mode 100644
index 000000000..633b67b1e
--- /dev/null
+++ b/dom/webidl/IterableIterator.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+dictionary IterableKeyOrValueResult {
+ any value;
+ boolean done = false;
+};
+
+dictionary IterableKeyAndValueResult {
+ sequence<any> value = [];
+ boolean done = false;
+};
diff --git a/dom/webidl/KeyAlgorithm.webidl b/dom/webidl/KeyAlgorithm.webidl
new file mode 100644
index 000000000..260b1e624
--- /dev/null
+++ b/dom/webidl/KeyAlgorithm.webidl
@@ -0,0 +1,37 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/WebCryptoAPI/
+ */
+
+dictionary KeyAlgorithm {
+ required DOMString name;
+};
+
+dictionary AesKeyAlgorithm : KeyAlgorithm {
+ required unsigned short length;
+};
+
+dictionary EcKeyAlgorithm : KeyAlgorithm {
+ required DOMString namedCurve;
+};
+
+dictionary HmacKeyAlgorithm : KeyAlgorithm {
+ required KeyAlgorithm hash;
+ required unsigned long length;
+};
+
+dictionary RsaHashedKeyAlgorithm : KeyAlgorithm {
+ required unsigned short modulusLength;
+ required Uint8Array publicExponent;
+ required KeyAlgorithm hash;
+};
+
+dictionary DhKeyAlgorithm : KeyAlgorithm {
+ required Uint8Array prime;
+ required Uint8Array generator;
+};
+
diff --git a/dom/webidl/KeyEvent.webidl b/dom/webidl/KeyEvent.webidl
new file mode 100644
index 000000000..516632854
--- /dev/null
+++ b/dom/webidl/KeyEvent.webidl
@@ -0,0 +1,237 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+// http://www.w3.org/TR/1999/WD-DOM-Level-2-19990923/events.html#Events-KeyEvent
+interface KeyEvent
+{
+ const unsigned long DOM_VK_CANCEL = 0x03;
+ const unsigned long DOM_VK_HELP = 0x06;
+ const unsigned long DOM_VK_BACK_SPACE = 0x08;
+ const unsigned long DOM_VK_TAB = 0x09;
+ const unsigned long DOM_VK_CLEAR = 0x0C;
+ const unsigned long DOM_VK_RETURN = 0x0D;
+ // DOM_VK_ENTER has been never used for representing native key events.
+ // Therefore, it's removed for preventing developers being confused.
+ // const unsigned long DOM_VK_ENTER = 0x0E;
+ const unsigned long DOM_VK_SHIFT = 0x10;
+ const unsigned long DOM_VK_CONTROL = 0x11;
+ const unsigned long DOM_VK_ALT = 0x12;
+ const unsigned long DOM_VK_PAUSE = 0x13;
+ const unsigned long DOM_VK_CAPS_LOCK = 0x14;
+ const unsigned long DOM_VK_KANA = 0x15;
+ const unsigned long DOM_VK_HANGUL = 0x15;
+ const unsigned long DOM_VK_EISU = 0x16; // Japanese Mac keyboard only
+ const unsigned long DOM_VK_JUNJA = 0x17;
+ const unsigned long DOM_VK_FINAL = 0x18;
+ const unsigned long DOM_VK_HANJA = 0x19;
+ const unsigned long DOM_VK_KANJI = 0x19;
+ const unsigned long DOM_VK_ESCAPE = 0x1B;
+ const unsigned long DOM_VK_CONVERT = 0x1C;
+ const unsigned long DOM_VK_NONCONVERT = 0x1D;
+ const unsigned long DOM_VK_ACCEPT = 0x1E;
+ const unsigned long DOM_VK_MODECHANGE = 0x1F;
+ const unsigned long DOM_VK_SPACE = 0x20;
+ const unsigned long DOM_VK_PAGE_UP = 0x21;
+ const unsigned long DOM_VK_PAGE_DOWN = 0x22;
+ const unsigned long DOM_VK_END = 0x23;
+ const unsigned long DOM_VK_HOME = 0x24;
+ const unsigned long DOM_VK_LEFT = 0x25;
+ const unsigned long DOM_VK_UP = 0x26;
+ const unsigned long DOM_VK_RIGHT = 0x27;
+ const unsigned long DOM_VK_DOWN = 0x28;
+ const unsigned long DOM_VK_SELECT = 0x29;
+ const unsigned long DOM_VK_PRINT = 0x2A;
+ const unsigned long DOM_VK_EXECUTE = 0x2B;
+ const unsigned long DOM_VK_PRINTSCREEN = 0x2C;
+ const unsigned long DOM_VK_INSERT = 0x2D;
+ const unsigned long DOM_VK_DELETE = 0x2E;
+
+ // DOM_VK_0 - DOM_VK_9 match their ascii values
+ const unsigned long DOM_VK_0 = 0x30;
+ const unsigned long DOM_VK_1 = 0x31;
+ const unsigned long DOM_VK_2 = 0x32;
+ const unsigned long DOM_VK_3 = 0x33;
+ const unsigned long DOM_VK_4 = 0x34;
+ const unsigned long DOM_VK_5 = 0x35;
+ const unsigned long DOM_VK_6 = 0x36;
+ const unsigned long DOM_VK_7 = 0x37;
+ const unsigned long DOM_VK_8 = 0x38;
+ const unsigned long DOM_VK_9 = 0x39;
+
+ const unsigned long DOM_VK_COLON = 0x3A;
+ const unsigned long DOM_VK_SEMICOLON = 0x3B;
+ const unsigned long DOM_VK_LESS_THAN = 0x3C;
+ const unsigned long DOM_VK_EQUALS = 0x3D;
+ const unsigned long DOM_VK_GREATER_THAN = 0x3E;
+ const unsigned long DOM_VK_QUESTION_MARK = 0x3F;
+ const unsigned long DOM_VK_AT = 0x40;
+
+ // DOM_VK_A - DOM_VK_Z match their ascii values
+ const unsigned long DOM_VK_A = 0x41;
+ const unsigned long DOM_VK_B = 0x42;
+ const unsigned long DOM_VK_C = 0x43;
+ const unsigned long DOM_VK_D = 0x44;
+ const unsigned long DOM_VK_E = 0x45;
+ const unsigned long DOM_VK_F = 0x46;
+ const unsigned long DOM_VK_G = 0x47;
+ const unsigned long DOM_VK_H = 0x48;
+ const unsigned long DOM_VK_I = 0x49;
+ const unsigned long DOM_VK_J = 0x4A;
+ const unsigned long DOM_VK_K = 0x4B;
+ const unsigned long DOM_VK_L = 0x4C;
+ const unsigned long DOM_VK_M = 0x4D;
+ const unsigned long DOM_VK_N = 0x4E;
+ const unsigned long DOM_VK_O = 0x4F;
+ const unsigned long DOM_VK_P = 0x50;
+ const unsigned long DOM_VK_Q = 0x51;
+ const unsigned long DOM_VK_R = 0x52;
+ const unsigned long DOM_VK_S = 0x53;
+ const unsigned long DOM_VK_T = 0x54;
+ const unsigned long DOM_VK_U = 0x55;
+ const unsigned long DOM_VK_V = 0x56;
+ const unsigned long DOM_VK_W = 0x57;
+ const unsigned long DOM_VK_X = 0x58;
+ const unsigned long DOM_VK_Y = 0x59;
+ const unsigned long DOM_VK_Z = 0x5A;
+
+ const unsigned long DOM_VK_WIN = 0x5B;
+ const unsigned long DOM_VK_CONTEXT_MENU = 0x5D;
+ const unsigned long DOM_VK_SLEEP = 0x5F;
+
+ // Numpad keys
+ const unsigned long DOM_VK_NUMPAD0 = 0x60;
+ const unsigned long DOM_VK_NUMPAD1 = 0x61;
+ const unsigned long DOM_VK_NUMPAD2 = 0x62;
+ const unsigned long DOM_VK_NUMPAD3 = 0x63;
+ const unsigned long DOM_VK_NUMPAD4 = 0x64;
+ const unsigned long DOM_VK_NUMPAD5 = 0x65;
+ const unsigned long DOM_VK_NUMPAD6 = 0x66;
+ const unsigned long DOM_VK_NUMPAD7 = 0x67;
+ const unsigned long DOM_VK_NUMPAD8 = 0x68;
+ const unsigned long DOM_VK_NUMPAD9 = 0x69;
+ const unsigned long DOM_VK_MULTIPLY = 0x6A;
+ const unsigned long DOM_VK_ADD = 0x6B;
+ const unsigned long DOM_VK_SEPARATOR = 0x6C;
+ const unsigned long DOM_VK_SUBTRACT = 0x6D;
+ const unsigned long DOM_VK_DECIMAL = 0x6E;
+ const unsigned long DOM_VK_DIVIDE = 0x6F;
+
+ const unsigned long DOM_VK_F1 = 0x70;
+ const unsigned long DOM_VK_F2 = 0x71;
+ const unsigned long DOM_VK_F3 = 0x72;
+ const unsigned long DOM_VK_F4 = 0x73;
+ const unsigned long DOM_VK_F5 = 0x74;
+ const unsigned long DOM_VK_F6 = 0x75;
+ const unsigned long DOM_VK_F7 = 0x76;
+ const unsigned long DOM_VK_F8 = 0x77;
+ const unsigned long DOM_VK_F9 = 0x78;
+ const unsigned long DOM_VK_F10 = 0x79;
+ const unsigned long DOM_VK_F11 = 0x7A;
+ const unsigned long DOM_VK_F12 = 0x7B;
+ const unsigned long DOM_VK_F13 = 0x7C;
+ const unsigned long DOM_VK_F14 = 0x7D;
+ const unsigned long DOM_VK_F15 = 0x7E;
+ const unsigned long DOM_VK_F16 = 0x7F;
+ const unsigned long DOM_VK_F17 = 0x80;
+ const unsigned long DOM_VK_F18 = 0x81;
+ const unsigned long DOM_VK_F19 = 0x82;
+ const unsigned long DOM_VK_F20 = 0x83;
+ const unsigned long DOM_VK_F21 = 0x84;
+ const unsigned long DOM_VK_F22 = 0x85;
+ const unsigned long DOM_VK_F23 = 0x86;
+ const unsigned long DOM_VK_F24 = 0x87;
+
+ const unsigned long DOM_VK_NUM_LOCK = 0x90;
+ const unsigned long DOM_VK_SCROLL_LOCK = 0x91;
+
+ // OEM specific virtual keyCode of Windows should pass through DOM keyCode
+ // for compatibility with the other web browsers on Windows.
+ const unsigned long DOM_VK_WIN_OEM_FJ_JISHO = 0x92;
+ const unsigned long DOM_VK_WIN_OEM_FJ_MASSHOU = 0x93;
+ const unsigned long DOM_VK_WIN_OEM_FJ_TOUROKU = 0x94;
+ const unsigned long DOM_VK_WIN_OEM_FJ_LOYA = 0x95;
+ const unsigned long DOM_VK_WIN_OEM_FJ_ROYA = 0x96;
+
+ const unsigned long DOM_VK_CIRCUMFLEX = 0xA0;
+ const unsigned long DOM_VK_EXCLAMATION = 0xA1;
+ const unsigned long DOM_VK_DOUBLE_QUOTE = 0xA2;
+ const unsigned long DOM_VK_HASH = 0xA3;
+ const unsigned long DOM_VK_DOLLAR = 0xA4;
+ const unsigned long DOM_VK_PERCENT = 0xA5;
+ const unsigned long DOM_VK_AMPERSAND = 0xA6;
+ const unsigned long DOM_VK_UNDERSCORE = 0xA7;
+ const unsigned long DOM_VK_OPEN_PAREN = 0xA8;
+ const unsigned long DOM_VK_CLOSE_PAREN = 0xA9;
+ const unsigned long DOM_VK_ASTERISK = 0xAA;
+ const unsigned long DOM_VK_PLUS = 0xAB;
+ const unsigned long DOM_VK_PIPE = 0xAC;
+ const unsigned long DOM_VK_HYPHEN_MINUS = 0xAD;
+
+ const unsigned long DOM_VK_OPEN_CURLY_BRACKET = 0xAE;
+ const unsigned long DOM_VK_CLOSE_CURLY_BRACKET = 0xAF;
+
+ const unsigned long DOM_VK_TILDE = 0xB0;
+
+ const unsigned long DOM_VK_VOLUME_MUTE = 0xB5;
+ const unsigned long DOM_VK_VOLUME_DOWN = 0xB6;
+ const unsigned long DOM_VK_VOLUME_UP = 0xB7;
+
+ const unsigned long DOM_VK_COMMA = 0xBC;
+ const unsigned long DOM_VK_PERIOD = 0xBE;
+ const unsigned long DOM_VK_SLASH = 0xBF;
+ const unsigned long DOM_VK_BACK_QUOTE = 0xC0;
+ const unsigned long DOM_VK_OPEN_BRACKET = 0xDB; // square bracket
+ const unsigned long DOM_VK_BACK_SLASH = 0xDC;
+ const unsigned long DOM_VK_CLOSE_BRACKET = 0xDD; // square bracket
+ const unsigned long DOM_VK_QUOTE = 0xDE; // Apostrophe
+
+ const unsigned long DOM_VK_META = 0xE0;
+ const unsigned long DOM_VK_ALTGR = 0xE1;
+
+ // OEM specific virtual keyCode of Windows should pass through DOM keyCode
+ // for compatibility with the other web browsers on Windows.
+ const unsigned long DOM_VK_WIN_ICO_HELP = 0xE3;
+ const unsigned long DOM_VK_WIN_ICO_00 = 0xE4;
+ const unsigned long DOM_VK_WIN_ICO_CLEAR = 0xE6;
+ const unsigned long DOM_VK_WIN_OEM_RESET = 0xE9;
+ const unsigned long DOM_VK_WIN_OEM_JUMP = 0xEA;
+ const unsigned long DOM_VK_WIN_OEM_PA1 = 0xEB;
+ const unsigned long DOM_VK_WIN_OEM_PA2 = 0xEC;
+ const unsigned long DOM_VK_WIN_OEM_PA3 = 0xED;
+ const unsigned long DOM_VK_WIN_OEM_WSCTRL = 0xEE;
+ const unsigned long DOM_VK_WIN_OEM_CUSEL = 0xEF;
+ const unsigned long DOM_VK_WIN_OEM_ATTN = 0xF0;
+ const unsigned long DOM_VK_WIN_OEM_FINISH = 0xF1;
+ const unsigned long DOM_VK_WIN_OEM_COPY = 0xF2;
+ const unsigned long DOM_VK_WIN_OEM_AUTO = 0xF3;
+ const unsigned long DOM_VK_WIN_OEM_ENLW = 0xF4;
+ const unsigned long DOM_VK_WIN_OEM_BACKTAB = 0xF5;
+
+ // Following keys are not used on most keyboards. However, for compatibility
+ // with other browsers on Windows, we should define them.
+ const unsigned long DOM_VK_ATTN = 0xF6;
+ const unsigned long DOM_VK_CRSEL = 0xF7;
+ const unsigned long DOM_VK_EXSEL = 0xF8;
+ const unsigned long DOM_VK_EREOF = 0xF9;
+ const unsigned long DOM_VK_PLAY = 0xFA;
+ const unsigned long DOM_VK_ZOOM = 0xFB;
+ const unsigned long DOM_VK_PA1 = 0xFD;
+
+ // OEM specific virtual keyCode of Windows should pass through DOM keyCode
+ // for compatibility with the other web browsers on Windows.
+ const unsigned long DOM_VK_WIN_OEM_CLEAR = 0xFE;
+
+ void initKeyEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ Window? view,
+ boolean ctrlKey,
+ boolean altKey,
+ boolean shiftKey,
+ boolean metaKey,
+ unsigned long keyCode,
+ unsigned long charCode);
+};
diff --git a/dom/webidl/KeyIdsInitData.webidl b/dom/webidl/KeyIdsInitData.webidl
new file mode 100644
index 000000000..108a5572e
--- /dev/null
+++ b/dom/webidl/KeyIdsInitData.webidl
@@ -0,0 +1,11 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+// "KeyIds" EME init data format definition/parser, as defined by
+// https://w3c.github.io/encrypted-media/format-registry/initdata/keyids.html
+dictionary KeyIdsInitData {
+ required sequence<DOMString> kids;
+};
diff --git a/dom/webidl/KeyboardEvent.webidl b/dom/webidl/KeyboardEvent.webidl
new file mode 100644
index 000000000..f6b7b33c5
--- /dev/null
+++ b/dom/webidl/KeyboardEvent.webidl
@@ -0,0 +1,54 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString typeArg, optional KeyboardEventInit keyboardEventInitDict)]
+interface KeyboardEvent : UIEvent
+{
+ readonly attribute unsigned long charCode;
+ readonly attribute unsigned long keyCode;
+
+ readonly attribute boolean altKey;
+ readonly attribute boolean ctrlKey;
+ readonly attribute boolean shiftKey;
+ readonly attribute boolean metaKey;
+
+ boolean getModifierState(DOMString key);
+
+ const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
+ const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
+ const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
+ const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
+
+ readonly attribute unsigned long location;
+ readonly attribute boolean repeat;
+ readonly attribute boolean isComposing;
+
+ readonly attribute DOMString key;
+ [Pref="dom.keyboardevent.code.enabled"]
+ readonly attribute DOMString code;
+
+ // This returns the initialized dictionary for generating a
+ // same-type keyboard event
+ [Cached, ChromeOnly, Constant]
+ readonly attribute KeyboardEventInit initDict;
+};
+
+dictionary KeyboardEventInit : EventModifierInit
+{
+ DOMString key = "";
+ DOMString code = "";
+ unsigned long location = 0;
+ boolean repeat = false;
+ boolean isComposing = false;
+
+ // legacy attributes
+ unsigned long charCode = 0;
+ unsigned long keyCode = 0;
+ unsigned long which = 0;
+};
+
+// Mozilla extensions
+KeyboardEvent implements KeyEvent;
diff --git a/dom/webidl/KeyframeAnimationOptions.webidl b/dom/webidl/KeyframeAnimationOptions.webidl
new file mode 100644
index 000000000..047f46ed1
--- /dev/null
+++ b/dom/webidl/KeyframeAnimationOptions.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/fxtf/web-animations/#the-animatable-interface
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+// This typedef is off in its own file, because of bug 995352.
+typedef (unrestricted double or KeyframeAnimationOptions) UnrestrictedDoubleOrKeyframeAnimationOptions;
diff --git a/dom/webidl/KeyframeEffect.webidl b/dom/webidl/KeyframeEffect.webidl
new file mode 100644
index 000000000..c5e790b33
--- /dev/null
+++ b/dom/webidl/KeyframeEffect.webidl
@@ -0,0 +1,78 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/web-animations/#the-keyframeeffect-interfaces
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum IterationCompositeOperation {
+ "replace",
+ "accumulate"
+};
+
+dictionary KeyframeEffectOptions : AnimationEffectTimingProperties {
+ IterationCompositeOperation iterationComposite = "replace";
+ CompositeOperation composite = "replace";
+ DOMString spacing = "distribute";
+};
+
+// Bug 1241783: For the constructor we use (Element or CSSPseudoElement)? for
+// the first argument since we cannot convert a mixin into a union type
+// automatically.
+[Func="nsDocument::IsWebAnimationsEnabled",
+ Constructor ((Element or CSSPseudoElement)? target,
+ object? keyframes,
+ optional (unrestricted double or KeyframeEffectOptions) options),
+ Constructor (KeyframeEffectReadOnly source)]
+interface KeyframeEffectReadOnly : AnimationEffectReadOnly {
+ // Bug 1241783: As with the constructor, we use (Element or CSSPseudoElement)?
+ // for the type of |target| instead of Animatable?
+ readonly attribute (Element or CSSPseudoElement)? target;
+ readonly attribute IterationCompositeOperation iterationComposite;
+ readonly attribute CompositeOperation composite;
+ readonly attribute DOMString spacing;
+
+ // We use object instead of ComputedKeyframe so that we can put the
+ // property-value pairs on the object.
+ [Throws] sequence<object> getKeyframes();
+};
+
+// Non-standard extensions
+dictionary AnimationPropertyValueDetails {
+ required double offset;
+ required DOMString value;
+ DOMString easing;
+ required CompositeOperation composite;
+};
+
+dictionary AnimationPropertyDetails {
+ required DOMString property;
+ required boolean runningOnCompositor;
+ DOMString warning;
+ required sequence<AnimationPropertyValueDetails> values;
+};
+
+partial interface KeyframeEffectReadOnly {
+ [ChromeOnly, Throws] sequence<AnimationPropertyDetails> getProperties();
+};
+
+[Func="nsDocument::IsWebAnimationsEnabled",
+ Constructor ((Element or CSSPseudoElement)? target,
+ object? keyframes,
+ optional (unrestricted double or KeyframeEffectOptions) options),
+ Constructor (KeyframeEffectReadOnly source)]
+interface KeyframeEffect : KeyframeEffectReadOnly {
+ inherit attribute (Element or CSSPseudoElement)? target;
+ inherit attribute IterationCompositeOperation iterationComposite;
+ // Bug 1216844 - implement additive animation
+ // inherit attribute CompositeOperation composite;
+ [SetterThrows]
+ inherit attribute DOMString spacing;
+ [Throws]
+ void setKeyframes (object? keyframes);
+};
diff --git a/dom/webidl/LegacyQueryInterface.webidl b/dom/webidl/LegacyQueryInterface.webidl
new file mode 100644
index 000000000..96048b03c
--- /dev/null
+++ b/dom/webidl/LegacyQueryInterface.webidl
@@ -0,0 +1,90 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface nsISupports;
+interface IID;
+
+[NoInterfaceObject,
+ // Need Exposed here, because this is a mixin onto things like Event
+ // that are exposed in workers.
+ Exposed=(Window,Worker,System)]
+interface LegacyQueryInterface {
+ // Legacy QueryInterface, only exposed to chrome or XBL code on the
+ // main thread.
+ [Exposed=Window]
+ nsISupports queryInterface(IID iid);
+};
+
+Attr implements LegacyQueryInterface;
+BarProp implements LegacyQueryInterface;
+BoxObject implements LegacyQueryInterface;
+CaretPosition implements LegacyQueryInterface;
+Comment implements LegacyQueryInterface;
+Crypto implements LegacyQueryInterface;
+CSSPrimitiveValue implements LegacyQueryInterface;
+CSSStyleDeclaration implements LegacyQueryInterface;
+CSSValueList implements LegacyQueryInterface;
+DOMImplementation implements LegacyQueryInterface;
+DOMParser implements LegacyQueryInterface;
+DOMStringMap implements LegacyQueryInterface;
+DOMTokenList implements LegacyQueryInterface;
+Document implements LegacyQueryInterface;
+DocumentFragment implements LegacyQueryInterface;
+DocumentType implements LegacyQueryInterface;
+Element implements LegacyQueryInterface;
+Event implements LegacyQueryInterface;
+EventSource implements LegacyQueryInterface;
+FileList implements LegacyQueryInterface;
+FormData implements LegacyQueryInterface;
+HTMLCollection implements LegacyQueryInterface;
+History implements LegacyQueryInterface;
+MimeTypeArray implements LegacyQueryInterface;
+NamedNodeMap implements LegacyQueryInterface;
+MutationObserver implements LegacyQueryInterface;
+MutationRecord implements LegacyQueryInterface;
+Navigator implements LegacyQueryInterface;
+NodeIterator implements LegacyQueryInterface;
+NodeList implements LegacyQueryInterface;
+Notification implements LegacyQueryInterface;
+OfflineResourceList implements LegacyQueryInterface;
+PaintRequest implements LegacyQueryInterface;
+PaintRequestList implements LegacyQueryInterface;
+Performance implements LegacyQueryInterface;
+Plugin implements LegacyQueryInterface;
+PluginArray implements LegacyQueryInterface;
+ProcessingInstruction implements LegacyQueryInterface;
+Range implements LegacyQueryInterface;
+Rect implements LegacyQueryInterface;
+Selection implements LegacyQueryInterface;
+SVGAnimatedEnumeration implements LegacyQueryInterface;
+SVGAnimatedInteger implements LegacyQueryInterface;
+SVGAnimatedNumber implements LegacyQueryInterface;
+SVGAnimatedNumberList implements LegacyQueryInterface;
+SVGAnimatedPreserveAspectRatio implements LegacyQueryInterface;
+SVGAnimatedString implements LegacyQueryInterface;
+SVGLengthList implements LegacyQueryInterface;
+SVGNumberList implements LegacyQueryInterface;
+SVGPathSegList implements LegacyQueryInterface;
+SVGPoint implements LegacyQueryInterface;
+SVGPointList implements LegacyQueryInterface;
+SVGPreserveAspectRatio implements LegacyQueryInterface;
+SVGRect implements LegacyQueryInterface;
+SVGStringList implements LegacyQueryInterface;
+SVGTransformList implements LegacyQueryInterface;
+Screen implements LegacyQueryInterface;
+StyleSheet implements LegacyQueryInterface;
+Text implements LegacyQueryInterface;
+Touch implements LegacyQueryInterface;
+TouchList implements LegacyQueryInterface;
+TreeColumns implements LegacyQueryInterface;
+TreeWalker implements LegacyQueryInterface;
+ValidityState implements LegacyQueryInterface;
+WebSocket implements LegacyQueryInterface;
+Window implements LegacyQueryInterface;
+XMLHttpRequest implements LegacyQueryInterface;
+XMLHttpRequestUpload implements LegacyQueryInterface;
+XMLSerializer implements LegacyQueryInterface;
+XPathEvaluator implements LegacyQueryInterface;
diff --git a/dom/webidl/LinkStyle.webidl b/dom/webidl/LinkStyle.webidl
new file mode 100644
index 000000000..db0bc031a
--- /dev/null
+++ b/dom/webidl/LinkStyle.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/cssom/#the-linkstyle-interface
+ */
+
+[NoInterfaceObject]
+interface LinkStyle {
+ readonly attribute StyleSheet? sheet;
+};
+
diff --git a/dom/webidl/ListBoxObject.webidl b/dom/webidl/ListBoxObject.webidl
new file mode 100644
index 000000000..5e11e923f
--- /dev/null
+++ b/dom/webidl/ListBoxObject.webidl
@@ -0,0 +1,21 @@
+
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[NoInterfaceObject]
+interface ListBoxObject : BoxObject {
+
+ long getRowCount();
+ long getNumberOfVisibleRows();
+ long getIndexOfFirstVisibleRow();
+
+ void ensureIndexIsVisible(long rowIndex);
+ void scrollToIndex(long rowIndex);
+ void scrollByLines(long numLines);
+
+ Element? getItemAtIndex(long index);
+ long getIndexOfItem(Element item);
+};
diff --git a/dom/webidl/LocalMediaStream.webidl b/dom/webidl/LocalMediaStream.webidl
new file mode 100644
index 000000000..1ef7474a2
--- /dev/null
+++ b/dom/webidl/LocalMediaStream.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origins of this IDL file are
+ * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface LocalMediaStream : MediaStream {
+ void stop();
+};
diff --git a/dom/webidl/Location.webidl b/dom/webidl/Location.webidl
new file mode 100644
index 000000000..991da99a9
--- /dev/null
+++ b/dom/webidl/Location.webidl
@@ -0,0 +1,53 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-location-interface
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[Unforgeable, NonOrdinaryGetPrototypeOf]
+interface Location {
+ // Bug 824857: no support for stringifier attributes yet.
+ // stringifier attribute USVString href;
+
+ // Bug 824857 should remove this.
+ [Throws, NeedsSubjectPrincipal]
+ stringifier;
+
+ [Throws, CrossOriginWritable, NeedsSubjectPrincipal]
+ attribute USVString href;
+ [Throws, NeedsSubjectPrincipal]
+ readonly attribute USVString origin;
+ [Throws, NeedsSubjectPrincipal]
+ attribute USVString protocol;
+ [Throws, NeedsSubjectPrincipal]
+ attribute USVString host;
+ [Throws, NeedsSubjectPrincipal]
+ attribute USVString hostname;
+ [Throws, NeedsSubjectPrincipal]
+ attribute USVString port;
+ [Throws, NeedsSubjectPrincipal]
+ attribute USVString pathname;
+ [Throws, NeedsSubjectPrincipal]
+ attribute USVString search;
+ [Throws, NeedsSubjectPrincipal]
+ attribute USVString hash;
+
+ [Throws, UnsafeInPrerendering, NeedsSubjectPrincipal]
+ void assign(USVString url);
+
+ [Throws, CrossOriginCallable, UnsafeInPrerendering, NeedsSubjectPrincipal]
+ void replace(USVString url);
+
+ // XXXbz there is no forceget argument in the spec! See bug 1037721.
+ [Throws, UnsafeInPrerendering, NeedsSubjectPrincipal]
+ void reload(optional boolean forceget = false);
+
+ // Bug 1085214 [SameObject] readonly attribute USVString[] ancestorOrigins;
+};
diff --git a/dom/webidl/MediaDeviceInfo.webidl b/dom/webidl/MediaDeviceInfo.webidl
new file mode 100644
index 000000000..b42519ad1
--- /dev/null
+++ b/dom/webidl/MediaDeviceInfo.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+ */
+
+enum MediaDeviceKind {
+ "audioinput",
+ "audiooutput",
+ "videoinput"
+};
+
+[Func="Navigator::HasUserMediaSupport"]
+interface MediaDeviceInfo {
+ readonly attribute DOMString deviceId;
+ readonly attribute MediaDeviceKind kind;
+ readonly attribute DOMString label;
+ readonly attribute DOMString groupId;
+
+ jsonifier;
+};
diff --git a/dom/webidl/MediaDevices.webidl b/dom/webidl/MediaDevices.webidl
new file mode 100644
index 000000000..e8af32325
--- /dev/null
+++ b/dom/webidl/MediaDevices.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="Navigator::HasUserMediaSupport"]
+interface MediaDevices : EventTarget {
+ [Pref="media.ondevicechange.enabled"]
+ attribute EventHandler ondevicechange;
+ MediaTrackSupportedConstraints getSupportedConstraints();
+
+ [Throws]
+ Promise<sequence<MediaDeviceInfo>> enumerateDevices();
+
+ [Throws]
+ Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints);
+};
diff --git a/dom/webidl/MediaElementAudioSourceNode.webidl b/dom/webidl/MediaElementAudioSourceNode.webidl
new file mode 100644
index 000000000..f1ac17473
--- /dev/null
+++ b/dom/webidl/MediaElementAudioSourceNode.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface MediaElementAudioSourceNode : AudioNode {
+
+};
+
+// Mozilla extensions
+MediaElementAudioSourceNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/MediaEncryptedEvent.webidl b/dom/webidl/MediaEncryptedEvent.webidl
new file mode 100644
index 000000000..28d7a17b7
--- /dev/null
+++ b/dom/webidl/MediaEncryptedEvent.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+[Pref="media.eme.apiVisible", Constructor(DOMString type, optional MediaKeyNeededEventInit eventInitDict)]
+interface MediaEncryptedEvent : Event {
+ readonly attribute DOMString initDataType;
+ [Throws]
+ readonly attribute ArrayBuffer? initData;
+};
+
+dictionary MediaKeyNeededEventInit : EventInit {
+ DOMString initDataType = "";
+ ArrayBuffer? initData = null;
+};
diff --git a/dom/webidl/MediaError.webidl b/dom/webidl/MediaError.webidl
new file mode 100644
index 000000000..bd1ed4e3f
--- /dev/null
+++ b/dom/webidl/MediaError.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/html/#mediaerror
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface MediaError {
+ // Keep these constants in sync with the ones defined in HTMLMediaElement.h
+ const unsigned short MEDIA_ERR_ABORTED = 1;
+ const unsigned short MEDIA_ERR_NETWORK = 2;
+ const unsigned short MEDIA_ERR_DECODE = 3;
+ const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
+
+ [Constant]
+ readonly attribute unsigned short code;
+ readonly attribute DOMString message;
+};
diff --git a/dom/webidl/MediaKeyError.webidl b/dom/webidl/MediaKeyError.webidl
new file mode 100644
index 000000000..d0dde2032
--- /dev/null
+++ b/dom/webidl/MediaKeyError.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+// According to the spec, "The future of error events and MediaKeyError
+// is uncertain."
+// https://www.w3.org/Bugs/Public/show_bug.cgi?id=21798
+[Pref="media.eme.apiVisible"]
+interface MediaKeyError : Event {
+ readonly attribute unsigned long systemCode;
+};
diff --git a/dom/webidl/MediaKeyMessageEvent.webidl b/dom/webidl/MediaKeyMessageEvent.webidl
new file mode 100644
index 000000000..057924bb7
--- /dev/null
+++ b/dom/webidl/MediaKeyMessageEvent.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+enum MediaKeyMessageType {
+ "license-request",
+ "license-renewal",
+ "license-release",
+ "individualization-request"
+};
+
+[Pref="media.eme.apiVisible", Constructor(DOMString type, MediaKeyMessageEventInit eventInitDict)]
+interface MediaKeyMessageEvent : Event {
+ readonly attribute MediaKeyMessageType messageType;
+ [Throws]
+ readonly attribute ArrayBuffer message;
+};
+
+dictionary MediaKeyMessageEventInit : EventInit {
+ required MediaKeyMessageType messageType;
+ required ArrayBuffer message;
+};
diff --git a/dom/webidl/MediaKeySession.webidl b/dom/webidl/MediaKeySession.webidl
new file mode 100644
index 000000000..8ca5745c4
--- /dev/null
+++ b/dom/webidl/MediaKeySession.webidl
@@ -0,0 +1,47 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+[Pref="media.eme.apiVisible"]
+interface MediaKeySession : EventTarget {
+ // error state
+ readonly attribute MediaKeyError? error;
+
+ // session properties
+ readonly attribute DOMString keySystem;
+ readonly attribute DOMString sessionId;
+
+ readonly attribute unrestricted double expiration;
+
+ readonly attribute Promise<void> closed;
+
+ readonly attribute MediaKeyStatusMap keyStatuses;
+
+ attribute EventHandler onkeystatuseschange;
+
+ attribute EventHandler onmessage;
+
+ [NewObject]
+ Promise<void> generateRequest(DOMString initDataType, BufferSource initData);
+
+ [NewObject]
+ Promise<boolean> load(DOMString sessionId);
+
+ // session operations
+ [NewObject]
+ Promise<void> update(BufferSource response);
+
+ [NewObject]
+ Promise<void> close();
+
+ [NewObject]
+ Promise<void> remove();
+};
diff --git a/dom/webidl/MediaKeyStatusMap.webidl b/dom/webidl/MediaKeyStatusMap.webidl
new file mode 100644
index 000000000..1f34b5dc7
--- /dev/null
+++ b/dom/webidl/MediaKeyStatusMap.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+enum MediaKeyStatus {
+ "usable",
+ "expired",
+ "released",
+ "output-restricted",
+ "output-downscaled",
+ "status-pending",
+ "internal-error"
+};
+
+[Pref="media.eme.apiVisible"]
+interface MediaKeyStatusMap {
+ iterable<ArrayBuffer,MediaKeyStatus>;
+ readonly attribute unsigned long size;
+ boolean has (BufferSource keyId);
+ [Throws]
+ any get (BufferSource keyId);
+};
diff --git a/dom/webidl/MediaKeySystemAccess.webidl b/dom/webidl/MediaKeySystemAccess.webidl
new file mode 100644
index 000000000..01552e449
--- /dev/null
+++ b/dom/webidl/MediaKeySystemAccess.webidl
@@ -0,0 +1,41 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+enum MediaKeysRequirement {
+ "required",
+ "optional",
+ "not-allowed"
+};
+
+dictionary MediaKeySystemMediaCapability {
+ DOMString contentType = "";
+ DOMString robustness = "";
+};
+
+dictionary MediaKeySystemConfiguration {
+ DOMString label = "";
+ sequence<DOMString> initDataTypes = [];
+ sequence<MediaKeySystemMediaCapability> audioCapabilities = [];
+ sequence<MediaKeySystemMediaCapability> videoCapabilities = [];
+ MediaKeysRequirement distinctiveIdentifier = "optional";
+ MediaKeysRequirement persistentState = "optional";
+ sequence<DOMString> sessionTypes;
+};
+
+[Pref="media.eme.apiVisible"]
+interface MediaKeySystemAccess {
+ readonly attribute DOMString keySystem;
+ [NewObject]
+ MediaKeySystemConfiguration getConfiguration();
+ [NewObject]
+ Promise<MediaKeys> createMediaKeys();
+};
diff --git a/dom/webidl/MediaKeys.webidl b/dom/webidl/MediaKeys.webidl
new file mode 100644
index 000000000..cb84cdab6
--- /dev/null
+++ b/dom/webidl/MediaKeys.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+// Note: "persistent-usage-record" session type is unsupported yet, as
+// it's marked as "at risk" in the spec, and Chrome doesn't support it.
+enum MediaKeySessionType {
+ "temporary",
+ "persistent-license",
+ // persistent-usage-record,
+};
+
+[Pref="media.eme.apiVisible"]
+interface MediaKeys {
+ readonly attribute DOMString keySystem;
+
+ [NewObject, Throws]
+ MediaKeySession createSession(optional MediaKeySessionType sessionType = "temporary");
+
+ [NewObject]
+ Promise<void> setServerCertificate((ArrayBufferView or ArrayBuffer) serverCertificate);
+};
diff --git a/dom/webidl/MediaKeysRequestStatus.webidl b/dom/webidl/MediaKeysRequestStatus.webidl
new file mode 100644
index 000000000..737372f66
--- /dev/null
+++ b/dom/webidl/MediaKeysRequestStatus.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+enum MediaKeySystemStatus {
+ "available",
+ "api-disabled",
+ "cdm-disabled",
+ "cdm-not-supported",
+ "cdm-not-installed",
+ "cdm-created",
+};
+
+/* Note: This dictionary and enum is only used by Gecko to convey messages
+ * to chrome JS code. It is not exposed to the web.
+ */
+
+dictionary RequestMediaKeySystemAccessNotification {
+ required DOMString keySystem;
+ required MediaKeySystemStatus status;
+};
diff --git a/dom/webidl/MediaList.webidl b/dom/webidl/MediaList.webidl
new file mode 100644
index 000000000..44e733190
--- /dev/null
+++ b/dom/webidl/MediaList.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+// http://dev.w3.org/csswg/cssom/#the-medialist-interface
+
+[ArrayClass]
+interface MediaList {
+ [TreatNullAs=EmptyString]
+ attribute DOMString mediaText;
+
+ readonly attribute unsigned long length;
+ getter DOMString? item(unsigned long index);
+ [Throws]
+ void deleteMedium(DOMString oldMedium);
+ [Throws]
+ void appendMedium(DOMString newMedium);
+};
diff --git a/dom/webidl/MediaQueryList.webidl b/dom/webidl/MediaQueryList.webidl
new file mode 100644
index 000000000..519ddb0e5
--- /dev/null
+++ b/dom/webidl/MediaQueryList.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/cssom-view/#the-mediaquerylist-interface
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface MediaQueryList {
+ readonly attribute DOMString media;
+ readonly attribute boolean matches;
+ void addListener(MediaQueryListListener listener);
+ void removeListener(MediaQueryListListener listener);
+};
+
+callback MediaQueryListListener = void (MediaQueryList list);
diff --git a/dom/webidl/MediaRecorder.webidl b/dom/webidl/MediaRecorder.webidl
new file mode 100644
index 000000000..65d1893e9
--- /dev/null
+++ b/dom/webidl/MediaRecorder.webidl
@@ -0,0 +1,59 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/MediaRecorder.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum RecordingState { "inactive", "recording", "paused" };
+
+[Constructor(MediaStream stream, optional MediaRecorderOptions options),
+ Constructor(AudioNode node, optional unsigned long output = 0,
+ optional MediaRecorderOptions options)]
+interface MediaRecorder : EventTarget {
+
+ readonly attribute MediaStream stream;
+
+ readonly attribute RecordingState state;
+
+ readonly attribute DOMString mimeType;
+
+ attribute EventHandler ondataavailable;
+
+ attribute EventHandler onerror;
+
+ attribute EventHandler onstart;
+
+ attribute EventHandler onstop;
+
+ attribute EventHandler onwarning;
+
+ [Throws]
+ void start(optional long timeSlice);
+
+ [Throws]
+ void stop();
+
+ [Throws]
+ void pause();
+
+ [Throws]
+ void resume();
+
+ [Throws]
+ void requestData();
+
+ static boolean isTypeSupported(DOMString type);
+};
+
+dictionary MediaRecorderOptions {
+ DOMString mimeType = ""; // Default encoding mimeType.
+ unsigned long audioBitsPerSecond;
+ unsigned long videoBitsPerSecond;
+ unsigned long bitsPerSecond;
+};
diff --git a/dom/webidl/MediaSource.webidl b/dom/webidl/MediaSource.webidl
new file mode 100644
index 000000000..63691e090
--- /dev/null
+++ b/dom/webidl/MediaSource.webidl
@@ -0,0 +1,47 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum MediaSourceReadyState {
+ "closed",
+ "open",
+ "ended"
+};
+
+enum MediaSourceEndOfStreamError {
+ "network",
+ "decode"
+};
+
+[Constructor, Func="mozilla::dom::MediaSource::Enabled"]
+interface MediaSource : EventTarget {
+ readonly attribute SourceBufferList sourceBuffers;
+ readonly attribute SourceBufferList activeSourceBuffers;
+ readonly attribute MediaSourceReadyState readyState;
+ [SetterThrows]
+ attribute unrestricted double duration;
+ attribute EventHandler onsourceopen;
+ attribute EventHandler onsourceended;
+ attribute EventHandler onsourceclosed;
+ [NewObject, Throws]
+ SourceBuffer addSourceBuffer(DOMString type);
+ [Throws]
+ void removeSourceBuffer(SourceBuffer sourceBuffer);
+ [Throws]
+ void endOfStream(optional MediaSourceEndOfStreamError error);
+ [Throws]
+ void setLiveSeekableRange(double start, double end);
+ [Throws]
+ void clearLiveSeekableRange();
+ static boolean isTypeSupported(DOMString type);
+ [ChromeOnly]
+ readonly attribute DOMString mozDebugReaderData;
+};
diff --git a/dom/webidl/MediaStream.webidl b/dom/webidl/MediaStream.webidl
new file mode 100644
index 000000000..3d0347f8b
--- /dev/null
+++ b/dom/webidl/MediaStream.webidl
@@ -0,0 +1,43 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origins of this IDL file are
+ * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+ *
+ * Copyright � 2012 W3C� (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+// These dictionaries need to be in a separate file from their
+// MediaTrackConstraints* counterparts due to a webidl compiler limitation.
+
+dictionary MediaStreamConstraints {
+ (boolean or MediaTrackConstraints) audio = false;
+ (boolean or MediaTrackConstraints) video = false;
+ boolean picture = false; // Mozilla legacy
+ boolean fake; // For testing purpose. Generates frames of solid
+ // colors if video is enabled, and sound of 1Khz sine
+ // wave if audio is enabled.
+ DOMString? peerIdentity = null;
+};
+
+[Exposed=Window,
+ Constructor,
+ Constructor (MediaStream stream),
+ Constructor (sequence<MediaStreamTrack> tracks)]
+interface MediaStream : EventTarget {
+ readonly attribute DOMString id;
+ sequence<AudioStreamTrack> getAudioTracks ();
+ sequence<VideoStreamTrack> getVideoTracks ();
+ sequence<MediaStreamTrack> getTracks ();
+ MediaStreamTrack? getTrackById (DOMString trackId);
+ void addTrack (MediaStreamTrack track);
+ void removeTrack (MediaStreamTrack track);
+ MediaStream clone ();
+ readonly attribute boolean active;
+ attribute EventHandler onaddtrack;
+ // attribute EventHandler onremovetrack;
+ readonly attribute double currentTime;
+};
diff --git a/dom/webidl/MediaStreamAudioDestinationNode.webidl b/dom/webidl/MediaStreamAudioDestinationNode.webidl
new file mode 100644
index 000000000..aafff964e
--- /dev/null
+++ b/dom/webidl/MediaStreamAudioDestinationNode.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface MediaStreamAudioDestinationNode : AudioNode {
+
+ readonly attribute MediaStream stream;
+
+};
diff --git a/dom/webidl/MediaStreamAudioSourceNode.webidl b/dom/webidl/MediaStreamAudioSourceNode.webidl
new file mode 100644
index 000000000..e717ef254
--- /dev/null
+++ b/dom/webidl/MediaStreamAudioSourceNode.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface MediaStreamAudioSourceNode : AudioNode {
+
+};
+
+// Mozilla extensions
+MediaStreamAudioSourceNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/MediaStreamError.webidl b/dom/webidl/MediaStreamError.webidl
new file mode 100644
index 000000000..54c8f5792
--- /dev/null
+++ b/dom/webidl/MediaStreamError.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c.github.io/mediacapture-main/getusermedia.html#idl-def-MediaStreamError
+ */
+
+// The future of MediaStreamError is uncertain.
+// https://www.w3.org/Bugs/Public/show_bug.cgi?id=26776
+
+// TODO: This is an 'exception', not an interface, by virtue of needing to be
+// passed as a promise rejection-reason. Revisit if DOMException grows a customArg
+
+[ExceptionClass, NoInterfaceObject]
+interface MediaStreamError {
+ readonly attribute DOMString name;
+ readonly attribute DOMString? message;
+ readonly attribute DOMString? constraint;
+};
diff --git a/dom/webidl/MediaStreamEvent.webidl b/dom/webidl/MediaStreamEvent.webidl
new file mode 100644
index 000000000..56bac3a86
--- /dev/null
+++ b/dom/webidl/MediaStreamEvent.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastreamevent
+ */
+
+dictionary MediaStreamEventInit : EventInit {
+ MediaStream? stream = null;
+};
+
+[Pref="media.peerconnection.enabled",
+ Constructor(DOMString type, optional MediaStreamEventInit eventInitDict)]
+interface MediaStreamEvent : Event {
+ readonly attribute MediaStream? stream;
+};
diff --git a/dom/webidl/MediaStreamList.webidl b/dom/webidl/MediaStreamList.webidl
new file mode 100644
index 000000000..b72e9d212
--- /dev/null
+++ b/dom/webidl/MediaStreamList.webidl
@@ -0,0 +1,11 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[ChromeOnly]
+interface MediaStreamList {
+ getter MediaStream? (unsigned long index);
+ readonly attribute unsigned long length;
+};
diff --git a/dom/webidl/MediaStreamTrack.webidl b/dom/webidl/MediaStreamTrack.webidl
new file mode 100644
index 000000000..7831beecb
--- /dev/null
+++ b/dom/webidl/MediaStreamTrack.webidl
@@ -0,0 +1,93 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+// These two enums are in the spec even though they're not used directly in the
+// API due to https://www.w3.org/Bugs/Public/show_bug.cgi?id=19936
+// Their binding code is used in the implementation.
+
+enum VideoFacingModeEnum {
+ "user",
+ "environment",
+ "left",
+ "right"
+};
+
+enum MediaSourceEnum {
+ "camera",
+ "screen",
+ "application",
+ "window",
+ "browser",
+ "microphone",
+ "audioCapture",
+ "other"
+ // If values are added, adjust n_values in Histograms.json (2 places)
+};
+
+typedef (long or ConstrainLongRange) ConstrainLong;
+typedef (double or ConstrainDoubleRange) ConstrainDouble;
+typedef (boolean or ConstrainBooleanParameters) ConstrainBoolean;
+typedef (DOMString or sequence<DOMString> or ConstrainDOMStringParameters) ConstrainDOMString;
+
+// Note: When adding new constraints, remember to update the SelectSettings()
+// function in MediaManager.cpp to make OverconstrainedError's constraint work!
+
+dictionary MediaTrackConstraintSet {
+ ConstrainLong width;
+ ConstrainLong height;
+ ConstrainDouble frameRate;
+ ConstrainDOMString facingMode;
+ DOMString mediaSource = "camera";
+ long long browserWindow;
+ boolean scrollWithPage;
+ ConstrainDOMString deviceId;
+ ConstrainLong viewportOffsetX;
+ ConstrainLong viewportOffsetY;
+ ConstrainLong viewportWidth;
+ ConstrainLong viewportHeight;
+ ConstrainBoolean echoCancellation;
+ ConstrainBoolean mozNoiseSuppression;
+ ConstrainBoolean mozAutoGainControl;
+};
+
+dictionary MediaTrackConstraints : MediaTrackConstraintSet {
+ sequence<MediaTrackConstraintSet> advanced;
+};
+
+enum MediaStreamTrackState {
+ "live",
+ "ended"
+};
+
+[Exposed=Window]
+interface MediaStreamTrack : EventTarget {
+ readonly attribute DOMString kind;
+ readonly attribute DOMString id;
+ readonly attribute DOMString label;
+ attribute boolean enabled;
+// readonly attribute boolean muted;
+// attribute EventHandler onmute;
+// attribute EventHandler onunmute;
+// readonly attribute boolean _readonly;
+// readonly attribute boolean remote;
+ readonly attribute MediaStreamTrackState readyState;
+ attribute EventHandler onended;
+ MediaStreamTrack clone ();
+ void stop ();
+// MediaTrackCapabilities getCapabilities ();
+ MediaTrackConstraints getConstraints ();
+ MediaTrackSettings getSettings ();
+
+ [Throws]
+ Promise<void> applyConstraints (optional MediaTrackConstraints constraints);
+// attribute EventHandler onoverconstrained;
+};
diff --git a/dom/webidl/MediaStreamTrackEvent.webidl b/dom/webidl/MediaStreamTrackEvent.webidl
new file mode 100644
index 000000000..538adf2f9
--- /dev/null
+++ b/dom/webidl/MediaStreamTrackEvent.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastreamevent
+ */
+
+dictionary MediaStreamTrackEventInit : EventInit {
+ required MediaStreamTrack track;
+};
+
+[Exposed=Window,
+ Constructor (DOMString type, MediaStreamTrackEventInit eventInitDict)]
+interface MediaStreamTrackEvent : Event {
+ [SameObject]
+ readonly attribute MediaStreamTrack track;
+};
diff --git a/dom/webidl/MediaTrackConstraintSet.webidl b/dom/webidl/MediaTrackConstraintSet.webidl
new file mode 100644
index 000000000..63bc6bac5
--- /dev/null
+++ b/dom/webidl/MediaTrackConstraintSet.webidl
@@ -0,0 +1,38 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+ */
+
+// These dictionaries need to be in a separate file from their use in unions
+// in MediaSreamTrack.webidl due to a webidl compiler limitation:
+//
+// TypeError: Dictionary contains a union that contains a dictionary in the same
+// WebIDL file. This won't compile. Move the inner dictionary to a different file.
+
+dictionary ConstrainLongRange {
+ long min;
+ long max;
+ long exact;
+ long ideal;
+};
+
+dictionary ConstrainDoubleRange {
+ double min;
+ double max;
+ double exact;
+ double ideal;
+};
+
+dictionary ConstrainBooleanParameters {
+ boolean exact;
+ boolean ideal;
+};
+
+dictionary ConstrainDOMStringParameters {
+ (DOMString or sequence<DOMString>) exact;
+ (DOMString or sequence<DOMString>) ideal;
+};
diff --git a/dom/webidl/MediaTrackSettings.webidl b/dom/webidl/MediaTrackSettings.webidl
new file mode 100644
index 000000000..909b9f60b
--- /dev/null
+++ b/dom/webidl/MediaTrackSettings.webidl
@@ -0,0 +1,36 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c.github.io/mediacapture-main/getusermedia.html
+ */
+
+dictionary MediaTrackSettings {
+ long width;
+ long height;
+ double frameRate;
+ DOMString facingMode;
+ DOMString deviceId;
+ boolean echoCancellation;
+ boolean mozNoiseSuppression;
+ boolean mozAutoGainControl;
+
+ // Mozilla-specific extensions:
+
+ // http://fluffy.github.io/w3c-screen-share/#screen-based-video-constraints
+ // OBE by http://w3c.github.io/mediacapture-screen-share
+
+ DOMString mediaSource;
+
+ // Experimental https://bugzilla.mozilla.org/show_bug.cgi?id=1131568#c3
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1193075
+
+ long long browserWindow;
+ boolean scrollWithPage;
+ long viewportOffsetX;
+ long viewportOffsetY;
+ long viewportWidth;
+ long viewportHeight;
+}; \ No newline at end of file
diff --git a/dom/webidl/MediaTrackSupportedConstraints.webidl b/dom/webidl/MediaTrackSupportedConstraints.webidl
new file mode 100644
index 000000000..31616ada7
--- /dev/null
+++ b/dom/webidl/MediaTrackSupportedConstraints.webidl
@@ -0,0 +1,42 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+ */
+
+dictionary MediaTrackSupportedConstraints {
+ boolean width = true;
+ boolean height = true;
+ boolean aspectRatio; // to be supported
+ boolean frameRate = true;
+ boolean facingMode = true;
+ boolean volume; // to be supported
+ boolean sampleRate; // to be supported
+ boolean sampleSize; // to be supported
+ boolean echoCancellation = true;
+ boolean mozNoiseSuppression = true;
+ boolean mozAutoGainControl = true;
+ boolean latency; // to be supported
+ boolean deviceId = true;
+ boolean groupId; // to be supported
+
+ // Mozilla-specific extensions:
+
+ // http://fluffy.github.io/w3c-screen-share/#screen-based-video-constraints
+ // OBE by http://w3c.github.io/mediacapture-screen-share
+
+ boolean mediaSource = true;
+
+ // Experimental https://bugzilla.mozilla.org/show_bug.cgi?id=1131568#c3
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1193075
+
+ boolean browserWindow = true;
+ boolean scrollWithPage = true;
+ boolean viewportOffsetX = true;
+ boolean viewportOffsetY = true;
+ boolean viewportWidth = true;
+ boolean viewportHeight = true;
+};
diff --git a/dom/webidl/MenuBoxObject.webidl b/dom/webidl/MenuBoxObject.webidl
new file mode 100644
index 000000000..449cadc59
--- /dev/null
+++ b/dom/webidl/MenuBoxObject.webidl
@@ -0,0 +1,19 @@
+
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Func="IsChromeOrXBL"]
+interface MenuBoxObject : BoxObject {
+
+ void openMenu(boolean openFlag);
+
+ attribute Element? activeChild;
+
+ boolean handleKeyPress(KeyboardEvent keyEvent);
+
+ readonly attribute boolean openedWithKey;
+
+};
diff --git a/dom/webidl/MessageChannel.webidl b/dom/webidl/MessageChannel.webidl
new file mode 100644
index 000000000..41208147c
--- /dev/null
+++ b/dom/webidl/MessageChannel.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface, please see
+ * http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging
+ */
+
+[Constructor, Exposed=(Window,Worker)]
+interface MessageChannel {
+ readonly attribute MessagePort port1;
+ readonly attribute MessagePort port2;
+};
diff --git a/dom/webidl/MessageEvent.webidl b/dom/webidl/MessageEvent.webidl
new file mode 100644
index 000000000..548f14520
--- /dev/null
+++ b/dom/webidl/MessageEvent.webidl
@@ -0,0 +1,58 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface, please see
+ * http://www.whatwg.org/specs/web-apps/current-work/#messageevent
+ */
+
+[Constructor(DOMString type, optional MessageEventInit eventInitDict),
+ Exposed=(Window,Worker,System)]
+interface MessageEvent : Event {
+ /**
+ * Custom data associated with this event.
+ */
+ [GetterThrows]
+ readonly attribute any data;
+
+ /**
+ * The origin of the site from which this event originated, which is the
+ * scheme, ":", and if the URI has a host, "//" followed by the
+ * host, and if the port is not the default for the given scheme,
+ * ":" followed by that port. This value does not have a trailing slash.
+ */
+ readonly attribute DOMString origin;
+
+ /**
+ * The last event ID string of the event source, for server-sent DOM events; this
+ * value is the empty string for cross-origin messaging.
+ */
+ readonly attribute DOMString lastEventId;
+
+ /**
+ * The window or port which originated this event.
+ */
+ readonly attribute (WindowProxy or MessagePort)? source;
+
+ /**
+ * Initializes this event with the given data, in a manner analogous to
+ * the similarly-named method on the nsIDOMEvent interface, also setting the
+ * data, origin, source, and lastEventId attributes of this appropriately.
+ */
+ [Pure, Cached, Frozen]
+ readonly attribute sequence<MessagePort> ports;
+
+ void initMessageEvent(DOMString type, boolean bubbles, boolean cancelable,
+ any data, DOMString origin, DOMString lastEventId,
+ (WindowProxy or MessagePort)? source,
+ sequence<MessagePort> ports);
+};
+
+dictionary MessageEventInit : EventInit {
+ any data = null;
+ DOMString origin = "";
+ DOMString lastEventId = "";
+ (Window or MessagePort)? source = null;
+ sequence<MessagePort> ports = [];
+};
diff --git a/dom/webidl/MessagePort.webidl b/dom/webidl/MessagePort.webidl
new file mode 100644
index 000000000..59c61a714
--- /dev/null
+++ b/dom/webidl/MessagePort.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface, please see
+ * http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging
+ */
+
+[Exposed=(Window,Worker,System)]
+interface MessagePort : EventTarget {
+ [Throws]
+ void postMessage(any message, optional sequence<Transferable> transferable);
+
+ void start();
+ void close();
+
+ // event handlers
+ attribute EventHandler onmessage;
+};
+// MessagePort implements Transferable;
diff --git a/dom/webidl/MimeType.webidl b/dom/webidl/MimeType.webidl
new file mode 100644
index 000000000..a33d31640
--- /dev/null
+++ b/dom/webidl/MimeType.webidl
@@ -0,0 +1,12 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface MimeType {
+ readonly attribute DOMString description;
+ readonly attribute Plugin? enabledPlugin;
+ readonly attribute DOMString suffixes;
+ readonly attribute DOMString type;
+};
diff --git a/dom/webidl/MimeTypeArray.webidl b/dom/webidl/MimeTypeArray.webidl
new file mode 100644
index 000000000..21bfc6dc0
--- /dev/null
+++ b/dom/webidl/MimeTypeArray.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+// [LegacyUnenumerableNamedProperties]
+// Named properties enumerable for now; see
+// https://bugzilla.mozilla.org/show_bug.cgi?id=1270364
+interface MimeTypeArray {
+ readonly attribute unsigned long length;
+
+ getter MimeType? item(unsigned long index);
+ getter MimeType? namedItem(DOMString name);
+};
diff --git a/dom/webidl/MouseEvent.webidl b/dom/webidl/MouseEvent.webidl
new file mode 100644
index 000000000..d21354801
--- /dev/null
+++ b/dom/webidl/MouseEvent.webidl
@@ -0,0 +1,114 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface please see
+ * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)]
+interface MouseEvent : UIEvent {
+ readonly attribute long screenX;
+ readonly attribute long screenY;
+ readonly attribute long clientX;
+ readonly attribute long clientY;
+ readonly attribute long offsetX;
+ readonly attribute long offsetY;
+ readonly attribute boolean ctrlKey;
+ readonly attribute boolean shiftKey;
+ readonly attribute boolean altKey;
+ readonly attribute boolean metaKey;
+ readonly attribute short button;
+ readonly attribute unsigned short buttons;
+ readonly attribute EventTarget? relatedTarget;
+ readonly attribute DOMString? region;
+
+ // Pointer Lock
+ readonly attribute long movementX;
+ readonly attribute long movementY;
+
+ // Deprecated in DOM Level 3:
+ void initMouseEvent(DOMString typeArg,
+ boolean canBubbleArg,
+ boolean cancelableArg,
+ Window? viewArg,
+ long detailArg,
+ long screenXArg,
+ long screenYArg,
+ long clientXArg,
+ long clientYArg,
+ boolean ctrlKeyArg,
+ boolean altKeyArg,
+ boolean shiftKeyArg,
+ boolean metaKeyArg,
+ short buttonArg,
+ EventTarget? relatedTargetArg);
+ // Introduced in DOM Level 3:
+ boolean getModifierState(DOMString keyArg);
+};
+
+// Suggested initMouseEvent replacement initializer:
+dictionary MouseEventInit : EventModifierInit {
+ // Attributes for MouseEvent:
+ long screenX = 0;
+ long screenY = 0;
+ long clientX = 0;
+ long clientY = 0;
+ short button = 0;
+ // Note: "buttons" was not previously initializable through initMouseEvent!
+ unsigned short buttons = 0;
+ EventTarget? relatedTarget = null;
+
+ // Pointer Lock
+ long movementX = 0;
+ long movementY = 0;
+};
+
+// Mozilla extensions
+partial interface MouseEvent
+{
+ [BinaryName="movementX", Pref="pointer-lock-api.prefixed.enabled"]
+ readonly attribute long mozMovementX;
+ [BinaryName="movementY", Pref="pointer-lock-api.prefixed.enabled"]
+ readonly attribute long mozMovementY;
+
+ // Finger or touch pressure event value
+ // ranges between 0.0 and 1.0
+ readonly attribute float mozPressure;
+
+ const unsigned short MOZ_SOURCE_UNKNOWN = 0;
+ const unsigned short MOZ_SOURCE_MOUSE = 1;
+ const unsigned short MOZ_SOURCE_PEN = 2;
+ const unsigned short MOZ_SOURCE_ERASER = 3;
+ const unsigned short MOZ_SOURCE_CURSOR = 4;
+ const unsigned short MOZ_SOURCE_TOUCH = 5;
+ const unsigned short MOZ_SOURCE_KEYBOARD = 6;
+
+ readonly attribute unsigned short mozInputSource;
+
+ void initNSMouseEvent(DOMString typeArg,
+ boolean canBubbleArg,
+ boolean cancelableArg,
+ Window? viewArg,
+ long detailArg,
+ long screenXArg,
+ long screenYArg,
+ long clientXArg,
+ long clientYArg,
+ boolean ctrlKeyArg,
+ boolean altKeyArg,
+ boolean shiftKeyArg,
+ boolean metaKeyArg,
+ short buttonArg,
+ EventTarget? relatedTargetArg,
+ float pressure,
+ unsigned short inputSourceArg);
+ [ChromeOnly]
+ readonly attribute boolean hitCluster; // True when touch occurs in a cluster of links
+
+};
+
diff --git a/dom/webidl/MouseScrollEvent.webidl b/dom/webidl/MouseScrollEvent.webidl
new file mode 100644
index 000000000..aa9e30fd2
--- /dev/null
+++ b/dom/webidl/MouseScrollEvent.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface MouseScrollEvent : MouseEvent
+{
+ const long HORIZONTAL_AXIS = 1;
+ const long VERTICAL_AXIS = 2;
+
+ readonly attribute long axis;
+
+ void initMouseScrollEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ Window? view,
+ long detail,
+ long screenX,
+ long screenY,
+ long clientX,
+ long clientY,
+ boolean ctrlKey,
+ boolean altKey,
+ boolean shiftKey,
+ boolean metaKey,
+ unsigned short button,
+ EventTarget? relatedTarget,
+ long axis);
+};
diff --git a/dom/webidl/MozApplicationEvent.webidl b/dom/webidl/MozApplicationEvent.webidl
new file mode 100644
index 000000000..e46fdca06
--- /dev/null
+++ b/dom/webidl/MozApplicationEvent.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional MozApplicationEventInit eventInitDict), ChromeOnly]
+interface MozApplicationEvent : Event
+{
+ readonly attribute DOMApplication? application;
+};
+
+dictionary MozApplicationEventInit : EventInit
+{
+ DOMApplication? application = null;
+};
diff --git a/dom/webidl/MozNetworkStats.webidl b/dom/webidl/MozNetworkStats.webidl
new file mode 100644
index 000000000..dc8635b87
--- /dev/null
+++ b/dom/webidl/MozNetworkStats.webidl
@@ -0,0 +1,73 @@
+/* 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/. */
+
+/**
+ * Provide the detailed options for specifying different kinds of data filtering
+ * in getSamples function.
+ */
+dictionary NetworkStatsGetOptions
+{
+ /**
+ * App manifest URL is used to filter network stats by app, while service type
+ * is used to filter stats by system service.
+ * Note that, these two options cannot be specified at the same time for now;
+ * others, an NS_ERROR_NOT_IMPLMENTED exception will be thrown.
+ */
+ DOMString? appManifestURL = null;
+ DOMString serviceType = "";
+ /**
+ * If it is set as true, only the browsing traffic, which is generated from
+ * the mozbrowser iframe element within an app, is returned in result.
+ * If it is set as false or not set, the total traffic, which is generated
+ * from both the mozapp and mozbrowser iframe elements, is returned.
+ */
+ boolean browsingTrafficOnly = false;
+};
+
+dictionary NetworkStatsAlarmOptions
+{
+ Date startTime;
+ Date data;
+};
+
+[JSImplementation="@mozilla.org/networkstats;1",
+ ChromeOnly,
+ Pref="dom.mozNetworkStats.enabled"]
+interface MozNetworkStats {
+ /**
+ * App manifest URL of an application for specifying the per-app stats of the
+ * specified app.
+ */
+ readonly attribute DOMString appManifestURL;
+
+ /**
+ * True if this stats is the browsing traffic of an app (the traffic generated
+ * by a mozbrowser iframe element).
+ * Otherwise this stats represents the total traffic of an app.
+ */
+ readonly attribute boolean browsingTrafficOnly;
+
+ /**
+ * Service type is used to retrieve the corresponding "system-only" stats.
+ * E.g., "Tethering", "OTA", etc.
+ */
+ readonly attribute DOMString serviceType;
+
+ /**
+ * Network the returned data belongs to.
+ */
+ readonly attribute MozNetworkStatsInterface network;
+
+ /**
+ * Stats for a network.
+ */
+ [Cached, Pure]
+ readonly attribute sequence<MozNetworkStatsData> data;
+
+ /**
+ * Dates
+ */
+ readonly attribute object start;
+ readonly attribute object end;
+};
diff --git a/dom/webidl/MozNetworkStatsAlarm.webidl b/dom/webidl/MozNetworkStatsAlarm.webidl
new file mode 100644
index 000000000..e8bc01998
--- /dev/null
+++ b/dom/webidl/MozNetworkStatsAlarm.webidl
@@ -0,0 +1,13 @@
+/* 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/. */
+
+[JSImplementation="@mozilla.org/networkstatsalarm;1",
+ ChromeOnly,
+ Pref="dom.mozNetworkStats.enabled"]
+interface MozNetworkStatsAlarm {
+ readonly attribute unsigned long alarmId;
+ readonly attribute MozNetworkStatsInterface network;
+ readonly attribute long long threshold;
+ readonly attribute any data;
+};
diff --git a/dom/webidl/MozNetworkStatsData.webidl b/dom/webidl/MozNetworkStatsData.webidl
new file mode 100644
index 000000000..60d1e0d36
--- /dev/null
+++ b/dom/webidl/MozNetworkStatsData.webidl
@@ -0,0 +1,12 @@
+/* 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/. */
+
+[JSImplementation="@mozilla.org/networkStatsdata;1",
+ ChromeOnly,
+ Pref="dom.mozNetworkStats.enabled"]
+interface MozNetworkStatsData {
+ readonly attribute unsigned long rxBytes; // Received bytes.
+ readonly attribute unsigned long txBytes; // Sent bytes.
+ readonly attribute Date date; // Date.
+};
diff --git a/dom/webidl/MozNetworkStatsInterface.webidl b/dom/webidl/MozNetworkStatsInterface.webidl
new file mode 100644
index 000000000..82acfad6b
--- /dev/null
+++ b/dom/webidl/MozNetworkStatsInterface.webidl
@@ -0,0 +1,26 @@
+/* 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/. */
+
+dictionary NetworkInterface {
+ long type;
+ DOMString id;
+};
+
+/**
+ * Represents a data interface for which the manager is recording statistics.
+ */
+[Constructor(optional NetworkInterface networkinterface),
+ JSImplementation="@mozilla.org/networkstatsinterface;1",
+ ChromeOnly,
+ Pref="dom.mozNetworkStats.enabled"]
+interface MozNetworkStatsInterface {
+ readonly attribute long type;
+
+ /**
+ * Id value is '0' for wifi or the iccid for mobile (SIM).
+ */
+ readonly attribute DOMString id;
+
+ jsonifier;
+};
diff --git a/dom/webidl/MozNetworkStatsManager.webidl b/dom/webidl/MozNetworkStatsManager.webidl
new file mode 100644
index 000000000..2c0e374d7
--- /dev/null
+++ b/dom/webidl/MozNetworkStatsManager.webidl
@@ -0,0 +1,96 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[NavigatorProperty="mozNetworkStats",
+ JSImplementation="@mozilla.org/networkStatsManager;1",
+ ChromeOnly,
+ Pref="dom.mozNetworkStats.enabled"]
+interface MozNetworkStatsManager {
+ /**
+ * Constants for known interface types.
+ */
+ const long WIFI = 0;
+ const long MOBILE = 1;
+
+ /**
+ * Find samples between two dates start and end, both included.
+ *
+ * If options is provided, per-app or per-system service usage will be
+ * retrieved; otherwise the target will be overall system usage.
+ *
+ * If success, the request result will be an MozNetworkStats object.
+ */
+ DOMRequest getSamples(MozNetworkStatsInterface network,
+ Date start,
+ Date end,
+ optional NetworkStatsGetOptions options);
+
+ /**
+ * Install an alarm on a network. The network must be in the return of
+ * getAvailableNetworks() otherwise an "InvalidNetwork" exception will
+ * be raised.
+ *
+ * When total data usage reaches threshold bytes, a "networkstats-alarm"
+ * system message is sent to the application, where the optional parameter
+ * |data| must be a cloneable object.
+ *
+ * If success, the |result| field of the DOMRequest keeps the alarm Id.
+ */
+ DOMRequest addAlarm(MozNetworkStatsInterface network,
+ long long threshold,
+ optional NetworkStatsAlarmOptions options);
+
+ /**
+ * Obtain all alarms for those networks returned by getAvailableNetworks().
+ * If a network is provided, only retrieves the alarms for that network.
+ * The network must be one of those returned by getAvailebleNetworks() or an
+ * "InvalidNetwork" exception will be raised.
+ *
+ * Each alarm object has the same fields as that in the system message:
+ * - alarmId
+ * - network
+ * - threshold
+ * - data
+ */
+ DOMRequest getAllAlarms(optional MozNetworkStatsInterface network);
+
+ /**
+ * Remove all network alarms. If an |alarmId| is provided, then only that
+ * alarm is removed.
+ */
+ DOMRequest removeAlarms(optional unsigned long alarmId = 0);
+
+ /**
+ * Remove all stats related with the provided network from DB.
+ */
+ DOMRequest clearStats(MozNetworkStatsInterface network);
+
+ /**
+ * Remove all stats in the database.
+ */
+ DOMRequest clearAllStats();
+
+ /**
+ * Return available networks that used to be saved in the database.
+ */
+ DOMRequest getAvailableNetworks(); // array of MozNetworkStatsInterface.
+
+ /**
+ * Return available service types that used to be saved in the database.
+ */
+ DOMRequest getAvailableServiceTypes(); // array of string.
+
+ /**
+ * Minimum time in milliseconds between samples stored in the database.
+ */
+ readonly attribute long sampleRate;
+
+ /**
+ * Time in milliseconds recorded by the API until present time. All samples
+ * older than maxStorageAge from now are deleted.
+ */
+ readonly attribute long long maxStorageAge;
+};
diff --git a/dom/webidl/MozPowerManager.webidl b/dom/webidl/MozPowerManager.webidl
new file mode 100644
index 000000000..becf6ff3a
--- /dev/null
+++ b/dom/webidl/MozPowerManager.webidl
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* 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/. */
+
+interface MozWakeLockListener;
+
+/**
+ * The reason for the factory reset.
+ * "normal" : simple factory reset.
+ * "wipe" : will also attempt to wipe all user storage areas.
+ * "root" : simple factory reset that also root the phone to get more
+ * privileges when using devtools.
+ */
+enum FactoryResetReason {
+ "normal",
+ "wipe",
+ "root"
+};
+
+/**
+ * This interface implements navigator.mozPower
+ */
+[ChromeOnly]
+interface MozPowerManager
+{
+ [Throws]
+ void powerOff();
+ [Throws]
+ void reboot();
+ void factoryReset(optional FactoryResetReason reason = "normal");
+
+ /**
+ * The listeners are notified when a resource changes its lock state to:
+ * - unlocked
+ * - locked but not visible
+ * - locked and visible
+ */
+ void addWakeLockListener(MozWakeLockListener aListener);
+ void removeWakeLockListener(MozWakeLockListener aListener);
+
+ /**
+ * Query the wake lock state of the topic.
+ *
+ * Possible states are:
+ *
+ * - "unlocked" - nobody holds the wake lock.
+ *
+ * - "locked-foreground" - at least one window holds the wake lock,
+ * and it is visible.
+ *
+ * - "locked-background" - at least one window holds the wake lock,
+ * but all of them are hidden.
+ *
+ * @param aTopic The resource name related to the wake lock.
+ */
+ [Throws]
+ DOMString getWakeLockState(DOMString aTopic);
+
+ /**
+ * Is the device's screen currently enabled? This attribute controls the
+ * device's screen, so setting it to false will turn off the screen.
+ */
+ attribute boolean screenEnabled;
+
+ /**
+ * Is the device's keypad/button backlight enabled? Setting it to false will
+ * turn off the device's keypad/button backlight. And the brightness level
+ * is the same as |screenBrightness|.
+ */
+ attribute boolean keyLightEnabled;
+
+ /**
+ * How bright is the screen's backlight, on a scale from 0 (very dim) to 1
+ * (full brightness)? Setting this attribute modifies the screen's
+ * brightness.
+ *
+ * You can read and write this attribute even when the screen is disabled,
+ * but the backlight is off while the screen is disabled.
+ *
+ * If you write a value of X into this attribute, the attribute may not have
+ * the same value X when you later read it. Most screens don't support as
+ * many different brightness levels as there are doubles between 0 and 1, so
+ * we may reduce the value's precision before storing it.
+ *
+ * @throw NS_ERROR_INVALID_ARG if brightness is not in the range [0, 1].
+ */
+ [SetterThrows]
+ attribute double screenBrightness;
+
+ /**
+ * Is it possible that the device's CPU will sleep after the screen is
+ * disabled? Setting this attribute to false will prevent the device
+ * entering suspend state.
+ */
+ attribute boolean cpuSleepAllowed;
+};
diff --git a/dom/webidl/MozSelfSupport.webidl b/dom/webidl/MozSelfSupport.webidl
new file mode 100644
index 000000000..d13aa112c
--- /dev/null
+++ b/dom/webidl/MozSelfSupport.webidl
@@ -0,0 +1,77 @@
+/* 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/. */
+
+/**
+ * The MozSelfSupport interface allows external Mozilla support sites such as
+ * FHR and SUMO to access data and control settings that are not otherwise
+ * exposed to external content.
+ *
+ * At the moment, this is a ChromeOnly interface, but the plan is to allow
+ * specific Mozilla domains to access it directly.
+ */
+[ChromeOnly,
+ JSImplementation="@mozilla.org/mozselfsupport;1",
+ Constructor()]
+interface MozSelfSupport
+{
+ /**
+ * Controls whether uploading FHR data is allowed.
+ */
+ attribute boolean healthReportDataSubmissionEnabled;
+
+ /**
+ * Retrieve a list of the archived Telemetry pings.
+ * This contains objects with ping info, which are of the form:
+ * {
+ * type: <string>, // The pings type, e.g. "main", "environment-change", ...
+ * timestampCreated: <number>, // The time the ping was created (ms since unix epoch).
+ * id: <string>, // The pings UUID.
+ * }
+ *
+ * @return Promise<sequence<Object>>
+ * Resolved with the ping infos when the archived ping list has been built.
+ */
+ Promise<sequence<object>> getTelemetryPingList();
+
+ /**
+ * Retrieve an archived Telemetry ping by it's id.
+ * This will load the ping data async from the archive, possibly hitting the disk.
+ *
+ * @return Promise<Object>
+ * Resolved with the ping data, see the Telemetry "main" ping documentation for the format.
+ */
+ Promise<object> getTelemetryPing(DOMString pingID);
+
+ /**
+ * Get the current Telemetry environment - see the Telemetry documentation for details on the format.
+ *
+ * @return Promise<Object>
+ * Resolved with an object containing the Telemetry environment data.
+ */
+ Promise<object> getCurrentTelemetryEnvironment();
+
+ /**
+ * Get a Telemetry "main" ping containing the current session measurements.
+ *
+ * @return Promise<Object>
+ * Resolved with the ping data, see the Telemetry "main" ping documentation for the format.
+ */
+ Promise<object> getCurrentTelemetrySubsessionPing();
+
+ /**
+ * Resets a named pref:
+ * - if there is a default value, then change the value back to default,
+ * - if there's no default value, then delete the pref,
+ * - no-op otherwise.
+ *
+ * @param DOMString
+ * The name of the pref to reset.
+ */
+ void resetPref(DOMString name);
+
+ /**
+ * Resets original search engines, and resets the default one.
+ */
+ void resetSearchEngines();
+};
diff --git a/dom/webidl/MozSettingsEvent.webidl b/dom/webidl/MozSettingsEvent.webidl
new file mode 100644
index 000000000..6ca596a4c
--- /dev/null
+++ b/dom/webidl/MozSettingsEvent.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional MozSettingsEventInit eventInitDict),
+ ChromeOnly]
+interface MozSettingsEvent : Event
+{
+ readonly attribute DOMString? settingName;
+ readonly attribute any settingValue;
+};
+
+dictionary MozSettingsEventInit : EventInit
+{
+ DOMString settingName = "";
+ any settingValue = null;
+};
diff --git a/dom/webidl/MozSettingsTransactionEvent.webidl b/dom/webidl/MozSettingsTransactionEvent.webidl
new file mode 100644
index 000000000..95aa83f43
--- /dev/null
+++ b/dom/webidl/MozSettingsTransactionEvent.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional MozSettingsTransactionEventInit eventInitDict),
+ ChromeOnly]
+interface MozSettingsTransactionEvent : Event
+{
+ readonly attribute DOMString? error;
+};
+
+dictionary MozSettingsTransactionEventInit : EventInit
+{
+ DOMString error = "";
+};
diff --git a/dom/webidl/MozSpeakerManager.webidl b/dom/webidl/MozSpeakerManager.webidl
new file mode 100644
index 000000000..56ecf866f
--- /dev/null
+++ b/dom/webidl/MozSpeakerManager.webidl
@@ -0,0 +1,18 @@
+/* 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/.
+ */
+
+/*
+ * Allow application can control acoustic sound output through speaker.
+ * Reference https://wiki.mozilla.org/WebAPI/SpeakerManager
+ */
+[Constructor()]
+interface MozSpeakerManager : EventTarget {
+ /* query the speaker status */
+ readonly attribute boolean speakerforced;
+ /* force device device's acoustic sound output through speaker */
+ attribute boolean forcespeaker;
+ /* this event will be fired when device's speaker forced status change */
+ attribute EventHandler onspeakerforcedchange;
+};
diff --git a/dom/webidl/MozTetheringManager.webidl b/dom/webidl/MozTetheringManager.webidl
new file mode 100644
index 000000000..43d783734
--- /dev/null
+++ b/dom/webidl/MozTetheringManager.webidl
@@ -0,0 +1,57 @@
+/* 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/. */
+
+enum TetheringType {
+ "bluetooth",
+ "usb",
+ "wifi"
+};
+
+enum SecurityType {
+ "open",
+ "wpa-psk",
+ "wpa2-psk"
+};
+
+dictionary WifiTetheringConfig {
+ DOMString ssid;
+ SecurityType security;
+ DOMString key;
+};
+
+dictionary TetheringConfiguration {
+ DOMString ip;
+ DOMString prefix;
+ DOMString startIp;
+ DOMString endIp;
+ DOMString dns1;
+ DOMString dns2;
+ WifiTetheringConfig wifiConfig;
+};
+
+[JSImplementation="@mozilla.org/tetheringmanager;1",
+ NavigatorProperty="mozTetheringManager",
+ ChromeOnly]
+interface MozTetheringManager {
+ /**
+ * Enable/Disable tethering.
+ * @param enabled True to enable tethering, False to disable tethering.
+ * @param type Tethering type to enable/disable.
+ * @param config Configuration should have following fields when enable is True:
+ * - ip ip address.
+ * - prefix mask length.
+ * - startIp start ip address allocated by DHCP server for tethering.
+ * - endIp end ip address allocated by DHCP server for tethering.
+ * - dns1 first DNS server address.
+ * - dns2 second DNS server address.
+ * - wifiConfig wifi tethering configuration
+ * - ssid SSID network name.
+ * - security open, wpa-psk or wpa2-psk.
+ * - key password for wpa-psk or wpa2-psk.
+ * config should not be set when enabled is False.
+ */
+ Promise<any> setTetheringEnabled(boolean enabled,
+ TetheringType type,
+ optional TetheringConfiguration config);
+};
diff --git a/dom/webidl/MozTimeManager.webidl b/dom/webidl/MozTimeManager.webidl
new file mode 100644
index 000000000..0308835fb
--- /dev/null
+++ b/dom/webidl/MozTimeManager.webidl
@@ -0,0 +1,18 @@
+/* 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/. */
+
+[Func="mozilla::dom::time::TimeManager::PrefEnabled"]
+interface MozTimeManager {
+ /* Set the system time.
+ *
+ * The |time| argument can be either a Date object or a number.
+ *
+ * - If |time| is a number, it's interpreted as milliseconds
+ * since the epoch (midnight UTC on January 1, 1970).
+ * - If |time| is a Date object, |set(time)| is equivalent to
+ * |set(time.getTime())|.
+ */
+ void set(Date time);
+ void set(double time);
+};
diff --git a/dom/webidl/MozWakeLock.webidl b/dom/webidl/MozWakeLock.webidl
new file mode 100644
index 000000000..d5041ea04
--- /dev/null
+++ b/dom/webidl/MozWakeLock.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 et sw=2 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/. */
+
+[Pref="dom.wakelock.enabled", Func="Navigator::HasWakeLockSupport"]
+interface MozWakeLock
+{
+ readonly attribute DOMString topic;
+
+ /**
+ * Release the wake lock.
+ * @throw NS_ERROR_DOM_INVALID_STATE_ERR if already unlocked.
+ */
+ [Throws]
+ void unlock();
+};
diff --git a/dom/webidl/MozWifiCapabilities.webidl b/dom/webidl/MozWifiCapabilities.webidl
new file mode 100644
index 000000000..3acf5fd55
--- /dev/null
+++ b/dom/webidl/MozWifiCapabilities.webidl
@@ -0,0 +1,46 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 et sw=2 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/.
+ */
+
+/*
+ * The capabilities of Wifi. These are guaranteed not to change over the
+ * lifetime of that particular instance.
+ */
+enum WifiSecurityMethod {
+ "OPEN",
+ "WEP",
+ "WPA-PSK",
+ "WPA-EAP"
+};
+
+enum WifiWpaMethod {
+ "SIM",
+ "PEAP",
+ "TTLS",
+ "TLS"
+};
+
+enum WifiWpaPhase2Method {
+ "MSCHAPV2",
+ "GTC"
+};
+
+enum WifiWpaCertificate {
+ "SERVER",
+ "USER"
+};
+
+[JSImplementation="@mozilla.org/mozwificapabilities;1",
+ Func="Navigator::HasWifiManagerSupport"]
+interface MozWifiCapabilities {
+ [Constant, Cached] readonly attribute sequence<WifiSecurityMethod> security;
+ [Constant, Cached] readonly attribute sequence<WifiWpaMethod> eapMethod;
+ [Constant, Cached] readonly attribute sequence<WifiWpaPhase2Method> eapPhase2;
+ [Constant, Cached] readonly attribute sequence<WifiWpaCertificate> certificate;
+
+ jsonifier;
+};
+
diff --git a/dom/webidl/MozWifiConnectionInfoEvent.webidl b/dom/webidl/MozWifiConnectionInfoEvent.webidl
new file mode 100644
index 000000000..cfba1aa3e
--- /dev/null
+++ b/dom/webidl/MozWifiConnectionInfoEvent.webidl
@@ -0,0 +1,43 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional MozWifiConnectionInfoEventInit eventInitDict)]
+interface MozWifiConnectionInfoEvent : Event
+{
+ /**
+ * Network object with an SSID field.
+ */
+ readonly attribute any network;
+
+ /**
+ * Strength of the signal to network, in dBm between -55 and -100 dBm.
+ */
+ readonly attribute short signalStrength;
+
+ /**
+ * Relative signal strength between 0 and 100.
+ */
+ readonly attribute short relSignalStrength;
+
+ /**
+ * Link speed in Mb/s.
+ */
+ readonly attribute long linkSpeed;
+
+ /**
+ * IP address in the dotted quad format.
+ */
+ readonly attribute DOMString? ipAddress;
+};
+
+dictionary MozWifiConnectionInfoEventInit : EventInit
+{
+ any network = null;
+ short signalStrength = 0;
+ short relSignalStrength = 0;
+ long linkSpeed = 0;
+ DOMString ipAddress = "";
+};
diff --git a/dom/webidl/MozWifiManager.webidl b/dom/webidl/MozWifiManager.webidl
new file mode 100644
index 000000000..dd5aa5932
--- /dev/null
+++ b/dom/webidl/MozWifiManager.webidl
@@ -0,0 +1,347 @@
+/* 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/. */
+
+enum WifiWPSMethod {
+ "pbc",
+ "pin",
+ "cancel"
+};
+
+enum ConnectionStatus {
+ "connecting",
+ "authenticating",
+ "associated",
+ "connected",
+ "disconnected",
+ "wps-timedout",
+ "wps-failed",
+ "wps-overlapped",
+ "connectingfailed"
+};
+
+dictionary WifiWPSInfo {
+ WifiWPSMethod method;
+ DOMString? pin;
+ DOMString? bssid;
+};
+
+dictionary NetworkProperties {
+ DOMString ssid;
+ long mode;
+ long frequency;
+ sequence<DOMString>? security;
+ sequence<DOMString>? capabilities;
+ boolean known;
+ boolean connected;
+ boolean hidden;
+ DOMString bssid;
+ DOMString signalStrength;
+ long relSignalStrength;
+ DOMString psk;
+ DOMString wep;
+ DOMString wep_key0;
+ DOMString wep_key1;
+ DOMString wep_key2;
+ DOMString wep_key3;
+ long wep_tx_keyidx;
+ long priority;
+ long scan_ssid;
+ DOMString keyManagement;
+ DOMString identity;
+ DOMString password;
+ DOMString auth_alg;
+ DOMString phase1;
+ DOMString phase2;
+ DOMString eap;
+ DOMString pin;
+ boolean dontConnect;
+ DOMString serverCertificate;
+ DOMString subjectMatch;
+ DOMString userCertificate;
+};
+
+[Constructor(optional NetworkProperties properties),
+ JSImplementation="@mozilla.org/mozwifinetwork;1",
+ Func="Navigator::HasWifiManagerSupport"]
+interface MozWifiNetwork {
+ readonly attribute DOMString ssid;
+ readonly attribute long mode;
+ readonly attribute long frequency;
+ [Constant, Cached] readonly attribute sequence<DOMString>? security;
+ [Constant, Cached] readonly attribute sequence<DOMString>? capabilities;
+ readonly attribute boolean known;
+ readonly attribute boolean connected;
+ readonly attribute boolean hidden;
+
+ attribute DOMString? bssid;
+ attribute DOMString? signalStrength;
+ attribute long? relSignalStrength;
+ attribute DOMString? psk;
+ attribute DOMString? wep;
+ attribute DOMString? wep_key0;
+ attribute DOMString? wep_key1;
+ attribute DOMString? wep_key2;
+ attribute DOMString? wep_key3;
+ attribute long? wep_tx_keyidx;
+ attribute long? priority;
+ attribute long? scan_ssid;
+ attribute DOMString? keyManagement;
+ attribute DOMString? identity;
+ attribute DOMString? password;
+ attribute DOMString? auth_alg;
+ attribute DOMString? phase1;
+ attribute DOMString? phase2;
+ attribute DOMString? eap;
+ attribute DOMString? pin;
+ attribute boolean? dontConnect;
+ attribute DOMString? serverCertificate;
+ attribute DOMString? subjectMatch;
+ attribute DOMString? userCertificate;
+};
+
+[JSImplementation="@mozilla.org/mozwificonnection;1",
+ ChromeOnly]
+interface MozWifiConnection {
+ readonly attribute ConnectionStatus status;
+ readonly attribute MozWifiNetwork? network;
+};
+
+[JSImplementation="@mozilla.org/mozwificonnectioninfo;1",
+ ChromeOnly]
+interface MozWifiConnectionInfo {
+ readonly attribute short signalStrength;
+ readonly attribute short relSignalStrength;
+ readonly attribute long linkSpeed;
+ readonly attribute DOMString? ipAddress;
+};
+
+dictionary IPConfiguration {
+ boolean enabled;
+ DOMString ipaddr;
+ DOMString proxy;
+ short maskLength;
+ DOMString gateway;
+ DOMString dns1;
+ DOMString dns2;
+};
+
+[JSImplementation="@mozilla.org/wifimanager;1",
+ NavigatorProperty="mozWifiManager",
+ Func="Navigator::HasWifiManagerSupport",
+ UnsafeInPrerendering]
+interface MozWifiManager : EventTarget {
+ /**
+ * Turn on/off wifi functionality.
+ * @param enable true for enable, false for disable.
+ * onsuccess: Wifi enable/disable successfully, including no status change.
+ * onerror: Wifi enable/disable failed or prohibited.
+ */
+ DOMRequest setWifiEnabled(boolean enabled);
+
+ /**
+ * Returns the list of currently available networks.
+ * onsuccess: We have obtained the current list of networks. request.value
+ * is an object whose property names are SSIDs and values are
+ * network objects.
+ * onerror: We were unable to obtain a list of property names.
+ */
+ DOMRequest getNetworks();
+
+ /**
+ * Returns the list of networks known to the system that will be
+ * automatically connected to if they're in range.
+ * onsuccess: request.value is an object whose property names are
+ * SSIDs and values are network objects.
+ * onerror: We were unable to obtain a list of known networks.
+ */
+ DOMRequest getKnownNetworks();
+
+ /**
+ * Takes one of the networks returned from getNetworks and tries to
+ * connect to it.
+ * @param network A network object with information about the network,
+ * such as the SSID, key management desired, etc.
+ * onsuccess: We have started attempting to associate with the network.
+ * request.value is true.
+ * onerror: We were unable to select the network. This most likely means a
+ * configuration error.
+ */
+ DOMRequest associate(MozWifiNetwork network);
+
+ /**
+ * Given a network, removes it from the list of networks that we'll
+ * automatically connect to. In order to re-connect to the network, it is
+ * necessary to call associate on it.
+ * @param network A network object with the SSID of the network to remove.
+ * onsuccess: We have removed this network. If we were previously
+ * connected to it, we have started reconnecting to the next
+ * network in the list.
+ * onerror: We were unable to remove the network.
+ */
+ DOMRequest forget(MozWifiNetwork network);
+
+ /**
+ * Wi-Fi Protected Setup functionality.
+ * @param detail WPS detail which has 'method' and 'pin' field.
+ * The possible method field values are:
+ * - pbc: The Push Button Configuration.
+ * - pin: The PIN configuration.
+ * - cancel: Request to cancel WPS in progress.
+ * If method field is 'pin', 'pin' field can exist and has
+ * a PIN number.
+ * If method field is 'pin', 'bssid' field can exist and has
+ * a opposite BSSID.
+ * onsuccess: We have successfully started/canceled wps.
+ * onerror: We have failed to start/cancel wps.
+ */
+ DOMRequest wps(optional WifiWPSInfo detail);
+
+ /**
+ * Turn on/off wifi power saving mode.
+ * @param enabled true or false.
+ * onsuccess: We have successfully turn on/off wifi power saving mode.
+ * onerror: We have failed to turn on/off wifi power saving mode.
+ */
+ DOMRequest setPowerSavingMode(boolean enabled);
+
+ /**
+ * Given a network, configure using static IP instead of running DHCP
+ * @param network A network object with the SSID of the network to set static ip.
+ * @param info info should have following field:
+ * - enabled True to enable static IP, false to use DHCP
+ * - ipaddr configured static IP address
+ * - proxy configured proxy server address
+ * - maskLength configured mask length
+ * - gateway configured gateway address
+ * - dns1 configured first DNS server address
+ * - dns2 configured seconf DNS server address
+ * onsuccess: We have successfully configure the static ip mode.
+ * onerror: We have failed to configure the static ip mode.
+ */
+ DOMRequest setStaticIpMode(MozWifiNetwork network, optional IPConfiguration info);
+
+ /**
+ * Given a network, configure http proxy when using wifi.
+ * @param network A network object with the SSID of the network to set http proxy.
+ * @param info info should have following field:
+ * - httpProxyHost ip address of http proxy.
+ * - httpProxyPort port of http proxy, set 0 to use default port 8080.
+ * set info to null to clear http proxy.
+ * onsuccess: We have successfully configure http proxy.
+ * onerror: We have failed to configure http proxy.
+ */
+ DOMRequest setHttpProxy(MozWifiNetwork network, any info);
+
+ /**
+ * Import a certificate file, only support CA certificate now.
+ * @param certBlob A Blob object containing raw data of certificate to be imported.
+ * Supported format: binary/base64 encoded DER certificates.
+ * (.der/.crt/.cer/.pem)
+ * Cause error if importing certificates already imported.
+ * @param certPassword Password of certificate.
+ * @param certNickname User assigned nickname for imported certificate.
+ * Nickname must be unique, it causes error on redundant nickname.
+ * onsuccess: We have successfully imported certificate. request.result is an
+ * object, containing information of imported CA:
+ * {
+ * nickname: Nickname of imported CA, String.
+ * usage: Supported usage of imported CA, Array of String,
+ * includes: "ServerCert".
+ * }
+ * onerror: We have failed to import certificate.
+ */
+ DOMRequest importCert(Blob certBlob,
+ DOMString certPassword,
+ DOMString certNickname);
+
+ /**
+ * Get list of imported WIFI certificates.
+ * onsuccess: We have successfully gotten imported certificate list.
+ * request.result is an object using nickname as key, array of usage
+ * string as value.
+ * request.result[USAGE] = [CA_NICKNAME1, CA_NICKNAME2, ...]
+ * USAGE string includes: "ServerCert".
+ * onerror: We have failed to list certificate.
+ */
+ DOMRequest getImportedCerts();
+
+ /**
+ * Delete an imported certificate.
+ * @param certNickname Nickname of imported to be deleted.
+ * onsuccess: We have successfully deleted certificate.
+ * onerror: We have failed to delete certificate.
+ */
+ DOMRequest deleteCert(DOMString certNickname);
+
+ /**
+ * Returns whether or not wifi is currently enabled.
+ */
+ readonly attribute boolean enabled;
+
+ /**
+ * Returns the MAC address of the wifi adapter.
+ */
+ readonly attribute DOMString macAddress;
+
+ /**
+ * An non-null object containing the following information:
+ * - status ("disconnected", "connecting", "associated", "connected")
+ * - network
+ *
+ * Note that the object returned is read only. Any changes required must
+ * be done by calling other APIs.
+ */
+ readonly attribute MozWifiConnection connection;
+
+ /**
+ * A connectionInformation object with the same information found in an
+ * MozWifiConnectionInfoEvent (but without the network).
+ * If we are not currently connected to a network, this will be null.
+ */
+ readonly attribute MozWifiConnectionInfo? connectionInformation;
+
+ /**
+ * Capabilities of Wifi.
+ */
+ readonly attribute MozWifiCapabilities? capabilities;
+
+ /**
+ * State notification listeners. These all take an
+ * MozWifiStatusChangeEvent with the new status and a network (which may be
+ * null).
+ *
+ * The possible statuses are:
+ * - connecting: Fires when we start the process of connecting to a
+ * network.
+ * - associated: Fires when we have connected to an access point but do
+ * not yet have an IP address.
+ * - connected: Fires once we are fully connected to an access point and
+ * can access the internet.
+ * - disconnected: Fires when we either fail to connect to an access
+ * point (transition: associated -> disconnected) or
+ * when we were connected to a network but have
+ * disconnected for any reason (transition: connected ->
+ * disconnected).
+ */
+ attribute EventHandler onstatuschange;
+
+ /**
+ * An event listener that is called with information about the signal
+ * strength and link speed every 5 seconds.
+ */
+ attribute EventHandler onconnectioninfoupdate;
+
+ /**
+ * These two events fire when the wifi system is brought online or taken
+ * offline.
+ */
+ attribute EventHandler onenabled;
+ attribute EventHandler ondisabled;
+
+ /**
+ * An event listener that is called with information about the number
+ * of wifi stations connected to wifi hotspot every 5 seconds.
+ */
+ attribute EventHandler onstationinfoupdate;
+};
diff --git a/dom/webidl/MozWifiP2pManager.webidl b/dom/webidl/MozWifiP2pManager.webidl
new file mode 100644
index 000000000..58ac1f7be
--- /dev/null
+++ b/dom/webidl/MozWifiP2pManager.webidl
@@ -0,0 +1,147 @@
+/* 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/. */
+
+enum WPSMethod {
+ "pbc",
+ "keypad",
+ "display"
+};
+
+dictionary WPSInfo {
+ WPSMethod method;
+ DOMString pin;
+};
+
+[JSImplementation="@mozilla.org/wifip2pgroupowner;1",
+ Func="Navigator::HasWifiManagerSupport"]
+interface MozWifiP2pGroupOwner {
+ readonly attribute DOMString groupName;
+ readonly attribute DOMString macAddress;
+ readonly attribute DOMString ipAddress;
+ readonly attribute DOMString passphrase;
+ readonly attribute DOMString ssid;
+ readonly attribute any wpsCapabilities;
+ readonly attribute unsigned long freq;
+ readonly attribute boolean isLocal;
+};
+
+[JSImplementation="@mozilla.org/wifip2pmanager;1",
+ NavigatorProperty="mozWifiP2pManager",
+ Func="Navigator::HasWifiManagerSupport"]
+interface MozWifiP2pManager : EventTarget
+{
+ /**
+ * Enable/Disable wifi direct scan.
+ *
+ * onsuccess: Succeeded in starting/stopping wifi direct scan.
+ * onerror: Failed to start/stop wifi direct scan.
+ *
+ */
+ DOMRequest setScanEnabled(boolean enabled);
+
+ /**
+ * Connect to a peer with given configuration.
+ *
+ * @param address The peer MAC address we are going to connect.
+ * @param wpsMethod The WPS method we want to use.
+ * @param goIntent Number from 0 ~ 15 to indicate how much we want to be
+ * the group owner.
+ *
+ * onsuccess: Succeeded in issueing a 'connect' request. It doesn't mean we
+ * have connected to the peer.
+ *
+ * onerror: Failed to issue a 'connect' request, probably due to an
+ * invalid peer address, unsupported wps method or any
+ * preliminary error.
+ *
+ **/
+ DOMRequest connect(DOMString address, WPSMethod wpsMethod, optional byte goIntent);
+
+ /**
+ * Disconnect with a peer.
+ *
+ * @param address The mac address of the peer.
+ *
+ * onsuccess: Succeeded to issue a 'disconnect' request. It doesn't mean we
+ * have disconnected with the peer.
+ *
+ * onerror: Failed to issue a 'disconnect' request, probably due to the
+ * invalid peer address or any preliminary error.
+ *
+ */
+ DOMRequest disconnect(DOMString address);
+
+ /**
+ * Get peer list
+ *
+ * onsuccess: Command success, req.result contains an array of peer objects.
+ * onerror: Command failed.
+ *
+ * Peer object format:
+ * .address MAC address of the peer (string)
+ * .name the peer's device name (string)
+ * .isGroupOwner if the peer is the group owner (boolean)
+ * .wpsCapabilities array of the supported |WPSMethod|
+ * .connectionStatus one of { "disconnected", "connecting", "connected", "disconnecting" }
+ *
+ */
+ DOMRequest getPeerList();
+
+ /**
+ * Set pairing confirmation result.
+ *
+ * @param accepted Boolean to indicate whether we accepted the request or not.
+ * @param pin The user input pin number if the wps method is keypad.
+ *
+ * onsuccess: Command succeeded.
+ * onerror: Command failed.
+ *
+ */
+ DOMRequest setPairingConfirmation(boolean accepted, optional DOMString pin);
+
+ /**
+ * Set device name.
+ *
+ * @param devieName The new device name we are going to set.
+ *
+ * onsuccess: Command succeeded.
+ * onerror: Command failed.
+ *
+ */
+ DOMRequest setDeviceName(DOMString deviceName);
+
+ /**
+ * Returns if Wifi Direct is enabled.
+ *
+ */
+ readonly attribute boolean enabled;
+
+ /**
+ * The current group owner, null if none.
+ */
+ readonly attribute MozWifiP2pGroupOwner? groupOwner;
+
+ /**
+ * An event listener that is called whenever the Wifi Direct peer list is
+ * updated. Use getPeerList() to get the up-to-date peer list.
+ */
+ attribute EventHandler onpeerinfoupdate;
+
+ /**
+ * An event listener that is called whenever Wifi Direct status changed.
+ * The address of the changed peer will be stored in event.peerList.
+ * See MozWifiP2pStatusChangeEvent.webidl.
+ */
+ attribute EventHandler onstatuschange;
+
+ /**
+ * An event listener that is called whenever Wifi Direct is enabled.
+ */
+ attribute EventHandler onenabled;
+
+ /**
+ * An event listener that is called whenever Wifi Direct is disabled.
+ */
+ attribute EventHandler ondisabled;
+};
diff --git a/dom/webidl/MozWifiP2pStatusChangeEvent.webidl b/dom/webidl/MozWifiP2pStatusChangeEvent.webidl
new file mode 100644
index 000000000..be96e2786
--- /dev/null
+++ b/dom/webidl/MozWifiP2pStatusChangeEvent.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional MozWifiP2pStatusChangeEventInit eventInitDict),
+ Func="Navigator::HasWifiManagerSupport"]
+interface MozWifiP2pStatusChangeEvent : Event
+{
+ /**
+ * The mac address of the peer whose status has just changed.
+ */
+ readonly attribute DOMString peerAddress;
+};
+
+dictionary MozWifiP2pStatusChangeEventInit : EventInit
+{
+ DOMString peerAddress = "";
+};
diff --git a/dom/webidl/MozWifiStationInfoEvent.webidl b/dom/webidl/MozWifiStationInfoEvent.webidl
new file mode 100644
index 000000000..ff3f5ac6a
--- /dev/null
+++ b/dom/webidl/MozWifiStationInfoEvent.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional MozWifiStationInfoEventInit eventInitDict)]
+interface MozWifiStationInfoEvent : Event
+{
+ /**
+ * The number of wifi stations connected to wifi hotspot.
+ */
+ readonly attribute short station;
+};
+
+dictionary MozWifiStationInfoEventInit : EventInit
+{
+ short station = 0;
+};
diff --git a/dom/webidl/MozWifiStatusChangeEvent.webidl b/dom/webidl/MozWifiStatusChangeEvent.webidl
new file mode 100644
index 000000000..20d16e4d9
--- /dev/null
+++ b/dom/webidl/MozWifiStatusChangeEvent.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional MozWifiStatusChangeEventInit eventInitDict)]
+interface MozWifiStatusChangeEvent : Event
+{
+ /**
+ * Network object with a SSID field describing the network affected by
+ * this change. This might be null.
+ */
+ readonly attribute any network;
+
+ /**
+ * String describing the current status of the wifi manager. See above for
+ * the possible values.
+ */
+ readonly attribute DOMString? status;
+};
+
+dictionary MozWifiStatusChangeEventInit : EventInit
+{
+ any network = null;
+ DOMString status = "";
+};
diff --git a/dom/webidl/MutationEvent.webidl b/dom/webidl/MutationEvent.webidl
new file mode 100644
index 000000000..43c7b1cd0
--- /dev/null
+++ b/dom/webidl/MutationEvent.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+interface MutationEvent : Event
+{
+ const unsigned short MODIFICATION = 1;
+ const unsigned short ADDITION = 2;
+ const unsigned short REMOVAL = 3;
+
+ readonly attribute Node? relatedNode;
+ readonly attribute DOMString prevValue;
+ readonly attribute DOMString newValue;
+ readonly attribute DOMString attrName;
+ readonly attribute unsigned short attrChange;
+
+ [Throws]
+ void initMutationEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ Node? relatedNode,
+ DOMString prevValue,
+ DOMString newValue,
+ DOMString attrName,
+ unsigned short attrChange);
+};
diff --git a/dom/webidl/MutationObserver.webidl b/dom/webidl/MutationObserver.webidl
new file mode 100644
index 000000000..893e0cc50
--- /dev/null
+++ b/dom/webidl/MutationObserver.webidl
@@ -0,0 +1,74 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org
+ */
+
+[ProbablyShortLivingObject]
+interface MutationRecord {
+ [Constant]
+ readonly attribute DOMString type;
+ // .target is not nullable per the spec, but in order to prevent crashes,
+ // if there are GC/CC bugs in Gecko, we let the property to be null.
+ [Constant]
+ readonly attribute Node? target;
+ [Constant]
+ readonly attribute NodeList addedNodes;
+ [Constant]
+ readonly attribute NodeList removedNodes;
+ [Constant]
+ readonly attribute Node? previousSibling;
+ [Constant]
+ readonly attribute Node? nextSibling;
+ [Constant]
+ readonly attribute DOMString? attributeName;
+ [Constant]
+ readonly attribute DOMString? attributeNamespace;
+ [Constant]
+ readonly attribute DOMString? oldValue;
+ [Constant,Cached,ChromeOnly]
+ readonly attribute sequence<Animation> addedAnimations;
+ [Constant,Cached,ChromeOnly]
+ readonly attribute sequence<Animation> changedAnimations;
+ [Constant,Cached,ChromeOnly]
+ readonly attribute sequence<Animation> removedAnimations;
+};
+
+[Constructor(MutationCallback mutationCallback)]
+interface MutationObserver {
+ [Throws]
+ void observe(Node target, optional MutationObserverInit options);
+ void disconnect();
+ sequence<MutationRecord> takeRecords();
+
+ [ChromeOnly, Throws]
+ sequence<MutationObservingInfo?> getObservingInfo();
+ [ChromeOnly]
+ readonly attribute MutationCallback mutationCallback;
+ [ChromeOnly]
+ attribute boolean mergeAttributeRecords;
+};
+
+callback MutationCallback = void (sequence<MutationRecord> mutations, MutationObserver observer);
+
+dictionary MutationObserverInit {
+ boolean childList = false;
+ boolean attributes;
+ boolean characterData;
+ boolean subtree = false;
+ boolean attributeOldValue;
+ boolean characterDataOldValue;
+ [ChromeOnly]
+ boolean nativeAnonymousChildList = false;
+ [ChromeOnly]
+ boolean animations = false;
+ sequence<DOMString> attributeFilter;
+};
+
+dictionary MutationObservingInfo : MutationObserverInit
+{
+ Node? observedNode = null;
+};
diff --git a/dom/webidl/NamedNodeMap.webidl b/dom/webidl/NamedNodeMap.webidl
new file mode 100644
index 000000000..41fbfcbb4
--- /dev/null
+++ b/dom/webidl/NamedNodeMap.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[LegacyUnenumerableNamedProperties]
+interface NamedNodeMap {
+ getter Attr? getNamedItem(DOMString name);
+ [Throws, BinaryName="setNamedItemNS"]
+ Attr? setNamedItem(Attr arg);
+ [Throws]
+ Attr removeNamedItem(DOMString name);
+
+ getter Attr? item(unsigned long index);
+ readonly attribute unsigned long length;
+
+ Attr? getNamedItemNS(DOMString? namespaceURI, DOMString localName);
+ [Throws]
+ Attr? setNamedItemNS(Attr arg);
+ [Throws]
+ Attr removeNamedItemNS(DOMString? namespaceURI, DOMString localName);
+};
diff --git a/dom/webidl/NativeOSFileInternals.webidl b/dom/webidl/NativeOSFileInternals.webidl
new file mode 100644
index 000000000..36cc1a3a1
--- /dev/null
+++ b/dom/webidl/NativeOSFileInternals.webidl
@@ -0,0 +1,21 @@
+/* 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 obtaone at http://mozilla.org/MPL/2.0/. */
+
+/**
+ * Options for nsINativeOSFileInternals::Read
+ */
+dictionary NativeOSFileReadOptions
+{
+ /**
+ * If specified, convert the raw bytes to a String
+ * with the specified encoding. Otherwise, return
+ * the raw bytes as a TypedArray.
+ */
+ DOMString? encoding;
+
+ /**
+ * If specified, limit the number of bytes to read.
+ */
+ unsigned long long? bytes;
+};
diff --git a/dom/webidl/Navigator.webidl b/dom/webidl/Navigator.webidl
new file mode 100644
index 000000000..56461e429
--- /dev/null
+++ b/dom/webidl/Navigator.webidl
@@ -0,0 +1,368 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#the-navigator-object
+ * http://www.w3.org/TR/tracking-dnt/
+ * http://www.w3.org/TR/geolocation-API/#geolocation_interface
+ * http://www.w3.org/TR/battery-status/#navigatorbattery-interface
+ * http://www.w3.org/TR/vibration/#vibration-interface
+ * http://www.w3.org/2012/sysapps/runtime/#extension-to-the-navigator-interface-1
+ * https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension
+ * http://www.w3.org/TR/beacon/#sec-beacon-method
+ * https://html.spec.whatwg.org/#navigatorconcurrenthardware
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-navigator-object
+[HeaderFile="Navigator.h"]
+interface Navigator {
+ // objects implementing this interface also implement the interfaces given below
+};
+Navigator implements NavigatorID;
+Navigator implements NavigatorLanguage;
+Navigator implements NavigatorOnLine;
+Navigator implements NavigatorContentUtils;
+Navigator implements NavigatorStorageUtils;
+Navigator implements NavigatorConcurrentHardware;
+Navigator implements NavigatorStorage;
+
+[NoInterfaceObject, Exposed=(Window,Worker)]
+interface NavigatorID {
+ // WebKit/Blink/Trident/Presto support this (hardcoded "Mozilla").
+ [Constant, Cached]
+ readonly attribute DOMString appCodeName; // constant "Mozilla"
+ [Constant, Cached]
+ readonly attribute DOMString appName;
+ [Constant, Cached]
+ readonly attribute DOMString appVersion;
+ [Constant, Cached]
+ readonly attribute DOMString platform;
+ [Pure, Cached, Throws]
+ readonly attribute DOMString userAgent;
+ [Constant, Cached]
+ readonly attribute DOMString product; // constant "Gecko"
+
+ // Everyone but WebKit/Blink supports this. See bug 679971.
+ [Exposed=Window]
+ boolean taintEnabled(); // constant false
+};
+
+[NoInterfaceObject, Exposed=(Window,Worker)]
+interface NavigatorLanguage {
+
+ // These two attributes are cached because this interface is also implemented
+ // by Workernavigator and this way we don't have to go back to the
+ // main-thread from the worker thread anytime we need to retrieve them. They
+ // are updated when pref intl.accept_languages is changed.
+
+ [Pure, Cached]
+ readonly attribute DOMString? language;
+ [Pure, Cached, Frozen]
+ readonly attribute sequence<DOMString> languages;
+};
+
+[NoInterfaceObject, Exposed=(Window,Worker)]
+interface NavigatorOnLine {
+ readonly attribute boolean onLine;
+};
+
+[NoInterfaceObject]
+interface NavigatorContentUtils {
+ // content handler registration
+ [Throws]
+ void registerProtocolHandler(DOMString scheme, DOMString url, DOMString title);
+ [Throws]
+ void registerContentHandler(DOMString mimeType, DOMString url, DOMString title);
+ // NOT IMPLEMENTED
+ //DOMString isProtocolHandlerRegistered(DOMString scheme, DOMString url);
+ //DOMString isContentHandlerRegistered(DOMString mimeType, DOMString url);
+ //void unregisterProtocolHandler(DOMString scheme, DOMString url);
+ //void unregisterContentHandler(DOMString mimeType, DOMString url);
+};
+
+[NoInterfaceObject, Exposed=(Window,Worker)]
+interface NavigatorStorage {
+ [Func="mozilla::dom::StorageManager::PrefEnabled"]
+ readonly attribute StorageManager storage;
+};
+
+[NoInterfaceObject]
+interface NavigatorStorageUtils {
+ // NOT IMPLEMENTED
+ //void yieldForStorageUpdates();
+};
+
+partial interface Navigator {
+ [Throws]
+ readonly attribute Permissions permissions;
+};
+
+// Things that definitely need to be in the spec and and are not for some
+// reason. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=22406
+partial interface Navigator {
+ [Throws]
+ readonly attribute MimeTypeArray mimeTypes;
+ [Throws]
+ readonly attribute PluginArray plugins;
+};
+
+// http://www.w3.org/TR/tracking-dnt/ sort of
+partial interface Navigator {
+ readonly attribute DOMString doNotTrack;
+};
+
+// http://www.w3.org/TR/geolocation-API/#geolocation_interface
+[NoInterfaceObject]
+interface NavigatorGeolocation {
+ [Throws, Pref="geo.enabled"]
+ readonly attribute Geolocation geolocation;
+};
+Navigator implements NavigatorGeolocation;
+
+// http://www.w3.org/TR/battery-status/#navigatorbattery-interface
+partial interface Navigator {
+ // ChromeOnly to prevent web content from fingerprinting users' batteries.
+ [Throws, ChromeOnly, Pref="dom.battery.enabled"]
+ Promise<BatteryManager> getBattery();
+};
+
+partial interface Navigator {
+ [NewObject, Pref="dom.flyweb.enabled"]
+ Promise<FlyWebPublishedServer> publishServer(DOMString name,
+ optional FlyWebPublishOptions options);
+};
+
+// http://www.w3.org/TR/vibration/#vibration-interface
+partial interface Navigator {
+ // We don't support sequences in unions yet
+ //boolean vibrate ((unsigned long or sequence<unsigned long>) pattern);
+ boolean vibrate(unsigned long duration);
+ boolean vibrate(sequence<unsigned long> pattern);
+};
+
+// http://www.w3.org/TR/pointerevents/#extensions-to-the-navigator-interface
+partial interface Navigator {
+ [Pref="dom.w3c_pointer_events.enabled"]
+ readonly attribute long maxTouchPoints;
+};
+
+// Mozilla-specific extensions
+
+// Chrome-only interface for Vibration API permission handling.
+partial interface Navigator {
+ /* Set permission state to device vibration.
+ * @param permitted permission state (true for allowing vibration)
+ * @param persistent make the permission session-persistent
+ */
+ [ChromeOnly]
+ void setVibrationPermission(boolean permitted,
+ optional boolean persistent = true);
+};
+
+callback interface MozIdleObserver {
+ // Time is in seconds and is read only when idle observers are added
+ // and removed.
+ readonly attribute unsigned long time;
+ void onidle();
+ void onactive();
+};
+
+// nsIDOMNavigator
+partial interface Navigator {
+ [Throws, Constant, Cached]
+ readonly attribute DOMString oscpu;
+ // WebKit/Blink support this; Trident/Presto do not.
+ readonly attribute DOMString vendor;
+ // WebKit/Blink supports this (hardcoded ""); Trident/Presto do not.
+ readonly attribute DOMString vendorSub;
+ // WebKit/Blink supports this (hardcoded "20030107"); Trident/Presto don't
+ readonly attribute DOMString productSub;
+ // WebKit/Blink/Trident/Presto support this.
+ readonly attribute boolean cookieEnabled;
+ [Throws, Constant, Cached]
+ readonly attribute DOMString buildID;
+ [Throws, ChromeOnly, UnsafeInPrerendering]
+ readonly attribute MozPowerManager mozPower;
+
+ // WebKit/Blink/Trident/Presto support this.
+ [Throws]
+ boolean javaEnabled();
+
+ /**
+ * Navigator requests to add an idle observer to the existing window.
+ */
+ [Throws, ChromeOnly]
+ void addIdleObserver(MozIdleObserver aIdleObserver);
+
+ /**
+ * Navigator requests to remove an idle observer from the existing window.
+ */
+ [Throws, ChromeOnly]
+ void removeIdleObserver(MozIdleObserver aIdleObserver);
+
+ /**
+ * Request a wake lock for a resource.
+ *
+ * A page holds a wake lock to request that a resource not be turned
+ * off (or otherwise made unavailable).
+ *
+ * The topic is the name of a resource that might be made unavailable for
+ * various reasons. For example, on a mobile device the power manager might
+ * decide to turn off the screen after a period of idle time to save power.
+ *
+ * The resource manager checks the lock state of a topic before turning off
+ * the associated resource. For example, a page could hold a lock on the
+ * "screen" topic to prevent the screensaver from appearing or the screen
+ * from turning off.
+ *
+ * The resource manager defines what each topic means and sets policy. For
+ * example, the resource manager might decide to ignore 'screen' wake locks
+ * held by pages which are not visible.
+ *
+ * One topic can be locked multiple times; it is considered released only when
+ * all locks on the topic have been released.
+ *
+ * The returned MozWakeLock object is a token of the lock. You can
+ * unlock the lock via the object's |unlock| method. The lock is released
+ * automatically when its associated window is unloaded.
+ *
+ * @param aTopic resource name
+ */
+ [Throws, Pref="dom.wakelock.enabled", Func="Navigator::HasWakeLockSupport", UnsafeInPrerendering]
+ MozWakeLock requestWakeLock(DOMString aTopic);
+
+ /**
+ * Make CPU instruction subset information available for UpdateUtils.
+ */
+ [ChromeOnly]
+ readonly attribute boolean cpuHasSSE2;
+};
+
+// nsIDOMNavigatorDesktopNotification
+partial interface Navigator {
+ [Throws, Pref="notification.feature.enabled", UnsafeInPrerendering]
+ readonly attribute DesktopNotificationCenter mozNotification;
+};
+
+// NetworkInformation
+partial interface Navigator {
+ [Throws, Pref="dom.netinfo.enabled"]
+ readonly attribute NetworkInformation connection;
+};
+
+#ifdef MOZ_GAMEPAD
+// https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension
+partial interface Navigator {
+ [Throws, Pref="dom.gamepad.enabled"]
+ sequence<Gamepad?> getGamepads();
+};
+partial interface Navigator {
+ [Pref="dom.gamepad.test.enabled"]
+ GamepadServiceTest requestGamepadServiceTest();
+};
+#endif // MOZ_GAMEPAD
+
+partial interface Navigator {
+ [Throws, Pref="dom.vr.enabled"]
+ Promise<sequence<VRDisplay>> getVRDisplays();
+ // TODO: Use FrozenArray once available. (Bug 1236777)
+ [Frozen, Cached, Pure, Pref="dom.vr.enabled"]
+ readonly attribute sequence<VRDisplay> activeVRDisplays;
+};
+
+#ifdef MOZ_TIME_MANAGER
+// nsIDOMMozNavigatorTime
+partial interface Navigator {
+ [Throws, ChromeOnly, UnsafeInPrerendering]
+ readonly attribute MozTimeManager mozTime;
+};
+#endif // MOZ_TIME_MANAGER
+
+#ifdef MOZ_AUDIO_CHANNEL_MANAGER
+// nsIMozNavigatorAudioChannelManager
+partial interface Navigator {
+ [Throws]
+ readonly attribute AudioChannelManager mozAudioChannelManager;
+};
+#endif // MOZ_AUDIO_CHANNEL_MANAGER
+
+callback NavigatorUserMediaSuccessCallback = void (MediaStream stream);
+callback NavigatorUserMediaErrorCallback = void (MediaStreamError error);
+
+partial interface Navigator {
+ [Throws, Func="Navigator::HasUserMediaSupport"]
+ readonly attribute MediaDevices mediaDevices;
+
+ // Deprecated. Use mediaDevices.getUserMedia instead.
+ [Deprecated="NavigatorGetUserMedia", Throws,
+ Func="Navigator::HasUserMediaSupport", UnsafeInPrerendering]
+ void mozGetUserMedia(MediaStreamConstraints constraints,
+ NavigatorUserMediaSuccessCallback successCallback,
+ NavigatorUserMediaErrorCallback errorCallback);
+};
+
+// nsINavigatorUserMedia
+callback MozGetUserMediaDevicesSuccessCallback = void (nsIVariant? devices);
+partial interface Navigator {
+ [Throws, ChromeOnly]
+ void mozGetUserMediaDevices(MediaStreamConstraints constraints,
+ MozGetUserMediaDevicesSuccessCallback onsuccess,
+ NavigatorUserMediaErrorCallback onerror,
+ // The originating innerWindowID is needed to
+ // avoid calling the callbacks if the window has
+ // navigated away. It is optional only as legacy.
+ optional unsigned long long innerWindowID = 0,
+ // The callID is needed in case of multiple
+ // concurrent requests to find the right one.
+ // It is optional only as legacy.
+ // TODO: Rewrite to not need this method anymore,
+ // now that devices are enumerated earlier.
+ optional DOMString callID = "");
+};
+
+// Service Workers/Navigation Controllers
+partial interface Navigator {
+ [Func="ServiceWorkerContainer::IsEnabled", SameObject]
+ readonly attribute ServiceWorkerContainer serviceWorker;
+};
+
+partial interface Navigator {
+ [Throws, Pref="beacon.enabled"]
+ boolean sendBeacon(DOMString url,
+ optional (ArrayBufferView or Blob or DOMString or FormData)? data = null);
+};
+
+partial interface Navigator {
+ [Throws, Pref="dom.presentation.enabled", SameObject]
+ readonly attribute Presentation? presentation;
+};
+
+partial interface Navigator {
+ [NewObject, Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist"]
+ readonly attribute LegacyMozTCPSocket mozTCPSocket;
+};
+
+partial interface Navigator {
+ [Pref="media.eme.apiVisible", NewObject]
+ Promise<MediaKeySystemAccess>
+ requestMediaKeySystemAccess(DOMString keySystem,
+ sequence<MediaKeySystemConfiguration> supportedConfigurations);
+};
+
+#ifdef NIGHTLY_BUILD
+partial interface Navigator {
+ [Func="Navigator::IsE10sEnabled"]
+ readonly attribute boolean mozE10sEnabled;
+};
+#endif
+
+[NoInterfaceObject, Exposed=(Window,Worker)]
+interface NavigatorConcurrentHardware {
+ readonly attribute unsigned long long hardwareConcurrency;
+};
diff --git a/dom/webidl/NetDashboard.webidl b/dom/webidl/NetDashboard.webidl
new file mode 100644
index 000000000..12bbb01f0
--- /dev/null
+++ b/dom/webidl/NetDashboard.webidl
@@ -0,0 +1,77 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+dictionary SocketElement {
+ DOMString host = "";
+ unsigned long port = 0;
+ boolean active = false;
+ boolean tcp = false;
+ double sent = 0;
+ double received = 0;
+};
+
+dictionary SocketsDict {
+ sequence<SocketElement> sockets;
+ double sent = 0;
+ double received = 0;
+};
+
+dictionary HttpConnInfo {
+ unsigned long rtt = 0;
+ unsigned long ttl = 0;
+ DOMString protocolVersion = "";
+};
+
+dictionary HalfOpenInfoDict {
+ boolean speculative = false;
+};
+
+dictionary HttpConnectionElement {
+ DOMString host = "";
+ unsigned long port = 0;
+ boolean spdy = false;
+ boolean ssl = false;
+ sequence<HttpConnInfo> active;
+ sequence<HttpConnInfo> idle;
+ sequence<HalfOpenInfoDict> halfOpens;
+};
+
+dictionary HttpConnDict {
+ sequence<HttpConnectionElement> connections;
+};
+
+dictionary WebSocketElement {
+ DOMString hostport = "";
+ unsigned long msgsent = 0;
+ unsigned long msgreceived = 0;
+ double sentsize = 0;
+ double receivedsize = 0;
+ boolean encrypted = false;
+};
+
+dictionary WebSocketDict {
+ sequence<WebSocketElement> websockets;
+};
+
+dictionary DnsCacheEntry {
+ DOMString hostname = "";
+ sequence<DOMString> hostaddr;
+ DOMString family = "";
+ double expiration = 0;
+};
+
+dictionary DNSCacheDict {
+ sequence<DnsCacheEntry> entries;
+};
+
+dictionary DNSLookupDict {
+ sequence<DOMString> address;
+ DOMString error = "";
+ boolean answer = false;
+};
+
+dictionary ConnStatusDict {
+ DOMString status = "";
+};
diff --git a/dom/webidl/NetworkInformation.webidl b/dom/webidl/NetworkInformation.webidl
new file mode 100644
index 000000000..3ad203af6
--- /dev/null
+++ b/dom/webidl/NetworkInformation.webidl
@@ -0,0 +1,25 @@
+/* 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/.
+ *
+ * The origin of this IDL file is https://w3c.github.io/netinfo/
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum ConnectionType {
+ "cellular",
+ "bluetooth",
+ "ethernet",
+ "wifi",
+ "other",
+ "none",
+ "unknown"
+};
+
+[Pref="dom.netinfo.enabled"]
+interface NetworkInformation : EventTarget {
+ readonly attribute ConnectionType type;
+ attribute EventHandler ontypechange;
+};
diff --git a/dom/webidl/NetworkOptions.webidl b/dom/webidl/NetworkOptions.webidl
new file mode 100644
index 000000000..b313c932d
--- /dev/null
+++ b/dom/webidl/NetworkOptions.webidl
@@ -0,0 +1,109 @@
+/* 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/. */
+
+/**
+* This dictionary holds the parameters sent to the network worker.
+*/
+dictionary NetworkCommandOptions
+{
+ long id = 0; // opaque id.
+ DOMString cmd = ""; // the command name.
+ DOMString ifname; // for "removeNetworkRoute", "setDNS",
+ // "setDefaultRouteAndDNS", "removeDefaultRoute"
+ // "addHostRoute", "removeHostRoute"
+ // "removeHostRoutes".
+ DOMString ip; // for "removeNetworkRoute", "setWifiTethering".
+ unsigned long prefixLength; // for "removeNetworkRoute".
+ DOMString domain; // for "setDNS"
+ sequence<DOMString> dnses; // for "setDNS", "setDefaultRouteAndDNS".
+ DOMString gateway; // for "addSecondaryRoute", "removeSecondaryRoute".
+ sequence<DOMString> gateways; // for "setDefaultRouteAndDNS", "removeDefaultRoute".
+ DOMString mode; // for "setWifiOperationMode".
+ boolean report; // for "setWifiOperationMode".
+ boolean enabled; // for "setDhcpServer".
+ DOMString wifictrlinterfacename; // for "setWifiTethering".
+ DOMString internalIfname; // for "setWifiTethering".
+ DOMString externalIfname; // for "setWifiTethering".
+ boolean enable; // for "setWifiTethering".
+ DOMString ssid; // for "setWifiTethering".
+ DOMString security; // for "setWifiTethering".
+ DOMString key; // for "setWifiTethering".
+ DOMString prefix; // for "setWifiTethering", "setDhcpServer".
+ DOMString link; // for "setWifiTethering", "setDhcpServer".
+ sequence<DOMString> interfaceList; // for "setWifiTethering".
+ DOMString wifiStartIp; // for "setWifiTethering".
+ DOMString wifiEndIp; // for "setWifiTethering".
+ DOMString usbStartIp; // for "setWifiTethering".
+ DOMString usbEndIp; // for "setWifiTethering".
+ DOMString dns1; // for "setWifiTethering".
+ DOMString dns2; // for "setWifiTethering".
+ long long threshold; // for "setNetworkInterfaceAlarm",
+ // "enableNetworkInterfaceAlarm".
+ DOMString startIp; // for "setDhcpServer".
+ DOMString endIp; // for "setDhcpServer".
+ DOMString serverIp; // for "setDhcpServer".
+ DOMString maskLength; // for "setDhcpServer".
+ DOMString preInternalIfname; // for "updateUpStream".
+ DOMString preExternalIfname; // for "updateUpStream".
+ DOMString curInternalIfname; // for "updateUpStream".
+ DOMString curExternalIfname; // for "updateUpStream".
+
+ long ipaddr; // for "ifc_configure".
+ long mask; // for "ifc_configure".
+ long gateway_long; // for "ifc_configure".
+ long dns1_long; // for "ifc_configure".
+ long dns2_long; // for "ifc_configure".
+
+ long mtu; // for "setMtu".
+};
+
+/**
+* This dictionary holds the parameters sent back to NetworkService.js.
+*/
+dictionary NetworkResultOptions
+{
+ long id = 0; // opaque id.
+ boolean ret = false; // for sync command.
+ boolean broadcast = false; // for netd broadcast message.
+ DOMString topic = ""; // for netd broadcast message.
+ DOMString reason = ""; // for netd broadcast message.
+
+ long resultCode = 0; // for all commands.
+ DOMString resultReason = ""; // for all commands.
+ boolean error = false; // for all commands.
+
+ boolean enable = false; // for "setWifiTethering", "setUSBTethering"
+ // "enableUsbRndis".
+ boolean result = false; // for "enableUsbRndis".
+ boolean success = false; // for "setDhcpServer".
+ DOMString curExternalIfname = ""; // for "updateUpStream".
+ DOMString curInternalIfname = ""; // for "updateUpStream".
+
+ DOMString reply = ""; // for "command".
+ DOMString route = ""; // for "ifc_get_default_route".
+ DOMString ipaddr_str = ""; // The following are for the result of
+ // dhcp_do_request.
+ DOMString gateway_str = "";
+ DOMString dns1_str = "";
+ DOMString dns2_str = "";
+ DOMString mask_str = "";
+ DOMString server_str = "";
+ DOMString vendor_str = "";
+ long lease = 0;
+ long prefixLength = 0;
+ long mask = 0;
+ long ipaddr = 0;
+ long gateway = 0;
+ long dns1 = 0;
+ long dns2 = 0;
+ long server = 0;
+
+ DOMString netId = ""; // for "getNetId".
+
+ sequence<DOMString> interfaceList; // for "getInterfaceList".
+
+ DOMString flag = "down"; // for "getInterfaceConfig".
+ DOMString macAddr = ""; // for "getInterfaceConfig".
+ DOMString ipAddr = ""; // for "getInterfaceConfig".
+};
diff --git a/dom/webidl/Node.webidl b/dom/webidl/Node.webidl
new file mode 100644
index 000000000..7d18899b0
--- /dev/null
+++ b/dom/webidl/Node.webidl
@@ -0,0 +1,115 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface Principal;
+interface URI;
+
+interface Node : EventTarget {
+ const unsigned short ELEMENT_NODE = 1;
+ const unsigned short ATTRIBUTE_NODE = 2; // historical
+ const unsigned short TEXT_NODE = 3;
+ const unsigned short CDATA_SECTION_NODE = 4; // historical
+ const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
+ const unsigned short ENTITY_NODE = 6; // historical
+ const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
+ const unsigned short COMMENT_NODE = 8;
+ const unsigned short DOCUMENT_NODE = 9;
+ const unsigned short DOCUMENT_TYPE_NODE = 10;
+ const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
+ const unsigned short NOTATION_NODE = 12; // historical
+ [Constant]
+ readonly attribute unsigned short nodeType;
+ [Pure]
+ readonly attribute DOMString nodeName;
+
+ [Pure, Throws]
+ readonly attribute DOMString? baseURI;
+
+ [Pure, BinaryName=getComposedDoc]
+ readonly attribute boolean isConnected;
+ [Pure]
+ readonly attribute Document? ownerDocument;
+ [Pure, Pref="dom.node.rootNode.enabled"]
+ readonly attribute Node rootNode;
+ [Pure]
+ readonly attribute Node? parentNode;
+ [Pure]
+ readonly attribute Element? parentElement;
+ [Pure]
+ boolean hasChildNodes();
+ [SameObject]
+ readonly attribute NodeList childNodes;
+ [Pure]
+ readonly attribute Node? firstChild;
+ [Pure]
+ readonly attribute Node? lastChild;
+ [Pure]
+ readonly attribute Node? previousSibling;
+ [Pure]
+ readonly attribute Node? nextSibling;
+
+ [SetterThrows, Pure]
+ attribute DOMString? nodeValue;
+ [Throws, Pure]
+ attribute DOMString? textContent;
+ [Throws]
+ Node insertBefore(Node node, Node? child);
+ [Throws]
+ Node appendChild(Node node);
+ [Throws]
+ Node replaceChild(Node node, Node child);
+ [Throws]
+ Node removeChild(Node child);
+ void normalize();
+
+ [Throws]
+ Node cloneNode(optional boolean deep = false);
+ [Pure]
+ boolean isSameNode(Node? node);
+ [Pure]
+ boolean isEqualNode(Node? node);
+
+ const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
+ const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
+ const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
+ const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
+ const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
+ const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; // historical
+ [Pure]
+ unsigned short compareDocumentPosition(Node other);
+ [Pure]
+ boolean contains(Node? other);
+
+ [Pure]
+ DOMString? lookupPrefix(DOMString? namespace);
+ [Pure]
+ DOMString? lookupNamespaceURI(DOMString? prefix);
+ [Pure]
+ boolean isDefaultNamespace(DOMString? namespace);
+
+ // Mozilla-specific stuff
+ [Throws, Func="IsChromeOrXBL"]
+ any setUserData(DOMString key, any data);
+ [Throws, Func="IsChromeOrXBL"]
+ any getUserData(DOMString key);
+ [ChromeOnly]
+ readonly attribute Principal nodePrincipal;
+ [ChromeOnly]
+ readonly attribute URI? baseURIObject;
+ [ChromeOnly]
+ sequence<MutationObserver> getBoundMutationObservers();
+
+#ifdef ACCESSIBILITY
+ [Pref="accessibility.AOM.enabled"]
+ readonly attribute AccessibleNode? accessibleNode;
+#endif
+};
diff --git a/dom/webidl/NodeFilter.webidl b/dom/webidl/NodeFilter.webidl
new file mode 100644
index 000000000..6da959dc9
--- /dev/null
+++ b/dom/webidl/NodeFilter.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#interface-nodefilter
+ */
+
+callback interface NodeFilter {
+ // Constants for acceptNode()
+ const unsigned short FILTER_ACCEPT = 1;
+ const unsigned short FILTER_REJECT = 2;
+ const unsigned short FILTER_SKIP = 3;
+
+ // Constants for whatToShow
+ const unsigned long SHOW_ALL = 0xFFFFFFFF;
+ const unsigned long SHOW_ELEMENT = 0x1;
+ const unsigned long SHOW_ATTRIBUTE = 0x2; // historical
+ const unsigned long SHOW_TEXT = 0x4;
+ const unsigned long SHOW_CDATA_SECTION = 0x8; // historical
+ const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical
+ const unsigned long SHOW_ENTITY = 0x20; // historical
+ const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
+ const unsigned long SHOW_COMMENT = 0x80;
+ const unsigned long SHOW_DOCUMENT = 0x100;
+ const unsigned long SHOW_DOCUMENT_TYPE = 0x200;
+ const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400;
+ const unsigned long SHOW_NOTATION = 0x800; // historical
+
+ unsigned short acceptNode(Node node);
+};
diff --git a/dom/webidl/NodeIterator.webidl b/dom/webidl/NodeIterator.webidl
new file mode 100644
index 000000000..201b382a0
--- /dev/null
+++ b/dom/webidl/NodeIterator.webidl
@@ -0,0 +1,31 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface NodeIterator {
+ [Constant]
+ readonly attribute Node root;
+ [Pure]
+ readonly attribute Node? referenceNode;
+ [Pure]
+ readonly attribute boolean pointerBeforeReferenceNode;
+ [Constant]
+ readonly attribute unsigned long whatToShow;
+ [Constant]
+ readonly attribute NodeFilter? filter;
+
+ [Throws]
+ Node? nextNode();
+ [Throws]
+ Node? previousNode();
+
+ void detach();
+};
diff --git a/dom/webidl/NodeList.webidl b/dom/webidl/NodeList.webidl
new file mode 100644
index 000000000..d6c981e11
--- /dev/null
+++ b/dom/webidl/NodeList.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface NodeList {
+ getter Node? item(unsigned long index);
+ readonly attribute unsigned long length;
+ iterable<Node?>;
+};
diff --git a/dom/webidl/Notification.webidl b/dom/webidl/Notification.webidl
new file mode 100644
index 000000000..7a55a52ae
--- /dev/null
+++ b/dom/webidl/Notification.webidl
@@ -0,0 +1,105 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://notifications.spec.whatwg.org/
+ *
+ * Copyright:
+ * To the extent possible under law, the editors have waived all copyright and
+ * related or neighboring rights to this work.
+ */
+
+[Constructor(DOMString title, optional NotificationOptions options),
+ Exposed=(Window,Worker),
+ Func="mozilla::dom::Notification::PrefEnabled",
+ UnsafeInPrerendering]
+interface Notification : EventTarget {
+ [GetterThrows]
+ static readonly attribute NotificationPermission permission;
+
+ [Throws, Func="mozilla::dom::Notification::RequestPermissionEnabledForScope"]
+ static Promise<NotificationPermission> requestPermission(optional NotificationPermissionCallback permissionCallback);
+
+ [Throws, Func="mozilla::dom::Notification::IsGetEnabled"]
+ static Promise<sequence<Notification>> get(optional GetNotificationOptions filter);
+
+ attribute EventHandler onclick;
+
+ attribute EventHandler onshow;
+
+ attribute EventHandler onerror;
+
+ attribute EventHandler onclose;
+
+ [Pure]
+ readonly attribute DOMString title;
+
+ [Pure]
+ readonly attribute NotificationDirection dir;
+
+ [Pure]
+ readonly attribute DOMString? lang;
+
+ [Pure]
+ readonly attribute DOMString? body;
+
+ [Constant]
+ readonly attribute DOMString? tag;
+
+ [Pure]
+ readonly attribute DOMString? icon;
+
+ [Constant, Func="mozilla::dom::Notification::RequireInteractionEnabled"]
+ readonly attribute boolean requireInteraction;
+
+ [Constant]
+ readonly attribute any data;
+
+ void close();
+};
+
+dictionary NotificationOptions {
+ NotificationDirection dir = "auto";
+ DOMString lang = "";
+ DOMString body = "";
+ DOMString tag = "";
+ DOMString icon = "";
+ boolean requireInteraction = false;
+ any data = null;
+ NotificationBehavior mozbehavior = null;
+};
+
+dictionary GetNotificationOptions {
+ DOMString tag = "";
+};
+
+dictionary NotificationBehavior {
+ boolean noscreen = false;
+ boolean noclear = false;
+ boolean showOnlyOnce = false;
+ DOMString soundFile = "";
+ sequence<unsigned long> vibrationPattern;
+};
+
+enum NotificationPermission {
+ "default",
+ "denied",
+ "granted"
+};
+
+callback NotificationPermissionCallback = void (NotificationPermission permission);
+
+enum NotificationDirection {
+ "auto",
+ "ltr",
+ "rtl"
+};
+
+partial interface ServiceWorkerRegistration {
+ [Throws, Func="mozilla::dom::ServiceWorkerRegistration::NotificationAPIVisible"]
+ Promise<void> showNotification(DOMString title, optional NotificationOptions options);
+ [Throws, Func="mozilla::dom::ServiceWorkerRegistration::NotificationAPIVisible"]
+ Promise<sequence<Notification>> getNotifications(optional GetNotificationOptions filter);
+};
diff --git a/dom/webidl/NotificationEvent.webidl b/dom/webidl/NotificationEvent.webidl
new file mode 100644
index 000000000..3f25cf1b8
--- /dev/null
+++ b/dom/webidl/NotificationEvent.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://notifications.spec.whatwg.org/
+ *
+ * Copyright:
+ * To the extent possible under law, the editors have waived all copyright and
+ * related or neighboring rights to this work.
+ */
+
+[Constructor(DOMString type, NotificationEventInit eventInitDict),
+ Exposed=ServiceWorker,Func="mozilla::dom::Notification::PrefEnabled"]
+interface NotificationEvent : ExtendableEvent {
+ readonly attribute Notification notification;
+};
+
+dictionary NotificationEventInit : ExtendableEventInit {
+ required Notification notification;
+};
+
+partial interface ServiceWorkerGlobalScope {
+ attribute EventHandler onnotificationclick;
+ attribute EventHandler onnotificationclose;
+};
diff --git a/dom/webidl/NotifyPaintEvent.webidl b/dom/webidl/NotifyPaintEvent.webidl
new file mode 100644
index 000000000..799abbb29
--- /dev/null
+++ b/dom/webidl/NotifyPaintEvent.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information about this interface see nsIDOMNotifyPaintEvent.idl
+ */
+
+interface NotifyPaintEvent : Event
+{
+ readonly attribute DOMRectList clientRects;
+
+ readonly attribute DOMRect boundingClientRect;
+
+ readonly attribute PaintRequestList paintRequests;
+
+ readonly attribute unsigned long long transactionId;
+};
diff --git a/dom/webidl/OfflineAudioCompletionEvent.webidl b/dom/webidl/OfflineAudioCompletionEvent.webidl
new file mode 100644
index 000000000..0203bfa10
--- /dev/null
+++ b/dom/webidl/OfflineAudioCompletionEvent.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface OfflineAudioCompletionEvent : Event {
+
+ readonly attribute AudioBuffer renderedBuffer;
+
+};
+
diff --git a/dom/webidl/OfflineAudioContext.webidl b/dom/webidl/OfflineAudioContext.webidl
new file mode 100644
index 000000000..51dc683f7
--- /dev/null
+++ b/dom/webidl/OfflineAudioContext.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(unsigned long numberOfChannels, unsigned long length, float sampleRate),
+Pref="dom.webaudio.enabled"]
+interface OfflineAudioContext : AudioContext {
+
+ [Throws]
+ Promise<AudioBuffer> startRendering();
+
+ attribute EventHandler oncomplete;
+ readonly attribute unsigned long length;
+
+};
diff --git a/dom/webidl/OfflineResourceList.webidl b/dom/webidl/OfflineResourceList.webidl
new file mode 100644
index 000000000..abc511888
--- /dev/null
+++ b/dom/webidl/OfflineResourceList.webidl
@@ -0,0 +1,116 @@
+/* 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/. */
+
+interface OfflineResourceList : EventTarget {
+ /**
+ * State of the application cache this object is associated with.
+ */
+
+ /* This object is not associated with an application cache. */
+ const unsigned short UNCACHED = 0;
+
+ /* The application cache is not being updated. */
+ const unsigned short IDLE = 1;
+
+ /* The manifest is being fetched and checked for updates */
+ const unsigned short CHECKING = 2;
+
+ /* Resources are being downloaded to be added to the cache */
+ const unsigned short DOWNLOADING = 3;
+
+ /* There is a new version of the application cache available */
+ const unsigned short UPDATEREADY = 4;
+
+ /* The application cache group is now obsolete. */
+ const unsigned short OBSOLETE = 5;
+
+ [Throws, UseCounter]
+ readonly attribute unsigned short status;
+
+ /**
+ * Begin the application update process on the associated application cache.
+ */
+ [Throws, UseCounter]
+ void update();
+
+ /**
+ * Swap in the newest version of the application cache, or disassociate
+ * from the cache if the cache group is obsolete.
+ */
+ [Throws, UseCounter]
+ void swapCache();
+
+ /* Events */
+ [UseCounter]
+ attribute EventHandler onchecking;
+ [UseCounter]
+ attribute EventHandler onerror;
+ [UseCounter]
+ attribute EventHandler onnoupdate;
+ [UseCounter]
+ attribute EventHandler ondownloading;
+ [UseCounter]
+ attribute EventHandler onprogress;
+ [UseCounter]
+ attribute EventHandler onupdateready;
+ [UseCounter]
+ attribute EventHandler oncached;
+ [UseCounter]
+ attribute EventHandler onobsolete;
+};
+
+// Mozilla extensions.
+partial interface OfflineResourceList {
+ /**
+ * Get the list of dynamically-managed entries.
+ */
+ [Throws]
+ readonly attribute DOMStringList mozItems;
+
+ /**
+ * Check that an entry exists in the list of dynamically-managed entries.
+ *
+ * @param uri
+ * The resource to check.
+ */
+ [Throws]
+ boolean mozHasItem(DOMString uri);
+
+ /**
+ * Get the number of dynamically-managed entries.
+ * @status DEPRECATED
+ * Clients should use the "items" attribute.
+ */
+ [Throws]
+ readonly attribute unsigned long mozLength;
+
+ /**
+ * Get the URI of a dynamically-managed entry.
+ * @status DEPRECATED
+ * Clients should use the "items" attribute.
+ */
+ [Throws]
+ getter DOMString mozItem(unsigned long index);
+
+ /**
+ * Add an item to the list of dynamically-managed entries. The resource
+ * will be fetched into the application cache.
+ *
+ * @param uri
+ * The resource to add.
+ */
+ [Throws]
+ void mozAdd(DOMString uri);
+
+ /**
+ * Remove an item from the list of dynamically-managed entries. If this
+ * was the last reference to a URI in the application cache, the cache
+ * entry will be removed.
+ *
+ * @param uri
+ * The resource to remove.
+ */
+ [Throws]
+ void mozRemove(DOMString uri);
+};
diff --git a/dom/webidl/OffscreenCanvas.webidl b/dom/webidl/OffscreenCanvas.webidl
new file mode 100644
index 000000000..ffe2b9147
--- /dev/null
+++ b/dom/webidl/OffscreenCanvas.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface, please see
+ * https://wiki.whatwg.org/wiki/OffscreenCanvas
+ */
+
+[Constructor(unsigned long width, unsigned long height),
+ Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabled"]
+interface OffscreenCanvas : EventTarget {
+ [Pure, SetterThrows]
+ attribute unsigned long width;
+ [Pure, SetterThrows]
+ attribute unsigned long height;
+
+ [Throws]
+ nsISupports? getContext(DOMString contextId,
+ optional any contextOptions = null);
+
+ ImageBitmap transferToImageBitmap();
+ [Throws]
+ Promise<Blob> toBlob(optional DOMString type = "",
+ optional any encoderOptions);
+};
+
+// OffscreenCanvas implements Transferable;
diff --git a/dom/webidl/OscillatorNode.webidl b/dom/webidl/OscillatorNode.webidl
new file mode 100644
index 000000000..268897080
--- /dev/null
+++ b/dom/webidl/OscillatorNode.webidl
@@ -0,0 +1,42 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum OscillatorType {
+ "sine",
+ "square",
+ "sawtooth",
+ "triangle",
+ "custom"
+};
+
+[Pref="dom.webaudio.enabled"]
+interface OscillatorNode : AudioNode {
+
+ [SetterThrows]
+ attribute OscillatorType type;
+
+ readonly attribute AudioParam frequency; // in Hertz
+ readonly attribute AudioParam detune; // in Cents
+
+ [Throws, UnsafeInPrerendering]
+ void start(optional double when = 0);
+ [Throws, UnsafeInPrerendering]
+ void stop(optional double when = 0);
+ void setPeriodicWave(PeriodicWave periodicWave);
+
+ attribute EventHandler onended;
+
+};
+
+// Mozilla extensions
+OscillatorNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/PageTransitionEvent.webidl b/dom/webidl/PageTransitionEvent.webidl
new file mode 100644
index 000000000..d4a050c19
--- /dev/null
+++ b/dom/webidl/PageTransitionEvent.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * The PageTransitionEvent interface is used for the pageshow and
+ * pagehide events, which are generic events that apply to both page
+ * load/unload and saving/restoring a document from session history.
+ */
+
+[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict)]
+interface PageTransitionEvent : Event
+{
+ /**
+ * Set to true if the document has been or will be persisted across
+ * firing of the event. For example, if a document is being cached in
+ * session history, |persisted| is true for the PageHide event.
+ */
+ readonly attribute boolean persisted;
+};
+
+dictionary PageTransitionEventInit : EventInit
+{
+ boolean persisted = false;
+};
diff --git a/dom/webidl/PaintRequest.webidl b/dom/webidl/PaintRequest.webidl
new file mode 100644
index 000000000..065be0866
--- /dev/null
+++ b/dom/webidl/PaintRequest.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+/**
+ * These objects are exposed by the MozDOMAfterPaint event. Each one represents
+ * a request to repaint a rectangle that was generated by the browser.
+ */
+interface PaintRequest {
+ /**
+ * The client rect where invalidation was triggered.
+ */
+ readonly attribute DOMRect clientRect;
+
+ /**
+ * The reason for the request, as a string. If an empty string, then we don't know
+ * the reason (this is common). Reasons include "scroll repaint", meaning that we
+ * needed to repaint the rectangle due to scrolling, and "scroll copy", meaning
+ * that we updated the rectangle due to scrolling but instead of painting
+ * manually, we were able to do a copy from another area of the screen.
+ */
+ readonly attribute DOMString reason;
+};
diff --git a/dom/webidl/PaintRequestList.webidl b/dom/webidl/PaintRequestList.webidl
new file mode 100644
index 000000000..d14f18a73
--- /dev/null
+++ b/dom/webidl/PaintRequestList.webidl
@@ -0,0 +1,10 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface PaintRequestList {
+ readonly attribute unsigned long length;
+ getter PaintRequest? item(unsigned long index);
+};
diff --git a/dom/webidl/PannerNode.webidl b/dom/webidl/PannerNode.webidl
new file mode 100644
index 000000000..86b892852
--- /dev/null
+++ b/dom/webidl/PannerNode.webidl
@@ -0,0 +1,61 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum PanningModelType {
+ "equalpower",
+ "HRTF"
+};
+
+enum DistanceModelType {
+ "linear",
+ "inverse",
+ "exponential"
+};
+
+[Pref="dom.webaudio.enabled"]
+interface PannerNode : AudioNode {
+
+ // Default for stereo is equalpower
+ attribute PanningModelType panningModel;
+
+ // Uses a 3D cartesian coordinate system
+ void setPosition(double x, double y, double z);
+ void setOrientation(double x, double y, double z);
+ [Deprecated="PannerNodeDoppler"]
+ void setVelocity(double x, double y, double z);
+
+ // Cartesian coordinate for position
+ readonly attribute AudioParam positionX;
+ readonly attribute AudioParam positionY;
+ readonly attribute AudioParam positionZ;
+
+ // Cartesian coordinate for orientation
+ readonly attribute AudioParam orientationX;
+ readonly attribute AudioParam orientationY;
+ readonly attribute AudioParam orientationZ;
+
+ // Distance model and attributes
+ attribute DistanceModelType distanceModel;
+ attribute double refDistance;
+ attribute double maxDistance;
+ attribute double rolloffFactor;
+
+ // Directional sound cone
+ attribute double coneInnerAngle;
+ attribute double coneOuterAngle;
+ attribute double coneOuterGain;
+
+};
+
+// Mozilla extension
+PannerNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/ParentNode.webidl b/dom/webidl/ParentNode.webidl
new file mode 100644
index 000000000..5834b9be3
--- /dev/null
+++ b/dom/webidl/ParentNode.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#interface-parentnode
+ */
+
+[NoInterfaceObject]
+interface ParentNode {
+ [Constant]
+ readonly attribute HTMLCollection children;
+ [Pure]
+ readonly attribute Element? firstElementChild;
+ [Pure]
+ readonly attribute Element? lastElementChild;
+ [Pure]
+ readonly attribute unsigned long childElementCount;
+
+ [Throws, Unscopable]
+ void prepend((Node or DOMString)... nodes);
+ [Throws, Unscopable]
+ void append((Node or DOMString)... nodes);
+};
diff --git a/dom/webidl/PeerConnectionImpl.webidl b/dom/webidl/PeerConnectionImpl.webidl
new file mode 100644
index 000000000..f3348aec8
--- /dev/null
+++ b/dom/webidl/PeerConnectionImpl.webidl
@@ -0,0 +1,107 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * PeerConnection.js' interface to the C++ PeerConnectionImpl.
+ *
+ * Do not confuse with RTCPeerConnection. This interface is purely for
+ * communication between the PeerConnection JS DOM binding and the C++
+ * implementation in SIPCC.
+ *
+ * See media/webrtc/signaling/include/PeerConnectionImpl.h
+ *
+ */
+
+interface nsISupports;
+
+/* Must be created first. Observer events will be dispatched on the thread provided */
+[ChromeOnly, Constructor]
+interface PeerConnectionImpl {
+ /* Must be called first. Observer events dispatched on the thread provided */
+ [Throws]
+ void initialize(PeerConnectionObserver observer, Window window,
+ RTCConfiguration iceServers,
+ nsISupports thread);
+
+ /* JSEP calls */
+ [Throws]
+ void createOffer(optional RTCOfferOptions options);
+ [Throws]
+ void createAnswer();
+ [Throws]
+ void setLocalDescription(long action, DOMString sdp);
+ [Throws]
+ void setRemoteDescription(long action, DOMString sdp);
+
+ /* Stats call, calls either |onGetStatsSuccess| or |onGetStatsError| on our
+ observer. (see the |PeerConnectionObserver| interface) */
+ [Throws]
+ void getStats(MediaStreamTrack? selector);
+
+ /* Adds the tracks created by GetUserMedia */
+ [Throws]
+ void addTrack(MediaStreamTrack track, MediaStream... streams);
+ [Throws]
+ void removeTrack(MediaStreamTrack track);
+ [Throws]
+ void insertDTMF(RTCRtpSender sender, DOMString tones,
+ optional unsigned long duration = 100,
+ optional unsigned long interToneGap = 70);
+ [Throws]
+ DOMString getDTMFToneBuffer(RTCRtpSender sender);
+ [Throws]
+ void replaceTrack(MediaStreamTrack thisTrack, MediaStreamTrack withTrack);
+ [Throws]
+ void setParameters(MediaStreamTrack track,
+ optional RTCRtpParameters parameters);
+ [Throws]
+ RTCRtpParameters getParameters(MediaStreamTrack track);
+ [Throws]
+ void closeStreams();
+
+ sequence<MediaStream> getLocalStreams();
+ sequence<MediaStream> getRemoteStreams();
+
+ void selectSsrc(MediaStreamTrack recvTrack, unsigned short ssrcIndex);
+
+ /* As the ICE candidates roll in this one should be called each time
+ * in order to keep the candidate list up-to-date for the next SDP-related
+ * call PeerConnectionImpl does not parse ICE candidates, just sticks them
+ * into the SDP.
+ */
+ [Throws]
+ void addIceCandidate(DOMString candidate, DOMString mid, unsigned short level);
+
+ /* Puts the SIPCC engine back to 'kIdle', shuts down threads, deletes state */
+ void close();
+
+ /* Notify DOM window if this plugin crash is ours. */
+ boolean pluginCrash(unsigned long long pluginId, DOMString name);
+
+ /* Attributes */
+ /* This provides the implementation with the certificate it uses to
+ * authenticate itself. The JS side must set this before calling
+ * createOffer/createAnswer or retrieving the value of fingerprint. This has
+ * to be delayed because generating the certificate takes some time. */
+ attribute RTCCertificate certificate;
+ [Constant]
+ readonly attribute DOMString fingerprint;
+ readonly attribute DOMString localDescription;
+ readonly attribute DOMString remoteDescription;
+
+ readonly attribute PCImplIceConnectionState iceConnectionState;
+ readonly attribute PCImplIceGatheringState iceGatheringState;
+ readonly attribute PCImplSignalingState signalingState;
+ attribute DOMString id;
+
+ attribute DOMString peerIdentity;
+ readonly attribute boolean privacyRequested;
+
+ /* Data channels */
+ [Throws]
+ DataChannel createDataChannel(DOMString label, DOMString protocol,
+ unsigned short type, boolean outOfOrderAllowed,
+ unsigned short maxTime, unsigned short maxNum,
+ boolean externalNegotiated, unsigned short stream);
+};
diff --git a/dom/webidl/PeerConnectionImplEnums.webidl b/dom/webidl/PeerConnectionImplEnums.webidl
new file mode 100644
index 000000000..e9ce815f8
--- /dev/null
+++ b/dom/webidl/PeerConnectionImplEnums.webidl
@@ -0,0 +1,42 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * This is in a separate file so it can be shared with unittests.
+ */
+
+/* Must be in the same order as comparable fsmdef_states_t in fsmdef_states.h */
+enum PCImplSignalingState {
+ "SignalingInvalid",
+ "SignalingStable",
+ "SignalingHaveLocalOffer",
+ "SignalingHaveRemoteOffer",
+ "SignalingHaveLocalPranswer",
+ "SignalingHaveRemotePranswer",
+ "SignalingClosed",
+};
+
+enum PCImplSipccState {
+ "Idle",
+ "Starting",
+ "Started"
+};
+
+enum PCImplIceConnectionState {
+ "new",
+ "checking",
+ "connected",
+ "completed",
+ "failed",
+ "disconnected",
+ "closed"
+};
+
+// Deliberately identical to the values specified in webrtc
+enum PCImplIceGatheringState {
+ "new",
+ "gathering",
+ "complete"
+};
+
diff --git a/dom/webidl/PeerConnectionObserver.webidl b/dom/webidl/PeerConnectionObserver.webidl
new file mode 100644
index 000000000..da6ea2aa0
--- /dev/null
+++ b/dom/webidl/PeerConnectionObserver.webidl
@@ -0,0 +1,50 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface nsISupports;
+
+[ChromeOnly,
+ JSImplementation="@mozilla.org/dom/peerconnectionobserver;1",
+ Constructor (RTCPeerConnection domPC)]
+interface PeerConnectionObserver
+{
+ /* JSEP callbacks */
+ void onCreateOfferSuccess(DOMString offer);
+ void onCreateOfferError(unsigned long name, DOMString message);
+ void onCreateAnswerSuccess(DOMString answer);
+ void onCreateAnswerError(unsigned long name, DOMString message);
+ void onSetLocalDescriptionSuccess();
+ void onSetRemoteDescriptionSuccess();
+ void onSetLocalDescriptionError(unsigned long name, DOMString message);
+ void onSetRemoteDescriptionError(unsigned long name, DOMString message);
+ void onAddIceCandidateSuccess();
+ void onAddIceCandidateError(unsigned long name, DOMString message);
+ void onIceCandidate(unsigned short level, DOMString mid, DOMString candidate);
+ void onNegotiationNeeded();
+
+ /* Stats callbacks */
+ void onGetStatsSuccess(optional RTCStatsReportInternal report);
+ void onGetStatsError(unsigned long name, DOMString message);
+
+ /* replaceTrack callbacks */
+ void onReplaceTrackSuccess();
+ void onReplaceTrackError(unsigned long name, DOMString message);
+
+ /* Data channel callbacks */
+ void notifyDataChannel(DataChannel channel);
+
+ /* Notification of one of several types of state changed */
+ void onStateChange(PCObserverStateType state);
+
+ /* Changes to MediaStreamTracks */
+ void onAddStream(MediaStream stream);
+ void onRemoveStream(MediaStream stream);
+ void onAddTrack(MediaStreamTrack track, sequence<MediaStream> streams);
+ void onRemoveTrack(MediaStreamTrack track);
+
+ /* DTMF callback */
+ void onDTMFToneChange(DOMString trackId, DOMString tone);
+};
diff --git a/dom/webidl/PeerConnectionObserverEnums.webidl b/dom/webidl/PeerConnectionObserverEnums.webidl
new file mode 100644
index 000000000..6f7c61c92
--- /dev/null
+++ b/dom/webidl/PeerConnectionObserverEnums.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * This is in a separate file so it can be shared with unittests.
+ */
+
+enum PCObserverStateType {
+ "None",
+ "IceConnectionState",
+ "IceGatheringState",
+ "SdpState",
+ "SipccState",
+ "SignalingState"
+};
diff --git a/dom/webidl/Performance.webidl b/dom/webidl/Performance.webidl
new file mode 100644
index 000000000..eaede253c
--- /dev/null
+++ b/dom/webidl/Performance.webidl
@@ -0,0 +1,74 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c.github.io/hr-time/
+ *
+ * Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang).
+ * W3C liability, trademark and document use rules apply.
+ */
+
+typedef double DOMHighResTimeStamp;
+typedef sequence <PerformanceEntry> PerformanceEntryList;
+
+[Exposed=(Window,Worker)]
+interface Performance {
+ [DependsOn=DeviceState, Affects=Nothing]
+ DOMHighResTimeStamp now();
+};
+
+[Exposed=Window]
+partial interface Performance {
+ [Constant]
+ readonly attribute PerformanceTiming timing;
+ [Constant]
+ readonly attribute PerformanceNavigation navigation;
+
+ jsonifier;
+};
+
+// http://www.w3.org/TR/performance-timeline/#sec-window.performance-attribute
+[Exposed=(Window,Worker)]
+partial interface Performance {
+ [Func="Performance::IsEnabled"]
+ PerformanceEntryList getEntries();
+ [Func="Performance::IsEnabled"]
+ PerformanceEntryList getEntriesByType(DOMString entryType);
+ [Func="Performance::IsEnabled"]
+ PerformanceEntryList getEntriesByName(DOMString name, optional DOMString
+ entryType);
+};
+
+// http://www.w3.org/TR/resource-timing/#extensions-performance-interface
+[Exposed=Window]
+partial interface Performance {
+ [Func="Performance::IsEnabled"]
+ void clearResourceTimings();
+ [Func="Performance::IsEnabled"]
+ void setResourceTimingBufferSize(unsigned long maxSize);
+ [Func="Performance::IsEnabled"]
+ attribute EventHandler onresourcetimingbufferfull;
+};
+
+// GC microbenchmarks, pref-guarded, not for general use (bug 1125412)
+[Exposed=Window]
+partial interface Performance {
+ [Pref="dom.enable_memory_stats"]
+ readonly attribute object mozMemory;
+};
+
+// http://www.w3.org/TR/user-timing/
+[Exposed=(Window,Worker)]
+partial interface Performance {
+ [Func="Performance::IsEnabled", Throws]
+ void mark(DOMString markName);
+ [Func="Performance::IsEnabled"]
+ void clearMarks(optional DOMString markName);
+ [Func="Performance::IsEnabled", Throws]
+ void measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark);
+ [Func="Performance::IsEnabled"]
+ void clearMeasures(optional DOMString measureName);
+};
+
diff --git a/dom/webidl/PerformanceEntry.webidl b/dom/webidl/PerformanceEntry.webidl
new file mode 100644
index 000000000..6cc37b845
--- /dev/null
+++ b/dom/webidl/PerformanceEntry.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3c-test.org/webperf/specs/PerformanceTimeline/#sec-PerformanceEntry-interface
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Exposed=(Window,Worker)]
+interface PerformanceEntry
+{
+ readonly attribute DOMString name;
+ readonly attribute DOMString entryType;
+ readonly attribute DOMHighResTimeStamp startTime;
+ readonly attribute DOMHighResTimeStamp duration;
+
+ jsonifier;
+};
diff --git a/dom/webidl/PerformanceEntryEvent.webidl b/dom/webidl/PerformanceEntryEvent.webidl
new file mode 100644
index 000000000..2cf75c5e4
--- /dev/null
+++ b/dom/webidl/PerformanceEntryEvent.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+dictionary PerformanceEntryEventInit : EventInit
+{
+ DOMString name = "";
+ DOMString entryType = "";
+ DOMHighResTimeStamp startTime = 0;
+ DOMHighResTimeStamp duration = 0;
+ double epoch = 0;
+ DOMString origin = "";
+};
+
+[Constructor(DOMString type, optional PerformanceEntryEventInit eventInitDict),
+ ChromeOnly]
+interface PerformanceEntryEvent : Event
+{
+ readonly attribute DOMString name;
+ readonly attribute DOMString entryType;
+ readonly attribute DOMHighResTimeStamp startTime;
+ readonly attribute DOMHighResTimeStamp duration;
+ readonly attribute double epoch;
+ readonly attribute DOMString origin;
+};
diff --git a/dom/webidl/PerformanceMark.webidl b/dom/webidl/PerformanceMark.webidl
new file mode 100644
index 000000000..20e9e92c0
--- /dev/null
+++ b/dom/webidl/PerformanceMark.webidl
@@ -0,0 +1,13 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/user-timing/#performancemark
+ */
+
+[Exposed=(Window,Worker)]
+interface PerformanceMark : PerformanceEntry
+{
+};
diff --git a/dom/webidl/PerformanceMeasure.webidl b/dom/webidl/PerformanceMeasure.webidl
new file mode 100644
index 000000000..aa4e8cd25
--- /dev/null
+++ b/dom/webidl/PerformanceMeasure.webidl
@@ -0,0 +1,13 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/user-timing/#performancemeasure
+ */
+
+[Exposed=(Window,Worker)]
+interface PerformanceMeasure : PerformanceEntry
+{
+};
diff --git a/dom/webidl/PerformanceNavigation.webidl b/dom/webidl/PerformanceNavigation.webidl
new file mode 100644
index 000000000..771cf7e98
--- /dev/null
+++ b/dom/webidl/PerformanceNavigation.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/hr-time/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface PerformanceNavigation {
+ const unsigned short TYPE_NAVIGATE = 0;
+ const unsigned short TYPE_RELOAD = 1;
+ const unsigned short TYPE_BACK_FORWARD = 2;
+ const unsigned short TYPE_RESERVED = 255;
+
+ readonly attribute unsigned short type;
+ readonly attribute unsigned short redirectCount;
+
+ jsonifier;
+};
diff --git a/dom/webidl/PerformanceObserver.webidl b/dom/webidl/PerformanceObserver.webidl
new file mode 100644
index 000000000..a3a14cb1e
--- /dev/null
+++ b/dom/webidl/PerformanceObserver.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/performance-timeline/#the-performanceobserver-interface
+ */
+
+dictionary PerformanceObserverInit {
+ required sequence<DOMString> entryTypes;
+};
+
+callback PerformanceObserverCallback = void (PerformanceObserverEntryList entries, PerformanceObserver observer);
+
+[Func="Performance::IsObserverEnabled",
+ Constructor(PerformanceObserverCallback callback),
+ Exposed=(Window,Worker)]
+interface PerformanceObserver {
+ [Throws]
+ void observe(PerformanceObserverInit options);
+ void disconnect();
+};
diff --git a/dom/webidl/PerformanceObserverEntryList.webidl b/dom/webidl/PerformanceObserverEntryList.webidl
new file mode 100644
index 000000000..cff4ee1b0
--- /dev/null
+++ b/dom/webidl/PerformanceObserverEntryList.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/performance-timeline/#the-performanceobserverentrylist-interface
+ */
+
+// XXX should be moved into Performance.webidl.
+dictionary PerformanceEntryFilterOptions {
+ DOMString name;
+ DOMString entryType;
+ DOMString initiatorType;
+};
+
+[Func="Performance::IsObserverEnabled", Exposed=(Window,Worker)]
+interface PerformanceObserverEntryList {
+ PerformanceEntryList getEntries(optional PerformanceEntryFilterOptions filter);
+ PerformanceEntryList getEntriesByType(DOMString entryType);
+ PerformanceEntryList getEntriesByName(DOMString name,
+ optional DOMString entryType);
+};
+
diff --git a/dom/webidl/PerformanceResourceTiming.webidl b/dom/webidl/PerformanceResourceTiming.webidl
new file mode 100644
index 000000000..021b84ae2
--- /dev/null
+++ b/dom/webidl/PerformanceResourceTiming.webidl
@@ -0,0 +1,40 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c-test.org/webperf/specs/ResourceTiming/#performanceresourcetiming
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface PerformanceResourceTiming : PerformanceEntry
+{
+ // A string with the name of that element that initiated the load.
+ // If the initiator is a CSS resource, the initiatorType attribute must return
+ // the string "css".
+ // If the initiator is an XMLHttpRequest object, the initiatorType attribute
+ // must return the string "xmlhttprequest".
+ readonly attribute DOMString initiatorType;
+ readonly attribute DOMString nextHopProtocol;
+
+ readonly attribute DOMHighResTimeStamp redirectStart;
+ readonly attribute DOMHighResTimeStamp redirectEnd;
+ readonly attribute DOMHighResTimeStamp fetchStart;
+ readonly attribute DOMHighResTimeStamp domainLookupStart;
+ readonly attribute DOMHighResTimeStamp domainLookupEnd;
+ readonly attribute DOMHighResTimeStamp connectStart;
+ readonly attribute DOMHighResTimeStamp connectEnd;
+ readonly attribute DOMHighResTimeStamp secureConnectionStart;
+ readonly attribute DOMHighResTimeStamp requestStart;
+ readonly attribute DOMHighResTimeStamp responseStart;
+ readonly attribute DOMHighResTimeStamp responseEnd;
+
+ readonly attribute unsigned long long transferSize;
+ readonly attribute unsigned long long encodedBodySize;
+ readonly attribute unsigned long long decodedBodySize;
+
+ jsonifier;
+};
diff --git a/dom/webidl/PerformanceTiming.webidl b/dom/webidl/PerformanceTiming.webidl
new file mode 100644
index 000000000..f75a46b7c
--- /dev/null
+++ b/dom/webidl/PerformanceTiming.webidl
@@ -0,0 +1,38 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/hr-time/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface PerformanceTiming {
+ readonly attribute unsigned long long navigationStart;
+ readonly attribute unsigned long long unloadEventStart;
+ readonly attribute unsigned long long unloadEventEnd;
+ readonly attribute unsigned long long redirectStart;
+ readonly attribute unsigned long long redirectEnd;
+ readonly attribute unsigned long long fetchStart;
+ readonly attribute unsigned long long domainLookupStart;
+ readonly attribute unsigned long long domainLookupEnd;
+ readonly attribute unsigned long long connectStart;
+ readonly attribute unsigned long long connectEnd;
+ // secureConnectionStart will be implemneted in bug 772589
+ // readonly attribute unsigned long long secureConnectionStart;
+ readonly attribute unsigned long long requestStart;
+ readonly attribute unsigned long long responseStart;
+ readonly attribute unsigned long long responseEnd;
+ readonly attribute unsigned long long domLoading;
+ readonly attribute unsigned long long domInteractive;
+ readonly attribute unsigned long long domContentLoadedEventStart;
+ readonly attribute unsigned long long domContentLoadedEventEnd;
+ readonly attribute unsigned long long domComplete;
+ readonly attribute unsigned long long loadEventStart;
+ readonly attribute unsigned long long loadEventEnd;
+
+ jsonifier;
+};
diff --git a/dom/webidl/PeriodicWave.webidl b/dom/webidl/PeriodicWave.webidl
new file mode 100644
index 000000000..c118274a2
--- /dev/null
+++ b/dom/webidl/PeriodicWave.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface PeriodicWave {
+
+};
+
diff --git a/dom/webidl/PermissionSettings.webidl b/dom/webidl/PermissionSettings.webidl
new file mode 100644
index 000000000..99101d798
--- /dev/null
+++ b/dom/webidl/PermissionSettings.webidl
@@ -0,0 +1,20 @@
+/* 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 at http://mozilla.org/MPL/2.0/. */
+
+[JSImplementation="@mozilla.org/permissionSettings;1",
+ ChromeOnly,
+ Pref="dom.mozPermissionSettings.enabled",
+ NavigatorProperty="mozPermissionSettings"]
+interface PermissionSettings
+{
+ DOMString get(DOMString permission, DOMString manifestURI, DOMString origin, boolean browserFlag);
+
+ void set(DOMString permission, DOMString value, DOMString manifestURI, DOMString origin, boolean browserFlag);
+
+ boolean isExplicit(DOMString permission, DOMString manifestURI, DOMString origin, boolean browserFlag);
+
+ // Removing a permission is only allowed for pages with a different origin than the app
+ // and pages that have browserFlag=true, so remove() doesn't have a browserFlag parameter.
+ void remove(DOMString permission, DOMString manifestURI, DOMString origin);
+};
diff --git a/dom/webidl/PermissionStatus.webidl b/dom/webidl/PermissionStatus.webidl
new file mode 100644
index 000000000..3abfd66f4
--- /dev/null
+++ b/dom/webidl/PermissionStatus.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/permissions/#status-of-a-permission
+ */
+
+enum PermissionState {
+ "granted",
+ "denied",
+ "prompt"
+};
+
+[Exposed=(Window)]
+interface PermissionStatus : EventTarget {
+ readonly attribute PermissionState state;
+ attribute EventHandler onchange;
+};
diff --git a/dom/webidl/Permissions.webidl b/dom/webidl/Permissions.webidl
new file mode 100644
index 000000000..a6c8aba68
--- /dev/null
+++ b/dom/webidl/Permissions.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/permissions/#permissions-interface
+ */
+
+enum PermissionName {
+ "geolocation",
+ "notifications",
+ "push"
+ // Unsupported: "midi"
+};
+
+dictionary PermissionDescriptor {
+ required PermissionName name;
+};
+
+// We don't implement `PushPermissionDescriptor` because we use a background
+// message quota instead of `userVisibleOnly`.
+
+[Exposed=(Window)]
+interface Permissions {
+ [Throws]
+ Promise<PermissionStatus> query(object permission);
+ [Throws, Pref="dom.permissions.revoke.enable"]
+ Promise<PermissionStatus> revoke(object permission);
+};
diff --git a/dom/webidl/Plugin.webidl b/dom/webidl/Plugin.webidl
new file mode 100644
index 000000000..018d65a05
--- /dev/null
+++ b/dom/webidl/Plugin.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+// [LegacyUnenumerableNamedProperties]
+// Named properties enumerable for now; see
+// https://bugzilla.mozilla.org/show_bug.cgi?id=1270366
+interface Plugin {
+ readonly attribute DOMString description;
+ readonly attribute DOMString filename;
+ readonly attribute DOMString version;
+ readonly attribute DOMString name;
+
+ readonly attribute unsigned long length;
+ getter MimeType? item(unsigned long index);
+ getter MimeType? namedItem(DOMString name);
+};
diff --git a/dom/webidl/PluginArray.webidl b/dom/webidl/PluginArray.webidl
new file mode 100644
index 000000000..617bb1f9a
--- /dev/null
+++ b/dom/webidl/PluginArray.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+// [LegacyUnenumerableNamedProperties]
+// Named properties enumerable for now; see
+// https://bugzilla.mozilla.org/show_bug.cgi?id=1270366
+interface PluginArray {
+ readonly attribute unsigned long length;
+
+ getter Plugin? item(unsigned long index);
+ getter Plugin? namedItem(DOMString name);
+
+ void refresh(optional boolean reloadDocuments = false);
+};
diff --git a/dom/webidl/PluginCrashedEvent.webidl b/dom/webidl/PluginCrashedEvent.webidl
new file mode 100644
index 000000000..8eed7244e
--- /dev/null
+++ b/dom/webidl/PluginCrashedEvent.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional PluginCrashedEventInit eventInitDict), ChromeOnly]
+interface PluginCrashedEvent : Event
+{
+ readonly attribute unsigned long pluginID;
+ readonly attribute DOMString pluginDumpID;
+ readonly attribute DOMString pluginName;
+ readonly attribute DOMString? browserDumpID;
+ readonly attribute DOMString? pluginFilename;
+ readonly attribute boolean submittedCrashReport;
+ readonly attribute boolean gmpPlugin;
+};
+
+dictionary PluginCrashedEventInit : EventInit
+{
+ unsigned long pluginID = 0;
+ DOMString pluginDumpID = "";
+ DOMString pluginName = "";
+ DOMString? browserDumpID = null;
+ DOMString? pluginFilename = null;
+ boolean submittedCrashReport = false;
+ boolean gmpPlugin = false;
+};
diff --git a/dom/webidl/PointerEvent.webidl b/dom/webidl/PointerEvent.webidl
new file mode 100644
index 000000000..2e83922c8
--- /dev/null
+++ b/dom/webidl/PointerEvent.webidl
@@ -0,0 +1,37 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information see nsIPointerEvent.idl.
+ *
+ * Portions Copyright 2013 Microsoft Open Technologies, Inc. */
+
+interface WindowProxy;
+
+[Pref="dom.w3c_pointer_events.enabled",
+ Constructor(DOMString type, optional PointerEventInit eventInitDict)]
+interface PointerEvent : MouseEvent
+{
+ readonly attribute long pointerId;
+ readonly attribute long width;
+ readonly attribute long height;
+ readonly attribute float pressure;
+ readonly attribute long tiltX;
+ readonly attribute long tiltY;
+ readonly attribute DOMString pointerType;
+ readonly attribute boolean isPrimary;
+};
+
+dictionary PointerEventInit : MouseEventInit
+{
+ long pointerId = 0;
+ long width = 1;
+ long height = 1;
+ float pressure = 0;
+ long tiltX = 0;
+ long tiltY = 0;
+ DOMString pointerType = "";
+ boolean isPrimary = false;
+};
+
diff --git a/dom/webidl/PopStateEvent.webidl b/dom/webidl/PopStateEvent.webidl
new file mode 100644
index 000000000..428ab9c84
--- /dev/null
+++ b/dom/webidl/PopStateEvent.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional PopStateEventInit eventInitDict)]
+interface PopStateEvent : Event
+{
+ readonly attribute any state;
+};
+
+dictionary PopStateEventInit : EventInit
+{
+ any state = null;
+};
diff --git a/dom/webidl/PopupBlockedEvent.webidl b/dom/webidl/PopupBlockedEvent.webidl
new file mode 100644
index 000000000..bf338d56b
--- /dev/null
+++ b/dom/webidl/PopupBlockedEvent.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+interface URI;
+
+[Constructor(DOMString type, optional PopupBlockedEventInit eventInitDict)]
+interface PopupBlockedEvent : Event
+{
+ readonly attribute Window? requestingWindow;
+ readonly attribute URI? popupWindowURI;
+ readonly attribute DOMString? popupWindowName;
+ readonly attribute DOMString? popupWindowFeatures;
+};
+
+dictionary PopupBlockedEventInit : EventInit
+{
+ Window? requestingWindow = null;
+ URI? popupWindowURI = null;
+ DOMString popupWindowName = "";
+ DOMString popupWindowFeatures = "";
+};
diff --git a/dom/webidl/PopupBoxObject.webidl b/dom/webidl/PopupBoxObject.webidl
new file mode 100644
index 000000000..bb201ad89
--- /dev/null
+++ b/dom/webidl/PopupBoxObject.webidl
@@ -0,0 +1,191 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[Func="IsChromeOrXBL"]
+interface PopupBoxObject : BoxObject
+{
+ /**
+ * This method is deprecated. Use openPopup or openPopupAtScreen instead.
+ */
+ void showPopup(Element? srcContent, Element popupContent,
+ long xpos, long ypos,
+ optional DOMString popupType = "",
+ optional DOMString anchorAlignment = "",
+ optional DOMString popupAlignment = "");
+
+ /**
+ * Hide the popup if it is open. The cancel argument is used as a hint that
+ * the popup is being closed because it has been cancelled, rather than
+ * something being selected within the panel.
+ *
+ * @param cancel if true, then the popup is being cancelled.
+ */
+ void hidePopup(optional boolean cancel = false);
+
+ /**
+ * Allow the popup to automatically position itself.
+ */
+ attribute boolean autoPosition;
+
+ /**
+ * If keyboard navigation is enabled, the keyboard may be used to navigate
+ * the menuitems on the popup. Enabling keyboard navigation is the default
+ * behaviour and will install capturing key event listeners on the popup
+ * that do not propagate key events to the contents. If you wish to place
+ * elements in a popup which accept key events, such as textboxes, keyboard
+ * navigation should be disabled.
+ *
+ * Setting ignorekeys="true" on the popup element also disables keyboard
+ * navigation, and is recommended over calling this method.
+ */
+ void enableKeyboardNavigator(boolean enableKeyboardNavigator);
+
+ /**
+ * Enable automatic popup dismissal. This only has effect when called
+ * on an open popup.
+ */
+ void enableRollup(boolean enableRollup);
+
+ /**
+ * Control whether the event that caused the popup to be automatically
+ * dismissed ("rolled up") should be consumed, or dispatched as a
+ * normal event. This should be set immediately before calling showPopup()
+ * if non-default behavior is desired.
+ */
+ const unsigned long ROLLUP_DEFAULT = 0; /* widget/platform default */
+ const unsigned long ROLLUP_CONSUME = 1; /* consume the rollup event */
+ const unsigned long ROLLUP_NO_CONSUME = 2; /* don't consume the rollup event */
+ void setConsumeRollupEvent(unsigned long consume);
+
+ /**
+ * Size the popup to the given dimensions
+ */
+ void sizeTo(long width, long height);
+
+ /**
+ * Move the popup to a point on screen in CSS pixels.
+ */
+ void moveTo(long left, long top);
+
+ /**
+ * Open the popup relative to a specified node at a specific location.
+ *
+ * The popup may be either anchored to another node or opened freely.
+ * To anchor a popup to a node, supply an anchor node and set the position
+ * to a string indicating the manner in which the popup should be anchored.
+ * Possible values for position are:
+ * before_start, before_end, after_start, after_end,
+ * start_before, start_after, end_before, end_after,
+ * overlap, after_pointer
+ *
+ * The anchor node does not need to be in the same document as the popup.
+ *
+ * If the attributesOverride argument is true, the popupanchor, popupalign
+ * and position attributes on the popup node override the position value
+ * argument. If attributesOverride is false, the attributes are only used
+ * if position is empty.
+ *
+ * For an anchored popup, the x and y arguments may be used to offset the
+ * popup from its anchored position by some distance, measured in CSS pixels.
+ * x increases to the right and y increases down. Negative values may also
+ * be used to move to the left and upwards respectively.
+ *
+ * Unanchored popups may be created by supplying null as the anchor node.
+ * An unanchored popup appears at the position specified by x and y,
+ * relative to the viewport of the document containing the popup node. In
+ * this case, position and attributesOverride are ignored.
+ *
+ * @param anchorElement the node to anchor the popup to, may be null
+ * @param position manner is which to anchor the popup to node
+ * @param x horizontal offset
+ * @param y vertical offset
+ * @param isContextMenu true for context menus, false for other popups
+ * @param attributesOverride true if popup node attributes override position
+ * @param triggerEvent the event that triggered this popup (mouse click for example)
+ */
+ void openPopup(Element? anchorElement,
+ optional DOMString position = "",
+ long x,
+ long y,
+ boolean isContextMenu,
+ boolean attributesOverride,
+ Event? triggerEvent);
+
+ /**
+ * Open the popup at a specific screen position specified by x and y. This
+ * position may be adjusted if it would cause the popup to be off of the
+ * screen. The x and y coordinates are measured in CSS pixels, and like all
+ * screen coordinates, are given relative to the top left of the primary
+ * screen.
+ *
+ * @param isContextMenu true for context menus, false for other popups
+ * @param x horizontal screen position
+ * @param y vertical screen position
+ * @param triggerEvent the event that triggered this popup (mouse click for example)
+ */
+ void openPopupAtScreen(long x, long y,
+ boolean isContextMenu,
+ Event? triggerEvent);
+
+ /**
+ * Open the popup anchored at a specific screen rectangle. This function is
+ * similar to openPopup except that that rectangle of the anchor is supplied
+ * rather than an element. The anchor rectangle arguments are screen
+ * coordinates.
+ */
+ void openPopupAtScreenRect(optional DOMString position = "",
+ long x,
+ long y,
+ long width,
+ long height,
+ boolean isContextMenu,
+ boolean attributesOverride,
+ Event? triggerEvent);
+
+ /**
+ * Returns the state of the popup:
+ * closed - the popup is closed
+ * open - the popup is open
+ * showing - the popup is in the process of being shown
+ * hiding - the popup is in the process of being hidden
+ */
+ readonly attribute DOMString popupState;
+
+ /**
+ * The node that triggered the popup. If the popup is not open, will return
+ * null.
+ */
+ readonly attribute Node? triggerNode;
+
+ /**
+ * Retrieve the anchor that was specified to openPopup or for menupopups in a
+ * menu, the parent menu.
+ */
+ readonly attribute Element? anchorNode;
+
+ /**
+ * Retrieve the screen rectangle of the popup, including the area occupied by
+ * any titlebar or borders present.
+ */
+ DOMRect getOuterScreenRect();
+
+ /**
+ * Move an open popup to the given anchor position. The arguments have the same
+ * meaning as the corresponding argument to openPopup. This method has no effect
+ * on popups that are not open.
+ */
+ void moveToAnchor(Element? anchorElement,
+ optional DOMString position = "",
+ long x, long y,
+ boolean attributesOverride);
+
+ /** Returns the alignment position where the popup has appeared relative to its
+ * anchor node or point, accounting for any flipping that occurred.
+ */
+ readonly attribute DOMString alignmentPosition;
+ readonly attribute long alignmentOffset;
+
+ void setConstraintRect(DOMRectReadOnly rect);
+};
diff --git a/dom/webidl/Position.webidl b/dom/webidl/Position.webidl
new file mode 100644
index 000000000..93812a379
--- /dev/null
+++ b/dom/webidl/Position.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/geolocation-API
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface Position {
+ readonly attribute Coordinates coords;
+ readonly attribute DOMTimeStamp timestamp;
+};
diff --git a/dom/webidl/PositionError.webidl b/dom/webidl/PositionError.webidl
new file mode 100644
index 000000000..d644cbe48
--- /dev/null
+++ b/dom/webidl/PositionError.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/geolocation-API
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface PositionError {
+ const unsigned short PERMISSION_DENIED = 1;
+ const unsigned short POSITION_UNAVAILABLE = 2;
+ const unsigned short TIMEOUT = 3;
+ readonly attribute unsigned short code;
+ readonly attribute DOMString message;
+};
diff --git a/dom/webidl/Presentation.webidl b/dom/webidl/Presentation.webidl
new file mode 100644
index 000000000..d5b331616
--- /dev/null
+++ b/dom/webidl/Presentation.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/presentation-api/#interface-presentation
+ */
+
+[Pref="dom.presentation.enabled"]
+interface Presentation {
+ /*
+ * This should be used by the UA as the default presentation request for the
+ * controller. When the UA wishes to initiate a PresentationConnection on the
+ * controller's behalf, it MUST start a presentation connection using the default
+ * presentation request (as if the controller had called |defaultRequest.start()|).
+ *
+ * Only used by controlling browsing context (senders).
+ */
+ [Pref="dom.presentation.controller.enabled"]
+ attribute PresentationRequest? defaultRequest;
+
+ /*
+ * This should be available on the receiving browsing context in order to
+ * access the controlling browsing context and communicate with them.
+ */
+ [SameObject,
+ Pref="dom.presentation.receiver.enabled"]
+ readonly attribute PresentationReceiver? receiver;
+};
diff --git a/dom/webidl/PresentationAvailability.webidl b/dom/webidl/PresentationAvailability.webidl
new file mode 100644
index 000000000..f72b88565
--- /dev/null
+++ b/dom/webidl/PresentationAvailability.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/presentation-api/#interface-presentationavailability
+ */
+
+[Pref="dom.presentation.controller.enabled"]
+interface PresentationAvailability : EventTarget {
+ /*
+ * If there is at least one device discovered by UA, the value is |true|.
+ * Otherwise, its value should be |false|.
+ */
+ readonly attribute boolean value;
+
+ /*
+ * It is called when device availability changes.
+ */
+ attribute EventHandler onchange;
+};
diff --git a/dom/webidl/PresentationConnection.webidl b/dom/webidl/PresentationConnection.webidl
new file mode 100644
index 000000000..9676d2069
--- /dev/null
+++ b/dom/webidl/PresentationConnection.webidl
@@ -0,0 +1,96 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/presentation-api/#interface-presentationconnection
+ */
+
+enum PresentationConnectionState
+{
+ // The initial state when a PresentationConnection is ceated.
+ "connecting",
+
+ // Existing presentation, and the communication channel is active.
+ "connected",
+
+ // Existing presentation, but the communication channel is inactive.
+ "closed",
+
+ // The presentation is nonexistent anymore. It could be terminated manually,
+ // or either controlling or receiving browsing context is no longer available.
+ "terminated"
+};
+
+enum PresentationConnectionBinaryType
+{
+ "blob",
+ "arraybuffer"
+};
+
+[Pref="dom.presentation.enabled"]
+interface PresentationConnection : EventTarget {
+ /*
+ * Unique id for all existing connections.
+ */
+ [Constant]
+ readonly attribute DOMString id;
+
+ /*
+ * Specifies the connection's presentation URL.
+ */
+ readonly attribute DOMString url;
+
+ /*
+ * @value "connected", "closed", or "terminated".
+ */
+ readonly attribute PresentationConnectionState state;
+
+ attribute EventHandler onconnect;
+ attribute EventHandler onclose;
+ attribute EventHandler onterminate;
+ attribute PresentationConnectionBinaryType binaryType;
+
+ /*
+ * After a communication channel has been established between the controlling
+ * and receiving context, this function is called to send message out, and the
+ * event handler "onmessage" will be invoked at the remote side.
+ *
+ * This function only works when the state is "connected".
+ */
+ [Throws]
+ void send(DOMString data);
+
+ [Throws]
+ void send(Blob data);
+
+ [Throws]
+ void send(ArrayBuffer data);
+
+ [Throws]
+ void send(ArrayBufferView data);
+
+ /*
+ * It is triggered when receiving messages.
+ */
+ attribute EventHandler onmessage;
+
+ /*
+ * Both the controlling and receiving browsing context can close the
+ * connection. Then the connection state should turn into "closed".
+ *
+ * This function only works when the state is "connected" or "connecting".
+ */
+ [Throws]
+ void close();
+
+ /*
+ * Both the controlling and receiving browsing context can terminate the
+ * connection. Then the connection state should turn into "terminated".
+ *
+ * This function only works when the state is not "connected".
+ */
+ [Throws]
+ void terminate();
+};
diff --git a/dom/webidl/PresentationConnectionAvailableEvent.webidl b/dom/webidl/PresentationConnectionAvailableEvent.webidl
new file mode 100644
index 000000000..9efecb7d6
--- /dev/null
+++ b/dom/webidl/PresentationConnectionAvailableEvent.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/presentation-api/#interface-presentationconnectionavailableevent
+ */
+
+[Constructor(DOMString type,
+ PresentationConnectionAvailableEventInit eventInitDict),
+ Pref="dom.presentation.enabled"]
+interface PresentationConnectionAvailableEvent : Event
+{
+ [SameObject]
+ readonly attribute PresentationConnection connection;
+};
+
+dictionary PresentationConnectionAvailableEventInit : EventInit
+{
+ required PresentationConnection connection;
+};
diff --git a/dom/webidl/PresentationConnectionCloseEvent.webidl b/dom/webidl/PresentationConnectionCloseEvent.webidl
new file mode 100644
index 000000000..da6c25545
--- /dev/null
+++ b/dom/webidl/PresentationConnectionCloseEvent.webidl
@@ -0,0 +1,41 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/presentation-api/#interface-presentationconnectioncloseevent
+ */
+
+enum PresentationConnectionClosedReason
+{
+ // The communication encountered an unrecoverable error.
+ "error",
+
+ // |PresentationConnection.close()| is called by controlling browsing context
+ // or the receiving browsing context.
+ "closed",
+
+ // The connection is closed because the destination browsing context
+ // that owned the connection navigated or was discarded.
+ "wentaway"
+};
+
+[Constructor(DOMString type,
+ PresentationConnectionCloseEventInit eventInitDict),
+ Pref="dom.presentation.enabled"]
+interface PresentationConnectionCloseEvent : Event
+{
+ readonly attribute PresentationConnectionClosedReason reason;
+
+ // The message is a human readable description of
+ // how the communication channel encountered an error.
+ // It is empty when the closed reason is closed or wentaway.
+ readonly attribute DOMString message;
+};
+
+dictionary PresentationConnectionCloseEventInit : EventInit
+{
+ required PresentationConnectionClosedReason reason;
+ DOMString message = "";
+};
diff --git a/dom/webidl/PresentationConnectionList.webidl b/dom/webidl/PresentationConnectionList.webidl
new file mode 100644
index 000000000..2c90ce9de
--- /dev/null
+++ b/dom/webidl/PresentationConnectionList.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/presentation-api/#interface-presentationconnectionlist
+ */
+
+[Pref="dom.presentation.receiver.enabled"]
+interface PresentationConnectionList : EventTarget {
+ /*
+ * Return the non-terminated set of presentation connections in the
+ * set of presentation controllers.
+ * TODO: Use FrozenArray once available. (Bug 1236777)
+ * readonly attribute FrozenArray<PresentationConnection> connections;
+ */
+ [Frozen, Cached, Pure]
+ readonly attribute sequence<PresentationConnection> connections;
+
+ /*
+ * It is called when an incoming connection is connected.
+ */
+ attribute EventHandler onconnectionavailable;
+};
diff --git a/dom/webidl/PresentationDeviceInfoManager.webidl b/dom/webidl/PresentationDeviceInfoManager.webidl
new file mode 100644
index 000000000..6ccace324
--- /dev/null
+++ b/dom/webidl/PresentationDeviceInfoManager.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+dictionary PresentationDeviceInfo {
+ DOMString id;
+ DOMString name;
+ DOMString type;
+};
+
+[NavigatorProperty="mozPresentationDeviceInfo",
+ JSImplementation="@mozilla.org/presentation-device/deviceInfo;1",
+ Pref="dom.presentation.enabled",
+ ChromeOnly]
+interface PresentationDeviceInfoManager : EventTarget {
+ // notify if any device updated.
+ attribute EventHandler ondevicechange;
+
+ // retrieve all available device infos
+ Promise<sequence<PresentationDeviceInfo>> getAll();
+
+ // Force all registered device provider to update device information.
+ void forceDiscovery();
+};
diff --git a/dom/webidl/PresentationReceiver.webidl b/dom/webidl/PresentationReceiver.webidl
new file mode 100644
index 000000000..4acb37cf3
--- /dev/null
+++ b/dom/webidl/PresentationReceiver.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/presentation-api/#interface-presentationreceiver
+ */
+
+[Pref="dom.presentation.receiver.enabled"]
+interface PresentationReceiver {
+ /*
+ * Get a list which contains all connected presentation connections
+ * in a receiving browsing context.
+ */
+ [SameObject, Throws]
+ readonly attribute Promise<PresentationConnectionList> connectionList;
+};
diff --git a/dom/webidl/PresentationRequest.webidl b/dom/webidl/PresentationRequest.webidl
new file mode 100644
index 000000000..c0c5fb8a6
--- /dev/null
+++ b/dom/webidl/PresentationRequest.webidl
@@ -0,0 +1,86 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/presentation-api/#interface-presentationrequest
+ */
+
+[Constructor(DOMString url),
+ Constructor(sequence<DOMString> urls),
+ Pref="dom.presentation.controller.enabled"]
+interface PresentationRequest : EventTarget {
+ /*
+ * A requesting page use start() to start a new connection, and it will be
+ * returned with the promise. UA may show a prompt box with a list of
+ * available devices and ask the user to grant permission, choose a device, or
+ * cancel the operation.
+ *
+ * The promise is resolved when the presenting page is successfully loaded and
+ * the communication channel is established, i.e., the connection state is
+ * "connected".
+ *
+ * The promise may be rejected duo to one of the following reasons:
+ * - "OperationError": Unexpected error occurs.
+ * - "NotFoundError": No available device.
+ * - "AbortError": User dismiss/cancel the device prompt box.
+ * - "NetworkError": Failed to establish the control channel or data channel.
+ * - "TimeoutError": Presenting page takes too long to load.
+ * - "SecurityError": This operation is insecure.
+ */
+ [Throws]
+ Promise<PresentationConnection> start();
+
+ /*
+ * A requesting page can use reconnect(presentationId) to reopen a
+ * non-terminated presentation connection.
+ *
+ * The promise is resolved when a new presentation connection is created.
+ * The connection state is "connecting".
+ *
+ * The promise may be rejected duo to one of the following reasons:
+ * - "OperationError": Unexpected error occurs.
+ * - "NotFoundError": Can not find a presentation connection with the presentationId.
+ * - "SecurityError": This operation is insecure.
+ */
+ [Throws]
+ Promise<PresentationConnection> reconnect(DOMString presentationId);
+
+ /*
+ * UA triggers device discovery mechanism periodically and monitor device
+ * availability.
+ *
+ * The promise may be rejected duo to one of the following reasons:
+ * - "NotSupportedError": Unable to continuously monitor the availability.
+ * - "SecurityError": This operation is insecure.
+ */
+ [Throws]
+ Promise<PresentationAvailability> getAvailability();
+
+ /*
+ * It is called when a connection associated with a PresentationRequest is created.
+ * The event is fired for all connections that are created for the controller.
+ */
+ attribute EventHandler onconnectionavailable;
+
+ /*
+ * A chrome page, or page which has presentation-device-manage permissiongs,
+ * uses startWithDevice() to start a new connection with specified device,
+ * and it will be returned with the promise. UA may show a prompt box with a
+ * list of available devices and ask the user to grant permission, choose a
+ * device, or cancel the operation.
+ *
+ * The promise is resolved when the presenting page is successfully loaded and
+ * the communication channel is established, i.e., the connection state is
+ * "connected".
+ *
+ * The promise may be rejected duo to one of the following reasons:
+ * - "OperationError": Unexpected error occurs.
+ * - "NotFoundError": No available device.
+ * - "NetworkError": Failed to establish the control channel or data channel.
+ * - "TimeoutError": Presenting page takes too long to load.
+ */
+ [ChromeOnly, Throws]
+ Promise<PresentationConnection> startWithDevice(DOMString deviceId);
+};
diff --git a/dom/webidl/ProcessingInstruction.webidl b/dom/webidl/ProcessingInstruction.webidl
new file mode 100644
index 000000000..8f376c1c3
--- /dev/null
+++ b/dom/webidl/ProcessingInstruction.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface ProcessingInstruction : CharacterData {
+ readonly attribute DOMString target;
+};
diff --git a/dom/webidl/ProfileTimelineMarker.webidl b/dom/webidl/ProfileTimelineMarker.webidl
new file mode 100644
index 000000000..ca2ef21ac
--- /dev/null
+++ b/dom/webidl/ProfileTimelineMarker.webidl
@@ -0,0 +1,74 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+// For Javascript markers, the |stack| of a ProfileTimelineMarker
+// holds an object of this type. It intentionally looks like a
+// SavedStack object and is a representation of the frame that is
+// about to be constructed at the entry point.
+dictionary ProfileTimelineStackFrame {
+ long line;
+ long column = 0;
+ DOMString source;
+ DOMString functionDisplayName;
+ object? parent = null;
+ object? asyncParent = null;
+ DOMString asyncCause;
+};
+
+dictionary ProfileTimelineLayerRect {
+ long x = 0;
+ long y = 0;
+ long width = 0;
+ long height = 0;
+};
+
+enum ProfileTimelineMessagePortOperationType {
+ "serializeData",
+ "deserializeData",
+};
+
+enum ProfileTimelineWorkerOperationType {
+ "serializeDataOffMainThread",
+ "serializeDataOnMainThread",
+ "deserializeDataOffMainThread",
+ "deserializeDataOnMainThread",
+};
+
+dictionary ProfileTimelineMarker {
+ DOMString name = "";
+ DOMHighResTimeStamp start = 0;
+ DOMHighResTimeStamp end = 0;
+ object? stack = null;
+
+ unsigned short processType;
+ boolean isOffMainThread;
+
+ /* For ConsoleTime, Timestamp and Javascript markers. */
+ DOMString causeName;
+
+ /* For ConsoleTime markers. */
+ object? endStack = null;
+
+ /* For DOMEvent markers. */
+ DOMString type;
+ unsigned short eventPhase;
+
+ /* For document::DOMContentLoaded and document::Load markers. Using this
+ * instead of the `start` and `end` timestamps is strongly discouraged. */
+ unsigned long long unixTime; // in microseconds
+
+ /* For Paint markers. */
+ sequence<ProfileTimelineLayerRect> rectangles;
+
+ /* For Style markers. */
+ DOMString restyleHint;
+
+ /* For MessagePort markers. */
+ ProfileTimelineMessagePortOperationType messagePortOperation;
+
+ /* For Worker markers. */
+ ProfileTimelineWorkerOperationType workerOperation;
+};
diff --git a/dom/webidl/ProgressEvent.webidl b/dom/webidl/ProgressEvent.webidl
new file mode 100644
index 000000000..1be356b8f
--- /dev/null
+++ b/dom/webidl/ProgressEvent.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional ProgressEventInit eventInitDict)]
+interface ProgressEvent : Event
+{
+ readonly attribute boolean lengthComputable;
+ readonly attribute unsigned long long loaded;
+ readonly attribute unsigned long long total;
+};
+
+dictionary ProgressEventInit : EventInit
+{
+ boolean lengthComputable = false;
+ unsigned long long loaded = 0;
+ unsigned long long total = 0;
+};
diff --git a/dom/webidl/Promise.webidl b/dom/webidl/Promise.webidl
new file mode 100644
index 000000000..4dcb7d43e
--- /dev/null
+++ b/dom/webidl/Promise.webidl
@@ -0,0 +1,77 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#promises
+ */
+
+// TODO We use object instead Function. There is an open issue on WebIDL to
+// have different types for "platform-provided function" and "user-provided
+// function"; for now, we just use "object".
+callback PromiseInit = void (object resolve, object reject);
+
+callback PromiseJobCallback = void();
+
+[TreatNonCallableAsNull]
+callback AnyCallback = any (any value);
+
+// When using SpiderMonkey promises, we don't want to define all this stuff;
+// just define a tiny interface to make codegen of Promise arguments and return
+// values work.
+#ifndef SPIDERMONKEY_PROMISE
+[Constructor(PromiseInit init),
+ Exposed=(Window,Worker,WorkerDebugger,System)]
+// Need to escape "Promise" so it's treated as an identifier.
+interface _Promise {
+ // Have to use "any" (or "object", but "any" is simpler) as the type to
+ // support the subclassing behavior, since nothing actually requires the
+ // return value of PromiseSubclass.resolve/reject to be a Promise object.
+ [NewObject, Throws]
+ static any resolve(optional any value);
+ [NewObject, Throws]
+ static any reject(optional any value);
+
+ // The [TreatNonCallableAsNull] annotation is required since then() should do
+ // nothing instead of throwing errors when non-callable arguments are passed.
+ // Have to use "any" (or "object", but "any" is simpler) as the type to
+ // support the subclassing behavior, since nothing actually requires the
+ // return value of PromiseSubclass.then/catch to be a Promise object.
+ [NewObject, Throws]
+ any then([TreatNonCallableAsNull] optional AnyCallback? fulfillCallback = null,
+ [TreatNonCallableAsNull] optional AnyCallback? rejectCallback = null);
+
+ [NewObject, Throws]
+ any catch([TreatNonCallableAsNull] optional AnyCallback? rejectCallback = null);
+
+ // Have to use "any" (or "object", but "any" is simpler) as the type to
+ // support the subclassing behavior, since nothing actually requires the
+ // return value of PromiseSubclass.all to be a Promise object. As a result,
+ // we also have to do our argument conversion manually, because we want to
+ // convert its exceptions into rejections.
+ [NewObject, Throws]
+ static any all(optional any iterable);
+
+ // Have to use "any" (or "object", but "any" is simpler) as the type to
+ // support the subclassing behavior, since nothing actually requires the
+ // return value of PromiseSubclass.race to be a Promise object. As a result,
+ // we also have to do our argument conversion manually, because we want to
+ // convert its exceptions into rejections.
+ [NewObject, Throws]
+ static any race(optional any iterable);
+};
+#else // SPIDERMONKEY_PROMISE
+[NoInterfaceObject,
+ Exposed=(Window,Worker,WorkerDebugger,System)]
+// Need to escape "Promise" so it's treated as an identifier.
+interface _Promise {
+};
+
+// Hack to allow us to have JS owning and properly tracing/CCing/etc a
+// PromiseNativeHandler.
+[NoInterfaceObject,
+ Exposed=(Window,Worker,System)]
+interface PromiseNativeHandler {
+};
+#endif // SPIDERMONKEY_PROMISE
diff --git a/dom/webidl/PromiseDebugging.webidl b/dom/webidl/PromiseDebugging.webidl
new file mode 100644
index 000000000..107b8bc65
--- /dev/null
+++ b/dom/webidl/PromiseDebugging.webidl
@@ -0,0 +1,152 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/* This is a utility namespace for promise-debugging functionality */
+
+
+dictionary PromiseDebuggingStateHolder {
+ PromiseDebuggingState state = "pending";
+ any value;
+ any reason;
+};
+enum PromiseDebuggingState { "pending", "fulfilled", "rejected" };
+
+/**
+ * An observer for Promise that _may_ be leaking uncaught rejections.
+ *
+ * It is generally a programming error to leave a Promise rejected and
+ * not consume its rejection. The information exposed by this
+ * interface is designed to allow clients to track down such Promise,
+ * i.e. Promise that are currently
+ * - in `rejected` state;
+ * - last of their chain.
+ *
+ * Note, however, that a promise in such a state at the end of a tick
+ * may eventually be consumed in some ulterior tick. Implementers of
+ * this interface are responsible for presenting the information
+ * in a meaningful manner.
+ */
+callback interface UncaughtRejectionObserver {
+ /**
+ * A Promise has been left in `rejected` state and is the
+ * last in its chain.
+ *
+ * @param p A currently uncaught Promise. If `p` is is eventually
+ * caught, i.e. if its `then` callback is called, `onConsumed` will
+ * be called.
+ */
+#ifdef SPIDERMONKEY_PROMISE
+ void onLeftUncaught(object p);
+#else
+ void onLeftUncaught(Promise<any> p);
+#endif SPIDERMONKEY_PROMISE
+
+ /**
+ * A Promise previously left uncaught is not the last in its
+ * chain anymore.
+ *
+ * @param p A Promise that was previously left in uncaught state is
+ * now caught, i.e. it is not the last in its chain anymore.
+ */
+#ifdef SPIDERMONKEY_PROMISE
+ void onConsumed(object p);
+#else
+ void onConsumed(Promise<any> p);
+#endif SPIDERMONKEY_PROMISE
+};
+
+[ChromeOnly, Exposed=(Window,System)]
+interface PromiseDebugging {
+ /**
+ * The various functions on this interface all expect to take promises but
+ * don't want the WebIDL behavior of assimilating random passed-in objects
+ * into promises. They also want to treat Promise subclass instances as
+ * promises instead of wrapping them in a vanilla Promise, which is what the
+ * IDL spec says to do. So we list all our arguments as "object" instead of
+ * "Promise" and check for them being a Promise internally.
+ */
+
+ /**
+ * Get the current state of the given promise.
+ */
+ [Throws]
+ static PromiseDebuggingStateHolder getState(object p);
+
+ /**
+ * Return an identifier for a promise. This identifier is guaranteed
+ * to be unique to the current process.
+ */
+ [Throws]
+ static DOMString getPromiseID(object p);
+
+ /**
+ * Return the stack to the promise's allocation point. This can
+ * return null if the promise was not created from script.
+ */
+ [Throws]
+ static object? getAllocationStack(object p);
+
+ /**
+ * Return the stack to the promise's rejection point, if the
+ * rejection happened from script. This can return null if the
+ * promise has not been rejected or was not rejected from script.
+ */
+ [Throws]
+ static object? getRejectionStack(object p);
+
+ /**
+ * Return the stack to the promise's fulfillment point, if the
+ * fulfillment happened from script. This can return null if the
+ * promise has not been fulfilled or was not fulfilled from script.
+ */
+ [Throws]
+ static object? getFullfillmentStack(object p);
+
+#ifndef SPIDERMONKEY_PROMISE
+ /**
+ * Get the promises directly depending on a given promise. These are:
+ *
+ * 1) Return values of then() calls on the promise
+ * 2) Return values of Promise.all() if the given promise was passed in as one
+ * of the arguments.
+ * 3) Return values of Promise.race() if the given promise was passed in as
+ * one of the arguments.
+ *
+ * Once a promise is settled, it will generally notify its dependent promises
+ * and forget about them, so this is most useful on unsettled promises.
+ *
+ * Note that this function only returns the promises that directly depend on
+ * p. It does not recursively return promises that depend on promises that
+ * depend on p.
+ */
+ [Throws]
+ static sequence<Promise<any>> getDependentPromises(object p);
+
+ /**
+ * Get the number of milliseconds elapsed since the given promise was created.
+ */
+ [Throws]
+ static DOMHighResTimeStamp getPromiseLifetime(object p);
+
+ /*
+ * Get the number of milliseconds elapsed between the promise being created
+ * and being settled. Throws NS_ERROR_UNEXPECTED if the promise has not
+ * settled.
+ */
+ [Throws]
+ static DOMHighResTimeStamp getTimeToSettle(object p);
+
+#endif // SPIDERMONKEY_PROMISE
+
+ /**
+ * Watching uncaught rejections on the current thread.
+ *
+ * Adding an observer twice will cause it to be notified twice
+ * of events.
+ */
+ static void addUncaughtRejectionObserver(UncaughtRejectionObserver o);
+ static boolean removeUncaughtRejectionObserver(UncaughtRejectionObserver o);
+};
diff --git a/dom/webidl/PushEvent.webidl b/dom/webidl/PushEvent.webidl
new file mode 100644
index 000000000..a4624e451
--- /dev/null
+++ b/dom/webidl/PushEvent.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/push-api/
+ */
+
+[Constructor(DOMString type, optional PushEventInit eventInitDict),
+ Func="nsContentUtils::PushEnabled",
+ Exposed=ServiceWorker]
+interface PushEvent : ExtendableEvent {
+ readonly attribute PushMessageData? data;
+};
+
+typedef (BufferSource or USVString) PushMessageDataInit;
+
+dictionary PushEventInit : ExtendableEventInit {
+ PushMessageDataInit data;
+};
diff --git a/dom/webidl/PushManager.webidl b/dom/webidl/PushManager.webidl
new file mode 100644
index 000000000..de1e632c7
--- /dev/null
+++ b/dom/webidl/PushManager.webidl
@@ -0,0 +1,41 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+*
+* The origin of this IDL file is
+* https://w3c.github.io/push-api/
+*/
+
+dictionary PushSubscriptionOptionsInit {
+ // boolean userVisibleOnly = false;
+ BufferSource? applicationServerKey = null;
+};
+
+// The main thread JS implementation. Please see comments in
+// dom/push/PushManager.h for the split between PushManagerImpl and PushManager.
+[JSImplementation="@mozilla.org/push/PushManager;1",
+ ChromeOnly, Constructor(DOMString scope)]
+interface PushManagerImpl {
+ Promise<PushSubscription> subscribe(optional PushSubscriptionOptionsInit options);
+ Promise<PushSubscription?> getSubscription();
+ Promise<PushPermissionState> permissionState(optional PushSubscriptionOptionsInit options);
+};
+
+[Exposed=(Window,Worker), Func="nsContentUtils::PushEnabled",
+ ChromeConstructor(DOMString scope)]
+interface PushManager {
+ [Throws, UseCounter]
+ Promise<PushSubscription> subscribe(optional PushSubscriptionOptionsInit options);
+ [Throws]
+ Promise<PushSubscription?> getSubscription();
+ [Throws]
+ Promise<PushPermissionState> permissionState(optional PushSubscriptionOptionsInit options);
+};
+
+enum PushPermissionState
+{
+ "granted",
+ "denied",
+ "prompt"
+};
diff --git a/dom/webidl/PushMessageData.webidl b/dom/webidl/PushMessageData.webidl
new file mode 100644
index 000000000..32da84f37
--- /dev/null
+++ b/dom/webidl/PushMessageData.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/push-api/
+ */
+
+[Func="nsContentUtils::PushEnabled",
+ Exposed=ServiceWorker]
+interface PushMessageData
+{
+ [Throws]
+ ArrayBuffer arrayBuffer();
+ [Throws]
+ Blob blob();
+ [Throws]
+ any json();
+ USVString text();
+};
diff --git a/dom/webidl/PushSubscription.webidl b/dom/webidl/PushSubscription.webidl
new file mode 100644
index 000000000..eab576d3c
--- /dev/null
+++ b/dom/webidl/PushSubscription.webidl
@@ -0,0 +1,53 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+*
+* The origin of this IDL file is
+* https://w3c.github.io/push-api/
+*/
+
+interface Principal;
+
+enum PushEncryptionKeyName
+{
+ "p256dh",
+ "auth"
+};
+
+dictionary PushSubscriptionKeys
+{
+ ByteString p256dh;
+ ByteString auth;
+};
+
+dictionary PushSubscriptionJSON
+{
+ USVString endpoint;
+ PushSubscriptionKeys keys;
+};
+
+dictionary PushSubscriptionInit
+{
+ required USVString endpoint;
+ required USVString scope;
+ ArrayBuffer? p256dhKey;
+ ArrayBuffer? authSecret;
+ BufferSource? appServerKey;
+};
+
+[Exposed=(Window,Worker), Func="nsContentUtils::PushEnabled",
+ ChromeConstructor(PushSubscriptionInit initDict)]
+interface PushSubscription
+{
+ readonly attribute USVString endpoint;
+ readonly attribute PushSubscriptionOptions options;
+ [Throws]
+ ArrayBuffer? getKey(PushEncryptionKeyName name);
+ [Throws, UseCounter]
+ Promise<boolean> unsubscribe();
+
+ // Implements the custom serializer specified in Push API, section 9.
+ [Throws]
+ PushSubscriptionJSON toJSON();
+};
diff --git a/dom/webidl/PushSubscriptionOptions.webidl b/dom/webidl/PushSubscriptionOptions.webidl
new file mode 100644
index 000000000..569a1ddae
--- /dev/null
+++ b/dom/webidl/PushSubscriptionOptions.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+*
+* The origin of this IDL file is
+* https://w3c.github.io/push-api/
+*/
+
+[Exposed=(Window,Worker), Func="nsContentUtils::PushEnabled"]
+interface PushSubscriptionOptions
+{
+ [SameObject, Throws]
+ readonly attribute ArrayBuffer? applicationServerKey;
+};
diff --git a/dom/webidl/RGBColor.webidl b/dom/webidl/RGBColor.webidl
new file mode 100644
index 000000000..6e80ec72c
--- /dev/null
+++ b/dom/webidl/RGBColor.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-RGBColor
+ */
+
+interface RGBColor {
+ readonly attribute CSSPrimitiveValue red;
+ readonly attribute CSSPrimitiveValue green;
+ readonly attribute CSSPrimitiveValue blue;
+
+ // mozilla specific
+ readonly attribute CSSPrimitiveValue alpha;
+};
diff --git a/dom/webidl/RTCCertificate.webidl b/dom/webidl/RTCCertificate.webidl
new file mode 100644
index 000000000..405859518
--- /dev/null
+++ b/dom/webidl/RTCCertificate.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * Specification: http://w3c.github.io/webrtc-pc/#certificate-management
+ */
+
+dictionary RTCCertificateExpiration {
+ [EnforceRange]
+ DOMTimeStamp expires;
+};
+
+[Pref="media.peerconnection.enabled"]
+interface RTCCertificate {
+ readonly attribute DOMTimeStamp expires;
+};
diff --git a/dom/webidl/RTCConfiguration.webidl b/dom/webidl/RTCConfiguration.webidl
new file mode 100644
index 000000000..2c4052b8a
--- /dev/null
+++ b/dom/webidl/RTCConfiguration.webidl
@@ -0,0 +1,40 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCConfiguration
+ */
+
+enum RTCIceCredentialType {
+ "password",
+ "token"
+};
+
+dictionary RTCIceServer {
+ (DOMString or sequence<DOMString>) urls;
+ DOMString url; //deprecated
+ DOMString username;
+ DOMString credential;
+ RTCIceCredentialType credentialType = "password";
+};
+
+enum RTCIceTransportPolicy {
+ "relay",
+ "all"
+};
+
+enum RTCBundlePolicy {
+ "balanced",
+ "max-compat",
+ "max-bundle"
+};
+
+dictionary RTCConfiguration {
+ sequence<RTCIceServer> iceServers;
+ RTCIceTransportPolicy iceTransportPolicy = "all";
+ RTCBundlePolicy bundlePolicy = "balanced";
+ DOMString? peerIdentity = null;
+ sequence<RTCCertificate> certificates;
+};
diff --git a/dom/webidl/RTCDTMFSender.webidl b/dom/webidl/RTCDTMFSender.webidl
new file mode 100644
index 000000000..bf601a122
--- /dev/null
+++ b/dom/webidl/RTCDTMFSender.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://www.w3.org/TR/webrtc/#rtcdtmfsender
+ */
+
+[JSImplementation="@mozilla.org/dom/rtcdtmfsender;1"]
+interface RTCDTMFSender : EventTarget {
+ void insertDTMF(DOMString tones,
+ optional unsigned long duration = 100,
+ optional unsigned long interToneGap = 70);
+ attribute EventHandler ontonechange;
+ readonly attribute DOMString toneBuffer;
+};
diff --git a/dom/webidl/RTCDTMFToneChangeEvent.webidl b/dom/webidl/RTCDTMFToneChangeEvent.webidl
new file mode 100644
index 000000000..8cdae1592
--- /dev/null
+++ b/dom/webidl/RTCDTMFToneChangeEvent.webidl
@@ -0,0 +1,8 @@
+[Constructor(DOMString type, optional RTCDTMFToneChangeEventInit eventInitDict)]
+interface RTCDTMFToneChangeEvent : Event {
+ readonly attribute DOMString tone;
+};
+
+dictionary RTCDTMFToneChangeEventInit : EventInit {
+ DOMString tone = "";
+};
diff --git a/dom/webidl/RTCDataChannelEvent.webidl b/dom/webidl/RTCDataChannelEvent.webidl
new file mode 100644
index 000000000..4c74bddb0
--- /dev/null
+++ b/dom/webidl/RTCDataChannelEvent.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannelEvent
+ */
+
+interface RTCDataChannel;
+
+dictionary RTCDataChannelEventInit : EventInit {
+ RTCDataChannel? channel = null;
+};
+
+[Pref="media.peerconnection.enabled",
+ Constructor(DOMString type, optional RTCDataChannelEventInit eventInitDict)]
+interface RTCDataChannelEvent : Event {
+ readonly attribute RTCDataChannel? channel;
+};
diff --git a/dom/webidl/RTCIceCandidate.webidl b/dom/webidl/RTCIceCandidate.webidl
new file mode 100644
index 000000000..67d479aef
--- /dev/null
+++ b/dom/webidl/RTCIceCandidate.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCIceCandidate
+ */
+
+dictionary RTCIceCandidateInit {
+ DOMString? candidate = null;
+ DOMString? sdpMid = null;
+ unsigned short sdpMLineIndex;
+};
+
+[Pref="media.peerconnection.enabled",
+ JSImplementation="@mozilla.org/dom/rtcicecandidate;1",
+ Constructor(optional RTCIceCandidateInit candidateInitDict)]
+interface RTCIceCandidate {
+ attribute DOMString? candidate;
+ attribute DOMString? sdpMid;
+ attribute unsigned short? sdpMLineIndex;
+
+ jsonifier;
+};
diff --git a/dom/webidl/RTCIdentityAssertion.webidl b/dom/webidl/RTCIdentityAssertion.webidl
new file mode 100644
index 000000000..621b21fed
--- /dev/null
+++ b/dom/webidl/RTCIdentityAssertion.webidl
@@ -0,0 +1,13 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c.github.io/webrtc-pc/#idl-def-RTCIdentityAssertion
+ */
+
+dictionary RTCIdentityAssertion {
+ DOMString idp;
+ DOMString name;
+};
diff --git a/dom/webidl/RTCIdentityProvider.webidl b/dom/webidl/RTCIdentityProvider.webidl
new file mode 100644
index 000000000..fd1b44b09
--- /dev/null
+++ b/dom/webidl/RTCIdentityProvider.webidl
@@ -0,0 +1,57 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * http://w3c.github.io/webrtc-pc/ (with https://github.com/w3c/webrtc-pc/pull/178)
+ */
+
+[NoInterfaceObject]
+interface RTCIdentityProviderRegistrar {
+ void register(RTCIdentityProvider idp);
+
+ /* Whether an IdP was passed to register() to chrome code. */
+ [ChromeOnly]
+ readonly attribute boolean hasIdp;
+ /* The following two chrome-only functions forward to the corresponding
+ * function on the registered IdP. This is necessary because the
+ * JS-implemented WebIDL can't see these functions on `idp` above, chrome JS
+ * gets an Xray onto the content code that suppresses functions, see
+ * https://developer.mozilla.org/en-US/docs/Xray_vision#Xrays_for_JavaScript_objects
+ */
+ /* Forward to idp.generateAssertion() */
+ [ChromeOnly, Throws]
+ Promise<RTCIdentityAssertionResult>
+ generateAssertion(DOMString contents, DOMString origin,
+ optional DOMString usernameHint);
+ /* Forward to idp.validateAssertion() */
+ [ChromeOnly, Throws]
+ Promise<RTCIdentityValidationResult>
+ validateAssertion(DOMString assertion, DOMString origin);
+};
+
+dictionary RTCIdentityProvider {
+ required GenerateAssertionCallback generateAssertion;
+ required ValidateAssertionCallback validateAssertion;
+};
+
+callback GenerateAssertionCallback =
+ Promise<RTCIdentityAssertionResult>
+ (DOMString contents, DOMString origin, optional DOMString usernameHint);
+callback ValidateAssertionCallback =
+ Promise<RTCIdentityValidationResult> (DOMString assertion, DOMString origin);
+
+dictionary RTCIdentityAssertionResult {
+ required RTCIdentityProviderDetails idp;
+ required DOMString assertion;
+};
+
+dictionary RTCIdentityProviderDetails {
+ required DOMString domain;
+ DOMString protocol = "default";
+};
+
+dictionary RTCIdentityValidationResult {
+ required DOMString identity;
+ required DOMString contents;
+};
diff --git a/dom/webidl/RTCPeerConnection.webidl b/dom/webidl/RTCPeerConnection.webidl
new file mode 100644
index 000000000..510957056
--- /dev/null
+++ b/dom/webidl/RTCPeerConnection.webidl
@@ -0,0 +1,184 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c.github.io/webrtc-pc/#interface-definition
+ */
+
+callback RTCSessionDescriptionCallback = void (RTCSessionDescription sdp);
+callback RTCPeerConnectionErrorCallback = void (DOMError error);
+callback VoidFunction = void ();
+callback RTCStatsCallback = void (RTCStatsReport report);
+
+enum RTCSignalingState {
+ "stable",
+ "have-local-offer",
+ "have-remote-offer",
+ "have-local-pranswer",
+ "have-remote-pranswer",
+ "closed"
+};
+
+enum RTCIceGatheringState {
+ "new",
+ "gathering",
+ "complete"
+};
+
+enum RTCIceConnectionState {
+ "new",
+ "checking",
+ "connected",
+ "completed",
+ "failed",
+ "disconnected",
+ "closed"
+};
+
+dictionary RTCDataChannelInit {
+ boolean ordered = true;
+ unsigned short? maxRetransmitTime = null;
+ unsigned short? maxRetransmits = null;
+ DOMString protocol = "";
+ boolean negotiated = false; // spec currently says 'true'; we disagree
+ unsigned short? id = null;
+
+ // these are deprecated due to renaming in the spec, but still supported for Fx22
+ boolean outOfOrderAllowed; // now ordered, and the default changes to keep behavior the same
+ unsigned short maxRetransmitNum; // now maxRetransmits
+ boolean preset; // now negotiated
+ unsigned short stream; // now id
+};
+
+dictionary RTCOfferAnswerOptions {
+// boolean voiceActivityDetection = true; // TODO: support this (Bug 1184712)
+};
+
+dictionary RTCAnswerOptions : RTCOfferAnswerOptions {
+};
+
+dictionary RTCOfferOptions : RTCOfferAnswerOptions {
+ long offerToReceiveVideo;
+ long offerToReceiveAudio;
+ boolean iceRestart = false;
+
+ // Mozilla proprietary options (at risk: Bug 1196974)
+ boolean mozDontOfferDataChannel;
+ boolean mozBundleOnly;
+
+ // TODO: Remove old constraint-like RTCOptions support soon (Bug 1064223).
+ DeprecatedRTCOfferOptionsSet mandatory;
+ sequence<DeprecatedRTCOfferOptionsSet> _optional;
+};
+
+dictionary DeprecatedRTCOfferOptionsSet {
+ boolean OfferToReceiveAudio; // Note the uppercase 'O'
+ boolean OfferToReceiveVideo; // Note the uppercase 'O'
+ boolean MozDontOfferDataChannel; // Note the uppercase 'M'
+ boolean MozBundleOnly; // Note the uppercase 'M'
+};
+
+interface RTCDataChannel;
+
+[Pref="media.peerconnection.enabled",
+ JSImplementation="@mozilla.org/dom/peerconnection;1",
+ Constructor (optional RTCConfiguration configuration,
+ optional object? constraints)]
+interface RTCPeerConnection : EventTarget {
+ [Throws, StaticClassOverride="mozilla::dom::RTCCertificate"]
+ static Promise<RTCCertificate> generateCertificate (AlgorithmIdentifier keygenAlgorithm);
+
+ [Pref="media.peerconnection.identity.enabled"]
+ void setIdentityProvider (DOMString provider,
+ optional DOMString protocol,
+ optional DOMString username);
+ [Pref="media.peerconnection.identity.enabled"]
+ Promise<DOMString> getIdentityAssertion();
+ Promise<RTCSessionDescription> createOffer (optional RTCOfferOptions options);
+ Promise<RTCSessionDescription> createAnswer (optional RTCAnswerOptions options);
+ Promise<void> setLocalDescription (RTCSessionDescription description);
+ Promise<void> setRemoteDescription (RTCSessionDescription description);
+ readonly attribute RTCSessionDescription? localDescription;
+ readonly attribute RTCSessionDescription? remoteDescription;
+ readonly attribute RTCSignalingState signalingState;
+ Promise<void> addIceCandidate (RTCIceCandidate candidate);
+ readonly attribute boolean? canTrickleIceCandidates;
+ readonly attribute RTCIceGatheringState iceGatheringState;
+ readonly attribute RTCIceConnectionState iceConnectionState;
+ [Pref="media.peerconnection.identity.enabled"]
+ readonly attribute Promise<RTCIdentityAssertion> peerIdentity;
+ [Pref="media.peerconnection.identity.enabled"]
+ readonly attribute DOMString? idpLoginUrl;
+
+ [ChromeOnly]
+ attribute DOMString id;
+
+ RTCConfiguration getConfiguration ();
+ [UnsafeInPrerendering, Deprecated="RTCPeerConnectionGetStreams"]
+ sequence<MediaStream> getLocalStreams ();
+ [UnsafeInPrerendering, Deprecated="RTCPeerConnectionGetStreams"]
+ sequence<MediaStream> getRemoteStreams ();
+ [UnsafeInPrerendering]
+ MediaStream? getStreamById (DOMString streamId);
+ void addStream (MediaStream stream);
+
+ // replaces addStream; fails if already added
+ // because a track can be part of multiple streams, stream parameters
+ // indicate which particular streams should be referenced in signaling
+
+ RTCRtpSender addTrack(MediaStreamTrack track,
+ MediaStream stream,
+ MediaStream... moreStreams);
+ void removeTrack(RTCRtpSender sender);
+
+ sequence<RTCRtpSender> getSenders();
+ sequence<RTCRtpReceiver> getReceivers();
+
+ [ChromeOnly]
+ void mozSelectSsrc(RTCRtpReceiver receiver, unsigned short ssrcIndex);
+
+ void close ();
+ attribute EventHandler onnegotiationneeded;
+ attribute EventHandler onicecandidate;
+ attribute EventHandler onsignalingstatechange;
+ attribute EventHandler onaddstream; // obsolete
+ attribute EventHandler onaddtrack; // obsolete
+ attribute EventHandler ontrack; // replaces onaddtrack and onaddstream.
+ attribute EventHandler onremovestream;
+ attribute EventHandler oniceconnectionstatechange;
+
+ Promise<RTCStatsReport> getStats (optional MediaStreamTrack? selector);
+
+ // Data channel.
+ RTCDataChannel createDataChannel (DOMString label,
+ optional RTCDataChannelInit dataChannelDict);
+ attribute EventHandler ondatachannel;
+};
+
+// Legacy callback API
+
+partial interface RTCPeerConnection {
+
+ // Dummy Promise<void> return values avoid "WebIDL.WebIDLError: error:
+ // We have overloads with both Promise and non-Promise return types"
+
+ Promise<void> createOffer (RTCSessionDescriptionCallback successCallback,
+ RTCPeerConnectionErrorCallback failureCallback,
+ optional RTCOfferOptions options);
+ Promise<void> createAnswer (RTCSessionDescriptionCallback successCallback,
+ RTCPeerConnectionErrorCallback failureCallback);
+ Promise<void> setLocalDescription (RTCSessionDescription description,
+ VoidFunction successCallback,
+ RTCPeerConnectionErrorCallback failureCallback);
+ Promise<void> setRemoteDescription (RTCSessionDescription description,
+ VoidFunction successCallback,
+ RTCPeerConnectionErrorCallback failureCallback);
+ Promise<void> addIceCandidate (RTCIceCandidate candidate,
+ VoidFunction successCallback,
+ RTCPeerConnectionErrorCallback failureCallback);
+ Promise<void> getStats (MediaStreamTrack? selector,
+ RTCStatsCallback successCallback,
+ RTCPeerConnectionErrorCallback failureCallback);
+};
diff --git a/dom/webidl/RTCPeerConnectionIceEvent.webidl b/dom/webidl/RTCPeerConnectionIceEvent.webidl
new file mode 100644
index 000000000..5ec47f470
--- /dev/null
+++ b/dom/webidl/RTCPeerConnectionIceEvent.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCPeerConnectionIceEvent
+ */
+
+dictionary RTCPeerConnectionIceEventInit : EventInit {
+ RTCIceCandidate? candidate = null;
+};
+
+[Pref="media.peerconnection.enabled",
+ Constructor(DOMString type,
+ optional RTCPeerConnectionIceEventInit eventInitDict)]
+interface RTCPeerConnectionIceEvent : Event {
+ readonly attribute RTCIceCandidate? candidate;
+};
diff --git a/dom/webidl/RTCPeerConnectionStatic.webidl b/dom/webidl/RTCPeerConnectionStatic.webidl
new file mode 100644
index 000000000..5b21ee6e6
--- /dev/null
+++ b/dom/webidl/RTCPeerConnectionStatic.webidl
@@ -0,0 +1,39 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/*
+ Right now, it is not possible to add static functions to a JS implemented
+ interface (see bug 863952), so we need to create a simple interface with a
+ trivial constructor and no data to hold these functions that really ought to
+ be static in RTCPeerConnection.
+ TODO(bcampen@mozilla.com) Merge this code into RTCPeerConnection once this
+ limitation is gone. (Bug 1017082)
+*/
+
+enum RTCLifecycleEvent {
+ "initialized",
+ "icegatheringstatechange",
+ "iceconnectionstatechange"
+};
+
+callback PeerConnectionLifecycleCallback = void (RTCPeerConnection pc,
+ unsigned long long windowId,
+ RTCLifecycleEvent eventType);
+
+[ChromeOnly,
+ Pref="media.peerconnection.enabled",
+ JSImplementation="@mozilla.org/dom/peerconnectionstatic;1",
+ Constructor()]
+interface RTCPeerConnectionStatic {
+
+ /* One slot per window (the window in which the register call is made),
+ automatically unregistered when window goes away.
+ Fires when a PC is created, and whenever the ICE connection state or
+ gathering state changes. */
+ void registerPeerConnectionLifecycleCallback(
+ PeerConnectionLifecycleCallback cb);
+};
+
diff --git a/dom/webidl/RTCRtpReceiver.webidl b/dom/webidl/RTCRtpReceiver.webidl
new file mode 100644
index 000000000..94343ea03
--- /dev/null
+++ b/dom/webidl/RTCRtpReceiver.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://lists.w3.org/Archives/Public/public-webrtc/2014May/0067.html
+ */
+
+[Pref="media.peerconnection.enabled",
+ JSImplementation="@mozilla.org/dom/rtpreceiver;1"]
+interface RTCRtpReceiver {
+ readonly attribute MediaStreamTrack track;
+};
diff --git a/dom/webidl/RTCRtpSender.webidl b/dom/webidl/RTCRtpSender.webidl
new file mode 100644
index 000000000..15c08db40
--- /dev/null
+++ b/dom/webidl/RTCRtpSender.webidl
@@ -0,0 +1,78 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface
+ */
+
+enum RTCPriorityType {
+ "very-low",
+ "low",
+ "medium",
+ "high"
+};
+
+enum RTCDegradationPreference {
+ "maintain-framerate",
+ "maintain-resolution",
+ "balanced"
+};
+
+dictionary RTCRtxParameters {
+ unsigned long ssrc;
+};
+
+dictionary RTCFecParameters {
+ unsigned long ssrc;
+};
+
+dictionary RTCRtpEncodingParameters {
+ unsigned long ssrc;
+ RTCRtxParameters rtx;
+ RTCFecParameters fec;
+ boolean active;
+ RTCPriorityType priority;
+ unsigned long maxBitrate;
+ RTCDegradationPreference degradationPreference = "balanced";
+ DOMString rid;
+ float scaleResolutionDownBy = 1.0;
+};
+
+dictionary RTCRtpHeaderExtensionParameters {
+ DOMString uri;
+ unsigned short id;
+ boolean encrypted;
+};
+
+dictionary RTCRtcpParameters {
+ DOMString cname;
+ boolean reducedSize;
+};
+
+dictionary RTCRtpCodecParameters {
+ unsigned short payloadType;
+ DOMString mimeType;
+ unsigned long clockRate;
+ unsigned short channels = 1;
+ DOMString sdpFmtpLine;
+};
+
+dictionary RTCRtpParameters {
+ sequence<RTCRtpEncodingParameters> encodings;
+ sequence<RTCRtpHeaderExtensionParameters> headerExtensions;
+ RTCRtcpParameters rtcp;
+ sequence<RTCRtpCodecParameters> codecs;
+};
+
+[Pref="media.peerconnection.enabled",
+ JSImplementation="@mozilla.org/dom/rtpsender;1"]
+interface RTCRtpSender {
+ readonly attribute MediaStreamTrack track;
+ Promise<void> setParameters (optional RTCRtpParameters parameters);
+ RTCRtpParameters getParameters();
+ Promise<void> replaceTrack(MediaStreamTrack track);
+ [Pref="media.peerconnection.dtmf.enabled"]
+ readonly attribute RTCDTMFSender? dtmf;
+};
diff --git a/dom/webidl/RTCSessionDescription.webidl b/dom/webidl/RTCSessionDescription.webidl
new file mode 100644
index 000000000..07bfb36f0
--- /dev/null
+++ b/dom/webidl/RTCSessionDescription.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCSessionDescription
+ */
+
+enum RTCSdpType {
+ "offer",
+ "pranswer",
+ "answer",
+ "rollback"
+};
+
+dictionary RTCSessionDescriptionInit {
+ RTCSdpType? type = null;
+ DOMString? sdp = "";
+};
+
+[Pref="media.peerconnection.enabled",
+ JSImplementation="@mozilla.org/dom/rtcsessiondescription;1",
+ Constructor(optional RTCSessionDescriptionInit descriptionInitDict)]
+interface RTCSessionDescription {
+ attribute RTCSdpType? type;
+ attribute DOMString? sdp;
+
+ jsonifier;
+};
diff --git a/dom/webidl/RTCStatsReport.webidl b/dom/webidl/RTCStatsReport.webidl
new file mode 100644
index 000000000..04c683e9a
--- /dev/null
+++ b/dom/webidl/RTCStatsReport.webidl
@@ -0,0 +1,177 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcstatsreport-object
+ * http://www.w3.org/2011/04/webrtc/wiki/Stats
+ */
+
+enum RTCStatsType {
+ "inboundrtp",
+ "outboundrtp",
+ "session",
+ "track",
+ "transport",
+ "candidatepair",
+ "localcandidate",
+ "remotecandidate"
+};
+
+dictionary RTCStats {
+ DOMHighResTimeStamp timestamp;
+ RTCStatsType type;
+ DOMString id;
+};
+
+dictionary RTCRTPStreamStats : RTCStats {
+ DOMString ssrc;
+ DOMString mediaType;
+ DOMString remoteId;
+ boolean isRemote = false;
+ DOMString mediaTrackId;
+ DOMString transportId;
+ DOMString codecId;
+
+ // Video encoder/decoder measurements (absent for rtcp)
+ double bitrateMean;
+ double bitrateStdDev;
+ double framerateMean;
+ double framerateStdDev;
+};
+
+dictionary RTCInboundRTPStreamStats : RTCRTPStreamStats {
+ unsigned long packetsReceived;
+ unsigned long long bytesReceived;
+ double jitter;
+ unsigned long packetsLost;
+ long mozAvSyncDelay;
+ long mozJitterBufferDelay;
+ long mozRtt;
+
+ // Video decoder measurement (absent in rtcp case)
+ unsigned long discardedPackets;
+};
+
+dictionary RTCOutboundRTPStreamStats : RTCRTPStreamStats {
+ unsigned long packetsSent;
+ unsigned long long bytesSent;
+ double targetBitrate; // config encoder bitrate target of this SSRC in bits/s
+
+ // Video encoder measurement (absent in rtcp case)
+ unsigned long droppedFrames;
+};
+
+dictionary RTCMediaStreamTrackStats : RTCStats {
+ DOMString trackIdentifier; // track.id property
+ boolean remoteSource;
+ sequence<DOMString> ssrcIds;
+ // Stuff that makes sense for video
+ unsigned long frameWidth;
+ unsigned long frameHeight;
+ double framesPerSecond; // The nominal FPS value
+ unsigned long framesSent;
+ unsigned long framesReceived; // Only for remoteSource=true
+ unsigned long framesDecoded;
+ unsigned long framesDropped; // See VideoPlaybackQuality.droppedVideoFrames
+ unsigned long framesCorrupted; // as above.
+ // Stuff that makes sense for audio
+ double audioLevel; // linear, 1.0 = 0 dBov (from RFC 6464).
+ // AEC stuff on audio tracks sourced from a microphone where AEC is applied
+ double echoReturnLoss; // in decibels from G.168 (2012) section 3.14
+ double echoReturnLossEnhancement; // as above, section 3.15
+};
+
+dictionary RTCMediaStreamStats : RTCStats {
+ DOMString streamIdentifier; // stream.id property
+ sequence<DOMString> trackIds; // Note: stats object ids, not track.id
+};
+
+dictionary RTCTransportStats: RTCStats {
+ unsigned long bytesSent;
+ unsigned long bytesReceived;
+};
+
+dictionary RTCIceComponentStats : RTCStats {
+ DOMString transportId;
+ long component;
+ unsigned long bytesSent;
+ unsigned long bytesReceived;
+ boolean activeConnection;
+};
+
+enum RTCStatsIceCandidatePairState {
+ "frozen",
+ "waiting",
+ "inprogress",
+ "failed",
+ "succeeded",
+ "cancelled"
+};
+
+dictionary RTCIceCandidatePairStats : RTCStats {
+ DOMString componentId;
+ DOMString localCandidateId;
+ DOMString remoteCandidateId;
+ RTCStatsIceCandidatePairState state;
+ unsigned long long priority;
+ boolean readable;
+ boolean nominated;
+ boolean selected;
+};
+
+enum RTCStatsIceCandidateType {
+ "host",
+ "serverreflexive",
+ "peerreflexive",
+ "relayed"
+};
+
+dictionary RTCIceCandidateStats : RTCStats {
+ DOMString componentId;
+ DOMString candidateId;
+ DOMString ipAddress;
+ DOMString transport;
+ DOMString mozLocalTransport; // needs standardization
+ long portNumber;
+ RTCStatsIceCandidateType candidateType;
+};
+
+dictionary RTCCodecStats : RTCStats {
+ unsigned long payloadType; // As used in RTP encoding.
+ DOMString codec; // video/vp8 or equivalent
+ unsigned long clockRate;
+ unsigned long channels; // 2=stereo, missing for most other cases.
+ DOMString parameters; // From SDP description line
+};
+
+// This is the internal representation of the report in this implementation
+// to be received from c++
+
+dictionary RTCStatsReportInternal {
+ DOMString pcid = "";
+ sequence<RTCInboundRTPStreamStats> inboundRTPStreamStats;
+ sequence<RTCOutboundRTPStreamStats> outboundRTPStreamStats;
+ sequence<RTCMediaStreamTrackStats> mediaStreamTrackStats;
+ sequence<RTCMediaStreamStats> mediaStreamStats;
+ sequence<RTCTransportStats> transportStats;
+ sequence<RTCIceComponentStats> iceComponentStats;
+ sequence<RTCIceCandidatePairStats> iceCandidatePairStats;
+ sequence<RTCIceCandidateStats> iceCandidateStats;
+ sequence<RTCCodecStats> codecStats;
+ DOMString localSdp;
+ DOMString remoteSdp;
+ DOMHighResTimeStamp timestamp;
+ boolean closed; // Is the PC now closed
+};
+
+[Pref="media.peerconnection.enabled",
+// TODO: Use MapClass here once it's available (Bug 928114)
+// MapClass(DOMString, object)
+ JSImplementation="@mozilla.org/dom/rtcstatsreport;1"]
+interface RTCStatsReport {
+ readonly maplike<DOMString, object>;
+ [ChromeOnly]
+ readonly attribute DOMString mozPcid;
+};
diff --git a/dom/webidl/RTCTrackEvent.webidl b/dom/webidl/RTCTrackEvent.webidl
new file mode 100644
index 000000000..a87915bbe
--- /dev/null
+++ b/dom/webidl/RTCTrackEvent.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://w3c.github.io/webrtc-pc/#idl-def-RTCTrackEvent
+ */
+
+dictionary RTCTrackEventInit : EventInit {
+ required RTCRtpReceiver receiver;
+ required MediaStreamTrack track;
+ sequence<MediaStream> streams = [];
+};
+
+[Pref="media.peerconnection.enabled",
+ Constructor(DOMString type, RTCTrackEventInit eventInitDict)]
+interface RTCTrackEvent : Event {
+ readonly attribute RTCRtpReceiver receiver;
+ readonly attribute MediaStreamTrack track;
+
+// TODO: Use FrozenArray once available. (Bug 1236777)
+// readonly attribute FrozenArray<MediaStream> streams;
+
+ [Frozen, Cached, Pure]
+ readonly attribute sequence<MediaStream> streams; // workaround
+};
diff --git a/dom/webidl/RadioNodeList.webidl b/dom/webidl/RadioNodeList.webidl
new file mode 100644
index 000000000..4e533533a
--- /dev/null
+++ b/dom/webidl/RadioNodeList.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlformcontrolscollection-0
+ *
+ * © Copyright 2004-2014 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface RadioNodeList : NodeList {
+ attribute DOMString value;
+};
diff --git a/dom/webidl/Range.webidl b/dom/webidl/Range.webidl
new file mode 100644
index 000000000..ac8e1ebf0
--- /dev/null
+++ b/dom/webidl/Range.webidl
@@ -0,0 +1,98 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dom.spec.whatwg.org/#range
+ * http://domparsing.spec.whatwg.org/#dom-range-createcontextualfragment
+ * http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor]
+interface Range {
+ [Throws]
+ readonly attribute Node startContainer;
+ [Throws]
+ readonly attribute unsigned long startOffset;
+ [Throws]
+ readonly attribute Node endContainer;
+ [Throws]
+ readonly attribute unsigned long endOffset;
+ readonly attribute boolean collapsed;
+ [Throws]
+ readonly attribute Node commonAncestorContainer;
+
+ [Throws]
+ void setStart(Node refNode, unsigned long offset);
+ [Throws]
+ void setEnd(Node refNode, unsigned long offset);
+ [Throws]
+ void setStartBefore(Node refNode);
+ [Throws]
+ void setStartAfter(Node refNode);
+ [Throws]
+ void setEndBefore(Node refNode);
+ [Throws]
+ void setEndAfter(Node refNode);
+ void collapse(optional boolean toStart = false);
+ [Throws]
+ void selectNode(Node refNode);
+ [Throws]
+ void selectNodeContents(Node refNode);
+
+ const unsigned short START_TO_START = 0;
+ const unsigned short START_TO_END = 1;
+ const unsigned short END_TO_END = 2;
+ const unsigned short END_TO_START = 3;
+ [Throws]
+ short compareBoundaryPoints(unsigned short how, Range sourceRange);
+ [Throws]
+ void deleteContents();
+ [Throws]
+ DocumentFragment extractContents();
+ [Throws]
+ DocumentFragment cloneContents();
+ [Throws]
+ void insertNode(Node node);
+ [Throws]
+ void surroundContents(Node newParent);
+
+ Range cloneRange();
+ void detach();
+
+ [Throws]
+ boolean isPointInRange(Node node, unsigned long offset);
+ [Throws]
+ short comparePoint(Node node, unsigned long offset);
+
+ [Throws]
+ boolean intersectsNode(Node node);
+
+ stringifier;
+};
+
+// http://domparsing.spec.whatwg.org/#dom-range-createcontextualfragment
+partial interface Range {
+ [Throws]
+ DocumentFragment createContextualFragment(DOMString fragment);
+};
+
+// http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface
+partial interface Range {
+ DOMRectList? getClientRects();
+ DOMRect getBoundingClientRect();
+};
+
+dictionary ClientRectsAndTexts {
+ required DOMRectList rectList;
+ required DOMStringList textList;
+};
+
+partial interface Range {
+ [ChromeOnly, Throws]
+ ClientRectsAndTexts getClientRectsAndTexts();
+};
diff --git a/dom/webidl/RecordErrorEvent.webidl b/dom/webidl/RecordErrorEvent.webidl
new file mode 100644
index 000000000..c7022dbbe
--- /dev/null
+++ b/dom/webidl/RecordErrorEvent.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional RecordErrorEventInit eventInitDict)]
+interface RecordErrorEvent : Event
+{
+ readonly attribute DOMString name;
+};
+
+dictionary RecordErrorEventInit : EventInit
+{
+ DOMString name = "";
+};
diff --git a/dom/webidl/Rect.webidl b/dom/webidl/Rect.webidl
new file mode 100644
index 000000000..1be318143
--- /dev/null
+++ b/dom/webidl/Rect.webidl
@@ -0,0 +1,12 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface Rect {
+ readonly attribute CSSPrimitiveValue top;
+ readonly attribute CSSPrimitiveValue right;
+ readonly attribute CSSPrimitiveValue bottom;
+ readonly attribute CSSPrimitiveValue left;
+};
diff --git a/dom/webidl/Request.webidl b/dom/webidl/Request.webidl
new file mode 100644
index 000000000..e29c084d0
--- /dev/null
+++ b/dom/webidl/Request.webidl
@@ -0,0 +1,66 @@
+/* -*- Mode: IDL; tab-width: 1; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://fetch.spec.whatwg.org/#request-class
+ */
+
+typedef (Request or USVString) RequestInfo;
+typedef unsigned long nsContentPolicyType;
+
+[Constructor(RequestInfo input, optional RequestInit init),
+ Exposed=(Window,Worker)]
+interface Request {
+ readonly attribute ByteString method;
+ readonly attribute USVString url;
+ [SameObject] readonly attribute Headers headers;
+
+ [Func="mozilla::dom::Request::RequestContextEnabled"]
+ readonly attribute RequestContext context;
+ readonly attribute USVString referrer;
+ readonly attribute ReferrerPolicy referrerPolicy;
+ readonly attribute RequestMode mode;
+ readonly attribute RequestCredentials credentials;
+ readonly attribute RequestCache cache;
+ readonly attribute RequestRedirect redirect;
+ readonly attribute DOMString integrity;
+
+ [Throws,
+ NewObject] Request clone();
+
+ // Bug 1124638 - Allow chrome callers to set the context.
+ [ChromeOnly]
+ void overrideContentPolicyType(nsContentPolicyType context);
+};
+Request implements Body;
+
+dictionary RequestInit {
+ ByteString method;
+ HeadersInit headers;
+ BodyInit? body;
+ USVString referrer;
+ ReferrerPolicy referrerPolicy;
+ RequestMode mode;
+ RequestCredentials credentials;
+ RequestCache cache;
+ RequestRedirect redirect;
+ DOMString integrity;
+};
+
+// Gecko currently does not ship RequestContext, so please don't use it in IDL
+// that is exposed to script.
+enum RequestContext {
+ "audio", "beacon", "cspreport", "download", "embed", "eventsource", "favicon", "fetch",
+ "font", "form", "frame", "hyperlink", "iframe", "image", "imageset", "import",
+ "internal", "location", "manifest", "object", "ping", "plugin", "prefetch", "script",
+ "sharedworker", "subresource", "style", "track", "video", "worker", "xmlhttprequest",
+ "xslt"
+};
+
+enum RequestMode { "same-origin", "no-cors", "cors", "navigate" };
+enum RequestCredentials { "omit", "same-origin", "include" };
+enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" };
+enum RequestRedirect { "follow", "error", "manual" };
+enum ReferrerPolicy { "", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url" };
diff --git a/dom/webidl/Response.webidl b/dom/webidl/Response.webidl
new file mode 100644
index 000000000..8713146aa
--- /dev/null
+++ b/dom/webidl/Response.webidl
@@ -0,0 +1,39 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://fetch.spec.whatwg.org/#response-class
+ */
+
+[Constructor(optional BodyInit body, optional ResponseInit init),
+ Exposed=(Window,Worker)]
+interface Response {
+ [NewObject] static Response error();
+ [Throws,
+ NewObject] static Response redirect(USVString url, optional unsigned short status = 302);
+
+ readonly attribute ResponseType type;
+
+ readonly attribute USVString url;
+ readonly attribute boolean redirected;
+ readonly attribute unsigned short status;
+ readonly attribute boolean ok;
+ readonly attribute ByteString statusText;
+ [SameObject] readonly attribute Headers headers;
+
+ [Throws,
+ NewObject] Response clone();
+
+ [ChromeOnly, NewObject, Throws] Response cloneUnfiltered();
+};
+Response implements Body;
+
+dictionary ResponseInit {
+ unsigned short status = 200;
+ ByteString statusText = "OK";
+ HeadersInit headers;
+};
+
+enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredirect" };
diff --git a/dom/webidl/SVGAElement.webidl b/dom/webidl/SVGAElement.webidl
new file mode 100644
index 000000000..f15866911
--- /dev/null
+++ b/dom/webidl/SVGAElement.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAElement : SVGGraphicsElement {
+ readonly attribute SVGAnimatedString target;
+
+ [SetterThrows]
+ attribute DOMString download;
+};
+
+SVGAElement implements SVGURIReference;
+
diff --git a/dom/webidl/SVGAngle.webidl b/dom/webidl/SVGAngle.webidl
new file mode 100644
index 000000000..f17b8836c
--- /dev/null
+++ b/dom/webidl/SVGAngle.webidl
@@ -0,0 +1,35 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAngle {
+
+ // Angle Unit Types
+ const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
+ const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
+ const unsigned short SVG_ANGLETYPE_DEG = 2;
+ const unsigned short SVG_ANGLETYPE_RAD = 3;
+ const unsigned short SVG_ANGLETYPE_GRAD = 4;
+
+ readonly attribute unsigned short unitType;
+ [SetterThrows]
+ attribute float value;
+ [SetterThrows]
+ attribute float valueInSpecifiedUnits;
+ [SetterThrows]
+ attribute DOMString valueAsString;
+
+ [Throws]
+ void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
+ [Throws]
+ void convertToSpecifiedUnits(unsigned short unitType);
+};
+
diff --git a/dom/webidl/SVGAnimateElement.webidl b/dom/webidl/SVGAnimateElement.webidl
new file mode 100644
index 000000000..c9841f2a8
--- /dev/null
+++ b/dom/webidl/SVGAnimateElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimateElement : SVGAnimationElement {
+};
+
diff --git a/dom/webidl/SVGAnimateMotionElement.webidl b/dom/webidl/SVGAnimateMotionElement.webidl
new file mode 100644
index 000000000..38993d761
--- /dev/null
+++ b/dom/webidl/SVGAnimateMotionElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimateMotionElement : SVGAnimationElement {
+};
+
diff --git a/dom/webidl/SVGAnimateTransformElement.webidl b/dom/webidl/SVGAnimateTransformElement.webidl
new file mode 100644
index 000000000..38701e61c
--- /dev/null
+++ b/dom/webidl/SVGAnimateTransformElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimateTransformElement : SVGAnimationElement {
+};
+
diff --git a/dom/webidl/SVGAnimatedAngle.webidl b/dom/webidl/SVGAnimatedAngle.webidl
new file mode 100644
index 000000000..5b01c8c35
--- /dev/null
+++ b/dom/webidl/SVGAnimatedAngle.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedAngle {
+ [Constant]
+ readonly attribute SVGAngle baseVal;
+ [Constant]
+ readonly attribute SVGAngle animVal;
+};
+
diff --git a/dom/webidl/SVGAnimatedBoolean.webidl b/dom/webidl/SVGAnimatedBoolean.webidl
new file mode 100644
index 000000000..990bbc7de
--- /dev/null
+++ b/dom/webidl/SVGAnimatedBoolean.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedBoolean {
+ attribute boolean baseVal;
+ readonly attribute boolean animVal;
+};
+
diff --git a/dom/webidl/SVGAnimatedEnumeration.webidl b/dom/webidl/SVGAnimatedEnumeration.webidl
new file mode 100644
index 000000000..80591c2f1
--- /dev/null
+++ b/dom/webidl/SVGAnimatedEnumeration.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedEnumeration
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedEnumeration {
+ [SetterThrows]
+ attribute unsigned short baseVal;
+ readonly attribute unsigned short animVal;
+};
diff --git a/dom/webidl/SVGAnimatedInteger.webidl b/dom/webidl/SVGAnimatedInteger.webidl
new file mode 100644
index 000000000..61b43b351
--- /dev/null
+++ b/dom/webidl/SVGAnimatedInteger.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedInteger
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedInteger {
+ attribute long baseVal;
+ readonly attribute long animVal;
+};
diff --git a/dom/webidl/SVGAnimatedLength.webidl b/dom/webidl/SVGAnimatedLength.webidl
new file mode 100644
index 000000000..f7fac144d
--- /dev/null
+++ b/dom/webidl/SVGAnimatedLength.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedLength {
+ [Constant]
+ readonly attribute SVGLength baseVal;
+ [Constant]
+ readonly attribute SVGLength animVal;
+};
+
diff --git a/dom/webidl/SVGAnimatedLengthList.webidl b/dom/webidl/SVGAnimatedLengthList.webidl
new file mode 100644
index 000000000..0d85e1616
--- /dev/null
+++ b/dom/webidl/SVGAnimatedLengthList.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedLengthList {
+ [Constant]
+ readonly attribute SVGLengthList baseVal;
+ [Constant]
+ readonly attribute SVGLengthList animVal;
+};
+
diff --git a/dom/webidl/SVGAnimatedNumber.webidl b/dom/webidl/SVGAnimatedNumber.webidl
new file mode 100644
index 000000000..5908f0f86
--- /dev/null
+++ b/dom/webidl/SVGAnimatedNumber.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedNumber
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedNumber {
+ attribute float baseVal;
+ readonly attribute float animVal;
+};
diff --git a/dom/webidl/SVGAnimatedNumberList.webidl b/dom/webidl/SVGAnimatedNumberList.webidl
new file mode 100644
index 000000000..81fba2e06
--- /dev/null
+++ b/dom/webidl/SVGAnimatedNumberList.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedNumberList {
+ [Constant]
+ readonly attribute SVGNumberList baseVal;
+ [Constant]
+ readonly attribute SVGNumberList animVal;
+};
+
diff --git a/dom/webidl/SVGAnimatedPathData.webidl b/dom/webidl/SVGAnimatedPathData.webidl
new file mode 100644
index 000000000..08f10f721
--- /dev/null
+++ b/dom/webidl/SVGAnimatedPathData.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface SVGAnimatedPathData {
+ readonly attribute SVGPathSegList pathSegList;
+ //readonly attribute SVGPathSegList normalizedPathSegList;
+ readonly attribute SVGPathSegList animatedPathSegList;
+ //readonly attribute SVGPathSegList animatedNormalizedPathSegList;
+};
+
diff --git a/dom/webidl/SVGAnimatedPoints.webidl b/dom/webidl/SVGAnimatedPoints.webidl
new file mode 100644
index 000000000..891ca4bc0
--- /dev/null
+++ b/dom/webidl/SVGAnimatedPoints.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface SVGAnimatedPoints {
+ [Constant]
+ readonly attribute SVGPointList points;
+ [Constant]
+ readonly attribute SVGPointList animatedPoints;
+};
+
diff --git a/dom/webidl/SVGAnimatedPreserveAspectRatio.webidl b/dom/webidl/SVGAnimatedPreserveAspectRatio.webidl
new file mode 100644
index 000000000..07506a5bf
--- /dev/null
+++ b/dom/webidl/SVGAnimatedPreserveAspectRatio.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedPreserveAspectRatio {
+ [Constant]
+ readonly attribute SVGPreserveAspectRatio baseVal;
+ [Constant]
+ readonly attribute SVGPreserveAspectRatio animVal;
+};
+
diff --git a/dom/webidl/SVGAnimatedRect.webidl b/dom/webidl/SVGAnimatedRect.webidl
new file mode 100644
index 000000000..fffebbe88
--- /dev/null
+++ b/dom/webidl/SVGAnimatedRect.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedRect {
+ readonly attribute SVGRect? baseVal;
+ readonly attribute SVGRect? animVal;
+};
diff --git a/dom/webidl/SVGAnimatedString.webidl b/dom/webidl/SVGAnimatedString.webidl
new file mode 100644
index 000000000..eaf3773d0
--- /dev/null
+++ b/dom/webidl/SVGAnimatedString.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedString {
+ attribute DOMString baseVal;
+ readonly attribute DOMString animVal;
+};
diff --git a/dom/webidl/SVGAnimatedTransformList.webidl b/dom/webidl/SVGAnimatedTransformList.webidl
new file mode 100644
index 000000000..3ea39d130
--- /dev/null
+++ b/dom/webidl/SVGAnimatedTransformList.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedTransformList {
+ [Constant]
+ readonly attribute SVGTransformList baseVal;
+ [Constant]
+ readonly attribute SVGTransformList animVal;
+};
+
diff --git a/dom/webidl/SVGAnimationElement.webidl b/dom/webidl/SVGAnimationElement.webidl
new file mode 100644
index 000000000..4f9a95fe3
--- /dev/null
+++ b/dom/webidl/SVGAnimationElement.webidl
@@ -0,0 +1,34 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimationElement : SVGElement {
+
+ readonly attribute SVGElement? targetElement;
+
+ [Throws]
+ float getStartTime();
+ float getCurrentTime();
+ [Throws]
+ float getSimpleDuration();
+
+ [Throws]
+ void beginElement();
+ [Throws]
+ void beginElementAt(float offset);
+ [Throws]
+ void endElement();
+ [Throws]
+ void endElementAt(float offset);
+};
+
+SVGAnimationElement implements SVGTests;
+
diff --git a/dom/webidl/SVGCircleElement.webidl b/dom/webidl/SVGCircleElement.webidl
new file mode 100644
index 000000000..1fd19377a
--- /dev/null
+++ b/dom/webidl/SVGCircleElement.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGCircleElement : SVGGraphicsElement {
+ [Constant]
+ readonly attribute SVGAnimatedLength cx;
+ [Constant]
+ readonly attribute SVGAnimatedLength cy;
+ [Constant]
+ readonly attribute SVGAnimatedLength r;
+};
+
diff --git a/dom/webidl/SVGClipPathElement.webidl b/dom/webidl/SVGClipPathElement.webidl
new file mode 100644
index 000000000..b6c5081e4
--- /dev/null
+++ b/dom/webidl/SVGClipPathElement.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGClipPathElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration clipPathUnits;
+ [Constant]
+ readonly attribute SVGAnimatedTransformList transform;
+};
+
+SVGClipPathElement implements SVGUnitTypeValues;
+
diff --git a/dom/webidl/SVGComponentTransferFunctionElement.webidl b/dom/webidl/SVGComponentTransferFunctionElement.webidl
new file mode 100644
index 000000000..1842fe6f5
--- /dev/null
+++ b/dom/webidl/SVGComponentTransferFunctionElement.webidl
@@ -0,0 +1,36 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGComponentTransferFunctionElement : SVGElement {
+ // Component Transfer Types
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
+
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration type;
+ [Constant]
+ readonly attribute SVGAnimatedNumberList tableValues;
+ [Constant]
+ readonly attribute SVGAnimatedNumber slope;
+ [Constant]
+ readonly attribute SVGAnimatedNumber intercept;
+ [Constant]
+ readonly attribute SVGAnimatedNumber amplitude;
+ [Constant]
+ readonly attribute SVGAnimatedNumber exponent;
+ [Constant]
+ readonly attribute SVGAnimatedNumber offset;
+};
diff --git a/dom/webidl/SVGDefsElement.webidl b/dom/webidl/SVGDefsElement.webidl
new file mode 100644
index 000000000..0b37978b4
--- /dev/null
+++ b/dom/webidl/SVGDefsElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGDefsElement : SVGGraphicsElement {
+};
+
diff --git a/dom/webidl/SVGDescElement.webidl b/dom/webidl/SVGDescElement.webidl
new file mode 100644
index 000000000..1841ff545
--- /dev/null
+++ b/dom/webidl/SVGDescElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGDescElement : SVGElement {
+};
+
diff --git a/dom/webidl/SVGElement.webidl b/dom/webidl/SVGElement.webidl
new file mode 100644
index 000000000..8de42f7e5
--- /dev/null
+++ b/dom/webidl/SVGElement.webidl
@@ -0,0 +1,37 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGElement : Element {
+ attribute DOMString id;
+
+ [Constant]
+ readonly attribute SVGAnimatedString className;
+ [SameObject] readonly attribute DOMStringMap dataset;
+ [PutForwards=cssText, Constant]
+ readonly attribute CSSStyleDeclaration style;
+
+ readonly attribute SVGSVGElement? ownerSVGElement;
+ readonly attribute SVGElement? viewportElement;
+
+ attribute EventHandler oncopy;
+ attribute EventHandler oncut;
+ attribute EventHandler onpaste;
+
+ [SetterThrows, Pure]
+ attribute long tabIndex;
+ [Throws] void focus();
+ [Throws] void blur();
+};
+
+SVGElement implements GlobalEventHandlers;
+SVGElement implements TouchEventHandlers;
+SVGElement implements OnErrorEventHandlerForNodes;
diff --git a/dom/webidl/SVGEllipseElement.webidl b/dom/webidl/SVGEllipseElement.webidl
new file mode 100644
index 000000000..b039a05b4
--- /dev/null
+++ b/dom/webidl/SVGEllipseElement.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGEllipseElement : SVGGraphicsElement {
+ [Constant]
+ readonly attribute SVGAnimatedLength cx;
+ [Constant]
+ readonly attribute SVGAnimatedLength cy;
+ [Constant]
+ readonly attribute SVGAnimatedLength rx;
+ [Constant]
+ readonly attribute SVGAnimatedLength ry;
+};
+
diff --git a/dom/webidl/SVGFEBlendElement.webidl b/dom/webidl/SVGFEBlendElement.webidl
new file mode 100644
index 000000000..5cd469bd5
--- /dev/null
+++ b/dom/webidl/SVGFEBlendElement.webidl
@@ -0,0 +1,41 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEBlendElement : SVGElement {
+
+ // Blend Mode Types
+ const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0;
+ const unsigned short SVG_FEBLEND_MODE_NORMAL = 1;
+ const unsigned short SVG_FEBLEND_MODE_MULTIPLY = 2;
+ const unsigned short SVG_FEBLEND_MODE_SCREEN = 3;
+ const unsigned short SVG_FEBLEND_MODE_DARKEN = 4;
+ const unsigned short SVG_FEBLEND_MODE_LIGHTEN = 5;
+ const unsigned short SVG_FEBLEND_MODE_OVERLAY = 6;
+ const unsigned short SVG_FEBLEND_MODE_COLOR_DODGE = 7;
+ const unsigned short SVG_FEBLEND_MODE_COLOR_BURN = 8;
+ const unsigned short SVG_FEBLEND_MODE_HARD_LIGHT = 9;
+ const unsigned short SVG_FEBLEND_MODE_SOFT_LIGHT = 10;
+ const unsigned short SVG_FEBLEND_MODE_DIFFERENCE = 11;
+ const unsigned short SVG_FEBLEND_MODE_EXCLUSION = 12;
+ const unsigned short SVG_FEBLEND_MODE_HUE = 13;
+ const unsigned short SVG_FEBLEND_MODE_SATURATION = 14;
+ const unsigned short SVG_FEBLEND_MODE_COLOR = 15;
+ const unsigned short SVG_FEBLEND_MODE_LUMINOSITY = 16;
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedString in2;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration mode;
+};
+
+SVGFEBlendElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEColorMatrixElement.webidl b/dom/webidl/SVGFEColorMatrixElement.webidl
new file mode 100644
index 000000000..61d91040d
--- /dev/null
+++ b/dom/webidl/SVGFEColorMatrixElement.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEColorMatrixElement : SVGElement {
+
+ // Color Matrix Types
+ const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
+
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration type;
+ [Constant]
+ readonly attribute SVGAnimatedNumberList values;
+};
+
+SVGFEColorMatrixElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEComponentTransferElement.webidl b/dom/webidl/SVGFEComponentTransferElement.webidl
new file mode 100644
index 000000000..6cf6f6d65
--- /dev/null
+++ b/dom/webidl/SVGFEComponentTransferElement.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEComponentTransferElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+};
+
+SVGFEComponentTransferElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFECompositeElement.webidl b/dom/webidl/SVGFECompositeElement.webidl
new file mode 100644
index 000000000..3ab983fe0
--- /dev/null
+++ b/dom/webidl/SVGFECompositeElement.webidl
@@ -0,0 +1,40 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFECompositeElement : SVGElement {
+
+ // Composite Operators
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER = 1;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_IN = 2;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_OUT = 3;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_XOR = 5;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
+
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedString in2;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration operator;
+ [Constant]
+ readonly attribute SVGAnimatedNumber k1;
+ [Constant]
+ readonly attribute SVGAnimatedNumber k2;
+ [Constant]
+ readonly attribute SVGAnimatedNumber k3;
+ [Constant]
+ readonly attribute SVGAnimatedNumber k4;
+};
+
+SVGFECompositeElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEConvolveMatrixElement.webidl b/dom/webidl/SVGFEConvolveMatrixElement.webidl
new file mode 100644
index 000000000..27d8e80e7
--- /dev/null
+++ b/dom/webidl/SVGFEConvolveMatrixElement.webidl
@@ -0,0 +1,47 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEConvolveMatrixElement : SVGElement {
+
+ // Edge Mode Values
+ const unsigned short SVG_EDGEMODE_UNKNOWN = 0;
+ const unsigned short SVG_EDGEMODE_DUPLICATE = 1;
+ const unsigned short SVG_EDGEMODE_WRAP = 2;
+ const unsigned short SVG_EDGEMODE_NONE = 3;
+
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedInteger orderX;
+ [Constant]
+ readonly attribute SVGAnimatedInteger orderY;
+ [Constant]
+ readonly attribute SVGAnimatedNumberList kernelMatrix;
+ [Constant]
+ readonly attribute SVGAnimatedNumber divisor;
+ [Constant]
+ readonly attribute SVGAnimatedNumber bias;
+ [Constant]
+ readonly attribute SVGAnimatedInteger targetX;
+ [Constant]
+ readonly attribute SVGAnimatedInteger targetY;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration edgeMode;
+ [Constant]
+ readonly attribute SVGAnimatedNumber kernelUnitLengthX;
+ [Constant]
+ readonly attribute SVGAnimatedNumber kernelUnitLengthY;
+ [Constant]
+ readonly attribute SVGAnimatedBoolean preserveAlpha;
+};
+
+SVGFEConvolveMatrixElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEDiffuseLightingElement.webidl b/dom/webidl/SVGFEDiffuseLightingElement.webidl
new file mode 100644
index 000000000..fb89721d8
--- /dev/null
+++ b/dom/webidl/SVGFEDiffuseLightingElement.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEDiffuseLightingElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedNumber surfaceScale;
+ [Constant]
+ readonly attribute SVGAnimatedNumber diffuseConstant;
+ [Constant]
+ readonly attribute SVGAnimatedNumber kernelUnitLengthX;
+ [Constant]
+ readonly attribute SVGAnimatedNumber kernelUnitLengthY;
+};
+
+SVGFEDiffuseLightingElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEDisplacementMapElement.webidl b/dom/webidl/SVGFEDisplacementMapElement.webidl
new file mode 100644
index 000000000..461faff91
--- /dev/null
+++ b/dom/webidl/SVGFEDisplacementMapElement.webidl
@@ -0,0 +1,34 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEDisplacementMapElement : SVGElement {
+
+ // Channel Selectors
+ const unsigned short SVG_CHANNEL_UNKNOWN = 0;
+ const unsigned short SVG_CHANNEL_R = 1;
+ const unsigned short SVG_CHANNEL_G = 2;
+ const unsigned short SVG_CHANNEL_B = 3;
+ const unsigned short SVG_CHANNEL_A = 4;
+
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedString in2;
+ [Constant]
+ readonly attribute SVGAnimatedNumber scale;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration xChannelSelector;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration yChannelSelector;
+};
+
+SVGFEDisplacementMapElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEDistantLightElement.webidl b/dom/webidl/SVGFEDistantLightElement.webidl
new file mode 100644
index 000000000..933befc93
--- /dev/null
+++ b/dom/webidl/SVGFEDistantLightElement.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEDistantLightElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedNumber azimuth;
+ [Constant]
+ readonly attribute SVGAnimatedNumber elevation;
+};
diff --git a/dom/webidl/SVGFEDropShadowElement.webidl b/dom/webidl/SVGFEDropShadowElement.webidl
new file mode 100644
index 000000000..b858fc91c
--- /dev/null
+++ b/dom/webidl/SVGFEDropShadowElement.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEDropShadowElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedNumber dx;
+ [Constant]
+ readonly attribute SVGAnimatedNumber dy;
+ [Constant]
+ readonly attribute SVGAnimatedNumber stdDeviationX;
+ [Constant]
+ readonly attribute SVGAnimatedNumber stdDeviationY;
+
+ void setStdDeviation(float stdDeviationX, float stdDeviationY);
+};
+
+SVGFEDropShadowElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEFloodElement.webidl b/dom/webidl/SVGFEFloodElement.webidl
new file mode 100644
index 000000000..51d9539ff
--- /dev/null
+++ b/dom/webidl/SVGFEFloodElement.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEFloodElement : SVGElement {
+};
+
+SVGFEFloodElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEFuncAElement.webidl b/dom/webidl/SVGFEFuncAElement.webidl
new file mode 100644
index 000000000..97282cd19
--- /dev/null
+++ b/dom/webidl/SVGFEFuncAElement.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEFuncAElement : SVGComponentTransferFunctionElement {
+};
diff --git a/dom/webidl/SVGFEFuncBElement.webidl b/dom/webidl/SVGFEFuncBElement.webidl
new file mode 100644
index 000000000..8b5c2b925
--- /dev/null
+++ b/dom/webidl/SVGFEFuncBElement.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEFuncBElement : SVGComponentTransferFunctionElement {
+};
diff --git a/dom/webidl/SVGFEFuncGElement.webidl b/dom/webidl/SVGFEFuncGElement.webidl
new file mode 100644
index 000000000..39d2f3059
--- /dev/null
+++ b/dom/webidl/SVGFEFuncGElement.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEFuncGElement : SVGComponentTransferFunctionElement {
+};
diff --git a/dom/webidl/SVGFEFuncRElement.webidl b/dom/webidl/SVGFEFuncRElement.webidl
new file mode 100644
index 000000000..78e492be4
--- /dev/null
+++ b/dom/webidl/SVGFEFuncRElement.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEFuncRElement : SVGComponentTransferFunctionElement {
+};
diff --git a/dom/webidl/SVGFEGaussianBlurElement.webidl b/dom/webidl/SVGFEGaussianBlurElement.webidl
new file mode 100644
index 000000000..db2101b53
--- /dev/null
+++ b/dom/webidl/SVGFEGaussianBlurElement.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEGaussianBlurElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedNumber stdDeviationX;
+ [Constant]
+ readonly attribute SVGAnimatedNumber stdDeviationY;
+
+ void setStdDeviation(float stdDeviationX, float stdDeviationY);
+};
+
+SVGFEGaussianBlurElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEImageElement.webidl b/dom/webidl/SVGFEImageElement.webidl
new file mode 100644
index 000000000..3262c0d8a
--- /dev/null
+++ b/dom/webidl/SVGFEImageElement.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEImageElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+};
+
+SVGFEImageElement implements SVGFilterPrimitiveStandardAttributes;
+SVGFEImageElement implements SVGURIReference;
diff --git a/dom/webidl/SVGFEMergeElement.webidl b/dom/webidl/SVGFEMergeElement.webidl
new file mode 100644
index 000000000..adafbba9a
--- /dev/null
+++ b/dom/webidl/SVGFEMergeElement.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEMergeElement : SVGElement {
+};
+
+SVGFEMergeElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEMergeNodeElement.webidl b/dom/webidl/SVGFEMergeNodeElement.webidl
new file mode 100644
index 000000000..4ff217ba7
--- /dev/null
+++ b/dom/webidl/SVGFEMergeNodeElement.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEMergeNodeElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+};
diff --git a/dom/webidl/SVGFEMorphologyElement.webidl b/dom/webidl/SVGFEMorphologyElement.webidl
new file mode 100644
index 000000000..82910a6fa
--- /dev/null
+++ b/dom/webidl/SVGFEMorphologyElement.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEMorphologyElement : SVGElement {
+
+ // Morphology Operators
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
+
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration operator;
+ [Constant]
+ readonly attribute SVGAnimatedNumber radiusX;
+ [Constant]
+ readonly attribute SVGAnimatedNumber radiusY;
+};
+
+SVGFEMorphologyElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEOffsetElement.webidl b/dom/webidl/SVGFEOffsetElement.webidl
new file mode 100644
index 000000000..90132d528
--- /dev/null
+++ b/dom/webidl/SVGFEOffsetElement.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEOffsetElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedNumber dx;
+ [Constant]
+ readonly attribute SVGAnimatedNumber dy;
+};
+
+SVGFEOffsetElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFEPointLightElement.webidl b/dom/webidl/SVGFEPointLightElement.webidl
new file mode 100644
index 000000000..232edc45d
--- /dev/null
+++ b/dom/webidl/SVGFEPointLightElement.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEPointLightElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedNumber x;
+ [Constant]
+ readonly attribute SVGAnimatedNumber y;
+ [Constant]
+ readonly attribute SVGAnimatedNumber z;
+};
diff --git a/dom/webidl/SVGFESpecularLightingElement.webidl b/dom/webidl/SVGFESpecularLightingElement.webidl
new file mode 100644
index 000000000..42b6b0e9c
--- /dev/null
+++ b/dom/webidl/SVGFESpecularLightingElement.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFESpecularLightingElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+ [Constant]
+ readonly attribute SVGAnimatedNumber surfaceScale;
+ [Constant]
+ readonly attribute SVGAnimatedNumber specularConstant;
+ [Constant]
+ readonly attribute SVGAnimatedNumber specularExponent;
+ [Constant]
+ readonly attribute SVGAnimatedNumber kernelUnitLengthX;
+ [Constant]
+ readonly attribute SVGAnimatedNumber kernelUnitLengthY;
+};
+
+SVGFESpecularLightingElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFESpotLightElement.webidl b/dom/webidl/SVGFESpotLightElement.webidl
new file mode 100644
index 000000000..281d20c8c
--- /dev/null
+++ b/dom/webidl/SVGFESpotLightElement.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFESpotLightElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedNumber x;
+ [Constant]
+ readonly attribute SVGAnimatedNumber y;
+ [Constant]
+ readonly attribute SVGAnimatedNumber z;
+ [Constant]
+ readonly attribute SVGAnimatedNumber pointsAtX;
+ [Constant]
+ readonly attribute SVGAnimatedNumber pointsAtY;
+ [Constant]
+ readonly attribute SVGAnimatedNumber pointsAtZ;
+ [Constant]
+ readonly attribute SVGAnimatedNumber specularExponent;
+ [Constant]
+ readonly attribute SVGAnimatedNumber limitingConeAngle;
+};
diff --git a/dom/webidl/SVGFETileElement.webidl b/dom/webidl/SVGFETileElement.webidl
new file mode 100644
index 000000000..38cad6040
--- /dev/null
+++ b/dom/webidl/SVGFETileElement.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFETileElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedString in1;
+};
+
+SVGFETileElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFETurbulenceElement.webidl b/dom/webidl/SVGFETurbulenceElement.webidl
new file mode 100644
index 000000000..45c9d468b
--- /dev/null
+++ b/dom/webidl/SVGFETurbulenceElement.webidl
@@ -0,0 +1,39 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFETurbulenceElement : SVGElement {
+
+ // Turbulence Types
+ const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
+ const unsigned short SVG_TURBULENCE_TYPE_TURBULENCE = 2;
+
+ // Stitch Options
+ const unsigned short SVG_STITCHTYPE_UNKNOWN = 0;
+ const unsigned short SVG_STITCHTYPE_STITCH = 1;
+ const unsigned short SVG_STITCHTYPE_NOSTITCH = 2;
+
+ [Constant]
+ readonly attribute SVGAnimatedNumber baseFrequencyX;
+ [Constant]
+ readonly attribute SVGAnimatedNumber baseFrequencyY;
+ [Constant]
+ readonly attribute SVGAnimatedInteger numOctaves;
+ [Constant]
+ readonly attribute SVGAnimatedNumber seed;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration stitchTiles;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration type;
+};
+
+SVGFETurbulenceElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/dom/webidl/SVGFilterElement.webidl b/dom/webidl/SVGFilterElement.webidl
new file mode 100644
index 000000000..aa4d4d196
--- /dev/null
+++ b/dom/webidl/SVGFilterElement.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFilterElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration filterUnits;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration primitiveUnits;
+ [Constant]
+ readonly attribute SVGAnimatedLength x;
+ [Constant]
+ readonly attribute SVGAnimatedLength y;
+ [Constant]
+ readonly attribute SVGAnimatedLength width;
+ [Constant]
+ readonly attribute SVGAnimatedLength height;
+
+ // ImageData apply(ImageData source);
+};
+
+SVGFilterElement implements SVGURIReference;
+SVGFilterElement implements SVGUnitTypeValues;
+
diff --git a/dom/webidl/SVGFilterPrimitiveStandardAttributes.webidl b/dom/webidl/SVGFilterPrimitiveStandardAttributes.webidl
new file mode 100644
index 000000000..331950586
--- /dev/null
+++ b/dom/webidl/SVGFilterPrimitiveStandardAttributes.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface SVGFilterPrimitiveStandardAttributes {
+ [Constant]
+ readonly attribute SVGAnimatedLength x;
+ [Constant]
+ readonly attribute SVGAnimatedLength y;
+ [Constant]
+ readonly attribute SVGAnimatedLength width;
+ [Constant]
+ readonly attribute SVGAnimatedLength height;
+ [Constant]
+ readonly attribute SVGAnimatedString result;
+};
diff --git a/dom/webidl/SVGFitToViewBox.webidl b/dom/webidl/SVGFitToViewBox.webidl
new file mode 100644
index 000000000..881e658d2
--- /dev/null
+++ b/dom/webidl/SVGFitToViewBox.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface SVGFitToViewBox {
+ [Constant]
+ readonly attribute SVGAnimatedRect viewBox;
+ [Constant]
+ readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+};
+
diff --git a/dom/webidl/SVGForeignObjectElement.webidl b/dom/webidl/SVGForeignObjectElement.webidl
new file mode 100644
index 000000000..6829f4501
--- /dev/null
+++ b/dom/webidl/SVGForeignObjectElement.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGForeignObjectElement : SVGGraphicsElement {
+ [Constant]
+ readonly attribute SVGAnimatedLength x;
+ [Constant]
+ readonly attribute SVGAnimatedLength y;
+ [Constant]
+ readonly attribute SVGAnimatedLength width;
+ [Constant]
+ readonly attribute SVGAnimatedLength height;
+};
+
diff --git a/dom/webidl/SVGGElement.webidl b/dom/webidl/SVGGElement.webidl
new file mode 100644
index 000000000..8d690677e
--- /dev/null
+++ b/dom/webidl/SVGGElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGGElement : SVGGraphicsElement {
+};
+
diff --git a/dom/webidl/SVGGradientElement.webidl b/dom/webidl/SVGGradientElement.webidl
new file mode 100644
index 000000000..e1e969061
--- /dev/null
+++ b/dom/webidl/SVGGradientElement.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://svgwg.org/svg2-draft/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGGradientElement : SVGElement {
+
+ // Spread Method Types
+ const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
+ const unsigned short SVG_SPREADMETHOD_PAD = 1;
+ const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
+ const unsigned short SVG_SPREADMETHOD_REPEAT = 3;
+
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration gradientUnits;
+ [Constant]
+ readonly attribute SVGAnimatedTransformList gradientTransform;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration spreadMethod;
+};
+
+SVGGradientElement implements SVGURIReference;
+SVGGradientElement implements SVGUnitTypeValues;
diff --git a/dom/webidl/SVGGraphicsElement.webidl b/dom/webidl/SVGGraphicsElement.webidl
new file mode 100644
index 000000000..74af1f673
--- /dev/null
+++ b/dom/webidl/SVGGraphicsElement.webidl
@@ -0,0 +1,36 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+dictionary SVGBoundingBoxOptions {
+ boolean fill = true;
+ boolean stroke = false;
+ boolean markers = false;
+ boolean clipped = false;
+};
+
+interface SVGGraphicsElement : SVGElement {
+ readonly attribute SVGAnimatedTransformList transform;
+
+ readonly attribute SVGElement? nearestViewportElement;
+ readonly attribute SVGElement? farthestViewportElement;
+
+ [NewObject, Throws]
+ SVGRect getBBox(optional SVGBoundingBoxOptions aOptions);
+ // Not implemented
+ // SVGRect getStrokeBBox();
+ SVGMatrix? getCTM();
+ SVGMatrix? getScreenCTM();
+ [Throws]
+ SVGMatrix getTransformToElement(SVGGraphicsElement element);
+};
+
+SVGGraphicsElement implements SVGTests;
diff --git a/dom/webidl/SVGImageElement.webidl b/dom/webidl/SVGImageElement.webidl
new file mode 100644
index 000000000..67dab60f5
--- /dev/null
+++ b/dom/webidl/SVGImageElement.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGImageElement : SVGGraphicsElement {
+ [Constant]
+ readonly attribute SVGAnimatedLength x;
+ [Constant]
+ readonly attribute SVGAnimatedLength y;
+ [Constant]
+ readonly attribute SVGAnimatedLength width;
+ [Constant]
+ readonly attribute SVGAnimatedLength height;
+ [Constant]
+ readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+};
+
+SVGImageElement implements MozImageLoadingContent;
+SVGImageElement implements SVGURIReference;
+
diff --git a/dom/webidl/SVGLength.webidl b/dom/webidl/SVGLength.webidl
new file mode 100644
index 000000000..6d56132db
--- /dev/null
+++ b/dom/webidl/SVGLength.webidl
@@ -0,0 +1,40 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGLength {
+
+ // Length Unit Types
+ const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0;
+ const unsigned short SVG_LENGTHTYPE_NUMBER = 1;
+ const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
+ const unsigned short SVG_LENGTHTYPE_EMS = 3;
+ const unsigned short SVG_LENGTHTYPE_EXS = 4;
+ const unsigned short SVG_LENGTHTYPE_PX = 5;
+ const unsigned short SVG_LENGTHTYPE_CM = 6;
+ const unsigned short SVG_LENGTHTYPE_MM = 7;
+ const unsigned short SVG_LENGTHTYPE_IN = 8;
+ const unsigned short SVG_LENGTHTYPE_PT = 9;
+ const unsigned short SVG_LENGTHTYPE_PC = 10;
+
+ readonly attribute unsigned short unitType;
+ [Throws]
+ attribute float value;
+ [SetterThrows]
+ attribute float valueInSpecifiedUnits;
+ [SetterThrows]
+ attribute DOMString valueAsString;
+
+ [Throws]
+ void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
+ [Throws]
+ void convertToSpecifiedUnits(unsigned short unitType);
+};
diff --git a/dom/webidl/SVGLengthList.webidl b/dom/webidl/SVGLengthList.webidl
new file mode 100644
index 000000000..c4fab44e4
--- /dev/null
+++ b/dom/webidl/SVGLengthList.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG11/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGLengthList {
+ readonly attribute unsigned long numberOfItems;
+ [Throws]
+ void clear();
+ [Throws]
+ SVGLength initialize(SVGLength newItem);
+ [Throws]
+ getter SVGLength getItem(unsigned long index);
+ [Throws]
+ SVGLength insertItemBefore(SVGLength newItem, unsigned long index);
+ [Throws]
+ SVGLength replaceItem(SVGLength newItem, unsigned long index);
+ [Throws]
+ SVGLength removeItem(unsigned long index);
+ [Throws]
+ SVGLength appendItem(SVGLength newItem);
+
+ // Mozilla-specific stuff
+ readonly attribute unsigned long length; // synonym for numberOfItems
+};
diff --git a/dom/webidl/SVGLineElement.webidl b/dom/webidl/SVGLineElement.webidl
new file mode 100644
index 000000000..a03920d60
--- /dev/null
+++ b/dom/webidl/SVGLineElement.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGLineElement : SVGGraphicsElement {
+ [Constant]
+ readonly attribute SVGAnimatedLength x1;
+ [Constant]
+ readonly attribute SVGAnimatedLength y1;
+ [Constant]
+ readonly attribute SVGAnimatedLength x2;
+ [Constant]
+ readonly attribute SVGAnimatedLength y2;
+};
+
diff --git a/dom/webidl/SVGLinearGradientElement.webidl b/dom/webidl/SVGLinearGradientElement.webidl
new file mode 100644
index 000000000..200bc47e6
--- /dev/null
+++ b/dom/webidl/SVGLinearGradientElement.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://svgwg.org/svg2-draft/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGLinearGradientElement : SVGGradientElement {
+ [Constant]
+ readonly attribute SVGAnimatedLength x1;
+ [Constant]
+ readonly attribute SVGAnimatedLength y1;
+ [Constant]
+ readonly attribute SVGAnimatedLength x2;
+ [Constant]
+ readonly attribute SVGAnimatedLength y2;
+};
diff --git a/dom/webidl/SVGMPathElement.webidl b/dom/webidl/SVGMPathElement.webidl
new file mode 100644
index 000000000..7165b6cf7
--- /dev/null
+++ b/dom/webidl/SVGMPathElement.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGMPathElement : SVGElement {
+};
+
+SVGMPathElement implements SVGURIReference;
+
diff --git a/dom/webidl/SVGMarkerElement.webidl b/dom/webidl/SVGMarkerElement.webidl
new file mode 100644
index 000000000..a4f819b2d
--- /dev/null
+++ b/dom/webidl/SVGMarkerElement.webidl
@@ -0,0 +1,46 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGMarkerElement : SVGElement {
+
+ // Marker Unit Types
+ const unsigned short SVG_MARKERUNITS_UNKNOWN = 0;
+ const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
+ const unsigned short SVG_MARKERUNITS_STROKEWIDTH = 2;
+
+ // Marker Orientation Types
+ const unsigned short SVG_MARKER_ORIENT_UNKNOWN = 0;
+ const unsigned short SVG_MARKER_ORIENT_AUTO = 1;
+ const unsigned short SVG_MARKER_ORIENT_ANGLE = 2;
+
+ [Constant]
+ readonly attribute SVGAnimatedLength refX;
+ [Constant]
+ readonly attribute SVGAnimatedLength refY;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration markerUnits;
+ [Constant]
+ readonly attribute SVGAnimatedLength markerWidth;
+ [Constant]
+ readonly attribute SVGAnimatedLength markerHeight;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration orientType;
+ [Constant]
+ readonly attribute SVGAnimatedAngle orientAngle;
+
+ void setOrientToAuto();
+ [Throws]
+ void setOrientToAngle(SVGAngle angle);
+};
+
+SVGMarkerElement implements SVGFitToViewBox;
+
diff --git a/dom/webidl/SVGMaskElement.webidl b/dom/webidl/SVGMaskElement.webidl
new file mode 100644
index 000000000..3b00b0d55
--- /dev/null
+++ b/dom/webidl/SVGMaskElement.webidl
@@ -0,0 +1,34 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGMaskElement : SVGElement {
+
+ // Mask Types
+ const unsigned short SVG_MASKTYPE_LUMINANCE = 0;
+ const unsigned short SVG_MASKTYPE_ALPHA = 1;
+
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration maskUnits;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration maskContentUnits;
+ [Constant]
+ readonly attribute SVGAnimatedLength x;
+ [Constant]
+ readonly attribute SVGAnimatedLength y;
+ [Constant]
+ readonly attribute SVGAnimatedLength width;
+ [Constant]
+ readonly attribute SVGAnimatedLength height;
+};
+
+SVGMaskElement implements SVGUnitTypeValues;
+
diff --git a/dom/webidl/SVGMatrix.webidl b/dom/webidl/SVGMatrix.webidl
new file mode 100644
index 000000000..3ede75cc7
--- /dev/null
+++ b/dom/webidl/SVGMatrix.webidl
@@ -0,0 +1,51 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGMatrix {
+
+ [SetterThrows]
+ attribute float a;
+ [SetterThrows]
+ attribute float b;
+ [SetterThrows]
+ attribute float c;
+ [SetterThrows]
+ attribute float d;
+ [SetterThrows]
+ attribute float e;
+ [SetterThrows]
+ attribute float f;
+
+ [NewObject]
+ SVGMatrix multiply(SVGMatrix secondMatrix);
+ [NewObject, Throws]
+ SVGMatrix inverse();
+ [NewObject]
+ SVGMatrix translate(float x, float y);
+ [NewObject]
+ SVGMatrix scale(float scaleFactor);
+ [NewObject]
+ SVGMatrix scaleNonUniform(float scaleFactorX, float scaleFactorY);
+ [NewObject]
+ SVGMatrix rotate(float angle);
+ [NewObject, Throws]
+ SVGMatrix rotateFromVector(float x, float y);
+ [NewObject]
+ SVGMatrix flipX();
+ [NewObject]
+ SVGMatrix flipY();
+ [NewObject, Throws]
+ SVGMatrix skewX(float angle);
+ [NewObject, Throws]
+ SVGMatrix skewY(float angle);
+};
+
diff --git a/dom/webidl/SVGMetadataElement.webidl b/dom/webidl/SVGMetadataElement.webidl
new file mode 100644
index 000000000..1c404f91f
--- /dev/null
+++ b/dom/webidl/SVGMetadataElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGMetadataElement : SVGElement {
+};
+
diff --git a/dom/webidl/SVGNumber.webidl b/dom/webidl/SVGNumber.webidl
new file mode 100644
index 000000000..01011e6a6
--- /dev/null
+++ b/dom/webidl/SVGNumber.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor,
+ Constructor(float value)]
+interface SVGNumber {
+ [SetterThrows]
+ attribute float value;
+};
diff --git a/dom/webidl/SVGNumberList.webidl b/dom/webidl/SVGNumberList.webidl
new file mode 100644
index 000000000..b4247d337
--- /dev/null
+++ b/dom/webidl/SVGNumberList.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG11/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGNumberList {
+ readonly attribute unsigned long numberOfItems;
+ [Throws]
+ void clear();
+ [Throws]
+ SVGNumber initialize(SVGNumber newItem);
+ [Throws]
+ getter SVGNumber getItem(unsigned long index);
+ [Throws]
+ SVGNumber insertItemBefore(SVGNumber newItem, unsigned long index);
+ [Throws]
+ SVGNumber replaceItem(SVGNumber newItem, unsigned long index);
+ [Throws]
+ SVGNumber removeItem(unsigned long index);
+ [Throws]
+ SVGNumber appendItem(SVGNumber newItem);
+
+ // Mozilla-specific stuff
+ readonly attribute unsigned long length; // synonym for numberOfItems
+};
diff --git a/dom/webidl/SVGPathElement.webidl b/dom/webidl/SVGPathElement.webidl
new file mode 100644
index 000000000..08a9904ec
--- /dev/null
+++ b/dom/webidl/SVGPathElement.webidl
@@ -0,0 +1,62 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+interface SVGPathElement : SVGGraphicsElement {
+
+ [Constant]
+ readonly attribute SVGAnimatedNumber pathLength;
+
+ float getTotalLength();
+ [NewObject, Throws]
+ SVGPoint getPointAtLength(float distance);
+ unsigned long getPathSegAtLength(float distance);
+ [NewObject]
+ SVGPathSegClosePath createSVGPathSegClosePath();
+ [NewObject]
+ SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(float x, float y);
+ [NewObject]
+ SVGPathSegMovetoRel createSVGPathSegMovetoRel(float x, float y);
+ [NewObject]
+ SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(float x, float y);
+ [NewObject]
+ SVGPathSegLinetoRel createSVGPathSegLinetoRel(float x, float y);
+ [NewObject]
+ SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2);
+ [NewObject]
+ SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2);
+ [NewObject]
+ SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1);
+ [NewObject]
+ SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1);
+ [NewObject]
+ SVGPathSegArcAbs createSVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag);
+ [NewObject]
+ SVGPathSegArcRel createSVGPathSegArcRel(float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag);
+ [NewObject]
+ SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(float x);
+ [NewObject]
+ SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(float x);
+ [NewObject]
+ SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(float y);
+ [NewObject]
+ SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(float y);
+ [NewObject]
+ SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2);
+ [NewObject]
+ SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2);
+ [NewObject]
+ SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y);
+ [NewObject]
+ SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(float x, float y);
+};
+
+SVGPathElement implements SVGAnimatedPathData;
+
diff --git a/dom/webidl/SVGPathSeg.webidl b/dom/webidl/SVGPathSeg.webidl
new file mode 100644
index 000000000..b5ff1abd6
--- /dev/null
+++ b/dom/webidl/SVGPathSeg.webidl
@@ -0,0 +1,215 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGPathSeg {
+
+ // Path Segment Types
+ const unsigned short PATHSEG_UNKNOWN = 0;
+ const unsigned short PATHSEG_CLOSEPATH = 1;
+ const unsigned short PATHSEG_MOVETO_ABS = 2;
+ const unsigned short PATHSEG_MOVETO_REL = 3;
+ const unsigned short PATHSEG_LINETO_ABS = 4;
+ const unsigned short PATHSEG_LINETO_REL = 5;
+ const unsigned short PATHSEG_CURVETO_CUBIC_ABS = 6;
+ const unsigned short PATHSEG_CURVETO_CUBIC_REL = 7;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS = 8;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_REL = 9;
+ const unsigned short PATHSEG_ARC_ABS = 10;
+ const unsigned short PATHSEG_ARC_REL = 11;
+ const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS = 12;
+ const unsigned short PATHSEG_LINETO_HORIZONTAL_REL = 13;
+ const unsigned short PATHSEG_LINETO_VERTICAL_ABS = 14;
+ const unsigned short PATHSEG_LINETO_VERTICAL_REL = 15;
+ const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
+ const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
+
+ [Pure]
+ readonly attribute unsigned short pathSegType;
+ [Pure]
+ readonly attribute DOMString pathSegTypeAsLetter;
+};
+
+interface SVGPathSegClosePath : SVGPathSeg {
+};
+
+interface SVGPathSegMovetoAbs : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+};
+
+interface SVGPathSegMovetoRel : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+};
+
+interface SVGPathSegLinetoAbs : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+};
+
+interface SVGPathSegLinetoRel : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+};
+
+interface SVGPathSegCurvetoCubicAbs : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+ [SetterThrows]
+ attribute float x1;
+ [SetterThrows]
+ attribute float y1;
+ [SetterThrows]
+ attribute float x2;
+ [SetterThrows]
+ attribute float y2;
+};
+
+interface SVGPathSegCurvetoCubicRel : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+ [SetterThrows]
+ attribute float x1;
+ [SetterThrows]
+ attribute float y1;
+ [SetterThrows]
+ attribute float x2;
+ [SetterThrows]
+ attribute float y2;
+};
+
+interface SVGPathSegCurvetoQuadraticAbs : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+ [SetterThrows]
+ attribute float x1;
+ [SetterThrows]
+ attribute float y1;
+};
+
+interface SVGPathSegCurvetoQuadraticRel : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+ [SetterThrows]
+ attribute float x1;
+ [SetterThrows]
+ attribute float y1;
+};
+
+interface SVGPathSegArcAbs : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+ [SetterThrows]
+ attribute float r1;
+ [SetterThrows]
+ attribute float r2;
+ [SetterThrows]
+ attribute float angle;
+ [SetterThrows]
+ attribute boolean largeArcFlag;
+ [SetterThrows]
+ attribute boolean sweepFlag;
+};
+
+interface SVGPathSegArcRel : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+ [SetterThrows]
+ attribute float r1;
+ [SetterThrows]
+ attribute float r2;
+ [SetterThrows]
+ attribute float angle;
+ [SetterThrows]
+ attribute boolean largeArcFlag;
+ [SetterThrows]
+ attribute boolean sweepFlag;
+};
+
+interface SVGPathSegLinetoHorizontalAbs : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+};
+
+interface SVGPathSegLinetoHorizontalRel : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+};
+
+interface SVGPathSegLinetoVerticalAbs : SVGPathSeg {
+ [SetterThrows]
+ attribute float y;
+};
+
+interface SVGPathSegLinetoVerticalRel : SVGPathSeg {
+ [SetterThrows]
+ attribute float y;
+};
+
+interface SVGPathSegCurvetoCubicSmoothAbs : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+ [SetterThrows]
+ attribute float x2;
+ [SetterThrows]
+ attribute float y2;
+};
+
+interface SVGPathSegCurvetoCubicSmoothRel : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+ [SetterThrows]
+ attribute float x2;
+ [SetterThrows]
+ attribute float y2;
+};
+
+interface SVGPathSegCurvetoQuadraticSmoothAbs : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+};
+
+interface SVGPathSegCurvetoQuadraticSmoothRel : SVGPathSeg {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+};
+
diff --git a/dom/webidl/SVGPathSegList.webidl b/dom/webidl/SVGPathSegList.webidl
new file mode 100644
index 000000000..49d22e5af
--- /dev/null
+++ b/dom/webidl/SVGPathSegList.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG11/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGPathSegList {
+ readonly attribute unsigned long numberOfItems;
+ [Throws]
+ void clear();
+ [Throws]
+ SVGPathSeg initialize(SVGPathSeg newItem);
+ [Throws]
+ getter SVGPathSeg getItem(unsigned long index);
+ [Throws]
+ SVGPathSeg insertItemBefore(SVGPathSeg newItem, unsigned long index);
+ [Throws]
+ SVGPathSeg replaceItem(SVGPathSeg newItem, unsigned long index);
+ [Throws]
+ SVGPathSeg removeItem(unsigned long index);
+ [Throws]
+ SVGPathSeg appendItem(SVGPathSeg newItem);
+
+ // Mozilla-specific stuff
+ readonly attribute unsigned long length; // synonym for numberOfItems
+};
diff --git a/dom/webidl/SVGPatternElement.webidl b/dom/webidl/SVGPatternElement.webidl
new file mode 100644
index 000000000..2a549799e
--- /dev/null
+++ b/dom/webidl/SVGPatternElement.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/pservers.html#InterfaceSVGPatternElement
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGPatternElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration patternUnits;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration patternContentUnits;
+ [Constant]
+ readonly attribute SVGAnimatedTransformList patternTransform;
+ [Constant]
+ readonly attribute SVGAnimatedLength x;
+ [Constant]
+ readonly attribute SVGAnimatedLength y;
+ [Constant]
+ readonly attribute SVGAnimatedLength width;
+ [Constant]
+ readonly attribute SVGAnimatedLength height;
+};
+
+SVGPatternElement implements SVGFitToViewBox;
+SVGPatternElement implements SVGURIReference;
+SVGPatternElement implements SVGUnitTypeValues;
diff --git a/dom/webidl/SVGPoint.webidl b/dom/webidl/SVGPoint.webidl
new file mode 100644
index 000000000..c8113d40b
--- /dev/null
+++ b/dom/webidl/SVGPoint.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGPoint {
+
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+
+ [NewObject]
+ SVGPoint matrixTransform(SVGMatrix matrix);
+};
+
diff --git a/dom/webidl/SVGPointList.webidl b/dom/webidl/SVGPointList.webidl
new file mode 100644
index 000000000..2bc553855
--- /dev/null
+++ b/dom/webidl/SVGPointList.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG11/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGPointList {
+ readonly attribute unsigned long numberOfItems;
+ [Throws]
+ void clear();
+ [Throws]
+ SVGPoint initialize(SVGPoint newItem);
+ [Throws]
+ getter SVGPoint getItem(unsigned long index);
+ [Throws]
+ SVGPoint insertItemBefore(SVGPoint newItem, unsigned long index);
+ [Throws]
+ SVGPoint replaceItem(SVGPoint newItem, unsigned long index);
+ [Throws]
+ SVGPoint removeItem(unsigned long index);
+ [Throws]
+ SVGPoint appendItem(SVGPoint newItem);
+
+ // Mozilla-specific stuff
+ readonly attribute unsigned long length; // synonym for numberOfItems
+};
diff --git a/dom/webidl/SVGPolygonElement.webidl b/dom/webidl/SVGPolygonElement.webidl
new file mode 100644
index 000000000..6c720c931
--- /dev/null
+++ b/dom/webidl/SVGPolygonElement.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGPolygonElement : SVGGraphicsElement {
+};
+
+SVGPolygonElement implements SVGAnimatedPoints;
+
diff --git a/dom/webidl/SVGPolylineElement.webidl b/dom/webidl/SVGPolylineElement.webidl
new file mode 100644
index 000000000..ca2df3a08
--- /dev/null
+++ b/dom/webidl/SVGPolylineElement.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGPolylineElement : SVGGraphicsElement {
+};
+
+SVGPolylineElement implements SVGAnimatedPoints;
+
diff --git a/dom/webidl/SVGPreserveAspectRatio.webidl b/dom/webidl/SVGPreserveAspectRatio.webidl
new file mode 100644
index 000000000..2a9db63f5
--- /dev/null
+++ b/dom/webidl/SVGPreserveAspectRatio.webidl
@@ -0,0 +1,38 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGPreserveAspectRatio {
+
+ // Alignment Types
+ const unsigned short SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
+ const unsigned short SVG_PRESERVEASPECTRATIO_NONE = 1;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
+
+ // Meet-or-slice Types
+ const unsigned short SVG_MEETORSLICE_UNKNOWN = 0;
+ const unsigned short SVG_MEETORSLICE_MEET = 1;
+ const unsigned short SVG_MEETORSLICE_SLICE = 2;
+
+ [SetterThrows]
+ attribute unsigned short align;
+ [SetterThrows]
+ attribute unsigned short meetOrSlice;
+};
+
diff --git a/dom/webidl/SVGRadialGradientElement.webidl b/dom/webidl/SVGRadialGradientElement.webidl
new file mode 100644
index 000000000..d4a3724f6
--- /dev/null
+++ b/dom/webidl/SVGRadialGradientElement.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://svgwg.org/svg2-draft/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGRadialGradientElement : SVGGradientElement {
+ [Constant]
+ readonly attribute SVGAnimatedLength cx;
+ [Constant]
+ readonly attribute SVGAnimatedLength cy;
+ [Constant]
+ readonly attribute SVGAnimatedLength r;
+ [Constant]
+ readonly attribute SVGAnimatedLength fx;
+ [Constant]
+ readonly attribute SVGAnimatedLength fy;
+ // readonly attribute SVGAnimatedLength fr;
+};
diff --git a/dom/webidl/SVGRect.webidl b/dom/webidl/SVGRect.webidl
new file mode 100644
index 000000000..0edda0640
--- /dev/null
+++ b/dom/webidl/SVGRect.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGRect {
+ [SetterThrows]
+ attribute float x;
+ [SetterThrows]
+ attribute float y;
+ [SetterThrows]
+ attribute float width;
+ [SetterThrows]
+ attribute float height;
+};
diff --git a/dom/webidl/SVGRectElement.webidl b/dom/webidl/SVGRectElement.webidl
new file mode 100644
index 000000000..03028f2a2
--- /dev/null
+++ b/dom/webidl/SVGRectElement.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGRectElement : SVGGraphicsElement {
+ [Constant]
+ readonly attribute SVGAnimatedLength x;
+ [Constant]
+ readonly attribute SVGAnimatedLength y;
+ [Constant]
+ readonly attribute SVGAnimatedLength width;
+ [Constant]
+ readonly attribute SVGAnimatedLength height;
+ [Constant]
+ readonly attribute SVGAnimatedLength rx;
+ [Constant]
+ readonly attribute SVGAnimatedLength ry;
+};
+
diff --git a/dom/webidl/SVGSVGElement.webidl b/dom/webidl/SVGSVGElement.webidl
new file mode 100644
index 000000000..afe63dbb2
--- /dev/null
+++ b/dom/webidl/SVGSVGElement.webidl
@@ -0,0 +1,80 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGViewSpec;
+
+interface SVGSVGElement : SVGGraphicsElement {
+
+ [Constant]
+ readonly attribute SVGAnimatedLength x;
+ [Constant]
+ readonly attribute SVGAnimatedLength y;
+ [Constant]
+ readonly attribute SVGAnimatedLength width;
+ [Constant]
+ readonly attribute SVGAnimatedLength height;
+ // readonly attribute SVGRect viewport;
+ [Constant]
+ readonly attribute float pixelUnitToMillimeterX;
+ [Constant]
+ readonly attribute float pixelUnitToMillimeterY;
+ [Constant]
+ readonly attribute float screenPixelToMillimeterX;
+ [Constant]
+ readonly attribute float screenPixelToMillimeterY;
+ readonly attribute boolean useCurrentView;
+ // readonly attribute SVGViewSpec currentView;
+ [UseCounter]
+ attribute float currentScale;
+ readonly attribute SVGPoint currentTranslate;
+
+ [DependsOn=Nothing, Affects=Nothing]
+ unsigned long suspendRedraw(unsigned long maxWaitMilliseconds);
+ [DependsOn=Nothing, Affects=Nothing]
+ void unsuspendRedraw(unsigned long suspendHandleID);
+ [DependsOn=Nothing, Affects=Nothing]
+ void unsuspendRedrawAll();
+ [DependsOn=Nothing, Affects=Nothing]
+ void forceRedraw();
+ void pauseAnimations();
+ void unpauseAnimations();
+ boolean animationsPaused();
+ float getCurrentTime();
+ void setCurrentTime(float seconds);
+ // NodeList getIntersectionList(SVGRect rect, SVGElement referenceElement);
+ // NodeList getEnclosureList(SVGRect rect, SVGElement referenceElement);
+ // boolean checkIntersection(SVGElement element, SVGRect rect);
+ // boolean checkEnclosure(SVGElement element, SVGRect rect);
+ void deselectAll();
+ [NewObject]
+ SVGNumber createSVGNumber();
+ [NewObject]
+ SVGLength createSVGLength();
+ [NewObject]
+ SVGAngle createSVGAngle();
+ [NewObject]
+ SVGPoint createSVGPoint();
+ [NewObject]
+ SVGMatrix createSVGMatrix();
+ [NewObject]
+ SVGRect createSVGRect();
+ [NewObject]
+ SVGTransform createSVGTransform();
+ [NewObject]
+ SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
+ [UseCounter]
+ Element? getElementById(DOMString elementId);
+};
+
+SVGSVGElement implements SVGFitToViewBox;
+SVGSVGElement implements SVGZoomAndPanValues;
+
diff --git a/dom/webidl/SVGScriptElement.webidl b/dom/webidl/SVGScriptElement.webidl
new file mode 100644
index 000000000..41bbe065b
--- /dev/null
+++ b/dom/webidl/SVGScriptElement.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGScriptElement : SVGElement {
+ [SetterThrows]
+ attribute DOMString type;
+
+ // CORS attribute
+ [SetterThrows]
+ attribute DOMString? crossOrigin;
+};
+
+SVGScriptElement implements SVGURIReference;
+
diff --git a/dom/webidl/SVGSetElement.webidl b/dom/webidl/SVGSetElement.webidl
new file mode 100644
index 000000000..8b816fa75
--- /dev/null
+++ b/dom/webidl/SVGSetElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGSetElement : SVGAnimationElement {
+};
+
diff --git a/dom/webidl/SVGStopElement.webidl b/dom/webidl/SVGStopElement.webidl
new file mode 100644
index 000000000..d75e52b73
--- /dev/null
+++ b/dom/webidl/SVGStopElement.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGStopElement : SVGElement {
+ [Constant]
+ readonly attribute SVGAnimatedNumber offset;
+};
+
diff --git a/dom/webidl/SVGStringList.webidl b/dom/webidl/SVGStringList.webidl
new file mode 100644
index 000000000..ad7288fe1
--- /dev/null
+++ b/dom/webidl/SVGStringList.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://svgwg.org/svg2-draft/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGStringList {
+ readonly attribute unsigned long length;
+ readonly attribute unsigned long numberOfItems;
+
+ void clear();
+ [Throws]
+ DOMString initialize(DOMString newItem);
+ [Throws]
+ DOMString getItem(unsigned long index);
+ getter DOMString(unsigned long index);
+ [Throws]
+ DOMString insertItemBefore(DOMString newItem, unsigned long index);
+ [Throws]
+ DOMString replaceItem(DOMString newItem, unsigned long index);
+ [Throws]
+ DOMString removeItem(unsigned long index);
+ [Throws]
+ DOMString appendItem(DOMString newItem);
+ //setter void (unsigned long index, DOMString newItem);
+};
diff --git a/dom/webidl/SVGStyleElement.webidl b/dom/webidl/SVGStyleElement.webidl
new file mode 100644
index 000000000..d66b2ed6e
--- /dev/null
+++ b/dom/webidl/SVGStyleElement.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGStyleElement : SVGElement {
+ [SetterThrows]
+ attribute DOMString xmlspace; // Spec claims this should be on SVGElement
+ [SetterThrows]
+ attribute DOMString type;
+ [SetterThrows]
+ attribute DOMString media;
+ [SetterThrows]
+ attribute DOMString title;
+ [SetterThrows]
+ attribute boolean scoped;
+};
+SVGStyleElement implements LinkStyle;
+
diff --git a/dom/webidl/SVGSwitchElement.webidl b/dom/webidl/SVGSwitchElement.webidl
new file mode 100644
index 000000000..43cdb6861
--- /dev/null
+++ b/dom/webidl/SVGSwitchElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGSwitchElement : SVGGraphicsElement {
+};
+
diff --git a/dom/webidl/SVGSymbolElement.webidl b/dom/webidl/SVGSymbolElement.webidl
new file mode 100644
index 000000000..ece2c5a3f
--- /dev/null
+++ b/dom/webidl/SVGSymbolElement.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSymbolElement
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGSymbolElement : SVGElement {
+};
+
+SVGSymbolElement implements SVGFitToViewBox;
+SVGSymbolElement implements SVGTests;
diff --git a/dom/webidl/SVGTSpanElement.webidl b/dom/webidl/SVGTSpanElement.webidl
new file mode 100644
index 000000000..a6d944450
--- /dev/null
+++ b/dom/webidl/SVGTSpanElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGTSpanElement : SVGTextPositioningElement {
+};
+
diff --git a/dom/webidl/SVGTests.webidl b/dom/webidl/SVGTests.webidl
new file mode 100644
index 000000000..e3c38242b
--- /dev/null
+++ b/dom/webidl/SVGTests.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface SVGTests {
+
+ readonly attribute SVGStringList requiredFeatures;
+ readonly attribute SVGStringList requiredExtensions;
+ readonly attribute SVGStringList systemLanguage;
+
+ boolean hasExtension(DOMString extension);
+};
+
diff --git a/dom/webidl/SVGTextContentElement.webidl b/dom/webidl/SVGTextContentElement.webidl
new file mode 100644
index 000000000..15ec96373
--- /dev/null
+++ b/dom/webidl/SVGTextContentElement.webidl
@@ -0,0 +1,42 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGTextContentElement : SVGGraphicsElement {
+
+ // lengthAdjust Types
+ const unsigned short LENGTHADJUST_UNKNOWN = 0;
+ const unsigned short LENGTHADJUST_SPACING = 1;
+ const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2;
+
+ [Constant]
+ readonly attribute SVGAnimatedLength textLength;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration lengthAdjust;
+
+ long getNumberOfChars();
+ float getComputedTextLength();
+ [Throws]
+ float getSubStringLength(unsigned long charnum, unsigned long nchars);
+ [Throws]
+ SVGPoint getStartPositionOfChar(unsigned long charnum);
+ [Throws]
+ SVGPoint getEndPositionOfChar(unsigned long charnum);
+ [NewObject, Throws]
+ SVGRect getExtentOfChar(unsigned long charnum);
+ [Throws]
+ float getRotationOfChar(unsigned long charnum);
+ long getCharNumAtPosition(SVGPoint point);
+ [Throws]
+ void selectSubString(unsigned long charnum, unsigned long nchars);
+};
+
+
diff --git a/dom/webidl/SVGTextElement.webidl b/dom/webidl/SVGTextElement.webidl
new file mode 100644
index 000000000..042326de2
--- /dev/null
+++ b/dom/webidl/SVGTextElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGTextElement : SVGTextPositioningElement {
+};
+
diff --git a/dom/webidl/SVGTextPathElement.webidl b/dom/webidl/SVGTextPathElement.webidl
new file mode 100644
index 000000000..73a50f3ff
--- /dev/null
+++ b/dom/webidl/SVGTextPathElement.webidl
@@ -0,0 +1,34 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGTextPathElement : SVGTextContentElement {
+
+ // textPath Method Types
+ const unsigned short TEXTPATH_METHODTYPE_UNKNOWN = 0;
+ const unsigned short TEXTPATH_METHODTYPE_ALIGN = 1;
+ const unsigned short TEXTPATH_METHODTYPE_STRETCH = 2;
+
+ // textPath Spacing Types
+ const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
+ const unsigned short TEXTPATH_SPACINGTYPE_AUTO = 1;
+ const unsigned short TEXTPATH_SPACINGTYPE_EXACT = 2;
+
+ [Constant]
+ readonly attribute SVGAnimatedLength startOffset;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration method;
+ [Constant]
+ readonly attribute SVGAnimatedEnumeration spacing;
+};
+
+SVGTextPathElement implements SVGURIReference;
+
diff --git a/dom/webidl/SVGTextPositioningElement.webidl b/dom/webidl/SVGTextPositioningElement.webidl
new file mode 100644
index 000000000..80b8b94fa
--- /dev/null
+++ b/dom/webidl/SVGTextPositioningElement.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGTextPositioningElement : SVGTextContentElement {
+ [Constant]
+ readonly attribute SVGAnimatedLengthList x;
+ [Constant]
+ readonly attribute SVGAnimatedLengthList y;
+ [Constant]
+ readonly attribute SVGAnimatedLengthList dx;
+ [Constant]
+ readonly attribute SVGAnimatedLengthList dy;
+ [Constant]
+ readonly attribute SVGAnimatedNumberList rotate;
+};
+
diff --git a/dom/webidl/SVGTitleElement.webidl b/dom/webidl/SVGTitleElement.webidl
new file mode 100644
index 000000000..d40c63373
--- /dev/null
+++ b/dom/webidl/SVGTitleElement.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGTitleElement : SVGElement {
+};
+
diff --git a/dom/webidl/SVGTransform.webidl b/dom/webidl/SVGTransform.webidl
new file mode 100644
index 000000000..488fb8d07
--- /dev/null
+++ b/dom/webidl/SVGTransform.webidl
@@ -0,0 +1,41 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGTransform {
+
+ // Transform Types
+ const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
+ const unsigned short SVG_TRANSFORM_MATRIX = 1;
+ const unsigned short SVG_TRANSFORM_TRANSLATE = 2;
+ const unsigned short SVG_TRANSFORM_SCALE = 3;
+ const unsigned short SVG_TRANSFORM_ROTATE = 4;
+ const unsigned short SVG_TRANSFORM_SKEWX = 5;
+ const unsigned short SVG_TRANSFORM_SKEWY = 6;
+
+ readonly attribute unsigned short type;
+ readonly attribute SVGMatrix matrix;
+ readonly attribute float angle;
+
+ [Throws]
+ void setMatrix(SVGMatrix matrix);
+ [Throws]
+ void setTranslate(float tx, float ty);
+ [Throws]
+ void setScale(float sx, float sy);
+ [Throws]
+ void setRotate(float angle, float cx, float cy);
+ [Throws]
+ void setSkewX(float angle);
+ [Throws]
+ void setSkewY(float angle);
+};
+
diff --git a/dom/webidl/SVGTransformList.webidl b/dom/webidl/SVGTransformList.webidl
new file mode 100644
index 000000000..c9763aa26
--- /dev/null
+++ b/dom/webidl/SVGTransformList.webidl
@@ -0,0 +1,35 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG11/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGTransformList {
+ readonly attribute unsigned long numberOfItems;
+ [Throws]
+ void clear();
+ [Throws]
+ SVGTransform initialize(SVGTransform newItem);
+ [Throws]
+ getter SVGTransform getItem(unsigned long index);
+ [Throws]
+ SVGTransform insertItemBefore(SVGTransform newItem, unsigned long index);
+ [Throws]
+ SVGTransform replaceItem(SVGTransform newItem, unsigned long index);
+ [Throws]
+ SVGTransform removeItem(unsigned long index);
+ [Throws]
+ SVGTransform appendItem(SVGTransform newItem);
+ SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
+ [Throws]
+ SVGTransform? consolidate();
+
+ // Mozilla-specific stuff
+ readonly attribute unsigned long length; // synonym for numberOfItems
+};
diff --git a/dom/webidl/SVGURIReference.webidl b/dom/webidl/SVGURIReference.webidl
new file mode 100644
index 000000000..11f94c191
--- /dev/null
+++ b/dom/webidl/SVGURIReference.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface SVGURIReference {
+ [Constant]
+ readonly attribute SVGAnimatedString href;
+};
+
diff --git a/dom/webidl/SVGUnitTypeValues.webidl b/dom/webidl/SVGUnitTypeValues.webidl
new file mode 100644
index 000000000..6a1a33e61
--- /dev/null
+++ b/dom/webidl/SVGUnitTypeValues.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://svgwg.org/svg2-draft/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface SVGUnitTypeValues {
+ // Unit Types
+ const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
+ const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
+};
diff --git a/dom/webidl/SVGUnitTypes.webidl b/dom/webidl/SVGUnitTypes.webidl
new file mode 100644
index 000000000..fc12c1188
--- /dev/null
+++ b/dom/webidl/SVGUnitTypes.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://svgwg.org/svg2-draft/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGUnitTypes {
+};
+
+SVGUnitTypes implements SVGUnitTypeValues;
diff --git a/dom/webidl/SVGUseElement.webidl b/dom/webidl/SVGUseElement.webidl
new file mode 100644
index 000000000..8e7a6fd8c
--- /dev/null
+++ b/dom/webidl/SVGUseElement.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGUseElement : SVGGraphicsElement {
+ [Constant]
+ readonly attribute SVGAnimatedLength x;
+ [Constant]
+ readonly attribute SVGAnimatedLength y;
+ [Constant]
+ readonly attribute SVGAnimatedLength width;
+ [Constant]
+ readonly attribute SVGAnimatedLength height;
+ //readonly attribute SVGElementInstance instanceRoot;
+ //readonly attribute SVGElementInstance animatedInstanceRoot;
+};
+
+SVGUseElement implements SVGURIReference;
diff --git a/dom/webidl/SVGViewElement.webidl b/dom/webidl/SVGViewElement.webidl
new file mode 100644
index 000000000..42d988059
--- /dev/null
+++ b/dom/webidl/SVGViewElement.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGViewElement : SVGElement {
+ readonly attribute SVGStringList viewTarget;
+};
+
+SVGViewElement implements SVGFitToViewBox;
+SVGViewElement implements SVGZoomAndPanValues;
+
diff --git a/dom/webidl/SVGZoomAndPan.webidl b/dom/webidl/SVGZoomAndPan.webidl
new file mode 100644
index 000000000..bb5ee780a
--- /dev/null
+++ b/dom/webidl/SVGZoomAndPan.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGZoomAndPan {
+};
+
+SVGZoomAndPan implements SVGZoomAndPanValues;
diff --git a/dom/webidl/SVGZoomAndPanValues.webidl b/dom/webidl/SVGZoomAndPanValues.webidl
new file mode 100644
index 000000000..a09653f0b
--- /dev/null
+++ b/dom/webidl/SVGZoomAndPanValues.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[NoInterfaceObject]
+interface SVGZoomAndPanValues {
+
+ // Zoom and Pan Types
+ const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0;
+ const unsigned short SVG_ZOOMANDPAN_DISABLE = 1;
+ const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2;
+
+ [SetterThrows]
+ attribute unsigned short zoomAndPan;
+};
+
diff --git a/dom/webidl/SVGZoomEvent.webidl b/dom/webidl/SVGZoomEvent.webidl
new file mode 100644
index 000000000..044247f3c
--- /dev/null
+++ b/dom/webidl/SVGZoomEvent.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/SVG2/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGZoomEvent : UIEvent {
+ // Not implemented
+ // readonly attribute SVGRect zoomRectScreen;
+
+ [Constant]
+ readonly attribute float previousScale;
+ [Constant]
+ readonly attribute SVGPoint? previousTranslate;
+ [Constant]
+ readonly attribute float newScale;
+ [Constant]
+ readonly attribute SVGPoint? newTranslate;
+};
diff --git a/dom/webidl/Screen.webidl b/dom/webidl/Screen.webidl
new file mode 100644
index 000000000..6b5824fa8
--- /dev/null
+++ b/dom/webidl/Screen.webidl
@@ -0,0 +1,61 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+interface Screen : EventTarget {
+ // CSSOM-View
+ // http://dev.w3.org/csswg/cssom-view/#the-screen-interface
+ [Throws]
+ readonly attribute long availWidth;
+ [Throws]
+ readonly attribute long availHeight;
+ [Throws]
+ readonly attribute long width;
+ [Throws]
+ readonly attribute long height;
+ [Throws]
+ readonly attribute long colorDepth;
+ [Throws]
+ readonly attribute long pixelDepth;
+
+ [Throws]
+ readonly attribute long top;
+ [Throws]
+ readonly attribute long left;
+ [Throws]
+ readonly attribute long availTop;
+ [Throws]
+ readonly attribute long availLeft;
+
+ /**
+ * DEPRECATED, use ScreenOrientation API instead.
+ * Returns the current screen orientation.
+ * Can be: landscape-primary, landscape-secondary,
+ * portrait-primary or portrait-secondary.
+ */
+ readonly attribute DOMString mozOrientation;
+
+ attribute EventHandler onmozorientationchange;
+
+ /**
+ * DEPRECATED, use ScreenOrientation API instead.
+ * Lock screen orientation to the specified type.
+ */
+ [Throws, UnsafeInPrerendering]
+ boolean mozLockOrientation(DOMString orientation);
+ [Throws, UnsafeInPrerendering]
+ boolean mozLockOrientation(sequence<DOMString> orientation);
+
+ /**
+ * DEPRECATED, use ScreenOrientation API instead.
+ * Unlock the screen orientation.
+ */
+ [UnsafeInPrerendering]
+ void mozUnlockOrientation();
+};
+
+// https://w3c.github.io/screen-orientation
+partial interface Screen {
+ readonly attribute ScreenOrientation orientation;
+};
diff --git a/dom/webidl/ScreenOrientation.webidl b/dom/webidl/ScreenOrientation.webidl
new file mode 100644
index 000000000..48a2c1170
--- /dev/null
+++ b/dom/webidl/ScreenOrientation.webidl
@@ -0,0 +1,42 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://w3c.github.io/screen-orientation
+ *
+ * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights
+ * Reserved. W3C liability, trademark and document use rules apply.
+ */
+
+enum OrientationType {
+ "portrait-primary",
+ "portrait-secondary",
+ "landscape-primary",
+ "landscape-secondary"
+};
+
+enum OrientationLockType {
+ "any",
+ "natural",
+ "landscape",
+ "portrait",
+ "portrait-primary",
+ "portrait-secondary",
+ "landscape-primary",
+ "landscape-secondary"
+};
+
+[UnsafeInPrerendering]
+interface ScreenOrientation : EventTarget {
+ [Throws]
+ Promise<void> lock(OrientationLockType orientation);
+ [Throws]
+ void unlock();
+ [Throws]
+ readonly attribute OrientationType type;
+ [Throws]
+ readonly attribute unsigned short angle;
+ attribute EventHandler onchange;
+};
diff --git a/dom/webidl/ScriptProcessorNode.webidl b/dom/webidl/ScriptProcessorNode.webidl
new file mode 100644
index 000000000..81c02443f
--- /dev/null
+++ b/dom/webidl/ScriptProcessorNode.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface ScriptProcessorNode : AudioNode {
+
+ attribute EventHandler onaudioprocess;
+
+ readonly attribute long bufferSize;
+
+};
+
+// Mozilla extension
+ScriptProcessorNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/ScrollAreaEvent.webidl b/dom/webidl/ScrollAreaEvent.webidl
new file mode 100644
index 000000000..0f48b4bc8
--- /dev/null
+++ b/dom/webidl/ScrollAreaEvent.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface ScrollAreaEvent : UIEvent
+{
+ readonly attribute float x;
+ readonly attribute float y;
+ readonly attribute float width;
+ readonly attribute float height;
+
+ void initScrollAreaEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ Window? view,
+ long detail,
+ float x,
+ float y,
+ float width,
+ float height);
+};
diff --git a/dom/webidl/ScrollBoxObject.webidl b/dom/webidl/ScrollBoxObject.webidl
new file mode 100644
index 000000000..af6905852
--- /dev/null
+++ b/dom/webidl/ScrollBoxObject.webidl
@@ -0,0 +1,70 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[NoInterfaceObject]
+interface ScrollBoxObject : BoxObject {
+
+ /**
+ * Scroll to the given coordinates, in css pixels.
+ * (0,0) will put the top left corner of the scrolled element's padding-box
+ * at the top left corner of the scrollport (which is its inner-border-box).
+ * Values will be clamped to legal values.
+ */
+ [Throws]
+ void scrollTo(long x, long y);
+
+ /**
+ * Scroll the given amount of device pixels to the right and down.
+ * Values will be clamped to make the resuling position legal.
+ */
+ [Throws]
+ void scrollBy(long dx, long dy);
+ [Throws]
+ void scrollByLine(long dlines);
+ [Throws]
+ void scrollByIndex(long dindexes);
+ [Throws]
+ void scrollToLine(long line);
+ [Throws]
+ void scrollToElement(Element child);
+ [Throws]
+ void scrollToIndex(long index);
+
+ /**
+ * Get the current scroll position in css pixels.
+ * @see scrollTo for the definition of x and y.
+ */
+ [Pure, Throws]
+ readonly attribute long positionX;
+ [Pure, Throws]
+ readonly attribute long positionY;
+ [Pure, Throws]
+ readonly attribute long scrolledWidth;
+ [Pure, Throws]
+ readonly attribute long scrolledHeight;
+
+ /**
+ * DEPRECATED: Please use positionX and positionY
+ *
+ * Get the current scroll position in css pixels.
+ * @see scrollTo for the definition of x and y.
+ */
+ [Throws]
+ void getPosition(object x, object y);
+
+ /**
+ * DEPRECATED: Please use scrolledWidth and scrolledHeight
+ */
+ [Throws]
+ void getScrolledSize(object width, object height);
+
+ [Throws]
+ void ensureElementIsVisible(Element child);
+ [Throws]
+ void ensureIndexIsVisible(long index);
+ [Throws]
+ void ensureLineIsVisible(long line);
+};
diff --git a/dom/webidl/ScrollViewChangeEvent.webidl b/dom/webidl/ScrollViewChangeEvent.webidl
new file mode 100644
index 000000000..a3e92139a
--- /dev/null
+++ b/dom/webidl/ScrollViewChangeEvent.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+enum ScrollState {"started", "stopped"};
+
+dictionary ScrollViewChangeEventInit : EventInit {
+ ScrollState state = "started";
+};
+
+[Constructor(DOMString type, optional ScrollViewChangeEventInit eventInit),
+ ChromeOnly]
+interface ScrollViewChangeEvent : Event {
+ readonly attribute ScrollState state;
+};
diff --git a/dom/webidl/SecureElement.webidl b/dom/webidl/SecureElement.webidl
new file mode 100644
index 000000000..1f247aac0
--- /dev/null
+++ b/dom/webidl/SecureElement.webidl
@@ -0,0 +1,158 @@
+/* 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/. */
+
+ /* Copyright © 2014 Deutsche Telekom, Inc. */
+
+enum SEType {
+ "uicc",
+ "eSE"
+};
+
+enum SEError {
+ "SESecurityError", // Requested operation does not match the access control rules of the application.
+ "SEIoError", // I/O Error while communicating with the secure element.
+ "SEBadStateError", // Error occuring as a result of bad state.
+ "SEInvalidChannelError", // Opening a channel failed because no channel is available.
+ "SEInvalidApplicationError", // The requested application was not found on the secure element.
+ "SENotPresentError", // Secure Element is not present
+ "SEIllegalParameterError", // Request operation does not have valid parameters.
+ "SEGenericError" // Generic failures.
+};
+
+enum SEChannelType {
+ "basic",
+ "logical"
+};
+
+// Dictionary that represents an APDU command to be sent to a secure element.
+dictionary SECommand {
+ required octet cla; // Class Byte
+ required octet ins; // Instruction Byte
+ required octet p1; // First Octet of Parameters Byte
+ required octet p2; // Second Octet of Parameters Byte
+ sequence<octet>? data = null; // Sequence of octets
+ short le = -1; // The length of the expected
+ // response data or -1 if none is expected
+};
+
+[Pref="dom.secureelement.enabled",
+ ChromeOnly,
+ JSImplementation="@mozilla.org/secureelement/reader;1"]
+interface SEReader {
+
+ // 'true' if a secure element is present
+ readonly attribute boolean isSEPresent;
+
+ // Type of SecureElement
+ readonly attribute SEType type;
+
+ /**
+ * Opens a session with the Secure Element.
+ * Note that a reader may have several opened sessions.
+ *
+ * @return If the operation is successful the promise is resolved with an instance of SESession.
+ */
+ [Throws]
+ Promise<SESession> openSession();
+
+ /**
+ * Closes all sessions associated with this Reader and its associated channels.
+ *
+ */
+ [Throws]
+ Promise<void> closeAll();
+};
+
+[Pref="dom.secureelement.enabled",
+ ChromeOnly,
+ JSImplementation="@mozilla.org/secureelement/session;1"]
+interface SESession {
+
+ // 'reader' that provides this session
+ readonly attribute SEReader reader;
+
+ // Status of current session
+ readonly attribute boolean isClosed;
+
+ /**
+ * Opens a communication logical channel to an application on Secure Element identified by the AID.
+ * The 'aid' can be null for some secure elements.
+ *
+ * @param aid
+ * Application Identifier of the Card Applet on the secure element.
+ * If the 'aid' is null :
+ * For secure element type 'eSE', the default applet is selected.
+ * For secure element type 'uicc', the request will be immediately rejected.
+ * Note that the length of 'aid should be between 5 and 16.
+ *
+ * @return If the operation is successful the promise is resolved with an instance of SEChannel.
+ */
+ [Throws]
+ Promise<SEChannel> openLogicalChannel(Uint8Array? aid);
+
+ /**
+ * Close all active channels associated with this session.
+ *
+ */
+ [Throws]
+ Promise<void> closeAll();
+};
+
+[Pref="dom.secureelement.enabled",
+ ChromeOnly,
+ JSImplementation="@mozilla.org/secureelement/channel;1"]
+interface SEChannel {
+
+ // 'session' obj this channel is bound to
+ readonly attribute SESession session;
+
+ // response to openBasicChannel / openLogicalChannel operation
+ [Constant, Cached] readonly attribute Uint8Array? openResponse;
+
+ // Status of channel
+ readonly attribute boolean isClosed;
+
+ // Type of channel
+ readonly attribute SEChannelType type;
+
+ /**
+ * Transmits the APDU command to the secure element. This is an atomic operation that transmits
+ * an APDU command (as per ISO7816-4) to the secure element (UICC / eSE). Upon receiving response
+ * to the transmit apdu command, it is propogated to the applications using SEResponse object.
+ *
+ * @param command
+ * SECommand to be sent to secure element
+ *
+ * @return If success, the promise is resolved with the new created
+ * SEResponse object. Otherwise, rejected with the error of type 'SEError'.
+ */
+ [Throws]
+ Promise<SEResponse> transmit(optional SECommand command);
+
+ /**
+ * Closes the active channel.
+ *
+ */
+ [Throws]
+ Promise<void> close();
+};
+
+[Pref="dom.secureelement.enabled",
+ ChromeOnly,
+ JSImplementation="@mozilla.org/secureelement/response;1"]
+interface SEResponse {
+ // Response received on this 'channel' object.
+ [Constant] readonly attribute SEChannel channel;
+
+ // First octet of response's status word
+ [Constant] readonly attribute octet sw1;
+
+ // Second octet of response's status word
+ [Constant] readonly attribute octet sw2;
+
+ // The response's data field bytes
+ [Cached, Pure] readonly attribute sequence<octet>? data;
+
+};
+
diff --git a/dom/webidl/SecureElementManager.webidl b/dom/webidl/SecureElementManager.webidl
new file mode 100644
index 000000000..4a43ad5fe
--- /dev/null
+++ b/dom/webidl/SecureElementManager.webidl
@@ -0,0 +1,22 @@
+/* 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/. */
+
+ /* Copyright © 2014 Deutsche Telekom, Inc. */
+
+[Pref="dom.secureelement.enabled",
+ ChromeOnly,
+ JSImplementation="@mozilla.org/secureelement/manager;1",
+ NavigatorProperty="seManager",
+ NoInterfaceObject]
+interface SEManager {
+
+ /**
+ * Retrieves all the readers available on the device.
+ *
+ * @return If success, the promise is resolved to a sequence
+ * of SEReaders Otherwise, rejected with an error.
+ */
+ [Throws]
+ Promise<sequence<SEReader>> getSEReaders();
+};
diff --git a/dom/webidl/Selection.webidl b/dom/webidl/Selection.webidl
new file mode 100644
index 000000000..c90844dfa
--- /dev/null
+++ b/dom/webidl/Selection.webidl
@@ -0,0 +1,88 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#concept-selection
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface Selection {
+ readonly attribute Node? anchorNode;
+ readonly attribute unsigned long anchorOffset;
+ readonly attribute Node? focusNode;
+ readonly attribute unsigned long focusOffset;
+
+ readonly attribute boolean isCollapsed;
+ [Throws]
+ void collapse(Node node, unsigned long offset);
+ [Throws]
+ void collapseToStart();
+ [Throws]
+ void collapseToEnd();
+
+ [Throws]
+ void extend(Node node, unsigned long offset);
+
+ [Throws]
+ void selectAllChildren(Node node);
+ [Throws]
+ void deleteFromDocument();
+
+ readonly attribute unsigned long rangeCount;
+ [Throws]
+ Range getRangeAt(unsigned long index);
+ [Throws]
+ void addRange(Range range);
+ [Throws]
+ void removeRange(Range range);
+ [Throws]
+ void removeAllRanges();
+
+ [Throws]
+ boolean containsNode(Node node, boolean allowPartialContainment);
+
+ stringifier;
+};
+
+// Additional methods not currently in the spec
+partial interface Selection {
+ [Throws]
+ void modify(DOMString alter, DOMString direction,
+ DOMString granularity);
+};
+
+// Additional chrome-only methods from nsISelectionPrivate
+interface nsISelectionListener;
+partial interface Selection {
+ [ChromeOnly]
+ const short ENDOFPRECEDINGLINE = 0;
+ [ChromeOnly]
+ const short STARTOFNEXTLINE = 1;
+
+ [ChromeOnly,Throws]
+ attribute boolean interlinePosition;
+
+ [Throws]
+ attribute short? caretBidiLevel;
+
+ [ChromeOnly,Throws]
+ DOMString toStringWithFormat(DOMString formatType, unsigned long flags, long wrapColumn);
+ [ChromeOnly,Throws]
+ void addSelectionListener(nsISelectionListener newListener);
+ [ChromeOnly,Throws]
+ void removeSelectionListener(nsISelectionListener listenerToRemove);
+
+ [ChromeOnly,BinaryName="rawType"]
+ readonly attribute short type;
+
+ [ChromeOnly,Throws,Pref="dom.testing.selection.GetRangesForInterval"]
+ sequence<Range> GetRangesForInterval(Node beginNode, long beginOffset, Node endNode, long endOffset,
+ boolean allowAdjacent);
+
+ [ChromeOnly,Throws]
+ void scrollIntoView(short aRegion, boolean aIsSynchronous, short aVPercent, short aHPercent);
+};
diff --git a/dom/webidl/ServiceWorker.webidl b/dom/webidl/ServiceWorker.webidl
new file mode 100644
index 000000000..8c3749e94
--- /dev/null
+++ b/dom/webidl/ServiceWorker.webidl
@@ -0,0 +1,35 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#service-worker-obj
+ *
+ */
+
+// Still unclear what should be subclassed.
+// https://github.com/slightlyoff/ServiceWorker/issues/189
+[Func="mozilla::dom::workers::ServiceWorkerVisible",
+ // FIXME(nsm): Bug 1113522. This is exposed to satisfy webidl constraints, but it won't actually work.
+ Exposed=(Window,Worker)]
+interface ServiceWorker : EventTarget {
+ readonly attribute USVString scriptURL;
+ readonly attribute ServiceWorkerState state;
+
+ attribute EventHandler onstatechange;
+
+ // FIXME(catalinb): Should inherit this from Worker.
+ [Throws]
+ void postMessage(any message, optional sequence<Transferable> transferable);
+};
+
+ServiceWorker implements AbstractWorker;
+
+enum ServiceWorkerState {
+ "installing",
+ "installed",
+ "activating",
+ "activated",
+ "redundant"
+};
diff --git a/dom/webidl/ServiceWorkerContainer.webidl b/dom/webidl/ServiceWorkerContainer.webidl
new file mode 100644
index 000000000..91232f9f3
--- /dev/null
+++ b/dom/webidl/ServiceWorkerContainer.webidl
@@ -0,0 +1,45 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
+ *
+ */
+
+[Func="ServiceWorkerContainer::IsEnabled",
+ Exposed=Window]
+interface ServiceWorkerContainer : EventTarget {
+ // FIXME(nsm):
+ // https://github.com/slightlyoff/ServiceWorker/issues/198
+ // and discussion at https://etherpad.mozilla.org/serviceworker07apr
+ [Unforgeable] readonly attribute ServiceWorker? controller;
+
+ [SameObject, Throws]
+ readonly attribute Promise<ServiceWorkerRegistration> ready;
+
+ [NewObject]
+ Promise<ServiceWorkerRegistration> register(USVString scriptURL,
+ optional RegistrationOptions options);
+
+ [NewObject]
+ Promise<any> getRegistration(optional USVString documentURL = "");
+
+ [NewObject]
+ Promise<sequence<ServiceWorkerRegistration>> getRegistrations();
+
+ attribute EventHandler oncontrollerchange;
+ attribute EventHandler onerror;
+ attribute EventHandler onmessage;
+};
+
+// Testing only.
+partial interface ServiceWorkerContainer {
+ [Throws,Pref="dom.serviceWorkers.testing.enabled"]
+ DOMString getScopeForUrl(DOMString url);
+};
+
+dictionary RegistrationOptions {
+ USVString scope;
+};
diff --git a/dom/webidl/ServiceWorkerGlobalScope.webidl b/dom/webidl/ServiceWorkerGlobalScope.webidl
new file mode 100644
index 000000000..b59bf0aa0
--- /dev/null
+++ b/dom/webidl/ServiceWorkerGlobalScope.webidl
@@ -0,0 +1,36 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
+ *
+ * You are granted a license to use, reproduce and create derivative works of
+ * this document.
+ */
+
+[Global=(Worker,ServiceWorker),
+ Exposed=ServiceWorker]
+interface ServiceWorkerGlobalScope : WorkerGlobalScope {
+ [SameObject] readonly attribute Clients clients;
+ [SameObject] readonly attribute ServiceWorkerRegistration registration;
+
+ [Throws, NewObject]
+ Promise<void> skipWaiting();
+
+ attribute EventHandler oninstall;
+ attribute EventHandler onactivate;
+
+ attribute EventHandler onfetch;
+
+ // The event.source of these MessageEvents are instances of Client
+ attribute EventHandler onmessage;
+};
+
+// These are from w3c.github.io/push-api/
+partial interface ServiceWorkerGlobalScope {
+ attribute EventHandler onpush;
+ attribute EventHandler onpushsubscriptionchange;
+};
+
diff --git a/dom/webidl/ServiceWorkerMessageEvent.webidl b/dom/webidl/ServiceWorkerMessageEvent.webidl
new file mode 100644
index 000000000..c05696c15
--- /dev/null
+++ b/dom/webidl/ServiceWorkerMessageEvent.webidl
@@ -0,0 +1,48 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
+ *
+ */
+
+[Pref="dom.serviceWorkers.enabled",
+ Constructor(DOMString type, optional ServiceWorkerMessageEventInit eventInitDict),
+ Exposed=Window]
+interface ServiceWorkerMessageEvent : Event {
+ /**
+ * Custom data associated with this event.
+ */
+ readonly attribute any data;
+
+ /**
+ * The origin of the site from which this event originated.
+ */
+ readonly attribute DOMString origin;
+
+ /**
+ * The last event ID string of the event source.
+ */
+ readonly attribute DOMString lastEventId;
+
+ /**
+ * The service worker or port which originated this event.
+ * FIXME: Use SameOject after IDL spec is updated
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=1196097
+ */
+ [Constant] readonly attribute (ServiceWorker or MessagePort)? source;
+
+ [Constant, Cached, Frozen]
+ readonly attribute sequence<MessagePort> ports;
+};
+
+dictionary ServiceWorkerMessageEventInit : EventInit
+{
+ any data = null;
+ DOMString origin = "";
+ DOMString lastEventId = "";
+ (ServiceWorker or MessagePort)? source = null;
+ sequence<MessagePort> ports = [];
+};
diff --git a/dom/webidl/ServiceWorkerRegistration.webidl b/dom/webidl/ServiceWorkerRegistration.webidl
new file mode 100644
index 000000000..04d0af3f4
--- /dev/null
+++ b/dom/webidl/ServiceWorkerRegistration.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
+ *
+ */
+
+[Func="mozilla::dom::ServiceWorkerRegistration::Visible",
+ Exposed=(Window,Worker)]
+interface ServiceWorkerRegistration : EventTarget {
+ [Unforgeable] readonly attribute ServiceWorker? installing;
+ [Unforgeable] readonly attribute ServiceWorker? waiting;
+ [Unforgeable] readonly attribute ServiceWorker? active;
+
+ readonly attribute USVString scope;
+
+ [Throws, NewObject]
+ Promise<void> update();
+
+ [Throws, NewObject]
+ Promise<boolean> unregister();
+
+ // event
+ attribute EventHandler onupdatefound;
+};
+
+partial interface ServiceWorkerRegistration {
+ [Throws, Exposed=(Window,Worker), Func="nsContentUtils::PushEnabled"]
+ readonly attribute PushManager pushManager;
+};
diff --git a/dom/webidl/SettingChangeNotification.webidl b/dom/webidl/SettingChangeNotification.webidl
new file mode 100644
index 000000000..11c097e3d
--- /dev/null
+++ b/dom/webidl/SettingChangeNotification.webidl
@@ -0,0 +1,12 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+// Used internally by Gecko
+dictionary SettingChangeNotification {
+ DOMString key = "";
+ any value;
+ boolean isInternalChange = false;
+};
diff --git a/dom/webidl/SettingsManager.webidl b/dom/webidl/SettingsManager.webidl
new file mode 100644
index 000000000..ad707a258
--- /dev/null
+++ b/dom/webidl/SettingsManager.webidl
@@ -0,0 +1,42 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[JSImplementation="@mozilla.org/settingsLock;1",
+ Pref="dom.mozSettings.enabled"]
+interface SettingsLock : EventTarget {
+ // Whether this lock is invalid
+ readonly attribute boolean closed;
+
+ // Contains a JSON object with name/value pairs to be set.
+ DOMRequest set(object settings);
+
+ // Result contains the value of the setting.
+ DOMRequest get(DOMString name);
+
+ DOMRequest clear();
+ attribute EventHandler onsettingstransactionsuccess;
+ attribute EventHandler onsettingstransactionfailure;
+};
+
+dictionary SettingChange {
+ DOMString settingName;
+ DOMString settingValue;
+};
+
+callback SettingChangeCallback = void (SettingChange setting);
+
+[JSImplementation="@mozilla.org/settingsManager;1",
+ NavigatorProperty="mozSettings",
+ Pref="dom.mozSettings.enabled",
+ ChromeOnly]
+interface SettingsManager : EventTarget {
+ SettingsLock createLock();
+
+ void addObserver(DOMString name, SettingChangeCallback callback);
+ void removeObserver(DOMString name, SettingChangeCallback callback);
+
+ attribute EventHandler onsettingchange;
+};
diff --git a/dom/webidl/ShadowRoot.webidl b/dom/webidl/ShadowRoot.webidl
new file mode 100644
index 000000000..a6c6de254
--- /dev/null
+++ b/dom/webidl/ShadowRoot.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="nsDocument::IsWebComponentsEnabled"]
+interface ShadowRoot : DocumentFragment
+{
+ Element? getElementById(DOMString elementId);
+ HTMLCollection getElementsByTagName(DOMString localName);
+ HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
+ HTMLCollection getElementsByClassName(DOMString classNames);
+ [SetterThrows,TreatNullAs=EmptyString]
+ attribute DOMString innerHTML;
+ readonly attribute Element host;
+ readonly attribute ShadowRoot? olderShadowRoot;
+ attribute boolean applyAuthorStyles;
+ readonly attribute StyleSheetList styleSheets;
+};
+
diff --git a/dom/webidl/SharedWorker.webidl b/dom/webidl/SharedWorker.webidl
new file mode 100644
index 000000000..042fa4af9
--- /dev/null
+++ b/dom/webidl/SharedWorker.webidl
@@ -0,0 +1,12 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString scriptURL, optional DOMString name)]
+interface SharedWorker : EventTarget {
+ readonly attribute MessagePort port;
+};
+
+SharedWorker implements AbstractWorker;
diff --git a/dom/webidl/SharedWorkerGlobalScope.webidl b/dom/webidl/SharedWorkerGlobalScope.webidl
new file mode 100644
index 000000000..f3e8daf42
--- /dev/null
+++ b/dom/webidl/SharedWorkerGlobalScope.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
+ * Software ASA.
+ * You are granted a license to use, reproduce and create derivative works of
+ * this document.
+ */
+
+[Global=(Worker,SharedWorker),
+ Exposed=SharedWorker]
+interface SharedWorkerGlobalScope : WorkerGlobalScope {
+ readonly attribute DOMString name;
+ attribute EventHandler onconnect;
+};
diff --git a/dom/webidl/SimpleGestureEvent.webidl b/dom/webidl/SimpleGestureEvent.webidl
new file mode 100644
index 000000000..0829076dd
--- /dev/null
+++ b/dom/webidl/SimpleGestureEvent.webidl
@@ -0,0 +1,46 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information see nsIDOMSimpleGestureEvent.idl.
+ */
+
+interface SimpleGestureEvent : MouseEvent
+{
+ const unsigned long DIRECTION_UP = 1;
+ const unsigned long DIRECTION_DOWN = 2;
+ const unsigned long DIRECTION_LEFT = 4;
+ const unsigned long DIRECTION_RIGHT = 8;
+
+ const unsigned long ROTATION_COUNTERCLOCKWISE = 1;
+ const unsigned long ROTATION_CLOCKWISE = 2;
+
+ attribute unsigned long allowedDirections;
+
+ readonly attribute unsigned long direction;
+
+ readonly attribute double delta;
+
+ readonly attribute unsigned long clickCount;
+
+ void initSimpleGestureEvent(DOMString typeArg,
+ boolean canBubbleArg,
+ boolean cancelableArg,
+ Window? viewArg,
+ long detailArg,
+ long screenXArg,
+ long screenYArg,
+ long clientXArg,
+ long clientYArg,
+ boolean ctrlKeyArg,
+ boolean altKeyArg,
+ boolean shiftKeyArg,
+ boolean metaKeyArg,
+ unsigned short buttonArg,
+ EventTarget? relatedTargetArg,
+ unsigned long allowedDirectionsArg,
+ unsigned long directionArg,
+ double deltaArg,
+ unsigned long clickCount);
+};
diff --git a/dom/webidl/SocketCommon.webidl b/dom/webidl/SocketCommon.webidl
new file mode 100644
index 000000000..044199ea2
--- /dev/null
+++ b/dom/webidl/SocketCommon.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/2012/sysapps/tcp-udp-sockets/#readystate
+ */
+
+enum SocketReadyState {
+ "opening",
+ "open",
+ "closing",
+ "closed",
+ "halfclosed"
+};
diff --git a/dom/webidl/SourceBuffer.webidl b/dom/webidl/SourceBuffer.webidl
new file mode 100644
index 000000000..a1d9f98cf
--- /dev/null
+++ b/dom/webidl/SourceBuffer.webidl
@@ -0,0 +1,49 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum SourceBufferAppendMode {
+ "segments",
+ "sequence"
+};
+
+[Func="mozilla::dom::MediaSource::Enabled"]
+interface SourceBuffer : EventTarget {
+ [SetterThrows]
+ attribute SourceBufferAppendMode mode;
+ readonly attribute boolean updating;
+ [Throws]
+ readonly attribute TimeRanges buffered;
+ [SetterThrows]
+ attribute double timestampOffset;
+ //readonly attribute AudioTrackList audioTracks;
+ //readonly attribute VideoTrackList videoTracks;
+ //readonly attribute TextTrackList textTracks;
+ [SetterThrows]
+ attribute double appendWindowStart;
+ [SetterThrows]
+ attribute unrestricted double appendWindowEnd;
+ attribute EventHandler onupdatestart;
+ attribute EventHandler onupdate;
+ attribute EventHandler onupdateend;
+ attribute EventHandler onerror;
+ attribute EventHandler onabort;
+ [Throws]
+ void appendBuffer(ArrayBuffer data);
+ [Throws]
+ void appendBuffer(ArrayBufferView data);
+ //[Throws]
+ //void appendStream(Stream stream, [EnforceRange] optional unsigned long long maxSize);
+ [Throws]
+ void abort();
+ [Throws]
+ void remove(double start, unrestricted double end);
+};
diff --git a/dom/webidl/SourceBufferList.webidl b/dom/webidl/SourceBufferList.webidl
new file mode 100644
index 000000000..15c302622
--- /dev/null
+++ b/dom/webidl/SourceBufferList.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="mozilla::dom::MediaSource::Enabled"]
+interface SourceBufferList : EventTarget {
+ readonly attribute unsigned long length;
+ attribute EventHandler onaddsourcebuffer;
+ attribute EventHandler onremovesourcebuffer;
+ getter SourceBuffer (unsigned long index);
+};
diff --git a/dom/webidl/SpeechGrammar.webidl b/dom/webidl/SpeechGrammar.webidl
new file mode 100644
index 000000000..8cc97d2ff
--- /dev/null
+++ b/dom/webidl/SpeechGrammar.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor,
+ Pref="media.webspeech.recognition.enable",
+ Func="SpeechRecognition::IsAuthorized"]
+interface SpeechGrammar {
+ [Throws]
+ attribute DOMString src;
+ [Throws]
+ attribute float weight;
+};
+
diff --git a/dom/webidl/SpeechGrammarList.webidl b/dom/webidl/SpeechGrammarList.webidl
new file mode 100644
index 000000000..f1b5775ae
--- /dev/null
+++ b/dom/webidl/SpeechGrammarList.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor, Pref="media.webspeech.recognition.enable",
+ Func="SpeechRecognition::IsAuthorized"]
+interface SpeechGrammarList {
+ readonly attribute unsigned long length;
+ [Throws]
+ getter SpeechGrammar item(unsigned long index);
+ [Throws]
+ void addFromURI(DOMString src, optional float weight);
+ [Throws]
+ void addFromString(DOMString string, optional float weight);
+};
diff --git a/dom/webidl/SpeechRecognition.webidl b/dom/webidl/SpeechRecognition.webidl
new file mode 100644
index 000000000..c7dc9422d
--- /dev/null
+++ b/dom/webidl/SpeechRecognition.webidl
@@ -0,0 +1,45 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor,
+ Pref="media.webspeech.recognition.enable",
+ Func="SpeechRecognition::IsAuthorized"]
+interface SpeechRecognition : EventTarget {
+ // recognition parameters
+ attribute SpeechGrammarList grammars;
+ attribute DOMString lang;
+ [Throws]
+ attribute boolean continuous;
+ attribute boolean interimResults;
+ attribute unsigned long maxAlternatives;
+ [Throws]
+ attribute DOMString serviceURI;
+
+ // methods to drive the speech interaction
+ [Throws, UnsafeInPrerendering]
+ void start(optional MediaStream stream);
+ void stop();
+ void abort();
+
+ // event methods
+ attribute EventHandler onaudiostart;
+ attribute EventHandler onsoundstart;
+ attribute EventHandler onspeechstart;
+ attribute EventHandler onspeechend;
+ attribute EventHandler onsoundend;
+ attribute EventHandler onaudioend;
+ attribute EventHandler onresult;
+ attribute EventHandler onnomatch;
+ attribute EventHandler onerror;
+ attribute EventHandler onstart;
+ attribute EventHandler onend;
+};
diff --git a/dom/webidl/SpeechRecognitionAlternative.webidl b/dom/webidl/SpeechRecognitionAlternative.webidl
new file mode 100644
index 000000000..f2692404d
--- /dev/null
+++ b/dom/webidl/SpeechRecognitionAlternative.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="media.webspeech.recognition.enable",
+ Func="SpeechRecognition::IsAuthorized"]
+interface SpeechRecognitionAlternative {
+ readonly attribute DOMString transcript;
+ readonly attribute float confidence;
+};
diff --git a/dom/webidl/SpeechRecognitionError.webidl b/dom/webidl/SpeechRecognitionError.webidl
new file mode 100644
index 000000000..ddc74e88d
--- /dev/null
+++ b/dom/webidl/SpeechRecognitionError.webidl
@@ -0,0 +1,31 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+enum SpeechRecognitionErrorCode {
+ "no-speech",
+ "aborted",
+ "audio-capture",
+ "network",
+ "not-allowed",
+ "service-not-allowed",
+ "bad-grammar",
+ "language-not-supported"
+};
+
+[Pref="media.webspeech.recognition.enable",
+ Func="SpeechRecognition::IsAuthorized",
+ Constructor(DOMString type, optional SpeechRecognitionErrorInit eventInitDict)]
+interface SpeechRecognitionError : Event
+{
+ readonly attribute SpeechRecognitionErrorCode error;
+ readonly attribute DOMString? message;
+};
+
+dictionary SpeechRecognitionErrorInit : EventInit
+{
+ SpeechRecognitionErrorCode error = "no-speech";
+ DOMString message = "";
+};
diff --git a/dom/webidl/SpeechRecognitionEvent.webidl b/dom/webidl/SpeechRecognitionEvent.webidl
new file mode 100644
index 000000000..7a95323d7
--- /dev/null
+++ b/dom/webidl/SpeechRecognitionEvent.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+interface nsISupports;
+
+[Pref="media.webspeech.recognition.enable",
+ Func="SpeechRecognition::IsAuthorized",
+ Constructor(DOMString type, optional SpeechRecognitionEventInit eventInitDict)]
+interface SpeechRecognitionEvent : Event
+{
+ readonly attribute unsigned long resultIndex;
+ readonly attribute SpeechRecognitionResultList? results;
+ readonly attribute any interpretation;
+ readonly attribute Document? emma;
+};
+
+dictionary SpeechRecognitionEventInit : EventInit
+{
+ unsigned long resultIndex = 0;
+ SpeechRecognitionResultList? results = null;
+ any interpretation = null;
+ Document? emma = null;
+};
diff --git a/dom/webidl/SpeechRecognitionResult.webidl b/dom/webidl/SpeechRecognitionResult.webidl
new file mode 100644
index 000000000..c66bb9ca2
--- /dev/null
+++ b/dom/webidl/SpeechRecognitionResult.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="media.webspeech.recognition.enable",
+ Func="SpeechRecognition::IsAuthorized"]
+interface SpeechRecognitionResult {
+ readonly attribute unsigned long length;
+ getter SpeechRecognitionAlternative item(unsigned long index);
+ readonly attribute boolean isFinal;
+};
diff --git a/dom/webidl/SpeechRecognitionResultList.webidl b/dom/webidl/SpeechRecognitionResultList.webidl
new file mode 100644
index 000000000..ec182c1de
--- /dev/null
+++ b/dom/webidl/SpeechRecognitionResultList.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="media.webspeech.recognition.enable",
+ Func="SpeechRecognition::IsAuthorized"]
+interface SpeechRecognitionResultList {
+ readonly attribute unsigned long length;
+ getter SpeechRecognitionResult item(unsigned long index);
+};
diff --git a/dom/webidl/SpeechSynthesis.webidl b/dom/webidl/SpeechSynthesis.webidl
new file mode 100644
index 000000000..9cc3a061e
--- /dev/null
+++ b/dom/webidl/SpeechSynthesis.webidl
@@ -0,0 +1,32 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="media.webspeech.synth.enabled"]
+interface SpeechSynthesis : EventTarget{
+ readonly attribute boolean pending;
+ readonly attribute boolean speaking;
+ readonly attribute boolean paused;
+
+ [UnsafeInPrerendering]
+ void speak(SpeechSynthesisUtterance utterance);
+ void cancel();
+ void pause();
+ [UnsafeInPrerendering]
+ void resume();
+ sequence<SpeechSynthesisVoice> getVoices();
+
+ attribute EventHandler onvoiceschanged;
+
+ [ChromeOnly]
+ // Force an utterance to end. Circumvents bad speech service implementations.
+ void forceEnd();
+};
diff --git a/dom/webidl/SpeechSynthesisErrorEvent.webidl b/dom/webidl/SpeechSynthesisErrorEvent.webidl
new file mode 100644
index 000000000..1388755d3
--- /dev/null
+++ b/dom/webidl/SpeechSynthesisErrorEvent.webidl
@@ -0,0 +1,36 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum SpeechSynthesisErrorCode {
+ "canceled",
+ "interrupted",
+ "audio-busy",
+ "audio-hardware",
+ "network",
+ "synthesis-unavailable",
+ "synthesis-failed",
+ "language-unavailable",
+ "voice-unavailable",
+ "text-too-long",
+ "invalid-argument",
+};
+
+[Constructor(DOMString type, SpeechSynthesisErrorEventInit eventInitDict),
+ Pref="media.webspeech.synth.enabled"]
+interface SpeechSynthesisErrorEvent : SpeechSynthesisEvent {
+ readonly attribute SpeechSynthesisErrorCode error;
+};
+
+dictionary SpeechSynthesisErrorEventInit : SpeechSynthesisEventInit
+{
+ required SpeechSynthesisErrorCode error;
+};
diff --git a/dom/webidl/SpeechSynthesisEvent.webidl b/dom/webidl/SpeechSynthesisEvent.webidl
new file mode 100644
index 000000000..a5f8b3c2b
--- /dev/null
+++ b/dom/webidl/SpeechSynthesisEvent.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString type, SpeechSynthesisEventInit eventInitDict),
+ Pref="media.webspeech.synth.enabled"]
+interface SpeechSynthesisEvent : Event
+{
+ readonly attribute SpeechSynthesisUtterance utterance;
+ readonly attribute unsigned long charIndex;
+ readonly attribute float elapsedTime;
+ readonly attribute DOMString? name;
+};
+
+dictionary SpeechSynthesisEventInit : EventInit
+{
+ required SpeechSynthesisUtterance utterance;
+ unsigned long charIndex = 0;
+ float elapsedTime = 0;
+ DOMString name = "";
+};
diff --git a/dom/webidl/SpeechSynthesisUtterance.webidl b/dom/webidl/SpeechSynthesisUtterance.webidl
new file mode 100644
index 000000000..14f6e9fde
--- /dev/null
+++ b/dom/webidl/SpeechSynthesisUtterance.webidl
@@ -0,0 +1,34 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="media.webspeech.synth.enabled",
+ Constructor,
+ Constructor(DOMString text)]
+interface SpeechSynthesisUtterance : EventTarget {
+ attribute DOMString text;
+ attribute DOMString lang;
+ attribute SpeechSynthesisVoice? voice;
+ attribute float volume;
+ attribute float rate;
+ attribute float pitch;
+
+ attribute EventHandler onstart;
+ attribute EventHandler onend;
+ attribute EventHandler onerror;
+ attribute EventHandler onpause;
+ attribute EventHandler onresume;
+ attribute EventHandler onmark;
+ attribute EventHandler onboundary;
+
+ [ChromeOnly]
+ readonly attribute DOMString chosenVoiceURI;
+};
diff --git a/dom/webidl/SpeechSynthesisVoice.webidl b/dom/webidl/SpeechSynthesisVoice.webidl
new file mode 100644
index 000000000..39ea6964d
--- /dev/null
+++ b/dom/webidl/SpeechSynthesisVoice.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="media.webspeech.synth.enabled"]
+interface SpeechSynthesisVoice {
+ readonly attribute DOMString voiceURI;
+ readonly attribute DOMString name;
+ readonly attribute DOMString lang;
+ readonly attribute boolean localService;
+ readonly attribute boolean default;
+};
diff --git a/dom/webidl/StereoPannerNode.webidl b/dom/webidl/StereoPannerNode.webidl
new file mode 100644
index 000000000..f84c8310b
--- /dev/null
+++ b/dom/webidl/StereoPannerNode.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Pref="dom.webaudio.enabled"]
+interface StereoPannerNode : AudioNode {
+ readonly attribute AudioParam pan;
+};
+
+// Mozilla extension
+StereoPannerNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/Storage.webidl b/dom/webidl/Storage.webidl
new file mode 100644
index 000000000..d951cdafe
--- /dev/null
+++ b/dom/webidl/Storage.webidl
@@ -0,0 +1,35 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+*
+* The origin of this IDL file is
+* http://www.whatwg.org/html/#the-storage-interface
+*
+* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+* Opera Software ASA. You are granted a license to use, reproduce
+* and create derivative works of this document.
+*/
+
+interface Storage {
+ [Throws, NeedsSubjectPrincipal]
+ readonly attribute unsigned long length;
+
+ [Throws, NeedsSubjectPrincipal]
+ DOMString? key(unsigned long index);
+
+ [Throws, NeedsSubjectPrincipal]
+ getter DOMString? getItem(DOMString key);
+
+ [Throws, NeedsSubjectPrincipal]
+ setter creator void setItem(DOMString key, DOMString value);
+
+ [Throws, NeedsSubjectPrincipal]
+ deleter void removeItem(DOMString key);
+
+ [Throws, NeedsSubjectPrincipal]
+ void clear();
+
+ [ChromeOnly]
+ readonly attribute boolean isSessionOnly;
+};
diff --git a/dom/webidl/StorageEvent.webidl b/dom/webidl/StorageEvent.webidl
new file mode 100644
index 000000000..c3e9605eb
--- /dev/null
+++ b/dom/webidl/StorageEvent.webidl
@@ -0,0 +1,40 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * Interface for a client side storage. See
+ * http://dev.w3.org/html5/webstorage/#the-storage-event
+ * for more information.
+ *
+ * Event sent to a window when a storage area changes.
+ */
+
+[Constructor(DOMString type, optional StorageEventInit eventInitDict)]
+interface StorageEvent : Event
+{
+ readonly attribute DOMString? key;
+ readonly attribute DOMString? oldValue;
+ readonly attribute DOMString? newValue;
+ readonly attribute DOMString? url;
+ readonly attribute Storage? storageArea;
+
+ // Bug 1016053 - This is not spec compliant.
+ void initStorageEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ DOMString? key,
+ DOMString? oldValue,
+ DOMString? newValue,
+ DOMString? url,
+ Storage? storageArea);
+};
+
+dictionary StorageEventInit : EventInit
+{
+ DOMString? key = null;
+ DOMString? oldValue = null;
+ DOMString? newValue = null;
+ DOMString url = "";
+ Storage? storageArea = null;
+};
diff --git a/dom/webidl/StorageManager.webidl b/dom/webidl/StorageManager.webidl
new file mode 100644
index 000000000..b2855206e
--- /dev/null
+++ b/dom/webidl/StorageManager.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://storage.spec.whatwg.org/#storagemanager
+ *
+ */
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::StorageManager::PrefEnabled"]
+interface StorageManager {
+ // [Throws]
+ // Promise<boolean> persisted();
+ // [Throws]
+ // [Exposed=Window] Promise<boolean> persist();
+ [Throws]
+ Promise<StorageEstimate> estimate();
+};
+
+dictionary StorageEstimate {
+ unsigned long long usage;
+ unsigned long long quota;
+};
diff --git a/dom/webidl/StorageType.webidl b/dom/webidl/StorageType.webidl
new file mode 100644
index 000000000..cb0702d2a
--- /dev/null
+++ b/dom/webidl/StorageType.webidl
@@ -0,0 +1,7 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+enum StorageType { "persistent", "temporary", "default" };
diff --git a/dom/webidl/StyleRuleChangeEvent.webidl b/dom/webidl/StyleRuleChangeEvent.webidl
new file mode 100644
index 000000000..0b783366b
--- /dev/null
+++ b/dom/webidl/StyleRuleChangeEvent.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+interface CSSRule;
+
+[ChromeOnly, Constructor(DOMString type, optional StyleRuleChangeEventInit eventInitDict)]
+interface StyleRuleChangeEvent : Event
+{
+ readonly attribute CSSStyleSheet? stylesheet;
+ readonly attribute CSSRule? rule;
+};
+
+dictionary StyleRuleChangeEventInit : EventInit
+{
+ CSSStyleSheet? stylesheet = null;
+ CSSRule? rule = null;
+};
diff --git a/dom/webidl/StyleSheet.webidl b/dom/webidl/StyleSheet.webidl
new file mode 100644
index 000000000..71a8ccd8f
--- /dev/null
+++ b/dom/webidl/StyleSheet.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/csswg/cssom/
+ */
+
+interface CSSRule;
+
+interface StyleSheet {
+ [Constant]
+ readonly attribute DOMString type;
+ [Constant]
+ readonly attribute DOMString? href;
+ // Spec says "Node", but it can go null when the node gets a new
+ // sheet. That's also why it's not [Constant]
+ [Pure]
+ readonly attribute Node? ownerNode;
+ [Pure]
+ readonly attribute StyleSheet? parentStyleSheet;
+ [Pure]
+ readonly attribute DOMString? title;
+ [Constant]
+ readonly attribute MediaList media;
+ [Pure]
+ attribute boolean disabled;
+};
diff --git a/dom/webidl/StyleSheetApplicableStateChangeEvent.webidl b/dom/webidl/StyleSheetApplicableStateChangeEvent.webidl
new file mode 100644
index 000000000..cb196569f
--- /dev/null
+++ b/dom/webidl/StyleSheetApplicableStateChangeEvent.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[ChromeOnly, Constructor(DOMString type, optional StyleSheetApplicableStateChangeEventInit eventInitDict)]
+interface StyleSheetApplicableStateChangeEvent : Event
+{
+ readonly attribute CSSStyleSheet? stylesheet;
+ readonly attribute boolean applicable;
+};
+
+dictionary StyleSheetApplicableStateChangeEventInit : EventInit
+{
+ CSSStyleSheet? stylesheet = null;
+ boolean applicable = false;
+};
diff --git a/dom/webidl/StyleSheetChangeEvent.webidl b/dom/webidl/StyleSheetChangeEvent.webidl
new file mode 100644
index 000000000..9d04f67cc
--- /dev/null
+++ b/dom/webidl/StyleSheetChangeEvent.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[ChromeOnly, Constructor(DOMString type, optional StyleSheetChangeEventInit eventInitDict)]
+interface StyleSheetChangeEvent : Event
+{
+ readonly attribute CSSStyleSheet? stylesheet;
+ readonly attribute boolean documentSheet;
+};
+
+dictionary StyleSheetChangeEventInit : EventInit
+{
+ CSSStyleSheet? stylesheet = null;
+ boolean documentSheet = false;
+};
diff --git a/dom/webidl/StyleSheetList.webidl b/dom/webidl/StyleSheetList.webidl
new file mode 100644
index 000000000..e6091ac29
--- /dev/null
+++ b/dom/webidl/StyleSheetList.webidl
@@ -0,0 +1,8 @@
+/* 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/. */
+
+interface StyleSheetList {
+ readonly attribute unsigned long length;
+ getter StyleSheet? item(unsigned long index);
+};
diff --git a/dom/webidl/SubtleCrypto.webidl b/dom/webidl/SubtleCrypto.webidl
new file mode 100644
index 000000000..328447ee7
--- /dev/null
+++ b/dom/webidl/SubtleCrypto.webidl
@@ -0,0 +1,232 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/WebCryptoAPI/
+ */
+
+typedef DOMString KeyType;
+typedef DOMString KeyUsage;
+typedef DOMString NamedCurve;
+typedef Uint8Array BigInteger;
+
+/***** Algorithm dictionaries *****/
+
+dictionary Algorithm {
+ required DOMString name;
+};
+
+dictionary AesCbcParams : Algorithm {
+ required BufferSource iv;
+};
+
+dictionary AesCtrParams : Algorithm {
+ required BufferSource counter;
+ [EnforceRange] required octet length;
+};
+
+dictionary AesGcmParams : Algorithm {
+ required BufferSource iv;
+ BufferSource additionalData;
+ [EnforceRange] octet tagLength;
+};
+
+dictionary HmacImportParams : Algorithm {
+ required AlgorithmIdentifier hash;
+};
+
+dictionary Pbkdf2Params : Algorithm {
+ required BufferSource salt;
+ [EnforceRange] required unsigned long iterations;
+ required AlgorithmIdentifier hash;
+};
+
+dictionary RsaHashedImportParams {
+ required AlgorithmIdentifier hash;
+};
+
+dictionary AesKeyGenParams : Algorithm {
+ [EnforceRange] required unsigned short length;
+};
+
+dictionary HmacKeyGenParams : Algorithm {
+ required AlgorithmIdentifier hash;
+ [EnforceRange] unsigned long length;
+};
+
+dictionary RsaHashedKeyGenParams : Algorithm {
+ [EnforceRange] required unsigned long modulusLength;
+ required BigInteger publicExponent;
+ required AlgorithmIdentifier hash;
+};
+
+dictionary RsaOaepParams : Algorithm {
+ BufferSource label;
+};
+
+dictionary RsaPssParams : Algorithm {
+ [EnforceRange] required unsigned long saltLength;
+};
+
+dictionary DhKeyGenParams : Algorithm {
+ required BigInteger prime;
+ required BigInteger generator;
+};
+
+dictionary EcKeyGenParams : Algorithm {
+ required NamedCurve namedCurve;
+};
+
+dictionary AesDerivedKeyParams : Algorithm {
+ [EnforceRange] required unsigned long length;
+};
+
+dictionary HmacDerivedKeyParams : HmacImportParams {
+ [EnforceRange] unsigned long length;
+};
+
+dictionary EcdhKeyDeriveParams : Algorithm {
+ required CryptoKey public;
+};
+
+dictionary DhKeyDeriveParams : Algorithm {
+ required CryptoKey public;
+};
+
+dictionary DhImportKeyParams : Algorithm {
+ required BigInteger prime;
+ required BigInteger generator;
+};
+
+dictionary EcdsaParams : Algorithm {
+ required AlgorithmIdentifier hash;
+};
+
+dictionary EcKeyImportParams : Algorithm {
+ NamedCurve namedCurve;
+};
+
+dictionary HkdfParams : Algorithm {
+ required AlgorithmIdentifier hash;
+ required BufferSource salt;
+ required BufferSource info;
+};
+
+/***** JWK *****/
+
+dictionary RsaOtherPrimesInfo {
+ // The following fields are defined in Section 6.3.2.7 of JSON Web Algorithms
+ required DOMString r;
+ required DOMString d;
+ required DOMString t;
+};
+
+dictionary JsonWebKey {
+ // The following fields are defined in Section 3.1 of JSON Web Key
+ required DOMString kty;
+ DOMString use;
+ sequence<DOMString> key_ops;
+ DOMString alg;
+
+ // The following fields are defined in JSON Web Key Parameters Registration
+ boolean ext;
+
+ // The following fields are defined in Section 6 of JSON Web Algorithms
+ DOMString crv;
+ DOMString x;
+ DOMString y;
+ DOMString d;
+ DOMString n;
+ DOMString e;
+ DOMString p;
+ DOMString q;
+ DOMString dp;
+ DOMString dq;
+ DOMString qi;
+ sequence<RsaOtherPrimesInfo> oth;
+ DOMString k;
+};
+
+
+/***** The Main API *****/
+
+interface CryptoKey {
+ readonly attribute KeyType type;
+ readonly attribute boolean extractable;
+ [Cached, Constant, Throws] readonly attribute object algorithm;
+ [Cached, Constant, Frozen] readonly attribute sequence<KeyUsage> usages;
+};
+
+dictionary CryptoKeyPair {
+ required CryptoKey publicKey;
+ required CryptoKey privateKey;
+};
+
+typedef DOMString KeyFormat;
+typedef (object or DOMString) AlgorithmIdentifier;
+
+[Exposed=(Window,Worker)]
+interface SubtleCrypto {
+ [Throws]
+ Promise<any> encrypt(AlgorithmIdentifier algorithm,
+ CryptoKey key,
+ BufferSource data);
+ [Throws]
+ Promise<any> decrypt(AlgorithmIdentifier algorithm,
+ CryptoKey key,
+ BufferSource data);
+ [Throws]
+ Promise<any> sign(AlgorithmIdentifier algorithm,
+ CryptoKey key,
+ BufferSource data);
+ [Throws]
+ Promise<any> verify(AlgorithmIdentifier algorithm,
+ CryptoKey key,
+ BufferSource signature,
+ BufferSource data);
+ [Throws]
+ Promise<any> digest(AlgorithmIdentifier algorithm,
+ BufferSource data);
+
+ [Throws]
+ Promise<any> generateKey(AlgorithmIdentifier algorithm,
+ boolean extractable,
+ sequence<KeyUsage> keyUsages );
+ [Throws]
+ Promise<any> deriveKey(AlgorithmIdentifier algorithm,
+ CryptoKey baseKey,
+ AlgorithmIdentifier derivedKeyType,
+ boolean extractable,
+ sequence<KeyUsage> keyUsages );
+ [Throws]
+ Promise<any> deriveBits(AlgorithmIdentifier algorithm,
+ CryptoKey baseKey,
+ unsigned long length);
+
+ [Throws]
+ Promise<any> importKey(KeyFormat format,
+ object keyData,
+ AlgorithmIdentifier algorithm,
+ boolean extractable,
+ sequence<KeyUsage> keyUsages );
+ [Throws]
+ Promise<any> exportKey(KeyFormat format, CryptoKey key);
+
+ [Throws]
+ Promise<any> wrapKey(KeyFormat format,
+ CryptoKey key,
+ CryptoKey wrappingKey,
+ AlgorithmIdentifier wrapAlgorithm);
+
+ [Throws]
+ Promise<any> unwrapKey(KeyFormat format,
+ BufferSource wrappedKey,
+ CryptoKey unwrappingKey,
+ AlgorithmIdentifier unwrapAlgorithm,
+ AlgorithmIdentifier unwrappedKeyAlgorithm,
+ boolean extractable,
+ sequence<KeyUsage> keyUsages );
+};
+
diff --git a/dom/webidl/SystemUpdate.webidl b/dom/webidl/SystemUpdate.webidl
new file mode 100644
index 000000000..bd7857b4d
--- /dev/null
+++ b/dom/webidl/SystemUpdate.webidl
@@ -0,0 +1,48 @@
+/* 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/. */
+
+dictionary SystemUpdateProviderInfo {
+ DOMString name = "";
+ DOMString uuid = "";
+};
+
+dictionary SystemUpdatePackageInfo {
+ DOMString type = "";
+ DOMString version = "";
+ DOMString description = "";
+ DOMTimeStamp buildDate = 0;
+ unsigned long long size = 0;
+};
+
+[JSImplementation="@mozilla.org/system-update-provider;1",
+ ChromeOnly,
+ Pref="dom.system_update.enabled"]
+interface SystemUpdateProvider : EventTarget {
+ readonly attribute DOMString name;
+ readonly attribute DOMString uuid;
+
+ attribute EventHandler onupdateavailable;
+ attribute EventHandler onprogress;
+ attribute EventHandler onupdateready;
+ attribute EventHandler onerror;
+
+ void checkForUpdate();
+ void startDownload();
+ void stopDownload();
+ void applyUpdate();
+ boolean setParameter(DOMString name, DOMString value);
+ DOMString getParameter(DOMString name);
+};
+
+[NavigatorProperty="updateManager",
+ JSImplementation="@mozilla.org/system-update-manager;1",
+ ChromeOnly,
+ Pref="dom.system_update.enabled"]
+interface SystemUpdateManager {
+ Promise<sequence<SystemUpdateProviderInfo>> getProviders();
+
+ Promise<SystemUpdateProvider> setActiveProvider(DOMString uuid);
+
+ Promise<SystemUpdateProvider> getActiveProvider();
+};
diff --git a/dom/webidl/TCPServerSocket.webidl b/dom/webidl/TCPServerSocket.webidl
new file mode 100644
index 000000000..06d6689d2
--- /dev/null
+++ b/dom/webidl/TCPServerSocket.webidl
@@ -0,0 +1,42 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+/**
+ * TCPServerSocket
+ *
+ * An interface to a server socket that can accept incoming connections for gaia apps.
+ */
+
+dictionary ServerSocketOptions {
+ TCPSocketBinaryType binaryType = "string";
+};
+
+[Constructor(unsigned short port, optional ServerSocketOptions options, optional unsigned short backlog = 0),
+ Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
+ Exposed=(Window,System)]
+interface TCPServerSocket : EventTarget {
+ /**
+ * The port of this server socket object.
+ */
+ readonly attribute unsigned short localPort;
+
+ /**
+ * The "connect" event is dispatched when a client connection is accepted.
+ * The event object will be a TCPServerSocketEvent containing a TCPSocket
+ * instance, which is used for communication between client and server.
+ */
+ attribute EventHandler onconnect;
+
+ /**
+ * The "error" event will be dispatched when a listening server socket is
+ * unexpectedly disconnected.
+ */
+ attribute EventHandler onerror;
+
+ /**
+ * Close the server socket.
+ */
+ void close();
+};
diff --git a/dom/webidl/TCPServerSocketEvent.webidl b/dom/webidl/TCPServerSocketEvent.webidl
new file mode 100644
index 000000000..f133ae781
--- /dev/null
+++ b/dom/webidl/TCPServerSocketEvent.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[Constructor(DOMString type, optional TCPServerSocketEventInit eventInitDict),
+ Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
+ Exposed=(Window,System)]
+interface TCPServerSocketEvent : Event {
+ readonly attribute TCPSocket socket;
+};
+
+dictionary TCPServerSocketEventInit : EventInit {
+ TCPSocket? socket = null;
+};
diff --git a/dom/webidl/TCPSocket.webidl b/dom/webidl/TCPSocket.webidl
new file mode 100644
index 000000000..42c6c2f73
--- /dev/null
+++ b/dom/webidl/TCPSocket.webidl
@@ -0,0 +1,210 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+/**
+ * TCPSocket exposes a TCP client socket (no server sockets yet)
+ * to highly privileged apps. It provides a buffered, non-blocking
+ * interface for sending. For receiving, it uses an asynchronous,
+ * event handler based interface.
+ */
+
+enum TCPSocketBinaryType {
+ "arraybuffer",
+ "string"
+};
+
+dictionary SocketOptions {
+ boolean useSecureTransport = false;
+ TCPSocketBinaryType binaryType = "string";
+};
+
+enum TCPReadyState {
+ "connecting",
+ "open",
+ "closing",
+ "closed",
+};
+
+[NoInterfaceObject]
+interface LegacyMozTCPSocket {
+ /**
+ * Legacy constructor for API compatibility.
+ */
+ [Throws]
+ TCPSocket open(DOMString host, unsigned short port, optional SocketOptions options);
+
+ [Throws]
+ TCPServerSocket listen(unsigned short port, optional ServerSocketOptions options, optional unsigned short backlog = 0);
+};
+
+[Constructor(DOMString host, unsigned short port, optional SocketOptions options),
+ Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
+ Exposed=(Window,System)]
+interface TCPSocket : EventTarget {
+ /**
+ * Upgrade an insecure connection to use TLS. Throws if the ready state is not OPEN.
+ */
+ [Throws] void upgradeToSecure();
+
+ /**
+ * The UTF16 host of this socket object.
+ */
+ readonly attribute USVString host;
+
+ /**
+ * The port of this socket object.
+ */
+ readonly attribute unsigned short port;
+
+ /**
+ * True if this socket object is an SSL socket.
+ */
+ readonly attribute boolean ssl;
+
+ /**
+ * The number of bytes which have previously been buffered by calls to
+ * send on this socket.
+ */
+ readonly attribute unsigned long long bufferedAmount;
+
+ /**
+ * Pause reading incoming data and invocations of the ondata handler until
+ * resume is called. Can be called multiple times without resuming.
+ */
+ void suspend();
+
+ /**
+ * Resume reading incoming data and invoking ondata as usual. There must be
+ * an equal number of resume as suspends that took place. Throws if the
+ * socket is not suspended.
+ */
+ [Throws]
+ void resume();
+
+ /**
+ * Close the socket.
+ */
+ void close();
+
+ /**
+ * Close the socket immediately without waiting for unsent data.
+ */
+ [ChromeOnly] void closeImmediately();
+
+ /**
+ * Write data to the socket.
+ *
+ * @param data The data to write to the socket.
+ *
+ * @return Send returns true or false as a hint to the caller that
+ * they may either continue sending more data immediately, or
+ * may want to wait until the other side has read some of the
+ * data which has already been written to the socket before
+ * buffering more. If send returns true, then less than 64k
+ * has been buffered and it's safe to immediately write more.
+ * If send returns false, then more than 64k has been buffered,
+ * and the caller may wish to wait until the ondrain event
+ * handler has been called before buffering more data by more
+ * calls to send.
+ *
+ * @throws Throws if the ready state is not OPEN.
+ */
+ [Throws]
+ boolean send(ByteString data);
+
+ /**
+ * Write data to the socket.
+ *
+ * @param data The data to write to the socket.
+ * @param byteOffset The offset within the data from which to begin writing.
+ * @param byteLength The number of bytes to write.
+ * Defaults to the byte length of the ArrayBuffer if not present,
+ * and clamped to (length - byteOffset).
+ *
+ * @return Send returns true or false as a hint to the caller that
+ * they may either continue sending more data immediately, or
+ * may want to wait until the other side has read some of the
+ * data which has already been written to the socket before
+ * buffering more. If send returns true, then less than 64k
+ * has been buffered and it's safe to immediately write more.
+ * If send returns false, then more than 64k has been buffered,
+ * and the caller may wish to wait until the ondrain event
+ * handler has been called before buffering more data by more
+ * calls to send.
+ *
+ * @throws Throws if the ready state is not OPEN.
+ */
+ [Throws]
+ boolean send(ArrayBuffer data, optional unsigned long byteOffset = 0, optional unsigned long byteLength);
+
+ /**
+ * The readyState attribute indicates which state the socket is currently
+ * in.
+ */
+ readonly attribute TCPReadyState readyState;
+
+ /**
+ * The binaryType attribute indicates which mode this socket uses for
+ * sending and receiving data. If the binaryType: "arraybuffer" option
+ * was passed to the open method that created this socket, binaryType
+ * will be "arraybuffer". Otherwise, it will be "string".
+ */
+ readonly attribute TCPSocketBinaryType binaryType;
+
+ /**
+ * The "open" event is dispatched when the connection to the server
+ * has been established. If the connection is refused, the "error" event
+ * will be dispatched, instead.
+ */
+ attribute EventHandler onopen;
+
+ /**
+ * After send has buffered more than 64k of data, it returns false to
+ * indicate that the client should pause before sending more data, to
+ * avoid accumulating large buffers. This is only advisory, and the client
+ * is free to ignore it and buffer as much data as desired, but if reducing
+ * the size of buffers is important (especially for a streaming application)
+ * the "drain" event will be dispatched once the previously-buffered data has
+ * been written to the network, at which point the client can resume calling
+ * send again.
+ */
+ attribute EventHandler ondrain;
+
+ /**
+ * The "data" event will be dispatched repeatedly and asynchronously after
+ * "open" is dispatched, every time some data was available from the server
+ * and was read. The event object will be a TCPSocketEvent; if the "arraybuffer"
+ * binaryType was passed to the constructor, the data attribute of the event
+ * object will be an ArrayBuffer. If not, it will be a normal JavaScript string,
+ * truncated at the first null byte found in the payload and the remainder
+ * interpreted as ASCII bytes.
+ *
+ * At any time, the client may choose to pause reading and receiving "data"
+ * events by calling the socket's suspend() method. Further "data" events
+ * will be paused until resume() is called.
+ */
+ attribute EventHandler ondata;
+
+ /**
+ * The "error" event will be dispatched when there is an error. The event
+ * object will be a TCPSocketErrorEvent.
+ *
+ * If an "error" event is dispatched before an "open" one, the connection
+ * was refused, and the "close" event will not be dispatched. If an "error"
+ * event is dispatched after an "open" event, the connection was lost,
+ * and a "close" event will be dispatched subsequently.
+ */
+ attribute EventHandler onerror;
+
+ /**
+ * The "close" event is dispatched once the underlying network socket
+ * has been closed, either by the server, or by the client calling
+ * close.
+ *
+ * If the "error" event was not dispatched before "close", then one of
+ * the sides cleanly closed the connection.
+ */
+ attribute EventHandler onclose;
+};
diff --git a/dom/webidl/TCPSocketErrorEvent.webidl b/dom/webidl/TCPSocketErrorEvent.webidl
new file mode 100644
index 000000000..22db1b768
--- /dev/null
+++ b/dom/webidl/TCPSocketErrorEvent.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+/* Dispatched as part of the "error" event in the following situations:
+* - if there's an error detected when the TCPSocket closes
+* - if there's an internal error while sending data
+* - if there's an error connecting to the host
+*/
+
+[Constructor(DOMString type, optional TCPSocketErrorEventInit eventInitDict),
+ Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
+ Exposed=(Window,System)]
+interface TCPSocketErrorEvent : Event {
+ readonly attribute DOMString name;
+ readonly attribute DOMString message;
+};
+
+dictionary TCPSocketErrorEventInit : EventInit
+{
+ DOMString name = "";
+ DOMString message = "";
+};
diff --git a/dom/webidl/TCPSocketEvent.webidl b/dom/webidl/TCPSocketEvent.webidl
new file mode 100644
index 000000000..6a3d6851d
--- /dev/null
+++ b/dom/webidl/TCPSocketEvent.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+/**
+ * TCPSocketEvent is the event dispatched for all of the events described by TCPSocket,
+ * except the "error" event. It contains the socket that was associated with the event,
+ * the type of event, and the data associated with the event if the event is a "data" event.
+ */
+
+[Constructor(DOMString type, optional TCPSocketEventInit eventInitDict),
+ Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
+ Exposed=(Window,System)]
+interface TCPSocketEvent : Event {
+ /**
+ * If the event is a "data" event, data will be the bytes read from the network;
+ * if the binaryType of the socket was "arraybuffer", this value will be of type
+ * ArrayBuffer, otherwise, it will be a ByteString.
+ *
+ * For other events, data will be an empty string.
+ */
+ //TODO: make this (ArrayBuffer or ByteString) after sorting out the rooting required. (bug 1121634)
+ readonly attribute any data;
+};
+
+dictionary TCPSocketEventInit : EventInit {
+ //TODO: make this (ArrayBuffer or ByteString) after sorting out the rooting required. (bug 1121634)
+ any data = null;
+};
diff --git a/dom/webidl/TestFunctions.webidl b/dom/webidl/TestFunctions.webidl
new file mode 100644
index 000000000..c0db0b644
--- /dev/null
+++ b/dom/webidl/TestFunctions.webidl
@@ -0,0 +1,41 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+// A dumping ground for random testing functions
+
+callback PromiseReturner = Promise<any>();
+
+[Pref="dom.expose_test_interfaces",
+ Constructor]
+interface TestFunctions {
+ [Throws]
+ static void throwUncatchableException();
+
+ // Simply returns its argument. Can be used to test Promise
+ // argument processing behavior.
+ static Promise<any> passThroughPromise(Promise<any> arg);
+
+ // Returns whatever Promise the given PromiseReturner returned.
+ [Throws]
+ static Promise<any> passThroughCallbackPromise(PromiseReturner callback);
+
+ // Some basic tests for string binding round-tripping behavior.
+ void setStringData(DOMString arg);
+
+ // Get the string data, using an nsAString argument on the C++ side.
+ // This will just use Assign/operator=, whatever that does.
+ DOMString getStringDataAsAString();
+
+ // Get the string data, but only "length" chars of it, using an
+ // nsAString argument on the C++ side. This will always copy on the
+ // C++ side.
+ DOMString getStringDataAsAString(unsigned long length);
+
+ // Get the string data, but only "length" chars of it, using a
+ // DOMString argument on the C++ side and trying to hand it
+ // stringbuffers. If length not passed, use our full length.
+ DOMString getStringDataAsDOMString(optional unsigned long length);
+};
diff --git a/dom/webidl/TestInterfaceJS.webidl b/dom/webidl/TestInterfaceJS.webidl
new file mode 100644
index 000000000..1ca629c39
--- /dev/null
+++ b/dom/webidl/TestInterfaceJS.webidl
@@ -0,0 +1,84 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+dictionary TestInterfaceJSUnionableDictionary {
+ object objectMember;
+ any anyMember;
+};
+
+[JSImplementation="@mozilla.org/dom/test-interface-js;1",
+ Pref="dom.expose_test_interfaces",
+ Constructor(optional any anyArg, optional object objectArg, optional TestInterfaceJSDictionary dictionaryArg)]
+interface TestInterfaceJS : EventTarget {
+ readonly attribute any anyArg;
+ readonly attribute object objectArg;
+ [Cached, Pure] readonly attribute TestInterfaceJSDictionary dictionaryArg;
+ attribute any anyAttr;
+ attribute object objectAttr;
+ [Cached, Pure] attribute TestInterfaceJSDictionary dictionaryAttr;
+ any pingPongAny(any arg);
+ object pingPongObject(object obj);
+ any pingPongObjectOrString((object or DOMString) objOrString);
+ TestInterfaceJSDictionary pingPongDictionary(optional TestInterfaceJSDictionary dict);
+ long pingPongDictionaryOrLong(optional (TestInterfaceJSUnionableDictionary or long) dictOrLong);
+ DOMString pingPongMap(MozMap<any> map);
+ long objectSequenceLength(sequence<object> seq);
+ long anySequenceLength(sequence<any> seq);
+
+ // For testing bug 968335.
+ DOMString getCallerPrincipal();
+
+ DOMString convertSVS(USVString svs);
+
+ (TestInterfaceJS or long) pingPongUnion((TestInterfaceJS or long) something);
+ (DOMString or TestInterfaceJS?) pingPongUnionContainingNull((TestInterfaceJS? or DOMString) something);
+ (TestInterfaceJS or long)? pingPongNullableUnion((TestInterfaceJS or long)? something);
+ (Location or TestInterfaceJS) returnBadUnion();
+
+ [Cached, Pure]
+ readonly attribute short cachedAttr;
+ void setCachedAttr(short n);
+ void clearCachedAttrCache();
+
+ // Test for sequence overloading and union behavior
+ void testSequenceOverload(sequence<DOMString> arg);
+ void testSequenceOverload(DOMString arg);
+
+ void testSequenceUnion((sequence<DOMString> or DOMString) arg);
+
+ // Tests for exception-throwing behavior
+ [Throws]
+ void testThrowError();
+
+ [Throws]
+ void testThrowDOMException();
+
+ [Throws]
+ void testThrowTypeError();
+
+ [Throws]
+ void testThrowCallbackError(Function callback);
+
+ [Throws]
+ void testThrowXraySelfHosted();
+
+ [Throws]
+ void testThrowSelfHosted();
+
+ // Tests for promise-rejection behavior
+ Promise<void> testPromiseWithThrowingChromePromiseInit();
+ Promise<void> testPromiseWithThrowingContentPromiseInit(PromiseInit func);
+ Promise<void> testPromiseWithDOMExceptionThrowingPromiseInit();
+ Promise<void> testPromiseWithThrowingChromeThenFunction();
+ Promise<void> testPromiseWithThrowingContentThenFunction(AnyCallback func);
+ Promise<void> testPromiseWithDOMExceptionThrowingThenFunction();
+ Promise<void> testPromiseWithThrowingChromeThenable();
+ Promise<void> testPromiseWithThrowingContentThenable(object thenable);
+ Promise<void> testPromiseWithDOMExceptionThrowingThenable();
+
+ // Event handler tests
+ attribute EventHandler onsomething;
+};
diff --git a/dom/webidl/TestInterfaceJSDictionaries.webidl b/dom/webidl/TestInterfaceJSDictionaries.webidl
new file mode 100644
index 000000000..366864a8d
--- /dev/null
+++ b/dom/webidl/TestInterfaceJSDictionaries.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+//
+// These dictionaries are in a separate WebIDL file to avoid circular include
+// problems. One of the dictionary includes a union as a member, so that
+// dictionary's header needs to include UnionTypes.h. But the API in
+// TestInterfaceJS also declares a union of dictionaries, so _that_
+// dictionary's header needs to be included _by_ UnionTypes.h. The solution
+// is to separate those two dictionaries into separate header files.
+//
+
+dictionary TestInterfaceJSDictionary2 {
+ object innerObject;
+};
+
+dictionary TestInterfaceJSDictionary {
+ TestInterfaceJSDictionary2 innerDictionary;
+ object objectMember;
+ any anyMember;
+ (object or DOMString) objectOrStringMember;
+ sequence<any> anySequenceMember;
+};
+
diff --git a/dom/webidl/TestInterfaceJSMaplikeSetlikeIterable.webidl b/dom/webidl/TestInterfaceJSMaplikeSetlikeIterable.webidl
new file mode 100644
index 000000000..9a953784c
--- /dev/null
+++ b/dom/webidl/TestInterfaceJSMaplikeSetlikeIterable.webidl
@@ -0,0 +1,68 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(),
+ Pref="dom.expose_test_interfaces"]
+interface TestInterfaceMaplike {
+ maplike<DOMString, long>;
+ void setInternal(DOMString aKey, long aValue);
+ void clearInternal();
+ boolean deleteInternal(DOMString aKey);
+ boolean hasInternal(DOMString aKey);
+};
+
+[Constructor(),
+ Pref="dom.expose_test_interfaces"]
+interface TestInterfaceMaplikeObject {
+ readonly maplike<DOMString, TestInterfaceMaplike>;
+ void setInternal(DOMString aKey);
+ void clearInternal();
+ boolean deleteInternal(DOMString aKey);
+ boolean hasInternal(DOMString aKey);
+};
+
+[Pref="dom.expose_test_interfaces",
+ JSImplementation="@mozilla.org/dom/test-interface-js-maplike;1",
+ Constructor()]
+interface TestInterfaceJSMaplike {
+ readonly maplike<DOMString, long>;
+ void setInternal(DOMString aKey, long aValue);
+ void clearInternal();
+ boolean deleteInternal(DOMString aKey);
+};
+
+[Constructor(),
+ Pref="dom.expose_test_interfaces"]
+interface TestInterfaceSetlike {
+ setlike<DOMString>;
+};
+
+[Constructor(),
+ Pref="dom.expose_test_interfaces"]
+interface TestInterfaceSetlikeNode {
+ setlike<Node>;
+};
+
+[Constructor(),
+ Pref="dom.expose_test_interfaces"]
+interface TestInterfaceIterableSingle {
+ iterable<long>;
+ getter long(unsigned long index);
+ readonly attribute unsigned long length;
+};
+
+[Constructor(),
+ Pref="dom.expose_test_interfaces"]
+interface TestInterfaceIterableDouble {
+ iterable<DOMString, DOMString>;
+};
+
+[Constructor(),
+ Pref="dom.expose_test_interfaces"]
+interface TestInterfaceIterableDoubleUnion {
+ iterable<DOMString, (DOMString or long)>;
+};
+
diff --git a/dom/webidl/Text.webidl b/dom/webidl/Text.webidl
new file mode 100644
index 000000000..dcd25cec3
--- /dev/null
+++ b/dom/webidl/Text.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(optional DOMString data = "")]
+interface Text : CharacterData {
+ [Throws]
+ Text splitText(unsigned long offset);
+ [Throws]
+ readonly attribute DOMString wholeText;
+};
+
+Text implements GeometryUtils;
diff --git a/dom/webidl/TextClause.webidl b/dom/webidl/TextClause.webidl
new file mode 100644
index 000000000..2baeeb2d7
--- /dev/null
+++ b/dom/webidl/TextClause.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[ChromeOnly]
+interface TextClause
+{
+ // The start offset of TextClause
+ readonly attribute long startOffset;
+
+ // The end offset of TextClause
+ readonly attribute long endOffset;
+
+ // If the TextClause is Caret or not
+ readonly attribute boolean isCaret;
+
+ // If the TextClause is TargetClause or not
+ readonly attribute boolean isTargetClause;
+};
diff --git a/dom/webidl/TextDecoder.webidl b/dom/webidl/TextDecoder.webidl
new file mode 100644
index 000000000..3fff4a255
--- /dev/null
+++ b/dom/webidl/TextDecoder.webidl
@@ -0,0 +1,31 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://encoding.spec.whatwg.org/#interface-textdecoder
+ *
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options),
+ Exposed=(Window,Worker,System)]
+interface TextDecoder {
+ [Constant]
+ readonly attribute DOMString encoding;
+ [Constant]
+ readonly attribute boolean fatal;
+ [Throws]
+ USVString decode(optional BufferSource input, optional TextDecodeOptions options);
+};
+
+dictionary TextDecoderOptions {
+ boolean fatal = false;
+};
+
+dictionary TextDecodeOptions {
+ boolean stream = false;
+};
+
diff --git a/dom/webidl/TextEncoder.webidl b/dom/webidl/TextEncoder.webidl
new file mode 100644
index 000000000..9269b572d
--- /dev/null
+++ b/dom/webidl/TextEncoder.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://encoding.spec.whatwg.org/#interface-textencoder
+ *
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+[Constructor,
+ Exposed=(Window,Worker,System)]
+interface TextEncoder {
+ [Constant]
+ readonly attribute DOMString encoding;
+ [NewObject]
+ Uint8Array encode(optional USVString input = "");
+};
diff --git a/dom/webidl/TextTrack.webidl b/dom/webidl/TextTrack.webidl
new file mode 100644
index 000000000..442a1667f
--- /dev/null
+++ b/dom/webidl/TextTrack.webidl
@@ -0,0 +1,48 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#texttrack
+ */
+
+enum TextTrackKind {
+ "subtitles",
+ "captions",
+ "descriptions",
+ "chapters",
+ "metadata"
+};
+
+enum TextTrackMode {
+ "disabled",
+ "hidden",
+ "showing"
+};
+
+interface TextTrack : EventTarget {
+ readonly attribute TextTrackKind kind;
+ readonly attribute DOMString label;
+ readonly attribute DOMString language;
+
+ readonly attribute DOMString id;
+ readonly attribute DOMString inBandMetadataTrackDispatchType;
+
+ attribute TextTrackMode mode;
+
+ readonly attribute TextTrackCueList? cues;
+ readonly attribute TextTrackCueList? activeCues;
+
+ void addCue(VTTCue cue);
+ [Throws]
+ void removeCue(VTTCue cue);
+
+ attribute EventHandler oncuechange;
+};
+
+// Mozilla Extensions
+partial interface TextTrack {
+ [ChromeOnly]
+ readonly attribute TextTrackList? textTrackList;
+};
diff --git a/dom/webidl/TextTrackCue.webidl b/dom/webidl/TextTrackCue.webidl
new file mode 100644
index 000000000..2dc242dd1
--- /dev/null
+++ b/dom/webidl/TextTrackCue.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://html.spec.whatwg.org/#texttrackcue
+ */
+
+interface TextTrackCue : EventTarget {
+ readonly attribute TextTrack? track;
+
+ attribute DOMString id;
+ attribute double startTime;
+ attribute double endTime;
+ attribute boolean pauseOnExit;
+
+ attribute EventHandler onenter;
+ attribute EventHandler onexit;
+};
diff --git a/dom/webidl/TextTrackCueList.webidl b/dom/webidl/TextTrackCueList.webidl
new file mode 100644
index 000000000..0854004bd
--- /dev/null
+++ b/dom/webidl/TextTrackCueList.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#texttrackcuelist
+ */
+
+interface TextTrackCueList {
+ readonly attribute unsigned long length;
+ getter VTTCue (unsigned long index);
+ VTTCue? getCueById(DOMString id);
+};
diff --git a/dom/webidl/TextTrackList.webidl b/dom/webidl/TextTrackList.webidl
new file mode 100644
index 000000000..1150871e3
--- /dev/null
+++ b/dom/webidl/TextTrackList.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#texttracklist
+ */
+
+interface TextTrackList : EventTarget {
+ readonly attribute unsigned long length;
+ getter TextTrack (unsigned long index);
+ TextTrack? getTrackById(DOMString id);
+
+ attribute EventHandler onchange;
+ attribute EventHandler onaddtrack;
+ attribute EventHandler onremovetrack;
+};
+
+// Mozilla extensions
+partial interface TextTrackList {
+ [ChromeOnly]
+ readonly attribute HTMLMediaElement? mediaElement;
+};
diff --git a/dom/webidl/ThreadSafeChromeUtils.webidl b/dom/webidl/ThreadSafeChromeUtils.webidl
new file mode 100644
index 000000000..8d0f21734
--- /dev/null
+++ b/dom/webidl/ThreadSafeChromeUtils.webidl
@@ -0,0 +1,140 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+/**
+ * A collection of **thread-safe** static utility methods that are only exposed
+ * to Chrome. This interface is exposed in workers, while ChromeUtils is not.
+ */
+[ChromeOnly, Exposed=(Window,System,Worker)]
+interface ThreadSafeChromeUtils {
+ /**
+ * Serialize a snapshot of the heap graph, as seen by |JS::ubi::Node| and
+ * restricted by |boundaries|, and write it to the provided file path.
+ *
+ * @param boundaries The portion of the heap graph to write.
+ *
+ * @returns The path to the file the heap snapshot was written
+ * to. This is guaranteed to be within the temp
+ * directory and its file name will match the regexp
+ * `\d+(\-\d+)?\.fxsnapshot`.
+ */
+ [Throws]
+ static DOMString saveHeapSnapshot(optional HeapSnapshotBoundaries boundaries);
+
+ /**
+ * Deserialize a core dump into a HeapSnapshot.
+ *
+ * @param filePath The file path to read the heap snapshot from.
+ */
+ [Throws, NewObject]
+ static HeapSnapshot readHeapSnapshot(DOMString filePath);
+
+ /**
+ * Return the keys in a weak map. This operation is
+ * non-deterministic because it is affected by the scheduling of the
+ * garbage collector and the cycle collector.
+ *
+ * @param aMap weak map or other JavaScript value
+ * @returns If aMap is a weak map object, return the keys of the weak
+ * map as an array. Otherwise, return undefined.
+ */
+ [Throws, NewObject]
+ static any nondeterministicGetWeakMapKeys(any map);
+
+ /**
+ * Return the keys in a weak set. This operation is
+ * non-deterministic because it is affected by the scheduling of the
+ * garbage collector and the cycle collector.
+ *
+ * @param aSet weak set or other JavaScript value
+ * @returns If aSet is a weak set object, return the keys of the weak
+ * set as an array. Otherwise, return undefined.
+ */
+ [Throws, NewObject]
+ static any nondeterministicGetWeakSetKeys(any aSet);
+
+ /**
+ * Converts a buffer to a Base64 URL-encoded string per RFC 4648.
+ *
+ * @param source The buffer to encode.
+ * @param options Additional encoding options.
+ * @returns The encoded string.
+ */
+ [Throws]
+ static ByteString base64URLEncode(BufferSource source,
+ Base64URLEncodeOptions options);
+
+ /**
+ * Decodes a Base64 URL-encoded string per RFC 4648.
+ *
+ * @param string The string to decode.
+ * @param options Additional decoding options.
+ * @returns The decoded buffer.
+ */
+ [Throws, NewObject]
+ static ArrayBuffer base64URLDecode(ByteString string,
+ Base64URLDecodeOptions options);
+};
+
+/**
+ * A JS object whose properties specify what portion of the heap graph to
+ * write. The recognized properties are:
+ *
+ * * globals: [ global, ... ]
+ * Dump only nodes that either:
+ * - belong in the compartment of one of the given globals;
+ * - belong to no compartment, but do belong to a Zone that contains one of
+ * the given globals;
+ * - are referred to directly by one of the last two kinds of nodes; or
+ * - is the fictional root node, described below.
+ *
+ * * debugger: Debugger object
+ * Like "globals", but use the Debugger's debuggees as the globals.
+ *
+ * * runtime: true
+ * Dump the entire heap graph, starting with the JSRuntime's roots.
+ *
+ * One, and only one, of these properties must exist on the boundaries object.
+ *
+ * The root of the dumped graph is a fictional node whose ubi::Node type name is
+ * "CoreDumpRoot". If we are dumping the entire ubi::Node graph, this root node
+ * has an edge for each of the JSRuntime's roots. If we are dumping a selected
+ * set of globals, the root has an edge to each global, and an edge for each
+ * incoming JS reference to the selected Zones.
+ */
+dictionary HeapSnapshotBoundaries {
+ sequence<object> globals;
+ object debugger;
+ boolean runtime;
+};
+
+dictionary Base64URLEncodeOptions {
+ /** Specifies whether the output should be padded with "=" characters. */
+ required boolean pad;
+};
+
+enum Base64URLDecodePadding {
+ /**
+ * Fails decoding if the input is unpadded. RFC 4648, section 3.2 requires
+ * padding, unless the referring specification prohibits it.
+ */
+ "require",
+
+ /** Tolerates padded and unpadded input. */
+ "ignore",
+
+ /**
+ * Fails decoding if the input is padded. This follows the strict base64url
+ * variant used in JWS (RFC 7515, Appendix C) and HTTP Encrypted
+ * Content-Encoding (draft-ietf-httpbis-encryption-encoding-01).
+ */
+ "reject"
+};
+
+dictionary Base64URLDecodeOptions {
+ /** Specifies the padding mode for decoding the input. */
+ required Base64URLDecodePadding padding;
+};
diff --git a/dom/webidl/TimeEvent.webidl b/dom/webidl/TimeEvent.webidl
new file mode 100644
index 000000000..40e7a0beb
--- /dev/null
+++ b/dom/webidl/TimeEvent.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface please see
+ * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface TimeEvent : Event
+{
+ readonly attribute long detail;
+ readonly attribute WindowProxy? view;
+ void initTimeEvent(DOMString aType,
+ Window? aView,
+ long aDetail);
+};
diff --git a/dom/webidl/TimeRanges.webidl b/dom/webidl/TimeRanges.webidl
new file mode 100644
index 000000000..9f9b5270b
--- /dev/null
+++ b/dom/webidl/TimeRanges.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#timeranges
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface TimeRanges {
+ readonly attribute unsigned long length;
+
+ [Throws]
+ double start(unsigned long index);
+
+ [Throws]
+ double end(unsigned long index);
+};
diff --git a/dom/webidl/Touch.webidl b/dom/webidl/Touch.webidl
new file mode 100644
index 000000000..cefb44674
--- /dev/null
+++ b/dom/webidl/Touch.webidl
@@ -0,0 +1,43 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+dictionary TouchInit {
+ required long identifier;
+ required EventTarget target;
+ long clientX = 0;
+ long clientY = 0;
+ long screenX = 0;
+ long screenY = 0;
+ long pageX = 0;
+ long pageY = 0;
+ float radiusX = 0;
+ float radiusY = 0;
+ float rotationAngle = 0;
+ float force = 0;
+};
+
+[Constructor(TouchInit touchInitDict),
+ Func="mozilla::dom::Touch::PrefEnabled"]
+interface Touch {
+ readonly attribute long identifier;
+ readonly attribute EventTarget? target;
+ readonly attribute long screenX;
+ readonly attribute long screenY;
+ readonly attribute long clientX;
+ readonly attribute long clientY;
+ readonly attribute long pageX;
+ readonly attribute long pageY;
+ readonly attribute long radiusX;
+ readonly attribute long radiusY;
+ readonly attribute float rotationAngle;
+ readonly attribute float force;
+};
diff --git a/dom/webidl/TouchEvent.webidl b/dom/webidl/TouchEvent.webidl
new file mode 100644
index 000000000..d206fe0fb
--- /dev/null
+++ b/dom/webidl/TouchEvent.webidl
@@ -0,0 +1,37 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+dictionary TouchEventInit : EventModifierInit {
+ sequence<Touch> touches = [];
+ sequence<Touch> targetTouches = [];
+ sequence<Touch> changedTouches = [];
+};
+
+[Constructor(DOMString type, optional TouchEventInit eventInitDict),
+ Func="mozilla::dom::TouchEvent::PrefEnabled"]
+interface TouchEvent : UIEvent {
+ readonly attribute TouchList touches;
+ readonly attribute TouchList targetTouches;
+ readonly attribute TouchList changedTouches;
+
+ readonly attribute boolean altKey;
+ readonly attribute boolean metaKey;
+ readonly attribute boolean ctrlKey;
+ readonly attribute boolean shiftKey;
+
+ void initTouchEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ Window? view,
+ long detail,
+ boolean ctrlKey,
+ boolean altKey,
+ boolean shiftKey,
+ boolean metaKey,
+ TouchList? touches,
+ TouchList? targetTouches,
+ TouchList? changedTouches);
+};
diff --git a/dom/webidl/TouchList.webidl b/dom/webidl/TouchList.webidl
new file mode 100644
index 000000000..562a7fb4f
--- /dev/null
+++ b/dom/webidl/TouchList.webidl
@@ -0,0 +1,18 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://dvcs.w3.org/hg/webevents/raw-file/v1/touchevents.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="mozilla::dom::TouchList::PrefEnabled"]
+interface TouchList {
+ [Pure]
+ readonly attribute unsigned long length;
+ getter Touch? item(unsigned long index);
+};
diff --git a/dom/webidl/TrackEvent.webidl b/dom/webidl/TrackEvent.webidl
new file mode 100644
index 000000000..2daa2f457
--- /dev/null
+++ b/dom/webidl/TrackEvent.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#trackevent
+ */
+
+[Constructor(DOMString type, optional TrackEventInit eventInitDict)]
+interface TrackEvent : Event
+{
+ readonly attribute (VideoTrack or AudioTrack or TextTrack)? track;
+};
+
+dictionary TrackEventInit : EventInit
+{
+ (VideoTrack or AudioTrack or TextTrack)? track = null;
+};
diff --git a/dom/webidl/TransitionEvent.webidl b/dom/webidl/TransitionEvent.webidl
new file mode 100644
index 000000000..d4476dffa
--- /dev/null
+++ b/dom/webidl/TransitionEvent.webidl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * Transition events are defined in:
+ * http://www.w3.org/TR/css3-transitions/#transition-events-
+ * http://dev.w3.org/csswg/css3-transitions/#transition-events-
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString type, optional TransitionEventInit eventInitDict)]
+interface TransitionEvent : Event {
+ readonly attribute DOMString propertyName;
+ readonly attribute float elapsedTime;
+ readonly attribute DOMString pseudoElement;
+};
+
+dictionary TransitionEventInit : EventInit {
+ DOMString propertyName = "";
+ float elapsedTime = 0;
+ DOMString pseudoElement = "";
+};
diff --git a/dom/webidl/TreeBoxObject.webidl b/dom/webidl/TreeBoxObject.webidl
new file mode 100644
index 000000000..8ca0a5713
--- /dev/null
+++ b/dom/webidl/TreeBoxObject.webidl
@@ -0,0 +1,207 @@
+
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface MozTreeView;
+interface nsIScriptableRegion;
+
+dictionary TreeCellInfo {
+ long row = 0;
+ TreeColumn? col = null;
+ DOMString childElt = "";
+};
+
+[NoInterfaceObject]
+interface TreeBoxObject : BoxObject {
+
+ /**
+ * Obtain the columns.
+ */
+ readonly attribute TreeColumns? columns;
+
+ /**
+ * The view that backs the tree and that supplies it with its data.
+ * It is dynamically settable, either using a view attribute on the
+ * tree tag or by setting this attribute to a new value.
+ */
+ [SetterThrows]
+ attribute MozTreeView? view;
+
+ /**
+ * Whether or not we are currently focused.
+ */
+ attribute boolean focused;
+
+ /**
+ * Obtain the treebody content node
+ */
+ readonly attribute Element? treeBody;
+
+ /**
+ * Obtain the height of a row.
+ */
+ readonly attribute long rowHeight;
+
+ /**
+ * Obtain the width of a row.
+ */
+ readonly attribute long rowWidth;
+
+ /**
+ * Get the pixel position of the horizontal scrollbar.
+ */
+ readonly attribute long horizontalPosition;
+
+ /**
+ * Return the region for the visible parts of the selection, in device pixels
+ */
+ readonly attribute nsIScriptableRegion selectionRegion;
+
+ /**
+ * Get the index of the first visible row.
+ */
+ long getFirstVisibleRow();
+
+ /**
+ * Get the index of the last visible row.
+ */
+ long getLastVisibleRow();
+
+ /**
+ * Gets the number of possible visible rows.
+ */
+ long getPageLength();
+
+ /**
+ * Ensures that a row at a given index is visible.
+ */
+ void ensureRowIsVisible(long index);
+
+ /**
+ * Ensures that a given cell in the tree is visible.
+ */
+ void ensureCellIsVisible(long row, TreeColumn? col);
+
+ /**
+ * Scrolls such that the row at index is at the top of the visible view.
+ */
+ void scrollToRow(long index);
+
+ /**
+ * Scroll the tree up or down by numLines lines. Positive
+ * values move down in the tree. Prevents scrolling off the
+ * end of the tree.
+ */
+ void scrollByLines(long numLines);
+
+ /**
+ * Scroll the tree up or down by numPages pages. A page
+ * is considered to be the amount displayed by the tree.
+ * Positive values move down in the tree. Prevents scrolling
+ * off the end of the tree.
+ */
+ void scrollByPages(long numPages);
+
+ /**
+ * Scrolls such that a given cell is visible (if possible)
+ * at the top left corner of the visible view.
+ */
+ void scrollToCell(long row, TreeColumn? col);
+
+ /**
+ * Scrolls horizontally so that the specified column is
+ * at the left of the view (if possible).
+ */
+ void scrollToColumn(TreeColumn? col);
+
+ /**
+ * Scroll to a specific horizontal pixel position.
+ */
+ void scrollToHorizontalPosition(long horizontalPosition);
+
+ /**
+ * Invalidation methods for fine-grained painting control.
+ */
+ void invalidate();
+ void invalidateColumn(TreeColumn? col);
+ void invalidateRow(long index);
+ void invalidateCell(long row, TreeColumn? col);
+ void invalidateRange(long startIndex, long endIndex);
+ void invalidateColumnRange(long startIndex, long endIndex, TreeColumn? col);
+
+ /**
+ * A hit test that can tell you what row the mouse is over.
+ * returns -1 for invalid mouse coordinates.
+ *
+ * The coordinate system is the client coordinate system for the
+ * document this boxObject lives in, and the units are CSS pixels.
+ */
+ long getRowAt(long x, long y);
+
+ /**
+ * A hit test that can tell you what cell the mouse is over.
+ * TreeCellInfo.row is the row index hit, returns -1 for invalid mouse
+ * coordinates. TreeCellInfo.col is the column hit.
+ * TreeCellInfo.childElt is the pseudoelement hit: this can have values of
+ * "cell", "twisty", "image", and "text".
+ *
+ * The coordinate system is the client coordinate system for the
+ * document this boxObject lives in, and the units are CSS pixels.
+ */
+ [Throws]
+ TreeCellInfo getCellAt(long x, long y);
+
+ /**
+ * DEPRECATED: please use above version
+ */
+ [Throws]
+ void getCellAt(long x, long y, object row, object column, object childElt);
+
+ /**
+ * Find the coordinates of an element within a specific cell.
+ */
+ [Throws]
+ DOMRect? getCoordsForCellItem(long row, TreeColumn col, DOMString element);
+
+ /**
+ * DEPRECATED: Please use above version
+ */
+ [Throws]
+ void getCoordsForCellItem(long row, TreeColumn col, DOMString element,
+ object x, object y, object width, object height);
+
+ /**
+ * Determine if the text of a cell is being cropped or not.
+ */
+ [Throws]
+ boolean isCellCropped(long row, TreeColumn? col);
+
+ /**
+ * The view is responsible for calling these notification methods when
+ * rows are added or removed. Index is the position at which the new
+ * rows were added or at which rows were removed. For
+ * non-contiguous additions/removals, this method should be called multiple times.
+ */
+ void rowCountChanged(long index, long count);
+
+ /**
+ * Notify the tree that the view is about to perform a batch
+ * update, that is, add, remove or invalidate several rows at once.
+ * This must be followed by calling endUpdateBatch(), otherwise the tree
+ * will get out of sync.
+ */
+ void beginUpdateBatch();
+
+ /**
+ * Notify the tree that the view has completed a batch update.
+ */
+ void endUpdateBatch();
+
+ /**
+ * Called on a theme switch to flush out the tree's style and image caches.
+ */
+ void clearStyleAndImageCaches();
+};
diff --git a/dom/webidl/TreeColumn.webidl b/dom/webidl/TreeColumn.webidl
new file mode 100644
index 000000000..6d843a078
--- /dev/null
+++ b/dom/webidl/TreeColumn.webidl
@@ -0,0 +1,36 @@
+/* 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/. */
+
+[Func="IsChromeOrXBL"]
+interface TreeColumn {
+ [Throws]
+ readonly attribute Element? element;
+
+ readonly attribute TreeColumns? columns;
+
+ [Throws]
+ readonly attribute long x;
+ [Throws]
+ readonly attribute long width;
+
+ readonly attribute DOMString id;
+ readonly attribute long index;
+
+ readonly attribute boolean primary;
+ readonly attribute boolean cycler;
+ readonly attribute boolean editable;
+ readonly attribute boolean selectable;
+
+ const short TYPE_TEXT = 1;
+ const short TYPE_CHECKBOX = 2;
+ const short TYPE_PROGRESSMETER = 3;
+ const short TYPE_PASSWORD = 4;
+ readonly attribute short type;
+
+ TreeColumn? getNext();
+ TreeColumn? getPrevious();
+
+ [Throws]
+ void invalidate();
+};
diff --git a/dom/webidl/TreeColumns.webidl b/dom/webidl/TreeColumns.webidl
new file mode 100644
index 000000000..5958d1235
--- /dev/null
+++ b/dom/webidl/TreeColumns.webidl
@@ -0,0 +1,54 @@
+/* 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/. */
+
+[Func="IsChromeOrXBL"]
+interface TreeColumns {
+ /**
+ * The tree widget for these columns.
+ */
+ readonly attribute TreeBoxObject? tree;
+
+ /**
+ * The number of columns.
+ */
+ readonly attribute unsigned long count;
+
+ /**
+ * An alias for count (for the benefit of scripts which treat this as an
+ * array).
+ */
+ readonly attribute unsigned long length;
+
+ /**
+ * Get the first/last column.
+ */
+ TreeColumn? getFirstColumn();
+ TreeColumn? getLastColumn();
+
+ /**
+ * Attribute based column getters.
+ */
+ TreeColumn? getPrimaryColumn();
+ TreeColumn? getSortedColumn();
+ TreeColumn? getKeyColumn();
+
+ /**
+ * Get the column for the given element.
+ */
+ TreeColumn? getColumnFor(Element? element);
+
+ /**
+ * Parametric column getters.
+ */
+ getter TreeColumn? getNamedColumn(DOMString name);
+ getter TreeColumn? getColumnAt(unsigned long index);
+
+ /**
+ * This method is called whenever a treecol is added or removed and
+ * the column cache needs to be rebuilt.
+ */
+ void invalidateColumns();
+
+ void restoreNaturalOrder();
+};
diff --git a/dom/webidl/TreeWalker.webidl b/dom/webidl/TreeWalker.webidl
new file mode 100644
index 000000000..2cd302f00
--- /dev/null
+++ b/dom/webidl/TreeWalker.webidl
@@ -0,0 +1,37 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/2012/WD-dom-20120105/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface TreeWalker {
+ [Constant]
+ readonly attribute Node root;
+ [Constant]
+ readonly attribute unsigned long whatToShow;
+ [Constant]
+ readonly attribute NodeFilter? filter;
+ [Pure, SetterThrows]
+ attribute Node currentNode;
+
+ [Throws]
+ Node? parentNode();
+ [Throws]
+ Node? firstChild();
+ [Throws]
+ Node? lastChild();
+ [Throws]
+ Node? previousSibling();
+ [Throws]
+ Node? nextSibling();
+ [Throws]
+ Node? previousNode();
+ [Throws]
+ Node? nextNode();
+};
diff --git a/dom/webidl/U2F.webidl b/dom/webidl/U2F.webidl
new file mode 100644
index 000000000..3222b0ded
--- /dev/null
+++ b/dom/webidl/U2F.webidl
@@ -0,0 +1,96 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is a combination of the FIDO U2F Raw Message Formats:
+ * https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-raw-message-formats.html
+ * and the U2F JavaScript API v1.1, not yet published. While v1.1 is not published,
+ * v1.0, is located here:
+ * https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-javascript-api.html
+ */
+
+[NoInterfaceObject]
+interface GlobalU2F {
+ [Throws, Pref="security.webauth.u2f"]
+ readonly attribute U2F u2f;
+};
+
+typedef unsigned short ErrorCode;
+typedef sequence<Transport> Transports;
+
+enum Transport {
+ "bt",
+ "ble",
+ "nfc",
+ "usb"
+};
+
+dictionary ClientData {
+ DOMString typ; // Spelling is from the specification
+ DOMString challenge;
+ DOMString origin;
+ // cid_pubkey for Token Binding is not implemented
+};
+
+dictionary RegisterRequest {
+ DOMString version;
+ DOMString challenge;
+};
+
+dictionary RegisterResponse {
+ DOMString version;
+ DOMString registrationData;
+ DOMString clientData;
+
+ // From Error
+ ErrorCode? errorCode;
+ DOMString? errorMessage;
+};
+
+dictionary RegisteredKey {
+ DOMString version;
+ DOMString keyHandle;
+ Transports? transports;
+ DOMString? appId;
+};
+
+dictionary SignResponse {
+ DOMString keyHandle;
+ DOMString signatureData;
+ DOMString clientData;
+
+ // From Error
+ ErrorCode? errorCode;
+ DOMString? errorMessage;
+};
+
+callback U2FRegisterCallback = void(RegisterResponse response);
+callback U2FSignCallback = void(SignResponse response);
+
+[Pref="security.webauth.u2f"]
+interface U2F {
+ // These enumerations are defined in the FIDO U2F Javascript API under the
+ // interface "ErrorCode" as constant integers, and also in the U2F.cpp file.
+ // Any changes to these must occur in both locations.
+ const unsigned short OK = 0;
+ const unsigned short OTHER_ERROR = 1;
+ const unsigned short BAD_REQUEST = 2;
+ const unsigned short CONFIGURATION_UNSUPPORTED = 3;
+ const unsigned short DEVICE_INELIGIBLE = 4;
+ const unsigned short TIMEOUT = 5;
+
+ [Throws]
+ void register (DOMString appId,
+ sequence<RegisterRequest> registerRequests,
+ sequence<RegisteredKey> registeredKeys,
+ U2FRegisterCallback callback,
+ optional long? opt_timeoutSeconds);
+
+ [Throws]
+ void sign (DOMString appId,
+ DOMString challenge,
+ sequence<RegisteredKey> registeredKeys,
+ U2FSignCallback callback,
+ optional long? opt_timeoutSeconds);
+};
diff --git a/dom/webidl/UDPMessageEvent.webidl b/dom/webidl/UDPMessageEvent.webidl
new file mode 100644
index 000000000..862f719d0
--- /dev/null
+++ b/dom/webidl/UDPMessageEvent.webidl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/TR/raw-sockets/#interface-udpmessageevent
+ */
+
+//Bug 1056444: This interface should be removed after UDPSocket.input/UDPSocket.output are ready.
+[Constructor(DOMString type, optional UDPMessageEventInit eventInitDict),
+ Pref="dom.udpsocket.enabled",
+ ChromeOnly]
+interface UDPMessageEvent : Event {
+ readonly attribute DOMString remoteAddress;
+ readonly attribute unsigned short remotePort;
+ readonly attribute any data;
+};
+
+dictionary UDPMessageEventInit : EventInit {
+ DOMString remoteAddress = "";
+ unsigned short remotePort = 0;
+ any data = null;
+};
diff --git a/dom/webidl/UDPSocket.webidl b/dom/webidl/UDPSocket.webidl
new file mode 100644
index 000000000..74cede28c
--- /dev/null
+++ b/dom/webidl/UDPSocket.webidl
@@ -0,0 +1,40 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.w3.org/2012/sysapps/tcp-udp-sockets/#interface-udpsocket
+ * http://www.w3.org/2012/sysapps/tcp-udp-sockets/#dictionary-udpoptions
+ */
+
+dictionary UDPOptions {
+ DOMString localAddress;
+ unsigned short localPort;
+ DOMString remoteAddress;
+ unsigned short remotePort;
+ boolean addressReuse = true;
+ boolean loopback = false;
+};
+
+[Constructor (optional UDPOptions options),
+ Pref="dom.udpsocket.enabled",
+ ChromeOnly]
+interface UDPSocket : EventTarget {
+ readonly attribute DOMString? localAddress;
+ readonly attribute unsigned short? localPort;
+ readonly attribute DOMString? remoteAddress;
+ readonly attribute unsigned short? remotePort;
+ readonly attribute boolean addressReuse;
+ readonly attribute boolean loopback;
+ readonly attribute SocketReadyState readyState;
+ readonly attribute Promise<void> opened;
+ readonly attribute Promise<void> closed;
+// readonly attribute ReadableStream input; //Bug 1056444: Stream API is not ready
+// readonly attribute WriteableStream output; //Bug 1056444: Stream API is not ready
+ attribute EventHandler onmessage; //Bug 1056444: use event interface before Stream API is ready
+ Promise<void> close ();
+ [Throws] void joinMulticastGroup (DOMString multicastGroupAddress);
+ [Throws] void leaveMulticastGroup (DOMString multicastGroupAddress);
+ [Throws] boolean send ((DOMString or Blob or ArrayBuffer or ArrayBufferView) data, optional DOMString? remoteAddress, optional unsigned short? remotePort); //Bug 1056444: use send method before Stream API is ready
+};
diff --git a/dom/webidl/UIEvent.webidl b/dom/webidl/UIEvent.webidl
new file mode 100644
index 000000000..9cc1d0cdf
--- /dev/null
+++ b/dom/webidl/UIEvent.webidl
@@ -0,0 +1,64 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface please see
+ * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString type, optional UIEventInit eventInitDict)]
+interface UIEvent : Event
+{
+ readonly attribute WindowProxy? view;
+ readonly attribute long detail;
+ void initUIEvent(DOMString aType,
+ boolean aCanBubble,
+ boolean aCancelable,
+ Window? aView,
+ long aDetail);
+};
+
+// Additional DOM0 properties.
+partial interface UIEvent {
+ const long SCROLL_PAGE_UP = -32768;
+ const long SCROLL_PAGE_DOWN = 32768;
+
+ readonly attribute long layerX;
+ readonly attribute long layerY;
+ readonly attribute long pageX;
+ readonly attribute long pageY;
+ readonly attribute unsigned long which;
+ readonly attribute Node? rangeParent;
+ readonly attribute long rangeOffset;
+ readonly attribute boolean isChar;
+};
+
+dictionary UIEventInit : EventInit
+{
+ Window? view = null;
+ long detail = 0;
+};
+
+// NOTE: Gecko doesn't support commented out modifiers yet.
+dictionary EventModifierInit : UIEventInit
+{
+ boolean ctrlKey = false;
+ boolean shiftKey = false;
+ boolean altKey = false;
+ boolean metaKey = false;
+ boolean modifierAltGraph = false;
+ boolean modifierCapsLock = false;
+ boolean modifierFn = false;
+ boolean modifierFnLock = false;
+ // boolean modifierHyper = false;
+ boolean modifierNumLock = false;
+ boolean modifierOS = false;
+ boolean modifierScrollLock = false;
+ // boolean modifierSuper = false;
+ boolean modifierSymbol = false;
+ boolean modifierSymbolLock = false;
+};
diff --git a/dom/webidl/URL.webidl b/dom/webidl/URL.webidl
new file mode 100644
index 000000000..0baa9913c
--- /dev/null
+++ b/dom/webidl/URL.webidl
@@ -0,0 +1,72 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origins of this IDL file are
+ * http://url.spec.whatwg.org/#api
+ * http://dev.w3.org/2006/webapi/FileAPI/#creating-revoking
+ * http://dev.w3.org/2011/webrtc/editor/getusermedia.html#url
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+// [Constructor(DOMString url, optional (URL or DOMString) base = "about:blank")]
+[Constructor(DOMString url, URL base),
+ Constructor(DOMString url, optional DOMString base),
+ Exposed=(Window,Worker,WorkerDebugger)]
+interface URL {
+ // Bug 824857: no support for stringifier attributes yet.
+ // stringifier attribute USVString href;
+
+ // Bug 824857 should remove this.
+ [Throws]
+ stringifier;
+
+ [Throws]
+ attribute USVString href;
+ [Throws]
+ readonly attribute USVString origin;
+ [Throws]
+ attribute USVString protocol;
+ [Throws]
+ attribute USVString username;
+ [Throws]
+ attribute USVString password;
+ [Throws]
+ attribute USVString host;
+ [Throws]
+ attribute USVString hostname;
+ [Throws]
+ attribute USVString port;
+ [Throws]
+ attribute USVString pathname;
+ [Throws]
+ attribute USVString search;
+ readonly attribute URLSearchParams searchParams;
+ [Throws]
+ attribute USVString hash;
+};
+
+partial interface URL {
+ [Throws]
+ static DOMString createObjectURL(Blob blob, optional objectURLOptions options);
+ [Throws]
+ static DOMString createObjectURL(MediaStream stream, optional objectURLOptions options);
+ [Throws]
+ static void revokeObjectURL(DOMString url);
+ [ChromeOnly, Throws]
+ static boolean isValidURL(DOMString url);
+};
+
+dictionary objectURLOptions
+{
+/* boolean autoRevoke = true; */ /* not supported yet */
+};
+
+// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
+partial interface URL {
+ [Throws]
+ static DOMString? createObjectURL(MediaSource source, optional objectURLOptions options);
+};
diff --git a/dom/webidl/URLSearchParams.webidl b/dom/webidl/URLSearchParams.webidl
new file mode 100644
index 000000000..93e846071
--- /dev/null
+++ b/dom/webidl/URLSearchParams.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://url.spec.whatwg.org/#urlsearchparams
+ *
+ * To the extent possible under law, the editors have waived all copyright
+ * and related or neighboring rights to this work. In addition, as of 17
+ * February 2013, the editors have made this specification available under
+ * the Open Web Foundation Agreement Version 1.0, which is available at
+ * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
+ */
+
+[Constructor(optional USVString init = ""),
+ Constructor(URLSearchParams init),
+ Exposed=(Window,Worker,WorkerDebugger,System)]
+interface URLSearchParams {
+ void append(USVString name, USVString value);
+ void delete(USVString name);
+ USVString? get(USVString name);
+ sequence<USVString> getAll(USVString name);
+ boolean has(USVString name);
+ void set(USVString name, USVString value);
+ iterable<USVString, USVString>;
+ stringifier;
+};
diff --git a/dom/webidl/UserProximityEvent.webidl b/dom/webidl/UserProximityEvent.webidl
new file mode 100644
index 000000000..9c10947f7
--- /dev/null
+++ b/dom/webidl/UserProximityEvent.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor(DOMString type, optional UserProximityEventInit eventInitDict)]
+interface UserProximityEvent : Event
+{
+ readonly attribute boolean near;
+};
+
+dictionary UserProximityEventInit : EventInit
+{
+ boolean near = false;
+};
diff --git a/dom/webidl/VRDisplay.webidl b/dom/webidl/VRDisplay.webidl
new file mode 100644
index 000000000..63ebd1205
--- /dev/null
+++ b/dom/webidl/VRDisplay.webidl
@@ -0,0 +1,286 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+enum VREye {
+ "left",
+ "right"
+};
+
+[Pref="dom.vr.enabled",
+ HeaderFile="mozilla/dom/VRDisplay.h"]
+interface VRFieldOfView {
+ readonly attribute double upDegrees;
+ readonly attribute double rightDegrees;
+ readonly attribute double downDegrees;
+ readonly attribute double leftDegrees;
+};
+
+typedef (HTMLCanvasElement or OffscreenCanvas) VRSource;
+
+dictionary VRLayer {
+ /**
+ * XXX - When WebVR in WebWorkers is implemented, HTMLCanvasElement below
+ * should be replaced with VRSource.
+ */
+ HTMLCanvasElement? source = null;
+
+ /**
+ * The left and right viewports contain 4 values defining the viewport
+ * rectangles within the canvas to present to the eye in UV space.
+ * [0] left offset of the viewport (0.0 - 1.0)
+ * [1] top offset of the viewport (0.0 - 1.0)
+ * [2] width of the viewport (0.0 - 1.0)
+ * [3] height of the viewport (0.0 - 1.0)
+ *
+ * When no values are passed, they will be processed as though the left
+ * and right sides of the viewport were passed:
+ *
+ * leftBounds: [0.0, 0.0, 0.5, 1.0]
+ * rightBounds: [0.5, 0.0, 0.5, 1.0]
+ */
+ sequence<float> leftBounds = [];
+ sequence<float> rightBounds = [];
+};
+
+/**
+ * Values describing the capabilities of a VRDisplay.
+ * These are expected to be static per-device/per-user.
+ */
+[Pref="dom.vr.enabled",
+ HeaderFile="mozilla/dom/VRDisplay.h"]
+interface VRDisplayCapabilities {
+ /**
+ * hasPosition is true if the VRDisplay is capable of tracking its position.
+ */
+ readonly attribute boolean hasPosition;
+
+ /**
+ * hasOrientation is true if the VRDisplay is capable of tracking its orientation.
+ */
+ readonly attribute boolean hasOrientation;
+
+ /**
+ * Whether the VRDisplay is separate from the device’s
+ * primary display. If presenting VR content will obscure
+ * other content on the device, this should be false. When
+ * false, the application should not attempt to mirror VR content
+ * or update non-VR UI because that content will not be visible.
+ */
+ readonly attribute boolean hasExternalDisplay;
+
+ /**
+ * Whether the VRDisplay is capable of presenting content to an HMD or similar device.
+ * Can be used to indicate “magic window” devices that are capable of 6DoF tracking but for
+ * which requestPresent is not meaningful. If false then calls to requestPresent should
+ * always fail, and getEyeParameters should return null.
+ */
+ readonly attribute boolean canPresent;
+
+ /**
+ * Indicates the maximum length of the array that requestPresent() will accept. MUST be 1 if
+ canPresent is true, 0 otherwise.
+ */
+ readonly attribute unsigned long maxLayers;
+};
+
+/**
+ * Values describing the the stage / play area for devices
+ * that support room-scale experiences.
+ */
+[Pref="dom.vr.enabled",
+ HeaderFile="mozilla/dom/VRDisplay.h"]
+interface VRStageParameters {
+ /**
+ * A 16-element array containing the components of a column-major 4x4
+ * affine transform matrix. This matrix transforms the sitting-space position
+ * returned by get{Immediate}Pose() to a standing-space position.
+ */
+ [Throws] readonly attribute Float32Array sittingToStandingTransform;
+
+ /**
+ * Dimensions of the play-area bounds. The bounds are defined
+ * as an axis-aligned rectangle on the floor.
+ * The center of the rectangle is at (0,0,0) in standing-space
+ * coordinates.
+ * These bounds are defined for safety purposes.
+ * Content should not require the user to move beyond these
+ * bounds; however, it is possible for the user to ignore
+ * the bounds resulting in position values outside of
+ * this rectangle.
+ */
+ readonly attribute float sizeX;
+ readonly attribute float sizeZ;
+};
+
+[Pref="dom.vr.enabled",
+ HeaderFile="mozilla/dom/VRDisplay.h"]
+interface VRPose
+{
+ /**
+ * position, linearVelocity, and linearAcceleration are 3-component vectors.
+ * position is relative to a sitting space. Transforming this point with
+ * VRStageParameters.sittingToStandingTransform converts this to standing space.
+ */
+ [Constant, Throws] readonly attribute Float32Array? position;
+ [Constant, Throws] readonly attribute Float32Array? linearVelocity;
+ [Constant, Throws] readonly attribute Float32Array? linearAcceleration;
+
+ /* orientation is a 4-entry array representing the components of a quaternion. */
+ [Constant, Throws] readonly attribute Float32Array? orientation;
+ /* angularVelocity and angularAcceleration are the components of 3-dimensional vectors. */
+ [Constant, Throws] readonly attribute Float32Array? angularVelocity;
+ [Constant, Throws] readonly attribute Float32Array? angularAcceleration;
+};
+
+[Constructor,
+ Pref="dom.vr.enabled",
+ HeaderFile="mozilla/dom/VRDisplay.h"]
+interface VRFrameData {
+ readonly attribute DOMHighResTimeStamp timestamp;
+
+ [Throws, Pure] readonly attribute Float32Array leftProjectionMatrix;
+ [Throws, Pure] readonly attribute Float32Array leftViewMatrix;
+
+ [Throws, Pure] readonly attribute Float32Array rightProjectionMatrix;
+ [Throws, Pure] readonly attribute Float32Array rightViewMatrix;
+
+ [Pure] readonly attribute VRPose pose;
+};
+
+[Pref="dom.vr.enabled",
+ HeaderFile="mozilla/dom/VRDisplay.h"]
+interface VREyeParameters {
+ /**
+ * offset is a 3-component vector representing an offset to
+ * translate the eye. This value may vary from frame
+ * to frame if the user adjusts their headset ipd.
+ */
+ [Constant, Throws] readonly attribute Float32Array offset;
+
+ /* These values may vary as the user adjusts their headset ipd. */
+ [Constant] readonly attribute VRFieldOfView fieldOfView;
+
+ /**
+ * renderWidth and renderHeight specify the recommended render target
+ * size of each eye viewport, in pixels. If multiple eyes are rendered
+ * in a single render target, then the render target should be made large
+ * enough to fit both viewports.
+ */
+ [Constant] readonly attribute unsigned long renderWidth;
+ [Constant] readonly attribute unsigned long renderHeight;
+};
+
+[Pref="dom.vr.enabled",
+ HeaderFile="mozilla/dom/VRDisplay.h"]
+interface VRDisplay : EventTarget {
+ readonly attribute boolean isConnected;
+ readonly attribute boolean isPresenting;
+
+ /**
+ * Dictionary of capabilities describing the VRDisplay.
+ */
+ [Constant] readonly attribute VRDisplayCapabilities capabilities;
+
+ /**
+ * If this VRDisplay supports room-scale experiences, the optional
+ * stage attribute contains details on the room-scale parameters.
+ */
+ readonly attribute VRStageParameters? stageParameters;
+
+ /* Return the current VREyeParameters for the given eye. */
+ VREyeParameters getEyeParameters(VREye whichEye);
+
+ /**
+ * An identifier for this distinct VRDisplay. Used as an
+ * association point in the Gamepad API.
+ */
+ [Constant] readonly attribute unsigned long displayId;
+
+ /**
+ * A display name, a user-readable name identifying it.
+ */
+ [Constant] readonly attribute DOMString displayName;
+
+ /**
+ * Populates the passed VRFrameData with the information required to render
+ * the current frame.
+ */
+ boolean getFrameData(VRFrameData frameData);
+
+ /**
+ * Return a VRPose containing the future predicted pose of the VRDisplay
+ * when the current frame will be presented. Subsequent calls to getPose()
+ * MUST return a VRPose with the same values until the next call to
+ * submitFrame().
+ *
+ * The VRPose will contain the position, orientation, velocity,
+ * and acceleration of each of these properties.
+ */
+ [NewObject] VRPose getPose();
+
+ /**
+ * Reset the pose for this display, treating its current position and
+ * orientation as the "origin/zero" values. VRPose.position,
+ * VRPose.orientation, and VRStageParameters.sittingToStandingTransform may be
+ * updated when calling resetPose(). This should be called in only
+ * sitting-space experiences.
+ */
+ void resetPose();
+
+ /**
+ * z-depth defining the near plane of the eye view frustum
+ * enables mapping of values in the render target depth
+ * attachment to scene coordinates. Initially set to 0.01.
+ */
+ attribute double depthNear;
+
+ /**
+ * z-depth defining the far plane of the eye view frustum
+ * enables mapping of values in the render target depth
+ * attachment to scene coordinates. Initially set to 10000.0.
+ */
+ attribute double depthFar;
+
+ /**
+ * The callback passed to `requestAnimationFrame` will be called
+ * any time a new frame should be rendered. When the VRDisplay is
+ * presenting the callback will be called at the native refresh
+ * rate of the HMD. When not presenting this function acts
+ * identically to how window.requestAnimationFrame acts. Content should
+ * make no assumptions of frame rate or vsync behavior as the HMD runs
+ * asynchronously from other displays and at differing refresh rates.
+ */
+ [Throws] long requestAnimationFrame(FrameRequestCallback callback);
+
+ /**
+ * Passing the value returned by `requestAnimationFrame` to
+ * `cancelAnimationFrame` will unregister the callback.
+ */
+ [Throws] void cancelAnimationFrame(long handle);
+
+ /**
+ * Begin presenting to the VRDisplay. Must be called in response to a user gesture.
+ * Repeat calls while already presenting will update the VRLayers being displayed.
+ */
+ [Throws] Promise<void> requestPresent(sequence<VRLayer> layers);
+
+ /**
+ * Stops presenting to the VRDisplay.
+ */
+ [Throws] Promise<void> exitPresent();
+
+ /**
+ * Get the layers currently being presented.
+ */
+ sequence<VRLayer> getLayers();
+
+ /**
+ * The VRLayer provided to the VRDisplay will be captured and presented
+ * in the HMD. Calling this function has the same effect on the source
+ * canvas as any other operation that uses its source image, and canvases
+ * created without preserveDrawingBuffer set to true will be cleared.
+ */
+ void submitFrame();
+};
diff --git a/dom/webidl/VTTCue.webidl b/dom/webidl/VTTCue.webidl
new file mode 100644
index 000000000..f74db7a58
--- /dev/null
+++ b/dom/webidl/VTTCue.webidl
@@ -0,0 +1,71 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/html5/webvtt/#the-vttcue-interface
+ */
+
+enum AutoKeyword { "auto" };
+
+enum LineAlignSetting {
+ "start",
+ "center",
+ "end"
+};
+
+enum PositionAlignSetting {
+ "line-left",
+ "center",
+ "line-right",
+ "auto"
+};
+
+enum AlignSetting {
+ "start",
+ "center",
+ "end",
+ "left",
+ "right"
+};
+
+enum DirectionSetting {
+ "",
+ "rl",
+ "lr"
+};
+
+[Constructor(double startTime, double endTime, DOMString text)]
+interface VTTCue : TextTrackCue {
+ [Pref="media.webvtt.regions.enabled"]
+ attribute VTTRegion? region;
+ attribute DirectionSetting vertical;
+ attribute boolean snapToLines;
+ attribute (double or AutoKeyword) line;
+ [SetterThrows]
+ attribute LineAlignSetting lineAlign;
+ [SetterThrows]
+ attribute (double or AutoKeyword) position;
+ [SetterThrows]
+ attribute PositionAlignSetting positionAlign;
+ [SetterThrows]
+ attribute double size;
+ attribute AlignSetting align;
+ attribute DOMString text;
+ DocumentFragment getCueAsHTML();
+};
+
+// Mozilla extensions.
+partial interface VTTCue {
+ [ChromeOnly]
+ attribute HTMLDivElement? displayState;
+ [ChromeOnly]
+ readonly attribute boolean hasBeenReset;
+ [ChromeOnly]
+ readonly attribute double computedLine;
+ [ChromeOnly]
+ readonly attribute double computedPosition;
+ [ChromeOnly]
+ readonly attribute PositionAlignSetting computedPositionAlign;
+};
diff --git a/dom/webidl/VTTRegion.webidl b/dom/webidl/VTTRegion.webidl
new file mode 100644
index 000000000..ec63411eb
--- /dev/null
+++ b/dom/webidl/VTTRegion.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/html5/webvtt/#extension-of-the-texttrack-interface-for-region-support
+ */
+
+[Constructor, Pref="media.webvtt.regions.enabled"]
+interface VTTRegion {
+ [SetterThrows]
+ attribute double width;
+
+ attribute long lines;
+
+ [SetterThrows]
+ attribute double regionAnchorX;
+ [SetterThrows]
+ attribute double regionAnchorY;
+ [SetterThrows]
+ attribute double viewportAnchorX;
+ [SetterThrows]
+ attribute double viewportAnchorY;
+ [SetterThrows]
+ attribute DOMString scroll;
+};
diff --git a/dom/webidl/ValidityState.webidl b/dom/webidl/ValidityState.webidl
new file mode 100644
index 000000000..7e99870e9
--- /dev/null
+++ b/dom/webidl/ValidityState.webidl
@@ -0,0 +1,26 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#validitystate
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface ValidityState {
+ readonly attribute boolean valueMissing;
+ readonly attribute boolean typeMismatch;
+ readonly attribute boolean patternMismatch;
+ readonly attribute boolean tooLong;
+ readonly attribute boolean tooShort;
+ readonly attribute boolean rangeUnderflow;
+ readonly attribute boolean rangeOverflow;
+ readonly attribute boolean stepMismatch;
+ readonly attribute boolean badInput;
+ readonly attribute boolean customError;
+ readonly attribute boolean valid;
+};
+
diff --git a/dom/webidl/VideoPlaybackQuality.webidl b/dom/webidl/VideoPlaybackQuality.webidl
new file mode 100644
index 000000000..abbe8d19a
--- /dev/null
+++ b/dom/webidl/VideoPlaybackQuality.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Func="mozilla::dom::MediaSource::Enabled"]
+interface VideoPlaybackQuality {
+ readonly attribute DOMHighResTimeStamp creationTime;
+ readonly attribute unsigned long totalVideoFrames;
+ readonly attribute unsigned long droppedVideoFrames;
+ readonly attribute unsigned long corruptedVideoFrames;
+// At Risk: readonly attribute double totalFrameDelay;
+};
+
diff --git a/dom/webidl/VideoStreamTrack.webidl b/dom/webidl/VideoStreamTrack.webidl
new file mode 100644
index 000000000..b194d5c9f
--- /dev/null
+++ b/dom/webidl/VideoStreamTrack.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+// [Constructor(optional MediaTrackConstraints videoConstraints)]
+interface VideoStreamTrack : MediaStreamTrack {
+// static sequence<DOMString> getSourceIds ();
+// void takePhoto ();
+// attribute EventHandler onphoto;
+// attribute EventHandler onphotoerror;
+};
diff --git a/dom/webidl/VideoTrack.webidl b/dom/webidl/VideoTrack.webidl
new file mode 100644
index 000000000..7f5974f21
--- /dev/null
+++ b/dom/webidl/VideoTrack.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#videotrack
+ */
+
+[Pref="media.track.enabled"]
+interface VideoTrack {
+ readonly attribute DOMString id;
+ readonly attribute DOMString kind;
+ readonly attribute DOMString label;
+ readonly attribute DOMString language;
+ attribute boolean selected;
+};
diff --git a/dom/webidl/VideoTrackList.webidl b/dom/webidl/VideoTrackList.webidl
new file mode 100644
index 000000000..144120226
--- /dev/null
+++ b/dom/webidl/VideoTrackList.webidl
@@ -0,0 +1,21 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/#videotracklist
+ */
+
+[Pref="media.track.enabled"]
+interface VideoTrackList : EventTarget {
+ readonly attribute unsigned long length;
+ getter VideoTrack (unsigned long index);
+ VideoTrack? getTrackById(DOMString id);
+ readonly attribute long selectedIndex;
+
+ attribute EventHandler onchange;
+ attribute EventHandler onaddtrack;
+ attribute EventHandler onremovetrack;
+};
+
diff --git a/dom/webidl/WaveShaperNode.webidl b/dom/webidl/WaveShaperNode.webidl
new file mode 100644
index 000000000..ac30c94dc
--- /dev/null
+++ b/dom/webidl/WaveShaperNode.webidl
@@ -0,0 +1,30 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+enum OverSampleType {
+ "none",
+ "2x",
+ "4x"
+};
+
+[Pref="dom.webaudio.enabled"]
+interface WaveShaperNode : AudioNode {
+
+ [SetterThrows]
+ attribute Float32Array? curve;
+ attribute OverSampleType oversample;
+
+};
+
+// Mozilla extension
+WaveShaperNode implements AudioNodePassThrough;
+
diff --git a/dom/webidl/WebComponents.webidl b/dom/webidl/WebComponents.webidl
new file mode 100644
index 000000000..3dfb960bc
--- /dev/null
+++ b/dom/webidl/WebComponents.webidl
@@ -0,0 +1,28 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+callback LifecycleCreatedCallback = void();
+callback LifecycleAttachedCallback = void();
+callback LifecycleDetachedCallback = void();
+callback LifecycleAttributeChangedCallback = void(DOMString attrName, DOMString? oldValue, DOMString? newValue);
+
+dictionary LifecycleCallbacks {
+ LifecycleCreatedCallback? createdCallback;
+ LifecycleAttachedCallback? attachedCallback;
+ LifecycleDetachedCallback? detachedCallback;
+ LifecycleAttributeChangedCallback? attributeChangedCallback;
+};
+
+dictionary ElementRegistrationOptions {
+ object? prototype = null;
+ DOMString? extends = null;
+};
diff --git a/dom/webidl/WebGL2RenderingContext.webidl b/dom/webidl/WebGL2RenderingContext.webidl
new file mode 100644
index 000000000..34c71a65d
--- /dev/null
+++ b/dom/webidl/WebGL2RenderingContext.webidl
@@ -0,0 +1,701 @@
+/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* 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/.
+ *
+ * The source for this IDL is found at https://www.khronos.org/registry/webgl/specs/latest/2.0
+ * This IDL depends on WebGLRenderingContext.webidl
+ */
+
+typedef long long GLint64;
+typedef unsigned long long GLuint64;
+
+[Pref="webgl.enable-webgl2"]
+interface WebGLSampler {
+};
+
+[Pref="webgl.enable-webgl2"]
+interface WebGLSync {
+};
+
+[Pref="webgl.enable-webgl2"]
+interface WebGLTransformFeedback {
+};
+
+typedef (Uint32Array or sequence<GLuint>) Uint32List;
+
+// WebGL2 spec has this as an empty interface that pulls in everything
+// via WebGL2RenderingContextBase.
+[Pref="webgl.enable-webgl2"]
+interface WebGL2RenderingContext
+{
+};
+
+[NoInterfaceObject]
+interface WebGL2RenderingContextBase
+{
+ const GLenum READ_BUFFER = 0x0C02;
+ const GLenum UNPACK_ROW_LENGTH = 0x0CF2;
+ const GLenum UNPACK_SKIP_ROWS = 0x0CF3;
+ const GLenum UNPACK_SKIP_PIXELS = 0x0CF4;
+ const GLenum PACK_ROW_LENGTH = 0x0D02;
+ const GLenum PACK_SKIP_ROWS = 0x0D03;
+ const GLenum PACK_SKIP_PIXELS = 0x0D04;
+ const GLenum COLOR = 0x1800;
+ const GLenum DEPTH = 0x1801;
+ const GLenum STENCIL = 0x1802;
+ const GLenum RED = 0x1903;
+ const GLenum RGB8 = 0x8051;
+ const GLenum RGBA8 = 0x8058;
+ const GLenum RGB10_A2 = 0x8059;
+ const GLenum TEXTURE_BINDING_3D = 0x806A;
+ const GLenum UNPACK_SKIP_IMAGES = 0x806D;
+ const GLenum UNPACK_IMAGE_HEIGHT = 0x806E;
+ const GLenum TEXTURE_3D = 0x806F;
+ const GLenum TEXTURE_WRAP_R = 0x8072;
+ const GLenum MAX_3D_TEXTURE_SIZE = 0x8073;
+ const GLenum UNSIGNED_INT_2_10_10_10_REV = 0x8368;
+ const GLenum MAX_ELEMENTS_VERTICES = 0x80E8;
+ const GLenum MAX_ELEMENTS_INDICES = 0x80E9;
+ const GLenum TEXTURE_MIN_LOD = 0x813A;
+ const GLenum TEXTURE_MAX_LOD = 0x813B;
+ const GLenum TEXTURE_BASE_LEVEL = 0x813C;
+ const GLenum TEXTURE_MAX_LEVEL = 0x813D;
+ const GLenum MIN = 0x8007;
+ const GLenum MAX = 0x8008;
+ const GLenum DEPTH_COMPONENT24 = 0x81A6;
+ const GLenum MAX_TEXTURE_LOD_BIAS = 0x84FD;
+ const GLenum TEXTURE_COMPARE_MODE = 0x884C;
+ const GLenum TEXTURE_COMPARE_FUNC = 0x884D;
+ const GLenum CURRENT_QUERY = 0x8865;
+ const GLenum QUERY_RESULT = 0x8866;
+ const GLenum QUERY_RESULT_AVAILABLE = 0x8867;
+ const GLenum STREAM_READ = 0x88E1;
+ const GLenum STREAM_COPY = 0x88E2;
+ const GLenum STATIC_READ = 0x88E5;
+ const GLenum STATIC_COPY = 0x88E6;
+ const GLenum DYNAMIC_READ = 0x88E9;
+ const GLenum DYNAMIC_COPY = 0x88EA;
+ const GLenum MAX_DRAW_BUFFERS = 0x8824;
+ const GLenum DRAW_BUFFER0 = 0x8825;
+ const GLenum DRAW_BUFFER1 = 0x8826;
+ const GLenum DRAW_BUFFER2 = 0x8827;
+ const GLenum DRAW_BUFFER3 = 0x8828;
+ const GLenum DRAW_BUFFER4 = 0x8829;
+ const GLenum DRAW_BUFFER5 = 0x882A;
+ const GLenum DRAW_BUFFER6 = 0x882B;
+ const GLenum DRAW_BUFFER7 = 0x882C;
+ const GLenum DRAW_BUFFER8 = 0x882D;
+ const GLenum DRAW_BUFFER9 = 0x882E;
+ const GLenum DRAW_BUFFER10 = 0x882F;
+ const GLenum DRAW_BUFFER11 = 0x8830;
+ const GLenum DRAW_BUFFER12 = 0x8831;
+ const GLenum DRAW_BUFFER13 = 0x8832;
+ const GLenum DRAW_BUFFER14 = 0x8833;
+ const GLenum DRAW_BUFFER15 = 0x8834;
+ const GLenum MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49;
+ const GLenum MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A;
+ const GLenum SAMPLER_3D = 0x8B5F;
+ const GLenum SAMPLER_2D_SHADOW = 0x8B62;
+ const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B;
+ const GLenum PIXEL_PACK_BUFFER = 0x88EB;
+ const GLenum PIXEL_UNPACK_BUFFER = 0x88EC;
+ const GLenum PIXEL_PACK_BUFFER_BINDING = 0x88ED;
+ const GLenum PIXEL_UNPACK_BUFFER_BINDING = 0x88EF;
+ const GLenum FLOAT_MAT2x3 = 0x8B65;
+ const GLenum FLOAT_MAT2x4 = 0x8B66;
+ const GLenum FLOAT_MAT3x2 = 0x8B67;
+ const GLenum FLOAT_MAT3x4 = 0x8B68;
+ const GLenum FLOAT_MAT4x2 = 0x8B69;
+ const GLenum FLOAT_MAT4x3 = 0x8B6A;
+ const GLenum SRGB = 0x8C40;
+ const GLenum SRGB8 = 0x8C41;
+ const GLenum SRGB8_ALPHA8 = 0x8C43;
+ const GLenum COMPARE_REF_TO_TEXTURE = 0x884E;
+ const GLenum RGBA32F = 0x8814;
+ const GLenum RGB32F = 0x8815;
+ const GLenum RGBA16F = 0x881A;
+ const GLenum RGB16F = 0x881B;
+ const GLenum VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD;
+ const GLenum MAX_ARRAY_TEXTURE_LAYERS = 0x88FF;
+ const GLenum MIN_PROGRAM_TEXEL_OFFSET = 0x8904;
+ const GLenum MAX_PROGRAM_TEXEL_OFFSET = 0x8905;
+ const GLenum MAX_VARYING_COMPONENTS = 0x8B4B;
+ const GLenum TEXTURE_2D_ARRAY = 0x8C1A;
+ const GLenum TEXTURE_BINDING_2D_ARRAY = 0x8C1D;
+ const GLenum R11F_G11F_B10F = 0x8C3A;
+ const GLenum UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B;
+ const GLenum RGB9_E5 = 0x8C3D;
+ const GLenum UNSIGNED_INT_5_9_9_9_REV = 0x8C3E;
+ const GLenum TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F;
+ const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80;
+ const GLenum TRANSFORM_FEEDBACK_VARYINGS = 0x8C83;
+ const GLenum TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84;
+ const GLenum TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85;
+ const GLenum TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88;
+ const GLenum RASTERIZER_DISCARD = 0x8C89;
+ const GLenum MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A;
+ const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B;
+ const GLenum INTERLEAVED_ATTRIBS = 0x8C8C;
+ const GLenum SEPARATE_ATTRIBS = 0x8C8D;
+ const GLenum TRANSFORM_FEEDBACK_BUFFER = 0x8C8E;
+ const GLenum TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F;
+ const GLenum RGBA32UI = 0x8D70;
+ const GLenum RGB32UI = 0x8D71;
+ const GLenum RGBA16UI = 0x8D76;
+ const GLenum RGB16UI = 0x8D77;
+ const GLenum RGBA8UI = 0x8D7C;
+ const GLenum RGB8UI = 0x8D7D;
+ const GLenum RGBA32I = 0x8D82;
+ const GLenum RGB32I = 0x8D83;
+ const GLenum RGBA16I = 0x8D88;
+ const GLenum RGB16I = 0x8D89;
+ const GLenum RGBA8I = 0x8D8E;
+ const GLenum RGB8I = 0x8D8F;
+ const GLenum RED_INTEGER = 0x8D94;
+ const GLenum RGB_INTEGER = 0x8D98;
+ const GLenum RGBA_INTEGER = 0x8D99;
+ const GLenum SAMPLER_2D_ARRAY = 0x8DC1;
+ const GLenum SAMPLER_2D_ARRAY_SHADOW = 0x8DC4;
+ const GLenum SAMPLER_CUBE_SHADOW = 0x8DC5;
+ const GLenum UNSIGNED_INT_VEC2 = 0x8DC6;
+ const GLenum UNSIGNED_INT_VEC3 = 0x8DC7;
+ const GLenum UNSIGNED_INT_VEC4 = 0x8DC8;
+ const GLenum INT_SAMPLER_2D = 0x8DCA;
+ const GLenum INT_SAMPLER_3D = 0x8DCB;
+ const GLenum INT_SAMPLER_CUBE = 0x8DCC;
+ const GLenum INT_SAMPLER_2D_ARRAY = 0x8DCF;
+ const GLenum UNSIGNED_INT_SAMPLER_2D = 0x8DD2;
+ const GLenum UNSIGNED_INT_SAMPLER_3D = 0x8DD3;
+ const GLenum UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4;
+ const GLenum UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7;
+ const GLenum DEPTH_COMPONENT32F = 0x8CAC;
+ const GLenum DEPTH32F_STENCIL8 = 0x8CAD;
+ const GLenum FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD;
+ const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210;
+ const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211;
+ const GLenum FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212;
+ const GLenum FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213;
+ const GLenum FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214;
+ const GLenum FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215;
+ const GLenum FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216;
+ const GLenum FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217;
+ const GLenum FRAMEBUFFER_DEFAULT = 0x8218;
+ const GLenum UNSIGNED_INT_24_8 = 0x84FA;
+ const GLenum DEPTH24_STENCIL8 = 0x88F0;
+ const GLenum UNSIGNED_NORMALIZED = 0x8C17;
+ const GLenum DRAW_FRAMEBUFFER_BINDING = 0x8CA6; /* Same as FRAMEBUFFER_BINDING */
+ const GLenum READ_FRAMEBUFFER = 0x8CA8;
+ const GLenum DRAW_FRAMEBUFFER = 0x8CA9;
+ const GLenum READ_FRAMEBUFFER_BINDING = 0x8CAA;
+ const GLenum RENDERBUFFER_SAMPLES = 0x8CAB;
+ const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4;
+ const GLenum MAX_COLOR_ATTACHMENTS = 0x8CDF;
+ const GLenum COLOR_ATTACHMENT1 = 0x8CE1;
+ const GLenum COLOR_ATTACHMENT2 = 0x8CE2;
+ const GLenum COLOR_ATTACHMENT3 = 0x8CE3;
+ const GLenum COLOR_ATTACHMENT4 = 0x8CE4;
+ const GLenum COLOR_ATTACHMENT5 = 0x8CE5;
+ const GLenum COLOR_ATTACHMENT6 = 0x8CE6;
+ const GLenum COLOR_ATTACHMENT7 = 0x8CE7;
+ const GLenum COLOR_ATTACHMENT8 = 0x8CE8;
+ const GLenum COLOR_ATTACHMENT9 = 0x8CE9;
+ const GLenum COLOR_ATTACHMENT10 = 0x8CEA;
+ const GLenum COLOR_ATTACHMENT11 = 0x8CEB;
+ const GLenum COLOR_ATTACHMENT12 = 0x8CEC;
+ const GLenum COLOR_ATTACHMENT13 = 0x8CED;
+ const GLenum COLOR_ATTACHMENT14 = 0x8CEE;
+ const GLenum COLOR_ATTACHMENT15 = 0x8CEF;
+ const GLenum FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56;
+ const GLenum MAX_SAMPLES = 0x8D57;
+ const GLenum HALF_FLOAT = 0x140B;
+ const GLenum RG = 0x8227;
+ const GLenum RG_INTEGER = 0x8228;
+ const GLenum R8 = 0x8229;
+ const GLenum RG8 = 0x822B;
+ const GLenum R16F = 0x822D;
+ const GLenum R32F = 0x822E;
+ const GLenum RG16F = 0x822F;
+ const GLenum RG32F = 0x8230;
+ const GLenum R8I = 0x8231;
+ const GLenum R8UI = 0x8232;
+ const GLenum R16I = 0x8233;
+ const GLenum R16UI = 0x8234;
+ const GLenum R32I = 0x8235;
+ const GLenum R32UI = 0x8236;
+ const GLenum RG8I = 0x8237;
+ const GLenum RG8UI = 0x8238;
+ const GLenum RG16I = 0x8239;
+ const GLenum RG16UI = 0x823A;
+ const GLenum RG32I = 0x823B;
+ const GLenum RG32UI = 0x823C;
+ const GLenum VERTEX_ARRAY_BINDING = 0x85B5;
+ const GLenum R8_SNORM = 0x8F94;
+ const GLenum RG8_SNORM = 0x8F95;
+ const GLenum RGB8_SNORM = 0x8F96;
+ const GLenum RGBA8_SNORM = 0x8F97;
+ const GLenum SIGNED_NORMALIZED = 0x8F9C;
+ const GLenum COPY_READ_BUFFER = 0x8F36;
+ const GLenum COPY_WRITE_BUFFER = 0x8F37;
+ const GLenum COPY_READ_BUFFER_BINDING = 0x8F36; /* Same as COPY_READ_BUFFER */
+ const GLenum COPY_WRITE_BUFFER_BINDING = 0x8F37; /* Same as COPY_WRITE_BUFFER */
+ const GLenum UNIFORM_BUFFER = 0x8A11;
+ const GLenum UNIFORM_BUFFER_BINDING = 0x8A28;
+ const GLenum UNIFORM_BUFFER_START = 0x8A29;
+ const GLenum UNIFORM_BUFFER_SIZE = 0x8A2A;
+ const GLenum MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B;
+ const GLenum MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D;
+ const GLenum MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E;
+ const GLenum MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F;
+ const GLenum MAX_UNIFORM_BLOCK_SIZE = 0x8A30;
+ const GLenum MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31;
+ const GLenum MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33;
+ const GLenum UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34;
+ const GLenum ACTIVE_UNIFORM_BLOCKS = 0x8A36;
+ const GLenum UNIFORM_TYPE = 0x8A37;
+ const GLenum UNIFORM_SIZE = 0x8A38;
+ const GLenum UNIFORM_BLOCK_INDEX = 0x8A3A;
+ const GLenum UNIFORM_OFFSET = 0x8A3B;
+ const GLenum UNIFORM_ARRAY_STRIDE = 0x8A3C;
+ const GLenum UNIFORM_MATRIX_STRIDE = 0x8A3D;
+ const GLenum UNIFORM_IS_ROW_MAJOR = 0x8A3E;
+ const GLenum UNIFORM_BLOCK_BINDING = 0x8A3F;
+ const GLenum UNIFORM_BLOCK_DATA_SIZE = 0x8A40;
+ const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42;
+ const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43;
+ const GLenum UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44;
+ const GLenum UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46;
+ const GLenum INVALID_INDEX = 0xFFFFFFFF;
+ const GLenum MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122;
+ const GLenum MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125;
+ const GLenum MAX_SERVER_WAIT_TIMEOUT = 0x9111;
+ const GLenum OBJECT_TYPE = 0x9112;
+ const GLenum SYNC_CONDITION = 0x9113;
+ const GLenum SYNC_STATUS = 0x9114;
+ const GLenum SYNC_FLAGS = 0x9115;
+ const GLenum SYNC_FENCE = 0x9116;
+ const GLenum SYNC_GPU_COMMANDS_COMPLETE = 0x9117;
+ const GLenum UNSIGNALED = 0x9118;
+ const GLenum SIGNALED = 0x9119;
+ const GLenum ALREADY_SIGNALED = 0x911A;
+ const GLenum TIMEOUT_EXPIRED = 0x911B;
+ const GLenum CONDITION_SATISFIED = 0x911C;
+ const GLenum WAIT_FAILED = 0x911D;
+ const GLenum SYNC_FLUSH_COMMANDS_BIT = 0x00000001;
+ const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE;
+ const GLenum ANY_SAMPLES_PASSED = 0x8C2F;
+ const GLenum ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A;
+ const GLenum SAMPLER_BINDING = 0x8919;
+ const GLenum RGB10_A2UI = 0x906F;
+ const GLenum INT_2_10_10_10_REV = 0x8D9F;
+ const GLenum TRANSFORM_FEEDBACK = 0x8E22;
+ const GLenum TRANSFORM_FEEDBACK_PAUSED = 0x8E23;
+ const GLenum TRANSFORM_FEEDBACK_ACTIVE = 0x8E24;
+ const GLenum TRANSFORM_FEEDBACK_BINDING = 0x8E25;
+ const GLenum TEXTURE_IMMUTABLE_FORMAT = 0x912F;
+ const GLenum MAX_ELEMENT_INDEX = 0x8D6B;
+ const GLenum TEXTURE_IMMUTABLE_LEVELS = 0x82DF;
+
+ const GLint64 TIMEOUT_IGNORED = -1;
+
+ /* WebGL-specific enums */
+ const GLenum MAX_CLIENT_WAIT_TIMEOUT_WEBGL = 0x9247;
+
+ /* Buffer objects */
+ // WebGL1:
+ void bufferData(GLenum target, GLsizeiptr size, GLenum usage);
+ void bufferData(GLenum target, ArrayBuffer? srcData, GLenum usage);
+ void bufferData(GLenum target, ArrayBufferView srcData, GLenum usage);
+ void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer srcData);
+ void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView srcData);
+ // WebGL2:
+ void bufferData(GLenum target, ArrayBufferView srcData, GLenum usage,
+ GLuint srcOffset, optional GLuint length = 0);
+ void bufferSubData(GLenum target, GLintptr dstByteOffset, ArrayBufferView srcData,
+ GLuint srcOffset, optional GLuint length = 0);
+
+ void copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset,
+ GLintptr writeOffset, GLsizeiptr size);
+ // MapBufferRange, in particular its read-only and write-only modes,
+ // can not be exposed safely to JavaScript. GetBufferSubData
+ // replaces it for the purpose of fetching data back from the GPU.
+ void getBufferSubData(GLenum target, GLintptr srcByteOffset, ArrayBufferView dstData,
+ optional GLuint dstOffset = 0, optional GLuint length = 0);
+
+ /* Framebuffer objects */
+ void blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0,
+ GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+ void framebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level,
+ GLint layer);
+
+ [Throws]
+ void invalidateFramebuffer(GLenum target, sequence<GLenum> attachments);
+
+ [Throws]
+ void invalidateSubFramebuffer(GLenum target, sequence<GLenum> attachments,
+ GLint x, GLint y, GLsizei width, GLsizei height);
+
+ void readBuffer(GLenum src);
+
+ /* Renderbuffer objects */
+ [Throws]
+ any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname);
+ void renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat,
+ GLsizei width, GLsizei height);
+
+ /* Texture objects */
+ void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width,
+ GLsizei height);
+ void texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width,
+ GLsizei height, GLsizei depth);
+
+ // WebGL1 legacy entrypoints:
+ [Throws] // Another overhead throws.
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLsizei width, GLsizei height, GLint border, GLenum format,
+ GLenum type, ArrayBufferView? pixels);
+ [Throws]
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLenum format, GLenum type, HTMLCanvasElement source); // May throw DOMException
+ [Throws]
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLenum format, GLenum type, HTMLImageElement source); // May throw DOMException
+ [Throws]
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLenum format, GLenum type, HTMLVideoElement source); // May throw DOMException
+ [Throws] // Another overhead throws.
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLenum format, GLenum type, ImageBitmap source);
+ [Throws] // Another overhead throws.
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLenum format, GLenum type, ImageData source);
+
+ [Throws] // Another overhead throws.
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type, ArrayBufferView? pixels);
+ [Throws]
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLenum format, GLenum type, HTMLCanvasElement source); // May throw DOMException
+ [Throws]
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLenum format, GLenum type, HTMLImageElement source); // May throw DOMException
+ [Throws]
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLenum format, GLenum type, HTMLVideoElement source); // May throw DOMException
+ [Throws] // Another overhead throws.
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLenum format, GLenum type, ImageBitmap source);
+ [Throws] // Another overhead throws.
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLenum format, GLenum type, ImageData source);
+
+ // WebGL2 entrypoints:
+ [Throws] // Another overhead throws.
+ void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLint border, GLenum format, GLenum type, GLintptr pboOffset);
+ [Throws]
+ void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLint border, GLenum format, GLenum type,
+ HTMLCanvasElement source); // May throw DOMException
+ [Throws]
+ void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLint border, GLenum format, GLenum type,
+ HTMLImageElement source); // May throw DOMException
+ [Throws]
+ void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLint border, GLenum format, GLenum type,
+ HTMLVideoElement source); // May throw DOMException
+ [Throws] // Another overhead throws.
+ void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLint border, GLenum format, GLenum type,
+ ImageBitmap source);
+ [Throws] // Another overhead throws.
+ void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLint border, GLenum format, GLenum type,
+ ImageData source);
+ [Throws] // Another overhead throws.
+ void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLint border, GLenum format, GLenum type, ArrayBufferView srcData,
+ GLuint srcOffset);
+
+ [Throws] // Another overhead throws.
+ void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLsizei depth, GLint border, GLenum format, GLenum type, GLintptr pboOffset);
+ [Throws]
+ void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLsizei depth, GLint border, GLenum format, GLenum type,
+ HTMLCanvasElement source); // May throw DOMException
+ [Throws]
+ void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLsizei depth, GLint border, GLenum format, GLenum type,
+ HTMLImageElement source); // May throw DOMException
+ [Throws]
+ void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLsizei depth, GLint border, GLenum format, GLenum type,
+ HTMLVideoElement source); // May throw DOMException
+ [Throws] // Another overhead throws.
+ void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLsizei depth, GLint border, GLenum format, GLenum type,
+ ImageBitmap source);
+ [Throws] // Another overhead throws.
+ void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLsizei depth, GLint border, GLenum format, GLenum type,
+ ImageData source);
+ [Throws] // Another overhead throws.
+ void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLsizei depth, GLint border, GLenum format, GLenum type, ArrayBufferView? srcData);
+ [Throws] // Another overhead throws.
+ void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+ GLsizei depth, GLint border, GLenum format, GLenum type, ArrayBufferView srcData,
+ GLuint srcOffset);
+
+ [Throws] // Another overhead throws.
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
+ GLsizei height, GLenum format, GLenum type, GLintptr pboOffset);
+ [Throws]
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
+ GLsizei height, GLenum format, GLenum type,
+ HTMLCanvasElement source); // May throw DOMException
+ [Throws]
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
+ GLsizei height, GLenum format, GLenum type,
+ HTMLImageElement source); // May throw DOMException
+ [Throws]
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
+ GLsizei height, GLenum format, GLenum type,
+ HTMLVideoElement source); // May throw DOMException
+ [Throws] // Another overhead throws.
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
+ GLsizei height, GLenum format, GLenum type,
+ ImageBitmap source);
+ [Throws] // Another overhead throws.
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
+ GLsizei height, GLenum format, GLenum type,
+ ImageData source);
+ [Throws] // Another overhead throws.
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
+ GLsizei height, GLenum format, GLenum type, ArrayBufferView srcData,
+ GLuint srcOffset);
+
+ [Throws] // Another overhead throws.
+ void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
+ GLintptr pboOffset);
+ [Throws]
+ void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
+ HTMLCanvasElement source); // May throw DOMException
+ [Throws]
+ void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
+ HTMLImageElement source); // May throw DOMException
+ [Throws]
+ void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
+ HTMLVideoElement source); // May throw DOMException
+ [Throws] // Another overhead throws.
+ void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
+ ImageBitmap source);
+ [Throws] // Another overhead throws.
+ void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
+ ImageData source);
+ [Throws] // Another overhead throws.
+ void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
+ ArrayBufferView? srcData, optional GLuint srcOffset = 0);
+
+ void copyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
+ GLint x, GLint y, GLsizei width, GLsizei height);
+
+ void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
+ GLsizei height, GLint border, GLintptr offset);
+ void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
+ GLsizei height, GLint border, ArrayBufferView srcData,
+ optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0);
+
+ void compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
+ GLsizei height, GLsizei depth, GLint border, GLintptr offset);
+ void compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
+ GLsizei height, GLsizei depth, GLint border, ArrayBufferView srcData,
+ optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0);
+
+ void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height, GLenum format, GLintptr offset);
+ void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height, GLenum format,
+ ArrayBufferView srcData,
+ optional GLuint srcOffset = 0,
+ optional GLuint srcLengthOverride = 0);
+
+ void compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLintptr offset);
+ void compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, ArrayBufferView srcData,
+ optional GLuint srcOffset = 0,
+ optional GLuint srcLengthOverride = 0);
+
+ /* Programs and shaders */
+ [WebGLHandlesContextLoss] GLint getFragDataLocation(WebGLProgram program, DOMString name);
+
+ /* Uniforms */
+ void uniform1ui(WebGLUniformLocation? location, GLuint v0);
+ void uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1);
+ void uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2);
+ void uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+
+ void uniform1fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+ void uniform2fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+ void uniform3fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+ void uniform4fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+
+ void uniform1iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+ void uniform2iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+ void uniform3iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+ void uniform4iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+
+ void uniform1uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+ void uniform2uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+ void uniform3uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+ void uniform4uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
+ optional GLuint srcLength = 0);
+
+ void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
+ optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
+ void uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
+ optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
+ void uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
+ optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
+
+ void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
+ optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
+ void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
+ optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
+ void uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
+ optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
+
+ void uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
+ optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
+ void uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
+ optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
+ void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
+ optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
+
+ /* Vertex attribs */
+ void vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
+ void vertexAttribI4iv(GLuint index, Int32List values);
+ void vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+ void vertexAttribI4uiv(GLuint index, Uint32List values);
+ void vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
+
+ /* Writing to the drawing buffer */
+ void vertexAttribDivisor(GLuint index, GLuint divisor);
+ void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
+ void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
+ void drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
+
+ /* Reading back pixels */
+ // WebGL1:
+ [Throws] // Throws on readback in a write-only context.
+ void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
+ ArrayBufferView? dstData);
+ // WebGL2:
+ [Throws] // Throws on readback in a write-only context.
+ void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
+ GLintptr offset);
+ [Throws] // Throws on readback in a write-only context.
+ void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
+ ArrayBufferView dstData, GLuint dstOffset);
+
+ /* Multiple Render Targets */
+ void drawBuffers(sequence<GLenum> buffers);
+
+ void clearBufferfv(GLenum buffer, GLint drawbuffer, Float32List values,
+ optional GLuint srcOffset = 0);
+ void clearBufferiv(GLenum buffer, GLint drawbuffer, Int32List values,
+ optional GLuint srcOffset = 0);
+ void clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32List values,
+ optional GLuint srcOffset = 0);
+
+ void clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+
+ /* Query Objects */
+ WebGLQuery? createQuery();
+ void deleteQuery(WebGLQuery? query);
+ [WebGLHandlesContextLoss] GLboolean isQuery(WebGLQuery? query);
+ void beginQuery(GLenum target, WebGLQuery query);
+ void endQuery(GLenum target);
+ any getQuery(GLenum target, GLenum pname);
+ any getQueryParameter(WebGLQuery query, GLenum pname);
+
+ /* Sampler Objects */
+ WebGLSampler? createSampler();
+ void deleteSampler(WebGLSampler? sampler);
+ [WebGLHandlesContextLoss] GLboolean isSampler(WebGLSampler? sampler);
+ void bindSampler(GLuint unit, WebGLSampler? sampler);
+ void samplerParameteri(WebGLSampler sampler, GLenum pname, GLint param);
+ void samplerParameterf(WebGLSampler sampler, GLenum pname, GLfloat param);
+ any getSamplerParameter(WebGLSampler sampler, GLenum pname);
+
+ /* Sync objects */
+ WebGLSync? fenceSync(GLenum condition, GLbitfield flags);
+ [WebGLHandlesContextLoss] GLboolean isSync(WebGLSync? sync);
+ void deleteSync(WebGLSync? sync);
+ GLenum clientWaitSync(WebGLSync sync, GLbitfield flags, GLuint64 timeout);
+ void waitSync(WebGLSync sync, GLbitfield flags, GLint64 timeout);
+ any getSyncParameter(WebGLSync sync, GLenum pname);
+
+ /* Transform Feedback */
+ WebGLTransformFeedback? createTransformFeedback();
+ void deleteTransformFeedback(WebGLTransformFeedback? tf);
+ [WebGLHandlesContextLoss] GLboolean isTransformFeedback(WebGLTransformFeedback? tf);
+ void bindTransformFeedback(GLenum target, WebGLTransformFeedback? tf);
+ void beginTransformFeedback(GLenum primitiveMode);
+ void endTransformFeedback();
+ void transformFeedbackVaryings(WebGLProgram program, sequence<DOMString> varyings, GLenum bufferMode);
+ [NewObject]
+ WebGLActiveInfo? getTransformFeedbackVarying(WebGLProgram program, GLuint index);
+ void pauseTransformFeedback();
+ void resumeTransformFeedback();
+
+ /* Uniform Buffer Objects and Transform Feedback Buffers */
+ void bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer);
+ void bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size);
+ [Throws] // GetOrCreateDOMReflector can fail.
+ any getIndexedParameter(GLenum target, GLuint index);
+ sequence<GLuint>? getUniformIndices(WebGLProgram program, sequence<DOMString> uniformNames);
+ any getActiveUniforms(WebGLProgram program, sequence<GLuint> uniformIndices, GLenum pname);
+ GLuint getUniformBlockIndex(WebGLProgram program, DOMString uniformBlockName);
+ [Throws] // Creating a Uint32Array can fail.
+ any getActiveUniformBlockParameter(WebGLProgram program, GLuint uniformBlockIndex, GLenum pname);
+ DOMString? getActiveUniformBlockName(WebGLProgram program, GLuint uniformBlockIndex);
+ void uniformBlockBinding(WebGLProgram program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+
+ /* Vertex Array Objects */
+ WebGLVertexArrayObject? createVertexArray();
+ void deleteVertexArray(WebGLVertexArrayObject? vertexArray);
+ [WebGLHandlesContextLoss] GLboolean isVertexArray(WebGLVertexArrayObject? vertexArray);
+ void bindVertexArray(WebGLVertexArrayObject? array);
+};
+
+WebGL2RenderingContextBase implements WebGLRenderingContextBase;
+WebGL2RenderingContext implements WebGL2RenderingContextBase;
+
+[NoInterfaceObject]
+interface EXT_color_buffer_float {
+};
diff --git a/dom/webidl/WebGLContextEvent.webidl b/dom/webidl/WebGLContextEvent.webidl
new file mode 100644
index 000000000..8b227da72
--- /dev/null
+++ b/dom/webidl/WebGLContextEvent.webidl
@@ -0,0 +1,20 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+
+ * The origin of this IDL file is
+ * https://www.khronos.org/registry/webgl/specs/latest/1.0/#fire-a-webgl-context-event
+ */
+
+[Constructor(DOMString type, optional WebGLContextEventInit eventInit),
+ Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLContextEvent : Event {
+ readonly attribute DOMString statusMessage;
+};
+
+// EventInit is defined in the DOM4 specification.
+dictionary WebGLContextEventInit : EventInit {
+ DOMString statusMessage = "";
+};
diff --git a/dom/webidl/WebGLRenderingContext.webidl b/dom/webidl/WebGLRenderingContext.webidl
new file mode 100644
index 000000000..dd0e6ff69
--- /dev/null
+++ b/dom/webidl/WebGLRenderingContext.webidl
@@ -0,0 +1,1048 @@
+/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://www.khronos.org/registry/webgl/specs/latest/webgl.idl
+ *
+ * Copyright © 2012 Khronos Group
+ */
+
+// WebGL IDL definitions scraped from the Khronos specification:
+// https://www.khronos.org/registry/webgl/specs/latest/
+//
+// This IDL depends on the typed array specification defined at:
+// https://www.khronos.org/registry/typedarray/specs/latest/typedarrays.idl
+
+typedef unsigned long GLenum;
+typedef boolean GLboolean;
+typedef unsigned long GLbitfield;
+typedef byte GLbyte; /* 'byte' should be a signed 8 bit type. */
+typedef short GLshort;
+typedef long GLint;
+typedef long GLsizei;
+typedef long long GLintptr;
+typedef long long GLsizeiptr;
+// Ideally the typedef below would use 'unsigned byte', but that doesn't currently exist in Web IDL.
+typedef octet GLubyte; /* 'octet' should be an unsigned 8 bit type. */
+typedef unsigned short GLushort;
+typedef unsigned long GLuint;
+typedef unrestricted float GLfloat;
+typedef unrestricted float GLclampf;
+typedef unsigned long long GLuint64EXT;
+
+dictionary WebGLContextAttributes {
+ // boolean alpha = true;
+ // We deviate from the spec here.
+ // If alpha isn't specified, we rely on a pref ("webgl.default-no-alpha")
+ GLboolean alpha;
+ GLboolean depth = true;
+ GLboolean stencil = false;
+ GLboolean antialias = true;
+ GLboolean premultipliedAlpha = true;
+ GLboolean preserveDrawingBuffer = false;
+ GLboolean failIfMajorPerformanceCaveat = false;
+};
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLBuffer {
+};
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLFramebuffer {
+};
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLProgram {
+};
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLRenderbuffer {
+};
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLShader {
+};
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLTexture {
+};
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLUniformLocation {
+};
+
+interface WebGLVertexArrayObject {
+};
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLActiveInfo {
+ readonly attribute GLint size;
+ readonly attribute GLenum type;
+ readonly attribute DOMString name;
+};
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLShaderPrecisionFormat {
+ readonly attribute GLint rangeMin;
+ readonly attribute GLint rangeMax;
+ readonly attribute GLint precision;
+};
+
+typedef (Float32Array or sequence<GLfloat>) Float32List;
+typedef (Int32Array or sequence<GLint>) Int32List;
+
+// Shared interface for the things that WebGLRenderingContext and
+// WebGL2RenderingContext have in common. This doesn't have all the things they
+// have in common, because we don't support splitting multiple overloads of the
+// same method across separate interfaces and pulling them in with "implements".
+[Exposed=(Window, Worker), NoInterfaceObject]
+interface WebGLRenderingContextBase {
+ /* ClearBufferMask */
+ const GLenum DEPTH_BUFFER_BIT = 0x00000100;
+ const GLenum STENCIL_BUFFER_BIT = 0x00000400;
+ const GLenum COLOR_BUFFER_BIT = 0x00004000;
+
+ /* BeginMode */
+ const GLenum POINTS = 0x0000;
+ const GLenum LINES = 0x0001;
+ const GLenum LINE_LOOP = 0x0002;
+ const GLenum LINE_STRIP = 0x0003;
+ const GLenum TRIANGLES = 0x0004;
+ const GLenum TRIANGLE_STRIP = 0x0005;
+ const GLenum TRIANGLE_FAN = 0x0006;
+
+ /* AlphaFunction (not supported in ES20) */
+ /* NEVER */
+ /* LESS */
+ /* EQUAL */
+ /* LEQUAL */
+ /* GREATER */
+ /* NOTEQUAL */
+ /* GEQUAL */
+ /* ALWAYS */
+
+ /* BlendingFactorDest */
+ const GLenum ZERO = 0;
+ const GLenum ONE = 1;
+ const GLenum SRC_COLOR = 0x0300;
+ const GLenum ONE_MINUS_SRC_COLOR = 0x0301;
+ const GLenum SRC_ALPHA = 0x0302;
+ const GLenum ONE_MINUS_SRC_ALPHA = 0x0303;
+ const GLenum DST_ALPHA = 0x0304;
+ const GLenum ONE_MINUS_DST_ALPHA = 0x0305;
+
+ /* BlendingFactorSrc */
+ /* ZERO */
+ /* ONE */
+ const GLenum DST_COLOR = 0x0306;
+ const GLenum ONE_MINUS_DST_COLOR = 0x0307;
+ const GLenum SRC_ALPHA_SATURATE = 0x0308;
+ /* SRC_ALPHA */
+ /* ONE_MINUS_SRC_ALPHA */
+ /* DST_ALPHA */
+ /* ONE_MINUS_DST_ALPHA */
+
+ /* BlendEquationSeparate */
+ const GLenum FUNC_ADD = 0x8006;
+ const GLenum BLEND_EQUATION = 0x8009;
+ const GLenum BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */
+ const GLenum BLEND_EQUATION_ALPHA = 0x883D;
+
+ /* BlendSubtract */
+ const GLenum FUNC_SUBTRACT = 0x800A;
+ const GLenum FUNC_REVERSE_SUBTRACT = 0x800B;
+
+ /* Separate Blend Functions */
+ const GLenum BLEND_DST_RGB = 0x80C8;
+ const GLenum BLEND_SRC_RGB = 0x80C9;
+ const GLenum BLEND_DST_ALPHA = 0x80CA;
+ const GLenum BLEND_SRC_ALPHA = 0x80CB;
+ const GLenum CONSTANT_COLOR = 0x8001;
+ const GLenum ONE_MINUS_CONSTANT_COLOR = 0x8002;
+ const GLenum CONSTANT_ALPHA = 0x8003;
+ const GLenum ONE_MINUS_CONSTANT_ALPHA = 0x8004;
+ const GLenum BLEND_COLOR = 0x8005;
+
+ /* Buffer Objects */
+ const GLenum ARRAY_BUFFER = 0x8892;
+ const GLenum ELEMENT_ARRAY_BUFFER = 0x8893;
+ const GLenum ARRAY_BUFFER_BINDING = 0x8894;
+ const GLenum ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
+
+ const GLenum STREAM_DRAW = 0x88E0;
+ const GLenum STATIC_DRAW = 0x88E4;
+ const GLenum DYNAMIC_DRAW = 0x88E8;
+
+ const GLenum BUFFER_SIZE = 0x8764;
+ const GLenum BUFFER_USAGE = 0x8765;
+
+ const GLenum CURRENT_VERTEX_ATTRIB = 0x8626;
+
+ /* CullFaceMode */
+ const GLenum FRONT = 0x0404;
+ const GLenum BACK = 0x0405;
+ const GLenum FRONT_AND_BACK = 0x0408;
+
+ /* DepthFunction */
+ /* NEVER */
+ /* LESS */
+ /* EQUAL */
+ /* LEQUAL */
+ /* GREATER */
+ /* NOTEQUAL */
+ /* GEQUAL */
+ /* ALWAYS */
+
+ /* EnableCap */
+ /* TEXTURE_2D */
+ const GLenum CULL_FACE = 0x0B44;
+ const GLenum BLEND = 0x0BE2;
+ const GLenum DITHER = 0x0BD0;
+ const GLenum STENCIL_TEST = 0x0B90;
+ const GLenum DEPTH_TEST = 0x0B71;
+ const GLenum SCISSOR_TEST = 0x0C11;
+ const GLenum POLYGON_OFFSET_FILL = 0x8037;
+ const GLenum SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
+ const GLenum SAMPLE_COVERAGE = 0x80A0;
+
+ /* ErrorCode */
+ const GLenum NO_ERROR = 0;
+ const GLenum INVALID_ENUM = 0x0500;
+ const GLenum INVALID_VALUE = 0x0501;
+ const GLenum INVALID_OPERATION = 0x0502;
+ const GLenum OUT_OF_MEMORY = 0x0505;
+
+ /* FrontFaceDirection */
+ const GLenum CW = 0x0900;
+ const GLenum CCW = 0x0901;
+
+ /* GetPName */
+ const GLenum LINE_WIDTH = 0x0B21;
+ const GLenum ALIASED_POINT_SIZE_RANGE = 0x846D;
+ const GLenum ALIASED_LINE_WIDTH_RANGE = 0x846E;
+ const GLenum CULL_FACE_MODE = 0x0B45;
+ const GLenum FRONT_FACE = 0x0B46;
+ const GLenum DEPTH_RANGE = 0x0B70;
+ const GLenum DEPTH_WRITEMASK = 0x0B72;
+ const GLenum DEPTH_CLEAR_VALUE = 0x0B73;
+ const GLenum DEPTH_FUNC = 0x0B74;
+ const GLenum STENCIL_CLEAR_VALUE = 0x0B91;
+ const GLenum STENCIL_FUNC = 0x0B92;
+ const GLenum STENCIL_FAIL = 0x0B94;
+ const GLenum STENCIL_PASS_DEPTH_FAIL = 0x0B95;
+ const GLenum STENCIL_PASS_DEPTH_PASS = 0x0B96;
+ const GLenum STENCIL_REF = 0x0B97;
+ const GLenum STENCIL_VALUE_MASK = 0x0B93;
+ const GLenum STENCIL_WRITEMASK = 0x0B98;
+ const GLenum STENCIL_BACK_FUNC = 0x8800;
+ const GLenum STENCIL_BACK_FAIL = 0x8801;
+ const GLenum STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
+ const GLenum STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
+ const GLenum STENCIL_BACK_REF = 0x8CA3;
+ const GLenum STENCIL_BACK_VALUE_MASK = 0x8CA4;
+ const GLenum STENCIL_BACK_WRITEMASK = 0x8CA5;
+ const GLenum VIEWPORT = 0x0BA2;
+ const GLenum SCISSOR_BOX = 0x0C10;
+ /* SCISSOR_TEST */
+ const GLenum COLOR_CLEAR_VALUE = 0x0C22;
+ const GLenum COLOR_WRITEMASK = 0x0C23;
+ const GLenum UNPACK_ALIGNMENT = 0x0CF5;
+ const GLenum PACK_ALIGNMENT = 0x0D05;
+ const GLenum MAX_TEXTURE_SIZE = 0x0D33;
+ const GLenum MAX_VIEWPORT_DIMS = 0x0D3A;
+ const GLenum SUBPIXEL_BITS = 0x0D50;
+ const GLenum RED_BITS = 0x0D52;
+ const GLenum GREEN_BITS = 0x0D53;
+ const GLenum BLUE_BITS = 0x0D54;
+ const GLenum ALPHA_BITS = 0x0D55;
+ const GLenum DEPTH_BITS = 0x0D56;
+ const GLenum STENCIL_BITS = 0x0D57;
+ const GLenum POLYGON_OFFSET_UNITS = 0x2A00;
+ /* POLYGON_OFFSET_FILL */
+ const GLenum POLYGON_OFFSET_FACTOR = 0x8038;
+ const GLenum TEXTURE_BINDING_2D = 0x8069;
+ const GLenum SAMPLE_BUFFERS = 0x80A8;
+ const GLenum SAMPLES = 0x80A9;
+ const GLenum SAMPLE_COVERAGE_VALUE = 0x80AA;
+ const GLenum SAMPLE_COVERAGE_INVERT = 0x80AB;
+
+ /* GetTextureParameter */
+ /* TEXTURE_MAG_FILTER */
+ /* TEXTURE_MIN_FILTER */
+ /* TEXTURE_WRAP_S */
+ /* TEXTURE_WRAP_T */
+
+ const GLenum COMPRESSED_TEXTURE_FORMATS = 0x86A3;
+
+ /* HintMode */
+ const GLenum DONT_CARE = 0x1100;
+ const GLenum FASTEST = 0x1101;
+ const GLenum NICEST = 0x1102;
+
+ /* HintTarget */
+ const GLenum GENERATE_MIPMAP_HINT = 0x8192;
+
+ /* DataType */
+ const GLenum BYTE = 0x1400;
+ const GLenum UNSIGNED_BYTE = 0x1401;
+ const GLenum SHORT = 0x1402;
+ const GLenum UNSIGNED_SHORT = 0x1403;
+ const GLenum INT = 0x1404;
+ const GLenum UNSIGNED_INT = 0x1405;
+ const GLenum FLOAT = 0x1406;
+
+ /* PixelFormat */
+ const GLenum DEPTH_COMPONENT = 0x1902;
+ const GLenum ALPHA = 0x1906;
+ const GLenum RGB = 0x1907;
+ const GLenum RGBA = 0x1908;
+ const GLenum LUMINANCE = 0x1909;
+ const GLenum LUMINANCE_ALPHA = 0x190A;
+
+ /* PixelType */
+ /* UNSIGNED_BYTE */
+ const GLenum UNSIGNED_SHORT_4_4_4_4 = 0x8033;
+ const GLenum UNSIGNED_SHORT_5_5_5_1 = 0x8034;
+ const GLenum UNSIGNED_SHORT_5_6_5 = 0x8363;
+
+ /* Shaders */
+ const GLenum FRAGMENT_SHADER = 0x8B30;
+ const GLenum VERTEX_SHADER = 0x8B31;
+ const GLenum MAX_VERTEX_ATTRIBS = 0x8869;
+ const GLenum MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
+ const GLenum MAX_VARYING_VECTORS = 0x8DFC;
+ const GLenum MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
+ const GLenum MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
+ const GLenum MAX_TEXTURE_IMAGE_UNITS = 0x8872;
+ const GLenum MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
+ const GLenum SHADER_TYPE = 0x8B4F;
+ const GLenum DELETE_STATUS = 0x8B80;
+ const GLenum LINK_STATUS = 0x8B82;
+ const GLenum VALIDATE_STATUS = 0x8B83;
+ const GLenum ATTACHED_SHADERS = 0x8B85;
+ const GLenum ACTIVE_UNIFORMS = 0x8B86;
+ const GLenum ACTIVE_ATTRIBUTES = 0x8B89;
+ const GLenum SHADING_LANGUAGE_VERSION = 0x8B8C;
+ const GLenum CURRENT_PROGRAM = 0x8B8D;
+
+ /* StencilFunction */
+ const GLenum NEVER = 0x0200;
+ const GLenum LESS = 0x0201;
+ const GLenum EQUAL = 0x0202;
+ const GLenum LEQUAL = 0x0203;
+ const GLenum GREATER = 0x0204;
+ const GLenum NOTEQUAL = 0x0205;
+ const GLenum GEQUAL = 0x0206;
+ const GLenum ALWAYS = 0x0207;
+
+ /* StencilOp */
+ /* ZERO */
+ const GLenum KEEP = 0x1E00;
+ const GLenum REPLACE = 0x1E01;
+ const GLenum INCR = 0x1E02;
+ const GLenum DECR = 0x1E03;
+ const GLenum INVERT = 0x150A;
+ const GLenum INCR_WRAP = 0x8507;
+ const GLenum DECR_WRAP = 0x8508;
+
+ /* StringName */
+ const GLenum VENDOR = 0x1F00;
+ const GLenum RENDERER = 0x1F01;
+ const GLenum VERSION = 0x1F02;
+
+ /* TextureMagFilter */
+ const GLenum NEAREST = 0x2600;
+ const GLenum LINEAR = 0x2601;
+
+ /* TextureMinFilter */
+ /* NEAREST */
+ /* LINEAR */
+ const GLenum NEAREST_MIPMAP_NEAREST = 0x2700;
+ const GLenum LINEAR_MIPMAP_NEAREST = 0x2701;
+ const GLenum NEAREST_MIPMAP_LINEAR = 0x2702;
+ const GLenum LINEAR_MIPMAP_LINEAR = 0x2703;
+
+ /* TextureParameterName */
+ const GLenum TEXTURE_MAG_FILTER = 0x2800;
+ const GLenum TEXTURE_MIN_FILTER = 0x2801;
+ const GLenum TEXTURE_WRAP_S = 0x2802;
+ const GLenum TEXTURE_WRAP_T = 0x2803;
+
+ /* TextureTarget */
+ const GLenum TEXTURE_2D = 0x0DE1;
+ const GLenum TEXTURE = 0x1702;
+
+ const GLenum TEXTURE_CUBE_MAP = 0x8513;
+ const GLenum TEXTURE_BINDING_CUBE_MAP = 0x8514;
+ const GLenum TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
+ const GLenum TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
+ const GLenum TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
+ const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
+ const GLenum TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
+ const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
+ const GLenum MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
+
+ /* TextureUnit */
+ const GLenum TEXTURE0 = 0x84C0;
+ const GLenum TEXTURE1 = 0x84C1;
+ const GLenum TEXTURE2 = 0x84C2;
+ const GLenum TEXTURE3 = 0x84C3;
+ const GLenum TEXTURE4 = 0x84C4;
+ const GLenum TEXTURE5 = 0x84C5;
+ const GLenum TEXTURE6 = 0x84C6;
+ const GLenum TEXTURE7 = 0x84C7;
+ const GLenum TEXTURE8 = 0x84C8;
+ const GLenum TEXTURE9 = 0x84C9;
+ const GLenum TEXTURE10 = 0x84CA;
+ const GLenum TEXTURE11 = 0x84CB;
+ const GLenum TEXTURE12 = 0x84CC;
+ const GLenum TEXTURE13 = 0x84CD;
+ const GLenum TEXTURE14 = 0x84CE;
+ const GLenum TEXTURE15 = 0x84CF;
+ const GLenum TEXTURE16 = 0x84D0;
+ const GLenum TEXTURE17 = 0x84D1;
+ const GLenum TEXTURE18 = 0x84D2;
+ const GLenum TEXTURE19 = 0x84D3;
+ const GLenum TEXTURE20 = 0x84D4;
+ const GLenum TEXTURE21 = 0x84D5;
+ const GLenum TEXTURE22 = 0x84D6;
+ const GLenum TEXTURE23 = 0x84D7;
+ const GLenum TEXTURE24 = 0x84D8;
+ const GLenum TEXTURE25 = 0x84D9;
+ const GLenum TEXTURE26 = 0x84DA;
+ const GLenum TEXTURE27 = 0x84DB;
+ const GLenum TEXTURE28 = 0x84DC;
+ const GLenum TEXTURE29 = 0x84DD;
+ const GLenum TEXTURE30 = 0x84DE;
+ const GLenum TEXTURE31 = 0x84DF;
+ const GLenum ACTIVE_TEXTURE = 0x84E0;
+
+ /* TextureWrapMode */
+ const GLenum REPEAT = 0x2901;
+ const GLenum CLAMP_TO_EDGE = 0x812F;
+ const GLenum MIRRORED_REPEAT = 0x8370;
+
+ /* Uniform Types */
+ const GLenum FLOAT_VEC2 = 0x8B50;
+ const GLenum FLOAT_VEC3 = 0x8B51;
+ const GLenum FLOAT_VEC4 = 0x8B52;
+ const GLenum INT_VEC2 = 0x8B53;
+ const GLenum INT_VEC3 = 0x8B54;
+ const GLenum INT_VEC4 = 0x8B55;
+ const GLenum BOOL = 0x8B56;
+ const GLenum BOOL_VEC2 = 0x8B57;
+ const GLenum BOOL_VEC3 = 0x8B58;
+ const GLenum BOOL_VEC4 = 0x8B59;
+ const GLenum FLOAT_MAT2 = 0x8B5A;
+ const GLenum FLOAT_MAT3 = 0x8B5B;
+ const GLenum FLOAT_MAT4 = 0x8B5C;
+ const GLenum SAMPLER_2D = 0x8B5E;
+ const GLenum SAMPLER_CUBE = 0x8B60;
+
+ /* Vertex Arrays */
+ const GLenum VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
+ const GLenum VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
+ const GLenum VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
+ const GLenum VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
+ const GLenum VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
+ const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
+ const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
+
+ /* Read Format */
+ const GLenum IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
+ const GLenum IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
+
+ /* Shader Source */
+ const GLenum COMPILE_STATUS = 0x8B81;
+
+ /* Shader Precision-Specified Types */
+ const GLenum LOW_FLOAT = 0x8DF0;
+ const GLenum MEDIUM_FLOAT = 0x8DF1;
+ const GLenum HIGH_FLOAT = 0x8DF2;
+ const GLenum LOW_INT = 0x8DF3;
+ const GLenum MEDIUM_INT = 0x8DF4;
+ const GLenum HIGH_INT = 0x8DF5;
+
+ /* Framebuffer Object. */
+ const GLenum FRAMEBUFFER = 0x8D40;
+ const GLenum RENDERBUFFER = 0x8D41;
+
+ const GLenum RGBA4 = 0x8056;
+ const GLenum RGB5_A1 = 0x8057;
+ const GLenum RGB565 = 0x8D62;
+ const GLenum DEPTH_COMPONENT16 = 0x81A5;
+ const GLenum STENCIL_INDEX = 0x1901;
+ const GLenum STENCIL_INDEX8 = 0x8D48;
+ const GLenum DEPTH_STENCIL = 0x84F9;
+
+ const GLenum RENDERBUFFER_WIDTH = 0x8D42;
+ const GLenum RENDERBUFFER_HEIGHT = 0x8D43;
+ const GLenum RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
+ const GLenum RENDERBUFFER_RED_SIZE = 0x8D50;
+ const GLenum RENDERBUFFER_GREEN_SIZE = 0x8D51;
+ const GLenum RENDERBUFFER_BLUE_SIZE = 0x8D52;
+ const GLenum RENDERBUFFER_ALPHA_SIZE = 0x8D53;
+ const GLenum RENDERBUFFER_DEPTH_SIZE = 0x8D54;
+ const GLenum RENDERBUFFER_STENCIL_SIZE = 0x8D55;
+
+ const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
+ const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
+ const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
+ const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
+
+ const GLenum COLOR_ATTACHMENT0 = 0x8CE0;
+ const GLenum DEPTH_ATTACHMENT = 0x8D00;
+ const GLenum STENCIL_ATTACHMENT = 0x8D20;
+ const GLenum DEPTH_STENCIL_ATTACHMENT = 0x821A;
+
+ const GLenum NONE = 0;
+
+ const GLenum FRAMEBUFFER_COMPLETE = 0x8CD5;
+ const GLenum FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
+ const GLenum FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
+ const GLenum FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
+ const GLenum FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
+
+ const GLenum FRAMEBUFFER_BINDING = 0x8CA6;
+ const GLenum RENDERBUFFER_BINDING = 0x8CA7;
+ const GLenum MAX_RENDERBUFFER_SIZE = 0x84E8;
+
+ const GLenum INVALID_FRAMEBUFFER_OPERATION = 0x0506;
+
+ /* WebGL-specific enums */
+ const GLenum UNPACK_FLIP_Y_WEBGL = 0x9240;
+ const GLenum UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
+ const GLenum CONTEXT_LOST_WEBGL = 0x9242;
+ const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
+ const GLenum BROWSER_DEFAULT_WEBGL = 0x9244;
+
+ // The canvas might actually be null in some cases, apparently.
+ readonly attribute (HTMLCanvasElement or OffscreenCanvas)? canvas;
+ readonly attribute GLsizei drawingBufferWidth;
+ readonly attribute GLsizei drawingBufferHeight;
+
+ [WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes();
+ [WebGLHandlesContextLoss] boolean isContextLost();
+
+ [NeedsCallerType]
+ sequence<DOMString>? getSupportedExtensions();
+
+ [Throws, NeedsCallerType]
+ object? getExtension(DOMString name);
+
+ void activeTexture(GLenum texture);
+ void attachShader(WebGLProgram program, WebGLShader shader);
+ void bindAttribLocation(WebGLProgram program, GLuint index, DOMString name);
+ void bindBuffer(GLenum target, WebGLBuffer? buffer);
+ void bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer);
+ void bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer);
+ void bindTexture(GLenum target, WebGLTexture? texture);
+ void blendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void blendEquation(GLenum mode);
+ void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
+ void blendFunc(GLenum sfactor, GLenum dfactor);
+ void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB,
+ GLenum srcAlpha, GLenum dstAlpha);
+
+ [WebGLHandlesContextLoss] GLenum checkFramebufferStatus(GLenum target);
+ void clear(GLbitfield mask);
+ void clearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void clearDepth(GLclampf depth);
+ void clearStencil(GLint s);
+ void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+ void compileShader(WebGLShader shader);
+
+ void copyTexImage2D(GLenum target, GLint level, GLenum internalformat,
+ GLint x, GLint y, GLsizei width, GLsizei height,
+ GLint border);
+ void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLint x, GLint y, GLsizei width, GLsizei height);
+
+ WebGLBuffer? createBuffer();
+ WebGLFramebuffer? createFramebuffer();
+ WebGLProgram? createProgram();
+ WebGLRenderbuffer? createRenderbuffer();
+ WebGLShader? createShader(GLenum type);
+ WebGLTexture? createTexture();
+
+ void cullFace(GLenum mode);
+
+ void deleteBuffer(WebGLBuffer? buffer);
+ void deleteFramebuffer(WebGLFramebuffer? framebuffer);
+ void deleteProgram(WebGLProgram? program);
+ void deleteRenderbuffer(WebGLRenderbuffer? renderbuffer);
+ void deleteShader(WebGLShader? shader);
+ void deleteTexture(WebGLTexture? texture);
+
+ void depthFunc(GLenum func);
+ void depthMask(GLboolean flag);
+ void depthRange(GLclampf zNear, GLclampf zFar);
+ void detachShader(WebGLProgram program, WebGLShader shader);
+ void disable(GLenum cap);
+ void disableVertexAttribArray(GLuint index);
+ void drawArrays(GLenum mode, GLint first, GLsizei count);
+ void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset);
+
+ void enable(GLenum cap);
+ void enableVertexAttribArray(GLuint index);
+ void finish();
+ void flush();
+ void framebufferRenderbuffer(GLenum target, GLenum attachment,
+ GLenum renderbuffertarget,
+ WebGLRenderbuffer? renderbuffer);
+ void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget,
+ WebGLTexture? texture, GLint level);
+ void frontFace(GLenum mode);
+
+ void generateMipmap(GLenum target);
+
+ [NewObject]
+ WebGLActiveInfo? getActiveAttrib(WebGLProgram program, GLuint index);
+ [NewObject]
+ WebGLActiveInfo? getActiveUniform(WebGLProgram program, GLuint index);
+
+ sequence<WebGLShader>? getAttachedShaders(WebGLProgram program);
+
+ [WebGLHandlesContextLoss] GLint getAttribLocation(WebGLProgram program, DOMString name);
+
+ any getBufferParameter(GLenum target, GLenum pname);
+ [Throws]
+ any getParameter(GLenum pname);
+
+ [WebGLHandlesContextLoss] GLenum getError();
+
+ [Throws]
+ any getFramebufferAttachmentParameter(GLenum target, GLenum attachment,
+ GLenum pname);
+ any getProgramParameter(WebGLProgram program, GLenum pname);
+ DOMString? getProgramInfoLog(WebGLProgram program);
+ any getRenderbufferParameter(GLenum target, GLenum pname);
+ any getShaderParameter(WebGLShader shader, GLenum pname);
+
+ [NewObject]
+ WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype);
+
+ DOMString? getShaderInfoLog(WebGLShader shader);
+
+ DOMString? getShaderSource(WebGLShader shader);
+
+ any getTexParameter(GLenum target, GLenum pname);
+
+ any getUniform(WebGLProgram program, WebGLUniformLocation location);
+
+ [NewObject]
+ WebGLUniformLocation? getUniformLocation(WebGLProgram program, DOMString name);
+
+ [Throws]
+ any getVertexAttrib(GLuint index, GLenum pname);
+
+ [WebGLHandlesContextLoss] GLintptr getVertexAttribOffset(GLuint index, GLenum pname);
+
+ void hint(GLenum target, GLenum mode);
+ [WebGLHandlesContextLoss] GLboolean isBuffer(WebGLBuffer? buffer);
+ [WebGLHandlesContextLoss] GLboolean isEnabled(GLenum cap);
+ [WebGLHandlesContextLoss] GLboolean isFramebuffer(WebGLFramebuffer? framebuffer);
+ [WebGLHandlesContextLoss] GLboolean isProgram(WebGLProgram? program);
+ [WebGLHandlesContextLoss] GLboolean isRenderbuffer(WebGLRenderbuffer? renderbuffer);
+ [WebGLHandlesContextLoss] GLboolean isShader(WebGLShader? shader);
+ [WebGLHandlesContextLoss] GLboolean isTexture(WebGLTexture? texture);
+ void lineWidth(GLfloat width);
+ void linkProgram(WebGLProgram program);
+ void pixelStorei(GLenum pname, GLint param);
+ void polygonOffset(GLfloat factor, GLfloat units);
+
+ void renderbufferStorage(GLenum target, GLenum internalformat,
+ GLsizei width, GLsizei height);
+ void sampleCoverage(GLclampf value, GLboolean invert);
+ void scissor(GLint x, GLint y, GLsizei width, GLsizei height);
+
+ void shaderSource(WebGLShader shader, DOMString source);
+
+ void stencilFunc(GLenum func, GLint ref, GLuint mask);
+ void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
+ void stencilMask(GLuint mask);
+ void stencilMaskSeparate(GLenum face, GLuint mask);
+ void stencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+ void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
+
+ void texParameterf(GLenum target, GLenum pname, GLfloat param);
+ void texParameteri(GLenum target, GLenum pname, GLint param);
+
+ void uniform1f(WebGLUniformLocation? location, GLfloat x);
+ void uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y);
+ void uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z);
+ void uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+
+ void uniform1i(WebGLUniformLocation? location, GLint x);
+ void uniform2i(WebGLUniformLocation? location, GLint x, GLint y);
+ void uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z);
+ void uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w);
+
+ void useProgram(WebGLProgram? program);
+ void validateProgram(WebGLProgram program);
+
+ void vertexAttrib1f(GLuint indx, GLfloat x);
+ void vertexAttrib1fv(GLuint indx, Float32List values);
+ void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
+ void vertexAttrib2fv(GLuint indx, Float32List values);
+ void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
+ void vertexAttrib3fv(GLuint indx, Float32List values);
+ void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+ void vertexAttrib4fv(GLuint indx, Float32List values);
+ void vertexAttribPointer(GLuint indx, GLint size, GLenum type,
+ GLboolean normalized, GLsizei stride, GLintptr offset);
+
+ void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
+};
+
+[Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLRenderingContext {
+ // bufferData has WebGL2 overloads.
+ void bufferData(GLenum target, GLsizeiptr size, GLenum usage);
+ void bufferData(GLenum target, ArrayBuffer? data, GLenum usage);
+ void bufferData(GLenum target, ArrayBufferView data, GLenum usage);
+ // bufferSubData has WebGL2 overloads.
+ void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer data);
+ void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView data);
+
+ // compressedTexImage2D has WebGL2 overloads.
+ void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat,
+ GLsizei width, GLsizei height, GLint border,
+ ArrayBufferView data);
+ // compressedTexSubImage2D has WebGL2 overloads.
+ void compressedTexSubImage2D(GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height, GLenum format,
+ ArrayBufferView data);
+
+ // readPixels has WebGL2 overloads.
+ [Throws]
+ void readPixels(GLint x, GLint y, GLsizei width, GLsizei height,
+ GLenum format, GLenum type, ArrayBufferView? pixels);
+
+ // texImage2D has WebGL2 overloads.
+ // Overloads must share [Throws].
+ [Throws] // Can't actually throw.
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLsizei width, GLsizei height, GLint border, GLenum format,
+ GLenum type, ArrayBufferView? pixels);
+ [Throws] // Can't actually throw.
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLenum format, GLenum type, ImageBitmap pixels);
+ [Throws] // Can't actually throw.
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLenum format, GLenum type, ImageData pixels);
+ [Throws]
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLenum format, GLenum type, HTMLImageElement image); // May throw DOMException
+ [Throws]
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLenum format, GLenum type, HTMLCanvasElement canvas); // May throw DOMException
+ [Throws]
+ void texImage2D(GLenum target, GLint level, GLint internalformat,
+ GLenum format, GLenum type, HTMLVideoElement video); // May throw DOMException
+
+ // texSubImage2D has WebGL2 overloads.
+ [Throws] // Can't actually throw.
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type, ArrayBufferView? pixels);
+ [Throws] // Can't actually throw.
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLenum format, GLenum type, ImageBitmap pixels);
+ [Throws] // Can't actually throw.
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLenum format, GLenum type, ImageData pixels);
+ [Throws]
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLenum format, GLenum type, HTMLImageElement image); // May throw DOMException
+ [Throws]
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLenum format, GLenum type, HTMLCanvasElement canvas); // May throw DOMException
+ [Throws]
+ void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
+ GLenum format, GLenum type, HTMLVideoElement video); // May throw DOMException
+
+ // uniform*fv have WebGL2 overloads, or rather extensions, that are not
+ // distinguishable from the WebGL1 versions when called with two arguments.
+ void uniform1fv(WebGLUniformLocation? location, Float32List data);
+ void uniform2fv(WebGLUniformLocation? location, Float32List data);
+ void uniform3fv(WebGLUniformLocation? location, Float32List data);
+ void uniform4fv(WebGLUniformLocation? location, Float32List data);
+
+ // uniform*iv have WebGL2 overloads, or rather extensions, that are not
+ // distinguishable from the WebGL1 versions when called with two arguments.
+ void uniform1iv(WebGLUniformLocation? location, Int32List data);
+ void uniform2iv(WebGLUniformLocation? location, Int32List data);
+ void uniform3iv(WebGLUniformLocation? location, Int32List data);
+ void uniform4iv(WebGLUniformLocation? location, Int32List data);
+
+ // uniformMatrix*fv have WebGL2 overloads, or rather extensions, that are
+ // not distinguishable from the WebGL1 versions when called with two
+ // arguments.
+ void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data);
+ void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data);
+ void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data);
+};
+
+WebGLRenderingContext implements WebGLRenderingContextBase;
+
+// For OffscreenCanvas
+// Reference: https://wiki.whatwg.org/wiki/OffscreenCanvas
+[Exposed=(Window,Worker)]
+partial interface WebGLRenderingContext {
+ [Func="mozilla::dom::OffscreenCanvas::PrefEnabled"]
+ void commit();
+};
+
+////////////////////////////////////////
+// specific extension interfaces
+
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_s3tc
+{
+ const GLenum COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
+ const GLenum COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
+ const GLenum COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2;
+ const GLenum COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3;
+};
+
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_atc
+{
+ const GLenum COMPRESSED_RGB_ATC_WEBGL = 0x8C92;
+ const GLenum COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL = 0x8C93;
+ const GLenum COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE;
+};
+
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_etc
+{
+ const GLenum COMPRESSED_R11_EAC = 0x9270;
+ const GLenum COMPRESSED_SIGNED_R11_EAC = 0x9271;
+ const GLenum COMPRESSED_RG11_EAC = 0x9272;
+ const GLenum COMPRESSED_SIGNED_RG11_EAC = 0x9273;
+ const GLenum COMPRESSED_RGB8_ETC2 = 0x9274;
+ const GLenum COMPRESSED_SRGB8_ETC2 = 0x9275;
+ const GLenum COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276;
+ const GLenum COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277;
+ const GLenum COMPRESSED_RGBA8_ETC2_EAC = 0x9278;
+ const GLenum COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279;
+};
+
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_etc1
+{
+ const GLenum COMPRESSED_RGB_ETC1_WEBGL = 0x8D64;
+};
+
+[NoInterfaceObject]
+interface WEBGL_compressed_texture_pvrtc
+{
+ const GLenum COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00;
+ const GLenum COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01;
+ const GLenum COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02;
+ const GLenum COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03;
+};
+
+[NoInterfaceObject]
+interface WEBGL_debug_renderer_info
+{
+ const GLenum UNMASKED_VENDOR_WEBGL = 0x9245;
+ const GLenum UNMASKED_RENDERER_WEBGL = 0x9246;
+};
+
+[NoInterfaceObject]
+interface WEBGL_debug_shaders
+{
+ DOMString getTranslatedShaderSource(WebGLShader shader);
+};
+
+[NoInterfaceObject]
+interface WEBGL_depth_texture
+{
+ const GLenum UNSIGNED_INT_24_8_WEBGL = 0x84FA;
+};
+
+[NoInterfaceObject]
+interface OES_element_index_uint
+{
+};
+
+[NoInterfaceObject]
+interface EXT_frag_depth
+{
+};
+
+[NoInterfaceObject]
+interface WEBGL_lose_context {
+ void loseContext();
+ void restoreContext();
+};
+
+[NoInterfaceObject]
+interface EXT_texture_filter_anisotropic
+{
+ const GLenum TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
+ const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
+};
+
+[NoInterfaceObject]
+interface EXT_sRGB
+{
+ const GLenum SRGB_EXT = 0x8C40;
+ const GLenum SRGB_ALPHA_EXT = 0x8C42;
+ const GLenum SRGB8_ALPHA8_EXT = 0x8C43;
+ const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210;
+};
+
+[NoInterfaceObject]
+interface OES_standard_derivatives {
+ const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
+};
+
+[NoInterfaceObject]
+interface OES_texture_float
+{
+};
+
+[NoInterfaceObject]
+interface WEBGL_draw_buffers {
+ const GLenum COLOR_ATTACHMENT0_WEBGL = 0x8CE0;
+ const GLenum COLOR_ATTACHMENT1_WEBGL = 0x8CE1;
+ const GLenum COLOR_ATTACHMENT2_WEBGL = 0x8CE2;
+ const GLenum COLOR_ATTACHMENT3_WEBGL = 0x8CE3;
+ const GLenum COLOR_ATTACHMENT4_WEBGL = 0x8CE4;
+ const GLenum COLOR_ATTACHMENT5_WEBGL = 0x8CE5;
+ const GLenum COLOR_ATTACHMENT6_WEBGL = 0x8CE6;
+ const GLenum COLOR_ATTACHMENT7_WEBGL = 0x8CE7;
+ const GLenum COLOR_ATTACHMENT8_WEBGL = 0x8CE8;
+ const GLenum COLOR_ATTACHMENT9_WEBGL = 0x8CE9;
+ const GLenum COLOR_ATTACHMENT10_WEBGL = 0x8CEA;
+ const GLenum COLOR_ATTACHMENT11_WEBGL = 0x8CEB;
+ const GLenum COLOR_ATTACHMENT12_WEBGL = 0x8CEC;
+ const GLenum COLOR_ATTACHMENT13_WEBGL = 0x8CED;
+ const GLenum COLOR_ATTACHMENT14_WEBGL = 0x8CEE;
+ const GLenum COLOR_ATTACHMENT15_WEBGL = 0x8CEF;
+
+ const GLenum DRAW_BUFFER0_WEBGL = 0x8825;
+ const GLenum DRAW_BUFFER1_WEBGL = 0x8826;
+ const GLenum DRAW_BUFFER2_WEBGL = 0x8827;
+ const GLenum DRAW_BUFFER3_WEBGL = 0x8828;
+ const GLenum DRAW_BUFFER4_WEBGL = 0x8829;
+ const GLenum DRAW_BUFFER5_WEBGL = 0x882A;
+ const GLenum DRAW_BUFFER6_WEBGL = 0x882B;
+ const GLenum DRAW_BUFFER7_WEBGL = 0x882C;
+ const GLenum DRAW_BUFFER8_WEBGL = 0x882D;
+ const GLenum DRAW_BUFFER9_WEBGL = 0x882E;
+ const GLenum DRAW_BUFFER10_WEBGL = 0x882F;
+ const GLenum DRAW_BUFFER11_WEBGL = 0x8830;
+ const GLenum DRAW_BUFFER12_WEBGL = 0x8831;
+ const GLenum DRAW_BUFFER13_WEBGL = 0x8832;
+ const GLenum DRAW_BUFFER14_WEBGL = 0x8833;
+ const GLenum DRAW_BUFFER15_WEBGL = 0x8834;
+
+ const GLenum MAX_COLOR_ATTACHMENTS_WEBGL = 0x8CDF;
+ const GLenum MAX_DRAW_BUFFERS_WEBGL = 0x8824;
+
+ void drawBuffersWEBGL(sequence<GLenum> buffers);
+};
+
+[NoInterfaceObject]
+interface OES_texture_float_linear
+{
+};
+
+[NoInterfaceObject]
+interface EXT_shader_texture_lod
+{
+};
+
+[NoInterfaceObject]
+interface OES_texture_half_float
+{
+ const GLenum HALF_FLOAT_OES = 0x8D61;
+};
+
+[NoInterfaceObject]
+interface OES_texture_half_float_linear
+{
+};
+
+[NoInterfaceObject]
+interface WEBGL_color_buffer_float
+{
+ const GLenum RGBA32F_EXT = 0x8814;
+ const GLenum RGB32F_EXT = 0x8815;
+ const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
+ const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
+};
+
+[NoInterfaceObject]
+interface EXT_color_buffer_half_float
+{
+ const GLenum RGBA16F_EXT = 0x881A;
+ const GLenum RGB16F_EXT = 0x881B;
+ const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
+ const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
+};
+
+[NoInterfaceObject]
+interface OES_vertex_array_object {
+ const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5;
+
+ WebGLVertexArrayObject? createVertexArrayOES();
+ void deleteVertexArrayOES(WebGLVertexArrayObject? arrayObject);
+ [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArrayObject? arrayObject);
+ void bindVertexArrayOES(WebGLVertexArrayObject? arrayObject);
+};
+
+[NoInterfaceObject]
+interface ANGLE_instanced_arrays {
+ const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
+
+ void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+ void drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
+ void vertexAttribDivisorANGLE(GLuint index, GLuint divisor);
+};
+
+[NoInterfaceObject]
+interface EXT_blend_minmax {
+ const GLenum MIN_EXT = 0x8007;
+ const GLenum MAX_EXT = 0x8008;
+};
+
+interface WebGLQuery {
+};
+
+[NoInterfaceObject]
+interface EXT_disjoint_timer_query {
+ const GLenum QUERY_COUNTER_BITS_EXT = 0x8864;
+ const GLenum CURRENT_QUERY_EXT = 0x8865;
+ const GLenum QUERY_RESULT_EXT = 0x8866;
+ const GLenum QUERY_RESULT_AVAILABLE_EXT = 0x8867;
+ const GLenum TIME_ELAPSED_EXT = 0x88BF;
+ const GLenum TIMESTAMP_EXT = 0x8E28;
+ const GLenum GPU_DISJOINT_EXT = 0x8FBB;
+
+ WebGLQuery? createQueryEXT();
+ void deleteQueryEXT(WebGLQuery? query);
+ [WebGLHandlesContextLoss] boolean isQueryEXT(WebGLQuery? query);
+ void beginQueryEXT(GLenum target, WebGLQuery query);
+ void endQueryEXT(GLenum target);
+ void queryCounterEXT(WebGLQuery query, GLenum target);
+ any getQueryEXT(GLenum target, GLenum pname);
+ any getQueryObjectEXT(WebGLQuery query, GLenum pname);
+};
diff --git a/dom/webidl/WebKitCSSMatrix.webidl b/dom/webidl/WebKitCSSMatrix.webidl
new file mode 100644
index 000000000..8115711a3
--- /dev/null
+++ b/dom/webidl/WebKitCSSMatrix.webidl
@@ -0,0 +1,39 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://compat.spec.whatwg.org/#webkitcssmatrix-interface
+ */
+
+[Constructor,
+ Constructor(DOMString transformList),
+ Constructor(WebKitCSSMatrix other),
+ Exposed=Window,
+ Func="mozilla::dom::WebKitCSSMatrix::FeatureEnabled"]
+interface WebKitCSSMatrix : DOMMatrix {
+ // Mutable transform methods
+ [Throws]
+ WebKitCSSMatrix setMatrixValue(DOMString transformList);
+
+ // Immutable transform methods
+ WebKitCSSMatrix multiply(WebKitCSSMatrix other);
+ [Throws]
+ WebKitCSSMatrix inverse();
+ WebKitCSSMatrix translate(optional unrestricted double tx = 0,
+ optional unrestricted double ty = 0,
+ optional unrestricted double tz = 0);
+ WebKitCSSMatrix scale(optional unrestricted double scaleX = 1,
+ optional unrestricted double scaleY,
+ optional unrestricted double scaleZ = 1);
+ WebKitCSSMatrix rotate(optional unrestricted double rotX = 0,
+ optional unrestricted double rotY,
+ optional unrestricted double rotZ);
+ WebKitCSSMatrix rotateAxisAngle(optional unrestricted double x = 0,
+ optional unrestricted double y = 0,
+ optional unrestricted double z = 0,
+ optional unrestricted double angle = 0);
+ WebKitCSSMatrix skewX(optional unrestricted double sx = 0);
+ WebKitCSSMatrix skewY(optional unrestricted double sy = 0);
+};
diff --git a/dom/webidl/WebSocket.webidl b/dom/webidl/WebSocket.webidl
new file mode 100644
index 000000000..492e366ba
--- /dev/null
+++ b/dom/webidl/WebSocket.webidl
@@ -0,0 +1,77 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/html/#network
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera Software ASA.
+ * You are granted a license to use, reproduce and create derivative works of this document.
+ */
+
+enum BinaryType { "blob", "arraybuffer" };
+
+[Exposed=(Window,Worker),
+ Constructor(DOMString url),
+ Constructor(DOMString url, DOMString protocols),
+ Constructor(DOMString url, sequence<DOMString> protocols)]
+interface WebSocket : EventTarget {
+
+ readonly attribute DOMString url;
+
+ // ready state
+ const unsigned short CONNECTING = 0;
+ const unsigned short OPEN = 1;
+ const unsigned short CLOSING = 2;
+ const unsigned short CLOSED = 3;
+
+ readonly attribute unsigned short readyState;
+
+ readonly attribute unsigned long bufferedAmount;
+
+ // networking
+
+ attribute EventHandler onopen;
+
+ attribute EventHandler onerror;
+
+ attribute EventHandler onclose;
+
+ readonly attribute DOMString extensions;
+
+ readonly attribute DOMString protocol;
+
+ [Throws]
+ void close([Clamp] optional unsigned short code, optional DOMString reason);
+
+ // messaging
+
+ attribute EventHandler onmessage;
+
+ attribute BinaryType binaryType;
+
+ [Throws]
+ void send(DOMString data);
+
+ [Throws]
+ void send(Blob data);
+
+ [Throws]
+ void send(ArrayBuffer data);
+
+ [Throws]
+ void send(ArrayBufferView data);
+};
+
+// Support for creating server-side chrome-only WebSocket. Used in FlyWeb and in
+// devtools remote debugging server.
+interface nsITransportProvider;
+
+partial interface WebSocket {
+ [ChromeOnly, NewObject, Throws]
+ static WebSocket createServerWebSocket(DOMString url,
+ sequence<DOMString> protocols,
+ nsITransportProvider transportProvider,
+ DOMString negotiatedExtensions);
+};
diff --git a/dom/webidl/WebrtcDeprecated.webidl b/dom/webidl/WebrtcDeprecated.webidl
new file mode 100644
index 000000000..bd939ba8c
--- /dev/null
+++ b/dom/webidl/WebrtcDeprecated.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * This file includes all the deprecated mozRTC prefixed interfaces.
+ *
+ * The declaration of each should match the declaration of the real, unprefixed
+ * interface. These aliases will be removed at some point (Bug 1155923).
+ */
+
+[Deprecated="WebrtcDeprecatedPrefix",
+ Pref="media.peerconnection.enabled",
+ JSImplementation="@mozilla.org/dom/rtcicecandidate;1",
+ Constructor(optional RTCIceCandidateInit candidateInitDict)]
+interface mozRTCIceCandidate : RTCIceCandidate {};
+
+[Deprecated="WebrtcDeprecatedPrefix",
+ Pref="media.peerconnection.enabled",
+ JSImplementation="@mozilla.org/dom/peerconnection;1",
+ Constructor (optional RTCConfiguration configuration,
+ optional object? constraints)]
+interface mozRTCPeerConnection : RTCPeerConnection {};
+
+[Deprecated="WebrtcDeprecatedPrefix",
+ Pref="media.peerconnection.enabled",
+ JSImplementation="@mozilla.org/dom/rtcsessiondescription;1",
+ Constructor(optional RTCSessionDescriptionInit descriptionInitDict)]
+interface mozRTCSessionDescription : RTCSessionDescription {};
diff --git a/dom/webidl/WebrtcGlobalInformation.webidl b/dom/webidl/WebrtcGlobalInformation.webidl
new file mode 100644
index 000000000..ace9e7178
--- /dev/null
+++ b/dom/webidl/WebrtcGlobalInformation.webidl
@@ -0,0 +1,39 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+dictionary WebrtcGlobalStatisticsReport {
+ sequence<RTCStatsReportInternal> reports;
+};
+
+callback WebrtcGlobalStatisticsCallback = void (WebrtcGlobalStatisticsReport reports);
+callback WebrtcGlobalLoggingCallback = void (sequence<DOMString> logMessages);
+
+[ChromeOnly]
+interface WebrtcGlobalInformation {
+
+ [Throws]
+ static void getAllStats(WebrtcGlobalStatisticsCallback callback,
+ optional DOMString pcIdFilter);
+
+ static void clearAllStats();
+
+ [Throws]
+ static void getLogging(DOMString pattern,
+ WebrtcGlobalLoggingCallback callback);
+
+ static void clearLogging();
+
+ // NSPR WebRTC Trace debug level (0 - 65535)
+ //
+ // Notes:
+ // - Setting a non-zero debug level turns on gathering of log for file output.
+ // - Subsequently setting a zero debug level writes that log to disk.
+
+ static attribute long debugLevel;
+
+ // WebRTC AEC debugging enable
+ static attribute boolean aecDebug;
+};
diff --git a/dom/webidl/WheelEvent.webidl b/dom/webidl/WheelEvent.webidl
new file mode 100644
index 000000000..0c89bc73e
--- /dev/null
+++ b/dom/webidl/WheelEvent.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * For more information on this interface please see
+ * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Constructor(DOMString type, optional WheelEventInit eventInitDict)]
+interface WheelEvent : MouseEvent
+{
+ const unsigned long DOM_DELTA_PIXEL = 0x00;
+ const unsigned long DOM_DELTA_LINE = 0x01;
+ const unsigned long DOM_DELTA_PAGE = 0x02;
+
+ readonly attribute double deltaX;
+ readonly attribute double deltaY;
+ readonly attribute double deltaZ;
+ readonly attribute unsigned long deltaMode;
+
+};
+
+dictionary WheelEventInit : MouseEventInit
+{
+ double deltaX = 0;
+ double deltaY = 0;
+ double deltaZ = 0;
+ unsigned long deltaMode = 0;
+};
diff --git a/dom/webidl/WidevineCDMManifest.webidl b/dom/webidl/WidevineCDMManifest.webidl
new file mode 100644
index 000000000..83e14e0b0
--- /dev/null
+++ b/dom/webidl/WidevineCDMManifest.webidl
@@ -0,0 +1,15 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+dictionary WidevineCDMManifest {
+ required DOMString name;
+ required DOMString description;
+ required DOMString version;
+ required DOMString x-cdm-module-versions;
+ required DOMString x-cdm-interface-versions;
+ required DOMString x-cdm-host-versions;
+ required DOMString x-cdm-codecs;
+};
diff --git a/dom/webidl/WifiOptions.webidl b/dom/webidl/WifiOptions.webidl
new file mode 100644
index 000000000..22105b1b0
--- /dev/null
+++ b/dom/webidl/WifiOptions.webidl
@@ -0,0 +1,38 @@
+/* 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/. */
+
+/**
+ * This dictionnary holds the parameters sent to the wifi service.
+ */
+dictionary WifiCommandOptions
+{
+ long id = 0; // opaque id.
+ DOMString cmd = ""; // the command name.
+ DOMString request; // for "command"
+};
+
+/**
+ * This dictionnary holds the parameters sent back to WifiWorker.js
+ */
+dictionary WifiResultOptions
+{
+ long id = 0; // opaque id.
+ long status = 0; // the return status of the command.
+ // Used by most commands.
+ DOMString reply = ""; // for "command".
+};
+
+
+/**
+ * This dictionary holds the callback parameter sent back from WifiCertService
+ * to WifiWorker, and should only be passed around in chrome process.
+ */
+dictionary WifiCertServiceResultOptions
+{
+ long id = 0; // request id in WifiWorker.
+ long status = 0; // error code of the request, 0 indicates success.
+ unsigned short usageFlag = 0; // usage flag of certificate, the flag is defined
+ // in nsIWifiCertService.idl
+ DOMString nickname = ""; // nickname of certificate of the request.
+};
diff --git a/dom/webidl/Window.webidl b/dom/webidl/Window.webidl
new file mode 100644
index 000000000..055a274cc
--- /dev/null
+++ b/dom/webidl/Window.webidl
@@ -0,0 +1,521 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is:
+ * http://www.whatwg.org/specs/web-apps/current-work/
+ * https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
+ * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html
+ * http://dev.w3.org/csswg/cssom/
+ * http://dev.w3.org/csswg/cssom-view/
+ * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html
+ * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
+ * https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html
+ * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+ * https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
+ * https://w3c.github.io/requestidlecallback/
+ */
+
+interface ApplicationCache;
+interface IID;
+interface nsIBrowserDOMWindow;
+interface nsIMessageBroadcaster;
+interface nsIDOMCrypto;
+typedef any Transferable;
+
+// http://www.whatwg.org/specs/web-apps/current-work/
+[PrimaryGlobal, LegacyUnenumerableNamedProperties, NeedResolve]
+/*sealed*/ interface Window : EventTarget {
+ // the current browsing context
+ [Unforgeable, Constant, StoreInSlot,
+ CrossOriginReadable] readonly attribute Window window;
+ [Replaceable, Constant, StoreInSlot,
+ CrossOriginReadable] readonly attribute Window self;
+ [Unforgeable, StoreInSlot, Pure] readonly attribute Document? document;
+ [Throws] attribute DOMString name;
+ [PutForwards=href, Unforgeable, Throws,
+ CrossOriginReadable, CrossOriginWritable] readonly attribute Location? location;
+ [Throws] readonly attribute History history;
+ [Func="CustomElementRegistry::IsCustomElementEnabled"]
+ readonly attribute CustomElementRegistry customElements;
+ [Replaceable, Throws] readonly attribute BarProp locationbar;
+ [Replaceable, Throws] readonly attribute BarProp menubar;
+ [Replaceable, Throws] readonly attribute BarProp personalbar;
+ [Replaceable, Throws] readonly attribute BarProp scrollbars;
+ [Replaceable, Throws] readonly attribute BarProp statusbar;
+ [Replaceable, Throws] readonly attribute BarProp toolbar;
+ [Throws] attribute DOMString status;
+ [Throws, CrossOriginCallable, UnsafeInPrerendering] void close();
+ [Throws, CrossOriginReadable] readonly attribute boolean closed;
+ [Throws] void stop();
+ [Throws, CrossOriginCallable, UnsafeInPrerendering] void focus();
+ [Throws, CrossOriginCallable] void blur();
+
+ // other browsing contexts
+ [Replaceable, Throws, CrossOriginReadable] readonly attribute WindowProxy frames;
+ [Replaceable, CrossOriginReadable] readonly attribute unsigned long length;
+ //[Unforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy top;
+ [Unforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy? top;
+ [Throws, CrossOriginReadable] attribute any opener;
+ //[Throws] readonly attribute WindowProxy parent;
+ [Replaceable, Throws, CrossOriginReadable] readonly attribute WindowProxy? parent;
+ [Throws, NeedsSubjectPrincipal] readonly attribute Element? frameElement;
+ //[Throws] WindowProxy? open(optional USVString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "");
+ [Throws, UnsafeInPrerendering] WindowProxy? open(optional DOMString url = "", optional DOMString target = "", [TreatNullAs=EmptyString] optional DOMString features = "");
+ getter object (DOMString name);
+
+ // the user agent
+ [Throws] readonly attribute Navigator navigator;
+#ifdef HAVE_SIDEBAR
+ [Replaceable, Throws] readonly attribute External external;
+#endif
+ [Throws, Pref="browser.cache.offline.enable"] readonly attribute ApplicationCache applicationCache;
+
+ // user prompts
+ [Throws, UnsafeInPrerendering, NeedsSubjectPrincipal] void alert();
+ [Throws, UnsafeInPrerendering, NeedsSubjectPrincipal] void alert(DOMString message);
+ [Throws, UnsafeInPrerendering, NeedsSubjectPrincipal] boolean confirm(optional DOMString message = "");
+ [Throws, UnsafeInPrerendering, NeedsSubjectPrincipal] DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
+ [Throws, UnsafeInPrerendering] void print();
+ //[Throws] any showModalDialog(DOMString url, optional any argument);
+ [Throws, Func="nsGlobalWindow::IsShowModalDialogEnabled", UnsafeInPrerendering, NeedsSubjectPrincipal]
+ any showModalDialog(DOMString url, optional any argument, optional DOMString options = "");
+
+ [Throws, CrossOriginCallable, NeedsSubjectPrincipal]
+ void postMessage(any message, DOMString targetOrigin, optional sequence<Transferable> transfer);
+
+ // also has obsolete members
+};
+Window implements GlobalEventHandlers;
+Window implements WindowEventHandlers;
+
+// https://www.w3.org/TR/appmanifest/#onappinstalled-attribute
+partial interface Window {
+ [Pref="dom.manifest.onappinstalled"]
+ attribute EventHandler onappinstalled;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/
+[NoInterfaceObject]
+interface WindowSessionStorage {
+ //[Throws] readonly attribute Storage sessionStorage;
+ [Throws] readonly attribute Storage? sessionStorage;
+};
+Window implements WindowSessionStorage;
+
+// http://www.whatwg.org/specs/web-apps/current-work/
+[NoInterfaceObject]
+interface WindowLocalStorage {
+ [Throws] readonly attribute Storage? localStorage;
+};
+Window implements WindowLocalStorage;
+
+// http://www.whatwg.org/specs/web-apps/current-work/
+partial interface Window {
+ void captureEvents();
+ void releaseEvents();
+};
+
+// https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
+partial interface Window {
+ //[Throws] Selection getSelection();
+ [Throws] Selection? getSelection();
+};
+
+// http://dev.w3.org/csswg/cssom/
+partial interface Window {
+ //[NewObject, Throws] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMString pseudoElt = "");
+ [NewObject, Throws] CSSStyleDeclaration? getComputedStyle(Element elt, optional DOMString pseudoElt = "");
+};
+
+// http://dev.w3.org/csswg/cssom-view/
+enum ScrollBehavior { "auto", "instant", "smooth" };
+
+dictionary ScrollOptions {
+ ScrollBehavior behavior = "auto";
+};
+
+dictionary ScrollToOptions : ScrollOptions {
+ unrestricted double left;
+ unrestricted double top;
+};
+
+partial interface Window {
+ //[Throws,NewObject] MediaQueryList matchMedia(DOMString query);
+ [Throws,NewObject] MediaQueryList? matchMedia(DOMString query);
+ // Per spec, screen is SameObject, but we don't actually guarantee that given
+ // nsGlobalWindow::Cleanup. :(
+ //[SameObject, Replaceable, Throws] readonly attribute Screen screen;
+ [Replaceable, Throws] readonly attribute Screen screen;
+
+ // browsing context
+ //[Throws] void moveTo(double x, double y);
+ //[Throws] void moveBy(double x, double y);
+ //[Throws] void resizeTo(double x, double y);
+ //[Throws] void resizeBy(double x, double y);
+ [Throws, UnsafeInPrerendering] void moveTo(long x, long y);
+ [Throws, UnsafeInPrerendering] void moveBy(long x, long y);
+ [Throws, UnsafeInPrerendering] void resizeTo(long x, long y);
+ [Throws, UnsafeInPrerendering] void resizeBy(long x, long y);
+
+ // viewport
+ // These are writable because we allow chrome to write them. And they need
+ // to use 'any' as the type, because non-chrome writing them needs to act
+ // like a [Replaceable] attribute would, which needs the original JS value.
+ //[Replaceable, Throws] readonly attribute double innerWidth;
+ //[Replaceable, Throws] readonly attribute double innerHeight;
+ [Throws, NeedsCallerType] attribute any innerWidth;
+ [Throws, NeedsCallerType] attribute any innerHeight;
+
+ // viewport scrolling
+ void scroll(unrestricted double x, unrestricted double y);
+ void scroll(optional ScrollToOptions options);
+ void scrollTo(unrestricted double x, unrestricted double y);
+ void scrollTo(optional ScrollToOptions options);
+ void scrollBy(unrestricted double x, unrestricted double y);
+ void scrollBy(optional ScrollToOptions options);
+ // mozScrollSnap is used by chrome to perform scroll snapping after the
+ // user performs actions that may affect scroll position
+ // mozScrollSnap is deprecated, to be replaced by a web accessible API, such
+ // as an extension to the ScrollOptions dictionary. See bug 1137937.
+ [ChromeOnly] void mozScrollSnap();
+ // The four properties below are double per spec at the moment, but whether
+ // that will continue is unclear.
+ //[Replaceable, Throws] readonly attribute double scrollX;
+ //[Replaceable, Throws] readonly attribute double pageXOffset;
+ //[Replaceable, Throws] readonly attribute double scrollY;
+ //[Replaceable, Throws] readonly attribute double pageYOffset;
+ [Replaceable, Throws] readonly attribute long scrollX;
+ [Replaceable, Throws] readonly attribute long pageXOffset;
+ [Replaceable, Throws] readonly attribute long scrollY;
+ [Replaceable, Throws] readonly attribute long pageYOffset;
+
+ // client
+ // These are writable because we allow chrome to write them. And they need
+ // to use 'any' as the type, because non-chrome writing them needs to act
+ // like a [Replaceable] attribute would, which needs the original JS value.
+ //[Replaceable, Throws] readonly attribute double screenX;
+ //[Replaceable, Throws] readonly attribute double screenY;
+ //[Replaceable, Throws] readonly attribute double outerWidth;
+ //[Replaceable, Throws] readonly attribute double outerHeight;
+ [Throws, NeedsCallerType] attribute any screenX;
+ [Throws, NeedsCallerType] attribute any screenY;
+ [Throws, NeedsCallerType] attribute any outerWidth;
+ [Throws, NeedsCallerType] attribute any outerHeight;
+};
+
+/**
+ * Special function that gets the fill ratio from the compositor used for testing
+ * and is an indicator that we're layerizing correctly.
+ * This function will call the given callback current fill ratio for a
+ * composited frame. We don't guarantee which frame fill ratios will be returned.
+ */
+partial interface Window {
+ [ChromeOnly, Throws] void mozRequestOverfill(OverfillCallback callback);
+};
+callback OverfillCallback = void (unsigned long overfill);
+
+// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html
+partial interface Window {
+ [Throws] long requestAnimationFrame(FrameRequestCallback callback);
+ [Throws] void cancelAnimationFrame(long handle);
+};
+callback FrameRequestCallback = void (DOMHighResTimeStamp time);
+
+// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
+partial interface Window {
+ [Replaceable, Pure, StoreInSlot] readonly attribute Performance? performance;
+};
+
+// https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html
+Window implements GlobalCrypto;
+
+// https://fidoalliance.org/specifications/download/
+Window implements GlobalU2F;
+
+#ifdef MOZ_WEBSPEECH
+// http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
+[NoInterfaceObject]
+interface SpeechSynthesisGetter {
+ [Throws, Pref="media.webspeech.synth.enabled"] readonly attribute SpeechSynthesis speechSynthesis;
+};
+
+Window implements SpeechSynthesisGetter;
+#endif
+
+// http://www.whatwg.org/specs/web-apps/current-work/
+[NoInterfaceObject]
+interface WindowModal {
+ [Throws, Func="nsGlobalWindow::IsModalContentWindow", NeedsSubjectPrincipal]
+ readonly attribute any dialogArguments;
+
+ [Throws, Func="nsGlobalWindow::IsModalContentWindow", NeedsSubjectPrincipal]
+ attribute any returnValue;
+};
+Window implements WindowModal;
+
+// Mozilla-specific stuff
+partial interface Window {
+ //[NewObject, Throws] CSSStyleDeclaration getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
+ [NewObject, Throws] CSSStyleDeclaration? getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
+
+ // Mozilla extensions
+ /**
+ * Method for scrolling this window by a number of lines.
+ */
+ void scrollByLines(long numLines, optional ScrollOptions options);
+
+ /**
+ * Method for scrolling this window by a number of pages.
+ */
+ void scrollByPages(long numPages, optional ScrollOptions options);
+
+ /**
+ * Method for sizing this window to the content in the window.
+ */
+ [Throws, UnsafeInPrerendering] void sizeToContent();
+
+ // XXX Shouldn't this be in nsIDOMChromeWindow?
+ [ChromeOnly, Replaceable, Throws] readonly attribute MozControllers controllers;
+
+ [ChromeOnly, Throws] readonly attribute Element? realFrameElement;
+
+ [Throws, NeedsCallerType]
+ readonly attribute float mozInnerScreenX;
+ [Throws, NeedsCallerType]
+ readonly attribute float mozInnerScreenY;
+ [Replaceable, Throws, NeedsCallerType]
+ readonly attribute float devicePixelRatio;
+
+ /* The maximum offset that the window can be scrolled to
+ (i.e., the document width/height minus the scrollport width/height) */
+ [ChromeOnly, Throws] readonly attribute long scrollMinX;
+ [ChromeOnly, Throws] readonly attribute long scrollMinY;
+ [Replaceable, Throws] readonly attribute long scrollMaxX;
+ [Replaceable, Throws] readonly attribute long scrollMaxY;
+
+ [Throws, UnsafeInPrerendering] attribute boolean fullScreen;
+
+ [Throws, ChromeOnly, UnsafeInPrerendering] void back();
+ [Throws, ChromeOnly, UnsafeInPrerendering] void forward();
+ [Throws, ChromeOnly, UnsafeInPrerendering] void home();
+
+ // XXX Should this be in nsIDOMChromeWindow?
+ void updateCommands(DOMString action,
+ optional Selection? sel = null,
+ optional short reason = 0);
+
+ /* Find in page.
+ * @param str: the search pattern
+ * @param caseSensitive: is the search caseSensitive
+ * @param backwards: should we search backwards
+ * @param wrapAround: should we wrap the search
+ * @param wholeWord: should we search only for whole words
+ * @param searchInFrames: should we search through all frames
+ * @param showDialog: should we show the Find dialog
+ */
+ [Throws, UnsafeInPrerendering] boolean find(optional DOMString str = "",
+ optional boolean caseSensitive = false,
+ optional boolean backwards = false,
+ optional boolean wrapAround = false,
+ optional boolean wholeWord = false,
+ optional boolean searchInFrames = false,
+ optional boolean showDialog = false);
+
+ /**
+ * Returns the number of times this document for this window has
+ * been painted to the screen.
+ */
+ [Throws] readonly attribute unsigned long long mozPaintCount;
+
+ /**
+ * This property exists because static attributes don't yet work for
+ * JS-implemented WebIDL (see bugs 1058606 and 863952). With this hack, we
+ * can use `MozSelfSupport.something(...)`, which will continue to work
+ * after we ditch this property and switch to static attributes. See
+ */
+ [ChromeOnly, Throws] readonly attribute MozSelfSupport MozSelfSupport;
+
+ [Pure]
+ attribute EventHandler onwheel;
+
+ attribute EventHandler ondevicemotion;
+ attribute EventHandler ondeviceorientation;
+ attribute EventHandler onabsolutedeviceorientation;
+ attribute EventHandler ondeviceproximity;
+ attribute EventHandler onuserproximity;
+ attribute EventHandler ondevicelight;
+
+#ifdef MOZ_B2G
+ attribute EventHandler onmoztimechange;
+ attribute EventHandler onmoznetworkupload;
+ attribute EventHandler onmoznetworkdownload;
+#endif
+
+ void dump(DOMString str);
+
+ /**
+ * This method is here for backwards compatibility with 4.x only,
+ * its implementation is a no-op
+ */
+ void setResizable(boolean resizable);
+
+ /**
+ * This is the scriptable version of
+ * nsIDOMWindow::openDialog() that takes 3 optional
+ * arguments, plus any additional arguments are passed on as
+ * arguments on the dialog's window object (window.arguments).
+ */
+ [Throws, ChromeOnly, UnsafeInPrerendering] WindowProxy? openDialog(optional DOMString url = "",
+ optional DOMString name = "",
+ optional DOMString options = "",
+ any... extraArguments);
+
+ [Replaceable, Throws] readonly attribute object? content;
+
+ [ChromeOnly, Throws] readonly attribute object? __content;
+
+ [Throws, ChromeOnly] any getInterface(IID iid);
+
+ /**
+ * Same as nsIDOMWindow.windowRoot, useful for event listener targeting.
+ */
+ [ChromeOnly, Throws]
+ readonly attribute WindowRoot? windowRoot;
+};
+
+Window implements TouchEventHandlers;
+
+Window implements OnErrorEventHandlerForWindow;
+
+#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+// https://compat.spec.whatwg.org/#windoworientation-interface
+partial interface Window {
+ [NeedsCallerType]
+ readonly attribute short orientation;
+ attribute EventHandler onorientationchange;
+};
+#endif
+
+#ifdef HAVE_SIDEBAR
+// Mozilla extension
+partial interface Window {
+ [Replaceable, Throws, UseCounter]
+ readonly attribute (External or WindowProxy) sidebar;
+};
+#endif
+
+[Func="IsChromeOrXBL"]
+interface ChromeWindow {
+ [Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ const unsigned short STATE_MAXIMIZED = 1;
+ [Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ const unsigned short STATE_MINIMIZED = 2;
+ [Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ const unsigned short STATE_NORMAL = 3;
+ [Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ const unsigned short STATE_FULLSCREEN = 4;
+
+ [Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ readonly attribute unsigned short windowState;
+
+ /**
+ * browserDOMWindow provides access to yet another layer of
+ * utility functions implemented by chrome script. It will be null
+ * for DOMWindows not corresponding to browsers.
+ */
+ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ attribute nsIBrowserDOMWindow? browserDOMWindow;
+
+ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ void getAttention();
+
+ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ void getAttentionWithCycleCount(long aCycleCount);
+
+ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ void setCursor(DOMString cursor);
+
+ [Func="nsGlobalWindow::IsPrivilegedChromeWindow", UnsafeInPrerendering]
+ void maximize();
+ [Func="nsGlobalWindow::IsPrivilegedChromeWindow", UnsafeInPrerendering]
+ void minimize();
+ [Func="nsGlobalWindow::IsPrivilegedChromeWindow", UnsafeInPrerendering]
+ void restore();
+
+ /**
+ * Notify a default button is loaded on a dialog or a wizard.
+ * defaultButton is the default button.
+ */
+ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ void notifyDefaultButtonLoaded(Element defaultButton);
+
+ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ readonly attribute nsIMessageBroadcaster messageManager;
+
+ /**
+ * Returns the message manager identified by the given group name that
+ * manages all frame loaders belonging to that group.
+ */
+ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ nsIMessageBroadcaster getGroupMessageManager(DOMString aGroup);
+
+ /**
+ * On some operating systems, we must allow the window manager to
+ * handle window dragging. This function tells the window manager to
+ * start dragging the window. This function will fail unless called
+ * while the left mouse button is held down, callers must check this.
+ *
+ * The optional panel argument should be set when moving a panel.
+ *
+ * Throws NS_ERROR_NOT_IMPLEMENTED if the OS doesn't support this.
+ */
+ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"]
+ void beginWindowMove(Event mouseDownEvent, optional Element? panel = null);
+};
+
+partial interface Window {
+ [Pref="dom.vr.enabled"]
+ attribute EventHandler onvrdisplayconnect;
+ [Pref="dom.vr.enabled"]
+ attribute EventHandler onvrdisplaydisconnect;
+ [Pref="dom.vr.enabled"]
+ attribute EventHandler onvrdisplaypresentchange;
+};
+
+// For testing worklet only
+partial interface Window {
+ [Pref="dom.worklet.testing.enabled", Throws]
+ Worklet createWorklet();
+};
+
+Window implements ChromeWindow;
+Window implements WindowOrWorkerGlobalScope;
+
+partial interface Window {
+ [Throws, Pref="dom.requestIdleCallback.enabled"]
+ unsigned long requestIdleCallback(IdleRequestCallback callback,
+ optional IdleRequestOptions options);
+ [Pref="dom.requestIdleCallback.enabled"]
+ void cancelIdleCallback(unsigned long handle);
+};
+
+dictionary IdleRequestOptions {
+ unsigned long timeout;
+};
+
+callback IdleRequestCallback = void (IdleDeadline deadline);
+
+/**
+ * Similar to |isSecureContext|, but doesn't pay attention to whether the
+ * window's opener (if any) is a secure context or not.
+ *
+ * WARNING: Do not use this unless you are familiar with the issues that
+ * taking opener state into account is designed to address (or else you may
+ * introduce security issues). If in doubt, use |isSecureContext|. In
+ * particular do not use this to gate access to JavaScript APIs.
+ */
+partial interface Window {
+ [ChromeOnly] readonly attribute boolean isSecureContextIfOpenerIgnored;
+};
diff --git a/dom/webidl/WindowOrWorkerGlobalScope.webidl b/dom/webidl/WindowOrWorkerGlobalScope.webidl
new file mode 100644
index 000000000..8f0d0029f
--- /dev/null
+++ b/dom/webidl/WindowOrWorkerGlobalScope.webidl
@@ -0,0 +1,83 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is:
+ * https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
+ * https://fetch.spec.whatwg.org/#fetch-method
+ * https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
+ * https://w3c.github.io/ServiceWorker/#self-caches
+ */
+
+// https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
+[NoInterfaceObject, Exposed=(Window,Worker)]
+interface WindowOrWorkerGlobalScope {
+ // XXXbz We don't implement 'origin' yet on either window or worker globals.
+ // See bug 1306170.
+ // [Replaceable] readonly attribute USVString origin;
+
+ // base64 utility methods
+ [Throws]
+ DOMString btoa(DOMString btoa);
+ [Throws]
+ DOMString atob(DOMString atob);
+
+ // timers
+ // NOTE: We're using overloads where the spec uses a union. Should
+ // be black-box the same.
+ [Throws]
+ long setTimeout(Function handler, optional long timeout = 0, any... arguments);
+ [Throws]
+ long setTimeout(DOMString handler, optional long timeout = 0, any... unused);
+ void clearTimeout(optional long handle = 0);
+ [Throws]
+ long setInterval(Function handler, optional long timeout, any... arguments);
+ [Throws]
+ long setInterval(DOMString handler, optional long timeout, any... unused);
+ void clearInterval(optional long handle = 0);
+
+ // ImageBitmap
+ [Throws]
+ Promise<ImageBitmap> createImageBitmap(ImageBitmapSource aImage);
+ [Throws]
+ Promise<ImageBitmap> createImageBitmap(ImageBitmapSource aImage, long aSx, long aSy, long aSw, long aSh);
+};
+
+// https://fetch.spec.whatwg.org/#fetch-method
+partial interface WindowOrWorkerGlobalScope {
+ [NewObject] Promise<Response> fetch(RequestInfo input, optional RequestInit init);
+};
+
+// https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
+partial interface WindowOrWorkerGlobalScope {
+ readonly attribute boolean isSecureContext;
+};
+
+// http://w3c.github.io/IndexedDB/#factory-interface
+partial interface WindowOrWorkerGlobalScope {
+ // readonly attribute IDBFactory indexedDB;
+ [Throws]
+ readonly attribute IDBFactory? indexedDB;
+};
+
+// https://w3c.github.io/ServiceWorker/#self-caches
+partial interface WindowOrWorkerGlobalScope {
+ [Throws, Func="mozilla::dom::cache::CacheStorage::PrefEnabled", SameObject]
+ readonly attribute CacheStorage caches;
+};
+
+// Mozilla extensions
+partial interface WindowOrWorkerGlobalScope {
+ // Extensions to ImageBitmap bits.
+ // Bug 1141979 - [FoxEye] Extend ImageBitmap with interfaces to access its
+ // underlying image data
+ //
+ // Note:
+ // Overloaded functions cannot have different "extended attributes",
+ // so I cannot add preference on the extended version of createImageBitmap().
+ // To work around, I will then check the preference at run time and throw if
+ // the preference is set to be false.
+ [Throws]
+ Promise<ImageBitmap> createImageBitmap(ImageBitmapSource aImage, long aOffset, long aLength, ImageBitmapFormat aFormat, ImagePixelLayout aLayout);
+};
diff --git a/dom/webidl/WindowRoot.webidl b/dom/webidl/WindowRoot.webidl
new file mode 100644
index 000000000..0ddb1a9fb
--- /dev/null
+++ b/dom/webidl/WindowRoot.webidl
@@ -0,0 +1,9 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[ChromeOnly]
+interface WindowRoot : EventTarget {
+};
diff --git a/dom/webidl/Worker.webidl b/dom/webidl/Worker.webidl
new file mode 100644
index 000000000..158a502d6
--- /dev/null
+++ b/dom/webidl/Worker.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
+ * Software ASA.
+ * You are granted a license to use, reproduce and create derivative works of
+ * this document.
+ */
+
+[Constructor(DOMString scriptURL),
+ Func="mozilla::dom::workers::WorkerPrivate::WorkerAvailable",
+ Exposed=(Window,DedicatedWorker,SharedWorker,System)]
+interface Worker : EventTarget {
+ void terminate();
+
+ [Throws]
+ void postMessage(any message, optional sequence<any> transfer);
+
+ attribute EventHandler onmessage;
+};
+
+Worker implements AbstractWorker;
+
+[Constructor(DOMString scriptURL),
+ Func="mozilla::dom::workers::ChromeWorkerPrivate::WorkerAvailable",
+ Exposed=(Window,DedicatedWorker,SharedWorker,System)]
+interface ChromeWorker : Worker {
+};
diff --git a/dom/webidl/WorkerDebuggerGlobalScope.webidl b/dom/webidl/WorkerDebuggerGlobalScope.webidl
new file mode 100644
index 000000000..16850589a
--- /dev/null
+++ b/dom/webidl/WorkerDebuggerGlobalScope.webidl
@@ -0,0 +1,40 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+[Global=(WorkerDebugger), Exposed=WorkerDebugger]
+interface WorkerDebuggerGlobalScope : EventTarget {
+ [Throws]
+ readonly attribute object global;
+
+ [Throws]
+ object createSandbox(DOMString name, object prototype);
+
+ [Throws]
+ void loadSubScript(DOMString url, optional object sandbox);
+
+ void enterEventLoop();
+
+ void leaveEventLoop();
+
+ void postMessage(DOMString message);
+
+ attribute EventHandler onmessage;
+
+ [Throws]
+ void setImmediate(Function handler);
+
+ void reportError(DOMString message);
+
+ [Throws]
+ sequence<any> retrieveConsoleEvents();
+
+ [Throws]
+ void setConsoleEventHandler(AnyCallback? handler);
+};
+
+// So you can debug while you debug
+partial interface WorkerDebuggerGlobalScope {
+ void dump(optional DOMString string);
+};
diff --git a/dom/webidl/WorkerGlobalScope.webidl b/dom/webidl/WorkerGlobalScope.webidl
new file mode 100644
index 000000000..25cfe9e29
--- /dev/null
+++ b/dom/webidl/WorkerGlobalScope.webidl
@@ -0,0 +1,52 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
+ * Software ASA.
+ * You are granted a license to use, reproduce and create derivative works of
+ * this document.
+ */
+
+[Exposed=(Worker)]
+interface WorkerGlobalScope : EventTarget {
+ [Constant, Cached]
+ readonly attribute WorkerGlobalScope self;
+
+ readonly attribute WorkerLocation location;
+
+ [Throws]
+ void close();
+ attribute OnErrorEventHandler onerror;
+
+ attribute EventHandler onoffline;
+ attribute EventHandler ononline;
+ // also has additional members in a partial interface
+};
+
+partial interface WorkerGlobalScope {
+ [Throws]
+ void importScripts(DOMString... urls);
+
+ readonly attribute WorkerNavigator navigator;
+};
+
+WorkerGlobalScope implements GlobalCrypto;
+WorkerGlobalScope implements WindowOrWorkerGlobalScope;
+
+// Not implemented yet: bug 1072107.
+// WorkerGlobalScope implements FontFaceSource;
+
+// Mozilla extensions
+partial interface WorkerGlobalScope {
+
+ void dump(optional DOMString str);
+
+ // XXXbz no spec for this yet, because the webperf WG is a bit dysfunctional
+ [Constant, Cached]
+ readonly attribute Performance performance;
+};
diff --git a/dom/webidl/WorkerLocation.webidl b/dom/webidl/WorkerLocation.webidl
new file mode 100644
index 000000000..23fc478d8
--- /dev/null
+++ b/dom/webidl/WorkerLocation.webidl
@@ -0,0 +1,33 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/html/#worker-locations
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
+ * Software ASA.
+ * You are granted a license to use, reproduce and create derivative works of
+ * this document.
+ */
+
+[Exposed=Worker]
+interface WorkerLocation {
+ // Bug 824857: no support for stringifier attributes yet.
+ // stringifier attribute USVString href;
+
+ // Bug 824857 should remove this.
+ stringifier;
+
+ readonly attribute USVString href;
+
+ readonly attribute USVString origin;
+ readonly attribute USVString protocol;
+ readonly attribute USVString host;
+ readonly attribute USVString hostname;
+ readonly attribute USVString port;
+ readonly attribute USVString pathname;
+ readonly attribute USVString search;
+ readonly attribute USVString hash;
+};
diff --git a/dom/webidl/WorkerNavigator.webidl b/dom/webidl/WorkerNavigator.webidl
new file mode 100644
index 000000000..44d1e29f6
--- /dev/null
+++ b/dom/webidl/WorkerNavigator.webidl
@@ -0,0 +1,14 @@
+/* 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/. */
+
+
+[Exposed=Worker]
+interface WorkerNavigator {
+};
+
+WorkerNavigator implements NavigatorID;
+WorkerNavigator implements NavigatorLanguage;
+WorkerNavigator implements NavigatorOnLine;
+WorkerNavigator implements NavigatorConcurrentHardware;
+WorkerNavigator implements NavigatorStorage;
diff --git a/dom/webidl/Worklet.webidl b/dom/webidl/Worklet.webidl
new file mode 100644
index 000000000..7f003779f
--- /dev/null
+++ b/dom/webidl/Worklet.webidl
@@ -0,0 +1,14 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://drafts.css-houdini.org/worklets/#idl-index
+ */
+
+[Pref="dom.worklet.enabled"]
+interface Worklet {
+ [NewObject, Throws]
+ Promise<void> import(USVString moduleURL);
+};
diff --git a/dom/webidl/WorkletGlobalScope.webidl b/dom/webidl/WorkletGlobalScope.webidl
new file mode 100644
index 000000000..208ea03fa
--- /dev/null
+++ b/dom/webidl/WorkletGlobalScope.webidl
@@ -0,0 +1,17 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://drafts.css-houdini.org/worklets/#idl-index
+ */
+
+[Global=(Worklet), Exposed=(Worklet)]
+interface WorkletGlobalScope {
+};
+
+// Mozilla extensions
+partial interface WorkletGlobalScope {
+ void dump(optional DOMString str);
+};
diff --git a/dom/webidl/XMLDocument.webidl b/dom/webidl/XMLDocument.webidl
new file mode 100644
index 000000000..0f503c9f5
--- /dev/null
+++ b/dom/webidl/XMLDocument.webidl
@@ -0,0 +1,23 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is:
+ * http://dom.spec.whatwg.org/#xmldocument
+ * http://www.whatwg.org/specs/web-apps/current-work/#xmldocument
+ */
+
+// http://dom.spec.whatwg.org/#xmldocument
+interface XMLDocument : Document {};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#xmldocument
+partial interface XMLDocument {
+ [Throws]
+ boolean load(DOMString url);
+};
+
+// Gecko extensions?
+partial interface XMLDocument {
+ attribute boolean async;
+};
diff --git a/dom/webidl/XMLHttpRequest.webidl b/dom/webidl/XMLHttpRequest.webidl
new file mode 100644
index 000000000..fa44c449f
--- /dev/null
+++ b/dom/webidl/XMLHttpRequest.webidl
@@ -0,0 +1,160 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * www.w3.org/TR/2012/WD-XMLHttpRequest-20120117/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface InputStream;
+interface MozChannel;
+interface IID;
+
+enum XMLHttpRequestResponseType {
+ "",
+ "arraybuffer",
+ "blob",
+ "document",
+ "json",
+ "text",
+
+ // Mozilla-specific stuff
+ "moz-chunked-text",
+ "moz-chunked-arraybuffer",
+ "moz-blob"
+};
+
+/**
+ * Parameters for instantiating an XMLHttpRequest. They are passed as an
+ * optional argument to the constructor:
+ *
+ * new XMLHttpRequest({anon: true, system: true});
+ */
+dictionary MozXMLHttpRequestParameters
+{
+ /**
+ * If true, the request will be sent without cookie and authentication
+ * headers.
+ */
+ boolean mozAnon = false;
+
+ /**
+ * If true, the same origin policy will not be enforced on the request.
+ */
+ boolean mozSystem = false;
+};
+
+[Constructor(optional MozXMLHttpRequestParameters params),
+ // There are apparently callers, specifically CoffeeScript, who do
+ // things like this:
+ // c = new(window.ActiveXObject || XMLHttpRequest)("Microsoft.XMLHTTP")
+ // To handle that, we need a constructor that takes a string.
+ Constructor(DOMString ignored),
+ Exposed=(Window,DedicatedWorker,SharedWorker)]
+interface XMLHttpRequest : XMLHttpRequestEventTarget {
+ // event handler
+ attribute EventHandler onreadystatechange;
+
+ // states
+ const unsigned short UNSENT = 0;
+ const unsigned short OPENED = 1;
+ const unsigned short HEADERS_RECEIVED = 2;
+ const unsigned short LOADING = 3;
+ const unsigned short DONE = 4;
+
+ readonly attribute unsigned short readyState;
+
+ // request
+ [Throws]
+ void open(ByteString method, DOMString url);
+ [Throws]
+ void open(ByteString method, DOMString url, boolean async,
+ optional DOMString? user=null, optional DOMString? password=null);
+ [Throws]
+ void setRequestHeader(ByteString header, ByteString value);
+
+ [SetterThrows]
+ attribute unsigned long timeout;
+
+ [SetterThrows]
+ attribute boolean withCredentials;
+
+ [Throws]
+ readonly attribute XMLHttpRequestUpload upload;
+
+ [Throws]
+ void send();
+ [Throws]
+ void send(ArrayBuffer data);
+ [Throws]
+ void send(ArrayBufferView data);
+ [Throws]
+ void send(Blob data);
+ [Throws]
+ void send(Document data);
+ [Throws]
+ void send(DOMString? data);
+ [Throws]
+ void send(FormData data);
+ [Throws]
+ void send(InputStream data);
+ [Throws]
+ void send(URLSearchParams data);
+
+ [Throws]
+ void abort();
+
+ // response
+ readonly attribute DOMString responseURL;
+
+ [Throws]
+ readonly attribute unsigned short status;
+
+ [Throws]
+ readonly attribute ByteString statusText;
+
+ [Throws]
+ ByteString? getResponseHeader(ByteString header);
+
+ [Throws]
+ ByteString getAllResponseHeaders();
+
+ [Throws]
+ void overrideMimeType(DOMString mime);
+
+ [SetterThrows]
+ attribute XMLHttpRequestResponseType responseType;
+ [Throws]
+ readonly attribute any response;
+ [Cached, Pure, Throws]
+ readonly attribute DOMString? responseText;
+
+ [Throws, Exposed=Window]
+ readonly attribute Document? responseXML;
+
+ // Mozilla-specific stuff
+
+ [ChromeOnly, SetterThrows]
+ attribute boolean mozBackgroundRequest;
+
+ [ChromeOnly, Exposed=Window]
+ readonly attribute MozChannel? channel;
+
+ // A platform-specific identifer to represent the network interface
+ // which the HTTP request would occur on.
+ [ChromeOnly, Exposed=Window]
+ attribute ByteString? networkInterfaceId;
+
+ [Throws, ChromeOnly, Exposed=Window]
+ any getInterface(IID iid);
+
+ [ChromeOnly, Exposed=Window]
+ void setOriginAttributes(optional OriginAttributesDictionary originAttributes);
+
+ readonly attribute boolean mozAnon;
+ readonly attribute boolean mozSystem;
+};
diff --git a/dom/webidl/XMLHttpRequestEventTarget.webidl b/dom/webidl/XMLHttpRequestEventTarget.webidl
new file mode 100644
index 000000000..035da04cc
--- /dev/null
+++ b/dom/webidl/XMLHttpRequestEventTarget.webidl
@@ -0,0 +1,29 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * www.w3.org/TR/2012/WD-XMLHttpRequest-20120117/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Exposed=(Window,DedicatedWorker,SharedWorker)]
+interface XMLHttpRequestEventTarget : EventTarget {
+ // event handlers
+ attribute EventHandler onloadstart;
+
+ attribute EventHandler onprogress;
+
+ attribute EventHandler onabort;
+
+ attribute EventHandler onerror;
+
+ attribute EventHandler onload;
+
+ attribute EventHandler ontimeout;
+
+ attribute EventHandler onloadend;
+};
diff --git a/dom/webidl/XMLHttpRequestUpload.webidl b/dom/webidl/XMLHttpRequestUpload.webidl
new file mode 100644
index 000000000..cbb8728b7
--- /dev/null
+++ b/dom/webidl/XMLHttpRequestUpload.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * www.w3.org/TR/2012/WD-XMLHttpRequest-20120117/
+ *
+ * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+[Exposed=(Window,DedicatedWorker,SharedWorker)]
+interface XMLHttpRequestUpload : XMLHttpRequestEventTarget {
+
+};
diff --git a/dom/webidl/XMLSerializer.webidl b/dom/webidl/XMLSerializer.webidl
new file mode 100644
index 000000000..700098e2f
--- /dev/null
+++ b/dom/webidl/XMLSerializer.webidl
@@ -0,0 +1,20 @@
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://domparsing.spec.whatwg.org/#the-xmlserializer-interface
+ */
+
+interface OutputStream;
+
+[Constructor]
+interface XMLSerializer {
+ [Throws]
+ DOMString serializeToString(Node root);
+
+ // Mozilla-specific stuff
+ [Throws, ChromeOnly]
+ void serializeToStream(Node root, OutputStream stream, DOMString? charset);
+};
+
diff --git a/dom/webidl/XMLStylesheetProcessingInstruction.webidl b/dom/webidl/XMLStylesheetProcessingInstruction.webidl
new file mode 100644
index 000000000..ec7d64a0d
--- /dev/null
+++ b/dom/webidl/XMLStylesheetProcessingInstruction.webidl
@@ -0,0 +1,9 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface XMLStylesheetProcessingInstruction : ProcessingInstruction {
+ readonly attribute StyleSheet? sheet;
+};
diff --git a/dom/webidl/XPathEvaluator.webidl b/dom/webidl/XPathEvaluator.webidl
new file mode 100644
index 000000000..a74909f2a
--- /dev/null
+++ b/dom/webidl/XPathEvaluator.webidl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Constructor]
+interface XPathEvaluator {
+ // Based on nsIDOMXPathEvaluator
+ [NewObject, Throws]
+ XPathExpression createExpression(DOMString expression,
+ XPathNSResolver? resolver);
+ [Pure]
+ Node createNSResolver(Node nodeResolver);
+ [Throws]
+ XPathResult evaluate(DOMString expression, Node contextNode,
+ XPathNSResolver? resolver, unsigned short type,
+ object? result);
+};
diff --git a/dom/webidl/XPathExpression.webidl b/dom/webidl/XPathExpression.webidl
new file mode 100644
index 000000000..dd5835492
--- /dev/null
+++ b/dom/webidl/XPathExpression.webidl
@@ -0,0 +1,22 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface XPathExpression {
+ // The result specifies a specific result object which may be reused and
+ // returned by this method. If this is specified as null or it's not an
+ // XPathResult object, a new result object will be constructed and returned.
+ [Throws]
+ XPathResult evaluate(Node contextNode, unsigned short type, object? result);
+
+ // The result specifies a specific result object which may be reused and
+ // returned by this method. If this is specified as null or it's not an
+ // XPathResult object, a new result object will be constructed and returned.
+ [Throws, ChromeOnly]
+ XPathResult evaluateWithContext(Node contextNode,
+ unsigned long contextPosition,
+ unsigned long contextSize,
+ unsigned short type, object? result);
+};
diff --git a/dom/webidl/XPathNSResolver.webidl b/dom/webidl/XPathNSResolver.webidl
new file mode 100644
index 000000000..6309ff38c
--- /dev/null
+++ b/dom/webidl/XPathNSResolver.webidl
@@ -0,0 +1,10 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+callback interface XPathNSResolver
+{
+ DOMString? lookupNamespaceURI(DOMString? prefix);
+};
diff --git a/dom/webidl/XPathResult.webidl b/dom/webidl/XPathResult.webidl
new file mode 100644
index 000000000..d50063771
--- /dev/null
+++ b/dom/webidl/XPathResult.webidl
@@ -0,0 +1,38 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * Corresponds to http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020208
+ */
+
+interface XPathResult {
+ // XPathResultType
+ const unsigned short ANY_TYPE = 0;
+ const unsigned short NUMBER_TYPE = 1;
+ const unsigned short STRING_TYPE = 2;
+ const unsigned short BOOLEAN_TYPE = 3;
+ const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4;
+ const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5;
+ const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+ const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7;
+ const unsigned short ANY_UNORDERED_NODE_TYPE = 8;
+ const unsigned short FIRST_ORDERED_NODE_TYPE = 9;
+
+ readonly attribute unsigned short resultType;
+ [Throws]
+ readonly attribute double numberValue;
+ [Throws]
+ readonly attribute DOMString stringValue;
+ [Throws]
+ readonly attribute boolean booleanValue;
+ [Throws]
+ readonly attribute Node? singleNodeValue;
+ readonly attribute boolean invalidIteratorState;
+ [Throws]
+ readonly attribute unsigned long snapshotLength;
+ [Throws]
+ Node? iterateNext();
+ [Throws]
+ Node? snapshotItem(unsigned long index);
+};
diff --git a/dom/webidl/XSLTProcessor.webidl b/dom/webidl/XSLTProcessor.webidl
new file mode 100644
index 000000000..ce9ed846f
--- /dev/null
+++ b/dom/webidl/XSLTProcessor.webidl
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* 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/. */
+
+interface nsIVariant;
+
+[Constructor]
+interface XSLTProcessor {
+ /**
+ * Import the stylesheet into this XSLTProcessor for transformations.
+ *
+ * @param style The root-node of a XSLT stylesheet. This can be either
+ * a document node or an element node. If a document node
+ * then the document can contain either a XSLT stylesheet
+ * or a LRE stylesheet.
+ * If the argument is an element node it must be the
+ * xsl:stylesheet (or xsl:transform) element of an XSLT
+ * stylesheet.
+ */
+ [Throws]
+ void importStylesheet(Node style);
+
+ /**
+ * Transforms the node source applying the stylesheet given by
+ * the importStylesheet() function. The owner document of the output node
+ * owns the returned document fragment.
+ *
+ * @param source The node to be transformed
+ * @param output This document is used to generate the output
+ * @return DocumentFragment The result of the transformation
+ */
+ [Throws]
+ DocumentFragment transformToFragment(Node source,
+ Document output);
+
+ /**
+ * Transforms the node source applying the stylesheet given by the
+ * importStylesheet() function.
+ *
+ * @param source The node to be transformed
+ * @return Document The result of the transformation
+ */
+ [Throws]
+ Document transformToDocument(Node source);
+
+ /**
+ * Sets a parameter to be used in subsequent transformations with this
+ * nsIXSLTProcessor. If the parameter doesn't exist in the stylesheet the
+ * parameter will be ignored.
+ *
+ * @param namespaceURI The namespaceURI of the XSLT parameter
+ * @param localName The local name of the XSLT parameter
+ * @param value The new value of the XSLT parameter
+ */
+ [Throws]
+ void setParameter([TreatNullAs=EmptyString] DOMString namespaceURI,
+ DOMString localName,
+ any value);
+
+ /**
+ * Gets a parameter if previously set by setParameter. Returns null
+ * otherwise.
+ *
+ * @param namespaceURI The namespaceURI of the XSLT parameter
+ * @param localName The local name of the XSLT parameter
+ * @return nsIVariant The value of the XSLT parameter
+ */
+ [Throws]
+ nsIVariant? getParameter([TreatNullAs=EmptyString] DOMString namespaceURI,
+ DOMString localName);
+ /**
+ * Removes a parameter, if set. This will make the processor use the
+ * default-value for the parameter as specified in the stylesheet.
+ *
+ * @param namespaceURI The namespaceURI of the XSLT parameter
+ * @param localName The local name of the XSLT parameter
+ */
+ [Throws]
+ void removeParameter([TreatNullAs=EmptyString] DOMString namespaceURI,
+ DOMString localName);
+
+ /**
+ * Removes all set parameters from this nsIXSLTProcessor. This will make
+ * the processor use the default-value for all parameters as specified in
+ * the stylesheet.
+ */
+ void clearParameters();
+
+ /**
+ * Remove all parameters and stylesheets from this nsIXSLTProcessor.
+ */
+ void reset();
+
+ /**
+ * Disables all loading of external documents, such as from
+ * <xsl:import> and document()
+ * Defaults to off and is *not* reset by calls to reset()
+ */
+ [ChromeOnly]
+ const unsigned long DISABLE_ALL_LOADS = 1;
+
+ /**
+ * Flags for this processor. Defaults to 0. See individual flags above
+ * for documentation for effect of reset()
+ */
+ [ChromeOnly]
+ attribute unsigned long flags;
+};
diff --git a/dom/webidl/XULCommandEvent.webidl b/dom/webidl/XULCommandEvent.webidl
new file mode 100644
index 000000000..9c024edc1
--- /dev/null
+++ b/dom/webidl/XULCommandEvent.webidl
@@ -0,0 +1,27 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+[Func="IsChromeOrXBL"]
+interface XULCommandEvent : UIEvent
+{
+ readonly attribute boolean ctrlKey;
+ readonly attribute boolean shiftKey;
+ readonly attribute boolean altKey;
+ readonly attribute boolean metaKey;
+
+ readonly attribute Event? sourceEvent;
+
+ void initCommandEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ Window? view,
+ long detail,
+ boolean ctrlKey,
+ boolean altKey,
+ boolean shiftKey,
+ boolean metaKey,
+ Event? sourceEvent);
+};
diff --git a/dom/webidl/XULDocument.webidl b/dom/webidl/XULDocument.webidl
new file mode 100644
index 000000000..c974733f6
--- /dev/null
+++ b/dom/webidl/XULDocument.webidl
@@ -0,0 +1,57 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is:
+ * dom/interfaces/xul/nsIDOMXULDocument.idl
+ */
+
+interface XULCommandDispatcher;
+interface MozObserver;
+
+[Func="IsChromeOrXBL"]
+interface XULDocument : Document {
+ attribute Node? popupNode;
+
+ /**
+ * These attributes correspond to trustedGetPopupNode().rangeOffset and
+ * rangeParent. They will help you find where in the DOM the popup is
+ * happening. Can be accessed only during a popup event. Accessing any other
+ * time will be an error.
+ */
+ [Throws, ChromeOnly]
+ readonly attribute Node? popupRangeParent;
+ [Throws, ChromeOnly]
+ readonly attribute long popupRangeOffset;
+
+ attribute Node? tooltipNode;
+
+ readonly attribute XULCommandDispatcher? commandDispatcher;
+
+ [Throws]
+ readonly attribute long width;
+ [Throws]
+ readonly attribute long height;
+
+ NodeList getElementsByAttribute(DOMString name,
+ [TreatNullAs=EmptyString] DOMString value);
+ [Throws]
+ NodeList getElementsByAttributeNS(DOMString? namespaceURI, DOMString name,
+ [TreatNullAs=EmptyString] DOMString value);
+
+ [Throws]
+ void addBroadcastListenerFor(Element broadcaster, Element observer,
+ DOMString attr);
+ void removeBroadcastListenerFor(Element broadcaster, Element observer,
+ DOMString attr);
+
+ [Throws]
+ void persist([TreatNullAs=EmptyString] DOMString id, DOMString attr);
+
+ [Throws]
+ BoxObject? getBoxObjectFor(Element? element);
+
+ [Throws]
+ void loadOverlay(DOMString url, MozObserver? observer);
+};
diff --git a/dom/webidl/XULElement.webidl b/dom/webidl/XULElement.webidl
new file mode 100644
index 000000000..28c79b9a7
--- /dev/null
+++ b/dom/webidl/XULElement.webidl
@@ -0,0 +1,141 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ */
+
+interface MozControllers;
+interface MozFrameLoader;
+interface MozRDFCompositeDataSource;
+interface MozRDFResource;
+interface MozXULTemplateBuilder;
+
+[Func="IsChromeOrXBL"]
+interface XULElement : Element {
+ [SetterThrows]
+ attribute DOMString className;
+
+ // Layout properties
+ [SetterThrows]
+ attribute DOMString align;
+ [SetterThrows]
+ attribute DOMString dir;
+ [SetterThrows]
+ attribute DOMString flex;
+ [SetterThrows]
+ attribute DOMString flexGroup;
+ [SetterThrows]
+ attribute DOMString ordinal;
+ [SetterThrows]
+ attribute DOMString orient;
+ [SetterThrows]
+ attribute DOMString pack;
+
+ // Properties for hiding elements.
+ attribute boolean hidden;
+ attribute boolean collapsed;
+
+ // Property for hooking up to broadcasters
+ [SetterThrows]
+ attribute DOMString observes;
+
+ // Properties for hooking up to popups
+ [SetterThrows]
+ attribute DOMString menu;
+ [SetterThrows]
+ attribute DOMString contextMenu;
+ [SetterThrows]
+ attribute DOMString tooltip;
+
+ // Width/height properties
+ [SetterThrows]
+ attribute DOMString width;
+ [SetterThrows]
+ attribute DOMString height;
+ [SetterThrows]
+ attribute DOMString minWidth;
+ [SetterThrows]
+ attribute DOMString minHeight;
+ [SetterThrows]
+ attribute DOMString maxWidth;
+ [SetterThrows]
+ attribute DOMString maxHeight;
+
+ // Persistence
+ [SetterThrows]
+ attribute DOMString persist;
+
+ // Position properties for
+ // * popups - these are screen coordinates
+ // * other elements - these are client coordinates relative to parent stack.
+ [SetterThrows]
+ attribute DOMString left;
+ [SetterThrows]
+ attribute DOMString top;
+
+ // XUL Template Builder
+ [SetterThrows]
+ attribute DOMString datasources;
+ [SetterThrows]
+ attribute DOMString ref;
+
+ // Tooltip and status info
+ [SetterThrows]
+ attribute DOMString tooltipText;
+ [SetterThrows]
+ attribute DOMString statusText;
+
+ attribute boolean allowEvents;
+
+ readonly attribute MozRDFCompositeDataSource? database;
+ readonly attribute MozXULTemplateBuilder? builder;
+ [Throws]
+ readonly attribute MozRDFResource? resource;
+ [Throws]
+ readonly attribute MozControllers controllers;
+ [Throws]
+ readonly attribute BoxObject? boxObject;
+
+ [Throws]
+ void focus();
+ [Throws]
+ void blur();
+ [Throws]
+ void click();
+ void doCommand();
+
+ // XXXbz this isn't really a nodelist! See bug 818548
+ NodeList getElementsByAttribute(DOMString name,
+ DOMString value);
+ // XXXbz this isn't really a nodelist! See bug 818548
+ [Throws]
+ NodeList getElementsByAttributeNS(DOMString namespaceURI,
+ DOMString name,
+ DOMString value);
+ [Constant]
+ readonly attribute CSSStyleDeclaration style;
+};
+
+// And the things from nsIFrameLoaderOwner
+[NoInterfaceObject]
+interface MozFrameLoaderOwner {
+ [ChromeOnly]
+ readonly attribute MozFrameLoader? frameLoader;
+
+ [ChromeOnly]
+ void setIsPrerendered();
+
+ [ChromeOnly, Throws]
+ void presetOpenerWindow(WindowProxy? window);
+
+ [ChromeOnly, Throws]
+ void swapFrameLoaders(XULElement aOtherLoaderOwner);
+
+ [ChromeOnly, Throws]
+ void swapFrameLoaders(HTMLIFrameElement aOtherLoaderOwner);
+};
+
+XULElement implements GlobalEventHandlers;
+XULElement implements TouchEventHandlers;
+XULElement implements MozFrameLoaderOwner;
+XULElement implements OnErrorEventHandlerForNodes;
diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build
new file mode 100644
index 000000000..efa90230d
--- /dev/null
+++ b/dom/webidl/moz.build
@@ -0,0 +1,788 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+GENERATED_WEBIDL_FILES = [
+ 'CSS2Properties.webidl',
+]
+
+PREPROCESSED_WEBIDL_FILES = [
+ 'Navigator.webidl',
+ 'Node.webidl',
+ 'Promise.webidl',
+ 'PromiseDebugging.webidl',
+ 'Window.webidl',
+]
+
+WEBIDL_FILES = [
+ 'AbstractWorker.webidl',
+ 'AddonManager.webidl',
+ 'AnalyserNode.webidl',
+ 'Animatable.webidl',
+ 'Animation.webidl',
+ 'AnimationEffectReadOnly.webidl',
+ 'AnimationEffectTiming.webidl',
+ 'AnimationEffectTimingReadOnly.webidl',
+ 'AnimationEvent.webidl',
+ 'AnimationTimeline.webidl',
+ 'AnonymousContent.webidl',
+ 'AppInfo.webidl',
+ 'AppNotificationServiceOptions.webidl',
+ 'APZTestData.webidl',
+ 'ArchiveReader.webidl',
+ 'ArchiveRequest.webidl',
+ 'Attr.webidl',
+ 'AudioBuffer.webidl',
+ 'AudioBufferSourceNode.webidl',
+ 'AudioChannel.webidl',
+ 'AudioContext.webidl',
+ 'AudioDestinationNode.webidl',
+ 'AudioListener.webidl',
+ 'AudioNode.webidl',
+ 'AudioParam.webidl',
+ 'AudioProcessingEvent.webidl',
+ 'AudioStreamTrack.webidl',
+ 'AudioTrack.webidl',
+ 'AudioTrackList.webidl',
+ 'AutocompleteInfo.webidl',
+ 'BarProp.webidl',
+ 'BaseKeyframeTypes.webidl',
+ 'BatteryManager.webidl',
+ 'BeforeAfterKeyboardEvent.webidl',
+ 'BeforeUnloadEvent.webidl',
+ 'BiquadFilterNode.webidl',
+ 'Blob.webidl',
+ 'BoxObject.webidl',
+ 'BroadcastChannel.webidl',
+ 'BrowserElement.webidl',
+ 'BrowserElementAudioChannel.webidl',
+ 'BrowserElementDictionaries.webidl',
+ 'BrowserElementProxy.webidl',
+ 'Cache.webidl',
+ 'CacheStorage.webidl',
+ 'CanvasCaptureMediaStream.webidl',
+ 'CanvasRenderingContext2D.webidl',
+ 'CaretPosition.webidl',
+ 'CDATASection.webidl',
+ 'ChannelMergerNode.webidl',
+ 'ChannelSplitterNode.webidl',
+ 'CharacterData.webidl',
+ 'CheckerboardReportService.webidl',
+ 'ChildNode.webidl',
+ 'ChromeNodeList.webidl',
+ 'ChromeUtils.webidl',
+ 'Client.webidl',
+ 'Clients.webidl',
+ 'ClipboardEvent.webidl',
+ 'CommandEvent.webidl',
+ 'Comment.webidl',
+ 'CompositionEvent.webidl',
+ 'Console.webidl',
+ 'ConstantSourceNode.webidl',
+ 'ContainerBoxObject.webidl',
+ 'ConvolverNode.webidl',
+ 'Coordinates.webidl',
+ 'CreateOfferRequest.webidl',
+ 'Crypto.webidl',
+ 'CSPDictionaries.webidl',
+ 'CSPReport.webidl',
+ 'CSS.webidl',
+ 'CSSAnimation.webidl',
+ 'CSSLexer.webidl',
+ 'CSSPrimitiveValue.webidl',
+ 'CSSPseudoElement.webidl',
+ 'CSSRuleList.webidl',
+ 'CSSStyleDeclaration.webidl',
+ 'CSSStyleSheet.webidl',
+ 'CSSTransition.webidl',
+ 'CSSValue.webidl',
+ 'CSSValueList.webidl',
+ 'CustomElementRegistry.webidl',
+ 'DataContainerEvent.webidl',
+ 'DataTransfer.webidl',
+ 'DataTransferItem.webidl',
+ 'DataTransferItemList.webidl',
+ 'DecoderDoctorNotification.webidl',
+ 'DedicatedWorkerGlobalScope.webidl',
+ 'DelayNode.webidl',
+ 'DesktopNotification.webidl',
+ 'DeviceMotionEvent.webidl',
+ 'Directory.webidl',
+ 'Document.webidl',
+ 'DocumentFragment.webidl',
+ 'DocumentTimeline.webidl',
+ 'DocumentType.webidl',
+ 'DOMCursor.webidl',
+ 'DOMError.webidl',
+ 'DOMException.webidl',
+ 'DOMImplementation.webidl',
+ 'DominatorTree.webidl',
+ 'DOMMatrix.webidl',
+ 'DOMParser.webidl',
+ 'DOMPoint.webidl',
+ 'DOMQuad.webidl',
+ 'DOMRect.webidl',
+ 'DOMRectList.webidl',
+ 'DOMRequest.webidl',
+ 'DOMStringList.webidl',
+ 'DOMStringMap.webidl',
+ 'DOMTokenList.webidl',
+ 'Downloads.webidl',
+ 'DragEvent.webidl',
+ 'DynamicsCompressorNode.webidl',
+ 'Element.webidl',
+ 'Event.webidl',
+ 'EventHandler.webidl',
+ 'EventListener.webidl',
+ 'EventSource.webidl',
+ 'EventTarget.webidl',
+ 'ExtendableEvent.webidl',
+ 'ExtendableMessageEvent.webidl',
+ 'FakePluginTagInit.webidl',
+ 'Fetch.webidl',
+ 'FetchEvent.webidl',
+ 'File.webidl',
+ 'FileList.webidl',
+ 'FileMode.webidl',
+ 'FileReader.webidl',
+ 'FileReaderSync.webidl',
+ 'FileSystem.webidl',
+ 'FileSystemDirectoryEntry.webidl',
+ 'FileSystemDirectoryReader.webidl',
+ 'FileSystemEntry.webidl',
+ 'FileSystemFileEntry.webidl',
+ 'FlyWebDiscoveryManager.webidl',
+ 'FlyWebFetchEvent.webidl',
+ 'FlyWebPublish.webidl',
+ 'FlyWebWebSocketEvent.webidl',
+ 'FocusEvent.webidl',
+ 'FontFace.webidl',
+ 'FontFaceSet.webidl',
+ 'FontFaceSource.webidl',
+ 'FormData.webidl',
+ 'Function.webidl',
+ 'GainNode.webidl',
+ 'Geolocation.webidl',
+ 'GeometryUtils.webidl',
+ 'GetUserMediaRequest.webidl',
+ 'Grid.webidl',
+ 'Headers.webidl',
+ 'HeapSnapshot.webidl',
+ 'History.webidl',
+ 'HTMLAllCollection.webidl',
+ 'HTMLAnchorElement.webidl',
+ 'HTMLAppletElement.webidl',
+ 'HTMLAreaElement.webidl',
+ 'HTMLAudioElement.webidl',
+ 'HTMLBaseElement.webidl',
+ 'HTMLBodyElement.webidl',
+ 'HTMLBRElement.webidl',
+ 'HTMLButtonElement.webidl',
+ 'HTMLCanvasElement.webidl',
+ 'HTMLCollection.webidl',
+ 'HTMLContentElement.webidl',
+ 'HTMLDataElement.webidl',
+ 'HTMLDataListElement.webidl',
+ 'HTMLDetailsElement.webidl',
+ 'HTMLDirectoryElement.webidl',
+ 'HTMLDivElement.webidl',
+ 'HTMLDListElement.webidl',
+ 'HTMLDocument.webidl',
+ 'HTMLElement.webidl',
+ 'HTMLEmbedElement.webidl',
+ 'HTMLFieldSetElement.webidl',
+ 'HTMLFontElement.webidl',
+ 'HTMLFormControlsCollection.webidl',
+ 'HTMLFormElement.webidl',
+ 'HTMLFrameElement.webidl',
+ 'HTMLFrameSetElement.webidl',
+ 'HTMLHeadElement.webidl',
+ 'HTMLHeadingElement.webidl',
+ 'HTMLHRElement.webidl',
+ 'HTMLHtmlElement.webidl',
+ 'HTMLHyperlinkElementUtils.webidl',
+ 'HTMLIFrameElement.webidl',
+ 'HTMLImageElement.webidl',
+ 'HTMLInputElement.webidl',
+ 'HTMLLabelElement.webidl',
+ 'HTMLLegendElement.webidl',
+ 'HTMLLIElement.webidl',
+ 'HTMLLinkElement.webidl',
+ 'HTMLMapElement.webidl',
+ 'HTMLMediaElement.webidl',
+ 'HTMLMenuElement.webidl',
+ 'HTMLMenuItemElement.webidl',
+ 'HTMLMetaElement.webidl',
+ 'HTMLMeterElement.webidl',
+ 'HTMLModElement.webidl',
+ 'HTMLObjectElement.webidl',
+ 'HTMLOListElement.webidl',
+ 'HTMLOptGroupElement.webidl',
+ 'HTMLOptionElement.webidl',
+ 'HTMLOptionsCollection.webidl',
+ 'HTMLOutputElement.webidl',
+ 'HTMLParagraphElement.webidl',
+ 'HTMLParamElement.webidl',
+ 'HTMLPictureElement.webidl',
+ 'HTMLPreElement.webidl',
+ 'HTMLProgressElement.webidl',
+ 'HTMLQuoteElement.webidl',
+ 'HTMLScriptElement.webidl',
+ 'HTMLSelectElement.webidl',
+ 'HTMLShadowElement.webidl',
+ 'HTMLSourceElement.webidl',
+ 'HTMLSpanElement.webidl',
+ 'HTMLStyleElement.webidl',
+ 'HTMLTableCaptionElement.webidl',
+ 'HTMLTableCellElement.webidl',
+ 'HTMLTableColElement.webidl',
+ 'HTMLTableElement.webidl',
+ 'HTMLTableRowElement.webidl',
+ 'HTMLTableSectionElement.webidl',
+ 'HTMLTemplateElement.webidl',
+ 'HTMLTextAreaElement.webidl',
+ 'HTMLTimeElement.webidl',
+ 'HTMLTitleElement.webidl',
+ 'HTMLTrackElement.webidl',
+ 'HTMLUListElement.webidl',
+ 'HTMLVideoElement.webidl',
+ 'IDBCursor.webidl',
+ 'IDBDatabase.webidl',
+ 'IDBFactory.webidl',
+ 'IDBFileHandle.webidl',
+ 'IDBFileRequest.webidl',
+ 'IDBIndex.webidl',
+ 'IDBKeyRange.webidl',
+ 'IDBMutableFile.webidl',
+ 'IDBObjectStore.webidl',
+ 'IDBOpenDBRequest.webidl',
+ 'IDBRequest.webidl',
+ 'IDBTransaction.webidl',
+ 'IDBVersionChangeEvent.webidl',
+ 'IdleDeadline.webidl',
+ 'IIRFilterNode.webidl',
+ 'ImageBitmap.webidl',
+ 'ImageBitmapRenderingContext.webidl',
+ 'ImageCapture.webidl',
+ 'ImageData.webidl',
+ 'ImageDocument.webidl',
+ 'InputEvent.webidl',
+ 'InputMethod.webidl',
+ 'InspectorUtils.webidl',
+ 'IntersectionObserver.webidl',
+ 'IterableIterator.webidl',
+ 'KeyAlgorithm.webidl',
+ 'KeyboardEvent.webidl',
+ 'KeyEvent.webidl',
+ 'KeyframeAnimationOptions.webidl',
+ 'KeyframeEffect.webidl',
+ 'KeyIdsInitData.webidl',
+ 'LegacyQueryInterface.webidl',
+ 'LinkStyle.webidl',
+ 'ListBoxObject.webidl',
+ 'LocalMediaStream.webidl',
+ 'Location.webidl',
+ 'MediaDeviceInfo.webidl',
+ 'MediaDevices.webidl',
+ 'MediaElementAudioSourceNode.webidl',
+ 'MediaEncryptedEvent.webidl',
+ 'MediaError.webidl',
+ 'MediaKeyError.webidl',
+ 'MediaKeyMessageEvent.webidl',
+ 'MediaKeys.webidl',
+ 'MediaKeySession.webidl',
+ 'MediaKeysRequestStatus.webidl',
+ 'MediaKeyStatusMap.webidl',
+ 'MediaKeySystemAccess.webidl',
+ 'MediaList.webidl',
+ 'MediaQueryList.webidl',
+ 'MediaRecorder.webidl',
+ 'MediaSource.webidl',
+ 'MediaStream.webidl',
+ 'MediaStreamAudioDestinationNode.webidl',
+ 'MediaStreamAudioSourceNode.webidl',
+ 'MediaStreamError.webidl',
+ 'MediaStreamTrack.webidl',
+ 'MediaTrackConstraintSet.webidl',
+ 'MediaTrackSettings.webidl',
+ 'MediaTrackSupportedConstraints.webidl',
+ 'MenuBoxObject.webidl',
+ 'MessageChannel.webidl',
+ 'MessageEvent.webidl',
+ 'MessagePort.webidl',
+ 'MimeType.webidl',
+ 'MimeTypeArray.webidl',
+ 'MouseEvent.webidl',
+ 'MouseScrollEvent.webidl',
+ 'MozPowerManager.webidl',
+ 'MozSelfSupport.webidl',
+ 'MozTetheringManager.webidl',
+ 'MozTimeManager.webidl',
+ 'MozWakeLock.webidl',
+ 'MutationEvent.webidl',
+ 'MutationObserver.webidl',
+ 'NamedNodeMap.webidl',
+ 'NativeOSFileInternals.webidl',
+ 'NetDashboard.webidl',
+ 'NetworkInformation.webidl',
+ 'NetworkOptions.webidl',
+ 'NodeFilter.webidl',
+ 'NodeIterator.webidl',
+ 'NodeList.webidl',
+ 'Notification.webidl',
+ 'NotificationEvent.webidl',
+ 'NotifyPaintEvent.webidl',
+ 'OfflineAudioCompletionEvent.webidl',
+ 'OfflineAudioContext.webidl',
+ 'OfflineResourceList.webidl',
+ 'OffscreenCanvas.webidl',
+ 'OscillatorNode.webidl',
+ 'PaintRequest.webidl',
+ 'PaintRequestList.webidl',
+ 'PannerNode.webidl',
+ 'ParentNode.webidl',
+ 'Performance.webidl',
+ 'PerformanceEntry.webidl',
+ 'PerformanceMark.webidl',
+ 'PerformanceMeasure.webidl',
+ 'PerformanceNavigation.webidl',
+ 'PerformanceObserver.webidl',
+ 'PerformanceObserverEntryList.webidl',
+ 'PerformanceResourceTiming.webidl',
+ 'PerformanceTiming.webidl',
+ 'PeriodicWave.webidl',
+ 'Permissions.webidl',
+ 'PermissionSettings.webidl',
+ 'PermissionStatus.webidl',
+ 'Plugin.webidl',
+ 'PluginArray.webidl',
+ 'PointerEvent.webidl',
+ 'PopupBoxObject.webidl',
+ 'Position.webidl',
+ 'PositionError.webidl',
+ 'Presentation.webidl',
+ 'PresentationAvailability.webidl',
+ 'PresentationConnection.webidl',
+ 'PresentationConnectionList.webidl',
+ 'PresentationDeviceInfoManager.webidl',
+ 'PresentationReceiver.webidl',
+ 'PresentationRequest.webidl',
+ 'ProcessingInstruction.webidl',
+ 'ProfileTimelineMarker.webidl',
+ 'PushEvent.webidl',
+ 'PushManager.webidl',
+ 'PushManager.webidl',
+ 'PushMessageData.webidl',
+ 'PushSubscription.webidl',
+ 'PushSubscriptionOptions.webidl',
+ 'RadioNodeList.webidl',
+ 'Range.webidl',
+ 'Rect.webidl',
+ 'Request.webidl',
+ 'Response.webidl',
+ 'RGBColor.webidl',
+ 'RTCStatsReport.webidl',
+ 'Screen.webidl',
+ 'ScreenOrientation.webidl',
+ 'ScriptProcessorNode.webidl',
+ 'ScrollAreaEvent.webidl',
+ 'ScrollBoxObject.webidl',
+ 'Selection.webidl',
+ 'ServiceWorker.webidl',
+ 'ServiceWorkerContainer.webidl',
+ 'ServiceWorkerGlobalScope.webidl',
+ 'ServiceWorkerRegistration.webidl',
+ 'SettingChangeNotification.webidl',
+ 'SettingsManager.webidl',
+ 'ShadowRoot.webidl',
+ 'SharedWorker.webidl',
+ 'SharedWorkerGlobalScope.webidl',
+ 'SimpleGestureEvent.webidl',
+ 'SocketCommon.webidl',
+ 'SourceBuffer.webidl',
+ 'SourceBufferList.webidl',
+ 'StereoPannerNode.webidl',
+ 'Storage.webidl',
+ 'StorageEvent.webidl',
+ 'StorageManager.webidl',
+ 'StorageType.webidl',
+ 'StyleSheet.webidl',
+ 'StyleSheetList.webidl',
+ 'SubtleCrypto.webidl',
+ 'SVGAElement.webidl',
+ 'SVGAngle.webidl',
+ 'SVGAnimatedAngle.webidl',
+ 'SVGAnimatedBoolean.webidl',
+ 'SVGAnimatedEnumeration.webidl',
+ 'SVGAnimatedInteger.webidl',
+ 'SVGAnimatedLength.webidl',
+ 'SVGAnimatedLengthList.webidl',
+ 'SVGAnimatedNumber.webidl',
+ 'SVGAnimatedNumberList.webidl',
+ 'SVGAnimatedPathData.webidl',
+ 'SVGAnimatedPoints.webidl',
+ 'SVGAnimatedPreserveAspectRatio.webidl',
+ 'SVGAnimatedRect.webidl',
+ 'SVGAnimatedString.webidl',
+ 'SVGAnimatedTransformList.webidl',
+ 'SVGAnimateElement.webidl',
+ 'SVGAnimateMotionElement.webidl',
+ 'SVGAnimateTransformElement.webidl',
+ 'SVGAnimationElement.webidl',
+ 'SVGCircleElement.webidl',
+ 'SVGClipPathElement.webidl',
+ 'SVGComponentTransferFunctionElement.webidl',
+ 'SVGDefsElement.webidl',
+ 'SVGDescElement.webidl',
+ 'SVGElement.webidl',
+ 'SVGEllipseElement.webidl',
+ 'SVGFEBlendElement.webidl',
+ 'SVGFEColorMatrixElement.webidl',
+ 'SVGFEComponentTransferElement.webidl',
+ 'SVGFECompositeElement.webidl',
+ 'SVGFEConvolveMatrixElement.webidl',
+ 'SVGFEDiffuseLightingElement.webidl',
+ 'SVGFEDisplacementMapElement.webidl',
+ 'SVGFEDistantLightElement.webidl',
+ 'SVGFEDropShadowElement.webidl',
+ 'SVGFEFloodElement.webidl',
+ 'SVGFEFuncAElement.webidl',
+ 'SVGFEFuncBElement.webidl',
+ 'SVGFEFuncGElement.webidl',
+ 'SVGFEFuncRElement.webidl',
+ 'SVGFEGaussianBlurElement.webidl',
+ 'SVGFEImageElement.webidl',
+ 'SVGFEMergeElement.webidl',
+ 'SVGFEMergeNodeElement.webidl',
+ 'SVGFEMorphologyElement.webidl',
+ 'SVGFEOffsetElement.webidl',
+ 'SVGFEPointLightElement.webidl',
+ 'SVGFESpecularLightingElement.webidl',
+ 'SVGFESpotLightElement.webidl',
+ 'SVGFETileElement.webidl',
+ 'SVGFETurbulenceElement.webidl',
+ 'SVGFilterElement.webidl',
+ 'SVGFilterPrimitiveStandardAttributes.webidl',
+ 'SVGFitToViewBox.webidl',
+ 'SVGForeignObjectElement.webidl',
+ 'SVGGElement.webidl',
+ 'SVGGradientElement.webidl',
+ 'SVGGraphicsElement.webidl',
+ 'SVGImageElement.webidl',
+ 'SVGLength.webidl',
+ 'SVGLengthList.webidl',
+ 'SVGLinearGradientElement.webidl',
+ 'SVGLineElement.webidl',
+ 'SVGMarkerElement.webidl',
+ 'SVGMaskElement.webidl',
+ 'SVGMatrix.webidl',
+ 'SVGMetadataElement.webidl',
+ 'SVGMPathElement.webidl',
+ 'SVGNumber.webidl',
+ 'SVGNumberList.webidl',
+ 'SVGPathElement.webidl',
+ 'SVGPathSeg.webidl',
+ 'SVGPathSegList.webidl',
+ 'SVGPatternElement.webidl',
+ 'SVGPoint.webidl',
+ 'SVGPointList.webidl',
+ 'SVGPolygonElement.webidl',
+ 'SVGPolylineElement.webidl',
+ 'SVGPreserveAspectRatio.webidl',
+ 'SVGRadialGradientElement.webidl',
+ 'SVGRect.webidl',
+ 'SVGRectElement.webidl',
+ 'SVGScriptElement.webidl',
+ 'SVGSetElement.webidl',
+ 'SVGStopElement.webidl',
+ 'SVGStringList.webidl',
+ 'SVGStyleElement.webidl',
+ 'SVGSVGElement.webidl',
+ 'SVGSwitchElement.webidl',
+ 'SVGSymbolElement.webidl',
+ 'SVGTests.webidl',
+ 'SVGTextContentElement.webidl',
+ 'SVGTextElement.webidl',
+ 'SVGTextPathElement.webidl',
+ 'SVGTextPositioningElement.webidl',
+ 'SVGTitleElement.webidl',
+ 'SVGTransform.webidl',
+ 'SVGTransformList.webidl',
+ 'SVGTSpanElement.webidl',
+ 'SVGUnitTypes.webidl',
+ 'SVGUnitTypeValues.webidl',
+ 'SVGURIReference.webidl',
+ 'SVGUseElement.webidl',
+ 'SVGViewElement.webidl',
+ 'SVGZoomAndPan.webidl',
+ 'SVGZoomAndPanValues.webidl',
+ 'SVGZoomEvent.webidl',
+ 'SystemUpdate.webidl',
+ 'TCPServerSocket.webidl',
+ 'TCPServerSocketEvent.webidl',
+ 'TCPSocket.webidl',
+ 'TCPSocketErrorEvent.webidl',
+ 'TCPSocketEvent.webidl',
+ 'Text.webidl',
+ 'TextClause.webidl',
+ 'TextDecoder.webidl',
+ 'TextEncoder.webidl',
+ 'TextTrack.webidl',
+ 'TextTrackCue.webidl',
+ 'TextTrackCueList.webidl',
+ 'TextTrackList.webidl',
+ 'ThreadSafeChromeUtils.webidl',
+ 'TimeEvent.webidl',
+ 'TimeRanges.webidl',
+ 'Touch.webidl',
+ 'TouchEvent.webidl',
+ 'TouchList.webidl',
+ 'TransitionEvent.webidl',
+ 'TreeBoxObject.webidl',
+ 'TreeColumn.webidl',
+ 'TreeColumns.webidl',
+ 'TreeWalker.webidl',
+ 'U2F.webidl',
+ 'UDPMessageEvent.webidl',
+ 'UDPSocket.webidl',
+ 'UIEvent.webidl',
+ 'URL.webidl',
+ 'URLSearchParams.webidl',
+ 'ValidityState.webidl',
+ 'VideoPlaybackQuality.webidl',
+ 'VideoStreamTrack.webidl',
+ 'VideoTrack.webidl',
+ 'VideoTrackList.webidl',
+ 'VRDisplay.webidl',
+ 'VTTCue.webidl',
+ 'VTTRegion.webidl',
+ 'WaveShaperNode.webidl',
+ 'WebComponents.webidl',
+ 'WebGL2RenderingContext.webidl',
+ 'WebGLRenderingContext.webidl',
+ 'WebKitCSSMatrix.webidl',
+ 'WebSocket.webidl',
+ 'WheelEvent.webidl',
+ 'WidevineCDMManifest.webidl',
+ 'WifiOptions.webidl',
+ 'WindowOrWorkerGlobalScope.webidl',
+ 'WindowRoot.webidl',
+ 'Worker.webidl',
+ 'WorkerDebuggerGlobalScope.webidl',
+ 'WorkerGlobalScope.webidl',
+ 'WorkerLocation.webidl',
+ 'WorkerNavigator.webidl',
+ 'Worklet.webidl',
+ 'WorkletGlobalScope.webidl',
+ 'XMLDocument.webidl',
+ 'XMLHttpRequest.webidl',
+ 'XMLHttpRequestEventTarget.webidl',
+ 'XMLHttpRequestUpload.webidl',
+ 'XMLSerializer.webidl',
+ 'XMLStylesheetProcessingInstruction.webidl',
+ 'XPathEvaluator.webidl',
+ 'XPathExpression.webidl',
+ 'XPathNSResolver.webidl',
+ 'XPathResult.webidl',
+ 'XSLTProcessor.webidl',
+ 'XULCommandEvent.webidl',
+ 'XULDocument.webidl',
+ 'XULElement.webidl',
+]
+
+if CONFIG['MOZ_AUDIO_CHANNEL_MANAGER']:
+ WEBIDL_FILES += [
+ 'AudioChannelManager.webidl',
+ ]
+
+if CONFIG['MOZ_WEBRTC']:
+ WEBIDL_FILES += [
+ 'DataChannel.webidl',
+ 'MediaStreamList.webidl',
+ 'PeerConnectionImpl.webidl',
+ 'PeerConnectionImplEnums.webidl',
+ 'PeerConnectionObserver.webidl',
+ 'PeerConnectionObserverEnums.webidl',
+ 'RTCCertificate.webidl',
+ 'RTCConfiguration.webidl',
+ 'RTCDTMFSender.webidl',
+ 'RTCIceCandidate.webidl',
+ 'RTCIdentityAssertion.webidl',
+ 'RTCIdentityProvider.webidl',
+ 'RTCPeerConnection.webidl',
+ 'RTCPeerConnectionStatic.webidl',
+ 'RTCRtpReceiver.webidl',
+ 'RTCRtpSender.webidl',
+ 'RTCSessionDescription.webidl',
+ 'WebrtcDeprecated.webidl',
+ 'WebrtcGlobalInformation.webidl',
+ ]
+
+if CONFIG['MOZ_WEBSPEECH']:
+ WEBIDL_FILES += [
+ 'SpeechGrammar.webidl',
+ 'SpeechGrammarList.webidl',
+ 'SpeechRecognition.webidl',
+ 'SpeechRecognitionAlternative.webidl',
+ 'SpeechRecognitionError.webidl',
+ 'SpeechRecognitionEvent.webidl',
+ 'SpeechRecognitionResult.webidl',
+ 'SpeechRecognitionResultList.webidl',
+ 'SpeechSynthesis.webidl',
+ 'SpeechSynthesisErrorEvent.webidl',
+ 'SpeechSynthesisEvent.webidl',
+ 'SpeechSynthesisUtterance.webidl',
+ 'SpeechSynthesisVoice.webidl',
+ ]
+
+if CONFIG['MOZ_GAMEPAD']:
+ WEBIDL_FILES += [
+ 'Gamepad.webidl',
+ 'GamepadPose.webidl',
+ 'GamepadServiceTest.webidl'
+ ]
+
+WEBIDL_FILES += [
+ 'CloseEvent.webidl',
+ 'CustomEvent.webidl',
+ 'DeviceOrientationEvent.webidl',
+ 'HashChangeEvent.webidl',
+ 'MozSettingsEvent.webidl',
+ 'PageTransitionEvent.webidl',
+ 'PopStateEvent.webidl',
+ 'PopupBlockedEvent.webidl',
+ 'ProgressEvent.webidl',
+ 'RecordErrorEvent.webidl',
+ 'StyleRuleChangeEvent.webidl',
+ 'StyleSheetApplicableStateChangeEvent.webidl',
+ 'StyleSheetChangeEvent.webidl',
+]
+
+# We only expose our prefable test interfaces in debug builds, just to be on
+# the safe side.
+if CONFIG['MOZ_DEBUG']:
+ WEBIDL_FILES += ['TestFunctions.webidl',
+ 'TestInterfaceJS.webidl',
+ 'TestInterfaceJSDictionaries.webidl',
+ 'TestInterfaceJSMaplikeSetlikeIterable.webidl']
+
+if CONFIG['MOZ_SECUREELEMENT']:
+ WEBIDL_FILES += [
+ 'SecureElement.webidl',
+ 'SecureElementManager.webidl',
+ ]
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+ WEBIDL_FILES += [
+ 'MozNetworkStats.webidl',
+ 'MozNetworkStatsAlarm.webidl',
+ 'MozNetworkStatsData.webidl',
+ 'MozNetworkStatsInterface.webidl',
+ 'MozNetworkStatsManager.webidl',
+ 'MozSpeakerManager.webidl',
+ 'MozWifiCapabilities.webidl',
+ 'MozWifiManager.webidl',
+ 'MozWifiP2pManager.webidl',
+ ]
+else:
+ WEBIDL_FILES += [
+ 'InstallTrigger.webidl',
+ ]
+
+GENERATED_EVENTS_WEBIDL_FILES = [
+ 'AddonEvent.webidl',
+ 'AnimationPlaybackEvent.webidl',
+ 'AutocompleteErrorEvent.webidl',
+ 'BlobEvent.webidl',
+ 'CaretStateChangedEvent.webidl',
+ 'CloseEvent.webidl',
+ 'DeviceLightEvent.webidl',
+ 'DeviceOrientationEvent.webidl',
+ 'DeviceProximityEvent.webidl',
+ 'DownloadEvent.webidl',
+ 'ErrorEvent.webidl',
+ 'FontFaceSetLoadEvent.webidl',
+ 'HashChangeEvent.webidl',
+ 'HiddenPluginEvent.webidl',
+ 'ImageCaptureErrorEvent.webidl',
+ 'MediaStreamEvent.webidl',
+ 'MediaStreamTrackEvent.webidl',
+ 'MozSettingsEvent.webidl',
+ 'MozSettingsTransactionEvent.webidl',
+ 'PageTransitionEvent.webidl',
+ 'PerformanceEntryEvent.webidl',
+ 'PluginCrashedEvent.webidl',
+ 'PopStateEvent.webidl',
+ 'PopupBlockedEvent.webidl',
+ 'PresentationConnectionAvailableEvent.webidl',
+ 'PresentationConnectionCloseEvent.webidl',
+ 'ProgressEvent.webidl',
+ 'RecordErrorEvent.webidl',
+ 'ScrollViewChangeEvent.webidl',
+ 'ServiceWorkerMessageEvent.webidl',
+ 'StyleRuleChangeEvent.webidl',
+ 'StyleSheetApplicableStateChangeEvent.webidl',
+ 'StyleSheetChangeEvent.webidl',
+ 'TCPServerSocketEvent.webidl',
+ 'TCPSocketErrorEvent.webidl',
+ 'TCPSocketEvent.webidl',
+ 'TrackEvent.webidl',
+ 'UDPMessageEvent.webidl',
+ 'UserProximityEvent.webidl',
+ 'WebGLContextEvent.webidl',
+]
+
+if CONFIG['MOZ_WEBRTC']:
+ GENERATED_EVENTS_WEBIDL_FILES += [
+ 'RTCDataChannelEvent.webidl',
+ 'RTCDTMFToneChangeEvent.webidl',
+ 'RTCPeerConnectionIceEvent.webidl',
+ 'RTCTrackEvent.webidl',
+ ]
+
+if CONFIG['MOZ_WEBSPEECH']:
+ GENERATED_EVENTS_WEBIDL_FILES += [
+ 'SpeechRecognitionEvent.webidl',
+ 'SpeechSynthesisErrorEvent.webidl',
+ 'SpeechSynthesisEvent.webidl',
+ ]
+
+if CONFIG['MOZ_GAMEPAD']:
+ GENERATED_EVENTS_WEBIDL_FILES += [
+ 'GamepadAxisMoveEvent.webidl',
+ 'GamepadButtonEvent.webidl',
+ 'GamepadEvent.webidl',
+ ]
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+ GENERATED_EVENTS_WEBIDL_FILES += [
+ 'MozWifiConnectionInfoEvent.webidl',
+ 'MozWifiP2pStatusChangeEvent.webidl',
+ 'MozWifiStationInfoEvent.webidl',
+ 'MozWifiStatusChangeEvent.webidl',
+ ]
+
+if CONFIG['MOZ_BUILD_APP'] in ['browser', 'xulrunner'] or CONFIG['MOZ_SUITE']:
+ WEBIDL_FILES += [
+ 'BrowserFeedWriter.webidl',
+ ]
+
+if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
+ WEBIDL_FILES += [
+ 'External.webidl',
+ ]
+
+if CONFIG['MOZ_B2G']:
+ WEBIDL_FILES += [
+ 'MozApplicationEvent.webidl'
+ ]
+ GENERATED_EVENTS_WEBIDL_FILES += [
+ 'MozApplicationEvent.webidl'
+ ]
+
+if CONFIG['ACCESSIBILITY']:
+ WEBIDL_FILES += [
+ 'AccessibleNode.webidl',
+ ]