|
1 | 1 | --- a/Sources/CSSOM/Generated.swift
|
2 | 2 | +++ b/Sources/CSSOM/Generated.swift
|
3 |
| -@@ -378,7 +378,8 @@ public class CSSColorValue: CSSStyleValue { |
| 3 | +@@ -379,7 +379,8 @@ public class CSSColorValue: CSSStyleValue { |
4 | 4 | super.init(unsafelyWrapping: jsObject)
|
5 | 5 | }
|
6 |
| - |
| 6 | + |
7 | 7 | - @inlinable override public class func parse(cssText: String) -> CSSColorValue_or_CSSStyleValue {
|
8 | 8 | + // returns CSSStyleValue | CSSColorValue
|
9 | 9 | + @inlinable public class func parse(cssText: String) -> CSSStyleValue {
|
10 | 10 | let this = constructor!
|
11 | 11 | return this[Strings.parse].function!(this: this, arguments: [_toJSValue(cssText)]).fromJSValue()!
|
12 | 12 | }
|
13 |
| -@@ -935,7 +936,7 @@ public class CSSNumericValue: CSSStyleValue { |
| 13 | +@@ -944,7 +945,7 @@ public class CSSNumericValue: CSSStyleValue { |
14 | 14 | return this[Strings.type].function!(this: this, arguments: []).fromJSValue()!
|
15 | 15 | }
|
16 |
| - |
| 16 | + |
17 | 17 | - @inlinable override public class func parse(cssText: String) -> Self {
|
18 | 18 | + @inlinable public class func parse(cssText: String) -> Self {
|
19 | 19 | let this = constructor!
|
20 | 20 | return this[Strings.parse].function!(this: this, arguments: [_toJSValue(cssText)]).fromJSValue()!
|
21 | 21 | }
|
| 22 | +@@ -1974,9 +1975,10 @@ public class StylePropertyMapReadOnly: JSBridgedClass, Sequence { |
| 23 | + ValueIterableIterator(sequence: self) |
| 24 | + } |
| 25 | + |
| 26 | +- @inlinable public func get(property: String) -> CSSStyleValue_or_Void { |
| 27 | ++ // TODO: remove patch once https://github.com/w3c/css-houdini-drafts/issues/1095 is fixed |
| 28 | ++ @inlinable public func get(property: String) -> CSSStyleValue? { |
| 29 | + let this = jsObject |
| 30 | +- return this[Strings.get].function!(this: this, arguments: [_toJSValue(property)]).fromJSValue()! |
| 31 | ++ return this[Strings.get].function!(this: this, arguments: [_toJSValue(property)]).fromJSValue() |
| 32 | + } |
| 33 | + |
| 34 | + @inlinable public func getAll(property: String) -> [CSSStyleValue] { |
| 35 | +@@ -2646,58 +2648,6 @@ public enum CSSStyleValue_or_String: JSValueCompatible, Any_CSSStyleValue_or_Str |
| 36 | + } |
| 37 | + } |
| 38 | + |
| 39 | +-public protocol Any_CSSStyleValue_or_Void: ConvertibleToJSValue {} |
| 40 | +-extension CSSStyleValue: Any_CSSStyleValue_or_Void {} |
| 41 | +-extension Void: Any_CSSStyleValue_or_Void {} |
| 42 | +- |
| 43 | +-public enum CSSStyleValue_or_Void: JSValueCompatible, Any_CSSStyleValue_or_Void { |
| 44 | +- case cssStyleValue(CSSStyleValue) |
| 45 | +- case void(Void) |
| 46 | +- |
| 47 | +- init(_ cssStyleValue: CSSStyleValue) { |
| 48 | +- let val: CSSStyleValue_or_Void = .cssStyleValue(cssStyleValue) |
| 49 | +- self = val |
| 50 | +- } |
| 51 | +- |
| 52 | +- init(_ void: Void) { |
| 53 | +- let val: CSSStyleValue_or_Void = .void(void) |
| 54 | +- self = val |
| 55 | +- } |
| 56 | +- |
| 57 | +- public var cssStyleValue: CSSStyleValue? { |
| 58 | +- switch self { |
| 59 | +- case let .cssStyleValue(cssStyleValue): return cssStyleValue |
| 60 | +- default: return nil |
| 61 | +- } |
| 62 | +- } |
| 63 | +- |
| 64 | +- public var void: Void? { |
| 65 | +- switch self { |
| 66 | +- case let .void(void): return void |
| 67 | +- default: return nil |
| 68 | +- } |
| 69 | +- } |
| 70 | +- |
| 71 | +- public static func construct(from value: JSValue) -> Self? { |
| 72 | +- if let cssStyleValue: CSSStyleValue = value.fromJSValue() { |
| 73 | +- return .cssStyleValue(cssStyleValue) |
| 74 | +- } |
| 75 | +- if let void: Void = value.fromJSValue() { |
| 76 | +- return .void(void) |
| 77 | +- } |
| 78 | +- return nil |
| 79 | +- } |
| 80 | +- |
| 81 | +- public var jsValue: JSValue { |
| 82 | +- switch self { |
| 83 | +- case let .cssStyleValue(cssStyleValue): |
| 84 | +- return cssStyleValue.jsValue |
| 85 | +- case let .void(void): |
| 86 | +- return void.jsValue |
| 87 | +- } |
| 88 | +- } |
| 89 | +-} |
| 90 | +- |
| 91 | + public protocol Any_CSSUnparsedSegment: ConvertibleToJSValue {} |
| 92 | + extension CSSVariableReferenceValue: Any_CSSUnparsedSegment {} |
| 93 | + extension String: Any_CSSUnparsedSegment {} |
0 commit comments