Skip to content

Commit de8fc07

Browse files
committed
Fix SVG/mathml errors
1 parent 3bcdd48 commit de8fc07

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ let package = Package(
110110
),
111111
.target(
112112
name: "CSSOM",
113-
dependencies: ["DOM", "WebAPIBase", "ECMAScript"]
113+
dependencies: ["DOM", "WebAPIBase", "SVG", "ECMAScript"]
114114
),
115115
.target(
116116
name: "SVG",

Sources/CSSOM/Generated.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import DOM
44
import ECMAScript
55
import JavaScriptEventLoop
66
import JavaScriptKit
7+
import SVG
78
import WebAPIBase
89

910
public class BoxQuadOptions: BridgedDictionary {
@@ -1665,10 +1666,10 @@ public extension ElementCSSInlineStyle {
16651666
@inlinable var attributeStyleMap: StylePropertyMap { jsObject[Strings.attributeStyleMap].fromJSValue()! }
16661667
}
16671668

1668-
extension SVGElement: ElementCSSInlineStyle {}
1669-
16701669
extension MathMLElement: ElementCSSInlineStyle {}
16711670

1671+
extension SVGElement: ElementCSSInlineStyle {}
1672+
16721673
public protocol GeometryUtils: JSBridgedClass {}
16731674
public extension GeometryUtils {
16741675
@inlinable func getBoxQuads(options: BoxQuadOptions? = nil) -> [DOMQuad] {
@@ -1692,10 +1693,10 @@ public extension GeometryUtils {
16921693
}
16931694
}
16941695

1695-
extension Text: GeometryUtils {}
1696-
16971696
extension CSSPseudoElement: GeometryUtils {}
16981697

1698+
extension Text: GeometryUtils {}
1699+
16991700
public protocol LinkStyle: JSBridgedClass {}
17001701
public extension LinkStyle {
17011702
@inlinable var sheet: CSSStyleSheet? { jsObject[Strings.sheet].fromJSValue() }

Sources/DOM/Generated.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10643,6 +10643,14 @@ public class Location: JSBridgedClass {
1064310643
public var ancestorOrigins: DOMStringList
1064410644
}
1064510645

10646+
public class MathMLElement: Element, GlobalEventHandlers, HTMLOrSVGElement {
10647+
@inlinable override public class var constructor: JSFunction? { JSObject.global[Strings.MathMLElement].function }
10648+
10649+
public required init(unsafelyWrapping jsObject: JSObject) {
10650+
super.init(unsafelyWrapping: jsObject)
10651+
}
10652+
}
10653+
1064610654
public class MediaDeviceInfo: JSBridgedClass {
1064710655
@inlinable public class var constructor: JSFunction? { JSObject.global[Strings.MediaDeviceInfo].function }
1064810656

@@ -18665,6 +18673,7 @@ public class XSLTProcessor: JSBridgedClass {
1866518673
@usableFromInline static let IsSearchProviderInstalled: JSString = "IsSearchProviderInstalled"
1866618674
@usableFromInline static let KeyboardEvent: JSString = "KeyboardEvent"
1866718675
@usableFromInline static let Location: JSString = "Location"
18676+
@usableFromInline static let MathMLElement: JSString = "MathMLElement"
1866818677
@usableFromInline static let MediaDeviceInfo: JSString = "MediaDeviceInfo"
1866918678
@usableFromInline static let MediaDevices: JSString = "MediaDevices"
1867018679
@usableFromInline static let MediaError: JSString = "MediaError"

Sources/WebIDLToSwift/Module.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ let domModule = Module(
4141
"media-source",
4242
"performance-timeline",
4343
"permissions",
44+
"mathml-core",
4445
],
4546
dependencies: ["WebAPIBase"]
4647
)
@@ -85,7 +86,7 @@ let modules = [
8586
Module(
8687
swiftModule: "CSSOM",
8788
idlModules: ["cssom", "cssom-view", "css-typed-om"],
88-
dependencies: ["DOM", "WebAPIBase"]
89+
dependencies: ["DOM", "WebAPIBase", "SVG"]
8990
),
9091
Module(
9192
swiftModule: "SVG",

0 commit comments

Comments
 (0)