From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- dom/webidl/APZTestData.webidl | 92 ++ dom/webidl/AbortController.webidl | 18 + dom/webidl/AbortSignal.webidl | 21 + dom/webidl/AbstractRange.webidl | 22 + dom/webidl/AbstractWorker.webidl | 10 + dom/webidl/AccessibilityRole.webidl | 16 + dom/webidl/AccessibleNode.webidl | 80 ++ dom/webidl/AddonEvent.webidl | 11 + dom/webidl/AddonManager.webidl | 106 ++ dom/webidl/AnalyserNode.webidl | 51 + dom/webidl/Animatable.webidl | 27 + dom/webidl/Animation.webidl | 70 ++ dom/webidl/AnimationEffect.webidl | 66 ++ dom/webidl/AnimationEvent.webidl | 27 + dom/webidl/AnimationFrameProvider.webidl | 15 + dom/webidl/AnimationPlaybackEvent.webidl | 26 + dom/webidl/AnimationTimeline.webidl | 18 + dom/webidl/AnonymousContent.webidl | 100 ++ dom/webidl/AppInfo.webidl | 12 + dom/webidl/AppNotificationServiceOptions.webidl | 19 + dom/webidl/AriaAttributes.webidl | 136 +++ dom/webidl/Attr.webidl | 33 + dom/webidl/AudioBuffer.webidl | 40 + dom/webidl/AudioBufferSourceNode.webidl | 44 + dom/webidl/AudioContext.webidl | 48 + dom/webidl/AudioDestinationNode.webidl | 19 + dom/webidl/AudioListener.webidl | 19 + dom/webidl/AudioNode.webidl | 75 ++ dom/webidl/AudioParam.webidl | 65 ++ dom/webidl/AudioParamDescriptor.webidl | 22 + dom/webidl/AudioParamMap.webidl | 17 + dom/webidl/AudioProcessingEvent.webidl | 24 + dom/webidl/AudioScheduledSourceNode.webidl | 21 + dom/webidl/AudioTrack.webidl | 18 + dom/webidl/AudioTrackList.webidl | 20 + dom/webidl/AudioWorklet.webidl | 15 + dom/webidl/AudioWorkletGlobalScope.webidl | 19 + dom/webidl/AudioWorkletNode.webidl | 33 + dom/webidl/AudioWorkletProcessor.webidl | 19 + dom/webidl/AutocompleteInfo.webidl | 18 + dom/webidl/BarProp.webidl | 12 + dom/webidl/BaseAudioContext.webidl | 102 ++ dom/webidl/BaseKeyframeTypes.webidl | 62 + dom/webidl/BasicCardPayment.webidl | 39 + dom/webidl/BatteryManager.webidl | 24 + dom/webidl/BeforeUnloadEvent.webidl | 13 + dom/webidl/BiquadFilterNode.webidl | 53 + dom/webidl/Blob.webidl | 50 + dom/webidl/BlobEvent.webidl | 20 + dom/webidl/BroadcastChannel.webidl | 24 + dom/webidl/BrowserElementDictionaries.webidl | 23 + dom/webidl/CDATASection.webidl | 9 + dom/webidl/CSPDictionaries.webidl | 40 + dom/webidl/CSPReport.webidl | 33 + dom/webidl/CSS.webidl | 30 + dom/webidl/CSS2Properties.webidl.in | 4 + dom/webidl/CSSAnimation.webidl | 18 + dom/webidl/CSSConditionRule.webidl | 14 + dom/webidl/CSSContainerRule.webidl | 18 + dom/webidl/CSSCounterStyleRule.webidl | 24 + dom/webidl/CSSFontFaceRule.webidl | 16 + dom/webidl/CSSFontFeatureValuesRule.webidl | 30 + dom/webidl/CSSFontPaletteValuesRule.webidl | 16 + dom/webidl/CSSGroupingRule.webidl | 18 + dom/webidl/CSSImportRule.webidl | 21 + dom/webidl/CSSKeyframeRule.webidl | 15 + dom/webidl/CSSKeyframesRule.webidl | 22 + dom/webidl/CSSLayerBlockRule.webidl | 12 + dom/webidl/CSSLayerStatementRule.webidl | 14 + dom/webidl/CSSMediaRule.webidl | 18 + dom/webidl/CSSMozDocumentRule.webidl | 11 + dom/webidl/CSSNamespaceRule.webidl | 15 + dom/webidl/CSSPageRule.webidl | 17 + dom/webidl/CSSPropertyRule.webidl | 17 + dom/webidl/CSSPseudoElement.webidl | 18 + dom/webidl/CSSRule.webidl | 59 + dom/webidl/CSSRuleList.webidl | 11 + dom/webidl/CSSStyleDeclaration.webidl | 33 + dom/webidl/CSSStyleRule.webidl | 15 + dom/webidl/CSSStyleSheet.webidl | 49 + dom/webidl/CSSSupportsRule.webidl | 13 + dom/webidl/CSSTransition.webidl | 18 + dom/webidl/Cache.webidl | 40 + dom/webidl/CacheStorage.webidl | 37 + dom/webidl/CancelContentJSOptions.webidl | 10 + dom/webidl/CanvasCaptureMediaStream.webidl | 18 + dom/webidl/CanvasRenderingContext2D.webidl | 399 +++++++ dom/webidl/CaretPosition.webidl | 21 + dom/webidl/CaretStateChangedEvent.webidl | 50 + dom/webidl/ChannelMergerNode.webidl | 23 + dom/webidl/ChannelSplitterNode.webidl | 23 + dom/webidl/CharacterData.webidl | 32 + dom/webidl/CheckerboardReportService.webidl | 60 + dom/webidl/ChildNode.webidl | 26 + dom/webidl/ChildSHistory.webidl | 39 + dom/webidl/ChromeNodeList.webidl | 16 + dom/webidl/Client.webidl | 53 + dom/webidl/Clients.webidl | 36 + dom/webidl/Clipboard.webidl | 67 ++ dom/webidl/ClipboardEvent.webidl | 26 + dom/webidl/CloseEvent.webidl | 29 + dom/webidl/CommandEvent.webidl | 10 + dom/webidl/Comment.webidl | 17 + dom/webidl/CompositionEvent.webidl | 41 + dom/webidl/CompressionStream.webidl | 21 + dom/webidl/Console.webidl | 246 ++++ dom/webidl/ConstantSourceNode.webidl | 24 + .../ContentVisibilityAutoStateChangeEvent.webidl | 18 + dom/webidl/ConvolverNode.webidl | 32 + dom/webidl/CreateOfferRequest.webidl | 17 + dom/webidl/CredentialManagement.webidl | 50 + dom/webidl/Crypto.webidl | 25 + dom/webidl/CustomElementRegistry.webidl | 64 + dom/webidl/CustomEvent.webidl | 30 + dom/webidl/DOMException.webidl | 109 ++ dom/webidl/DOMImplementation.webidl | 27 + dom/webidl/DOMLocalization.webidl | 166 +++ dom/webidl/DOMMatrix.webidl | 186 +++ dom/webidl/DOMParser.webidl | 49 + dom/webidl/DOMPoint.webidl | 54 + dom/webidl/DOMQuad.webidl | 37 + dom/webidl/DOMRect.webidl | 57 + dom/webidl/DOMRectList.webidl | 11 + dom/webidl/DOMRequest.webidl | 32 + dom/webidl/DOMStringList.webidl | 18 + dom/webidl/DOMStringMap.webidl | 22 + dom/webidl/DOMTokenList.webidl | 34 + dom/webidl/DataTransfer.webidl | 192 +++ dom/webidl/DataTransferItem.webidl | 28 + dom/webidl/DataTransferItemList.webidl | 22 + dom/webidl/DecoderDoctorNotification.webidl | 44 + dom/webidl/DecompressionStream.webidl | 15 + dom/webidl/DedicatedWorkerGlobalScope.webidl | 39 + dom/webidl/DelayNode.webidl | 29 + dom/webidl/DeviceLightEvent.webidl | 19 + dom/webidl/DeviceMotionEvent.webidl | 68 ++ dom/webidl/DeviceOrientationEvent.webidl | 35 + dom/webidl/Directory.webidl | 55 + dom/webidl/Document.webidl | 735 ++++++++++++ dom/webidl/DocumentFragment.webidl | 30 + dom/webidl/DocumentOrShadowRoot.webidl | 50 + dom/webidl/DocumentTimeline.webidl | 22 + dom/webidl/DocumentType.webidl | 20 + dom/webidl/DragEvent.webidl | 38 + dom/webidl/DynamicsCompressorNode.webidl | 39 + dom/webidl/Element.webidl | 406 +++++++ dom/webidl/ElementInternals.webidl | 61 + dom/webidl/ErrorEvent.webidl | 29 + dom/webidl/Event.webidl | 107 ++ dom/webidl/EventHandler.webidl | 184 +++ dom/webidl/EventListener.webidl | 16 + dom/webidl/EventSource.webidl | 39 + dom/webidl/EventTarget.webidl | 73 ++ dom/webidl/ExtendableEvent.webidl | 21 + dom/webidl/ExtendableMessageEvent.webidl | 46 + dom/webidl/ExtensionAlarms.webidl | 58 + dom/webidl/ExtensionBrowser.webidl | 76 ++ dom/webidl/ExtensionBrowserSettings.webidl | 93 ++ .../ExtensionBrowserSettingsColorManagement.webidl | 41 + dom/webidl/ExtensionDns.webidl | 35 + dom/webidl/ExtensionEventManager.webidl | 34 + dom/webidl/ExtensionMockAPI.webidl | 55 + dom/webidl/ExtensionPort.webidl | 48 + dom/webidl/ExtensionProxy.webidl | 38 + dom/webidl/ExtensionRuntime.webidl | 102 ++ dom/webidl/ExtensionScripting.webidl | 53 + dom/webidl/ExtensionSetting.webidl | 42 + dom/webidl/ExtensionTest.webidl | 86 ++ dom/webidl/External.webidl | 12 + dom/webidl/FailedCertSecurityInfo.webidl | 31 + dom/webidl/FakePluginTagInit.webidl | 48 + dom/webidl/FeaturePolicy.webidl | 27 + dom/webidl/Fetch.webidl | 41 + dom/webidl/FetchEvent.webidl | 30 + dom/webidl/FetchObserver.webidl | 28 + dom/webidl/File.webidl | 60 + dom/webidl/FileList.webidl | 17 + dom/webidl/FileMode.webidl | 5 + dom/webidl/FileReader.webidl | 48 + dom/webidl/FileReaderSync.webidl | 27 + dom/webidl/FileSystem.webidl | 22 + dom/webidl/FileSystemDirectoryEntry.webidl | 22 + dom/webidl/FileSystemDirectoryHandle.webidl | 34 + dom/webidl/FileSystemDirectoryIterator.webidl | 12 + dom/webidl/FileSystemDirectoryReader.webidl | 19 + dom/webidl/FileSystemEntry.webidl | 24 + dom/webidl/FileSystemFileEntry.webidl | 16 + dom/webidl/FileSystemFileHandle.webidl | 20 + dom/webidl/FileSystemHandle.webidl | 26 + dom/webidl/FileSystemSyncAccessHandle.webidl | 20 + dom/webidl/FileSystemWritableFileStream.webidl | 30 + dom/webidl/FinalizationRegistry.webidl | 10 + dom/webidl/FocusEvent.webidl | 24 + dom/webidl/FontFace.webidl | 63 + dom/webidl/FontFaceSet.webidl | 66 ++ dom/webidl/FontFaceSetLoadEvent.webidl | 24 + dom/webidl/FontFaceSource.webidl | 16 + dom/webidl/FormData.webidl | 30 + dom/webidl/FormDataEvent.webidl | 21 + dom/webidl/FrameCrashedEvent.webidl | 37 + dom/webidl/Function.webidl | 15 + dom/webidl/FuzzingFunctions.webidl | 135 +++ dom/webidl/GPUUncapturedErrorEvent.webidl | 19 + dom/webidl/GainNode.webidl | 28 + dom/webidl/Gamepad.webidl | 114 ++ dom/webidl/GamepadAxisMoveEvent.webidl | 22 + dom/webidl/GamepadButtonEvent.webidl | 21 + dom/webidl/GamepadEvent.webidl | 23 + dom/webidl/GamepadHapticActuator.webidl | 23 + dom/webidl/GamepadLightIndicator.webidl | 28 + dom/webidl/GamepadPose.webidl | 32 + dom/webidl/GamepadServiceTest.webidl | 58 + dom/webidl/GamepadTouch.webidl | 17 + dom/webidl/GenericTransformStream.webidl | 13 + dom/webidl/Geolocation.webidl | 36 + dom/webidl/GeolocationCoordinates.webidl | 22 + dom/webidl/GeolocationPosition.webidl | 17 + dom/webidl/GeolocationPositionError.webidl | 20 + dom/webidl/GeometryUtils.webidl | 54 + dom/webidl/GetUserMediaRequest.webidl | 42 + dom/webidl/Grid.webidl | 134 +++ dom/webidl/HTMLAllCollection.webidl | 14 + dom/webidl/HTMLAnchorElement.webidl | 54 + dom/webidl/HTMLAreaElement.webidl | 46 + dom/webidl/HTMLAudioElement.webidl | 18 + dom/webidl/HTMLBRElement.webidl | 39 + dom/webidl/HTMLBaseElement.webidl | 23 + dom/webidl/HTMLBodyElement.webidl | 35 + dom/webidl/HTMLButtonElement.webidl | 50 + dom/webidl/HTMLCanvasElement.webidl | 69 ++ dom/webidl/HTMLCollection.webidl | 19 + dom/webidl/HTMLDListElement.webidl | 26 + dom/webidl/HTMLDataElement.webidl | 16 + dom/webidl/HTMLDataListElement.webidl | 19 + dom/webidl/HTMLDetailsElement.webidl | 20 + dom/webidl/HTMLDialogElement.webidl | 28 + dom/webidl/HTMLDirectoryElement.webidl | 21 + dom/webidl/HTMLDivElement.webidl | 22 + dom/webidl/HTMLDocument.webidl | 44 + dom/webidl/HTMLElement.webidl | 121 ++ dom/webidl/HTMLEmbedElement.webidl | 47 + dom/webidl/HTMLFieldSetElement.webidl | 37 + dom/webidl/HTMLFontElement.webidl | 21 + dom/webidl/HTMLFormControlsCollection.webidl | 18 + dom/webidl/HTMLFormElement.webidl | 59 + dom/webidl/HTMLFrameElement.webidl | 40 + dom/webidl/HTMLFrameSetElement.webidl | 24 + dom/webidl/HTMLHRElement.webidl | 33 + dom/webidl/HTMLHeadElement.webidl | 18 + dom/webidl/HTMLHeadingElement.webidl | 25 + dom/webidl/HTMLHtmlElement.webidl | 25 + dom/webidl/HTMLHyperlinkElementUtils.webidl | 36 + dom/webidl/HTMLIFrameElement.webidl | 73 ++ dom/webidl/HTMLImageElement.webidl | 134 +++ dom/webidl/HTMLInputElement.webidl | 283 +++++ dom/webidl/HTMLLIElement.webidl | 28 + dom/webidl/HTMLLabelElement.webidl | 22 + dom/webidl/HTMLLegendElement.webidl | 27 + dom/webidl/HTMLLinkElement.webidl | 65 ++ dom/webidl/HTMLMapElement.webidl | 24 + dom/webidl/HTMLMarqueeElement.webidl | 37 + dom/webidl/HTMLMediaElement.webidl | 293 +++++ dom/webidl/HTMLMenuElement.webidl | 25 + dom/webidl/HTMLMetaElement.webidl | 33 + dom/webidl/HTMLMeterElement.webidl | 32 + dom/webidl/HTMLModElement.webidl | 22 + dom/webidl/HTMLOListElement.webidl | 32 + dom/webidl/HTMLObjectElement.webidl | 165 +++ dom/webidl/HTMLOptGroupElement.webidl | 22 + dom/webidl/HTMLOptionElement.webidl | 33 + dom/webidl/HTMLOptionsCollection.webidl | 24 + dom/webidl/HTMLOutputElement.webidl | 41 + dom/webidl/HTMLParagraphElement.webidl | 25 + dom/webidl/HTMLParamElement.webidl | 32 + dom/webidl/HTMLPictureElement.webidl | 11 + dom/webidl/HTMLPreElement.webidl | 25 + dom/webidl/HTMLProgressElement.webidl | 24 + dom/webidl/HTMLQuoteElement.webidl | 21 + dom/webidl/HTMLScriptElement.webidl | 49 + dom/webidl/HTMLSelectElement.webidl | 78 ++ dom/webidl/HTMLSlotElement.webidl | 27 + dom/webidl/HTMLSourceElement.webidl | 37 + dom/webidl/HTMLSpanElement.webidl | 18 + dom/webidl/HTMLStyleElement.webidl | 34 + dom/webidl/HTMLTableCaptionElement.webidl | 22 + dom/webidl/HTMLTableCellElement.webidl | 55 + dom/webidl/HTMLTableColElement.webidl | 33 + dom/webidl/HTMLTableElement.webidl | 64 + dom/webidl/HTMLTableRowElement.webidl | 39 + dom/webidl/HTMLTableSectionElement.webidl | 34 + dom/webidl/HTMLTemplateElement.webidl | 17 + dom/webidl/HTMLTextAreaElement.webidl | 94 ++ dom/webidl/HTMLTimeElement.webidl | 16 + dom/webidl/HTMLTitleElement.webidl | 16 + dom/webidl/HTMLTrackElement.webidl | 34 + dom/webidl/HTMLUListElement.webidl | 28 + dom/webidl/HTMLVideoElement.webidl | 84 ++ dom/webidl/HashChangeEvent.webidl | 30 + dom/webidl/Headers.webidl | 37 + dom/webidl/Highlight.webidl | 71 ++ dom/webidl/History.webidl | 34 + dom/webidl/IDBCursor.webidl | 44 + dom/webidl/IDBDatabase.webidl | 35 + dom/webidl/IDBFactory.webidl | 64 + dom/webidl/IDBIndex.webidl | 63 + dom/webidl/IDBKeyRange.webidl | 41 + dom/webidl/IDBObjectStore.webidl | 67 ++ dom/webidl/IDBOpenDBRequest.webidl | 15 + dom/webidl/IDBRequest.webidl | 31 + dom/webidl/IDBTransaction.webidl | 47 + dom/webidl/IDBVersionChangeEvent.webidl | 25 + dom/webidl/IIRFilterNode.webidl | 27 + dom/webidl/IdentityCredential.webidl | 92 ++ dom/webidl/IdleDeadline.webidl | 15 + dom/webidl/ImageBitmap.webidl | 403 +++++++ dom/webidl/ImageBitmapRenderingContext.webidl | 43 + dom/webidl/ImageCapture.webidl | 33 + dom/webidl/ImageCaptureErrorEvent.webidl | 35 + dom/webidl/ImageData.webidl | 28 + dom/webidl/ImageDocument.webidl | 21 + dom/webidl/InputEvent.webidl | 53 + dom/webidl/InstallTrigger.webidl | 94 ++ dom/webidl/IntersectionObserver.webidl | 61 + dom/webidl/IntlUtils.webidl | 83 ++ dom/webidl/IterableIterator.webidl | 17 + dom/webidl/KeyAlgorithm.webidl | 41 + dom/webidl/KeyEvent.webidl | 250 ++++ dom/webidl/KeyIdsInitData.webidl | 12 + dom/webidl/KeyboardEvent.webidl | 76 ++ dom/webidl/KeyframeAnimationOptions.webidl | 14 + dom/webidl/KeyframeEffect.webidl | 66 ++ dom/webidl/LinkStyle.webidl | 12 + dom/webidl/LoadURIOptions.webidl | 102 ++ dom/webidl/Localization.webidl | 158 +++ dom/webidl/Location.webidl | 47 + dom/webidl/Lock.webidl | 5 + dom/webidl/LockManager.webidl | 35 + dom/webidl/MIDIAccess.webidl | 17 + dom/webidl/MIDIConnectionEvent.webidl | 24 + dom/webidl/MIDIInput.webidl | 14 + dom/webidl/MIDIInputMap.webidl | 14 + dom/webidl/MIDIMessageEvent.webidl | 25 + dom/webidl/MIDIOptions.webidl | 13 + dom/webidl/MIDIOutput.webidl | 16 + dom/webidl/MIDIOutputMap.webidl | 14 + dom/webidl/MIDIPort.webidl | 41 + dom/webidl/MathMLElement.webidl | 19 + dom/webidl/MediaCapabilities.webidl | 87 ++ dom/webidl/MediaDebugInfo.webidl | 235 ++++ dom/webidl/MediaDeviceInfo.webidl | 25 + dom/webidl/MediaDevices.webidl | 40 + dom/webidl/MediaElementAudioSourceNode.webidl | 27 + dom/webidl/MediaEncryptedEvent.webidl | 27 + dom/webidl/MediaError.webidl | 25 + dom/webidl/MediaKeyError.webidl | 19 + dom/webidl/MediaKeyMessageEvent.webidl | 33 + dom/webidl/MediaKeySession.webidl | 46 + dom/webidl/MediaKeyStatusMap.webidl | 30 + dom/webidl/MediaKeySystemAccess.webidl | 43 + dom/webidl/MediaKeys.webidl | 38 + dom/webidl/MediaKeysRequestStatus.webidl | 23 + dom/webidl/MediaList.webidl | 18 + dom/webidl/MediaQueryList.webidl | 26 + dom/webidl/MediaQueryListEvent.webidl | 21 + dom/webidl/MediaRecorder.webidl | 54 + dom/webidl/MediaRecorderErrorEvent.webidl | 22 + dom/webidl/MediaSession.webidl | 85 ++ dom/webidl/MediaSource.webidl | 51 + dom/webidl/MediaStream.webidl | 59 + dom/webidl/MediaStreamAudioDestinationNode.webidl | 21 + dom/webidl/MediaStreamAudioSourceNode.webidl | 28 + dom/webidl/MediaStreamError.webidl | 22 + dom/webidl/MediaStreamEvent.webidl | 20 + dom/webidl/MediaStreamTrack.webidl | 120 ++ dom/webidl/MediaStreamTrackAudioSourceNode.webidl | 25 + dom/webidl/MediaStreamTrackEvent.webidl | 20 + dom/webidl/MediaTrackSettings.webidl | 38 + dom/webidl/MediaTrackSupportedConstraints.webidl | 43 + dom/webidl/MerchantValidationEvent.webidl | 31 + dom/webidl/MessageChannel.webidl | 17 + dom/webidl/MessageEvent.webidl | 65 ++ dom/webidl/MessagePort.webidl | 28 + dom/webidl/MimeType.webidl | 13 + dom/webidl/MimeTypeArray.webidl | 13 + dom/webidl/MouseEvent.webidl | 139 +++ dom/webidl/MouseScrollEvent.webidl | 31 + dom/webidl/MozApplicationEvent.webidl | 20 + dom/webidl/MozFrameLoaderOwner.webidl | 45 + dom/webidl/MutationEvent.webidl | 36 + dom/webidl/MutationObserver.webidl | 78 ++ dom/webidl/NamedNodeMap.webidl | 23 + dom/webidl/NavigationPreloadManager.webidl | 26 + dom/webidl/Navigator.webidl | 371 ++++++ dom/webidl/NetErrorInfo.webidl | 14 + dom/webidl/NetworkInformation.webidl | 26 + dom/webidl/NetworkOptions.webidl | 109 ++ dom/webidl/Node.webidl | 139 +++ dom/webidl/NodeFilter.webidl | 33 + dom/webidl/NodeIterator.webidl | 32 + dom/webidl/NodeList.webidl | 19 + dom/webidl/Notification.webidl | 107 ++ dom/webidl/NotificationEvent.webidl | 24 + dom/webidl/NotifyPaintEvent.webidl | 38 + dom/webidl/OfflineAudioCompletionEvent.webidl | 23 + dom/webidl/OfflineAudioContext.webidl | 35 + dom/webidl/OffscreenCanvas.webidl | 45 + .../OffscreenCanvasRenderingContext2D.webidl | 31 + dom/webidl/OscillatorNode.webidl | 45 + dom/webidl/PageTransitionEvent.webidl | 35 + dom/webidl/PaintRequest.webidl | 25 + dom/webidl/PaintRequestList.webidl | 11 + dom/webidl/PaintWorkletGlobalScope.webidl | 13 + dom/webidl/PannerNode.webidl | 84 ++ dom/webidl/ParentNode.webidl | 33 + dom/webidl/PaymentAddress.webidl | 33 + dom/webidl/PaymentMethodChangeEvent.webidl | 27 + dom/webidl/PaymentRequest.webidl | 132 +++ dom/webidl/PaymentRequestUpdateEvent.webidl | 25 + dom/webidl/PaymentResponse.webidl | 42 + dom/webidl/PeerConnectionImpl.webidl | 134 +++ dom/webidl/PeerConnectionObserver.webidl | 56 + dom/webidl/PeerConnectionObserverEnums.webidl | 29 + dom/webidl/Performance.webidl | 97 ++ dom/webidl/PerformanceEntry.webidl | 22 + dom/webidl/PerformanceEntryEvent.webidl | 30 + dom/webidl/PerformanceEventTiming.webidl | 28 + .../PerformanceLargestContentfulPaint.webidl | 23 + dom/webidl/PerformanceMark.webidl | 16 + dom/webidl/PerformanceMeasure.webidl | 14 + dom/webidl/PerformanceNavigation.webidl | 24 + dom/webidl/PerformanceNavigationTiming.webidl | 35 + dom/webidl/PerformanceObserver.webidl | 31 + dom/webidl/PerformanceObserverEntryList.webidl | 24 + dom/webidl/PerformancePaintTiming.webidl | 16 + dom/webidl/PerformanceResourceTiming.webidl | 58 + dom/webidl/PerformanceServerTiming.webidl | 20 + dom/webidl/PerformanceTiming.webidl | 60 + dom/webidl/PeriodicWave.webidl | 28 + dom/webidl/PermissionStatus.webidl | 21 + dom/webidl/Permissions.webidl | 37 + dom/webidl/Plugin.webidl | 17 + dom/webidl/PluginArray.webidl | 14 + dom/webidl/PluginCrashedEvent.webidl | 30 + dom/webidl/PointerEvent.webidl | 47 + dom/webidl/PopStateEvent.webidl | 18 + dom/webidl/PopoverInvokerElement.webidl | 13 + dom/webidl/PopupBlockedEvent.webidl | 26 + dom/webidl/PopupPositionedEvent.webidl | 24 + dom/webidl/PositionStateEvent.webidl | 19 + dom/webidl/ProcessingInstruction.webidl | 21 + dom/webidl/ProfileTimelineMarker.webidl | 76 ++ dom/webidl/ProgressEvent.webidl | 22 + dom/webidl/Promise.webidl | 19 + dom/webidl/PromiseRejectionEvent.webidl | 23 + dom/webidl/PushEvent.webidl | 23 + dom/webidl/PushManager.webidl | 40 + dom/webidl/PushMessageData.webidl | 21 + dom/webidl/PushSubscription.webidl | 61 + dom/webidl/PushSubscriptionOptions.webidl | 15 + dom/webidl/QueuingStrategy.webidl | 40 + dom/webidl/RTCCertificate.webidl | 19 + dom/webidl/RTCConfiguration.webidl | 44 + dom/webidl/RTCDTMFSender.webidl | 18 + dom/webidl/RTCDTMFToneChangeEvent.webidl | 20 + dom/webidl/RTCDataChannel.webidl | 46 + dom/webidl/RTCDataChannelEvent.webidl | 20 + dom/webidl/RTCDtlsTransport.webidl | 23 + dom/webidl/RTCIceCandidate.webidl | 29 + dom/webidl/RTCIdentityAssertion.webidl | 13 + dom/webidl/RTCIdentityProvider.webidl | 65 ++ dom/webidl/RTCPeerConnection.webidl | 205 ++++ dom/webidl/RTCPeerConnectionIceEvent.webidl | 21 + dom/webidl/RTCPeerConnectionStatic.webidl | 41 + dom/webidl/RTCRtpCapabilities.webidl | 27 + dom/webidl/RTCRtpParameters.webidl | 76 ++ dom/webidl/RTCRtpReceiver.webidl | 34 + dom/webidl/RTCRtpSender.webidl | 33 + dom/webidl/RTCRtpSources.webidl | 29 + dom/webidl/RTCRtpTransceiver.webidl | 48 + dom/webidl/RTCSctpTransport.webidl | 24 + dom/webidl/RTCSessionDescription.webidl | 34 + dom/webidl/RTCStatsReport.webidl | 334 ++++++ dom/webidl/RTCTrackEvent.webidl | 31 + dom/webidl/RadioNodeList.webidl | 18 + dom/webidl/Range.webidl | 96 ++ dom/webidl/ReadableByteStreamController.webidl | 25 + dom/webidl/ReadableStream.webidl | 56 + dom/webidl/ReadableStreamBYOBReader.webidl | 21 + dom/webidl/ReadableStreamBYOBRequest.webidl | 19 + dom/webidl/ReadableStreamDefaultController.webidl | 22 + dom/webidl/ReadableStreamDefaultReader.webidl | 39 + dom/webidl/ReferrerPolicy.webidl | 19 + dom/webidl/Reporting.webidl | 99 ++ dom/webidl/Request.webidl | 80 ++ dom/webidl/ResizeObserver.webidl | 50 + dom/webidl/Response.webidl | 57 + dom/webidl/SVGAElement.webidl | 36 + dom/webidl/SVGAngle.webidl | 35 + dom/webidl/SVGAnimateElement.webidl | 15 + dom/webidl/SVGAnimateMotionElement.webidl | 15 + dom/webidl/SVGAnimateTransformElement.webidl | 15 + dom/webidl/SVGAnimatedAngle.webidl | 19 + dom/webidl/SVGAnimatedBoolean.webidl | 17 + dom/webidl/SVGAnimatedEnumeration.webidl | 18 + dom/webidl/SVGAnimatedInteger.webidl | 17 + dom/webidl/SVGAnimatedLength.webidl | 19 + dom/webidl/SVGAnimatedLengthList.webidl | 19 + dom/webidl/SVGAnimatedNumber.webidl | 17 + dom/webidl/SVGAnimatedNumberList.webidl | 19 + dom/webidl/SVGAnimatedPathData.webidl | 18 + dom/webidl/SVGAnimatedPoints.webidl | 18 + dom/webidl/SVGAnimatedPreserveAspectRatio.webidl | 19 + dom/webidl/SVGAnimatedRect.webidl | 17 + dom/webidl/SVGAnimatedString.webidl | 17 + dom/webidl/SVGAnimatedTransformList.webidl | 19 + dom/webidl/SVGAnimationElement.webidl | 39 + dom/webidl/SVGCircleElement.webidl | 21 + dom/webidl/SVGClipPathElement.webidl | 19 + .../SVGComponentTransferFunctionElement.webidl | 37 + dom/webidl/SVGDefsElement.webidl | 15 + dom/webidl/SVGDescElement.webidl | 15 + dom/webidl/SVGElement.webidl | 30 + dom/webidl/SVGEllipseElement.webidl | 23 + dom/webidl/SVGFEBlendElement.webidl | 42 + dom/webidl/SVGFEColorMatrixElement.webidl | 31 + dom/webidl/SVGFEComponentTransferElement.webidl | 19 + dom/webidl/SVGFECompositeElement.webidl | 42 + dom/webidl/SVGFEConvolveMatrixElement.webidl | 48 + dom/webidl/SVGFEDiffuseLightingElement.webidl | 27 + dom/webidl/SVGFEDisplacementMapElement.webidl | 35 + dom/webidl/SVGFEDistantLightElement.webidl | 19 + dom/webidl/SVGFEDropShadowElement.webidl | 29 + dom/webidl/SVGFEFloodElement.webidl | 17 + dom/webidl/SVGFEFuncAElement.webidl | 15 + dom/webidl/SVGFEFuncBElement.webidl | 15 + dom/webidl/SVGFEFuncGElement.webidl | 15 + dom/webidl/SVGFEFuncRElement.webidl | 15 + dom/webidl/SVGFEGaussianBlurElement.webidl | 25 + dom/webidl/SVGFEImageElement.webidl | 22 + dom/webidl/SVGFEMergeElement.webidl | 17 + dom/webidl/SVGFEMergeNodeElement.webidl | 17 + dom/webidl/SVGFEMorphologyElement.webidl | 31 + dom/webidl/SVGFEOffsetElement.webidl | 23 + dom/webidl/SVGFEPointLightElement.webidl | 21 + dom/webidl/SVGFESpecularLightingElement.webidl | 29 + dom/webidl/SVGFESpotLightElement.webidl | 31 + dom/webidl/SVGFETileElement.webidl | 19 + dom/webidl/SVGFETurbulenceElement.webidl | 40 + dom/webidl/SVGFilterElement.webidl | 31 + .../SVGFilterPrimitiveStandardAttributes.webidl | 24 + dom/webidl/SVGFitToViewBox.webidl | 18 + dom/webidl/SVGForeignObjectElement.webidl | 23 + dom/webidl/SVGGElement.webidl | 15 + dom/webidl/SVGGeometryElement.webidl | 25 + dom/webidl/SVGGradientElement.webidl | 30 + dom/webidl/SVGGraphicsElement.webidl | 37 + dom/webidl/SVGImageElement.webidl | 34 + dom/webidl/SVGLength.webidl | 41 + dom/webidl/SVGLengthList.webidl | 36 + dom/webidl/SVGLineElement.webidl | 23 + dom/webidl/SVGLinearGradientElement.webidl | 23 + dom/webidl/SVGMPathElement.webidl | 17 + dom/webidl/SVGMarkerElement.webidl | 46 + dom/webidl/SVGMaskElement.webidl | 32 + dom/webidl/SVGMatrix.webidl | 51 + dom/webidl/SVGMetadataElement.webidl | 15 + dom/webidl/SVGNumber.webidl | 17 + dom/webidl/SVGNumberList.webidl | 33 + dom/webidl/SVGPathElement.webidl | 18 + dom/webidl/SVGPathSeg.webidl | 254 ++++ dom/webidl/SVGPathSegList.webidl | 22 + dom/webidl/SVGPatternElement.webidl | 32 + dom/webidl/SVGPoint.webidl | 23 + dom/webidl/SVGPointList.webidl | 33 + dom/webidl/SVGPolygonElement.webidl | 17 + dom/webidl/SVGPolylineElement.webidl | 17 + dom/webidl/SVGPreserveAspectRatio.webidl | 38 + dom/webidl/SVGRadialGradientElement.webidl | 28 + dom/webidl/SVGRect.webidl | 23 + dom/webidl/SVGRectElement.webidl | 27 + dom/webidl/SVGSVGElement.webidl | 68 ++ dom/webidl/SVGScriptElement.webidl | 23 + dom/webidl/SVGSetElement.webidl | 15 + dom/webidl/SVGStopElement.webidl | 17 + dom/webidl/SVGStringList.webidl | 33 + dom/webidl/SVGStyleElement.webidl | 24 + dom/webidl/SVGSwitchElement.webidl | 15 + dom/webidl/SVGSymbolElement.webidl | 18 + dom/webidl/SVGTSpanElement.webidl | 15 + dom/webidl/SVGTests.webidl | 17 + dom/webidl/SVGTextContentElement.webidl | 41 + dom/webidl/SVGTextElement.webidl | 15 + dom/webidl/SVGTextPathElement.webidl | 34 + dom/webidl/SVGTextPositioningElement.webidl | 25 + dom/webidl/SVGTitleElement.webidl | 15 + dom/webidl/SVGTransform.webidl | 42 + dom/webidl/SVGTransformList.webidl | 37 + dom/webidl/SVGURIReference.webidl | 16 + dom/webidl/SVGUnitTypes.webidl | 19 + dom/webidl/SVGUseElement.webidl | 27 + dom/webidl/SVGViewElement.webidl | 18 + dom/webidl/SVGZoomAndPan.webidl | 21 + dom/webidl/Sanitizer.webidl | 54 + dom/webidl/Screen.webidl | 87 ++ dom/webidl/ScreenOrientation.webidl | 42 + dom/webidl/ScriptProcessorNode.webidl | 24 + dom/webidl/ScrollAreaEvent.webidl | 24 + dom/webidl/ScrollViewChangeEvent.webidl | 20 + dom/webidl/SecurityPolicyViolationEvent.webidl | 45 + dom/webidl/Selection.webidl | 159 +++ dom/webidl/ServiceWorker.webidl | 39 + dom/webidl/ServiceWorkerContainer.webidl | 48 + dom/webidl/ServiceWorkerGlobalScope.webidl | 49 + dom/webidl/ServiceWorkerRegistration.webidl | 54 + dom/webidl/ShadowRealmGlobalScope.webidl | 11 + dom/webidl/ShadowRoot.webidl | 60 + dom/webidl/SharedWorker.webidl | 16 + dom/webidl/SharedWorkerGlobalScope.webidl | 24 + dom/webidl/SimpleGestureEvent.webidl | 201 ++++ dom/webidl/SocketCommon.webidl | 16 + dom/webidl/SourceBuffer.webidl | 67 ++ dom/webidl/SourceBufferList.webidl | 20 + dom/webidl/SpeechGrammar.webidl | 24 + dom/webidl/SpeechGrammarList.webidl | 27 + dom/webidl/SpeechRecognition.webidl | 49 + dom/webidl/SpeechRecognitionAlternative.webidl | 19 + dom/webidl/SpeechRecognitionError.webidl | 34 + dom/webidl/SpeechRecognitionEvent.webidl | 28 + dom/webidl/SpeechRecognitionResult.webidl | 20 + dom/webidl/SpeechRecognitionResultList.webidl | 19 + dom/webidl/SpeechSynthesis.webidl | 31 + dom/webidl/SpeechSynthesisErrorEvent.webidl | 38 + dom/webidl/SpeechSynthesisEvent.webidl | 33 + dom/webidl/SpeechSynthesisUtterance.webidl | 38 + dom/webidl/SpeechSynthesisVoice.webidl | 21 + dom/webidl/StaticRange.webidl | 25 + dom/webidl/StereoPannerNode.webidl | 28 + dom/webidl/Storage.webidl | 101 ++ dom/webidl/StorageEvent.webidl | 42 + dom/webidl/StorageManager.webidl | 45 + dom/webidl/StreamFilter.webidl | 144 +++ dom/webidl/StreamFilterDataEvent.webidl | 29 + dom/webidl/StructuredCloneTester.webidl | 15 + dom/webidl/StyleSheet.webidl | 53 + .../StyleSheetApplicableStateChangeEvent.webidl | 22 + dom/webidl/StyleSheetList.webidl | 10 + dom/webidl/SubmitEvent.webidl | 19 + dom/webidl/SubtleCrypto.webidl | 245 ++++ dom/webidl/TCPServerSocket.webidl | 45 + dom/webidl/TCPServerSocketEvent.webidl | 17 + dom/webidl/TCPSocket.webidl | 221 ++++ dom/webidl/TCPSocketErrorEvent.webidl | 28 + dom/webidl/TCPSocketEvent.webidl | 31 + dom/webidl/TaskPriorityChangeEvent.webidl | 9 + dom/webidl/TestFunctions.webidl | 154 +++ dom/webidl/TestInterfaceJS.webidl | 84 ++ dom/webidl/TestInterfaceJSDictionaries.webidl | 27 + .../TestInterfaceJSMaplikeSetlikeIterable.webidl | 152 +++ dom/webidl/TestInterfaceObservableArray.webidl | 66 ++ dom/webidl/TestUtils.webidl | 14 + dom/webidl/Text.webidl | 31 + dom/webidl/TextClause.webidl | 22 + dom/webidl/TextDecoder.webidl | 37 + dom/webidl/TextDecoderStream.webidl | 16 + dom/webidl/TextEncoder.webidl | 48 + dom/webidl/TextEncoderStream.webidl | 16 + dom/webidl/TextTrack.webidl | 49 + dom/webidl/TextTrackCue.webidl | 21 + dom/webidl/TextTrackCueList.webidl | 15 + dom/webidl/TextTrackList.webidl | 25 + dom/webidl/TimeEvent.webidl | 21 + dom/webidl/TimeRanges.webidl | 23 + dom/webidl/ToggleEvent.webidl | 21 + dom/webidl/Touch.webidl | 52 + dom/webidl/TouchEvent.webidl | 39 + dom/webidl/TouchList.webidl | 19 + dom/webidl/TrackEvent.webidl | 21 + dom/webidl/TransformStream.webidl | 19 + dom/webidl/TransformStreamDefaultController.webidl | 16 + dom/webidl/Transformer.webidl | 21 + dom/webidl/TransitionEvent.webidl | 27 + dom/webidl/TreeColumn.webidl | 38 + dom/webidl/TreeColumns.webidl | 53 + dom/webidl/TreeContentView.webidl | 21 + dom/webidl/TreeView.webidl | 186 +++ dom/webidl/TreeWalker.webidl | 38 + dom/webidl/UDPMessageEvent.webidl | 27 + dom/webidl/UDPSocket.webidl | 43 + dom/webidl/UIEvent.webidl | 64 + dom/webidl/URL.webidl | 59 + dom/webidl/URLSearchParams.webidl | 37 + dom/webidl/UnderlyingSink.webidl | 22 + dom/webidl/UnderlyingSource.webidl | 23 + dom/webidl/UserProximityEvent.webidl | 20 + dom/webidl/VRDisplay.webidl | 325 ++++++ dom/webidl/VRDisplayEvent.webidl | 26 + dom/webidl/VRServiceTest.webidl | 84 ++ dom/webidl/VTTCue.webidl | 76 ++ dom/webidl/VTTRegion.webidl | 36 + dom/webidl/ValidityState.webidl | 26 + dom/webidl/VideoColorSpace.webidl | 54 + dom/webidl/VideoFrame.webidl | 137 +++ dom/webidl/VideoPlaybackQuality.webidl | 20 + dom/webidl/VideoTrack.webidl | 18 + dom/webidl/VideoTrackList.webidl | 21 + dom/webidl/VisualViewport.webidl | 26 + dom/webidl/WaveShaperNode.webidl | 38 + dom/webidl/WebAuthentication.webidl | 161 +++ dom/webidl/WebGL2RenderingContext.webidl | 742 ++++++++++++ dom/webidl/WebGLContextEvent.webidl | 21 + dom/webidl/WebGLRenderingContext.webidl | 1231 ++++++++++++++++++++ dom/webidl/WebGPU.webidl | 1231 ++++++++++++++++++++ dom/webidl/WebSocket.webidl | 76 ++ dom/webidl/WebTaskScheduling.webidl | 43 + dom/webidl/WebTransport.webidl | 102 ++ dom/webidl/WebTransportDatagramDuplexStream.webidl | 18 + dom/webidl/WebTransportError.webidl | 24 + dom/webidl/WebTransportSendReceiveStream.webidl | 44 + dom/webidl/WebXR.webidl | 241 ++++ dom/webidl/WebrtcGlobalInformation.webidl | 52 + dom/webidl/WheelEvent.webidl | 42 + dom/webidl/WidevineCDMManifest.webidl | 16 + dom/webidl/Window.webidl | 845 ++++++++++++++ dom/webidl/WindowOrWorkerGlobalScope.webidl | 87 ++ dom/webidl/WindowRoot.webidl | 10 + dom/webidl/Worker.webidl | 48 + dom/webidl/WorkerDebuggerGlobalScope.webidl | 51 + dom/webidl/WorkerGlobalScope.webidl | 50 + dom/webidl/WorkerLocation.webidl | 26 + dom/webidl/WorkerNavigator.webidl | 35 + dom/webidl/WorkerTestUtils.webidl | 9 + dom/webidl/Worklet.webidl | 19 + dom/webidl/WorkletGlobalScope.webidl | 17 + dom/webidl/WritableStream.webidl | 25 + dom/webidl/WritableStreamDefaultController.webidl | 15 + dom/webidl/WritableStreamDefaultWriter.webidl | 29 + dom/webidl/XMLDocument.webidl | 12 + dom/webidl/XMLHttpRequest.webidl | 144 +++ dom/webidl/XMLHttpRequestEventTarget.webidl | 29 + dom/webidl/XMLHttpRequestUpload.webidl | 16 + dom/webidl/XMLSerializer.webidl | 39 + dom/webidl/XPathEvaluator.webidl | 25 + dom/webidl/XPathExpression.webidl | 26 + dom/webidl/XPathNSResolver.webidl | 11 + dom/webidl/XPathResult.webidl | 39 + dom/webidl/XRInputSourceEvent.webidl | 20 + dom/webidl/XRInputSourcesChangeEvent.webidl | 28 + dom/webidl/XRReferenceSpaceEvent.webidl | 24 + dom/webidl/XRSessionEvent.webidl | 18 + dom/webidl/XSLTProcessor.webidl | 112 ++ dom/webidl/XULCommandEvent.webidl | 58 + dom/webidl/XULElement.webidl | 58 + dom/webidl/XULPopupElement.webidl | 205 ++++ dom/webidl/XULResizerElement.webidl | 10 + dom/webidl/components.conf | 15 + dom/webidl/moz.build | 1219 +++++++++++++++++++ 756 files changed, 38139 insertions(+) create mode 100644 dom/webidl/APZTestData.webidl create mode 100644 dom/webidl/AbortController.webidl create mode 100644 dom/webidl/AbortSignal.webidl create mode 100644 dom/webidl/AbstractRange.webidl create mode 100644 dom/webidl/AbstractWorker.webidl create mode 100644 dom/webidl/AccessibilityRole.webidl create mode 100644 dom/webidl/AccessibleNode.webidl create mode 100644 dom/webidl/AddonEvent.webidl create mode 100644 dom/webidl/AddonManager.webidl create mode 100644 dom/webidl/AnalyserNode.webidl create mode 100644 dom/webidl/Animatable.webidl create mode 100644 dom/webidl/Animation.webidl create mode 100644 dom/webidl/AnimationEffect.webidl create mode 100644 dom/webidl/AnimationEvent.webidl create mode 100644 dom/webidl/AnimationFrameProvider.webidl create mode 100644 dom/webidl/AnimationPlaybackEvent.webidl create mode 100644 dom/webidl/AnimationTimeline.webidl create mode 100644 dom/webidl/AnonymousContent.webidl create mode 100644 dom/webidl/AppInfo.webidl create mode 100644 dom/webidl/AppNotificationServiceOptions.webidl create mode 100644 dom/webidl/AriaAttributes.webidl create mode 100644 dom/webidl/Attr.webidl create mode 100644 dom/webidl/AudioBuffer.webidl create mode 100644 dom/webidl/AudioBufferSourceNode.webidl create mode 100644 dom/webidl/AudioContext.webidl create mode 100644 dom/webidl/AudioDestinationNode.webidl create mode 100644 dom/webidl/AudioListener.webidl create mode 100644 dom/webidl/AudioNode.webidl create mode 100644 dom/webidl/AudioParam.webidl create mode 100644 dom/webidl/AudioParamDescriptor.webidl create mode 100644 dom/webidl/AudioParamMap.webidl create mode 100644 dom/webidl/AudioProcessingEvent.webidl create mode 100644 dom/webidl/AudioScheduledSourceNode.webidl create mode 100644 dom/webidl/AudioTrack.webidl create mode 100644 dom/webidl/AudioTrackList.webidl create mode 100644 dom/webidl/AudioWorklet.webidl create mode 100644 dom/webidl/AudioWorkletGlobalScope.webidl create mode 100644 dom/webidl/AudioWorkletNode.webidl create mode 100644 dom/webidl/AudioWorkletProcessor.webidl create mode 100644 dom/webidl/AutocompleteInfo.webidl create mode 100644 dom/webidl/BarProp.webidl create mode 100644 dom/webidl/BaseAudioContext.webidl create mode 100644 dom/webidl/BaseKeyframeTypes.webidl create mode 100644 dom/webidl/BasicCardPayment.webidl create mode 100644 dom/webidl/BatteryManager.webidl create mode 100644 dom/webidl/BeforeUnloadEvent.webidl create mode 100644 dom/webidl/BiquadFilterNode.webidl create mode 100644 dom/webidl/Blob.webidl create mode 100644 dom/webidl/BlobEvent.webidl create mode 100644 dom/webidl/BroadcastChannel.webidl create mode 100644 dom/webidl/BrowserElementDictionaries.webidl create mode 100644 dom/webidl/CDATASection.webidl create mode 100644 dom/webidl/CSPDictionaries.webidl create mode 100644 dom/webidl/CSPReport.webidl create mode 100644 dom/webidl/CSS.webidl create mode 100644 dom/webidl/CSS2Properties.webidl.in create mode 100644 dom/webidl/CSSAnimation.webidl create mode 100644 dom/webidl/CSSConditionRule.webidl create mode 100644 dom/webidl/CSSContainerRule.webidl create mode 100644 dom/webidl/CSSCounterStyleRule.webidl create mode 100644 dom/webidl/CSSFontFaceRule.webidl create mode 100644 dom/webidl/CSSFontFeatureValuesRule.webidl create mode 100644 dom/webidl/CSSFontPaletteValuesRule.webidl create mode 100644 dom/webidl/CSSGroupingRule.webidl create mode 100644 dom/webidl/CSSImportRule.webidl create mode 100644 dom/webidl/CSSKeyframeRule.webidl create mode 100644 dom/webidl/CSSKeyframesRule.webidl create mode 100644 dom/webidl/CSSLayerBlockRule.webidl create mode 100644 dom/webidl/CSSLayerStatementRule.webidl create mode 100644 dom/webidl/CSSMediaRule.webidl create mode 100644 dom/webidl/CSSMozDocumentRule.webidl create mode 100644 dom/webidl/CSSNamespaceRule.webidl create mode 100644 dom/webidl/CSSPageRule.webidl create mode 100644 dom/webidl/CSSPropertyRule.webidl create mode 100644 dom/webidl/CSSPseudoElement.webidl create mode 100644 dom/webidl/CSSRule.webidl create mode 100644 dom/webidl/CSSRuleList.webidl create mode 100644 dom/webidl/CSSStyleDeclaration.webidl create mode 100644 dom/webidl/CSSStyleRule.webidl create mode 100644 dom/webidl/CSSStyleSheet.webidl create mode 100644 dom/webidl/CSSSupportsRule.webidl create mode 100644 dom/webidl/CSSTransition.webidl create mode 100644 dom/webidl/Cache.webidl create mode 100644 dom/webidl/CacheStorage.webidl create mode 100644 dom/webidl/CancelContentJSOptions.webidl create mode 100644 dom/webidl/CanvasCaptureMediaStream.webidl create mode 100644 dom/webidl/CanvasRenderingContext2D.webidl create mode 100644 dom/webidl/CaretPosition.webidl create mode 100644 dom/webidl/CaretStateChangedEvent.webidl create mode 100644 dom/webidl/ChannelMergerNode.webidl create mode 100644 dom/webidl/ChannelSplitterNode.webidl create mode 100644 dom/webidl/CharacterData.webidl create mode 100644 dom/webidl/CheckerboardReportService.webidl create mode 100644 dom/webidl/ChildNode.webidl create mode 100644 dom/webidl/ChildSHistory.webidl create mode 100644 dom/webidl/ChromeNodeList.webidl create mode 100644 dom/webidl/Client.webidl create mode 100644 dom/webidl/Clients.webidl create mode 100644 dom/webidl/Clipboard.webidl create mode 100644 dom/webidl/ClipboardEvent.webidl create mode 100644 dom/webidl/CloseEvent.webidl create mode 100644 dom/webidl/CommandEvent.webidl create mode 100644 dom/webidl/Comment.webidl create mode 100644 dom/webidl/CompositionEvent.webidl create mode 100644 dom/webidl/CompressionStream.webidl create mode 100644 dom/webidl/Console.webidl create mode 100644 dom/webidl/ConstantSourceNode.webidl create mode 100644 dom/webidl/ContentVisibilityAutoStateChangeEvent.webidl create mode 100644 dom/webidl/ConvolverNode.webidl create mode 100644 dom/webidl/CreateOfferRequest.webidl create mode 100644 dom/webidl/CredentialManagement.webidl create mode 100644 dom/webidl/Crypto.webidl create mode 100644 dom/webidl/CustomElementRegistry.webidl create mode 100644 dom/webidl/CustomEvent.webidl create mode 100644 dom/webidl/DOMException.webidl create mode 100644 dom/webidl/DOMImplementation.webidl create mode 100644 dom/webidl/DOMLocalization.webidl create mode 100644 dom/webidl/DOMMatrix.webidl create mode 100644 dom/webidl/DOMParser.webidl create mode 100644 dom/webidl/DOMPoint.webidl create mode 100644 dom/webidl/DOMQuad.webidl create mode 100644 dom/webidl/DOMRect.webidl create mode 100644 dom/webidl/DOMRectList.webidl create mode 100644 dom/webidl/DOMRequest.webidl create mode 100644 dom/webidl/DOMStringList.webidl create mode 100644 dom/webidl/DOMStringMap.webidl create mode 100644 dom/webidl/DOMTokenList.webidl create mode 100644 dom/webidl/DataTransfer.webidl create mode 100644 dom/webidl/DataTransferItem.webidl create mode 100644 dom/webidl/DataTransferItemList.webidl create mode 100644 dom/webidl/DecoderDoctorNotification.webidl create mode 100644 dom/webidl/DecompressionStream.webidl create mode 100644 dom/webidl/DedicatedWorkerGlobalScope.webidl create mode 100644 dom/webidl/DelayNode.webidl create mode 100644 dom/webidl/DeviceLightEvent.webidl create mode 100644 dom/webidl/DeviceMotionEvent.webidl create mode 100644 dom/webidl/DeviceOrientationEvent.webidl create mode 100644 dom/webidl/Directory.webidl create mode 100644 dom/webidl/Document.webidl create mode 100644 dom/webidl/DocumentFragment.webidl create mode 100644 dom/webidl/DocumentOrShadowRoot.webidl create mode 100644 dom/webidl/DocumentTimeline.webidl create mode 100644 dom/webidl/DocumentType.webidl create mode 100644 dom/webidl/DragEvent.webidl create mode 100644 dom/webidl/DynamicsCompressorNode.webidl create mode 100644 dom/webidl/Element.webidl create mode 100644 dom/webidl/ElementInternals.webidl create mode 100644 dom/webidl/ErrorEvent.webidl create mode 100644 dom/webidl/Event.webidl create mode 100644 dom/webidl/EventHandler.webidl create mode 100644 dom/webidl/EventListener.webidl create mode 100644 dom/webidl/EventSource.webidl create mode 100644 dom/webidl/EventTarget.webidl create mode 100644 dom/webidl/ExtendableEvent.webidl create mode 100644 dom/webidl/ExtendableMessageEvent.webidl create mode 100644 dom/webidl/ExtensionAlarms.webidl create mode 100644 dom/webidl/ExtensionBrowser.webidl create mode 100644 dom/webidl/ExtensionBrowserSettings.webidl create mode 100644 dom/webidl/ExtensionBrowserSettingsColorManagement.webidl create mode 100644 dom/webidl/ExtensionDns.webidl create mode 100644 dom/webidl/ExtensionEventManager.webidl create mode 100644 dom/webidl/ExtensionMockAPI.webidl create mode 100644 dom/webidl/ExtensionPort.webidl create mode 100644 dom/webidl/ExtensionProxy.webidl create mode 100644 dom/webidl/ExtensionRuntime.webidl create mode 100644 dom/webidl/ExtensionScripting.webidl create mode 100644 dom/webidl/ExtensionSetting.webidl create mode 100644 dom/webidl/ExtensionTest.webidl create mode 100644 dom/webidl/External.webidl create mode 100644 dom/webidl/FailedCertSecurityInfo.webidl create mode 100644 dom/webidl/FakePluginTagInit.webidl create mode 100644 dom/webidl/FeaturePolicy.webidl create mode 100644 dom/webidl/Fetch.webidl create mode 100644 dom/webidl/FetchEvent.webidl create mode 100644 dom/webidl/FetchObserver.webidl create mode 100644 dom/webidl/File.webidl create mode 100644 dom/webidl/FileList.webidl create mode 100644 dom/webidl/FileMode.webidl create mode 100644 dom/webidl/FileReader.webidl create mode 100644 dom/webidl/FileReaderSync.webidl create mode 100644 dom/webidl/FileSystem.webidl create mode 100644 dom/webidl/FileSystemDirectoryEntry.webidl create mode 100644 dom/webidl/FileSystemDirectoryHandle.webidl create mode 100644 dom/webidl/FileSystemDirectoryIterator.webidl create mode 100644 dom/webidl/FileSystemDirectoryReader.webidl create mode 100644 dom/webidl/FileSystemEntry.webidl create mode 100644 dom/webidl/FileSystemFileEntry.webidl create mode 100644 dom/webidl/FileSystemFileHandle.webidl create mode 100644 dom/webidl/FileSystemHandle.webidl create mode 100644 dom/webidl/FileSystemSyncAccessHandle.webidl create mode 100644 dom/webidl/FileSystemWritableFileStream.webidl create mode 100644 dom/webidl/FinalizationRegistry.webidl create mode 100644 dom/webidl/FocusEvent.webidl create mode 100644 dom/webidl/FontFace.webidl create mode 100644 dom/webidl/FontFaceSet.webidl create mode 100644 dom/webidl/FontFaceSetLoadEvent.webidl create mode 100644 dom/webidl/FontFaceSource.webidl create mode 100644 dom/webidl/FormData.webidl create mode 100644 dom/webidl/FormDataEvent.webidl create mode 100644 dom/webidl/FrameCrashedEvent.webidl create mode 100644 dom/webidl/Function.webidl create mode 100644 dom/webidl/FuzzingFunctions.webidl create mode 100644 dom/webidl/GPUUncapturedErrorEvent.webidl create mode 100644 dom/webidl/GainNode.webidl create mode 100644 dom/webidl/Gamepad.webidl create mode 100644 dom/webidl/GamepadAxisMoveEvent.webidl create mode 100644 dom/webidl/GamepadButtonEvent.webidl create mode 100644 dom/webidl/GamepadEvent.webidl create mode 100644 dom/webidl/GamepadHapticActuator.webidl create mode 100644 dom/webidl/GamepadLightIndicator.webidl create mode 100644 dom/webidl/GamepadPose.webidl create mode 100644 dom/webidl/GamepadServiceTest.webidl create mode 100644 dom/webidl/GamepadTouch.webidl create mode 100644 dom/webidl/GenericTransformStream.webidl create mode 100644 dom/webidl/Geolocation.webidl create mode 100644 dom/webidl/GeolocationCoordinates.webidl create mode 100644 dom/webidl/GeolocationPosition.webidl create mode 100644 dom/webidl/GeolocationPositionError.webidl create mode 100644 dom/webidl/GeometryUtils.webidl create mode 100644 dom/webidl/GetUserMediaRequest.webidl create mode 100644 dom/webidl/Grid.webidl create mode 100644 dom/webidl/HTMLAllCollection.webidl create mode 100644 dom/webidl/HTMLAnchorElement.webidl create mode 100644 dom/webidl/HTMLAreaElement.webidl create mode 100644 dom/webidl/HTMLAudioElement.webidl create mode 100644 dom/webidl/HTMLBRElement.webidl create mode 100644 dom/webidl/HTMLBaseElement.webidl create mode 100644 dom/webidl/HTMLBodyElement.webidl create mode 100644 dom/webidl/HTMLButtonElement.webidl create mode 100644 dom/webidl/HTMLCanvasElement.webidl create mode 100644 dom/webidl/HTMLCollection.webidl create mode 100644 dom/webidl/HTMLDListElement.webidl create mode 100644 dom/webidl/HTMLDataElement.webidl create mode 100644 dom/webidl/HTMLDataListElement.webidl create mode 100644 dom/webidl/HTMLDetailsElement.webidl create mode 100644 dom/webidl/HTMLDialogElement.webidl create mode 100644 dom/webidl/HTMLDirectoryElement.webidl create mode 100644 dom/webidl/HTMLDivElement.webidl create mode 100644 dom/webidl/HTMLDocument.webidl create mode 100644 dom/webidl/HTMLElement.webidl create mode 100644 dom/webidl/HTMLEmbedElement.webidl create mode 100644 dom/webidl/HTMLFieldSetElement.webidl create mode 100644 dom/webidl/HTMLFontElement.webidl create mode 100644 dom/webidl/HTMLFormControlsCollection.webidl create mode 100644 dom/webidl/HTMLFormElement.webidl create mode 100644 dom/webidl/HTMLFrameElement.webidl create mode 100644 dom/webidl/HTMLFrameSetElement.webidl create mode 100644 dom/webidl/HTMLHRElement.webidl create mode 100644 dom/webidl/HTMLHeadElement.webidl create mode 100644 dom/webidl/HTMLHeadingElement.webidl create mode 100644 dom/webidl/HTMLHtmlElement.webidl create mode 100644 dom/webidl/HTMLHyperlinkElementUtils.webidl create mode 100644 dom/webidl/HTMLIFrameElement.webidl create mode 100644 dom/webidl/HTMLImageElement.webidl create mode 100644 dom/webidl/HTMLInputElement.webidl create mode 100644 dom/webidl/HTMLLIElement.webidl create mode 100644 dom/webidl/HTMLLabelElement.webidl create mode 100644 dom/webidl/HTMLLegendElement.webidl create mode 100644 dom/webidl/HTMLLinkElement.webidl create mode 100644 dom/webidl/HTMLMapElement.webidl create mode 100644 dom/webidl/HTMLMarqueeElement.webidl create mode 100644 dom/webidl/HTMLMediaElement.webidl create mode 100644 dom/webidl/HTMLMenuElement.webidl create mode 100644 dom/webidl/HTMLMetaElement.webidl create mode 100644 dom/webidl/HTMLMeterElement.webidl create mode 100644 dom/webidl/HTMLModElement.webidl create mode 100644 dom/webidl/HTMLOListElement.webidl create mode 100644 dom/webidl/HTMLObjectElement.webidl create mode 100644 dom/webidl/HTMLOptGroupElement.webidl create mode 100644 dom/webidl/HTMLOptionElement.webidl create mode 100644 dom/webidl/HTMLOptionsCollection.webidl create mode 100644 dom/webidl/HTMLOutputElement.webidl create mode 100644 dom/webidl/HTMLParagraphElement.webidl create mode 100644 dom/webidl/HTMLParamElement.webidl create mode 100644 dom/webidl/HTMLPictureElement.webidl create mode 100644 dom/webidl/HTMLPreElement.webidl create mode 100644 dom/webidl/HTMLProgressElement.webidl create mode 100644 dom/webidl/HTMLQuoteElement.webidl create mode 100644 dom/webidl/HTMLScriptElement.webidl create mode 100644 dom/webidl/HTMLSelectElement.webidl create mode 100644 dom/webidl/HTMLSlotElement.webidl create mode 100644 dom/webidl/HTMLSourceElement.webidl create mode 100644 dom/webidl/HTMLSpanElement.webidl create mode 100644 dom/webidl/HTMLStyleElement.webidl create mode 100644 dom/webidl/HTMLTableCaptionElement.webidl create mode 100644 dom/webidl/HTMLTableCellElement.webidl create mode 100644 dom/webidl/HTMLTableColElement.webidl create mode 100644 dom/webidl/HTMLTableElement.webidl create mode 100644 dom/webidl/HTMLTableRowElement.webidl create mode 100644 dom/webidl/HTMLTableSectionElement.webidl create mode 100644 dom/webidl/HTMLTemplateElement.webidl create mode 100644 dom/webidl/HTMLTextAreaElement.webidl create mode 100644 dom/webidl/HTMLTimeElement.webidl create mode 100644 dom/webidl/HTMLTitleElement.webidl create mode 100644 dom/webidl/HTMLTrackElement.webidl create mode 100644 dom/webidl/HTMLUListElement.webidl create mode 100644 dom/webidl/HTMLVideoElement.webidl create mode 100644 dom/webidl/HashChangeEvent.webidl create mode 100644 dom/webidl/Headers.webidl create mode 100644 dom/webidl/Highlight.webidl create mode 100644 dom/webidl/History.webidl create mode 100644 dom/webidl/IDBCursor.webidl create mode 100644 dom/webidl/IDBDatabase.webidl create mode 100644 dom/webidl/IDBFactory.webidl create mode 100644 dom/webidl/IDBIndex.webidl create mode 100644 dom/webidl/IDBKeyRange.webidl create mode 100644 dom/webidl/IDBObjectStore.webidl create mode 100644 dom/webidl/IDBOpenDBRequest.webidl create mode 100644 dom/webidl/IDBRequest.webidl create mode 100644 dom/webidl/IDBTransaction.webidl create mode 100644 dom/webidl/IDBVersionChangeEvent.webidl create mode 100644 dom/webidl/IIRFilterNode.webidl create mode 100644 dom/webidl/IdentityCredential.webidl create mode 100644 dom/webidl/IdleDeadline.webidl create mode 100644 dom/webidl/ImageBitmap.webidl create mode 100644 dom/webidl/ImageBitmapRenderingContext.webidl create mode 100644 dom/webidl/ImageCapture.webidl create mode 100644 dom/webidl/ImageCaptureErrorEvent.webidl create mode 100644 dom/webidl/ImageData.webidl create mode 100644 dom/webidl/ImageDocument.webidl create mode 100644 dom/webidl/InputEvent.webidl create mode 100644 dom/webidl/InstallTrigger.webidl create mode 100644 dom/webidl/IntersectionObserver.webidl create mode 100644 dom/webidl/IntlUtils.webidl create mode 100644 dom/webidl/IterableIterator.webidl create mode 100644 dom/webidl/KeyAlgorithm.webidl create mode 100644 dom/webidl/KeyEvent.webidl create mode 100644 dom/webidl/KeyIdsInitData.webidl create mode 100644 dom/webidl/KeyboardEvent.webidl create mode 100644 dom/webidl/KeyframeAnimationOptions.webidl create mode 100644 dom/webidl/KeyframeEffect.webidl create mode 100644 dom/webidl/LinkStyle.webidl create mode 100644 dom/webidl/LoadURIOptions.webidl create mode 100644 dom/webidl/Localization.webidl create mode 100644 dom/webidl/Location.webidl create mode 100644 dom/webidl/Lock.webidl create mode 100644 dom/webidl/LockManager.webidl create mode 100644 dom/webidl/MIDIAccess.webidl create mode 100644 dom/webidl/MIDIConnectionEvent.webidl create mode 100644 dom/webidl/MIDIInput.webidl create mode 100644 dom/webidl/MIDIInputMap.webidl create mode 100644 dom/webidl/MIDIMessageEvent.webidl create mode 100644 dom/webidl/MIDIOptions.webidl create mode 100644 dom/webidl/MIDIOutput.webidl create mode 100644 dom/webidl/MIDIOutputMap.webidl create mode 100644 dom/webidl/MIDIPort.webidl create mode 100644 dom/webidl/MathMLElement.webidl create mode 100644 dom/webidl/MediaCapabilities.webidl create mode 100644 dom/webidl/MediaDebugInfo.webidl create mode 100644 dom/webidl/MediaDeviceInfo.webidl create mode 100644 dom/webidl/MediaDevices.webidl create mode 100644 dom/webidl/MediaElementAudioSourceNode.webidl create mode 100644 dom/webidl/MediaEncryptedEvent.webidl create mode 100644 dom/webidl/MediaError.webidl create mode 100644 dom/webidl/MediaKeyError.webidl create mode 100644 dom/webidl/MediaKeyMessageEvent.webidl create mode 100644 dom/webidl/MediaKeySession.webidl create mode 100644 dom/webidl/MediaKeyStatusMap.webidl create mode 100644 dom/webidl/MediaKeySystemAccess.webidl create mode 100644 dom/webidl/MediaKeys.webidl create mode 100644 dom/webidl/MediaKeysRequestStatus.webidl create mode 100644 dom/webidl/MediaList.webidl create mode 100644 dom/webidl/MediaQueryList.webidl create mode 100644 dom/webidl/MediaQueryListEvent.webidl create mode 100644 dom/webidl/MediaRecorder.webidl create mode 100644 dom/webidl/MediaRecorderErrorEvent.webidl create mode 100644 dom/webidl/MediaSession.webidl create mode 100644 dom/webidl/MediaSource.webidl create mode 100644 dom/webidl/MediaStream.webidl create mode 100644 dom/webidl/MediaStreamAudioDestinationNode.webidl create mode 100644 dom/webidl/MediaStreamAudioSourceNode.webidl create mode 100644 dom/webidl/MediaStreamError.webidl create mode 100644 dom/webidl/MediaStreamEvent.webidl create mode 100644 dom/webidl/MediaStreamTrack.webidl create mode 100644 dom/webidl/MediaStreamTrackAudioSourceNode.webidl create mode 100644 dom/webidl/MediaStreamTrackEvent.webidl create mode 100644 dom/webidl/MediaTrackSettings.webidl create mode 100644 dom/webidl/MediaTrackSupportedConstraints.webidl create mode 100644 dom/webidl/MerchantValidationEvent.webidl create mode 100644 dom/webidl/MessageChannel.webidl create mode 100644 dom/webidl/MessageEvent.webidl create mode 100644 dom/webidl/MessagePort.webidl create mode 100644 dom/webidl/MimeType.webidl create mode 100644 dom/webidl/MimeTypeArray.webidl create mode 100644 dom/webidl/MouseEvent.webidl create mode 100644 dom/webidl/MouseScrollEvent.webidl create mode 100644 dom/webidl/MozApplicationEvent.webidl create mode 100644 dom/webidl/MozFrameLoaderOwner.webidl create mode 100644 dom/webidl/MutationEvent.webidl create mode 100644 dom/webidl/MutationObserver.webidl create mode 100644 dom/webidl/NamedNodeMap.webidl create mode 100644 dom/webidl/NavigationPreloadManager.webidl create mode 100644 dom/webidl/Navigator.webidl create mode 100644 dom/webidl/NetErrorInfo.webidl create mode 100644 dom/webidl/NetworkInformation.webidl create mode 100644 dom/webidl/NetworkOptions.webidl create mode 100644 dom/webidl/Node.webidl create mode 100644 dom/webidl/NodeFilter.webidl create mode 100644 dom/webidl/NodeIterator.webidl create mode 100644 dom/webidl/NodeList.webidl create mode 100644 dom/webidl/Notification.webidl create mode 100644 dom/webidl/NotificationEvent.webidl create mode 100644 dom/webidl/NotifyPaintEvent.webidl create mode 100644 dom/webidl/OfflineAudioCompletionEvent.webidl create mode 100644 dom/webidl/OfflineAudioContext.webidl create mode 100644 dom/webidl/OffscreenCanvas.webidl create mode 100644 dom/webidl/OffscreenCanvasRenderingContext2D.webidl create mode 100644 dom/webidl/OscillatorNode.webidl create mode 100644 dom/webidl/PageTransitionEvent.webidl create mode 100644 dom/webidl/PaintRequest.webidl create mode 100644 dom/webidl/PaintRequestList.webidl create mode 100644 dom/webidl/PaintWorkletGlobalScope.webidl create mode 100644 dom/webidl/PannerNode.webidl create mode 100644 dom/webidl/ParentNode.webidl create mode 100644 dom/webidl/PaymentAddress.webidl create mode 100644 dom/webidl/PaymentMethodChangeEvent.webidl create mode 100644 dom/webidl/PaymentRequest.webidl create mode 100644 dom/webidl/PaymentRequestUpdateEvent.webidl create mode 100644 dom/webidl/PaymentResponse.webidl create mode 100644 dom/webidl/PeerConnectionImpl.webidl create mode 100644 dom/webidl/PeerConnectionObserver.webidl create mode 100644 dom/webidl/PeerConnectionObserverEnums.webidl create mode 100644 dom/webidl/Performance.webidl create mode 100644 dom/webidl/PerformanceEntry.webidl create mode 100644 dom/webidl/PerformanceEntryEvent.webidl create mode 100644 dom/webidl/PerformanceEventTiming.webidl create mode 100644 dom/webidl/PerformanceLargestContentfulPaint.webidl create mode 100644 dom/webidl/PerformanceMark.webidl create mode 100644 dom/webidl/PerformanceMeasure.webidl create mode 100644 dom/webidl/PerformanceNavigation.webidl create mode 100644 dom/webidl/PerformanceNavigationTiming.webidl create mode 100644 dom/webidl/PerformanceObserver.webidl create mode 100644 dom/webidl/PerformanceObserverEntryList.webidl create mode 100644 dom/webidl/PerformancePaintTiming.webidl create mode 100644 dom/webidl/PerformanceResourceTiming.webidl create mode 100644 dom/webidl/PerformanceServerTiming.webidl create mode 100644 dom/webidl/PerformanceTiming.webidl create mode 100644 dom/webidl/PeriodicWave.webidl create mode 100644 dom/webidl/PermissionStatus.webidl create mode 100644 dom/webidl/Permissions.webidl create mode 100644 dom/webidl/Plugin.webidl create mode 100644 dom/webidl/PluginArray.webidl create mode 100644 dom/webidl/PluginCrashedEvent.webidl create mode 100644 dom/webidl/PointerEvent.webidl create mode 100644 dom/webidl/PopStateEvent.webidl create mode 100644 dom/webidl/PopoverInvokerElement.webidl create mode 100644 dom/webidl/PopupBlockedEvent.webidl create mode 100644 dom/webidl/PopupPositionedEvent.webidl create mode 100644 dom/webidl/PositionStateEvent.webidl create mode 100644 dom/webidl/ProcessingInstruction.webidl create mode 100644 dom/webidl/ProfileTimelineMarker.webidl create mode 100644 dom/webidl/ProgressEvent.webidl create mode 100644 dom/webidl/Promise.webidl create mode 100644 dom/webidl/PromiseRejectionEvent.webidl create mode 100644 dom/webidl/PushEvent.webidl create mode 100644 dom/webidl/PushManager.webidl create mode 100644 dom/webidl/PushMessageData.webidl create mode 100644 dom/webidl/PushSubscription.webidl create mode 100644 dom/webidl/PushSubscriptionOptions.webidl create mode 100644 dom/webidl/QueuingStrategy.webidl create mode 100644 dom/webidl/RTCCertificate.webidl create mode 100644 dom/webidl/RTCConfiguration.webidl create mode 100644 dom/webidl/RTCDTMFSender.webidl create mode 100644 dom/webidl/RTCDTMFToneChangeEvent.webidl create mode 100644 dom/webidl/RTCDataChannel.webidl create mode 100644 dom/webidl/RTCDataChannelEvent.webidl create mode 100644 dom/webidl/RTCDtlsTransport.webidl create mode 100644 dom/webidl/RTCIceCandidate.webidl create mode 100644 dom/webidl/RTCIdentityAssertion.webidl create mode 100644 dom/webidl/RTCIdentityProvider.webidl create mode 100644 dom/webidl/RTCPeerConnection.webidl create mode 100644 dom/webidl/RTCPeerConnectionIceEvent.webidl create mode 100644 dom/webidl/RTCPeerConnectionStatic.webidl create mode 100644 dom/webidl/RTCRtpCapabilities.webidl create mode 100644 dom/webidl/RTCRtpParameters.webidl create mode 100644 dom/webidl/RTCRtpReceiver.webidl create mode 100644 dom/webidl/RTCRtpSender.webidl create mode 100644 dom/webidl/RTCRtpSources.webidl create mode 100644 dom/webidl/RTCRtpTransceiver.webidl create mode 100644 dom/webidl/RTCSctpTransport.webidl create mode 100644 dom/webidl/RTCSessionDescription.webidl create mode 100644 dom/webidl/RTCStatsReport.webidl create mode 100644 dom/webidl/RTCTrackEvent.webidl create mode 100644 dom/webidl/RadioNodeList.webidl create mode 100644 dom/webidl/Range.webidl create mode 100644 dom/webidl/ReadableByteStreamController.webidl create mode 100644 dom/webidl/ReadableStream.webidl create mode 100644 dom/webidl/ReadableStreamBYOBReader.webidl create mode 100644 dom/webidl/ReadableStreamBYOBRequest.webidl create mode 100644 dom/webidl/ReadableStreamDefaultController.webidl create mode 100644 dom/webidl/ReadableStreamDefaultReader.webidl create mode 100644 dom/webidl/ReferrerPolicy.webidl create mode 100644 dom/webidl/Reporting.webidl create mode 100644 dom/webidl/Request.webidl create mode 100644 dom/webidl/ResizeObserver.webidl create mode 100644 dom/webidl/Response.webidl create mode 100644 dom/webidl/SVGAElement.webidl create mode 100644 dom/webidl/SVGAngle.webidl create mode 100644 dom/webidl/SVGAnimateElement.webidl create mode 100644 dom/webidl/SVGAnimateMotionElement.webidl create mode 100644 dom/webidl/SVGAnimateTransformElement.webidl create mode 100644 dom/webidl/SVGAnimatedAngle.webidl create mode 100644 dom/webidl/SVGAnimatedBoolean.webidl create mode 100644 dom/webidl/SVGAnimatedEnumeration.webidl create mode 100644 dom/webidl/SVGAnimatedInteger.webidl create mode 100644 dom/webidl/SVGAnimatedLength.webidl create mode 100644 dom/webidl/SVGAnimatedLengthList.webidl create mode 100644 dom/webidl/SVGAnimatedNumber.webidl create mode 100644 dom/webidl/SVGAnimatedNumberList.webidl create mode 100644 dom/webidl/SVGAnimatedPathData.webidl create mode 100644 dom/webidl/SVGAnimatedPoints.webidl create mode 100644 dom/webidl/SVGAnimatedPreserveAspectRatio.webidl create mode 100644 dom/webidl/SVGAnimatedRect.webidl create mode 100644 dom/webidl/SVGAnimatedString.webidl create mode 100644 dom/webidl/SVGAnimatedTransformList.webidl create mode 100644 dom/webidl/SVGAnimationElement.webidl create mode 100644 dom/webidl/SVGCircleElement.webidl create mode 100644 dom/webidl/SVGClipPathElement.webidl create mode 100644 dom/webidl/SVGComponentTransferFunctionElement.webidl create mode 100644 dom/webidl/SVGDefsElement.webidl create mode 100644 dom/webidl/SVGDescElement.webidl create mode 100644 dom/webidl/SVGElement.webidl create mode 100644 dom/webidl/SVGEllipseElement.webidl create mode 100644 dom/webidl/SVGFEBlendElement.webidl create mode 100644 dom/webidl/SVGFEColorMatrixElement.webidl create mode 100644 dom/webidl/SVGFEComponentTransferElement.webidl create mode 100644 dom/webidl/SVGFECompositeElement.webidl create mode 100644 dom/webidl/SVGFEConvolveMatrixElement.webidl create mode 100644 dom/webidl/SVGFEDiffuseLightingElement.webidl create mode 100644 dom/webidl/SVGFEDisplacementMapElement.webidl create mode 100644 dom/webidl/SVGFEDistantLightElement.webidl create mode 100644 dom/webidl/SVGFEDropShadowElement.webidl create mode 100644 dom/webidl/SVGFEFloodElement.webidl create mode 100644 dom/webidl/SVGFEFuncAElement.webidl create mode 100644 dom/webidl/SVGFEFuncBElement.webidl create mode 100644 dom/webidl/SVGFEFuncGElement.webidl create mode 100644 dom/webidl/SVGFEFuncRElement.webidl create mode 100644 dom/webidl/SVGFEGaussianBlurElement.webidl create mode 100644 dom/webidl/SVGFEImageElement.webidl create mode 100644 dom/webidl/SVGFEMergeElement.webidl create mode 100644 dom/webidl/SVGFEMergeNodeElement.webidl create mode 100644 dom/webidl/SVGFEMorphologyElement.webidl create mode 100644 dom/webidl/SVGFEOffsetElement.webidl create mode 100644 dom/webidl/SVGFEPointLightElement.webidl create mode 100644 dom/webidl/SVGFESpecularLightingElement.webidl create mode 100644 dom/webidl/SVGFESpotLightElement.webidl create mode 100644 dom/webidl/SVGFETileElement.webidl create mode 100644 dom/webidl/SVGFETurbulenceElement.webidl create mode 100644 dom/webidl/SVGFilterElement.webidl create mode 100644 dom/webidl/SVGFilterPrimitiveStandardAttributes.webidl create mode 100644 dom/webidl/SVGFitToViewBox.webidl create mode 100644 dom/webidl/SVGForeignObjectElement.webidl create mode 100644 dom/webidl/SVGGElement.webidl create mode 100644 dom/webidl/SVGGeometryElement.webidl create mode 100644 dom/webidl/SVGGradientElement.webidl create mode 100644 dom/webidl/SVGGraphicsElement.webidl create mode 100644 dom/webidl/SVGImageElement.webidl create mode 100644 dom/webidl/SVGLength.webidl create mode 100644 dom/webidl/SVGLengthList.webidl create mode 100644 dom/webidl/SVGLineElement.webidl create mode 100644 dom/webidl/SVGLinearGradientElement.webidl create mode 100644 dom/webidl/SVGMPathElement.webidl create mode 100644 dom/webidl/SVGMarkerElement.webidl create mode 100644 dom/webidl/SVGMaskElement.webidl create mode 100644 dom/webidl/SVGMatrix.webidl create mode 100644 dom/webidl/SVGMetadataElement.webidl create mode 100644 dom/webidl/SVGNumber.webidl create mode 100644 dom/webidl/SVGNumberList.webidl create mode 100644 dom/webidl/SVGPathElement.webidl create mode 100644 dom/webidl/SVGPathSeg.webidl create mode 100644 dom/webidl/SVGPathSegList.webidl create mode 100644 dom/webidl/SVGPatternElement.webidl create mode 100644 dom/webidl/SVGPoint.webidl create mode 100644 dom/webidl/SVGPointList.webidl create mode 100644 dom/webidl/SVGPolygonElement.webidl create mode 100644 dom/webidl/SVGPolylineElement.webidl create mode 100644 dom/webidl/SVGPreserveAspectRatio.webidl create mode 100644 dom/webidl/SVGRadialGradientElement.webidl create mode 100644 dom/webidl/SVGRect.webidl create mode 100644 dom/webidl/SVGRectElement.webidl create mode 100644 dom/webidl/SVGSVGElement.webidl create mode 100644 dom/webidl/SVGScriptElement.webidl create mode 100644 dom/webidl/SVGSetElement.webidl create mode 100644 dom/webidl/SVGStopElement.webidl create mode 100644 dom/webidl/SVGStringList.webidl create mode 100644 dom/webidl/SVGStyleElement.webidl create mode 100644 dom/webidl/SVGSwitchElement.webidl create mode 100644 dom/webidl/SVGSymbolElement.webidl create mode 100644 dom/webidl/SVGTSpanElement.webidl create mode 100644 dom/webidl/SVGTests.webidl create mode 100644 dom/webidl/SVGTextContentElement.webidl create mode 100644 dom/webidl/SVGTextElement.webidl create mode 100644 dom/webidl/SVGTextPathElement.webidl create mode 100644 dom/webidl/SVGTextPositioningElement.webidl create mode 100644 dom/webidl/SVGTitleElement.webidl create mode 100644 dom/webidl/SVGTransform.webidl create mode 100644 dom/webidl/SVGTransformList.webidl create mode 100644 dom/webidl/SVGURIReference.webidl create mode 100644 dom/webidl/SVGUnitTypes.webidl create mode 100644 dom/webidl/SVGUseElement.webidl create mode 100644 dom/webidl/SVGViewElement.webidl create mode 100644 dom/webidl/SVGZoomAndPan.webidl create mode 100644 dom/webidl/Sanitizer.webidl create mode 100644 dom/webidl/Screen.webidl create mode 100644 dom/webidl/ScreenOrientation.webidl create mode 100644 dom/webidl/ScriptProcessorNode.webidl create mode 100644 dom/webidl/ScrollAreaEvent.webidl create mode 100644 dom/webidl/ScrollViewChangeEvent.webidl create mode 100644 dom/webidl/SecurityPolicyViolationEvent.webidl create mode 100644 dom/webidl/Selection.webidl create mode 100644 dom/webidl/ServiceWorker.webidl create mode 100644 dom/webidl/ServiceWorkerContainer.webidl create mode 100644 dom/webidl/ServiceWorkerGlobalScope.webidl create mode 100644 dom/webidl/ServiceWorkerRegistration.webidl create mode 100644 dom/webidl/ShadowRealmGlobalScope.webidl create mode 100644 dom/webidl/ShadowRoot.webidl create mode 100644 dom/webidl/SharedWorker.webidl create mode 100644 dom/webidl/SharedWorkerGlobalScope.webidl create mode 100644 dom/webidl/SimpleGestureEvent.webidl create mode 100644 dom/webidl/SocketCommon.webidl create mode 100644 dom/webidl/SourceBuffer.webidl create mode 100644 dom/webidl/SourceBufferList.webidl create mode 100644 dom/webidl/SpeechGrammar.webidl create mode 100644 dom/webidl/SpeechGrammarList.webidl create mode 100644 dom/webidl/SpeechRecognition.webidl create mode 100644 dom/webidl/SpeechRecognitionAlternative.webidl create mode 100644 dom/webidl/SpeechRecognitionError.webidl create mode 100644 dom/webidl/SpeechRecognitionEvent.webidl create mode 100644 dom/webidl/SpeechRecognitionResult.webidl create mode 100644 dom/webidl/SpeechRecognitionResultList.webidl create mode 100644 dom/webidl/SpeechSynthesis.webidl create mode 100644 dom/webidl/SpeechSynthesisErrorEvent.webidl create mode 100644 dom/webidl/SpeechSynthesisEvent.webidl create mode 100644 dom/webidl/SpeechSynthesisUtterance.webidl create mode 100644 dom/webidl/SpeechSynthesisVoice.webidl create mode 100644 dom/webidl/StaticRange.webidl create mode 100644 dom/webidl/StereoPannerNode.webidl create mode 100644 dom/webidl/Storage.webidl create mode 100644 dom/webidl/StorageEvent.webidl create mode 100644 dom/webidl/StorageManager.webidl create mode 100644 dom/webidl/StreamFilter.webidl create mode 100644 dom/webidl/StreamFilterDataEvent.webidl create mode 100644 dom/webidl/StructuredCloneTester.webidl create mode 100644 dom/webidl/StyleSheet.webidl create mode 100644 dom/webidl/StyleSheetApplicableStateChangeEvent.webidl create mode 100644 dom/webidl/StyleSheetList.webidl create mode 100644 dom/webidl/SubmitEvent.webidl create mode 100644 dom/webidl/SubtleCrypto.webidl create mode 100644 dom/webidl/TCPServerSocket.webidl create mode 100644 dom/webidl/TCPServerSocketEvent.webidl create mode 100644 dom/webidl/TCPSocket.webidl create mode 100644 dom/webidl/TCPSocketErrorEvent.webidl create mode 100644 dom/webidl/TCPSocketEvent.webidl create mode 100644 dom/webidl/TaskPriorityChangeEvent.webidl create mode 100644 dom/webidl/TestFunctions.webidl create mode 100644 dom/webidl/TestInterfaceJS.webidl create mode 100644 dom/webidl/TestInterfaceJSDictionaries.webidl create mode 100644 dom/webidl/TestInterfaceJSMaplikeSetlikeIterable.webidl create mode 100644 dom/webidl/TestInterfaceObservableArray.webidl create mode 100644 dom/webidl/TestUtils.webidl create mode 100644 dom/webidl/Text.webidl create mode 100644 dom/webidl/TextClause.webidl create mode 100644 dom/webidl/TextDecoder.webidl create mode 100644 dom/webidl/TextDecoderStream.webidl create mode 100644 dom/webidl/TextEncoder.webidl create mode 100644 dom/webidl/TextEncoderStream.webidl create mode 100644 dom/webidl/TextTrack.webidl create mode 100644 dom/webidl/TextTrackCue.webidl create mode 100644 dom/webidl/TextTrackCueList.webidl create mode 100644 dom/webidl/TextTrackList.webidl create mode 100644 dom/webidl/TimeEvent.webidl create mode 100644 dom/webidl/TimeRanges.webidl create mode 100644 dom/webidl/ToggleEvent.webidl create mode 100644 dom/webidl/Touch.webidl create mode 100644 dom/webidl/TouchEvent.webidl create mode 100644 dom/webidl/TouchList.webidl create mode 100644 dom/webidl/TrackEvent.webidl create mode 100644 dom/webidl/TransformStream.webidl create mode 100644 dom/webidl/TransformStreamDefaultController.webidl create mode 100644 dom/webidl/Transformer.webidl create mode 100644 dom/webidl/TransitionEvent.webidl create mode 100644 dom/webidl/TreeColumn.webidl create mode 100644 dom/webidl/TreeColumns.webidl create mode 100644 dom/webidl/TreeContentView.webidl create mode 100644 dom/webidl/TreeView.webidl create mode 100644 dom/webidl/TreeWalker.webidl create mode 100644 dom/webidl/UDPMessageEvent.webidl create mode 100644 dom/webidl/UDPSocket.webidl create mode 100644 dom/webidl/UIEvent.webidl create mode 100644 dom/webidl/URL.webidl create mode 100644 dom/webidl/URLSearchParams.webidl create mode 100644 dom/webidl/UnderlyingSink.webidl create mode 100644 dom/webidl/UnderlyingSource.webidl create mode 100644 dom/webidl/UserProximityEvent.webidl create mode 100644 dom/webidl/VRDisplay.webidl create mode 100644 dom/webidl/VRDisplayEvent.webidl create mode 100644 dom/webidl/VRServiceTest.webidl create mode 100644 dom/webidl/VTTCue.webidl create mode 100644 dom/webidl/VTTRegion.webidl create mode 100644 dom/webidl/ValidityState.webidl create mode 100644 dom/webidl/VideoColorSpace.webidl create mode 100644 dom/webidl/VideoFrame.webidl create mode 100644 dom/webidl/VideoPlaybackQuality.webidl create mode 100644 dom/webidl/VideoTrack.webidl create mode 100644 dom/webidl/VideoTrackList.webidl create mode 100644 dom/webidl/VisualViewport.webidl create mode 100644 dom/webidl/WaveShaperNode.webidl create mode 100644 dom/webidl/WebAuthentication.webidl create mode 100644 dom/webidl/WebGL2RenderingContext.webidl create mode 100644 dom/webidl/WebGLContextEvent.webidl create mode 100644 dom/webidl/WebGLRenderingContext.webidl create mode 100644 dom/webidl/WebGPU.webidl create mode 100644 dom/webidl/WebSocket.webidl create mode 100644 dom/webidl/WebTaskScheduling.webidl create mode 100644 dom/webidl/WebTransport.webidl create mode 100644 dom/webidl/WebTransportDatagramDuplexStream.webidl create mode 100644 dom/webidl/WebTransportError.webidl create mode 100644 dom/webidl/WebTransportSendReceiveStream.webidl create mode 100644 dom/webidl/WebXR.webidl create mode 100644 dom/webidl/WebrtcGlobalInformation.webidl create mode 100644 dom/webidl/WheelEvent.webidl create mode 100644 dom/webidl/WidevineCDMManifest.webidl create mode 100644 dom/webidl/Window.webidl create mode 100644 dom/webidl/WindowOrWorkerGlobalScope.webidl create mode 100644 dom/webidl/WindowRoot.webidl create mode 100644 dom/webidl/Worker.webidl create mode 100644 dom/webidl/WorkerDebuggerGlobalScope.webidl create mode 100644 dom/webidl/WorkerGlobalScope.webidl create mode 100644 dom/webidl/WorkerLocation.webidl create mode 100644 dom/webidl/WorkerNavigator.webidl create mode 100644 dom/webidl/WorkerTestUtils.webidl create mode 100644 dom/webidl/Worklet.webidl create mode 100644 dom/webidl/WorkletGlobalScope.webidl create mode 100644 dom/webidl/WritableStream.webidl create mode 100644 dom/webidl/WritableStreamDefaultController.webidl create mode 100644 dom/webidl/WritableStreamDefaultWriter.webidl create mode 100644 dom/webidl/XMLDocument.webidl create mode 100644 dom/webidl/XMLHttpRequest.webidl create mode 100644 dom/webidl/XMLHttpRequestEventTarget.webidl create mode 100644 dom/webidl/XMLHttpRequestUpload.webidl create mode 100644 dom/webidl/XMLSerializer.webidl create mode 100644 dom/webidl/XPathEvaluator.webidl create mode 100644 dom/webidl/XPathExpression.webidl create mode 100644 dom/webidl/XPathNSResolver.webidl create mode 100644 dom/webidl/XPathResult.webidl create mode 100644 dom/webidl/XRInputSourceEvent.webidl create mode 100644 dom/webidl/XRInputSourcesChangeEvent.webidl create mode 100644 dom/webidl/XRReferenceSpaceEvent.webidl create mode 100644 dom/webidl/XRSessionEvent.webidl create mode 100644 dom/webidl/XSLTProcessor.webidl create mode 100644 dom/webidl/XULCommandEvent.webidl create mode 100644 dom/webidl/XULElement.webidl create mode 100644 dom/webidl/XULPopupElement.webidl create mode 100644 dom/webidl/XULResizerElement.webidl create mode 100644 dom/webidl/components.conf create mode 100644 dom/webidl/moz.build (limited to 'dom/webidl') diff --git a/dom/webidl/APZTestData.webidl b/dom/webidl/APZTestData.webidl new file mode 100644 index 0000000000..5926e591cd --- /dev/null +++ b/dom/webidl/APZTestData.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/. + */ + +/* + * 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 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 scrollFrames; +}; + +[Pref="apz.test.logging_enabled", + Exposed=Window] +namespace APZHitResultFlags { + // These constants should be kept in sync with mozilla::gfx::CompositorHitTestInfo + const unsigned short INVISIBLE = 0; + const unsigned short VISIBLE = 0x0001; + const unsigned short IRREGULAR_AREA = 0x0002; + const unsigned short APZ_AWARE_LISTENERS = 0x0004; + const unsigned short INACTIVE_SCROLLFRAME = 0x0008; + const unsigned short PAN_X_DISABLED = 0x0010; + const unsigned short PAN_Y_DISABLED = 0x0020; + const unsigned short PINCH_ZOOM_DISABLED = 0x0040; + const unsigned short DOUBLE_TAP_ZOOM_DISABLED = 0x0080; + const unsigned short SCROLLBAR = 0x0100; + const unsigned short SCROLLBAR_THUMB = 0x0200; + const unsigned short SCROLLBAR_VERTICAL = 0x0400; + const unsigned short REQUIRES_TARGET_CONFIRMATION = 0x0800; +}; + +dictionary APZHitResult { + float screenX; + float screenY; + unsigned short hitResult; // combination of the APZHitResultFlags.* flags + unsigned long long layersId; + unsigned long long scrollId; +}; + +dictionary APZSampledResult { + float scrollOffsetX; + float scrollOffsetY; + DOMHighResTimeStamp sampledTimeStamp; + unsigned long long layersId; + unsigned long long scrollId; +}; + +dictionary AdditionalDataEntry { + DOMString key; + DOMString value; +}; + +// All the paints and repaint requests. This is the top-level data structure. +[GenerateConversionToJS] +dictionary APZTestData { + sequence paints; + sequence repaintRequests; + sequence hitResults; + sequence sampledResults; + sequence additionalData; +}; + +// A frame uniformity measurement for every scrollable layer +dictionary FrameUniformity { + unsigned long layerAddress; + float frameUniformity; +}; + +[GenerateConversionToJS] +dictionary FrameUniformityResults { + sequence layerUniformities; +}; diff --git a/dom/webidl/AbortController.webidl b/dom/webidl/AbortController.webidl new file mode 100644 index 0000000000..2b172b7718 --- /dev/null +++ b/dom/webidl/AbortController.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://dom.spec.whatwg.org/#abortcontroller + */ + +[Exposed=(Window,Worker)] +interface AbortController { + [Throws] + constructor(); + + [SameObject] readonly attribute AbortSignal signal; + + undefined abort(optional any reason); +}; diff --git a/dom/webidl/AbortSignal.webidl b/dom/webidl/AbortSignal.webidl new file mode 100644 index 0000000000..5a87bc482c --- /dev/null +++ b/dom/webidl/AbortSignal.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://dom.spec.whatwg.org/#abortsignal + */ + +[Exposed=*] +interface AbortSignal : EventTarget { + [NewObject] static AbortSignal abort(optional any reason); + [Exposed=(Window,Worker), NewObject, Throws] + static AbortSignal timeout([EnforceRange] unsigned long long milliseconds); + + readonly attribute boolean aborted; + readonly attribute any reason; + [Throws] undefined throwIfAborted(); + + attribute EventHandler onabort; +}; diff --git a/dom/webidl/AbstractRange.webidl b/dom/webidl/AbstractRange.webidl new file mode 100644 index 0000000000..abd4789212 --- /dev/null +++ b/dom/webidl/AbstractRange.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://dom.spec.whatwg.org/#abstractrange + * + * Copyright 2012 W3C (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=Window] +interface AbstractRange { + [BinaryName="GetStartContainer"] + readonly attribute Node startContainer; + readonly attribute unsigned long startOffset; + [BinaryName="GetEndContainer"] + readonly attribute Node endContainer; + readonly attribute unsigned long endOffset; + readonly attribute boolean collapsed; +}; diff --git a/dom/webidl/AbstractWorker.webidl b/dom/webidl/AbstractWorker.webidl new file mode 100644 index 0000000000..28f5dce589 --- /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/. + */ + +[Exposed=(Window,Worker)] +interface mixin AbstractWorker { + attribute EventHandler onerror; +}; diff --git a/dom/webidl/AccessibilityRole.webidl b/dom/webidl/AccessibilityRole.webidl new file mode 100644 index 0000000000..e7da79d6be --- /dev/null +++ b/dom/webidl/AccessibilityRole.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://rawgit.com/w3c/aria/master/#AccessibilityRole + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +interface mixin AccessibilityRole { + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString role; +}; diff --git a/dom/webidl/AccessibleNode.webidl b/dom/webidl/AccessibleNode.webidl new file mode 100644 index 0000000000..fe1d843727 --- /dev/null +++ b/dom/webidl/AccessibleNode.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/. + */ + +[Func="mozilla::dom::AccessibleNode::IsAOMEnabled", + Exposed=Window] +interface AccessibleNode { + readonly attribute DOMString computedRole; + [Frozen, Cached, Pure] + readonly attribute sequence states; + [Frozen, Cached, Pure] + readonly attribute sequence attributes; + readonly attribute Node? DOMNode; + + boolean is(DOMString... states); + boolean has(DOMString... attributes); + [Throws] + any get(DOMString attribute); + + attribute DOMString? role; + attribute DOMString? roleDescription; + + // Accessible label and descriptor + attribute DOMString? label; + + // Global states and properties + attribute DOMString? current; + + // Accessible properties + attribute DOMString? autocomplete; + attribute DOMString? keyShortcuts; + attribute boolean? modal; + attribute boolean? multiline; + attribute boolean? multiselectable; + attribute DOMString? orientation; + attribute boolean? readOnly; + attribute boolean? required; + attribute DOMString? sort; + + // Range values + attribute DOMString? placeholder; + attribute double? valueMax; + attribute double? valueMin; + attribute double? valueNow; + attribute DOMString? valueText; + + // Accessible states + attribute DOMString? checked; + attribute boolean? disabled; + attribute boolean? expanded; + attribute DOMString? hasPopUp; + attribute boolean? hidden; + attribute DOMString? invalid; + attribute DOMString? pressed; + attribute boolean? selected; + + // Live regions + attribute boolean? atomic; + attribute boolean? busy; + attribute DOMString? live; + attribute DOMString? relevant; + + // Other relationships + attribute AccessibleNode? activeDescendant; + attribute AccessibleNode? details; + attribute AccessibleNode? errorMessage; + + // Collections. + attribute long? colCount; + attribute unsigned long? colIndex; + attribute unsigned long? colSpan; + attribute unsigned long? level; + attribute unsigned long? posInSet; + attribute long? rowCount; + attribute unsigned long? rowIndex; + attribute unsigned long? rowSpan; + attribute long? setSize; +}; diff --git a/dom/webidl/AddonEvent.webidl b/dom/webidl/AddonEvent.webidl new file mode 100644 index 0000000000..0f0e916e4d --- /dev/null +++ b/dom/webidl/AddonEvent.webidl @@ -0,0 +1,11 @@ +[Func="mozilla::AddonManagerWebAPI::IsAPIEnabled", + Exposed=Window] +interface AddonEvent : Event { + constructor(DOMString type, AddonEventInit eventInitDict); + + readonly attribute DOMString id; +}; + +dictionary AddonEventInit : EventInit { + required DOMString id; +}; diff --git a/dom/webidl/AddonManager.webidl b/dom/webidl/AddonManager.webidl new file mode 100644 index 0000000000..d392b90fb9 --- /dev/null +++ b/dom/webidl/AddonManager.webidl @@ -0,0 +1,106 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.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", + Exposed=Window] +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 uninstall(); + Promise setEnabled(boolean value); +}; + +[ChromeOnly, JSImplementation="dummy", + Exposed=Window] +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 install(); + Promise 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", + JSImplementation="@mozilla.org/addon-web-api/manager;1", + WantsEventListenerHooks, + Exposed=Window] +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 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 createInstall(optional addonInstallOptions options = {}); + + /** + * Opens an Abuse Report dialog window for the addon with the given id. + * The addon may be currently installed (in which case the report will + * include the details available locally), or not (in which case the report + * will include the details that can be retrieved from the AMO API endpoint). + * + * @param id + * The ID of the add-on to report. + * @return A promise that resolves to a boolean (true when the report + * has been submitted successfully, false if the user cancelled + * the report). The Promise is rejected is the report fails + * for a reason other than user cancellation. + */ + Promise reportAbuse(DOMString id); + + // Indicator to content whether handing off the reports to the integrated + // abuse report panel is enabled. + readonly attribute boolean abuseReportPanelEnabled; +}; + +[ChromeOnly,Exposed=Window,HeaderFile="mozilla/AddonManagerWebAPI.h"] +namespace AddonManagerPermissions { + boolean isHostPermitted(DOMString host); +}; diff --git a/dom/webidl/AnalyserNode.webidl b/dom/webidl/AnalyserNode.webidl new file mode 100644 index 0000000000..e7ed151d9d --- /dev/null +++ b/dom/webidl/AnalyserNode.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 + * 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 AnalyserOptions : AudioNodeOptions { + unsigned long fftSize = 2048; + double maxDecibels = -30; + double minDecibels = -100; + double smoothingTimeConstant = 0.8; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface AnalyserNode : AudioNode { + [Throws] + constructor(BaseAudioContext context, + optional AnalyserOptions options = {}); + + // Real-time frequency-domain data + undefined getFloatFrequencyData(Float32Array array); + undefined getByteFrequencyData(Uint8Array array); + + // Real-time waveform data + undefined getFloatTimeDomainData(Float32Array array); + undefined 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 includes AudioNodePassThrough; diff --git a/dom/webidl/Animatable.webidl b/dom/webidl/Animatable.webidl new file mode 100644 index 0000000000..432c9ca856 --- /dev/null +++ b/dom/webidl/Animatable.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/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 GetAnimationsOptions { + boolean subtree = false; +}; + +interface mixin Animatable { + [Throws] + Animation animate(object? keyframes, + optional UnrestrictedDoubleOrKeyframeAnimationOptions options = {}); + [Func="Document::IsWebAnimationsGetAnimationsEnabled"] + sequence getAnimations(optional GetAnimationsOptions options = {}); +}; diff --git a/dom/webidl/Animation.webidl b/dom/webidl/Animation.webidl new file mode 100644 index 0000000000..ae4403380c --- /dev/null +++ b/dom/webidl/Animation.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 + * https://drafts.csswg.org/web-animations/#animation + * + * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +enum AnimationPlayState { "idle", "running", "paused", "finished" }; + +enum AnimationReplaceState { "active", "removed", "persisted" }; + +[Exposed=Window] +interface Animation : EventTarget { + [Throws] + constructor(optional AnimationEffect? effect = null, + optional AnimationTimeline? timeline); + + attribute DOMString id; + [Func="Document::IsWebAnimationsEnabled", Pure] + attribute AnimationEffect? effect; + // Bug 1676794. Drop BinaryName once we support ScrollTimeline interface. + [Func="Document::AreWebAnimationsTimelinesEnabled", + BinaryName="timelineFromJS"] + attribute AnimationTimeline? timeline; + + [BinaryName="startTimeAsDouble"] + attribute double? startTime; + [SetterThrows, BinaryName="currentTimeAsDouble"] + attribute double? currentTime; + + attribute double playbackRate; + [BinaryName="playStateFromJS"] + readonly attribute AnimationPlayState playState; + [BinaryName="pendingFromJS"] + readonly attribute boolean pending; + [Pref="dom.animations-api.autoremove.enabled"] + readonly attribute AnimationReplaceState replaceState; + [Func="Document::IsWebAnimationsEnabled", Throws] + readonly attribute Promise ready; + [Func="Document::IsWebAnimationsEnabled", Throws] + readonly attribute Promise finished; + attribute EventHandler onfinish; + attribute EventHandler oncancel; + [Pref="dom.animations-api.autoremove.enabled"] + attribute EventHandler onremove; + undefined cancel(); + [Throws] + undefined finish(); + [Throws, BinaryName="playFromJS"] + undefined play(); + [Throws, BinaryName="pauseFromJS"] + undefined pause(); + undefined updatePlaybackRate (double playbackRate); + [Throws] + undefined reverse(); + [Pref="dom.animations-api.autoremove.enabled"] + undefined persist(); + [CEReactions, Pref="dom.animations-api.autoremove.enabled", Throws] + undefined commitStyles(); +}; + +// Non-standard extensions +partial interface Animation { + [ChromeOnly] readonly attribute boolean isRunningOnCompositor; +}; diff --git a/dom/webidl/AnimationEffect.webidl b/dom/webidl/AnimationEffect.webidl new file mode 100644 index 0000000000..9e93c1f693 --- /dev/null +++ b/dom/webidl/AnimationEffect.webidl @@ -0,0 +1,66 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL 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/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 EffectTiming { + 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"; + UTF8String easing = "linear"; +}; + +dictionary OptionalEffectTiming { + double delay; + double endDelay; + FillMode fill; + double iterationStart; + unrestricted double iterations; + (unrestricted double or DOMString) duration; + PlaybackDirection direction; + UTF8String easing; +}; + +dictionary ComputedEffectTiming : EffectTiming { + unrestricted double endTime = 0.0; + unrestricted double activeDuration = 0.0; + double? localTime = null; + double? progress = null; + unrestricted double? currentIteration = null; +}; + +[Func="Document::IsWebAnimationsEnabled", + Exposed=Window] +interface AnimationEffect { + EffectTiming getTiming(); + [BinaryName="getComputedTimingAsDict"] + ComputedEffectTiming getComputedTiming(); + [Throws] + undefined updateTiming(optional OptionalEffectTiming timing = {}); +}; diff --git a/dom/webidl/AnimationEvent.webidl b/dom/webidl/AnimationEvent.webidl new file mode 100644 index 0000000000..ae401948a7 --- /dev/null +++ b/dom/webidl/AnimationEvent.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/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. + */ + +[Exposed=Window] +interface AnimationEvent : Event { + constructor(DOMString type, optional AnimationEventInit eventInitDict = {}); + + 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/AnimationFrameProvider.webidl b/dom/webidl/AnimationFrameProvider.webidl new file mode 100644 index 0000000000..2932698c3b --- /dev/null +++ b/dom/webidl/AnimationFrameProvider.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://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames + */ + +callback FrameRequestCallback = undefined (DOMHighResTimeStamp time); + +interface mixin AnimationFrameProvider { + [Throws] long requestAnimationFrame(FrameRequestCallback callback); + [Throws] undefined cancelAnimationFrame(long handle); +}; diff --git a/dom/webidl/AnimationPlaybackEvent.webidl b/dom/webidl/AnimationPlaybackEvent.webidl new file mode 100644 index 0000000000..c88aea7b98 --- /dev/null +++ b/dom/webidl/AnimationPlaybackEvent.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://drafts.csswg.org/web-animations/#animationplaybackevent + * + * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Func="Document::IsWebAnimationsEnabled", + Exposed=Window] +interface AnimationPlaybackEvent : Event { + constructor(DOMString type, + optional AnimationPlaybackEventInit eventInitDict = {}); + + 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 0000000000..5b46c9cf95 --- /dev/null +++ b/dom/webidl/AnimationTimeline.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://drafts.csswg.org/web-animations/#animationtimeline + * + * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Func="Document::AreWebAnimationsTimelinesEnabled", + Exposed=Window] +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 0000000000..3dd6fd0264 --- /dev/null +++ b/dom/webidl/AnonymousContent.webidl @@ -0,0 +1,100 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.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, Exposed=Window] +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] + undefined 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. + */ + [NeedsSubjectPrincipal=NonSystem, Throws] + undefined setAttributeForElement(DOMString elementId, + DOMString attributeName, + DOMString value); + + /** + * Remove an attribute from an element inside this custom anonymous content. + */ + [Throws] + undefined removeAttributeForElement(DOMString elementId, + DOMString attributeName); + + /** + * Get the canvas' context for the element specified if it's a + * node, `null` otherwise. + */ + [Throws] + nsISupports? getCanvasContext(DOMString elementId, + DOMString contextId); + + [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] + undefined setCutoutRectsForElement(DOMString elementId, + sequence rects); + + /** + * Get the computed value of a property on an element inside this custom + * anonymous content. + */ + [Throws] + UTF8String? getComputedStylePropertyValue(DOMString elementId, + UTF8String propertyName); + + /** + * If event's original target is in the anonymous content, this returns the id + * attribute value of the target. + */ + DOMString? getTargetIdForEvent(Event event); + + /** + * Set given style to this AnonymousContent. + */ + [Throws] + undefined setStyle(UTF8String property, UTF8String value); +}; diff --git a/dom/webidl/AppInfo.webidl b/dom/webidl/AppInfo.webidl new file mode 100644 index 0000000000..a4f44d46c2 --- /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 0000000000..809857e59b --- /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 = {}; +}; diff --git a/dom/webidl/AriaAttributes.webidl b/dom/webidl/AriaAttributes.webidl new file mode 100644 index 0000000000..6121002bb3 --- /dev/null +++ b/dom/webidl/AriaAttributes.webidl @@ -0,0 +1,136 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL 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://rawgit.com/w3c/aria/master/#AriaAttributes + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +interface mixin AriaAttributes { + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaAtomic; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaAutoComplete; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaBusy; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaChecked; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaColCount; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaColIndex; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaColIndexText; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaColSpan; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaCurrent; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaDescription; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaDisabled; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaExpanded; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaHasPopup; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaHidden; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaInvalid; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaKeyShortcuts; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaLabel; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaLevel; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaLive; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaModal; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaMultiLine; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaMultiSelectable; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaOrientation; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaPlaceholder; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaPosInSet; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaPressed; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaReadOnly; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaRelevant; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaRequired; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaRoleDescription; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaRowCount; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaRowIndex; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaRowIndexText; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaRowSpan; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaSelected; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaSetSize; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaSort; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaValueMax; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaValueMin; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaValueNow; + + [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] + attribute DOMString ariaValueText; +}; diff --git a/dom/webidl/Attr.webidl b/dom/webidl/Attr.webidl new file mode 100644 index 0000000000..52759b29ba --- /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. + */ + +[Exposed=Window] +interface Attr : Node { + readonly attribute DOMString localName; + [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, 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 { + readonly attribute Element? ownerElement; +}; diff --git a/dom/webidl/AudioBuffer.webidl b/dom/webidl/AudioBuffer.webidl new file mode 100644 index 0000000000..f94cf43f9c --- /dev/null +++ b/dom/webidl/AudioBuffer.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://webaudio.github.io/web-audio-api/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +dictionary AudioBufferOptions { + unsigned long numberOfChannels = 1; + required unsigned long length; + required float sampleRate; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface AudioBuffer { + [Throws] + constructor(AudioBufferOptions options); + + 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] + undefined copyFromChannel(Float32Array destination, unsigned long channelNumber, optional unsigned long startInChannel = 0); + [Throws] + undefined copyToChannel(Float32Array source, unsigned long channelNumber, optional unsigned long startInChannel = 0); +}; diff --git a/dom/webidl/AudioBufferSourceNode.webidl b/dom/webidl/AudioBufferSourceNode.webidl new file mode 100644 index 0000000000..7c0f91441a --- /dev/null +++ b/dom/webidl/AudioBufferSourceNode.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://webaudio.github.io/web-audio-api/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +dictionary AudioBufferSourceOptions { + AudioBuffer? buffer; + float detune = 0; + boolean loop = false; + double loopEnd = 0; + double loopStart = 0; + float playbackRate = 1; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface AudioBufferSourceNode : AudioScheduledSourceNode { + constructor(BaseAudioContext context, + optional AudioBufferSourceOptions options = {}); + + [SetterThrows] + attribute AudioBuffer? buffer; + + readonly attribute AudioParam playbackRate; + readonly attribute AudioParam detune; + + attribute boolean loop; + attribute double loopStart; + attribute double loopEnd; + + [Throws] + undefined start(optional double when = 0, optional double grainOffset = 0, + optional double grainDuration); +}; + +// Mozilla extensions +AudioBufferSourceNode includes AudioNodePassThrough; diff --git a/dom/webidl/AudioContext.webidl b/dom/webidl/AudioContext.webidl new file mode 100644 index 0000000000..804cb127a7 --- /dev/null +++ b/dom/webidl/AudioContext.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://webaudio.github.io/web-audio-api/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +dictionary AudioContextOptions { + float sampleRate; +}; + +dictionary AudioTimestamp { + double contextTime; + DOMHighResTimeStamp performanceTime; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface AudioContext : BaseAudioContext { + [Throws] + constructor(optional AudioContextOptions contextOptions = {}); + + readonly attribute double baseLatency; + readonly attribute double outputLatency; + AudioTimestamp getOutputTimestamp(); + + [NewObject] + Promise suspend(); + [NewObject] + Promise close(); + + [NewObject, Throws] + MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); + + [NewObject, Throws] + MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream); + + [NewObject, Throws] + MediaStreamTrackAudioSourceNode createMediaStreamTrackSource(MediaStreamTrack mediaStreamTrack); + + [NewObject, Throws] + MediaStreamAudioDestinationNode createMediaStreamDestination(); +}; diff --git a/dom/webidl/AudioDestinationNode.webidl b/dom/webidl/AudioDestinationNode.webidl new file mode 100644 index 0000000000..1e27b141ad --- /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", + Exposed=Window] +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 0000000000..8b9acc3dff --- /dev/null +++ b/dom/webidl/AudioListener.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", + Exposed=Window] +interface AudioListener { + // Uses a 3D cartesian coordinate system + undefined setPosition(double x, double y, double z); + undefined setOrientation(double x, double y, double z, double xUp, double yUp, double zUp); +}; diff --git a/dom/webidl/AudioNode.webidl b/dom/webidl/AudioNode.webidl new file mode 100644 index 0000000000..fbeed0e0b6 --- /dev/null +++ b/dom/webidl/AudioNode.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 + * 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" +}; + +dictionary AudioNodeOptions { + unsigned long channelCount; + ChannelCountMode channelCountMode; + ChannelInterpretation channelInterpretation; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface AudioNode : EventTarget { + + [Throws] + AudioNode connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0); + [Throws] + undefined connect(AudioParam destination, optional unsigned long output = 0); + [Throws] + undefined disconnect(); + [Throws] + undefined disconnect(unsigned long output); + [Throws] + undefined disconnect(AudioNode destination); + [Throws] + undefined disconnect(AudioNode destination, unsigned long output); + [Throws] + undefined disconnect(AudioNode destination, unsigned long output, unsigned long input); + [Throws] + undefined disconnect(AudioParam destination); + [Throws] + undefined disconnect(AudioParam destination, unsigned long output); + + readonly attribute BaseAudioContext 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, BinaryName="channelCountModeValue"] + attribute ChannelCountMode channelCountMode; + [SetterThrows, BinaryName="channelInterpretationValue"] + attribute ChannelInterpretation channelInterpretation; + +}; + +// Mozilla extension +partial interface AudioNode { + [ChromeOnly] + readonly attribute unsigned long id; +}; +interface mixin AudioNodePassThrough { + [ChromeOnly] + attribute boolean passThrough; +}; diff --git a/dom/webidl/AudioParam.webidl b/dom/webidl/AudioParam.webidl new file mode 100644 index 0000000000..e9b2b30ea6 --- /dev/null +++ b/dom/webidl/AudioParam.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://webaudio.github.io/web-audio-api/#enumdef-automationrate + * https://webaudio.github.io/web-audio-api/#audioparam + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +enum AutomationRate { + "a-rate", + "k-rate" +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface AudioParam { + [SetterThrows] + attribute float value; + readonly attribute float defaultValue; + readonly attribute float minValue; + readonly attribute float maxValue; + + // 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(sequence 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; +}; + +partial interface AudioParam { + // This attribute is used for mochitest only. + [ChromeOnly] + readonly attribute boolean isTrackSuspended; +}; diff --git a/dom/webidl/AudioParamDescriptor.webidl b/dom/webidl/AudioParamDescriptor.webidl new file mode 100644 index 0000000000..de2b007da0 --- /dev/null +++ b/dom/webidl/AudioParamDescriptor.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/#dictdef-audioparamdescriptor + * + * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[GenerateInit] +dictionary AudioParamDescriptor { + required DOMString name; + float defaultValue = 0; + float minValue = -3.4028235e38; + float maxValue = 3.4028235e38; + // AutomationRate for AudioWorklet is not needed until bug 1504984 is + // implemented + // AutomationRate automationRate = "a-rate"; +}; diff --git a/dom/webidl/AudioParamMap.webidl b/dom/webidl/AudioParamMap.webidl new file mode 100644 index 0000000000..d2e1821329 --- /dev/null +++ b/dom/webidl/AudioParamMap.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/#audioparammap + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[SecureContext, Pref="dom.audioworklet.enabled", + Exposed=Window] +interface AudioParamMap { + readonly maplike; +}; diff --git a/dom/webidl/AudioProcessingEvent.webidl b/dom/webidl/AudioProcessingEvent.webidl new file mode 100644 index 0000000000..ea86cff7eb --- /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", + Exposed=Window] +interface AudioProcessingEvent : Event { + + readonly attribute double playbackTime; + + [Throws] + readonly attribute AudioBuffer inputBuffer; + [Throws] + readonly attribute AudioBuffer outputBuffer; + +}; diff --git a/dom/webidl/AudioScheduledSourceNode.webidl b/dom/webidl/AudioScheduledSourceNode.webidl new file mode 100644 index 0000000000..1b383f3e65 --- /dev/null +++ b/dom/webidl/AudioScheduledSourceNode.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://webaudio.github.io/web-audio-api/#idl-def-AudioScheduledSourceNode + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=Window] +interface AudioScheduledSourceNode : AudioNode { + attribute EventHandler onended; + [Throws] + undefined start (optional double when = 0); + + [Throws] + undefined stop (optional double when = 0); +}; diff --git a/dom/webidl/AudioTrack.webidl b/dom/webidl/AudioTrack.webidl new file mode 100644 index 0000000000..0f1ba81a24 --- /dev/null +++ b/dom/webidl/AudioTrack.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/#audiotrack + */ + +[Pref="media.track.enabled", + Exposed=Window] +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 0000000000..0a56d3ab3f --- /dev/null +++ b/dom/webidl/AudioTrackList.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/#audiotracklist + */ + +[Pref="media.track.enabled", + Exposed=Window] +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/AudioWorklet.webidl b/dom/webidl/AudioWorklet.webidl new file mode 100644 index 0000000000..32e48facb3 --- /dev/null +++ b/dom/webidl/AudioWorklet.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://webaudio.github.io/web-audio-api/ + * + * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=Window, SecureContext, Pref="dom.audioworklet.enabled"] +interface AudioWorklet : Worklet { +}; diff --git a/dom/webidl/AudioWorkletGlobalScope.webidl b/dom/webidl/AudioWorkletGlobalScope.webidl new file mode 100644 index 0000000000..b88ac82c66 --- /dev/null +++ b/dom/webidl/AudioWorkletGlobalScope.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/#audioworkletglobalscope + */ + +callback constructor AudioWorkletProcessorConstructor = AudioWorkletProcessor (object options); + +[Global=(Worklet,AudioWorklet),Exposed=AudioWorklet] +interface AudioWorkletGlobalScope : WorkletGlobalScope { + [Throws] + undefined registerProcessor (DOMString name, AudioWorkletProcessorConstructor processorCtor); + readonly attribute unsigned long long currentFrame; + readonly attribute double currentTime; + readonly attribute float sampleRate; +}; diff --git a/dom/webidl/AudioWorkletNode.webidl b/dom/webidl/AudioWorkletNode.webidl new file mode 100644 index 0000000000..929d4f9281 --- /dev/null +++ b/dom/webidl/AudioWorkletNode.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 + * https://webaudio.github.io/web-audio-api/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[GenerateConversionToJS] +dictionary AudioWorkletNodeOptions : AudioNodeOptions { + unsigned long numberOfInputs = 1; + unsigned long numberOfOutputs = 1; + sequence outputChannelCount; + record parameterData; + object processorOptions; +}; + +[SecureContext, Pref="dom.audioworklet.enabled", + Exposed=Window] +interface AudioWorkletNode : AudioNode { + [Throws] + constructor(BaseAudioContext context, DOMString name, + optional AudioWorkletNodeOptions options = {}); + + [Throws] + readonly attribute AudioParamMap parameters; + readonly attribute MessagePort port; + attribute EventHandler onprocessorerror; +}; diff --git a/dom/webidl/AudioWorkletProcessor.webidl b/dom/webidl/AudioWorkletProcessor.webidl new file mode 100644 index 0000000000..3cbb226a76 --- /dev/null +++ b/dom/webidl/AudioWorkletProcessor.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/#audioworkletprocessor + * + * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=AudioWorklet] +interface AudioWorkletProcessor { + [Throws] + constructor(); + + readonly attribute MessagePort port; +}; diff --git a/dom/webidl/AutocompleteInfo.webidl b/dom/webidl/AutocompleteInfo.webidl new file mode 100644 index 0000000000..ebf2a3292c --- /dev/null +++ b/dom/webidl/AutocompleteInfo.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/. + */ + +/** + * This dictionary is used for the input, textarea and select element's + * getAutocompleteInfo method. + */ + +dictionary AutocompleteInfo { + DOMString section = ""; + DOMString addressType = ""; + DOMString contactType = ""; + DOMString fieldName = ""; + boolean canAutomaticallyPersist = true; +}; diff --git a/dom/webidl/BarProp.webidl b/dom/webidl/BarProp.webidl new file mode 100644 index 0000000000..ccbeccca33 --- /dev/null +++ b/dom/webidl/BarProp.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/. + */ + +[Exposed=Window] +interface BarProp +{ + [Throws, NeedsCallerType] + attribute boolean visible; +}; diff --git a/dom/webidl/BaseAudioContext.webidl b/dom/webidl/BaseAudioContext.webidl new file mode 100644 index 0000000000..509f039684 --- /dev/null +++ b/dom/webidl/BaseAudioContext.webidl @@ -0,0 +1,102 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL 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/#idl-def-BaseAudioContext + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +callback DecodeSuccessCallback = undefined (AudioBuffer decodedData); +callback DecodeErrorCallback = undefined (DOMException error); + +enum AudioContextState { + "suspended", + "running", + "closed" +}; + +[Exposed=Window] +interface BaseAudioContext : EventTarget { + readonly attribute AudioDestinationNode destination; + readonly attribute float sampleRate; + readonly attribute double currentTime; + readonly attribute AudioListener listener; + readonly attribute AudioContextState state; + [Throws, SameObject, SecureContext, Pref="dom.audioworklet.enabled"] + readonly attribute AudioWorklet audioWorklet; + + [NewObject] + Promise resume(); + + attribute EventHandler onstatechange; + + [NewObject, Throws] + AudioBuffer createBuffer (unsigned long numberOfChannels, + unsigned long length, + float sampleRate); + + [NewObject] + Promise decodeAudioData(ArrayBuffer audioData, + optional DecodeSuccessCallback successCallback, + optional DecodeErrorCallback errorCallback); + + // AudioNode creation + [NewObject] + AudioBufferSourceNode createBufferSource(); + + [NewObject] + ConstantSourceNode createConstantSource(); + + [NewObject, Throws] + ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0, + optional unsigned long numberOfInputChannels = 2, + optional unsigned long numberOfOutputChannels = 2); + + [NewObject, Throws] + AnalyserNode createAnalyser(); + + [NewObject, Throws] + GainNode createGain(); + + [NewObject, Throws] + DelayNode createDelay(optional double maxDelayTime = 1); // TODO: no = 1 + + [NewObject, Throws] + BiquadFilterNode createBiquadFilter(); + + [NewObject, Throws] + IIRFilterNode createIIRFilter(sequence feedforward, sequence feedback); + + [NewObject, Throws] + WaveShaperNode createWaveShaper(); + + [NewObject, Throws] + PannerNode createPanner(); + + [NewObject, Throws] + StereoPannerNode createStereoPanner(); + + [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(sequence real, + sequence imag, + optional PeriodicWaveConstraints constraints = {}); +}; diff --git a/dom/webidl/BaseKeyframeTypes.webidl b/dom/webidl/BaseKeyframeTypes.webidl new file mode 100644 index 0000000000..a6e94b1e3a --- /dev/null +++ b/dom/webidl/BaseKeyframeTypes.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 + * https://drafts.csswg.org/web-animations/#the-compositeoperation-enumeration + * https://drafts.csswg.org/web-animations/#dictdef-basepropertyindexedkeyframe + * https://drafts.csswg.org/web-animations/#dictdef-basekeyframe + * https://drafts.csswg.org/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" }; + +// NOTE: The order of the values in this enum are important. +// +// We assume that CompositeOperation is a subset of CompositeOperationOrAuto so +// that we can cast between the two types (provided the value is not "auto"). +// +// If that assumption ceases to hold we will need to update the conversion +// in KeyframeUtils::GetAnimationPropertiesFromKeyframes. +enum CompositeOperationOrAuto { "replace", "add", "accumulate", "auto" }; + +// 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 KeyframeEffect's +// implementation. + +[GenerateInit] +dictionary BasePropertyIndexedKeyframe { + (double? or sequence) offset = []; + (UTF8String or sequence) easing = []; + (CompositeOperationOrAuto or sequence) composite = []; +}; + +[GenerateInit] +dictionary BaseKeyframe { + double? offset = null; + UTF8String easing = "linear"; + [Pref="dom.animations-api.compositing.enabled"] + CompositeOperationOrAuto composite = "auto"; + + // 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; +}; + +[GenerateConversionToJS] +dictionary BaseComputedKeyframe : BaseKeyframe { + double computedOffset; +}; diff --git a/dom/webidl/BasicCardPayment.webidl b/dom/webidl/BasicCardPayment.webidl new file mode 100644 index 0000000000..2531c5601c --- /dev/null +++ b/dom/webidl/BasicCardPayment.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 WebIDL file is + * https://www.w3.org/TR/payment-method-basic-card/ + */ + +[GenerateInit] +dictionary BasicCardRequest { + sequence supportedNetworks = []; + boolean requestSecurityCode = true; +}; + +[GenerateConversionToJS] +dictionary BasicCardResponse { + DOMString cardholderName = ""; + required DOMString cardNumber; + DOMString expiryMonth = ""; + DOMString expiryYear = ""; + DOMString cardSecurityCode = ""; + PaymentAddress? billingAddress = null; +}; + +[GenerateConversionToJS] +dictionary BasicCardChangeDetails { + PaymentAddress? billingAddress = null; +}; + +[GenerateInit] +dictionary BasicCardErrors { + DOMString cardNumber; + DOMString cardholderName; + DOMString cardSecurityCode; + DOMString expiryMonth; + DOMString expiryYear; + AddressErrors billingAddress; +}; diff --git a/dom/webidl/BatteryManager.webidl b/dom/webidl/BatteryManager.webidl new file mode 100644 index 0000000000..2a09a514b8 --- /dev/null +++ b/dom/webidl/BatteryManager.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/battery-status/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[ChromeOnly, Exposed=Window] +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/BeforeUnloadEvent.webidl b/dom/webidl/BeforeUnloadEvent.webidl new file mode 100644 index 0000000000..e1caf63e40 --- /dev/null +++ b/dom/webidl/BeforeUnloadEvent.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/. + * + * For more information on this interface, please see + * http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent + */ + +[Exposed=Window] +interface BeforeUnloadEvent : Event { + attribute DOMString returnValue; +}; diff --git a/dom/webidl/BiquadFilterNode.webidl b/dom/webidl/BiquadFilterNode.webidl new file mode 100644 index 0000000000..14f3b6c69d --- /dev/null +++ b/dom/webidl/BiquadFilterNode.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://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" +}; + +dictionary BiquadFilterOptions : AudioNodeOptions { + BiquadFilterType type = "lowpass"; + float Q = 1; + float detune = 0; + float frequency = 350; + float gain = 0; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface BiquadFilterNode : AudioNode { + [Throws] + constructor(BaseAudioContext context, + optional BiquadFilterOptions options = {}); + + 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 + + [Throws] + undefined getFrequencyResponse(Float32Array frequencyHz, + Float32Array magResponse, + Float32Array phaseResponse); + +}; + +// Mozilla extension +BiquadFilterNode includes AudioNodePassThrough; diff --git a/dom/webidl/Blob.webidl b/dom/webidl/Blob.webidl new file mode 100644 index 0000000000..832f90ad4b --- /dev/null +++ b/dom/webidl/Blob.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/#blob + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +typedef (BufferSource or Blob or UTF8String) BlobPart; + +[Exposed=(Window,Worker)] +interface Blob { + [Throws] + constructor(optional sequence blobParts, + optional BlobPropertyBag options = {}); + + [GetterThrows] + readonly attribute unsigned long long size; + + readonly attribute DOMString type; + + //slice Blob into byte-ranged chunks + + [Throws] + Blob slice(optional [Clamp] long long start, + optional [Clamp] long long end, + optional DOMString contentType); + + // read from the Blob. + [NewObject, Throws] ReadableStream stream(); + [NewObject] Promise text(); + [NewObject] Promise arrayBuffer(); +}; + +enum EndingType { "transparent", "native" }; + +dictionary BlobPropertyBag { + DOMString type = ""; + EndingType endings = "transparent"; +}; + +partial interface Blob { + // This returns the type of BlobImpl used for this Blob. + [ChromeOnly] + readonly attribute DOMString blobImplType; +}; diff --git a/dom/webidl/BlobEvent.webidl b/dom/webidl/BlobEvent.webidl new file mode 100644 index 0000000000..8f13adc2ee --- /dev/null +++ b/dom/webidl/BlobEvent.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/mediacapture-record/#blobevent-section + */ + +[Exposed=Window] +interface BlobEvent : Event +{ + constructor(DOMString type, BlobEventInit eventInitDict); + readonly attribute Blob data; +}; + +dictionary BlobEventInit : EventInit +{ + required Blob data; +}; diff --git a/dom/webidl/BroadcastChannel.webidl b/dom/webidl/BroadcastChannel.webidl new file mode 100644 index 0000000000..196ff2eff9 --- /dev/null +++ b/dom/webidl/BroadcastChannel.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/. + * + * For more information on this interface, please see + * https://html.spec.whatwg.org/#broadcastchannel + */ + +[Exposed=(Window,Worker)] +interface BroadcastChannel : EventTarget { + [Throws] + constructor(DOMString channel); + + readonly attribute DOMString name; + + [Throws] + undefined postMessage(any message); + + undefined close(); + + attribute EventHandler onmessage; + attribute EventHandler onmessageerror; +}; diff --git a/dom/webidl/BrowserElementDictionaries.webidl b/dom/webidl/BrowserElementDictionaries.webidl new file mode 100644 index 0000000000..7058aaeb5b --- /dev/null +++ b/dom/webidl/BrowserElementDictionaries.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/. + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[GenerateConversionToJS] +dictionary OpenWindowEventDetail { + DOMString url = ""; + DOMString name = ""; + DOMString features = ""; + Node? frameElement = null; + boolean forceNoReferrer = false; +}; + +[GenerateConversionToJS] +dictionary DOMWindowResizeEventDetail { + long width = 0; + long height = 0; +}; diff --git a/dom/webidl/CDATASection.webidl b/dom/webidl/CDATASection.webidl new file mode 100644 index 0000000000..cc0e8e88b9 --- /dev/null +++ b/dom/webidl/CDATASection.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/. + */ + +[Exposed=Window] +interface CDATASection : Text { +}; diff --git a/dom/webidl/CSPDictionaries.webidl b/dom/webidl/CSPDictionaries.webidl new file mode 100644 index 0000000000..a84162c6e5 --- /dev/null +++ b/dom/webidl/CSPDictionaries.webidl @@ -0,0 +1,40 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.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 default-src; + sequence script-src; + sequence object-src; + sequence style-src; + sequence img-src; + sequence media-src; + sequence frame-src; + sequence font-src; + sequence connect-src; + sequence report-uri; + sequence frame-ancestors; + // sequence reflected-xss; // not supported in Firefox + sequence base-uri; + sequence form-action; + sequence referrer; + sequence manifest-src; + sequence upgrade-insecure-requests; + sequence child-src; + sequence block-all-mixed-content; + sequence sandbox; + sequence worker-src; + sequence script-src-elem; + sequence script-src-attr; +}; + +[GenerateToJSON] +dictionary CSPPolicies { + sequence csp-policies; +}; diff --git a/dom/webidl/CSPReport.webidl b/dom/webidl/CSPReport.webidl new file mode 100644 index 0000000000..e8141ddfee --- /dev/null +++ b/dom/webidl/CSPReport.webidl @@ -0,0 +1,33 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.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. + * + * Based on https://w3c.github.io/webappsec-csp/#deprecated-serialize-violation + */ + +dictionary CSPReportProperties { + DOMString document-uri = ""; + DOMString referrer = ""; + DOMString blocked-uri = ""; + DOMString effective-directive = ""; + DOMString violated-directive = ""; + DOMString original-policy= ""; + SecurityPolicyViolationEventDisposition disposition = "report"; + long status-code = 0; + + DOMString source-file; + DOMString script-sample; + long line-number; + long column-number; +}; + +[GenerateToJSON] +dictionary CSPReport { + // We always want to have a "csp-report" property, so just pre-initialize it + // to an empty dictionary.. + CSPReportProperties csp-report = {}; +}; diff --git a/dom/webidl/CSS.webidl b/dom/webidl/CSS.webidl new file mode 100644 index 0000000000..0809b7318b --- /dev/null +++ b/dom/webidl/CSS.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/csswg/css3-conditional/ + * http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method + * https://www.w3.org/TR/css-highlight-api-1/#registration + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=Window] +namespace CSS { + boolean supports(UTF8String property, UTF8String value); + boolean supports(UTF8String conditionText); +}; + +// http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method +partial namespace CSS { + DOMString escape(DOMString ident); +}; + +// https://www.w3.org/TR/css-highlight-api-1/#registration +partial namespace CSS { + [Pref="dom.customHighlightAPI.enabled", GetterThrows] + readonly attribute HighlightRegistry highlights; +}; diff --git a/dom/webidl/CSS2Properties.webidl.in b/dom/webidl/CSS2Properties.webidl.in new file mode 100644 index 0000000000..0f7853946c --- /dev/null +++ b/dom/webidl/CSS2Properties.webidl.in @@ -0,0 +1,4 @@ +[Exposed=Window] +interface CSS2Properties : CSSStyleDeclaration { +${props} +}; diff --git a/dom/webidl/CSSAnimation.webidl b/dom/webidl/CSSAnimation.webidl new file mode 100644 index 0000000000..f60b9ed0c8 --- /dev/null +++ b/dom/webidl/CSSAnimation.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-animations-2/#the-CSSAnimation-interface + * + * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Func="Document::IsWebAnimationsGetAnimationsEnabled", + HeaderFile="nsAnimationManager.h", + Exposed=Window] +interface CSSAnimation : Animation { + [Constant] readonly attribute DOMString animationName; +}; diff --git a/dom/webidl/CSSConditionRule.webidl b/dom/webidl/CSSConditionRule.webidl new file mode 100644 index 0000000000..a799498494 --- /dev/null +++ b/dom/webidl/CSSConditionRule.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.csswg.org/css-conditional/#the-cssconditionrule-interface + */ + +// https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface +[Exposed=Window] +interface CSSConditionRule : CSSGroupingRule { + readonly attribute UTF8String conditionText; +}; diff --git a/dom/webidl/CSSContainerRule.webidl b/dom/webidl/CSSContainerRule.webidl new file mode 100644 index 0000000000..0a4c96fdba --- /dev/null +++ b/dom/webidl/CSSContainerRule.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://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface + */ + +// https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface +[Exposed=Window, Pref="layout.css.container-queries.enabled"] +interface CSSContainerRule : CSSConditionRule { + readonly attribute UTF8String containerName; + readonly attribute UTF8String containerQuery; + + // Performs a container query look-up for an element. + [ChromeOnly] Element? queryContainerFor(Element element); +}; diff --git a/dom/webidl/CSSCounterStyleRule.webidl b/dom/webidl/CSSCounterStyleRule.webidl new file mode 100644 index 0000000000..a7678f0fd7 --- /dev/null +++ b/dom/webidl/CSSCounterStyleRule.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://drafts.csswg.org/css-counter-styles-3/#the-csscounterstylerule-interface + */ + +// https://drafts.csswg.org/css-counter-styles-3/#the-csscounterstylerule-interface +[Exposed=Window] +interface CSSCounterStyleRule : CSSRule { + attribute DOMString name; + attribute UTF8String system; + attribute UTF8String symbols; + attribute UTF8String additiveSymbols; + attribute UTF8String negative; + attribute UTF8String prefix; + attribute UTF8String suffix; + attribute UTF8String range; + attribute UTF8String pad; + attribute UTF8String speakAs; + attribute UTF8String fallback; +}; diff --git a/dom/webidl/CSSFontFaceRule.webidl b/dom/webidl/CSSFontFaceRule.webidl new file mode 100644 index 0000000000..fe5028d440 --- /dev/null +++ b/dom/webidl/CSSFontFaceRule.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://drafts.csswg.org/css-fonts/#om-fontface + */ + +// https://drafts.csswg.org/css-fonts/#om-fontface +// But we implement a very old draft, apparently.... +// See bug 1058408 for implementing the current spec. +[Exposed=Window] +interface CSSFontFaceRule : CSSRule { + [SameObject] readonly attribute CSSStyleDeclaration style; +}; diff --git a/dom/webidl/CSSFontFeatureValuesRule.webidl b/dom/webidl/CSSFontFeatureValuesRule.webidl new file mode 100644 index 0000000000..0eb6364d43 --- /dev/null +++ b/dom/webidl/CSSFontFeatureValuesRule.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://drafts.csswg.org/css-fonts/#om-fontfeaturevalues + */ + +// https://drafts.csswg.org/css-fonts/#om-fontfeaturevalues +// but we don't implement anything remotely resembling the spec. +[Exposed=Window] +interface CSSFontFeatureValuesRule : CSSRule { + [SetterThrows] + attribute UTF8String fontFamily; + + // Not yet implemented + // readonly attribute CSSFontFeatureValuesMap annotation; + // readonly attribute CSSFontFeatureValuesMap ornaments; + // readonly attribute CSSFontFeatureValuesMap stylistic; + // readonly attribute CSSFontFeatureValuesMap swash; + // readonly attribute CSSFontFeatureValuesMap characterVariant; + // readonly attribute CSSFontFeatureValuesMap styleset; +}; + +partial interface CSSFontFeatureValuesRule { + // Gecko addition? + [SetterThrows] + attribute UTF8String valueText; +}; diff --git a/dom/webidl/CSSFontPaletteValuesRule.webidl b/dom/webidl/CSSFontPaletteValuesRule.webidl new file mode 100644 index 0000000000..4ec58c8a15 --- /dev/null +++ b/dom/webidl/CSSFontPaletteValuesRule.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://drafts.csswg.org/css-fonts/#om-fontpalettevalues + */ + +[Exposed=Window, Pref="layout.css.font-palette.enabled"] +interface CSSFontPaletteValuesRule : CSSRule { + readonly attribute UTF8String name; + readonly attribute UTF8String fontFamily; + readonly attribute UTF8String basePalette; + readonly attribute UTF8String overrideColors; +}; diff --git a/dom/webidl/CSSGroupingRule.webidl b/dom/webidl/CSSGroupingRule.webidl new file mode 100644 index 0000000000..32c33814e0 --- /dev/null +++ b/dom/webidl/CSSGroupingRule.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://drafts.csswg.org/cssom/#cssgroupingrule + */ + +// https://drafts.csswg.org/cssom/#cssgroupingrule +[Exposed=Window] +interface CSSGroupingRule : CSSRule { + [SameObject] readonly attribute CSSRuleList? cssRules; + [Throws] + unsigned long insertRule(UTF8String rule, optional unsigned long index = 0); + [Throws] + undefined deleteRule(unsigned long index); +}; diff --git a/dom/webidl/CSSImportRule.webidl b/dom/webidl/CSSImportRule.webidl new file mode 100644 index 0000000000..965da60d1c --- /dev/null +++ b/dom/webidl/CSSImportRule.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://drafts.csswg.org/cssom/#cssimportrule + */ + +// https://drafts.csswg.org/cssom/#cssimportrule +[Exposed=Window] +interface CSSImportRule : CSSRule { + readonly attribute DOMString href; + // Per spec, the .media is never null, but in our implementation it can + // be since stylesheet can be null, and in Stylo, media is derived from + // the stylesheet. See . + [SameObject, PutForwards=mediaText] readonly attribute MediaList? media; + [SameObject, BinaryName="styleSheetForBindings"] readonly attribute CSSStyleSheet? styleSheet; + readonly attribute UTF8String? layerName; + readonly attribute UTF8String? supportsText; +}; diff --git a/dom/webidl/CSSKeyframeRule.webidl b/dom/webidl/CSSKeyframeRule.webidl new file mode 100644 index 0000000000..6647b3fb2c --- /dev/null +++ b/dom/webidl/CSSKeyframeRule.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://drafts.csswg.org/css-animations/#interface-csskeyframerule + */ + +// https://drafts.csswg.org/css-animations/#interface-csskeyframerule +[Exposed=Window] +interface CSSKeyframeRule : CSSRule { + attribute UTF8String keyText; + [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; +}; diff --git a/dom/webidl/CSSKeyframesRule.webidl b/dom/webidl/CSSKeyframesRule.webidl new file mode 100644 index 0000000000..701ef67b06 --- /dev/null +++ b/dom/webidl/CSSKeyframesRule.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://drafts.csswg.org/css-animations/#interface-csskeyframesrule + */ + +// https://drafts.csswg.org/css-animations/#interface-csskeyframesrule +[Exposed=Window] +interface CSSKeyframesRule : CSSRule { + attribute DOMString name; + readonly attribute CSSRuleList cssRules; + + getter CSSKeyframeRule (unsigned long index); + readonly attribute unsigned long length; + + undefined appendRule(DOMString rule); + undefined deleteRule(DOMString select); + CSSKeyframeRule? findRule(DOMString select); +}; diff --git a/dom/webidl/CSSLayerBlockRule.webidl b/dom/webidl/CSSLayerBlockRule.webidl new file mode 100644 index 0000000000..89b2828a6b --- /dev/null +++ b/dom/webidl/CSSLayerBlockRule.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/. + * + * The origin of this IDL file is + * https://drafts.csswg.org/css-cascade-5/#the-csslayerblockrule-interface + */ +[Exposed=Window] +interface CSSLayerBlockRule : CSSGroupingRule { + readonly attribute UTF8String name; +}; diff --git a/dom/webidl/CSSLayerStatementRule.webidl b/dom/webidl/CSSLayerStatementRule.webidl new file mode 100644 index 0000000000..13871e29d3 --- /dev/null +++ b/dom/webidl/CSSLayerStatementRule.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.csswg.org/css-cascade-5/#the-csslayerstatementrule-interface + */ +[Exposed=Window] +interface CSSLayerStatementRule : CSSRule { + // readonly attribute FrozenArray nameList; + [Frozen, Cached, Pure] + readonly attribute sequence nameList; +}; diff --git a/dom/webidl/CSSMediaRule.webidl b/dom/webidl/CSSMediaRule.webidl new file mode 100644 index 0000000000..10d7573d8a --- /dev/null +++ b/dom/webidl/CSSMediaRule.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://drafts.csswg.org/cssom/#the-cssmediarule-interface + * https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface + */ + +// https://drafts.csswg.org/cssom/#the-cssmediarule-interface and +// https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface +// except they disagree with each other. We're taking the inheritance from +// css-conditional and the PutForwards behavior from cssom. +[Exposed=Window] +interface CSSMediaRule : CSSConditionRule { + [SameObject, PutForwards=mediaText] readonly attribute MediaList media; +}; diff --git a/dom/webidl/CSSMozDocumentRule.webidl b/dom/webidl/CSSMozDocumentRule.webidl new file mode 100644 index 0000000000..47bd3933fd --- /dev/null +++ b/dom/webidl/CSSMozDocumentRule.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/. + */ + +// This is a non-standard interface for @-moz-document rules +[Exposed=Window] +interface CSSMozDocumentRule : CSSConditionRule { + // XXX Add access to the URL list. +}; diff --git a/dom/webidl/CSSNamespaceRule.webidl b/dom/webidl/CSSNamespaceRule.webidl new file mode 100644 index 0000000000..6044c3a6f2 --- /dev/null +++ b/dom/webidl/CSSNamespaceRule.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://drafts.csswg.org/cssom/#cssnamespacerule + */ + +// https://drafts.csswg.org/cssom/#cssnamespacerule +[Exposed=Window] +interface CSSNamespaceRule : CSSRule { + readonly attribute DOMString namespaceURI; + readonly attribute DOMString prefix; +}; diff --git a/dom/webidl/CSSPageRule.webidl b/dom/webidl/CSSPageRule.webidl new file mode 100644 index 0000000000..afc999a7ee --- /dev/null +++ b/dom/webidl/CSSPageRule.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.csswg.org/cssom/#the-csspagerule-interface + */ + +// https://drafts.csswg.org/cssom/#the-csspagerule-interface +// Per spec, this should inherit from CSSGroupingRule, but we don't +// implement this yet. +[Exposed=Window] +interface CSSPageRule : CSSRule { + attribute UTF8String selectorText; + [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; +}; diff --git a/dom/webidl/CSSPropertyRule.webidl b/dom/webidl/CSSPropertyRule.webidl new file mode 100644 index 0000000000..20b03a738b --- /dev/null +++ b/dom/webidl/CSSPropertyRule.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/css-properties-values-api-1/#the-css-property-rule-interface + */ + +// https://drafts.css-houdini.org/css-properties-values-api-1/#the-css-property-rule-interface +[Exposed=Window, Pref="layout.css.properties-and-values.enabled"] +interface CSSPropertyRule : CSSRule { + readonly attribute UTF8String name; + readonly attribute UTF8String syntax; + readonly attribute boolean inherits; + readonly attribute UTF8String? initialValue; +}; diff --git a/dom/webidl/CSSPseudoElement.webidl b/dom/webidl/CSSPseudoElement.webidl new file mode 100644 index 0000000000..c0e49a8d6e --- /dev/null +++ b/dom/webidl/CSSPseudoElement.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://drafts.csswg.org/css-pseudo-4/#csspseudoelement + * + * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Pref="dom.css_pseudo_element.enabled", + Exposed=Window] +interface CSSPseudoElement { + readonly attribute DOMString type; + readonly attribute Element element; +}; diff --git a/dom/webidl/CSSRule.webidl b/dom/webidl/CSSRule.webidl new file mode 100644 index 0000000000..10b4585eb0 --- /dev/null +++ b/dom/webidl/CSSRule.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://drafts.csswg.org/cssom/#the-cssrule-interface + * https://drafts.csswg.org/css-animations/#interface-cssrule + * https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface + * https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface + * https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues + */ + +// https://drafts.csswg.org/cssom/#the-cssrule-interface +[Exposed=Window] +interface CSSRule { + + const unsigned short STYLE_RULE = 1; + const unsigned short CHARSET_RULE = 2; // historical + const unsigned short IMPORT_RULE = 3; + const unsigned short MEDIA_RULE = 4; + const unsigned short FONT_FACE_RULE = 5; + const unsigned short PAGE_RULE = 6; + // FIXME: We don't support MARGIN_RULE yet. + // XXXbz Should we expose the constant anyway? + // const unsigned short MARGIN_RULE = 9; + const unsigned short NAMESPACE_RULE = 10; + [BinaryName="typeForBindings"] readonly attribute unsigned short type; + attribute UTF8String cssText; + readonly attribute CSSRule? parentRule; + readonly attribute CSSStyleSheet? parentStyleSheet; +}; + +// https://drafts.csswg.org/css-animations/#interface-cssrule +partial interface CSSRule { + const unsigned short KEYFRAMES_RULE = 7; + const unsigned short KEYFRAME_RULE = 8; +}; + +// https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface +partial interface CSSRule { + const unsigned short COUNTER_STYLE_RULE = 11; +}; + +// https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface +partial interface CSSRule { + const unsigned short SUPPORTS_RULE = 12; +}; + +// Non-standard extension for @-moz-document rules. +partial interface CSSRule { + [ChromeOnly] + const unsigned short DOCUMENT_RULE = 13; +}; + +// https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues +partial interface CSSRule { + const unsigned short FONT_FEATURE_VALUES_RULE = 14; +}; diff --git a/dom/webidl/CSSRuleList.webidl b/dom/webidl/CSSRuleList.webidl new file mode 100644 index 0000000000..bd263d419e --- /dev/null +++ b/dom/webidl/CSSRuleList.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/. + */ + +[Exposed=Window] +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 0000000000..99469a6709 --- /dev/null +++ b/dom/webidl/CSSStyleDeclaration.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/csswg/cssom/ + */ + + // Because of getComputedStyle, many CSSStyleDeclaration objects can be + // short-living. +[ProbablyShortLivingWrapper, + Exposed=Window] +interface CSSStyleDeclaration { + [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows] + attribute UTF8String cssText; + + readonly attribute unsigned long length; + getter UTF8String item(unsigned long index); + + [Throws, ChromeOnly] + sequence getCSSImageURLs(UTF8String property); + + [Throws] + UTF8String getPropertyValue(UTF8String property); + UTF8String getPropertyPriority(UTF8String property); + [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws] + undefined setProperty(UTF8String property, [LegacyNullToEmptyString] UTF8String value, optional [LegacyNullToEmptyString] UTF8String priority = ""); + [CEReactions, Throws] + UTF8String removeProperty(UTF8String property); + + readonly attribute CSSRule? parentRule; +}; diff --git a/dom/webidl/CSSStyleRule.webidl b/dom/webidl/CSSStyleRule.webidl new file mode 100644 index 0000000000..739bd958bb --- /dev/null +++ b/dom/webidl/CSSStyleRule.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://drafts.csswg.org/cssom/#the-cssstylerule-interface + */ + +// https://drafts.csswg.org/cssom/#the-cssstylerule-interface +[Exposed=Window] +interface CSSStyleRule : CSSRule { + attribute UTF8String selectorText; + [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; +}; diff --git a/dom/webidl/CSSStyleSheet.webidl b/dom/webidl/CSSStyleSheet.webidl new file mode 100644 index 0000000000..db6d9feb70 --- /dev/null +++ b/dom/webidl/CSSStyleSheet.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://dev.w3.org/csswg/cssom/ + * https://wicg.github.io/construct-stylesheets/ + */ + +enum CSSStyleSheetParsingMode { + "author", + "user", + "agent" +}; + +dictionary CSSStyleSheetInit { + (MediaList or UTF8String) media = ""; + boolean disabled = false; + UTF8String baseURL; +}; + +[Exposed=Window] +interface CSSStyleSheet : StyleSheet { + [Throws, Pref="layout.css.constructable-stylesheets.enabled"] + constructor(optional CSSStyleSheetInit options = {}); + [Pure, BinaryName="DOMOwnerRule"] + readonly attribute CSSRule? ownerRule; + [Throws, NeedsSubjectPrincipal] + readonly attribute CSSRuleList cssRules; + [ChromeOnly, BinaryName="parsingModeDOM"] + readonly attribute CSSStyleSheetParsingMode parsingMode; + [Throws, NeedsSubjectPrincipal] + unsigned long insertRule(UTF8String rule, optional unsigned long index = 0); + [Throws, NeedsSubjectPrincipal] + undefined deleteRule(unsigned long index); + [NewObject, Pref="layout.css.constructable-stylesheets.enabled"] + Promise replace(UTF8String text); + [Throws, Pref="layout.css.constructable-stylesheets.enabled"] + undefined replaceSync(UTF8String text); + + // Non-standard WebKit things. + [Throws, NeedsSubjectPrincipal, BinaryName="cssRules"] + readonly attribute CSSRuleList rules; + [Throws, NeedsSubjectPrincipal, BinaryName="deleteRule"] + undefined removeRule(optional unsigned long index = 0); + [Throws, NeedsSubjectPrincipal] + long addRule(optional UTF8String selector = "undefined", optional UTF8String style = "undefined", optional unsigned long index); +}; diff --git a/dom/webidl/CSSSupportsRule.webidl b/dom/webidl/CSSSupportsRule.webidl new file mode 100644 index 0000000000..3040f34507 --- /dev/null +++ b/dom/webidl/CSSSupportsRule.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 + * https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface + */ + +// https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface +[Exposed=Window] +interface CSSSupportsRule : CSSConditionRule { +}; diff --git a/dom/webidl/CSSTransition.webidl b/dom/webidl/CSSTransition.webidl new file mode 100644 index 0000000000..5c2f74173e --- /dev/null +++ b/dom/webidl/CSSTransition.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-transitions-2/#the-CSSTransition-interface + * + * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Func="Document::IsWebAnimationsGetAnimationsEnabled", + HeaderFile="nsTransitionManager.h", + Exposed=Window] +interface CSSTransition : Animation { + [Constant] readonly attribute DOMString transitionProperty; +}; diff --git a/dom/webidl/Cache.webidl b/dom/webidl/Cache.webidl new file mode 100644 index 0000000000..b7f676e3fe --- /dev/null +++ b/dom/webidl/Cache.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://w3c.github.io/ServiceWorker/#cache-interface + */ + +[Exposed=(Window,Worker), + Func="nsGlobalWindowInner::CachesEnabled"] +interface Cache { + [NewObject] + Promise match(RequestInfo request, optional CacheQueryOptions options = {}); + [NewObject] + Promise> matchAll(optional RequestInfo request, optional CacheQueryOptions options = {}); + [NewObject, NeedsCallerType] + Promise add(RequestInfo request); + [NewObject, NeedsCallerType] + Promise addAll(sequence requests); + [NewObject] + Promise put(RequestInfo request, Response response); + [NewObject] + Promise delete(RequestInfo request, optional CacheQueryOptions options = {}); + [NewObject] + Promise> keys(optional RequestInfo request, optional CacheQueryOptions options = {}); +}; + +dictionary CacheQueryOptions { + boolean ignoreSearch = false; + boolean ignoreMethod = false; + boolean ignoreVary = false; +}; + +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 0000000000..7ece3197c6 --- /dev/null +++ b/dom/webidl/CacheStorage.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 + * https://w3c.github.io/ServiceWorker/#cachestorage-interface + */ + +interface Principal; + +[Exposed=(Window,Worker), + Func="nsGlobalWindowInner::CachesEnabled"] +interface CacheStorage { + [Throws, ChromeOnly] + constructor(CacheStorageNamespace namespace, Principal principal); + + [NewObject] + Promise match(RequestInfo request, optional MultiCacheQueryOptions options = {}); + [NewObject] + Promise has(DOMString cacheName); + [NewObject] + Promise open(DOMString cacheName); + [NewObject] + Promise delete(DOMString cacheName); + [NewObject] + Promise> keys(); +}; + +dictionary MultiCacheQueryOptions : CacheQueryOptions { + DOMString cacheName; +}; + +// chrome-only, gecko specific extension +enum CacheStorageNamespace { + "content", "chrome" +}; diff --git a/dom/webidl/CancelContentJSOptions.webidl b/dom/webidl/CancelContentJSOptions.webidl new file mode 100644 index 0000000000..6b07534adc --- /dev/null +++ b/dom/webidl/CancelContentJSOptions.webidl @@ -0,0 +1,10 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +[GenerateInit] +dictionary CancelContentJSOptions { + long index = 0; + URI? uri = null; + long epoch = 0; +}; diff --git a/dom/webidl/CanvasCaptureMediaStream.webidl b/dom/webidl/CanvasCaptureMediaStream.webidl new file mode 100644 index 0000000000..fb90c9d217 --- /dev/null +++ b/dom/webidl/CanvasCaptureMediaStream.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/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", + Exposed=Window] +interface CanvasCaptureMediaStream : MediaStream { + readonly attribute HTMLCanvasElement canvas; + undefined requestFrame(); +}; diff --git a/dom/webidl/CanvasRenderingContext2D.webidl b/dom/webidl/CanvasRenderingContext2D.webidl new file mode 100644 index 0000000000..a427098e70 --- /dev/null +++ b/dom/webidl/CanvasRenderingContext2D.webidl @@ -0,0 +1,399 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was 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" }; + +[GenerateInit] +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 + SVGImageElement) HTMLOrSVGImageElement; + +typedef (HTMLOrSVGImageElement or + HTMLCanvasElement or + HTMLVideoElement or + OffscreenCanvas or + ImageBitmap) CanvasImageSource; + +[Exposed=Window] +interface CanvasRenderingContext2D { + + // back-reference to the canvas. Might be null if we're not + // associated with a canvas. + readonly attribute HTMLCanvasElement? canvas; + + // Show the caret if appropriate when drawing + [Func="CanvasUtils::HasDrawWindowPrivilege"] + const unsigned long DRAWWINDOW_DRAW_CARET = 0x01; + // Don't flush pending layout notifications that could otherwise + // be batched up + [Func="CanvasUtils::HasDrawWindowPrivilege"] + const unsigned long DRAWWINDOW_DO_NOT_FLUSH = 0x02; + // Draw scrollbars and scroll the viewport if they are present + [Func="CanvasUtils::HasDrawWindowPrivilege"] + 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. + [Func="CanvasUtils::HasDrawWindowPrivilege"] + const unsigned long DRAWWINDOW_USE_WIDGET_LAYERS = 0x08; + // Don't synchronously decode images - draw what we have + [Func="CanvasUtils::HasDrawWindowPrivilege"] + 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 + * and Web Extensions (with a permission) only. + */ + [Throws, NeedsSubjectPrincipal, Func="CanvasUtils::HasDrawWindowPrivilege"] + undefined drawWindow(Window window, double x, double y, double w, double h, + UTF8String 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] + undefined demote(); +}; + +CanvasRenderingContext2D includes CanvasState; +CanvasRenderingContext2D includes CanvasTransform; +CanvasRenderingContext2D includes CanvasCompositing; +CanvasRenderingContext2D includes CanvasImageSmoothing; +CanvasRenderingContext2D includes CanvasFillStrokeStyles; +CanvasRenderingContext2D includes CanvasShadowStyles; +CanvasRenderingContext2D includes CanvasFilters; +CanvasRenderingContext2D includes CanvasRect; +CanvasRenderingContext2D includes CanvasDrawPath; +CanvasRenderingContext2D includes CanvasUserInterface; +CanvasRenderingContext2D includes CanvasText; +CanvasRenderingContext2D includes CanvasDrawImage; +CanvasRenderingContext2D includes CanvasImageData; +CanvasRenderingContext2D includes CanvasPathDrawingStyles; +CanvasRenderingContext2D includes CanvasTextDrawingStyles; +CanvasRenderingContext2D includes CanvasPathMethods; + + +interface mixin CanvasState { + // state + undefined save(); // push state on state stack + undefined restore(); // pop state stack and restore state + undefined reset(); // reset the rendering context to its default state +}; + +interface mixin CanvasTransform { + // transformations (default transform is the identity matrix) + [Throws, LenientFloat] + undefined scale(double x, double y); + [Throws, LenientFloat] + undefined rotate(double angle); + [Throws, LenientFloat] + undefined translate(double x, double y); + [Throws, LenientFloat] + undefined transform(double a, double b, double c, double d, double e, double f); + + [NewObject, Throws] DOMMatrix getTransform(); + [Throws, LenientFloat] + undefined setTransform(double a, double b, double c, double d, double e, double f); + [Throws] + undefined setTransform(optional DOMMatrix2DInit transform = {}); + [Throws] + undefined resetTransform(); +}; + +interface mixin CanvasCompositing { + attribute unrestricted double globalAlpha; // (default 1.0) + [Throws] + attribute DOMString globalCompositeOperation; // (default source-over) +}; + +interface mixin CanvasImageSmoothing { + // drawing images + attribute boolean imageSmoothingEnabled; +}; + +interface mixin CanvasFillStrokeStyles { + // colors and styles (see also the CanvasPathDrawingStyles interface) + attribute (UTF8String or CanvasGradient or CanvasPattern) strokeStyle; // (default black) + attribute (UTF8String 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); + [Pref="canvas.createConicGradient.enabled", NewObject] + CanvasGradient createConicGradient(double angle, double cx, double cy); + [NewObject, Throws] + CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition); +}; + +interface mixin CanvasShadowStyles { + [LenientFloat] + attribute double shadowOffsetX; // (default 0) + [LenientFloat] + attribute double shadowOffsetY; // (default 0) + [LenientFloat] + attribute double shadowBlur; // (default 0) + attribute UTF8String shadowColor; // (default transparent black) +}; + +interface mixin CanvasFilters { + [Pref="canvas.filters.enabled", SetterThrows] + attribute UTF8String filter; // (default empty string = no filter) +}; + +interface mixin CanvasRect { + [LenientFloat] + undefined clearRect(double x, double y, double w, double h); + [LenientFloat] + undefined fillRect(double x, double y, double w, double h); + [LenientFloat] + undefined strokeRect(double x, double y, double w, double h); +}; + +interface mixin CanvasDrawPath { + // path API (see also CanvasPathMethods) + undefined beginPath(); + undefined fill(optional CanvasWindingRule winding = "nonzero"); + undefined fill(Path2D path, optional CanvasWindingRule winding = "nonzero"); + undefined stroke(); + undefined stroke(Path2D path); + undefined clip(optional CanvasWindingRule winding = "nonzero"); + undefined clip(Path2D path, optional CanvasWindingRule winding = "nonzero"); +// NOT IMPLEMENTED undefined resetClip(); + [NeedsSubjectPrincipal] + boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero"); + [NeedsSubjectPrincipal] // Only required because overloads can't have different extended attributes. + boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero"); + [NeedsSubjectPrincipal] + boolean isPointInStroke(double x, double y); + [NeedsSubjectPrincipal] // Only required because overloads can't have different extended attributes. + boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y); +}; + +interface mixin CanvasUserInterface { + [Pref="canvas.focusring.enabled", Throws] undefined drawFocusIfNeeded(Element element); +// NOT IMPLEMENTED undefined scrollPathIntoView(); +// NOT IMPLEMENTED undefined scrollPathIntoView(Path path); +}; + +interface mixin CanvasText { + // text (see also the CanvasPathDrawingStyles interface) + [Throws, LenientFloat] + undefined fillText(DOMString text, double x, double y, optional double maxWidth); + [Throws, LenientFloat] + undefined strokeText(DOMString text, double x, double y, optional double maxWidth); + [NewObject, Throws] + TextMetrics measureText(DOMString text); +}; + +interface mixin CanvasDrawImage { + [Throws, LenientFloat] + undefined drawImage(CanvasImageSource image, double dx, double dy); + [Throws, LenientFloat] + undefined drawImage(CanvasImageSource image, double dx, double dy, double dw, double dh); + [Throws, LenientFloat] + undefined drawImage(CanvasImageSource image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh); +}; + +// See https://github.com/whatwg/html/issues/6262 for [EnforceRange] usage. +interface mixin CanvasImageData { + // pixel manipulation + [NewObject, Throws] + ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh); + [NewObject, Throws] + ImageData createImageData(ImageData imagedata); + [NewObject, Throws, NeedsSubjectPrincipal] + ImageData getImageData([EnforceRange] long sx, [EnforceRange] long sy, [EnforceRange] long sw, [EnforceRange] long sh); + [Throws] + undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy); + [Throws] + undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight); +}; + +interface mixin CanvasPathDrawingStyles { + // 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] undefined setLineDash(sequence segments); // default empty + sequence getLineDash(); + [LenientFloat] attribute double lineDashOffset; +}; + +interface mixin CanvasTextDrawingStyles { + // text + [SetterThrows] + attribute UTF8String 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") + attribute DOMString direction; // "ltr", "rtl", "inherit" (default: "inherit") + attribute UTF8String letterSpacing; // default: "0px" + attribute DOMString fontKerning; // "auto", "normal", "none" (default: "auto") +// NOT IMPLEMENTED attribute CanvasFontStretch fontStretch; // (default: "normal") +// NOT IMPLEMENTED attribute CanvasFontVariantCaps fontVariantCaps; // (default: "normal") +// NOT IMPLEMENTED attribute CanvasTextRendering textRendering; // (default: "auto") + attribute UTF8String wordSpacing; // default: "0px" +}; + +interface mixin CanvasPathMethods { + // shared path API methods + undefined closePath(); + [LenientFloat] + undefined moveTo(double x, double y); + [LenientFloat] + undefined lineTo(double x, double y); + [LenientFloat] + undefined quadraticCurveTo(double cpx, double cpy, double x, double y); + + [LenientFloat] + undefined bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); + + [Throws, LenientFloat] + undefined arcTo(double x1, double y1, double x2, double y2, double radius); +// NOT IMPLEMENTED [LenientFloat] undefined arcTo(double x1, double y1, double x2, double y2, double radiusX, double radiusY, double rotation); + + [LenientFloat] + undefined rect(double x, double y, double w, double h); + + [Throws] + undefined roundRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h, optional (unrestricted double or DOMPointInit or sequence<(unrestricted double or DOMPointInit)>) radii = 0); + + [Throws, LenientFloat] + undefined arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false); + + [Throws, LenientFloat] + undefined ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, optional boolean anticlockwise = false); +}; + +[Exposed=(Window,Worker), + Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"] +interface CanvasGradient { + // opaque object + [Throws] + // addColorStop should take a double + undefined addColorStop(float offset, UTF8String color); +}; + +[Exposed=(Window,Worker), + Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"] +interface CanvasPattern { + // opaque object + // [Throws, LenientFloat] - could not do this overload because of bug 1020975 + // undefined setTransform(double a, double b, double c, double d, double e, double f); + + [Throws] + undefined setTransform(optional DOMMatrix2DInit matrix = {}); +}; + +[Exposed=(Window,Worker)] +interface TextMetrics { + + // x-direction + readonly attribute double width; // advance width + + // [experimental] actualBoundingBox* attributes + [Pref="dom.textMetrics.actualBoundingBox.enabled"] + readonly attribute double actualBoundingBoxLeft; + [Pref="dom.textMetrics.actualBoundingBox.enabled"] + readonly attribute double actualBoundingBoxRight; + + // y-direction + // [experimental] fontBoundingBox* attributes + [Pref="dom.textMetrics.fontBoundingBox.enabled"] + readonly attribute double fontBoundingBoxAscent; + [Pref="dom.textMetrics.fontBoundingBox.enabled"] + readonly attribute double fontBoundingBoxDescent; + + // [experimental] actualBoundingBox* attributes + [Pref="dom.textMetrics.actualBoundingBox.enabled"] + readonly attribute double actualBoundingBoxAscent; + [Pref="dom.textMetrics.actualBoundingBox.enabled"] + readonly attribute double actualBoundingBoxDescent; + + // [experimental] emHeight* attributes + [Pref="dom.textMetrics.emHeight.enabled"] + readonly attribute double emHeightAscent; + [Pref="dom.textMetrics.emHeight.enabled"] + readonly attribute double emHeightDescent; + + // [experimental] *Baseline attributes + [Pref="dom.textMetrics.baselines.enabled"] + readonly attribute double hangingBaseline; + [Pref="dom.textMetrics.baselines.enabled"] + readonly attribute double alphabeticBaseline; + [Pref="dom.textMetrics.baselines.enabled"] + readonly attribute double ideographicBaseline; +}; + +[Pref="canvas.path.enabled", + Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread", + Exposed=(Window,Worker)] +interface Path2D +{ + constructor(); + constructor(Path2D other); + constructor(DOMString pathString); + + [Throws] undefined addPath(Path2D path, optional DOMMatrix2DInit transform = {}); +}; +Path2D includes CanvasPathMethods; diff --git a/dom/webidl/CaretPosition.webidl b/dom/webidl/CaretPosition.webidl new file mode 100644 index 0000000000..2deb7d2d3f --- /dev/null +++ b/dom/webidl/CaretPosition.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 obtain one at http://mozilla.org/MPL/2.0/. */ + +[Exposed=Window] +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 0000000000..0a661fe737 --- /dev/null +++ b/dom/webidl/CaretStateChangedEvent.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/. + */ + +enum CaretChangedReason { + "visibilitychange", + "updateposition", + "longpressonemptycontent", + "taponcaret", + "presscaret", + "releasecaret", + "scroll", + "dragcaret" +}; + +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 = ""; + long clientX = 0; + long clientY = 0; +}; + +[ChromeOnly, + Exposed=Window] +interface CaretStateChangedEvent : Event { + constructor(DOMString type, + optional CaretStateChangedEventInit eventInit = {}); + + readonly attribute boolean collapsed; + /* The bounding client rect is relative to the visual viewport. */ + 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; + [Pref="layout.accessiblecaret.magnifier.enabled"] + readonly attribute long clientX; + [Pref="layout.accessiblecaret.magnifier.enabled"] + readonly attribute long clientY; +}; diff --git a/dom/webidl/ChannelMergerNode.webidl b/dom/webidl/ChannelMergerNode.webidl new file mode 100644 index 0000000000..00fbf1bac4 --- /dev/null +++ b/dom/webidl/ChannelMergerNode.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://webaudio.github.io/web-audio-api/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +dictionary ChannelMergerOptions : AudioNodeOptions { + unsigned long numberOfInputs = 6; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface ChannelMergerNode : AudioNode { + [Throws] + constructor(BaseAudioContext context, + optional ChannelMergerOptions options = {}); +}; diff --git a/dom/webidl/ChannelSplitterNode.webidl b/dom/webidl/ChannelSplitterNode.webidl new file mode 100644 index 0000000000..e6cacbb7c3 --- /dev/null +++ b/dom/webidl/ChannelSplitterNode.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://webaudio.github.io/web-audio-api/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +dictionary ChannelSplitterOptions : AudioNodeOptions { + unsigned long numberOfOutputs = 6; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface ChannelSplitterNode : AudioNode { + [Throws] + constructor(BaseAudioContext context, + optional ChannelSplitterOptions options = {}); +}; diff --git a/dom/webidl/CharacterData.webidl b/dom/webidl/CharacterData.webidl new file mode 100644 index 0000000000..6b447af94b --- /dev/null +++ b/dom/webidl/CharacterData.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/#characterdata + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=Window] +interface CharacterData : Node { + [Pure, SetterThrows] + attribute [LegacyNullToEmptyString] DOMString data; + [Pure] + readonly attribute unsigned long length; + [Throws] + DOMString substringData(unsigned long offset, unsigned long count); + [Throws] + undefined appendData(DOMString data); + [Throws] + undefined insertData(unsigned long offset, DOMString data); + [Throws] + undefined deleteData(unsigned long offset, unsigned long count); + [Throws] + undefined replaceData(unsigned long offset, unsigned long count, DOMString data); +}; + +CharacterData includes ChildNode; +CharacterData includes NonDocumentTypeChildNode; diff --git a/dom/webidl/CheckerboardReportService.webidl b/dom/webidl/CheckerboardReportService.webidl new file mode 100644 index 0000000000..0869df7475 --- /dev/null +++ b/dom/webidl/CheckerboardReportService.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/. + */ + +/* + * 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", + Exposed=Window] +interface CheckerboardReportService { + constructor(); + + /** + * Gets the available checkerboard reports. + */ + sequence getReports(); + + /** + * Gets the state of the apz.record_checkerboarding pref. + */ + boolean isRecordingEnabled(); + + /** + * Sets the state of the apz.record_checkerboarding pref. + */ + undefined 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. + */ + undefined flushActiveReports(); +}; diff --git a/dom/webidl/ChildNode.webidl b/dom/webidl/ChildNode.webidl new file mode 100644 index 0000000000..a82d192980 --- /dev/null +++ b/dom/webidl/ChildNode.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-childnode + */ + +interface mixin ChildNode { + [CEReactions, Throws, Unscopable] + undefined before((Node or DOMString)... nodes); + [CEReactions, Throws, Unscopable] + undefined after((Node or DOMString)... nodes); + [CEReactions, Throws, Unscopable] + undefined replaceWith((Node or DOMString)... nodes); + [CEReactions, Unscopable] + undefined remove(); +}; + +interface mixin NonDocumentTypeChildNode { + [Pure] + readonly attribute Element? previousElementSibling; + [Pure] + readonly attribute Element? nextElementSibling; +}; diff --git a/dom/webidl/ChildSHistory.webidl b/dom/webidl/ChildSHistory.webidl new file mode 100644 index 0000000000..8c8693aec6 --- /dev/null +++ b/dom/webidl/ChildSHistory.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/. + */ + +interface nsISHistory; + +/** + * The ChildSHistory interface represents the child side of a browsing + * context's session history. + */ +[ChromeOnly, + Exposed=Window] +interface ChildSHistory { + [Pure] + readonly attribute long count; + [Pure] + readonly attribute long index; + + boolean canGo(long aOffset); + [Throws] undefined go(long aOffset, optional boolean aRequireUserInteraction = false, optional boolean aUserActivation = false); + + /** + * Reload the current entry. The flags which should be passed to this + * function are documented and defined in nsIWebNavigation.idl + */ + [Throws] + undefined reload(unsigned long aReloadFlags); + + /** + * Getter for the legacy nsISHistory implementation. + * + * legacySHistory has been deprecated. Don't use it, but instead handle + * the interaction with nsISHistory in the parent process. + */ + [Throws] + readonly attribute nsISHistory legacySHistory; +}; diff --git a/dom/webidl/ChromeNodeList.webidl b/dom/webidl/ChromeNodeList.webidl new file mode 100644 index 0000000000..2ec48873b7 --- /dev/null +++ b/dom/webidl/ChromeNodeList.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/. + */ + +[ChromeOnly, + Exposed=Window] +interface ChromeNodeList : NodeList { + constructor(); + + [Throws] + undefined append(Node aNode); + [Throws] + undefined remove(Node aNode); +}; diff --git a/dom/webidl/Client.webidl b/dom/webidl/Client.webidl new file mode 100644 index 0000000000..5dc9b6ea48 --- /dev/null +++ b/dom/webidl/Client.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/ServiceWorker/#client-interface + * + */ + +[Exposed=ServiceWorker] +interface Client { + readonly attribute USVString url; + + // Remove frameType in bug 1290936 + [BinaryName="GetFrameType"] + readonly attribute FrameType frameType; + + readonly attribute ClientType type; + readonly attribute DOMString id; + + // Implement reserved in bug 1264177 + // readonly attribute boolean reserved; + + [Throws] + undefined postMessage(any message, sequence transfer); + [Throws] + undefined postMessage(any message, optional StructuredSerializeOptions aOptions = {}); +}; + +[Exposed=ServiceWorker] +interface WindowClient : Client { + [BinaryName="GetVisibilityState"] + readonly attribute VisibilityState visibilityState; + readonly attribute boolean focused; + + // Implement ancestorOrigins in bug 1264180 + // [SameObject] readonly attribute FrozenArray ancestorOrigins; + + [Throws, NewObject, NeedsCallerType] + Promise focus(); + + [Throws, NewObject] + Promise navigate(USVString url); +}; + +// Remove FrameType in bug 1290936 +enum FrameType { + "auxiliary", + "top-level", + "nested", + "none" +}; diff --git a/dom/webidl/Clients.webidl b/dom/webidl/Clients.webidl new file mode 100644 index 0000000000..4eda1dd7bd --- /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<(Client or undefined)> get(DOMString id); + [NewObject] + Promise> matchAll(optional ClientQueryOptions options = {}); + [NewObject] + Promise openWindow(USVString url); + [NewObject] + Promise claim(); +}; + +dictionary ClientQueryOptions { + boolean includeUncontrolled = false; + ClientType type = "window"; +}; + +enum ClientType { + "window", + "worker", + "sharedworker", + // https://github.com/w3c/ServiceWorker/issues/1036 + "serviceworker", + "all" +}; diff --git a/dom/webidl/Clipboard.webidl b/dom/webidl/Clipboard.webidl new file mode 100644 index 0000000000..46ef9e91e0 --- /dev/null +++ b/dom/webidl/Clipboard.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 + * https://w3c.github.io/clipboard-apis/ + * + * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +typedef sequence ClipboardItems; + +[SecureContext, Exposed=Window] +interface Clipboard : EventTarget { + [Pref="dom.events.asyncClipboard.clipboardItem", NewObject, NeedsSubjectPrincipal] + Promise read(); + [Func="Clipboard::ReadTextEnabled", NewObject, NeedsSubjectPrincipal] + Promise readText(); + + [Pref="dom.events.asyncClipboard.clipboardItem", NewObject, NeedsSubjectPrincipal] + Promise write(ClipboardItems data); + + [NewObject, NeedsSubjectPrincipal] + Promise writeText(DOMString data); +}; + +partial interface Clipboard { + // @param allowed true, if the user allowed (e.g. clicked) the "Paste" menuitem. + // false, when the menupopup was dismissed. + [ChromeOnly] + undefined onUserReactedToPasteMenuPopup(boolean allowed); +}; + +typedef (DOMString or Blob) ClipboardItemDataType; +typedef Promise ClipboardItemData; +// callback ClipboardItemDelayedCallback = ClipboardItemData (); + +[SecureContext, Exposed=Window, Pref="dom.events.asyncClipboard.clipboardItem"] +interface ClipboardItem { + [Throws] + constructor(record items, + optional ClipboardItemOptions options = {}); + + // static ClipboardItem createDelayed( + // record items, + // optional ClipboardItemOptions options = {}); + + readonly attribute PresentationStyle presentationStyle; + // readonly attribute long long lastModified; + // readonly attribute boolean delayed; + + // TODO: Use FrozenArray once available. (Bug 1236777) + // readonly attribute FrozenArray types; + [Frozen, Cached, Pure] + readonly attribute sequence types; + + [NewObject] + Promise getType(DOMString type); +}; + +enum PresentationStyle { "unspecified", "inline", "attachment" }; + +dictionary ClipboardItemOptions { + PresentationStyle presentationStyle = "unspecified"; +}; diff --git a/dom/webidl/ClipboardEvent.webidl b/dom/webidl/ClipboardEvent.webidl new file mode 100644 index 0000000000..90ecfdb67d --- /dev/null +++ b/dom/webidl/ClipboardEvent.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://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. + */ + +[Exposed=Window] +interface ClipboardEvent : Event +{ + [Throws] + constructor(DOMString type, optional ClipboardEventInit eventInitDict = {}); + + 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 0000000000..a74e219fc4 --- /dev/null +++ b/dom/webidl/CloseEvent.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 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 + */ + +[LegacyEventInit, + Exposed=(Window,Worker)] +interface CloseEvent : Event +{ + constructor(DOMString type, optional CloseEventInit eventInitDict = {}); + + 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 0000000000..da18f0dede --- /dev/null +++ b/dom/webidl/CommandEvent.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/. + */ + +[ChromeOnly, Exposed=Window] +interface CommandEvent : Event { + readonly attribute DOMString? command; +}; diff --git a/dom/webidl/Comment.webidl b/dom/webidl/Comment.webidl new file mode 100644 index 0000000000..e3662a4d6c --- /dev/null +++ b/dom/webidl/Comment.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://dom.spec.whatwg.org/#comment + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=Window] +interface Comment : CharacterData { + [Throws] + constructor(optional DOMString data = ""); +}; diff --git a/dom/webidl/CompositionEvent.webidl b/dom/webidl/CompositionEvent.webidl new file mode 100644 index 0000000000..4ebaa919f6 --- /dev/null +++ b/dom/webidl/CompositionEvent.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/. + * + * https://w3c.github.io/uievents/#interface-compositionevent + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=Window] +interface CompositionEvent : UIEvent +{ + constructor(DOMString type, optional CompositionEventInit eventInitDict = {}); + + readonly attribute DOMString? data; + // locale is currently non-standard + 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 ranges; +}; + +dictionary CompositionEventInit : UIEventInit { + DOMString data = ""; +}; + +partial interface CompositionEvent +{ + undefined initCompositionEvent(DOMString typeArg, + optional boolean canBubbleArg = false, + optional boolean cancelableArg = false, + optional Window? viewArg = null, + optional DOMString? dataArg = null, + optional DOMString localeArg = ""); +}; diff --git a/dom/webidl/CompressionStream.webidl b/dom/webidl/CompressionStream.webidl new file mode 100644 index 0000000000..16c9af0ac1 --- /dev/null +++ b/dom/webidl/CompressionStream.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://wicg.github.io/compression/#compression-stream + */ + +enum CompressionFormat { + "deflate", + "deflate-raw", + "gzip", +}; + +[Exposed=*, Pref="dom.compression_streams.enabled"] +interface CompressionStream { + [Throws] + constructor(CompressionFormat format); +}; +CompressionStream includes GenericTransformStream; diff --git a/dom/webidl/Console.webidl b/dom/webidl/Console.webidl new file mode 100644 index 0000000000..5b98871391 --- /dev/null +++ b/dom/webidl/Console.webidl @@ -0,0 +1,246 @@ +/* -*- 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/. + * + * For more information on this interface, please see + * https://console.spec.whatwg.org/#console-namespace + */ + +[Exposed=(Window,Worker,WorkerDebugger,Worklet), + ClassString="Console", + ProtoObjectHack] +namespace console { + + // NOTE: if you touch this namespace, remember to update the ConsoleInstance + // interface as well! + + // Logging + [UseCounter] + undefined assert(optional boolean condition = false, any... data); + [UseCounter] + undefined clear(); + [UseCounter] + undefined count(optional DOMString label = "default"); + [UseCounter] + undefined countReset(optional DOMString label = "default"); + [UseCounter] + undefined debug(any... data); + [UseCounter] + undefined error(any... data); + [UseCounter] + undefined info(any... data); + [UseCounter] + undefined log(any... data); + [UseCounter] + undefined table(any... data); // FIXME: The spec is still unclear about this. + [UseCounter] + undefined trace(any... data); + [UseCounter] + undefined warn(any... data); + [UseCounter] + undefined dir(any... data); // FIXME: This doesn't follow the spec yet. + [UseCounter] + undefined dirxml(any... data); + + // Grouping + [UseCounter] + undefined group(any... data); + [UseCounter] + undefined groupCollapsed(any... data); + [UseCounter] + undefined groupEnd(); + + // Timing + [UseCounter] + undefined time(optional DOMString label = "default"); + [UseCounter] + undefined timeLog(optional DOMString label = "default", any... data); + [UseCounter] + undefined timeEnd(optional DOMString label = "default"); + + // Mozilla only or Webcompat methods + + [UseCounter] + undefined _exception(any... data); + [UseCounter] + undefined timeStamp(optional any data); + + [UseCounter] + undefined profile(any... data); + [UseCounter] + undefined profileEnd(any... data); + + [ChromeOnly] + const boolean IS_NATIVE_CONSOLE = true; + + [ChromeOnly, NewObject] + ConsoleInstance createInstance(optional ConsoleInstanceOptions options = {}); +}; + +// This is used to propagate console events to the observers. +[GenerateConversionToJS] +dictionary ConsoleEvent { + (unsigned long long or DOMString) ID; + (unsigned long long or DOMString) innerID; + DOMString consoleID = ""; + DOMString addonId = ""; + DOMString level = ""; + DOMString filename = ""; + // Unique identifier within the process for the script source this event is + // associated with, or zero. + unsigned long sourceId = 0; + unsigned long lineNumber = 0; + unsigned long columnNumber = 0; + DOMString functionName = ""; + double timeStamp = 0; + double microSecondTimeStamp = 0; + sequence arguments; + sequence 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 stacktrace; + DOMString groupName = ""; + any timer = null; + any counter = null; + DOMString prefix = ""; + boolean chromeContext = false; +}; + +// Event for profile operations +[GenerateConversionToJS] +dictionary ConsoleProfileEvent { + DOMString action = ""; + sequence arguments; + boolean chromeContext = false; +}; + +// This dictionary is used to manage stack trace data. +[GenerateConversionToJS] +dictionary ConsoleStackEntry { + DOMString filename = ""; + // Unique identifier within the process for the script source this entry is + // associated with, or zero. + unsigned long sourceId = 0; + unsigned long lineNumber = 0; + unsigned long columnNumber = 0; + DOMString functionName = ""; + DOMString? asyncCause; +}; + +[GenerateConversionToJS] +dictionary ConsoleTimerStart { + DOMString name = ""; +}; + +[GenerateConversionToJS] +dictionary ConsoleTimerLogOrEnd { + DOMString name = ""; + double duration = 0; +}; + +[GenerateConversionToJS] +dictionary ConsoleTimerError { + DOMString error = ""; + DOMString name = ""; +}; + +[GenerateConversionToJS] +dictionary ConsoleCounter { + DOMString label = ""; + unsigned long count = 0; +}; + +[GenerateConversionToJS] +dictionary ConsoleCounterError { + DOMString label = ""; + DOMString error = ""; +}; + +[ChromeOnly, + Exposed=(Window,Worker,WorkerDebugger,Worklet)] +// This is basically a copy of the console namespace. +interface ConsoleInstance { + // Logging + undefined assert(optional boolean condition = false, any... data); + undefined clear(); + undefined count(optional DOMString label = "default"); + undefined countReset(optional DOMString label = "default"); + undefined debug(any... data); + undefined error(any... data); + undefined info(any... data); + undefined log(any... data); + undefined table(any... data); // FIXME: The spec is still unclear about this. + undefined trace(any... data); + undefined warn(any... data); + undefined dir(any... data); // FIXME: This doesn't follow the spec yet. + undefined dirxml(any... data); + + // Grouping + undefined group(any... data); + undefined groupCollapsed(any... data); + undefined groupEnd(); + + // Timing + undefined time(optional DOMString label = "default"); + undefined timeLog(optional DOMString label = "default", any... data); + undefined timeEnd(optional DOMString label = "default"); + + // Mozilla only or Webcompat methods + + undefined _exception(any... data); + undefined timeStamp(optional any data); + + undefined profile(any... data); + undefined profileEnd(any... data); +}; + +callback ConsoleInstanceDumpCallback = undefined (DOMString message); + +enum ConsoleLogLevel { + "All", "Debug", "Log", "Info", "Clear", "Trace", "TimeLog", "TimeEnd", "Time", + "Group", "GroupEnd", "Profile", "ProfileEnd", "Dir", "Dirxml", "Warn", "Error", + "Off" +}; + +dictionary ConsoleInstanceOptions { + // An optional function to intercept all strings written to stdout. + ConsoleInstanceDumpCallback dump; + + // An optional prefix string to be printed before the actual logged message. + DOMString prefix = ""; + + // An ID representing the source of the message. Normally the inner ID of a + // DOM window. + DOMString innerID = ""; + + // String identified for the console, this will be passed through the console + // notifications. + DOMString consoleID = ""; + + // Identifier that allows to filter which messages are logged based on their + // log level. + ConsoleLogLevel maxLogLevel; + + // String pref name which contains the level to use for maxLogLevel. If the + // pref doesn't exist, gets removed or it is used in workers, the maxLogLevel + // will default to the value passed to this constructor (or "all" if it wasn't + // specified). + DOMString maxLogLevelPref = ""; +}; + +enum ConsoleLevel { "log", "warning", "error" }; + +// this interface is just for testing +partial interface ConsoleInstance { + [ChromeOnly] + undefined reportForServiceWorkerScope(DOMString scope, DOMString message, + DOMString filename, unsigned long lineNumber, + unsigned long columnNumber, + ConsoleLevel level); +}; diff --git a/dom/webidl/ConstantSourceNode.webidl b/dom/webidl/ConstantSourceNode.webidl new file mode 100644 index 0000000000..a7106b04db --- /dev/null +++ b/dom/webidl/ConstantSourceNode.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. + */ + +dictionary ConstantSourceOptions { + float offset = 1; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface ConstantSourceNode : AudioScheduledSourceNode { + constructor(BaseAudioContext context, + optional ConstantSourceOptions options = {}); + + readonly attribute AudioParam offset; +}; diff --git a/dom/webidl/ContentVisibilityAutoStateChangeEvent.webidl b/dom/webidl/ContentVisibilityAutoStateChangeEvent.webidl new file mode 100644 index 0000000000..91b7ca2e14 --- /dev/null +++ b/dom/webidl/ContentVisibilityAutoStateChangeEvent.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/. + * + * https://drafts.csswg.org/css-contain-2/#content-visibility-auto-state-changed + */ + +[Exposed=Window, Pref="layout.css.content-visibility.enabled"] +interface ContentVisibilityAutoStateChangeEvent : Event { + constructor(DOMString type, + optional ContentVisibilityAutoStateChangeEventInit eventInitDict = {}); + readonly attribute boolean skipped; +}; + +dictionary ContentVisibilityAutoStateChangeEventInit : EventInit { + boolean skipped = false; +}; diff --git a/dom/webidl/ConvolverNode.webidl b/dom/webidl/ConvolverNode.webidl new file mode 100644 index 0000000000..cde74514a4 --- /dev/null +++ b/dom/webidl/ConvolverNode.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. + */ + +dictionary ConvolverOptions : AudioNodeOptions { + AudioBuffer? buffer; + boolean disableNormalization = false; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface ConvolverNode : AudioNode { + [Throws] + constructor(BaseAudioContext context, optional + ConvolverOptions options = {}); + + [SetterThrows] + attribute AudioBuffer? buffer; + attribute boolean normalize; + +}; + +// Mozilla extension +ConvolverNode includes AudioNodePassThrough; diff --git a/dom/webidl/CreateOfferRequest.webidl b/dom/webidl/CreateOfferRequest.webidl new file mode 100644 index 0000000000..f6ceb800ea --- /dev/null +++ b/dom/webidl/CreateOfferRequest.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 is an internal IDL file + */ + +[ChromeOnly, + JSImplementation="@mozilla.org/dom/createofferrequest;1", + Exposed=Window] +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/CredentialManagement.webidl b/dom/webidl/CredentialManagement.webidl new file mode 100644 index 0000000000..4b751a7537 --- /dev/null +++ b/dom/webidl/CredentialManagement.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://www.w3.org/TR/credential-management-1/ + * and + * https://w3c.github.io/webauthn/ + * and + * https://fedidcg.github.io/FedCM/ + */ + +[Exposed=Window, SecureContext] +interface Credential { + readonly attribute USVString id; + readonly attribute DOMString type; +}; + +[Exposed=Window, SecureContext] +interface CredentialsContainer { + [NewObject] + Promise get(optional CredentialRequestOptions options = {}); + [NewObject] + Promise create(optional CredentialCreationOptions options = {}); + [NewObject] + Promise store(Credential credential); + [NewObject] + Promise preventSilentAccess(); +}; + +dictionary CredentialRequestOptions { + // This is taken from the partial definition in + // https://w3c.github.io/webauthn/#sctn-credentialrequestoptions-extension + [Pref="security.webauth.webauthn"] + PublicKeyCredentialRequestOptions publicKey; + // This is taken from the partial definition in + // https://fedidcg.github.io/FedCM/#browser-api-credential-request-options + [Pref="dom.security.credentialmanagement.identity.enabled"] + IdentityCredentialRequestOptions identity; + AbortSignal signal; +}; + +dictionary CredentialCreationOptions { + // This is taken from the partial definition in + // https://w3c.github.io/webauthn/#sctn-credentialcreationoptions-extension + [Pref="security.webauth.webauthn"] + PublicKeyCredentialCreationOptions publicKey; + AbortSignal signal; +}; diff --git a/dom/webidl/Crypto.webidl b/dom/webidl/Crypto.webidl new file mode 100644 index 0000000000..538eefb159 --- /dev/null +++ b/dom/webidl/Crypto.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://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#crypto-interface + */ + +[Exposed=(Window,Worker)] +interface mixin GlobalCrypto { + [Throws] readonly attribute Crypto crypto; +}; + +[Exposed=(Window,Worker)] +interface Crypto { + [SecureContext] + readonly attribute SubtleCrypto subtle; + + [Throws] + ArrayBufferView getRandomValues(ArrayBufferView array); + + [SecureContext, Pref="dom.crypto.randomUUID.enabled"] + UTF8String randomUUID(); +}; diff --git a/dom/webidl/CustomElementRegistry.webidl b/dom/webidl/CustomElementRegistry.webidl new file mode 100644 index 0000000000..8c10f2f41f --- /dev/null +++ b/dom/webidl/CustomElementRegistry.webidl @@ -0,0 +1,64 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.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 +[Exposed=Window] +interface CustomElementRegistry { + [CEReactions, Throws, UseCounter] + undefined define(DOMString name, CustomElementConstructor constructor, + optional ElementDefinitionOptions options = {}); + [ChromeOnly, Throws] + undefined setElementCreationCallback(DOMString name, CustomElementCreationCallback callback); + (CustomElementConstructor or undefined) get(DOMString name); + [Throws] + Promise whenDefined(DOMString name); + [CEReactions] undefined upgrade(Node root); +}; + +dictionary ElementDefinitionOptions { + DOMString extends; +}; + +callback constructor CustomElementConstructor = any (); + +[MOZ_CAN_RUN_SCRIPT_BOUNDARY] +callback CustomElementCreationCallback = undefined (DOMString name); + +[MOZ_CAN_RUN_SCRIPT_BOUNDARY] +callback LifecycleConnectedCallback = undefined(); +[MOZ_CAN_RUN_SCRIPT_BOUNDARY] +callback LifecycleDisconnectedCallback = undefined(); +[MOZ_CAN_RUN_SCRIPT_BOUNDARY] +callback LifecycleAdoptedCallback = undefined(Document? oldDocument, + Document? newDocment); +[MOZ_CAN_RUN_SCRIPT_BOUNDARY] +callback LifecycleAttributeChangedCallback = undefined(DOMString attrName, + DOMString? oldValue, + DOMString? newValue, + DOMString? namespaceURI); +[MOZ_CAN_RUN_SCRIPT_BOUNDARY] +callback LifecycleFormAssociatedCallback = undefined(HTMLFormElement? form); +[MOZ_CAN_RUN_SCRIPT_BOUNDARY] +callback LifecycleFormResetCallback = undefined(); +[MOZ_CAN_RUN_SCRIPT_BOUNDARY] +callback LifecycleFormDisabledCallback = undefined(boolean disabled); +[MOZ_CAN_RUN_SCRIPT_BOUNDARY] +callback LifecycleGetCustomInterfaceCallback = object?(any iid); + +// Unsorted is necessary until https://github.com/whatwg/html/issues/3580 is resolved. +[GenerateInit, Unsorted] +dictionary LifecycleCallbacks { + LifecycleConnectedCallback connectedCallback; + LifecycleDisconnectedCallback disconnectedCallback; + LifecycleAdoptedCallback adoptedCallback; + LifecycleAttributeChangedCallback attributeChangedCallback; + [ChromeOnly] LifecycleGetCustomInterfaceCallback getCustomInterfaceCallback; +}; + +[GenerateInit, Unsorted] +dictionary FormAssociatedLifecycleCallbacks { + LifecycleFormAssociatedCallback formAssociatedCallback; + LifecycleFormResetCallback formResetCallback; + LifecycleFormDisabledCallback formDisabledCallback; +}; diff --git a/dom/webidl/CustomEvent.webidl b/dom/webidl/CustomEvent.webidl new file mode 100644 index 0000000000..6543bb1e86 --- /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. + */ + +[Exposed=(Window, Worker)] +interface CustomEvent : Event +{ + constructor(DOMString type, optional CustomEventInit eventInitDict = {}); + + readonly attribute any detail; + + // initCustomEvent is a Gecko specific deprecated method. + undefined initCustomEvent(DOMString type, + optional boolean canBubble = false, + optional boolean cancelable = false, + optional any detail = null); +}; + +dictionary CustomEventInit : EventInit +{ + any detail = null; +}; diff --git a/dom/webidl/DOMException.webidl b/dom/webidl/DOMException.webidl new file mode 100644 index 0000000000..44f93a4a1a --- /dev/null +++ b/dom/webidl/DOMException.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 + * https://webidl.spec.whatwg.org/#idl-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; + +interface mixin ExceptionMembers +{ + // The nsresult associated with this exception. + readonly attribute unsigned long result; + + // 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 + [Replaceable] + readonly attribute DOMString stack; +}; + +[LegacyNoInterfaceObject, Exposed=(Window,Worker)] +interface Exception { + // The name of the error code (ie, a string repr of |result|). + readonly attribute DOMString name; + // A custom message set by the thrower. + [BinaryName="messageMoz"] + readonly attribute DOMString message; + // A generic formatter - make it suitable to print, etc. + stringifier; +}; + +Exception includes 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), + Serializable] +interface DOMException { + constructor(optional DOMString message = "", optional DOMString name); + + // The name of the error code (ie, a string repr of |result|). + readonly attribute DOMString name; + // A custom message set by the thrower. + [BinaryName="messageMoz"] + readonly attribute DOMString message; + readonly attribute unsigned short code; + + 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; +}; + +// XXXkhuey copy all of Gecko's non-standard stuff onto DOMException, but leave +// the prototype chain sane. +DOMException includes ExceptionMembers; diff --git a/dom/webidl/DOMImplementation.webidl b/dom/webidl/DOMImplementation.webidl new file mode 100644 index 0000000000..9f3be87557 --- /dev/null +++ b/dom/webidl/DOMImplementation.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://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. + */ + +[Exposed=Window] +interface DOMImplementation { + boolean hasFeature(); + + [Throws] + DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, + DOMString systemId); + [Throws] + Document createDocument(DOMString? namespace, + [LegacyNullToEmptyString] DOMString qualifiedName, + optional DocumentType? doctype = null); + [Throws] + Document createHTMLDocument(optional DOMString title); +}; diff --git a/dom/webidl/DOMLocalization.webidl b/dom/webidl/DOMLocalization.webidl new file mode 100644 index 0000000000..b229f37c5e --- /dev/null +++ b/dom/webidl/DOMLocalization.webidl @@ -0,0 +1,166 @@ +/* -*- 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/. */ + +/** + * DOMLocalization is an extension of the Fluent Localization API. + * + * DOMLocalization adds a state for storing `roots` - DOM elements + * which translation status is controlled by the DOMLocalization + * instance and monitored for mutations. + * DOMLocalization also adds methods dedicated to DOM manipulation. + * + * Methods: + * - connectRoot - add a root + * - disconnectRoot - remove a root + * - pauseObserving - pause observing of roots + * - resumeObserving - resume observing of roots + * - setAttributes - set l10n attributes of an element + * - getAttributes - retrieve l10n attributes of an element + * - translateFragment - translate a DOM fragment + * - translateElements - translate a list of DOM elements + * - translateRoots - translate all attached roots + * + */ + +[Func="IsChromeOrUAWidget", Exposed=Window] +interface DOMLocalization : Localization { + /** + * Constructor arguments: + * - aResourceids - a list of localization resource URIs + * which will provide messages for this + * Localization instance. + * - aSync - Specifies if the initial state of the DOMLocalization + * and the underlying Localization API is synchronous. + * This enables a number of synchronous methods on the + * Localization API and uses it for `TranslateElements` + * making the method return a synchronusly resolved promise. + * - aRegistry - optional custom L10nRegistry to be used by this Localization instance. + * - aLocales - custom set of locales to be used for this Localization. + */ + [Throws] + constructor(sequence aResourceIds, + optional boolean aSync = false, + optional L10nRegistry aRegistry, + optional sequence aLocales); + + /** + * Adds a node to nodes observed for localization + * related changes. + */ + undefined connectRoot(Node aElement); + + /** + * Removes a node from nodes observed for localization + * related changes. + */ + undefined disconnectRoot(Node aElement); + + /** + * Pauses the MutationObserver set to observe + * localization related DOM mutations. + */ + undefined pauseObserving(); + + /** + * Resumes the MutationObserver set to observe + * localization related DOM mutations. + */ + undefined resumeObserving(); + + /** + * A helper function which allows the user to set localization-specific attributes + * on an element. + * This method lives on `document.l10n` for compatibility reasons with the + * JS FluentDOM implementation. We may consider moving it onto Element. + * + * Example: + * document.l10n.setAttributes(h1, "key1", { emailCount: 5 }); + * + *

