From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/mshtml_private.h | 3 +++ dlls/mshtml/svg.c | 26 ++++++++++++++++++++------ dlls/mshtml/tests/documentmode.js | 5 +++++ 3 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 73e4cd4db84..fd63127b582 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -444,6 +444,9 @@ typedef struct { X(SVGCircleElement) \ X(SVGElement) \ X(SVGSVGElement) \ + X(SVGTSpanElement) \ + X(SVGTextContentElement) \ + X(SVGTextPositioningElement) \ X(Storage) \ X(Window) \ X(XMLHttpRequest) diff --git a/dlls/mshtml/svg.c b/dlls/mshtml/svg.c index a4a1b7c24dc..ee06ea17061 100644 --- a/dlls/mshtml/svg.c +++ b/dlls/mshtml/svg.c @@ -979,6 +979,18 @@ static void *SVGTSpanElement_query_interface(DispatchEx *dispex, REFIID riid) return SVGElement_query_interface(&This->svg_element.element.node.event_target.dispex, riid); }
+dispex_static_data_t SVGTextContentElement_dispex = { + .name = "SVGTextContentElement", + .id = PROT_SVGTextContentElement, + .prototype_id = PROT_SVGElement, +}; + +dispex_static_data_t SVGTextPositioningElement_dispex = { + .name = "SVGTextPositioningElement", + .id = PROT_SVGTextPositioningElement, + .prototype_id = PROT_SVGTextContentElement, +}; + static const NodeImplVtbl SVGTSpanElementImplVtbl = { .clsid = &CLSID_SVGTSpanElement, .cpc_entries = HTMLElement_cpc, @@ -998,12 +1010,14 @@ static const event_target_vtbl_t SVGTSpanElement_event_target_vtbl = { .handle_event = HTMLElement_handle_event };
-static dispex_static_data_t SVGTSpanElement_dispex = { - "HTMLUnknownElement", - &SVGTSpanElement_event_target_vtbl.dispex_vtbl, - DispHTMLUnknownElement_tid, - HTMLElement_iface_tids, - HTMLElement_init_dispex_info +dispex_static_data_t SVGTSpanElement_dispex = { + .name = "SVGTSpanElement", + .id = PROT_SVGTSpanElement, + .prototype_id = PROT_SVGTextPositioningElement, + .vtbl = &SVGTSpanElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLUnknownElement_tid, + .iface_tids = HTMLElement_iface_tids, + .init_info = HTMLElement_init_dispex_info, };
static HRESULT create_tspan_element(HTMLDocumentNode *doc, nsIDOMSVGElement *nselem, HTMLElement **elem) diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 34569bf24fe..b3f0d8964a9 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -352,6 +352,7 @@ sync_test("builtin_toString", function() {
test("SVGSVGElement", document.createElementNS(svg_ns, "svg"), "SVGSVGElement"); test("SVGCircleElement", document.createElementNS(svg_ns, "circle"), "SVGCircleElement"); + test("SVGCircleElement", document.createElementNS(svg_ns, "tspan"), "SVGTSpanElement"); } });
@@ -3204,4 +3205,8 @@ sync_test("prototypes", function() { check(SVGElement.prototype, Element.prototype, "svg element prototype"); check(document.createElementNS(svg_ns, "circle"), SVGCircleElement.prototype, "svg:circle element"); check(SVGCircleElement.prototype, SVGElement.prototype, "svg:circle element prototype"); + check(document.createElementNS(svg_ns, "tspan"), SVGTSpanElement.prototype, "svg:tspan element"); + check(SVGTSpanElement.prototype, SVGTextPositioningElement.prototype, "svg:tspan element prototype"); + check(SVGTextPositioningElement.prototype, SVGTextContentElement.prototype, "SVGTextPositioningElement prototype"); + check(SVGTextContentElement.prototype, SVGElement.prototype, "SVGTextPositioningElement prototype"); });