Skip to content

Commit 6e85c64

Browse files
committed
Revert "Update to latest IDL specs"
This reverts commit 1535ceb.
1 parent 1535ceb commit 6e85c64

File tree

4 files changed

+116
-230
lines changed

4 files changed

+116
-230
lines changed

Sources/DOM/Generated.swift

+3-20
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,6 @@ public class AbortSignal: EventTarget {
297297
return this[Strings.timeout].function!(this: this, arguments: [_toJSValue(milliseconds)]).fromJSValue()!
298298
}
299299

300-
@inlinable public class func any(signals: [AbortSignal]) -> Self {
301-
let this = constructor!
302-
return this[Strings.any].function!(this: this, arguments: [_toJSValue(signals)]).fromJSValue()!
303-
}
304-
305300
@ReadonlyAttribute
306301
public var aborted: Bool
307302

@@ -6948,9 +6943,9 @@ public class HTMLElement: Element, GlobalEventHandlers, ElementContentEditable,
69486943
_ = this[Strings.hidePopover].function!(this: this, arguments: [])
69496944
}
69506945

6951-
@inlinable public func togglePopover(force: Bool? = nil) -> Bool {
6946+
@inlinable public func togglePopover(force: Bool? = nil) {
69526947
let this = jsObject
6953-
return this[Strings.togglePopover].function!(this: this, arguments: [_toJSValue(force)]).fromJSValue()!
6948+
_ = this[Strings.togglePopover].function!(this: this, arguments: [_toJSValue(force)])
69546949
}
69556950

69566951
@ReadWriteAttribute
@@ -13498,11 +13493,6 @@ public class ReadableStream: JSBridgedClass, AsyncSequence {
1349813493
self.init(unsafelyWrapping: Self.constructor!.new(arguments: [_toJSValue(underlyingSource), _toJSValue(strategy)]))
1349913494
}
1350013495

13501-
@inlinable public class func from(asyncIterable: JSValue) -> Self {
13502-
let this = constructor!
13503-
return this[Strings.from].function!(this: this, arguments: [_toJSValue(asyncIterable)]).fromJSValue()!
13504-
}
13505-
1350613496
@ReadonlyAttribute
1350713497
public var locked: Bool
1350813498

@@ -16868,7 +16858,7 @@ public class VideoFrame: JSBridgedClass {
1686816858
}
1686916859

1687016860
public class VideoFrameBufferInit: BridgedDictionary {
16871-
public convenience init(format: VideoPixelFormat, codedWidth: UInt32, codedHeight: UInt32, timestamp: Int64, duration: UInt64, layout: [PlaneLayout], visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32, colorSpace: VideoColorSpaceInit, transfer: [ArrayBuffer]) {
16861+
public convenience init(format: VideoPixelFormat, codedWidth: UInt32, codedHeight: UInt32, timestamp: Int64, duration: UInt64, layout: [PlaneLayout], visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32, colorSpace: VideoColorSpaceInit) {
1687216862
let object = JSObject.global[Strings.Object].function!.new()
1687316863
object[Strings.format] = _toJSValue(format)
1687416864
object[Strings.codedWidth] = _toJSValue(codedWidth)
@@ -16880,7 +16870,6 @@ public class VideoFrameBufferInit: BridgedDictionary {
1688016870
object[Strings.displayWidth] = _toJSValue(displayWidth)
1688116871
object[Strings.displayHeight] = _toJSValue(displayHeight)
1688216872
object[Strings.colorSpace] = _toJSValue(colorSpace)
16883-
object[Strings.transfer] = _toJSValue(transfer)
1688416873
self.init(unsafelyWrapping: object)
1688516874
}
1688616875

@@ -16895,7 +16884,6 @@ public class VideoFrameBufferInit: BridgedDictionary {
1689516884
_displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth)
1689616885
_displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight)
1689716886
_colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace)
16898-
_transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer)
1689916887
super.init(unsafelyWrapping: object)
1690016888
}
1690116889

@@ -16928,9 +16916,6 @@ public class VideoFrameBufferInit: BridgedDictionary {
1692816916

1692916917
@ReadWriteAttribute
1693016918
public var colorSpace: VideoColorSpaceInit
16931-
16932-
@ReadWriteAttribute
16933-
public var transfer: [ArrayBuffer]
1693416919
}
1693516920