+ */ + [Throws] undefined setAttributes(Element aElement, DOMString aId, optional object? aArgs); + + /** + * A helper function which allows the user to retrieve a set of localization-specific + * attributes from an element. + * This method lives on `document.l10n` for compatibility reasons with the + * JS FluentDOM implementation. We may consider moving it onto Element. + * + * Example: + * let l10nAttrs = document.l10n.getAttributes(h1); + * assert.deepEqual(l10nAttrs, {id: "key1", args: { emailCount: 5}); + */ + [Throws] L10nIdArgs getAttributes(Element aElement); + + /** + * A helper function which allows the user to set the l10n args for an element. This + * is similar to the setAttributes method, but does not require the l10n ID. + * + * Example: + * + *

+ * + * document.l10n.setArgs(h1, { emailCount: 5 }); + * + *

+ * + * document.l10n.setArgs(h1); + * + *

+ */ + [Throws] undefined setArgs(Element aElement, optional object? aArgs); + + /** + * Triggers translation of a subtree rooted at aNode. + * + * The method finds all translatable descendants of the argument and + * localizes them. + * + * This method is mainly useful to trigger translation not covered by the + * DOMLocalization's MutationObserver - for example before it gets attached + * to the tree. + * In such cases, when the already-translated fragment gets + * injected into the observed root, one should `pauseObserving`, + * then append the fragment, and finally `resumeObserving`. + * + * Example: + * await document.l10n.translatFragment(frag); + * root.pauseObserving(); + * parent.appendChild(frag); + * root.resumeObserving(); + */ + [NewObject] Promise translateFragment(Node aNode); + + /** + * Triggers translation of a list of Elements using the localization context. + * + * The method only translates the elements directly passed to the method, + * not any descendant nodes. + * + * This method is mainly useful to trigger translation not covered by the + * DOMLocalization's MutationObserver - for example before it gets attached + * to the tree. + * In such cases, when the already-translated fragment gets + * injected into the observed root, one should `pauseObserving`, + * then append the fragment, and finally `resumeObserving`. + * + * Example: + * await document.l10n.translateElements([elem1, elem2]); + * root.pauseObserving(); + * parent.appendChild(elem1); + * root.resumeObserving(); + * alert(elem2.textContent); + */ + [NewObject] Promise translateElements(sequence aElements); + + /** + * Triggers translation of all attached roots and sets their + * locale info and directionality attributes. + * + * Example: + * await document.l10n.translateRoots(); + */ + [NewObject] Promise translateRoots(); +}; diff --git a/dom/webidl/DOMMatrix.webidl b/dom/webidl/DOMMatrix.webidl new file mode 100644 index 0000000000..5f7a1dcfe6 --- /dev/null +++ b/dom/webidl/DOMMatrix.webidl @@ -0,0 +1,186 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL 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.fxtf.org/geometry/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=(Window,Worker), + Serializable] +interface DOMMatrixReadOnly { + [Throws] + constructor(optional (UTF8String or sequence or DOMMatrixReadOnly) init); + + [NewObject, Throws] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other = {}); + [NewObject, Throws] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32); + [NewObject, Throws] static DOMMatrixReadOnly fromFloat64Array(Float64Array array64); + + + // 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(optional unrestricted double tx = 0, + optional unrestricted double ty = 0, + optional unrestricted double tz = 0); + [NewObject] DOMMatrix scale(optional unrestricted double scaleX = 1, + optional unrestricted double scaleY, + optional unrestricted double scaleZ = 1, + optional unrestricted double originX = 0, + optional unrestricted double originY = 0, + optional unrestricted double originZ = 0); + [NewObject] DOMMatrix scaleNonUniform(optional unrestricted double scaleX = 1, + optional unrestricted double scaleY = 1); + DOMMatrix scale3d(optional unrestricted double scale = 1, + optional unrestricted double originX = 0, + optional unrestricted double originY = 0, + optional unrestricted double originZ = 0); + [NewObject] DOMMatrix rotate(optional unrestricted double rotX = 0, + optional unrestricted double rotY, + optional unrestricted double rotZ); + [NewObject] DOMMatrix rotateFromVector(optional unrestricted double x = 0, + optional unrestricted double y = 0); + [NewObject] DOMMatrix rotateAxisAngle(optional unrestricted double x = 0, + optional unrestricted double y = 0, + optional unrestricted double z = 0, + optional unrestricted double angle = 0); + DOMMatrix skewX(optional unrestricted double sx = 0); + DOMMatrix skewY(optional unrestricted double sy = 0); + [NewObject, Throws] DOMMatrix multiply(optional DOMMatrixInit other = {}); + DOMMatrix flipX(); + DOMMatrix flipY(); + DOMMatrix inverse(); + + // Helper methods + readonly attribute boolean is2D; + readonly attribute boolean isIdentity; + DOMPoint transformPoint(optional DOMPointInit point = {}); + [Throws] Float32Array toFloat32Array(); + [Throws] Float64Array toFloat64Array(); + [Exposed=Window, Throws] stringifier; + [Default] object toJSON(); +}; + +[Exposed=(Window,Worker), + Serializable, + LegacyWindowAlias=WebKitCSSMatrix] +interface DOMMatrix : DOMMatrixReadOnly { + [Throws] + constructor(optional (UTF8String or sequence or DOMMatrixReadOnly) init); + + [NewObject, Throws] static DOMMatrix fromMatrix(optional DOMMatrixInit other = {}); + [NewObject, Throws] static DOMMatrix fromFloat32Array(Float32Array array32); + [NewObject, Throws] static DOMMatrix fromFloat64Array(Float64Array array64); + + + // 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 + [Throws] DOMMatrix multiplySelf(optional DOMMatrixInit other = {}); + [Throws] DOMMatrix preMultiplySelf(optional DOMMatrixInit other = {}); + DOMMatrix translateSelf(optional unrestricted double tx = 0, + optional unrestricted double ty = 0, + optional unrestricted double tz = 0); + DOMMatrix scaleSelf(optional unrestricted double scaleX = 1, + optional unrestricted double scaleY, + optional unrestricted double scaleZ = 1, + optional unrestricted double originX = 0, + optional unrestricted double originY = 0, + optional unrestricted double originZ = 0); + DOMMatrix scale3dSelf(optional unrestricted double scale = 1, + optional unrestricted double originX = 0, + optional unrestricted double originY = 0, + optional unrestricted double originZ = 0); + DOMMatrix rotateSelf(optional unrestricted double rotX = 0, + optional unrestricted double rotY, + optional unrestricted double rotZ); + DOMMatrix rotateFromVectorSelf(optional unrestricted double x = 0, + optional unrestricted double y = 0); + DOMMatrix rotateAxisAngleSelf(optional unrestricted double x = 0, + optional unrestricted double y = 0, + optional unrestricted double z = 0, + optional unrestricted double angle = 0); + DOMMatrix skewXSelf(optional unrestricted double sx = 0); + DOMMatrix skewYSelf(optional unrestricted double sy = 0); + DOMMatrix invertSelf(); + [Exposed=Window, Throws] DOMMatrix setMatrixValue(UTF8String transformList); +}; + +dictionary DOMMatrix2DInit { + unrestricted double a; + unrestricted double b; + unrestricted double c; + unrestricted double d; + unrestricted double e; + unrestricted double f; + unrestricted double m11; + unrestricted double m12; + unrestricted double m21; + unrestricted double m22; + unrestricted double m41; + unrestricted double m42; +}; + +dictionary DOMMatrixInit : DOMMatrix2DInit { + unrestricted double m13 = 0; + unrestricted double m14 = 0; + unrestricted double m23 = 0; + unrestricted double m24 = 0; + unrestricted double m31 = 0; + unrestricted double m32 = 0; + unrestricted double m33 = 1; + unrestricted double m34 = 0; + unrestricted double m43 = 0; + unrestricted double m44 = 1; + boolean is2D; +}; diff --git a/dom/webidl/DOMParser.webidl b/dom/webidl/DOMParser.webidl new file mode 100644 index 0000000000..8c8e62cdbf --- /dev/null +++ b/dom/webidl/DOMParser.webidl @@ -0,0 +1,49 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was 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" +}; + +[Exposed=Window] +interface DOMParser { + [Throws] + constructor(); + + [NewObject, Throws, UseCounter] + Document parseFromString(DOMString str, SupportedType type); + + [NewObject, ChromeOnly, Throws] + Document parseFromSafeString(DOMString str, SupportedType type); + + // Mozilla-specific stuff + [NewObject, Throws, ChromeOnly] + Document parseFromBuffer(sequence buf, SupportedType type); + [NewObject, Throws, ChromeOnly] + Document parseFromBuffer(Uint8Array buf, SupportedType type); + [NewObject, Throws, ChromeOnly] + Document parseFromStream(InputStream stream, DOMString? charset, + long contentLength, SupportedType type); + // Can be used to allow a DOMParser to parse XUL/XBL no matter what + // principal it's using for the document. + [ChromeOnly] + undefined forceEnableXULXBL(); + + // Can be used to allow a DOMParser to load DTDs from URLs that + // normally would not be allowed based on the document principal. + [Func="IsChromeOrUAWidget"] + undefined forceEnableDTD(); +}; diff --git a/dom/webidl/DOMPoint.webidl b/dom/webidl/DOMPoint.webidl new file mode 100644 index 0000000000..ad95b2f716 --- /dev/null +++ b/dom/webidl/DOMPoint.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/. + * + * The origin of this IDL file is + * https://drafts.fxtf.org/geometry/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=(Window,Worker), + Serializable] +interface DOMPointReadOnly { + constructor(optional unrestricted double x = 0, + optional unrestricted double y = 0, + optional unrestricted double z = 0, + optional unrestricted double w = 1); + + [NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other = {}); + + readonly attribute unrestricted double x; + readonly attribute unrestricted double y; + readonly attribute unrestricted double z; + readonly attribute unrestricted double w; + + [NewObject, Throws] DOMPoint matrixTransform(optional DOMMatrixInit matrix = {}); + + [Default] object toJSON(); +}; + +[Exposed=(Window,Worker), + Serializable] +interface DOMPoint : DOMPointReadOnly { + constructor(optional unrestricted double x = 0, + optional unrestricted double y = 0, + optional unrestricted double z = 0, + optional unrestricted double w = 1); + + [NewObject] static DOMPoint fromPoint(optional DOMPointInit other = {}); + + 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; +}; diff --git a/dom/webidl/DOMQuad.webidl b/dom/webidl/DOMQuad.webidl new file mode 100644 index 0000000000..bc3518890a --- /dev/null +++ b/dom/webidl/DOMQuad.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 + * https://drafts.fxtf.org/geometry/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=(Window,Worker), + Serializable] +interface DOMQuad { + constructor(optional DOMPointInit p1 = {}, optional DOMPointInit p2 = {}, + optional DOMPointInit p3 = {}, optional DOMPointInit p4 = {}); + constructor(DOMRectReadOnly rect); + + [NewObject] static DOMQuad fromRect(optional DOMRectInit other = {}); + [NewObject] static DOMQuad fromQuad(optional DOMQuadInit other = {}); + + [SameObject] readonly attribute DOMPoint p1; + [SameObject] readonly attribute DOMPoint p2; + [SameObject] readonly attribute DOMPoint p3; + [SameObject] readonly attribute DOMPoint p4; + [NewObject] DOMRectReadOnly getBounds(); + + [Default] object toJSON(); +}; + +dictionary DOMQuadInit { + DOMPointInit p1 = {}; + DOMPointInit p2 = {}; + DOMPointInit p3 = {}; + DOMPointInit p4 = {}; +}; diff --git a/dom/webidl/DOMRect.webidl b/dom/webidl/DOMRect.webidl new file mode 100644 index 0000000000..c1c7e5c8c4 --- /dev/null +++ b/dom/webidl/DOMRect.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 + * https://drafts.fxtf.org/geometry/ + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=(Window,Worker), + Serializable] +interface DOMRect : DOMRectReadOnly { + constructor(optional unrestricted double x = 0, + optional unrestricted double y = 0, + optional unrestricted double width = 0, + optional unrestricted double height = 0); + + [NewObject] static DOMRect fromRect(optional DOMRectInit other = {}); + + inherit attribute unrestricted double x; + inherit attribute unrestricted double y; + inherit attribute unrestricted double width; + inherit attribute unrestricted double height; +}; + +[ProbablyShortLivingWrapper, + Exposed=(Window,Worker), + Serializable] +interface DOMRectReadOnly { + constructor(optional unrestricted double x = 0, + optional unrestricted double y = 0, + optional unrestricted double width = 0, + optional unrestricted double height = 0); + + [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other = {}); + + 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; + + [Default] object toJSON(); +}; + +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 0000000000..8257f73327 --- /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/. + */ + +[Exposed=Window] +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 0000000000..e7e40cfd6d --- /dev/null +++ b/dom/webidl/DOMRequest.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/. */ + +enum DOMRequestReadyState { "pending", "done" }; + +[Exposed=(Window,Worker)] +interface mixin DOMRequestShared { + readonly attribute DOMRequestReadyState readyState; + + readonly attribute any result; + readonly attribute DOMException? error; + + attribute EventHandler onsuccess; + attribute EventHandler onerror; +}; + +[Exposed=(Window,Worker)] +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); + + [ChromeOnly] + undefined fireDetailedError(DOMException aError); +}; + +DOMRequest includes DOMRequestShared; diff --git a/dom/webidl/DOMStringList.webidl b/dom/webidl/DOMStringList.webidl new file mode 100644 index 0000000000..023956b5b6 --- /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)] +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 0000000000..5f9dcf54c1 --- /dev/null +++ b/dom/webidl/DOMStringMap.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/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. + */ + +[LegacyOverrideBuiltIns, + Exposed=Window] +interface DOMStringMap { + getter DOMString (DOMString name); + [CEReactions, Throws] + setter undefined (DOMString name, DOMString value); + [CEReactions] + deleter undefined (DOMString name); +}; diff --git a/dom/webidl/DOMTokenList.webidl b/dom/webidl/DOMTokenList.webidl new file mode 100644 index 0000000000..c048b2228c --- /dev/null +++ b/dom/webidl/DOMTokenList.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://dom.spec.whatwg.org/#interface-domtokenlist + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Exposed=Window] +interface DOMTokenList { + [Pure] + readonly attribute unsigned long length; + [Pure] + getter DOMString? item(unsigned long index); + [Pure] + boolean contains(DOMString token); + [CEReactions, Throws] + undefined add(DOMString... tokens); + [CEReactions, Throws] + undefined remove(DOMString... tokens); + [CEReactions, Throws] + boolean replace(DOMString token, DOMString newToken); + [CEReactions, Throws] + boolean toggle(DOMString token, optional boolean force); + [Throws] + boolean supports(DOMString token); + [CEReactions, SetterThrows, Pure] + stringifier attribute DOMString value; + iterable; +}; diff --git a/dom/webidl/DataTransfer.webidl b/dom/webidl/DataTransfer.webidl new file mode 100644 index 0000000000..f1e70ad9bd --- /dev/null +++ b/dom/webidl/DataTransfer.webidl @@ -0,0 +1,192 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was 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 + */ +interface ContentSecurityPolicy; + +[Exposed=Window] +interface DataTransfer { + constructor(); + + attribute DOMString dropEffect; + attribute DOMString effectAllowed; + + readonly attribute DataTransferItemList items; + + undefined 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, NeedsCallerType, ReturnValueNeedsContainsHack] + readonly attribute sequence types; + [Throws, NeedsSubjectPrincipal] + DOMString getData(DOMString format); + [Throws, NeedsSubjectPrincipal] + undefined setData(DOMString format, DOMString data); + [Throws, NeedsSubjectPrincipal] + undefined clearData(optional DOMString format); + [NeedsSubjectPrincipal] + readonly attribute FileList? files; +}; + +// 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, UseCounter] + undefined addElement(Element element); + + /** + * The number of items being dragged. + */ + [ChromeOnly] + 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'. + */ + [UseCounter] + 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, ChromeOnly] + 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, ChromeOnly] + undefined 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, ChromeOnly] + undefined 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, ChromeOnly] + any mozGetDataAt(DOMString format, unsigned long index); + + /** + * Update the drag image. Arguments are the same as setDragImage. This is only + * valid within the parent chrome process. + */ + [ChromeOnly] + undefined updateDragImage(Element image, long x, long y); + + /** + * 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. + */ + [UseCounter] + 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. + */ + [UseCounter] + readonly attribute Node? mozSourceNode; + + /** + * The top-level window context that mouse was pressed over to begin the drag. + * For external drags, this will be null. + */ + [ChromeOnly] + readonly attribute WindowContext? sourceTopWindowContext; + + /** + * The URI spec of the triggering principal. This may be different than + * sourceNode's principal when sourceNode is xul:browser and the drag is + * triggered in a browsing context inside it. + */ + [ChromeOnly] + readonly attribute DOMString mozTriggeringPrincipalURISpec; + + [ChromeOnly] + readonly attribute ContentSecurityPolicy? mozCSP; + + /** + * Copy the given DataTransfer for the given event. Used by testing code for + * creating emulated Drag and Drop events in the UI. + * + * NOTE: Don't expose a DataTransfer produced with this method to the web or + * use this for non-testing purposes. It can easily be used to get the + * DataTransfer into an invalid state, and is an unstable implementation + * detail of EventUtils.synthesizeDrag. + */ + [Throws, ChromeOnly] + DataTransfer mozCloneForEvent(DOMString event); + + /** + * Whether to show the "fail" animation that returns a dragged item + * to its source. Only works on macOS, and has to be set early in the drag + * on that platform. + * Defaults to true. + */ + [ChromeOnly] + attribute boolean mozShowFailAnimation; +}; diff --git a/dom/webidl/DataTransferItem.webidl b/dom/webidl/DataTransferItem.webidl new file mode 100644 index 0000000000..1e7bb2ee58 --- /dev/null +++ b/dom/webidl/DataTransferItem.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://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitem-interface + * https://wicg.github.io/entries-api/#idl-index + */ + +[Exposed=Window] +interface DataTransferItem { + readonly attribute DOMString kind; + readonly attribute DOMString type; + [Throws, NeedsSubjectPrincipal] + undefined getAsString(FunctionStringCallback? callback); + [Throws, NeedsSubjectPrincipal] + File? getAsFile(); +}; + +callback FunctionStringCallback = undefined (DOMString data); + +// https://wicg.github.io/entries-api/#idl-index +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 0000000000..fbcdd9d322 --- /dev/null +++ b/dom/webidl/DataTransferItemList.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://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitemlist-interface + */ + +[Exposed=Window] +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] + undefined remove(unsigned long index); + [Throws, NeedsSubjectPrincipal] + undefined clear(); +}; diff --git a/dom/webidl/DecoderDoctorNotification.webidl b/dom/webidl/DecoderDoctorNotification.webidl new file mode 100644 index 0000000000..6c6ad6835e --- /dev/null +++ b/dom/webidl/DecoderDoctorNotification.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/. + */ + +enum DecoderDoctorNotificationType { + "cannot-play", + "platform-decoder-not-found", + "can-play-but-some-missing-decoders", + "cannot-initialize-pulseaudio", + "unsupported-libavcodec", + "decode-error", + "decode-warning", +}; + +enum DecoderDoctorReportType { + "mediawidevinenowmf", + "mediawmfneeded", + "mediaplatformdecodernotfound", + "mediacannotplaynodecoders", + "medianodecoders", + "mediacannotinitializepulseaudio", + "mediaunsupportedlibavcodec", + "mediadecodeerror", + "mediadecodewarning", +}; + +[GenerateToJSON] +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; + // If provided, technical details about the decode-error/warning. + DOMString decodeIssue; + // If provided, URL of the document where the issue happened. + DOMString docURL; + // If provided, URL of the media resource that caused a decode-error/warning. + DOMString resourceURL; +}; diff --git a/dom/webidl/DecompressionStream.webidl b/dom/webidl/DecompressionStream.webidl new file mode 100644 index 0000000000..120c16b1aa --- /dev/null +++ b/dom/webidl/DecompressionStream.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://wicg.github.io/compression/#decompression-stream + */ + +[Exposed=*, Pref="dom.compression_streams.enabled"] +interface DecompressionStream { + [Throws] + constructor(CompressionFormat format); +}; +DecompressionStream includes GenericTransformStream; diff --git a/dom/webidl/DedicatedWorkerGlobalScope.webidl b/dom/webidl/DedicatedWorkerGlobalScope.webidl new file mode 100644 index 0000000000..e32e23c0cd --- /dev/null +++ b/dom/webidl/DedicatedWorkerGlobalScope.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.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 { + [Replaceable] + readonly attribute DOMString name; + + [Throws] + undefined postMessage(any message, sequence transfer); + [Throws] + undefined postMessage(any message, optional StructuredSerializeOptions options = {}); + + undefined close(); + + attribute EventHandler onmessage; + attribute EventHandler onmessageerror; + + // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames + // Ideally we would just include AnimationFrameProvider to add the interface, + // but we cannot make an include conditional. + [Pref="dom.workers.requestAnimationFrame", Throws] + long requestAnimationFrame(FrameRequestCallback callback); + + [Pref="dom.workers.requestAnimationFrame", Throws] + undefined cancelAnimationFrame(long handle); +}; diff --git a/dom/webidl/DelayNode.webidl b/dom/webidl/DelayNode.webidl new file mode 100644 index 0000000000..16e973f92f --- /dev/null +++ b/dom/webidl/DelayNode.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 + * 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 DelayOptions : AudioNodeOptions { + double maxDelayTime = 1; + double delayTime = 0; +}; + +[Pref="dom.webaudio.enabled", + Exposed=Window] +interface DelayNode : AudioNode { + [Throws] + constructor(BaseAudioContext context, optional DelayOptions options = {}); + + readonly attribute AudioParam delayTime; + +}; + +// Mozilla extension +DelayNode includes AudioNodePassThrough; diff --git a/dom/webidl/DeviceLightEvent.webidl b/dom/webidl/DeviceLightEvent.webidl new file mode 100644 index 0000000000..6d0c86718f --- /dev/null +++ b/dom/webidl/DeviceLightEvent.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="device.sensors.ambientLight.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", + Exposed=Window] +interface DeviceLightEvent : Event +{ + constructor(DOMString type, optional DeviceLightEventInit eventInitDict = {}); + + 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 0000000000..4d8ae105c7 --- /dev/null +++ b/dom/webidl/DeviceMotionEvent.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/. + * + * https://w3c.github.io/deviceorientation/ + */ + +[LegacyNoInterfaceObject, + Exposed=Window] +interface DeviceAcceleration { + readonly attribute double? x; + readonly attribute double? y; + readonly attribute double? z; +}; + +[LegacyNoInterfaceObject, + Exposed=Window] +interface DeviceRotationRate { + readonly attribute double? alpha; + readonly attribute double? beta; + readonly attribute double? gamma; +}; + +[Pref="device.sensors.motion.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", + Exposed=Window] +interface DeviceMotionEvent : Event { + constructor(DOMString type, + optional DeviceMotionEventInit eventInitDict = {}); + + 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 { + // FIXME: bug 1493860: should this "= {}" be here? + DeviceAccelerationInit acceleration = {}; + // FIXME: bug 1493860: should this "= {}" be here? + DeviceAccelerationInit accelerationIncludingGravity = {}; + // FIXME: bug 1493860: should this "= {}" be here? + DeviceRotationRateInit rotationRate = {}; + double? interval = null; +}; + +// Mozilla extensions. +partial interface DeviceMotionEvent { + undefined initDeviceMotionEvent(DOMString type, + optional boolean canBubble = false, + optional boolean cancelable = false, + optional DeviceAccelerationInit acceleration = {}, + optional DeviceAccelerationInit accelerationIncludingGravity = {}, + optional DeviceRotationRateInit rotationRate = {}, + optional double? interval = null); +}; diff --git a/dom/webidl/DeviceOrientationEvent.webidl b/dom/webidl/DeviceOrientationEvent.webidl new file mode 100644 index 0000000000..6d2e44f0be --- /dev/null +++ b/dom/webidl/DeviceOrientationEvent.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/. + */ + +[Pref="device.sensors.orientation.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", LegacyEventInit, + Exposed=Window] +interface DeviceOrientationEvent : Event +{ + constructor(DOMString type, + optional DeviceOrientationEventInit eventInitDict = {}); + + readonly attribute double? alpha; + readonly attribute double? beta; + readonly attribute double? gamma; + readonly attribute boolean absolute; + + // initDeviceOrientationEvent is a Gecko specific deprecated method. + undefined initDeviceOrientationEvent(DOMString type, + optional boolean canBubble = false, + optional boolean cancelable = false, + optional double? alpha = null, + optional double? beta = null, + optional double? gamma = null, + optional boolean absolute = false); +}; + +dictionary DeviceOrientationEventInit : EventInit +{ + double? alpha = null; + double? beta = null; + double? gamma = null; + boolean absolute = false; +}; diff --git a/dom/webidl/Directory.webidl b/dom/webidl/Directory.webidl new file mode 100644 index 0000000000..c76a1ab098 --- /dev/null +++ b/dom/webidl/Directory.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/. + */ + +/* + * 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 + */ + +[Exposed=(Window,Worker)] +interface Directory { + // This ChromeOnly constructor is used by the MockFilePicker for testing only. + [Throws, ChromeOnly] + constructor(DOMString path); + + /* + * 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. + */ + [NewObject] + Promise> getFilesAndDirectories(); + + [NewObject] + Promise> getFiles(optional boolean recursiveFlag = false); +}; diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl new file mode 100644 index 0000000000..5b1f4baec3 --- /dev/null +++ b/dom/webidl/Document.webidl @@ -0,0 +1,735 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.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://dom.spec.whatwg.org/#interface-document + * https://html.spec.whatwg.org/multipage/dom.html#the-document-object + * https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis + * https://fullscreen.spec.whatwg.org/#api + * https://w3c.github.io/pointerlock/#extensions-to-the-document-interface + * https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin + * https://w3c.github.io/page-visibility/#extensions-to-the-document-interface + * https://drafts.csswg.org/cssom/#extensions-to-the-document-interface + * https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface + * https://wicg.github.io/feature-policy/#policy + */ + +interface ContentSecurityPolicy; +interface Principal; +interface WindowProxy; +interface nsISupports; +interface URI; +interface nsIDocShell; +interface nsILoadGroup; +interface nsIReferrerInfo; +interface nsICookieJarSettings; +interface nsIPermissionDelegateHandler; +interface XULCommandDispatcher; + +enum VisibilityState { "hidden", "visible" }; + +/* https://dom.spec.whatwg.org/#dictdef-elementcreationoptions */ +dictionary ElementCreationOptions { + DOMString is; + + [ChromeOnly] + DOMString pseudo; +}; + +/* https://dom.spec.whatwg.org/#interface-document */ +[Exposed=Window] +interface Document : Node { + [Throws] + constructor(); + + [Throws] + readonly attribute DOMImplementation implementation; + [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType] + readonly attribute DOMString URL; + [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType] + 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); + + // These DOM methods cannot be accessed by UA Widget scripts + // because the DOM element reflectors will be in the content scope, + // instead of the desired UA Widget scope. + [CEReactions, NewObject, Throws, Func="IsNotUAWidget"] + Element createElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {}); + [CEReactions, NewObject, Throws, Func="IsNotUAWidget"] + Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (ElementCreationOptions or DOMString) options = {}); + [NewObject] + DocumentFragment createDocumentFragment(); + [NewObject, Func="IsNotUAWidget"] + Text createTextNode(DOMString data); + [NewObject, Func="IsNotUAWidget"] + Comment createComment(DOMString data); + [NewObject, Throws] + ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data); + + [CEReactions, Throws, Func="IsNotUAWidget"] + Node importNode(Node node, optional boolean deep = false); + [CEReactions, Throws, Func="IsNotUAWidget"] + Node adoptNode(Node node); + + [NewObject, Throws, NeedsCallerType] + 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 + // undefined prepend((Node or DOMString)... nodes); + // undefined 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); +}; + +// https://html.spec.whatwg.org/multipage/dom.html#the-document-object +partial interface Document { + [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location; + [SetterThrows] attribute DOMString domain; + readonly attribute DOMString referrer; + [Throws] attribute DOMString cookie; + readonly attribute DOMString lastModified; + readonly attribute DOMString readyState; + + // DOM tree accessors + //(Not proxy yet)getter object (DOMString name); + [CEReactions, SetterThrows, Pure] + attribute DOMString title; + [CEReactions, Pure] + attribute DOMString dir; + [CEReactions, Pure, SetterThrows] + attribute HTMLElement? body; + [Pure] + readonly attribute HTMLHeadElement? head; + [SameObject] readonly attribute HTMLCollection images; + [SameObject] readonly attribute HTMLCollection embeds; + [SameObject] readonly attribute HTMLCollection plugins; + [SameObject] readonly attribute HTMLCollection links; + [SameObject] readonly attribute HTMLCollection forms; + [SameObject] readonly attribute HTMLCollection scripts; + [Pure] + NodeList getElementsByName(DOMString elementName); + //(Not implemented)readonly attribute DOMElementMap cssElementMap; + + // dynamic markup insertion + [CEReactions, Throws] + Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored + [CEReactions, Throws] + WindowProxy? open(USVString url, DOMString name, DOMString features); + [CEReactions, Throws] + undefined close(); + [CEReactions, Throws] + undefined write(DOMString... text); + [CEReactions, Throws] + undefined writeln(DOMString... text); + + // user interaction + [Pure] + readonly attribute WindowProxy? defaultView; + [Throws] + boolean hasFocus(); + [CEReactions, SetterThrows, SetterNeedsSubjectPrincipal] + attribute DOMString designMode; + [CEReactions, Throws, NeedsSubjectPrincipal] + boolean execCommand(DOMString commandId, optional boolean showUI = false, + optional DOMString value = ""); + [Throws, NeedsSubjectPrincipal] + boolean queryCommandEnabled(DOMString commandId); + [Throws] + boolean queryCommandIndeterm(DOMString commandId); + [Throws] + boolean queryCommandState(DOMString commandId); + [Throws, NeedsCallerType] + boolean queryCommandSupported(DOMString commandId); + [Throws] + DOMString queryCommandValue(DOMString commandId); + //(Not implemented)readonly attribute HTMLCollection commands; + + // special event handler IDL attributes that only apply to Document objects + [LegacyLenientThis] attribute EventHandler onreadystatechange; + + // Gecko extensions? + attribute EventHandler onbeforescriptexecute; + attribute EventHandler onafterscriptexecute; + + /** + * True if this document is synthetic : stand alone image, video, audio file, + * etc. + */ + [Func="IsChromeOrUAWidget"] readonly attribute boolean mozSyntheticDocument; + /** + * Returns the script element whose script is currently being processed. + * + * @see + */ + [Pure] + readonly attribute Element? currentScript; + /** + * Release the current mouse capture if it is on an element within this + * document. + * + * @see + */ + [Deprecated=DocumentReleaseCapture, Pref="dom.mouse_capture.enabled"] + undefined 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(, )| is called, + * |-moz-element(#)| uses || as the source image even if there + * is another element with id attribute = ||. To unregister an image + * element ID ||, call |document.mozSetImageElement(, null)|. + * + * Example: + * + *
+ * + * @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 + */ + [UseCounter] + undefined mozSetImageElement(DOMString aImageElementId, + Element? aImageElement); + + [ChromeOnly] + readonly attribute URI? documentURIObject; + + /** + * Current referrer policy - one of the referrer policy value from + * ReferrerPolicy.webidl. + */ + [ChromeOnly] + readonly attribute ReferrerPolicy referrerPolicy; + + /** + * Current referrer info, which holds all referrer related information + * including referrer policy and raw referrer of document. + */ + [ChromeOnly] + readonly attribute nsIReferrerInfo referrerInfo; + +}; + +// https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis +partial interface Document { + [CEReactions] attribute [LegacyNullToEmptyString] DOMString fgColor; + [CEReactions] attribute [LegacyNullToEmptyString] DOMString linkColor; + [CEReactions] attribute [LegacyNullToEmptyString] DOMString vlinkColor; + [CEReactions] attribute [LegacyNullToEmptyString] DOMString alinkColor; + [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor; + + [SameObject] readonly attribute HTMLCollection anchors; + [SameObject] readonly attribute HTMLCollection applets; + + undefined clear(); + // @deprecated These are old Netscape 4 methods. Do not use, + // the implementation is no-op. + // XXXbz do we actually need these anymore? + undefined captureEvents(); + undefined releaseEvents(); + + [SameObject] readonly attribute HTMLAllCollection all; +}; + +// 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. + [LegacyLenientSetter, Unscopable] + readonly attribute boolean fullscreen; + [BinaryName="fullscreen"] + readonly attribute boolean mozFullScreen; + [LegacyLenientSetter, NeedsCallerType] + readonly attribute boolean fullscreenEnabled; + [BinaryName="fullscreenEnabled", NeedsCallerType] + readonly attribute boolean mozFullScreenEnabled; + + [NewObject] + Promise exitFullscreen(); + [NewObject, BinaryName="exitFullscreen"] + Promise mozCancelFullScreen(); + + // Events handlers + attribute EventHandler onfullscreenchange; + 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 { + undefined exitPointerLock(); + + // Event handlers + attribute EventHandler onpointerlockchange; + attribute EventHandler onpointerlockerror; +}; + +// Mozilla-internal document extensions specific to error pages. +partial interface Document { + [Func="Document::CallerIsTrustedAboutCertError", NewObject] + Promise addCertException(boolean isTemporary); + + [Func="Document::CallerIsTrustedAboutHttpsOnlyError"] + undefined reloadWithHttpsOnlyException(); + + [Func="Document::CallerIsTrustedAboutCertError", Throws] + FailedCertSecurityInfo getFailedCertSecurityInfo(); + + [Func="Document::CallerIsTrustedAboutNetError", Throws] + NetErrorInfo getNetErrorInfo(); +}; + +// https://w3c.github.io/page-visibility/#extensions-to-the-document-interface +partial interface Document { + readonly attribute boolean hidden; + readonly attribute VisibilityState visibilityState; + attribute EventHandler onvisibilitychange; +}; + +// https://drafts.csswg.org/cssom/#extensions-to-the-document-interface +partial interface Document { + attribute DOMString? selectedStyleSheetSet; + readonly attribute DOMString? lastStyleSheetSet; + readonly attribute DOMString? preferredStyleSheetSet; + [Constant] + readonly attribute DOMStringList styleSheetSets; + undefined enableStyleSheetsForSet (DOMString? name); +}; + +// https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface +partial interface Document { + 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(UTF8String selectors); + [Throws, Pure] + NodeList querySelectorAll(UTF8String selectors); + + //(Not implemented)Element? find(DOMString selectors, optional (Element or sequence)? refNodes); + //(Not implemented)NodeList findAll(DOMString selectors, optional (Element or sequence)? refNodes); +}; + +// https://drafts.csswg.org/web-animations/#extensions-to-the-document-interface +partial interface Document { + [Func="Document::AreWebAnimationsTimelinesEnabled"] + readonly attribute DocumentTimeline timeline; +}; + +// 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 { + // Creates a new XUL element regardless of the document's default type. + [ChromeOnly, CEReactions, NewObject, Throws] + Element createXULElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {}); + // Wether the document was loaded using a nsXULPrototypeDocument. + [ChromeOnly] + readonly attribute boolean loadedFromPrototype; + + // The principal to use for the storage area of this document + [ChromeOnly] + readonly attribute Principal effectiveStoragePrincipal; + + // You should probably not be using this principal getter since it performs + // no checks to ensure that the partitioned principal should really be used + // here. It is only designed to be used in very specific circumstances, such + // as when inheriting the document/storage principal. + [ChromeOnly] + readonly attribute Principal partitionedPrincipal; + + // The cookieJarSettings of this document + [ChromeOnly] + readonly attribute nsICookieJarSettings cookieJarSettings; + + // Touch bits + // XXXbz I can't find the sane spec for this stuff, so just cribbing + // from our xpidl for now. + [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"] + 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 Document, since Touch... and + // sequence look the same in the C++. + [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"] + 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::LegacyTouchAPIEnabled"] + TouchList createTouchList(); + [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"] + TouchList createTouchList(sequence touches); + + [ChromeOnly] + attribute boolean styleSheetChangeEventsEnabled; + + [ChromeOnly] + attribute boolean devToolsAnonymousAndShadowEventsEnabled; + + [ChromeOnly] readonly attribute DOMString contentLanguage; + + [ChromeOnly] readonly attribute nsILoadGroup? documentLoadGroup; + + // Blocks the initial document parser until the given promise is settled. + [ChromeOnly, NewObject] + Promise blockParsing(Promise promise, + optional BlockParsingOptions options = {}); + + [Func="nsContentUtils::IsSystemOrPDFJS", BinaryName="blockUnblockOnloadForSystemOrPDFJS"] + undefined blockUnblockOnload(boolean block); + + // 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; + + // A promise that is resolved when we have both fired DOMContentLoaded and + // are ready to start layout. + // This is used for the "document_idle" webextension script injection point. + [ChromeOnly, Throws] + readonly attribute Promise documentReadyForIdle; + + // Lazily created command dispatcher, returns null if the document is not + // chrome privileged. + [ChromeOnly] + readonly attribute XULCommandDispatcher? commandDispatcher; + + [ChromeOnly] + attribute boolean devToolsWatchingDOMMutations; + + /** + * Returns all the shadow roots connected to the document, in no particular + * order, and without regard to open/closed-ness. Also returns UA widgets + * (like