d3dx10: Forward D3DX10CreateEffectFromFileA() to D3DX10CreateEffectFromFileW().
[wine.git] / dlls / mshtml / svg.c
blob75036cb39d6fc0a3d00a6b3ce8e9dda721ae4c39
1 /*
2 * Copyright 2019 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include <stdarg.h>
20 #include <math.h>
22 #define COBJMACROS
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winuser.h"
27 #include "winreg.h"
28 #include "ole2.h"
29 #include "mshtmdid.h"
31 #include "wine/debug.h"
33 #include "mshtml_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 struct SVGElement {
38 HTMLElement element;
39 ISVGElement ISVGElement_iface;
42 static inline SVGElement *impl_from_ISVGElement(ISVGElement *iface)
44 return CONTAINING_RECORD(iface, SVGElement, ISVGElement_iface);
47 static HRESULT WINAPI SVGElement_QueryInterface(ISVGElement *iface,
48 REFIID riid, void **ppv)
50 SVGElement *This = impl_from_ISVGElement(iface);
52 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
55 static ULONG WINAPI SVGElement_AddRef(ISVGElement *iface)
57 SVGElement *This = impl_from_ISVGElement(iface);
59 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
62 static ULONG WINAPI SVGElement_Release(ISVGElement *iface)
64 SVGElement *This = impl_from_ISVGElement(iface);
66 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
69 static HRESULT WINAPI SVGElement_GetTypeInfoCount(ISVGElement *iface, UINT *pctinfo)
71 SVGElement *This = impl_from_ISVGElement(iface);
72 return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
75 static HRESULT WINAPI SVGElement_GetTypeInfo(ISVGElement *iface, UINT iTInfo,
76 LCID lcid, ITypeInfo **ppTInfo)
78 SVGElement *This = impl_from_ISVGElement(iface);
79 return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
80 ppTInfo);
83 static HRESULT WINAPI SVGElement_GetIDsOfNames(ISVGElement *iface, REFIID riid,
84 LPOLESTR *rgszNames, UINT cNames,
85 LCID lcid, DISPID *rgDispId)
87 SVGElement *This = impl_from_ISVGElement(iface);
88 return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
89 cNames, lcid, rgDispId);
92 static HRESULT WINAPI SVGElement_Invoke(ISVGElement *iface, DISPID dispIdMember,
93 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
94 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
96 SVGElement *This = impl_from_ISVGElement(iface);
97 return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
98 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
101 static HRESULT WINAPI SVGElement_put_xmlbase(ISVGElement *iface, BSTR v)
103 SVGElement *This = impl_from_ISVGElement(iface);
104 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
105 return E_NOTIMPL;
108 static HRESULT WINAPI SVGElement_get_xmlbase(ISVGElement *iface, BSTR *p)
110 SVGElement *This = impl_from_ISVGElement(iface);
111 FIXME("(%p)->(%p)\n", This, p);
112 return E_NOTIMPL;
115 static HRESULT WINAPI SVGElement_putref_ownerSVGElement(ISVGElement *iface, ISVGSVGElement *v)
117 SVGElement *This = impl_from_ISVGElement(iface);
118 FIXME("(%p)->(%p)\n", This, v);
119 return E_NOTIMPL;
122 static HRESULT WINAPI SVGElement_get_ownerSVGElement(ISVGElement *iface, ISVGSVGElement **p)
124 SVGElement *This = impl_from_ISVGElement(iface);
125 FIXME("(%p)->(%p)\n", This, p);
126 return E_NOTIMPL;
129 static HRESULT WINAPI SVGElement_putref_viewportElement(ISVGElement *iface, ISVGElement *v)
131 SVGElement *This = impl_from_ISVGElement(iface);
132 FIXME("(%p)->(%p)\n", This, v);
133 return E_NOTIMPL;
136 static HRESULT WINAPI SVGElement_get_viewportElement(ISVGElement *iface, ISVGElement **p)
138 SVGElement *This = impl_from_ISVGElement(iface);
139 FIXME("(%p)->(%p)\n", This, p);
140 return E_NOTIMPL;
143 static HRESULT WINAPI SVGElement_putref_focusable(ISVGElement *iface, ISVGAnimatedEnumeration *v)
145 SVGElement *This = impl_from_ISVGElement(iface);
146 FIXME("(%p)->(%p)\n", This, v);
147 return E_NOTIMPL;
150 static HRESULT WINAPI SVGElement_get_focusable(ISVGElement *iface, ISVGAnimatedEnumeration **p)
152 SVGElement *This = impl_from_ISVGElement(iface);
153 FIXME("(%p)->(%p)\n", This, p);
154 return E_NOTIMPL;
157 static const ISVGElementVtbl SVGElementVtbl = {
158 SVGElement_QueryInterface,
159 SVGElement_AddRef,
160 SVGElement_Release,
161 SVGElement_GetTypeInfoCount,
162 SVGElement_GetTypeInfo,
163 SVGElement_GetIDsOfNames,
164 SVGElement_Invoke,
165 SVGElement_put_xmlbase,
166 SVGElement_get_xmlbase,
167 SVGElement_putref_ownerSVGElement,
168 SVGElement_get_ownerSVGElement,
169 SVGElement_putref_viewportElement,
170 SVGElement_get_viewportElement,
171 SVGElement_putref_focusable,
172 SVGElement_get_focusable
175 static inline SVGElement *SVGElement_from_HTMLDOMNode(HTMLDOMNode *iface)
177 return CONTAINING_RECORD(iface, SVGElement, element.node);
180 static HRESULT SVGElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
182 SVGElement *This = SVGElement_from_HTMLDOMNode(iface);
184 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
186 if(IsEqualGUID(&IID_ISVGElement, riid))
187 *ppv = &This->ISVGElement_iface;
188 else
189 return HTMLElement_QI(&This->element.node, riid, ppv);
191 IUnknown_AddRef((IUnknown*)*ppv);
192 return S_OK;
195 static const NodeImplVtbl SVGElementImplVtbl = {
196 &CLSID_SVGElement,
197 SVGElement_QI,
198 HTMLElement_destructor,
199 HTMLElement_cpc,
200 HTMLElement_clone,
201 NULL,
202 HTMLElement_get_attr_col,
205 static void init_svg_element(SVGElement *svg_element, HTMLDocumentNode *doc, nsIDOMSVGElement *nselem)
207 if(!svg_element->element.node.vtbl)
208 svg_element->element.node.vtbl = &SVGElementImplVtbl;
209 svg_element->ISVGElement_iface.lpVtbl = &SVGElementVtbl;
210 HTMLElement_Init(&svg_element->element, doc, (nsIDOMElement*)nselem, NULL);
213 struct SVGSVGElement {
214 SVGElement svg_element;
215 ISVGSVGElement ISVGSVGElement_iface;
218 static inline SVGSVGElement *impl_from_ISVGSVGElement(ISVGSVGElement *iface)
220 return CONTAINING_RECORD(iface, SVGSVGElement, ISVGSVGElement_iface);
223 static HRESULT WINAPI SVGSVGElement_QueryInterface(ISVGSVGElement *iface,
224 REFIID riid, void **ppv)
226 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
228 return IHTMLDOMNode_QueryInterface(&This->svg_element.element.node.IHTMLDOMNode_iface, riid, ppv);
231 static ULONG WINAPI SVGSVGElement_AddRef(ISVGSVGElement *iface)
233 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
235 return IHTMLDOMNode_AddRef(&This->svg_element.element.node.IHTMLDOMNode_iface);
238 static ULONG WINAPI SVGSVGElement_Release(ISVGSVGElement *iface)
240 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
242 return IHTMLDOMNode_Release(&This->svg_element.element.node.IHTMLDOMNode_iface);
245 static HRESULT WINAPI SVGSVGElement_GetTypeInfoCount(ISVGSVGElement *iface, UINT *pctinfo)
247 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
248 return IDispatchEx_GetTypeInfoCount(&This->svg_element.element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
251 static HRESULT WINAPI SVGSVGElement_GetTypeInfo(ISVGSVGElement *iface, UINT iTInfo,
252 LCID lcid, ITypeInfo **ppTInfo)
254 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
255 return IDispatchEx_GetTypeInfo(&This->svg_element.element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
256 ppTInfo);
259 static HRESULT WINAPI SVGSVGElement_GetIDsOfNames(ISVGSVGElement *iface, REFIID riid,
260 LPOLESTR *rgszNames, UINT cNames,
261 LCID lcid, DISPID *rgDispId)
263 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
264 return IDispatchEx_GetIDsOfNames(&This->svg_element.element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
265 cNames, lcid, rgDispId);
268 static HRESULT WINAPI SVGSVGElement_Invoke(ISVGSVGElement *iface, DISPID dispIdMember,
269 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
270 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
272 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
273 return IDispatchEx_Invoke(&This->svg_element.element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
274 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
277 static HRESULT WINAPI SVGSVGElement_putref_x(ISVGSVGElement *iface, ISVGAnimatedLength *v)
279 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
280 FIXME("(%p)->(%p)\n", This, v);
281 return E_NOTIMPL;
284 static HRESULT WINAPI SVGSVGElement_get_x(ISVGSVGElement *iface, ISVGAnimatedLength **p)
286 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
287 FIXME("(%p)->(%p)\n", This, p);
288 return E_NOTIMPL;
291 static HRESULT WINAPI SVGSVGElement_putref_y(ISVGSVGElement *iface, ISVGAnimatedLength *v)
293 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
294 FIXME("(%p)->(%p)\n", This, v);
295 return E_NOTIMPL;
298 static HRESULT WINAPI SVGSVGElement_get_y(ISVGSVGElement *iface, ISVGAnimatedLength **p)
300 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
301 FIXME("(%p)->(%p)\n", This, p);
302 return E_NOTIMPL;
305 static HRESULT WINAPI SVGSVGElement_putref_width(ISVGSVGElement *iface, ISVGAnimatedLength *v)
307 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
308 FIXME("(%p)->(%p)\n", This, v);
309 return E_NOTIMPL;
312 static HRESULT WINAPI SVGSVGElement_get_width(ISVGSVGElement *iface, ISVGAnimatedLength **p)
314 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
315 FIXME("(%p)->(%p)\n", This, p);
316 return E_NOTIMPL;
319 static HRESULT WINAPI SVGSVGElement_putref_height(ISVGSVGElement *iface, ISVGAnimatedLength *v)
321 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
322 FIXME("(%p)->(%p)\n", This, v);
323 return E_NOTIMPL;
326 static HRESULT WINAPI SVGSVGElement_get_height(ISVGSVGElement *iface, ISVGAnimatedLength **p)
328 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
329 FIXME("(%p)->(%p)\n", This, p);
330 return E_NOTIMPL;
333 static HRESULT WINAPI SVGSVGElement_put_contentScriptType(ISVGSVGElement *iface, BSTR v)
335 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
336 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
337 return E_NOTIMPL;
340 static HRESULT WINAPI SVGSVGElement_get_contentScriptType(ISVGSVGElement *iface, BSTR *p)
342 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
343 FIXME("(%p)->(%p)\n", This, p);
344 return E_NOTIMPL;
347 static HRESULT WINAPI SVGSVGElement_put_contentStyleType(ISVGSVGElement *iface, BSTR v)
349 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
350 FIXME("(%p)->(%p)\n", This, v);
351 return E_NOTIMPL;
354 static HRESULT WINAPI SVGSVGElement_get_contentStyleType(ISVGSVGElement *iface, BSTR *p)
356 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
357 FIXME("(%p)->(%p)\n", This, p);
358 return E_NOTIMPL;
361 static HRESULT WINAPI SVGSVGElement_putref_viewport(ISVGSVGElement *iface, ISVGRect *v)
363 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
364 FIXME("(%p)->(%p)\n", This, v);
365 return E_NOTIMPL;
368 static HRESULT WINAPI SVGSVGElement_get_viewport(ISVGSVGElement *iface, ISVGRect **p)
370 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
371 FIXME("(%p)->(%p)\n", This, p);
372 return E_NOTIMPL;
375 static HRESULT WINAPI SVGSVGElement_put_pixelUnitToMillimeterX(ISVGSVGElement *iface, float v)
377 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
378 FIXME("(%p)->(%f)\n", This, v);
379 return E_NOTIMPL;
382 static HRESULT WINAPI SVGSVGElement_get_pixelUnitToMillimeterX(ISVGSVGElement *iface, float *p)
384 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
385 FIXME("(%p)->(%p)\n", This, p);
386 return E_NOTIMPL;
389 static HRESULT WINAPI SVGSVGElement_put_pixelUnitToMillimeterY(ISVGSVGElement *iface, float v)
391 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
392 FIXME("(%p)->(%f)\n", This, v);
393 return E_NOTIMPL;
396 static HRESULT WINAPI SVGSVGElement_get_pixelUnitToMillimeterY(ISVGSVGElement *iface, float *p)
398 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
399 FIXME("(%p)->(%p)\n", This, p);
400 return E_NOTIMPL;
403 static HRESULT WINAPI SVGSVGElement_put_screenPixelToMillimeterX(ISVGSVGElement *iface, float v)
405 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
406 FIXME("(%p)->(%f)\n", This, v);
407 return E_NOTIMPL;
410 static HRESULT WINAPI SVGSVGElement_get_screenPixelToMillimeterX(ISVGSVGElement *iface, float *p)
412 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
413 FIXME("(%p)->(%p)\n", This, p);
414 return E_NOTIMPL;
417 static HRESULT WINAPI SVGSVGElement_put_screenPixelToMillimeterY(ISVGSVGElement *iface, float v)
419 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
420 FIXME("(%p)->(%f)\n", This, v);
421 return E_NOTIMPL;
424 static HRESULT WINAPI SVGSVGElement_get_screenPixelToMillimeterY(ISVGSVGElement *iface, float *p)
426 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
427 FIXME("(%p)->(%p)\n", This, p);
428 return E_NOTIMPL;
431 static HRESULT WINAPI SVGSVGElement_put_useCurrentView(ISVGSVGElement *iface, VARIANT_BOOL v)
433 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
434 FIXME("(%p)->(%x)\n", This, v);
435 return E_NOTIMPL;
438 static HRESULT WINAPI SVGSVGElement_get_useCurrentView(ISVGSVGElement *iface, VARIANT_BOOL *p)
440 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
441 FIXME("(%p)->(%p)\n", This, p);
442 return E_NOTIMPL;
445 static HRESULT WINAPI SVGSVGElement_putref_currentView(ISVGSVGElement *iface, ISVGViewSpec *v)
447 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
448 FIXME("(%p)->(%p)\n", This, v);
449 return E_NOTIMPL;
452 static HRESULT WINAPI SVGSVGElement_get_currentView(ISVGSVGElement *iface, ISVGViewSpec **p)
454 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
455 FIXME("(%p)->(%p)\n", This, p);
456 return E_NOTIMPL;
459 static HRESULT WINAPI SVGSVGElement_put_currentScale(ISVGSVGElement *iface, float v)
461 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
462 FIXME("(%p)->(%f)\n", This, v);
463 return E_NOTIMPL;
466 static HRESULT WINAPI SVGSVGElement_get_currentScale(ISVGSVGElement *iface, float *p)
468 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
469 FIXME("(%p)->(%p)\n", This, p);
470 return E_NOTIMPL;
473 static HRESULT WINAPI SVGSVGElement_putref_currentTranslate(ISVGSVGElement *iface, ISVGPoint *v)
475 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
476 FIXME("(%p)->(%p)\n", This, v);
477 return E_NOTIMPL;
480 static HRESULT WINAPI SVGSVGElement_get_currentTranslate(ISVGSVGElement *iface, ISVGPoint **p)
482 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
483 FIXME("(%p)->(%p)\n", This, p);
484 return E_NOTIMPL;
487 static HRESULT WINAPI SVGSVGElement_suspendRedraw(ISVGSVGElement *iface, ULONG max_wait, ULONG *p)
489 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
490 FIXME("(%p)->(%u %p)\n", This, max_wait, p);
491 return E_NOTIMPL;
494 static HRESULT WINAPI SVGSVGElement_unsuspendRedraw(ISVGSVGElement *iface, ULONG id)
496 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
497 FIXME("(%p)->(%u)\n", This, id);
498 return E_NOTIMPL;
501 static HRESULT WINAPI SVGSVGElement_unsuspendRedrawAll(ISVGSVGElement *iface)
503 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
504 FIXME("(%p)\n", This);
505 return E_NOTIMPL;
508 static HRESULT WINAPI SVGSVGElement_forceRedraw(ISVGSVGElement *iface)
510 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
511 FIXME("(%p)\n", This);
512 return E_NOTIMPL;
515 static HRESULT WINAPI SVGSVGElement_pauseAnimations(ISVGSVGElement *iface)
517 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
518 FIXME("(%p)\n", This);
519 return E_NOTIMPL;
522 static HRESULT WINAPI SVGSVGElement_unpauseAnimations(ISVGSVGElement *iface)
524 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
525 FIXME("(%p)\n", This);
526 return E_NOTIMPL;
529 static HRESULT WINAPI SVGSVGElement_animationsPaused(ISVGSVGElement *iface, VARIANT_BOOL *p)
531 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
532 FIXME("(%p)->(%p)\n", This, p);
533 return E_NOTIMPL;
536 static HRESULT WINAPI SVGSVGElement_getCurrentTime(ISVGSVGElement *iface, float *p)
538 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
539 FIXME("(%p)->(%p)\n", This, p);
540 return E_NOTIMPL;
543 static HRESULT WINAPI SVGSVGElement_setCurrentTime(ISVGSVGElement *iface, float v)
545 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
546 FIXME("(%p)->(%f)\n", This, v);
547 return E_NOTIMPL;
550 static HRESULT WINAPI SVGSVGElement_getIntersectionList(ISVGSVGElement *iface, ISVGRect *rect,
551 ISVGElement *reference_element, VARIANT *p)
553 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
554 FIXME("(%p)->(%p %p %p)\n", This, rect, reference_element, p);
555 return E_NOTIMPL;
558 static HRESULT WINAPI SVGSVGElement_getEnclosureList(ISVGSVGElement *iface, ISVGRect *rect,
559 ISVGElement *reference_element, VARIANT *p)
561 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
562 FIXME("(%p)->()\n", This);
563 return E_NOTIMPL;
566 static HRESULT WINAPI SVGSVGElement_checkIntersection(ISVGSVGElement *iface, ISVGElement *element,
567 ISVGRect *rect, VARIANT_BOOL *p)
569 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
570 FIXME("(%p)->(%p %p %p)\n", This, element, rect, p);
571 return E_NOTIMPL;
574 static HRESULT WINAPI SVGSVGElement_checkEnclosure(ISVGSVGElement *iface, ISVGElement *element,
575 ISVGRect *rect, VARIANT_BOOL *p)
577 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
578 FIXME("(%p)->(%p %p %p)\n", This, element, rect, p);
579 return E_NOTIMPL;
582 static HRESULT WINAPI SVGSVGElement_deselectAll(ISVGSVGElement *iface)
584 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
585 FIXME("(%p)\n", This);
586 return E_NOTIMPL;
589 static HRESULT WINAPI SVGSVGElement_createSVGNumber(ISVGSVGElement *iface, ISVGNumber **p)
591 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
592 FIXME("(%p)->(%p)\n", This, p);
593 return E_NOTIMPL;
596 static HRESULT WINAPI SVGSVGElement_createSVGLength(ISVGSVGElement *iface, ISVGLength **p)
598 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
599 FIXME("(%p)->(%p)\n", This, p);
600 return E_NOTIMPL;
603 static HRESULT WINAPI SVGSVGElement_createSVGAngle(ISVGSVGElement *iface, ISVGAngle **p)
605 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
606 FIXME("(%p)->(%p)\n", This, p);
607 return E_NOTIMPL;
610 static HRESULT WINAPI SVGSVGElement_createSVGPoint(ISVGSVGElement *iface, ISVGPoint **p)
612 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
613 FIXME("(%p)->(%p)\n", This, p);
614 return E_NOTIMPL;
617 static HRESULT WINAPI SVGSVGElement_createSVGMatrix(ISVGSVGElement *iface, ISVGMatrix **p)
619 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
620 FIXME("(%p)->(%p)\n", This, p);
621 return E_NOTIMPL;
624 static HRESULT WINAPI SVGSVGElement_createSVGRect(ISVGSVGElement *iface, ISVGRect **p)
626 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
627 FIXME("(%p)->(%p)\n", This, p);
628 return E_NOTIMPL;
631 static HRESULT WINAPI SVGSVGElement_createSVGTransform(ISVGSVGElement *iface, ISVGTransform **p)
633 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
634 FIXME("(%p)->(%p)\n", This, p);
635 return E_NOTIMPL;
638 static HRESULT WINAPI SVGSVGElement_createSVGTransformFromMatrix(ISVGSVGElement *iface,
639 ISVGMatrix *matrix, ISVGTransform **p)
641 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
642 FIXME("(%p)->(%p %p)\n", This, matrix, p);
643 return E_NOTIMPL;
646 static HRESULT WINAPI SVGSVGElement_getElementById(ISVGSVGElement *iface, BSTR id, IHTMLElement **p)
648 SVGSVGElement *This = impl_from_ISVGSVGElement(iface);
649 FIXME("(%p)->(%s %p)\n", This, debugstr_w(id), p);
650 return E_NOTIMPL;
653 static const ISVGSVGElementVtbl SVGSVGElementVtbl = {
654 SVGSVGElement_QueryInterface,
655 SVGSVGElement_AddRef,
656 SVGSVGElement_Release,
657 SVGSVGElement_GetTypeInfoCount,
658 SVGSVGElement_GetTypeInfo,
659 SVGSVGElement_GetIDsOfNames,
660 SVGSVGElement_Invoke,
661 SVGSVGElement_putref_x,
662 SVGSVGElement_get_x,
663 SVGSVGElement_putref_y,
664 SVGSVGElement_get_y,
665 SVGSVGElement_putref_width,
666 SVGSVGElement_get_width,
667 SVGSVGElement_putref_height,
668 SVGSVGElement_get_height,
669 SVGSVGElement_put_contentScriptType,
670 SVGSVGElement_get_contentScriptType,
671 SVGSVGElement_put_contentStyleType,
672 SVGSVGElement_get_contentStyleType,
673 SVGSVGElement_putref_viewport,
674 SVGSVGElement_get_viewport,
675 SVGSVGElement_put_pixelUnitToMillimeterX,
676 SVGSVGElement_get_pixelUnitToMillimeterX,
677 SVGSVGElement_put_pixelUnitToMillimeterY,
678 SVGSVGElement_get_pixelUnitToMillimeterY,
679 SVGSVGElement_put_screenPixelToMillimeterX,
680 SVGSVGElement_get_screenPixelToMillimeterX,
681 SVGSVGElement_put_screenPixelToMillimeterY,
682 SVGSVGElement_get_screenPixelToMillimeterY,
683 SVGSVGElement_put_useCurrentView,
684 SVGSVGElement_get_useCurrentView,
685 SVGSVGElement_putref_currentView,
686 SVGSVGElement_get_currentView,
687 SVGSVGElement_put_currentScale,
688 SVGSVGElement_get_currentScale,
689 SVGSVGElement_putref_currentTranslate,
690 SVGSVGElement_get_currentTranslate,
691 SVGSVGElement_suspendRedraw,
692 SVGSVGElement_unsuspendRedraw,
693 SVGSVGElement_unsuspendRedrawAll,
694 SVGSVGElement_forceRedraw,
695 SVGSVGElement_pauseAnimations,
696 SVGSVGElement_unpauseAnimations,
697 SVGSVGElement_animationsPaused,
698 SVGSVGElement_getCurrentTime,
699 SVGSVGElement_setCurrentTime,
700 SVGSVGElement_getIntersectionList,
701 SVGSVGElement_getEnclosureList,
702 SVGSVGElement_checkIntersection,
703 SVGSVGElement_checkEnclosure,
704 SVGSVGElement_deselectAll,
705 SVGSVGElement_createSVGNumber,
706 SVGSVGElement_createSVGLength,
707 SVGSVGElement_createSVGAngle,
708 SVGSVGElement_createSVGPoint,
709 SVGSVGElement_createSVGMatrix,
710 SVGSVGElement_createSVGRect,
711 SVGSVGElement_createSVGTransform,
712 SVGSVGElement_createSVGTransformFromMatrix,
713 SVGSVGElement_getElementById
716 static inline SVGSVGElement *SVGSVGElement_from_HTMLDOMNode(HTMLDOMNode *iface)
718 return CONTAINING_RECORD(iface, SVGSVGElement, svg_element.element.node);
721 static HRESULT SVGSVGElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
723 SVGSVGElement *This = SVGSVGElement_from_HTMLDOMNode(iface);
725 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
727 if(IsEqualGUID(&IID_ISVGSVGElement, riid))
728 *ppv = &This->ISVGSVGElement_iface;
729 else
730 return SVGElement_QI(&This->svg_element.element.node, riid, ppv);
732 IUnknown_AddRef((IUnknown*)*ppv);
733 return S_OK;
736 static const NodeImplVtbl SVGSVGElementImplVtbl = {
737 &CLSID_SVGSVGElement,
738 SVGSVGElement_QI,
739 HTMLElement_destructor,
740 HTMLElement_cpc,
741 HTMLElement_clone,
742 NULL,
743 HTMLElement_get_attr_col,
746 static HRESULT create_viewport_element(HTMLDocumentNode *doc, nsIDOMSVGElement *nselem, HTMLElement **elem)
748 SVGSVGElement *ret;
750 ret = heap_alloc_zero(sizeof(SVGSVGElement));
751 if(!ret)
752 return E_OUTOFMEMORY;
754 ret->ISVGSVGElement_iface.lpVtbl = &SVGSVGElementVtbl;
755 ret->svg_element.element.node.vtbl = &SVGSVGElementImplVtbl;
757 init_svg_element(&ret->svg_element, doc, nselem);
759 *elem = &ret->svg_element.element;
760 return S_OK;
763 struct SVGCircleElement {
764 SVGElement svg_element;
765 ISVGCircleElement ISVGCircleElement_iface;
768 static inline SVGCircleElement *impl_from_ISVGCircleElement(ISVGCircleElement *iface)
770 return CONTAINING_RECORD(iface, SVGCircleElement, ISVGCircleElement_iface);
773 static HRESULT WINAPI SVGCircleElement_QueryInterface(ISVGCircleElement *iface,
774 REFIID riid, void **ppv)
776 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
778 return IHTMLDOMNode_QueryInterface(&This->svg_element.element.node.IHTMLDOMNode_iface, riid, ppv);
781 static ULONG WINAPI SVGCircleElement_AddRef(ISVGCircleElement *iface)
783 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
785 return IHTMLDOMNode_AddRef(&This->svg_element.element.node.IHTMLDOMNode_iface);
788 static ULONG WINAPI SVGCircleElement_Release(ISVGCircleElement *iface)
790 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
792 return IHTMLDOMNode_Release(&This->svg_element.element.node.IHTMLDOMNode_iface);
795 static HRESULT WINAPI SVGCircleElement_GetTypeInfoCount(ISVGCircleElement *iface, UINT *pctinfo)
797 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
798 return IDispatchEx_GetTypeInfoCount(&This->svg_element.element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
801 static HRESULT WINAPI SVGCircleElement_GetTypeInfo(ISVGCircleElement *iface, UINT iTInfo,
802 LCID lcid, ITypeInfo **ppTInfo)
804 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
805 return IDispatchEx_GetTypeInfo(&This->svg_element.element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
806 ppTInfo);
809 static HRESULT WINAPI SVGCircleElement_GetIDsOfNames(ISVGCircleElement *iface, REFIID riid,
810 LPOLESTR *rgszNames, UINT cNames,
811 LCID lcid, DISPID *rgDispId)
813 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
814 return IDispatchEx_GetIDsOfNames(&This->svg_element.element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
815 cNames, lcid, rgDispId);
818 static HRESULT WINAPI SVGCircleElement_Invoke(ISVGCircleElement *iface, DISPID dispIdMember,
819 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
820 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
822 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
823 return IDispatchEx_Invoke(&This->svg_element.element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
824 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
827 static HRESULT WINAPI SVGCircleElement_putref_cx(ISVGCircleElement *iface, ISVGAnimatedLength *v)
829 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
830 FIXME("(%p)->(%p)\n", This, v);
831 return E_NOTIMPL;
834 static HRESULT WINAPI SVGCircleElement_get_cx(ISVGCircleElement *iface, ISVGAnimatedLength **p)
836 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
837 FIXME("(%p)->(%p)\n", This, p);
838 return E_NOTIMPL;
841 static HRESULT WINAPI SVGCircleElement_putref_cy(ISVGCircleElement *iface, ISVGAnimatedLength *v)
843 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
844 FIXME("(%p)->(%p)\n", This, v);
845 return E_NOTIMPL;
848 static HRESULT WINAPI SVGCircleElement_get_cy(ISVGCircleElement *iface, ISVGAnimatedLength **p)
850 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
851 FIXME("(%p)->(%p)\n", This, p);
852 return E_NOTIMPL;
855 static HRESULT WINAPI SVGCircleElement_putref_r(ISVGCircleElement *iface, ISVGAnimatedLength *v)
857 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
858 FIXME("(%p)->(%p)\n", This, v);
859 return E_NOTIMPL;
862 static HRESULT WINAPI SVGCircleElement_get_r(ISVGCircleElement *iface, ISVGAnimatedLength **p)
864 SVGCircleElement *This = impl_from_ISVGCircleElement(iface);
865 FIXME("(%p)->(%p)\n", This, p);
866 return E_NOTIMPL;
869 static const ISVGCircleElementVtbl SVGCircleElementVtbl = {
870 SVGCircleElement_QueryInterface,
871 SVGCircleElement_AddRef,
872 SVGCircleElement_Release,
873 SVGCircleElement_GetTypeInfoCount,
874 SVGCircleElement_GetTypeInfo,
875 SVGCircleElement_GetIDsOfNames,
876 SVGCircleElement_Invoke,
877 SVGCircleElement_putref_cx,
878 SVGCircleElement_get_cx,
879 SVGCircleElement_putref_cy,
880 SVGCircleElement_get_cy,
881 SVGCircleElement_putref_r,
882 SVGCircleElement_get_r
885 static inline SVGCircleElement *SVGCircleElement_from_HTMLDOMNode(HTMLDOMNode *iface)
887 return CONTAINING_RECORD(iface, SVGCircleElement, svg_element.element.node);
890 static HRESULT SVGCircleElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
892 SVGCircleElement *This = SVGCircleElement_from_HTMLDOMNode(iface);
894 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
896 if(IsEqualGUID(&IID_ISVGCircleElement, riid))
897 *ppv = &This->ISVGCircleElement_iface;
898 else
899 return SVGElement_QI(&This->svg_element.element.node, riid, ppv);
901 IUnknown_AddRef((IUnknown*)*ppv);
902 return S_OK;
905 static const NodeImplVtbl SVGCircleElementImplVtbl = {
906 &CLSID_SVGCircleElement,
907 SVGCircleElement_QI,
908 HTMLElement_destructor,
909 HTMLElement_cpc,
910 HTMLElement_clone,
911 NULL,
912 HTMLElement_get_attr_col,
915 static HRESULT create_circle_element(HTMLDocumentNode *doc, nsIDOMSVGElement *nselem, HTMLElement **elem)
917 SVGCircleElement *ret;
919 ret = heap_alloc_zero(sizeof(SVGCircleElement));
920 if(!ret)
921 return E_OUTOFMEMORY;
923 ret->ISVGCircleElement_iface.lpVtbl = &SVGCircleElementVtbl;
924 ret->svg_element.element.node.vtbl = &SVGCircleElementImplVtbl;
926 init_svg_element(&ret->svg_element, doc, nselem);
928 *elem = &ret->svg_element.element;
929 return S_OK;
932 typedef struct {
933 ISVGTextContentElement ISVGTextContentElement_iface;
934 SVGElement *svg_element;
935 } SVGTextContentElement;
937 static inline SVGTextContentElement *impl_from_ISVGTextContentElement(ISVGTextContentElement *iface)
939 return CONTAINING_RECORD(iface, SVGTextContentElement, ISVGTextContentElement_iface);
942 static HRESULT WINAPI SVGTextContentElement_QueryInterface(ISVGTextContentElement *iface,
943 REFIID riid, void **ppv)
945 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
946 return IHTMLDOMNode_QueryInterface(&This->svg_element->element.node.IHTMLDOMNode_iface, riid, ppv);
949 static ULONG WINAPI SVGTextContentElement_AddRef(ISVGTextContentElement *iface)
951 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
953 return IHTMLDOMNode_AddRef(&This->svg_element->element.node.IHTMLDOMNode_iface);
956 static ULONG WINAPI SVGTextContentElement_Release(ISVGTextContentElement *iface)
958 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
960 return IHTMLDOMNode_Release(&This->svg_element->element.node.IHTMLDOMNode_iface);
963 static HRESULT WINAPI SVGTextContentElement_GetTypeInfoCount(ISVGTextContentElement *iface, UINT *pctinfo)
965 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
966 return IDispatchEx_GetTypeInfoCount(&This->svg_element->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
969 static HRESULT WINAPI SVGTextContentElement_GetTypeInfo(ISVGTextContentElement *iface, UINT iTInfo,
970 LCID lcid, ITypeInfo **ppTInfo)
972 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
973 return IDispatchEx_GetTypeInfo(&This->svg_element->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
974 ppTInfo);
977 static HRESULT WINAPI SVGTextContentElement_GetIDsOfNames(ISVGTextContentElement *iface, REFIID riid,
978 LPOLESTR *rgszNames, UINT cNames,
979 LCID lcid, DISPID *rgDispId)
981 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
982 return IDispatchEx_GetIDsOfNames(&This->svg_element->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
983 cNames, lcid, rgDispId);
986 static HRESULT WINAPI SVGTextContentElement_Invoke(ISVGTextContentElement *iface, DISPID dispIdMember,
987 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
988 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
990 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
991 return IDispatchEx_Invoke(&This->svg_element->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
992 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
995 static HRESULT WINAPI SVGTextContentElement_putref_textLength(ISVGTextContentElement *iface, ISVGAnimatedLength *v)
997 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
998 FIXME("(%p)->(%p)\n", This, v);
999 return E_NOTIMPL;
1002 static HRESULT WINAPI SVGTextContentElement_get_textLength(ISVGTextContentElement *iface, ISVGAnimatedLength **p)
1004 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1005 FIXME("(%p)->(%p)\n", This, p);
1006 return E_NOTIMPL;
1009 static HRESULT WINAPI SVGTextContentElement_putref_lengthAdjust(ISVGTextContentElement *iface, ISVGAnimatedEnumeration *v)
1011 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1012 FIXME("(%p)->(%p)\n", This, v);
1013 return E_NOTIMPL;
1016 static HRESULT WINAPI SVGTextContentElement_get_lengthAdjust(ISVGTextContentElement *iface, ISVGAnimatedEnumeration **p)
1018 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1019 FIXME("(%p)->(%p)\n", This, p);
1020 return E_NOTIMPL;
1023 static HRESULT WINAPI SVGTextContentElement_getNumberOfChars(ISVGTextContentElement *iface, LONG *p)
1025 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1026 FIXME("(%p)->(%p)\n", This, p);
1027 return E_NOTIMPL;
1030 static HRESULT WINAPI SVGTextContentElement_getComputedTextLength(ISVGTextContentElement *iface, float *p)
1032 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1033 FIXME("(%p)->(%p)\n", This, p);
1034 return E_NOTIMPL;
1037 static HRESULT WINAPI SVGTextContentElement_getSubStringLength(ISVGTextContentElement *iface,
1038 LONG charnum, LONG nchars, float *p)
1040 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1041 FIXME("(%p)->(%d %d %p)\n", This, charnum, nchars, p);
1042 return E_NOTIMPL;
1045 static HRESULT WINAPI SVGTextContentElement_getStartPositionOfChar(ISVGTextContentElement *iface,
1046 LONG charnum, ISVGPoint **p)
1048 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1049 FIXME("(%p)->(%d %p)\n", This, charnum, p);
1050 return E_NOTIMPL;
1053 static HRESULT WINAPI SVGTextContentElement_getEndPositionOfChar(ISVGTextContentElement *iface,
1054 LONG charnum, ISVGPoint **p)
1056 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1057 FIXME("(%p)->(%d %p)\n", This, charnum, p);
1058 return E_NOTIMPL;
1061 static HRESULT WINAPI SVGTextContentElement_getExtentOfChar(ISVGTextContentElement *iface,
1062 LONG charnum, ISVGRect **p)
1064 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1065 FIXME("(%p)->(%d %p)\n", This, charnum, p);
1066 return E_NOTIMPL;
1069 static HRESULT WINAPI SVGTextContentElement_getRotationOfChar(ISVGTextContentElement *iface,
1070 LONG charnum, float *p)
1072 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1073 FIXME("(%p)->(%d %p)\n", This, charnum, p);
1074 return E_NOTIMPL;
1077 static HRESULT WINAPI SVGTextContentElement_getCharNumAtPosition(ISVGTextContentElement *iface,
1078 ISVGPoint *point, LONG *p)
1080 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1081 FIXME("(%p)->(%p %p)\n", This, point, p);
1082 return E_NOTIMPL;
1085 static HRESULT WINAPI SVGTextContentElement_selectSubString(ISVGTextContentElement *iface,
1086 LONG charnum, LONG nchars)
1088 SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
1089 FIXME("(%p)->(%d %d)\n", This, charnum, nchars);
1090 return E_NOTIMPL;
1093 static const ISVGTextContentElementVtbl SVGTextContentElementVtbl = {
1094 SVGTextContentElement_QueryInterface,
1095 SVGTextContentElement_AddRef,
1096 SVGTextContentElement_Release,
1097 SVGTextContentElement_GetTypeInfoCount,
1098 SVGTextContentElement_GetTypeInfo,
1099 SVGTextContentElement_GetIDsOfNames,
1100 SVGTextContentElement_Invoke,
1101 SVGTextContentElement_putref_textLength,
1102 SVGTextContentElement_get_textLength,
1103 SVGTextContentElement_putref_lengthAdjust,
1104 SVGTextContentElement_get_lengthAdjust,
1105 SVGTextContentElement_getNumberOfChars,
1106 SVGTextContentElement_getComputedTextLength,
1107 SVGTextContentElement_getSubStringLength,
1108 SVGTextContentElement_getStartPositionOfChar,
1109 SVGTextContentElement_getEndPositionOfChar,
1110 SVGTextContentElement_getExtentOfChar,
1111 SVGTextContentElement_getRotationOfChar,
1112 SVGTextContentElement_getCharNumAtPosition,
1113 SVGTextContentElement_selectSubString
1116 static void init_text_content_element(SVGTextContentElement *text_content, SVGElement *svg_element)
1118 text_content->ISVGTextContentElement_iface.lpVtbl = &SVGTextContentElementVtbl;
1119 text_content->svg_element = svg_element;
1122 struct SVGTSpanElement {
1123 SVGElement svg_element;
1124 SVGTextContentElement text_content;
1127 static inline SVGTSpanElement *SVGTSpanElement_from_HTMLDOMNode(HTMLDOMNode *iface)
1129 return CONTAINING_RECORD(iface, SVGTSpanElement, svg_element.element.node);
1132 static HRESULT SVGTSpanElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
1134 SVGTSpanElement *This = SVGTSpanElement_from_HTMLDOMNode(iface);
1136 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
1138 if(IsEqualGUID(&IID_ISVGTSpanElement, riid))
1139 *ppv = &This->svg_element.ISVGElement_iface; /* no additional methods */
1140 else if(IsEqualGUID(&IID_ISVGTextContentElement, riid))
1141 *ppv = &This->text_content.ISVGTextContentElement_iface;
1142 else
1143 return SVGElement_QI(&This->svg_element.element.node, riid, ppv);
1145 IUnknown_AddRef((IUnknown*)*ppv);
1146 return S_OK;
1149 static const NodeImplVtbl SVGTSpanElementImplVtbl = {
1150 &CLSID_SVGTSpanElement,
1151 SVGTSpanElement_QI,
1152 HTMLElement_destructor,
1153 HTMLElement_cpc,
1154 HTMLElement_clone,
1155 NULL,
1156 HTMLElement_get_attr_col,
1159 static HRESULT create_tspan_element(HTMLDocumentNode *doc, nsIDOMSVGElement *nselem, HTMLElement **elem)
1161 SVGTSpanElement *ret;
1163 ret = heap_alloc_zero(sizeof(SVGTSpanElement));
1164 if(!ret)
1165 return E_OUTOFMEMORY;
1167 ret->svg_element.element.node.vtbl = &SVGTSpanElementImplVtbl;
1168 init_text_content_element(&ret->text_content, &ret->svg_element);
1169 init_svg_element(&ret->svg_element, doc, nselem);
1171 *elem = &ret->svg_element.element;
1172 return S_OK;
1175 HRESULT create_svg_element(HTMLDocumentNode *doc, nsIDOMSVGElement *dom_element, const WCHAR *tag_name, HTMLElement **elem)
1177 SVGElement *svg_element;
1179 TRACE("%s\n", debugstr_w(tag_name));
1181 if(!wcscmp(tag_name, L"svg"))
1182 return create_viewport_element(doc, dom_element, elem);
1183 if(!wcscmp(tag_name, L"circle"))
1184 return create_circle_element(doc, dom_element, elem);
1185 if(!wcscmp(tag_name, L"tspan"))
1186 return create_tspan_element(doc, dom_element, elem);
1188 svg_element = heap_alloc_zero(sizeof(*svg_element));
1189 if(!svg_element)
1190 return E_OUTOFMEMORY;
1192 init_svg_element(svg_element, doc, dom_element);
1193 *elem = &svg_element->element;
1194 return S_OK;