1693616921
public class VideoFrameCopyToOptions: BridgedDictionary {
@@ -18718,7 +18703,6 @@ public class XSLTProcessor: JSBridgedClass {
1871818703
@usableFromInline static let ancestorOrigins: JSString = "ancestorOrigins"
1871918704
@usableFromInline static let anchors: JSString = "anchors"
1872018705
@usableFromInline static let animated: JSString = "animated"
18721-
@usableFromInline static let any: JSString = "any"
1872218706
@usableFromInline static let appCodeName: JSString = "appCodeName"
1872318707
@usableFromInline static let appName: JSString = "appName"
1872418708
@usableFromInline static let appVersion: JSString = "appVersion"
@@ -19152,7 +19136,6 @@ public class XSLTProcessor: JSBridgedClass {
1915219136
@usableFromInline static let frameRate: JSString = "frameRate"
1915319137
@usableFromInline static let framerate: JSString = "framerate"
1915419138
@usableFromInline static let frames: JSString = "frames"
19155-
@usableFromInline static let from: JSString = "from"
1915619139
@usableFromInline static let fromBox: JSString = "fromBox"
1915719140
@usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array"
1915819141
@usableFromInline static let fromFloat64Array: JSString = "fromFloat64Array"

Sources/WebAPIBase/Generated.swift

+4-75
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ public class URLSearchParams: JSBridgedClass, Sequence {
175175
_ = this[Strings.append].function!(this: this, arguments: [_toJSValue(name), _toJSValue(value)])
176176
}
177177

178-
@inlinable public func delete(name: String, value: String? = nil) {
178+
@inlinable public func delete(name: String) {
179179
let this = jsObject
180-
_ = this[Strings.delete].function!(this: this, arguments: [_toJSValue(name), _toJSValue(value)])
180+
_ = this[Strings.delete].function!(this: this, arguments: [_toJSValue(name)])
181181
}
182182

183183
@inlinable public func get(name: String) -> String? {
@@ -190,9 +190,9 @@ public class URLSearchParams: JSBridgedClass, Sequence {
190190
return this[Strings.getAll].function!(this: this, arguments: [_toJSValue(name)]).fromJSValue()!
191191
}
192192

193-
@inlinable public func has(name: String, value: String? = nil) -> Bool {
193+
@inlinable public func has(name: String) -> Bool {
194194
let this = jsObject
195-
return this[Strings.has].function!(this: this, arguments: [_toJSValue(name), _toJSValue(value)]).fromJSValue()!
195+
return this[Strings.has].function!(this: this, arguments: [_toJSValue(name)]).fromJSValue()!
196196
}
197197

198198
@inlinable public func set(name: String, value: String) {
@@ -369,77 +369,6 @@ public enum console {
369369
@usableFromInline static let warn: JSString = "warn"
370370
}
371371

372-
public protocol Any_AllowSharedBufferSource: ConvertibleToJSValue {}
373-
extension ArrayBuffer: Any_AllowSharedBufferSource {}
374-
extension ArrayBufferView: Any_AllowSharedBufferSource {}
375-
extension SharedArrayBuffer: Any_AllowSharedBufferSource {}
376-
377-
public enum AllowSharedBufferSource: JSValueCompatible, Any_AllowSharedBufferSource {
378-
case arrayBuffer(ArrayBuffer)
379-
case arrayBufferView(ArrayBufferView)
380-
case sharedArrayBuffer(SharedArrayBuffer)
381-
382-
init(_ arrayBuffer: ArrayBuffer) {
383-
let val: AllowSharedBufferSource = .arrayBuffer(arrayBuffer)
384-
self = val
385-
}
386-
387-
init(_ arrayBufferView: ArrayBufferView) {
388-
let val: AllowSharedBufferSource = .arrayBufferView(arrayBufferView)
389-
self = val
390-
}
391-
392-
init(_ sharedArrayBuffer: SharedArrayBuffer) {
393-
let val: AllowSharedBufferSource = .sharedArrayBuffer(sharedArrayBuffer)
394-
self = val
395-
}
396-
397-
public var arrayBuffer: ArrayBuffer? {
398-
switch self {
399-
case let .arrayBuffer(arrayBuffer): return arrayBuffer
400-
default: return nil
401-
}
402-
}
403-
404-
public var arrayBufferView: ArrayBufferView? {
405-
switch self {
406-
case let .arrayBufferView(arrayBufferView): return arrayBufferView
407-
default: return nil
408-
}
409-
}
410-
411-
public var sharedArrayBuffer: SharedArrayBuffer? {
412-
switch self {
413-
case let .sharedArrayBuffer(sharedArrayBuffer): return sharedArrayBuffer
414-
default: return nil
415-
}
416-
}
417-
418-
public static func construct(from value: JSValue) -> Self? {
419-
if let arrayBuffer: ArrayBuffer = value.fromJSValue() {
420-
return .arrayBuffer(arrayBuffer)
421-
}
422-
if let arrayBufferView: ArrayBufferView = value.fromJSValue() {
423-
return .arrayBufferView(arrayBufferView)
424-
}
425-
if let sharedArrayBuffer: SharedArrayBuffer = value.fromJSValue() {
426-
return .sharedArrayBuffer(sharedArrayBuffer)
427-
}
428-
return nil
429-
}
430-
431-
public var jsValue: JSValue {
432-
switch self {
433-
case let .arrayBuffer(arrayBuffer):
434-
return arrayBuffer.jsValue
435-
case let .arrayBufferView(arrayBufferView):
436-
return arrayBufferView.jsValue
437-
case let .sharedArrayBuffer(sharedArrayBuffer):
438-
return sharedArrayBuffer.jsValue
439-
}
440-
}
441-
}
442-
443372
public protocol Any_BufferSource: ConvertibleToJSValue {}
444373
extension ArrayBuffer: Any_BufferSource {}
445374
extension ArrayBufferView: Any_BufferSource {}

0 commit comments

Comments
 (0)