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
31 #include "wine/debug.h"
33 #include "mshtml_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
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
,
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
));
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
);
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
);
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
);
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
);
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
);
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
);
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
);
157 static const ISVGElementVtbl SVGElementVtbl
= {
158 SVGElement_QueryInterface
,
161 SVGElement_GetTypeInfoCount
,
162 SVGElement_GetTypeInfo
,
163 SVGElement_GetIDsOfNames
,
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
;
189 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
191 IUnknown_AddRef((IUnknown
*)*ppv
);
195 static const NodeImplVtbl SVGElementImplVtbl
= {
198 HTMLElement_destructor
,
201 HTMLElement_dispatch_nsevent_hook
,
203 HTMLElement_get_attr_col
,
206 static void init_svg_element(SVGElement
*svg_element
, HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
)
208 if(!svg_element
->element
.node
.vtbl
)
209 svg_element
->element
.node
.vtbl
= &SVGElementImplVtbl
;
210 svg_element
->ISVGElement_iface
.lpVtbl
= &SVGElementVtbl
;
211 HTMLElement_Init(&svg_element
->element
, doc
, (nsIDOMElement
*)nselem
, NULL
);
214 struct SVGSVGElement
{
215 SVGElement svg_element
;
216 ISVGSVGElement ISVGSVGElement_iface
;
219 static inline SVGSVGElement
*impl_from_ISVGSVGElement(ISVGSVGElement
*iface
)
221 return CONTAINING_RECORD(iface
, SVGSVGElement
, ISVGSVGElement_iface
);
224 static HRESULT WINAPI
SVGSVGElement_QueryInterface(ISVGSVGElement
*iface
,
225 REFIID riid
, void **ppv
)
227 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
229 return IHTMLDOMNode_QueryInterface(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
232 static ULONG WINAPI
SVGSVGElement_AddRef(ISVGSVGElement
*iface
)
234 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
236 return IHTMLDOMNode_AddRef(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
);
239 static ULONG WINAPI
SVGSVGElement_Release(ISVGSVGElement
*iface
)
241 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
243 return IHTMLDOMNode_Release(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
);
246 static HRESULT WINAPI
SVGSVGElement_GetTypeInfoCount(ISVGSVGElement
*iface
, UINT
*pctinfo
)
248 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
249 return IDispatchEx_GetTypeInfoCount(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
252 static HRESULT WINAPI
SVGSVGElement_GetTypeInfo(ISVGSVGElement
*iface
, UINT iTInfo
,
253 LCID lcid
, ITypeInfo
**ppTInfo
)
255 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
256 return IDispatchEx_GetTypeInfo(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
260 static HRESULT WINAPI
SVGSVGElement_GetIDsOfNames(ISVGSVGElement
*iface
, REFIID riid
,
261 LPOLESTR
*rgszNames
, UINT cNames
,
262 LCID lcid
, DISPID
*rgDispId
)
264 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
265 return IDispatchEx_GetIDsOfNames(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
266 cNames
, lcid
, rgDispId
);
269 static HRESULT WINAPI
SVGSVGElement_Invoke(ISVGSVGElement
*iface
, DISPID dispIdMember
,
270 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
271 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
273 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
274 return IDispatchEx_Invoke(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
275 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
278 static HRESULT WINAPI
SVGSVGElement_putref_x(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
280 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
281 FIXME("(%p)->(%p)\n", This
, v
);
285 static HRESULT WINAPI
SVGSVGElement_get_x(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
287 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
288 FIXME("(%p)->(%p)\n", This
, p
);
292 static HRESULT WINAPI
SVGSVGElement_putref_y(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
294 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
295 FIXME("(%p)->(%p)\n", This
, v
);
299 static HRESULT WINAPI
SVGSVGElement_get_y(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
301 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
302 FIXME("(%p)->(%p)\n", This
, p
);
306 static HRESULT WINAPI
SVGSVGElement_putref_width(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
308 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
309 FIXME("(%p)->(%p)\n", This
, v
);
313 static HRESULT WINAPI
SVGSVGElement_get_width(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
315 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
316 FIXME("(%p)->(%p)\n", This
, p
);
320 static HRESULT WINAPI
SVGSVGElement_putref_height(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
322 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
323 FIXME("(%p)->(%p)\n", This
, v
);
327 static HRESULT WINAPI
SVGSVGElement_get_height(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
329 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
330 FIXME("(%p)->(%p)\n", This
, p
);
334 static HRESULT WINAPI
SVGSVGElement_put_contentScriptType(ISVGSVGElement
*iface
, BSTR v
)
336 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
337 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
341 static HRESULT WINAPI
SVGSVGElement_get_contentScriptType(ISVGSVGElement
*iface
, BSTR
*p
)
343 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
344 FIXME("(%p)->(%p)\n", This
, p
);
348 static HRESULT WINAPI
SVGSVGElement_put_contentStyleType(ISVGSVGElement
*iface
, BSTR v
)
350 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
351 FIXME("(%p)->(%p)\n", This
, v
);
355 static HRESULT WINAPI
SVGSVGElement_get_contentStyleType(ISVGSVGElement
*iface
, BSTR
*p
)
357 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
358 FIXME("(%p)->(%p)\n", This
, p
);
362 static HRESULT WINAPI
SVGSVGElement_putref_viewport(ISVGSVGElement
*iface
, ISVGRect
*v
)
364 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
365 FIXME("(%p)->(%p)\n", This
, v
);
369 static HRESULT WINAPI
SVGSVGElement_get_viewport(ISVGSVGElement
*iface
, ISVGRect
**p
)
371 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
372 FIXME("(%p)->(%p)\n", This
, p
);
376 static HRESULT WINAPI
SVGSVGElement_put_pixelUnitToMillimeterX(ISVGSVGElement
*iface
, float v
)
378 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
379 FIXME("(%p)->(%f)\n", This
, v
);
383 static HRESULT WINAPI
SVGSVGElement_get_pixelUnitToMillimeterX(ISVGSVGElement
*iface
, float *p
)
385 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
386 FIXME("(%p)->(%p)\n", This
, p
);
390 static HRESULT WINAPI
SVGSVGElement_put_pixelUnitToMillimeterY(ISVGSVGElement
*iface
, float v
)
392 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
393 FIXME("(%p)->(%f)\n", This
, v
);
397 static HRESULT WINAPI
SVGSVGElement_get_pixelUnitToMillimeterY(ISVGSVGElement
*iface
, float *p
)
399 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
400 FIXME("(%p)->(%p)\n", This
, p
);
404 static HRESULT WINAPI
SVGSVGElement_put_screenPixelToMillimeterX(ISVGSVGElement
*iface
, float v
)
406 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
407 FIXME("(%p)->(%f)\n", This
, v
);
411 static HRESULT WINAPI
SVGSVGElement_get_screenPixelToMillimeterX(ISVGSVGElement
*iface
, float *p
)
413 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
414 FIXME("(%p)->(%p)\n", This
, p
);
418 static HRESULT WINAPI
SVGSVGElement_put_screenPixelToMillimeterY(ISVGSVGElement
*iface
, float v
)
420 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
421 FIXME("(%p)->(%f)\n", This
, v
);
425 static HRESULT WINAPI
SVGSVGElement_get_screenPixelToMillimeterY(ISVGSVGElement
*iface
, float *p
)
427 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
428 FIXME("(%p)->(%p)\n", This
, p
);
432 static HRESULT WINAPI
SVGSVGElement_put_useCurrentView(ISVGSVGElement
*iface
, VARIANT_BOOL v
)
434 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
435 FIXME("(%p)->(%x)\n", This
, v
);
439 static HRESULT WINAPI
SVGSVGElement_get_useCurrentView(ISVGSVGElement
*iface
, VARIANT_BOOL
*p
)
441 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
442 FIXME("(%p)->(%p)\n", This
, p
);
446 static HRESULT WINAPI
SVGSVGElement_putref_currentView(ISVGSVGElement
*iface
, ISVGViewSpec
*v
)
448 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
449 FIXME("(%p)->(%p)\n", This
, v
);
453 static HRESULT WINAPI
SVGSVGElement_get_currentView(ISVGSVGElement
*iface
, ISVGViewSpec
**p
)
455 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
456 FIXME("(%p)->(%p)\n", This
, p
);
460 static HRESULT WINAPI
SVGSVGElement_put_currentScale(ISVGSVGElement
*iface
, float v
)
462 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
463 FIXME("(%p)->(%f)\n", This
, v
);
467 static HRESULT WINAPI
SVGSVGElement_get_currentScale(ISVGSVGElement
*iface
, float *p
)
469 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
470 FIXME("(%p)->(%p)\n", This
, p
);
474 static HRESULT WINAPI
SVGSVGElement_putref_currentTranslate(ISVGSVGElement
*iface
, ISVGPoint
*v
)
476 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
477 FIXME("(%p)->(%p)\n", This
, v
);
481 static HRESULT WINAPI
SVGSVGElement_get_currentTranslate(ISVGSVGElement
*iface
, ISVGPoint
**p
)
483 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
484 FIXME("(%p)->(%p)\n", This
, p
);
488 static HRESULT WINAPI
SVGSVGElement_suspendRedraw(ISVGSVGElement
*iface
, ULONG max_wait
, ULONG
*p
)
490 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
491 FIXME("(%p)->(%lu %p)\n", This
, max_wait
, p
);
495 static HRESULT WINAPI
SVGSVGElement_unsuspendRedraw(ISVGSVGElement
*iface
, ULONG id
)
497 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
498 FIXME("(%p)->(%lu)\n", This
, id
);
502 static HRESULT WINAPI
SVGSVGElement_unsuspendRedrawAll(ISVGSVGElement
*iface
)
504 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
505 FIXME("(%p)\n", This
);
509 static HRESULT WINAPI
SVGSVGElement_forceRedraw(ISVGSVGElement
*iface
)
511 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
512 FIXME("(%p)\n", This
);
516 static HRESULT WINAPI
SVGSVGElement_pauseAnimations(ISVGSVGElement
*iface
)
518 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
519 FIXME("(%p)\n", This
);
523 static HRESULT WINAPI
SVGSVGElement_unpauseAnimations(ISVGSVGElement
*iface
)
525 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
526 FIXME("(%p)\n", This
);
530 static HRESULT WINAPI
SVGSVGElement_animationsPaused(ISVGSVGElement
*iface
, VARIANT_BOOL
*p
)
532 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
533 FIXME("(%p)->(%p)\n", This
, p
);
537 static HRESULT WINAPI
SVGSVGElement_getCurrentTime(ISVGSVGElement
*iface
, float *p
)
539 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
540 FIXME("(%p)->(%p)\n", This
, p
);
544 static HRESULT WINAPI
SVGSVGElement_setCurrentTime(ISVGSVGElement
*iface
, float v
)
546 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
547 FIXME("(%p)->(%f)\n", This
, v
);
551 static HRESULT WINAPI
SVGSVGElement_getIntersectionList(ISVGSVGElement
*iface
, ISVGRect
*rect
,
552 ISVGElement
*reference_element
, VARIANT
*p
)
554 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
555 FIXME("(%p)->(%p %p %p)\n", This
, rect
, reference_element
, p
);
559 static HRESULT WINAPI
SVGSVGElement_getEnclosureList(ISVGSVGElement
*iface
, ISVGRect
*rect
,
560 ISVGElement
*reference_element
, VARIANT
*p
)
562 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
563 FIXME("(%p)->()\n", This
);
567 static HRESULT WINAPI
SVGSVGElement_checkIntersection(ISVGSVGElement
*iface
, ISVGElement
*element
,
568 ISVGRect
*rect
, VARIANT_BOOL
*p
)
570 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
571 FIXME("(%p)->(%p %p %p)\n", This
, element
, rect
, p
);
575 static HRESULT WINAPI
SVGSVGElement_checkEnclosure(ISVGSVGElement
*iface
, ISVGElement
*element
,
576 ISVGRect
*rect
, VARIANT_BOOL
*p
)
578 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
579 FIXME("(%p)->(%p %p %p)\n", This
, element
, rect
, p
);
583 static HRESULT WINAPI
SVGSVGElement_deselectAll(ISVGSVGElement
*iface
)
585 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
586 FIXME("(%p)\n", This
);
590 static HRESULT WINAPI
SVGSVGElement_createSVGNumber(ISVGSVGElement
*iface
, ISVGNumber
**p
)
592 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
593 FIXME("(%p)->(%p)\n", This
, p
);
597 static HRESULT WINAPI
SVGSVGElement_createSVGLength(ISVGSVGElement
*iface
, ISVGLength
**p
)
599 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
600 FIXME("(%p)->(%p)\n", This
, p
);
604 static HRESULT WINAPI
SVGSVGElement_createSVGAngle(ISVGSVGElement
*iface
, ISVGAngle
**p
)
606 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
607 FIXME("(%p)->(%p)\n", This
, p
);
611 static HRESULT WINAPI
SVGSVGElement_createSVGPoint(ISVGSVGElement
*iface
, ISVGPoint
**p
)
613 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
614 FIXME("(%p)->(%p)\n", This
, p
);
618 static HRESULT WINAPI
SVGSVGElement_createSVGMatrix(ISVGSVGElement
*iface
, ISVGMatrix
**p
)
620 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
621 FIXME("(%p)->(%p)\n", This
, p
);
625 static HRESULT WINAPI
SVGSVGElement_createSVGRect(ISVGSVGElement
*iface
, ISVGRect
**p
)
627 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
628 FIXME("(%p)->(%p)\n", This
, p
);
632 static HRESULT WINAPI
SVGSVGElement_createSVGTransform(ISVGSVGElement
*iface
, ISVGTransform
**p
)
634 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
635 FIXME("(%p)->(%p)\n", This
, p
);
639 static HRESULT WINAPI
SVGSVGElement_createSVGTransformFromMatrix(ISVGSVGElement
*iface
,
640 ISVGMatrix
*matrix
, ISVGTransform
**p
)
642 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
643 FIXME("(%p)->(%p %p)\n", This
, matrix
, p
);
647 static HRESULT WINAPI
SVGSVGElement_getElementById(ISVGSVGElement
*iface
, BSTR id
, IHTMLElement
**p
)
649 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
650 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(id
), p
);
654 static const ISVGSVGElementVtbl SVGSVGElementVtbl
= {
655 SVGSVGElement_QueryInterface
,
656 SVGSVGElement_AddRef
,
657 SVGSVGElement_Release
,
658 SVGSVGElement_GetTypeInfoCount
,
659 SVGSVGElement_GetTypeInfo
,
660 SVGSVGElement_GetIDsOfNames
,
661 SVGSVGElement_Invoke
,
662 SVGSVGElement_putref_x
,
664 SVGSVGElement_putref_y
,
666 SVGSVGElement_putref_width
,
667 SVGSVGElement_get_width
,
668 SVGSVGElement_putref_height
,
669 SVGSVGElement_get_height
,
670 SVGSVGElement_put_contentScriptType
,
671 SVGSVGElement_get_contentScriptType
,
672 SVGSVGElement_put_contentStyleType
,
673 SVGSVGElement_get_contentStyleType
,
674 SVGSVGElement_putref_viewport
,
675 SVGSVGElement_get_viewport
,
676 SVGSVGElement_put_pixelUnitToMillimeterX
,
677 SVGSVGElement_get_pixelUnitToMillimeterX
,
678 SVGSVGElement_put_pixelUnitToMillimeterY
,
679 SVGSVGElement_get_pixelUnitToMillimeterY
,
680 SVGSVGElement_put_screenPixelToMillimeterX
,
681 SVGSVGElement_get_screenPixelToMillimeterX
,
682 SVGSVGElement_put_screenPixelToMillimeterY
,
683 SVGSVGElement_get_screenPixelToMillimeterY
,
684 SVGSVGElement_put_useCurrentView
,
685 SVGSVGElement_get_useCurrentView
,
686 SVGSVGElement_putref_currentView
,
687 SVGSVGElement_get_currentView
,
688 SVGSVGElement_put_currentScale
,
689 SVGSVGElement_get_currentScale
,
690 SVGSVGElement_putref_currentTranslate
,
691 SVGSVGElement_get_currentTranslate
,
692 SVGSVGElement_suspendRedraw
,
693 SVGSVGElement_unsuspendRedraw
,
694 SVGSVGElement_unsuspendRedrawAll
,
695 SVGSVGElement_forceRedraw
,
696 SVGSVGElement_pauseAnimations
,
697 SVGSVGElement_unpauseAnimations
,
698 SVGSVGElement_animationsPaused
,
699 SVGSVGElement_getCurrentTime
,
700 SVGSVGElement_setCurrentTime
,
701 SVGSVGElement_getIntersectionList
,
702 SVGSVGElement_getEnclosureList
,
703 SVGSVGElement_checkIntersection
,
704 SVGSVGElement_checkEnclosure
,
705 SVGSVGElement_deselectAll
,
706 SVGSVGElement_createSVGNumber
,
707 SVGSVGElement_createSVGLength
,
708 SVGSVGElement_createSVGAngle
,
709 SVGSVGElement_createSVGPoint
,
710 SVGSVGElement_createSVGMatrix
,
711 SVGSVGElement_createSVGRect
,
712 SVGSVGElement_createSVGTransform
,
713 SVGSVGElement_createSVGTransformFromMatrix
,
714 SVGSVGElement_getElementById
717 static inline SVGSVGElement
*SVGSVGElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
719 return CONTAINING_RECORD(iface
, SVGSVGElement
, svg_element
.element
.node
);
722 static HRESULT
SVGSVGElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
724 SVGSVGElement
*This
= SVGSVGElement_from_HTMLDOMNode(iface
);
726 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
728 if(IsEqualGUID(&IID_ISVGSVGElement
, riid
))
729 *ppv
= &This
->ISVGSVGElement_iface
;
731 return SVGElement_QI(&This
->svg_element
.element
.node
, riid
, ppv
);
733 IUnknown_AddRef((IUnknown
*)*ppv
);
737 static const NodeImplVtbl SVGSVGElementImplVtbl
= {
738 &CLSID_SVGSVGElement
,
740 HTMLElement_destructor
,
743 HTMLElement_dispatch_nsevent_hook
,
745 HTMLElement_get_attr_col
,
748 static HRESULT
create_viewport_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
752 ret
= calloc(1, sizeof(SVGSVGElement
));
754 return E_OUTOFMEMORY
;
756 ret
->ISVGSVGElement_iface
.lpVtbl
= &SVGSVGElementVtbl
;
757 ret
->svg_element
.element
.node
.vtbl
= &SVGSVGElementImplVtbl
;
759 init_svg_element(&ret
->svg_element
, doc
, nselem
);
761 *elem
= &ret
->svg_element
.element
;
765 struct SVGCircleElement
{
766 SVGElement svg_element
;
767 ISVGCircleElement ISVGCircleElement_iface
;
770 static inline SVGCircleElement
*impl_from_ISVGCircleElement(ISVGCircleElement
*iface
)
772 return CONTAINING_RECORD(iface
, SVGCircleElement
, ISVGCircleElement_iface
);
775 static HRESULT WINAPI
SVGCircleElement_QueryInterface(ISVGCircleElement
*iface
,
776 REFIID riid
, void **ppv
)
778 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
780 return IHTMLDOMNode_QueryInterface(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
783 static ULONG WINAPI
SVGCircleElement_AddRef(ISVGCircleElement
*iface
)
785 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
787 return IHTMLDOMNode_AddRef(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
);
790 static ULONG WINAPI
SVGCircleElement_Release(ISVGCircleElement
*iface
)
792 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
794 return IHTMLDOMNode_Release(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
);
797 static HRESULT WINAPI
SVGCircleElement_GetTypeInfoCount(ISVGCircleElement
*iface
, UINT
*pctinfo
)
799 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
800 return IDispatchEx_GetTypeInfoCount(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
803 static HRESULT WINAPI
SVGCircleElement_GetTypeInfo(ISVGCircleElement
*iface
, UINT iTInfo
,
804 LCID lcid
, ITypeInfo
**ppTInfo
)
806 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
807 return IDispatchEx_GetTypeInfo(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
811 static HRESULT WINAPI
SVGCircleElement_GetIDsOfNames(ISVGCircleElement
*iface
, REFIID riid
,
812 LPOLESTR
*rgszNames
, UINT cNames
,
813 LCID lcid
, DISPID
*rgDispId
)
815 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
816 return IDispatchEx_GetIDsOfNames(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
817 cNames
, lcid
, rgDispId
);
820 static HRESULT WINAPI
SVGCircleElement_Invoke(ISVGCircleElement
*iface
, DISPID dispIdMember
,
821 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
822 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
824 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
825 return IDispatchEx_Invoke(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
826 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
829 static HRESULT WINAPI
SVGCircleElement_putref_cx(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
831 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
832 FIXME("(%p)->(%p)\n", This
, v
);
836 static HRESULT WINAPI
SVGCircleElement_get_cx(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
838 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
839 FIXME("(%p)->(%p)\n", This
, p
);
843 static HRESULT WINAPI
SVGCircleElement_putref_cy(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
845 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
846 FIXME("(%p)->(%p)\n", This
, v
);
850 static HRESULT WINAPI
SVGCircleElement_get_cy(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
852 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
853 FIXME("(%p)->(%p)\n", This
, p
);
857 static HRESULT WINAPI
SVGCircleElement_putref_r(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
859 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
860 FIXME("(%p)->(%p)\n", This
, v
);
864 static HRESULT WINAPI
SVGCircleElement_get_r(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
866 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
867 FIXME("(%p)->(%p)\n", This
, p
);
871 static const ISVGCircleElementVtbl SVGCircleElementVtbl
= {
872 SVGCircleElement_QueryInterface
,
873 SVGCircleElement_AddRef
,
874 SVGCircleElement_Release
,
875 SVGCircleElement_GetTypeInfoCount
,
876 SVGCircleElement_GetTypeInfo
,
877 SVGCircleElement_GetIDsOfNames
,
878 SVGCircleElement_Invoke
,
879 SVGCircleElement_putref_cx
,
880 SVGCircleElement_get_cx
,
881 SVGCircleElement_putref_cy
,
882 SVGCircleElement_get_cy
,
883 SVGCircleElement_putref_r
,
884 SVGCircleElement_get_r
887 static inline SVGCircleElement
*SVGCircleElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
889 return CONTAINING_RECORD(iface
, SVGCircleElement
, svg_element
.element
.node
);
892 static HRESULT
SVGCircleElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
894 SVGCircleElement
*This
= SVGCircleElement_from_HTMLDOMNode(iface
);
896 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
898 if(IsEqualGUID(&IID_ISVGCircleElement
, riid
))
899 *ppv
= &This
->ISVGCircleElement_iface
;
901 return SVGElement_QI(&This
->svg_element
.element
.node
, riid
, ppv
);
903 IUnknown_AddRef((IUnknown
*)*ppv
);
907 static const NodeImplVtbl SVGCircleElementImplVtbl
= {
908 &CLSID_SVGCircleElement
,
910 HTMLElement_destructor
,
913 HTMLElement_dispatch_nsevent_hook
,
915 HTMLElement_get_attr_col
,
918 static HRESULT
create_circle_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
920 SVGCircleElement
*ret
;
922 ret
= calloc(1, sizeof(SVGCircleElement
));
924 return E_OUTOFMEMORY
;
926 ret
->ISVGCircleElement_iface
.lpVtbl
= &SVGCircleElementVtbl
;
927 ret
->svg_element
.element
.node
.vtbl
= &SVGCircleElementImplVtbl
;
929 init_svg_element(&ret
->svg_element
, doc
, nselem
);
931 *elem
= &ret
->svg_element
.element
;
936 ISVGTextContentElement ISVGTextContentElement_iface
;
937 SVGElement
*svg_element
;
938 } SVGTextContentElement
;
940 static inline SVGTextContentElement
*impl_from_ISVGTextContentElement(ISVGTextContentElement
*iface
)
942 return CONTAINING_RECORD(iface
, SVGTextContentElement
, ISVGTextContentElement_iface
);
945 static HRESULT WINAPI
SVGTextContentElement_QueryInterface(ISVGTextContentElement
*iface
,
946 REFIID riid
, void **ppv
)
948 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
949 return IHTMLDOMNode_QueryInterface(&This
->svg_element
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
952 static ULONG WINAPI
SVGTextContentElement_AddRef(ISVGTextContentElement
*iface
)
954 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
956 return IHTMLDOMNode_AddRef(&This
->svg_element
->element
.node
.IHTMLDOMNode_iface
);
959 static ULONG WINAPI
SVGTextContentElement_Release(ISVGTextContentElement
*iface
)
961 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
963 return IHTMLDOMNode_Release(&This
->svg_element
->element
.node
.IHTMLDOMNode_iface
);
966 static HRESULT WINAPI
SVGTextContentElement_GetTypeInfoCount(ISVGTextContentElement
*iface
, UINT
*pctinfo
)
968 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
969 return IDispatchEx_GetTypeInfoCount(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
972 static HRESULT WINAPI
SVGTextContentElement_GetTypeInfo(ISVGTextContentElement
*iface
, UINT iTInfo
,
973 LCID lcid
, ITypeInfo
**ppTInfo
)
975 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
976 return IDispatchEx_GetTypeInfo(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
980 static HRESULT WINAPI
SVGTextContentElement_GetIDsOfNames(ISVGTextContentElement
*iface
, REFIID riid
,
981 LPOLESTR
*rgszNames
, UINT cNames
,
982 LCID lcid
, DISPID
*rgDispId
)
984 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
985 return IDispatchEx_GetIDsOfNames(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
986 cNames
, lcid
, rgDispId
);
989 static HRESULT WINAPI
SVGTextContentElement_Invoke(ISVGTextContentElement
*iface
, DISPID dispIdMember
,
990 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
991 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
993 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
994 return IDispatchEx_Invoke(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
995 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
998 static HRESULT WINAPI
SVGTextContentElement_putref_textLength(ISVGTextContentElement
*iface
, ISVGAnimatedLength
*v
)
1000 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1001 FIXME("(%p)->(%p)\n", This
, v
);
1005 static HRESULT WINAPI
SVGTextContentElement_get_textLength(ISVGTextContentElement
*iface
, ISVGAnimatedLength
**p
)
1007 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1008 FIXME("(%p)->(%p)\n", This
, p
);
1012 static HRESULT WINAPI
SVGTextContentElement_putref_lengthAdjust(ISVGTextContentElement
*iface
, ISVGAnimatedEnumeration
*v
)
1014 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1015 FIXME("(%p)->(%p)\n", This
, v
);
1019 static HRESULT WINAPI
SVGTextContentElement_get_lengthAdjust(ISVGTextContentElement
*iface
, ISVGAnimatedEnumeration
**p
)
1021 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1022 FIXME("(%p)->(%p)\n", This
, p
);
1026 static HRESULT WINAPI
SVGTextContentElement_getNumberOfChars(ISVGTextContentElement
*iface
, LONG
*p
)
1028 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1029 FIXME("(%p)->(%p)\n", This
, p
);
1033 static HRESULT WINAPI
SVGTextContentElement_getComputedTextLength(ISVGTextContentElement
*iface
, float *p
)
1035 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1036 FIXME("(%p)->(%p)\n", This
, p
);
1040 static HRESULT WINAPI
SVGTextContentElement_getSubStringLength(ISVGTextContentElement
*iface
,
1041 LONG charnum
, LONG nchars
, float *p
)
1043 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1044 FIXME("(%p)->(%ld %ld %p)\n", This
, charnum
, nchars
, p
);
1048 static HRESULT WINAPI
SVGTextContentElement_getStartPositionOfChar(ISVGTextContentElement
*iface
,
1049 LONG charnum
, ISVGPoint
**p
)
1051 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1052 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
1056 static HRESULT WINAPI
SVGTextContentElement_getEndPositionOfChar(ISVGTextContentElement
*iface
,
1057 LONG charnum
, ISVGPoint
**p
)
1059 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1060 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
1064 static HRESULT WINAPI
SVGTextContentElement_getExtentOfChar(ISVGTextContentElement
*iface
,
1065 LONG charnum
, ISVGRect
**p
)
1067 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1068 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
1072 static HRESULT WINAPI
SVGTextContentElement_getRotationOfChar(ISVGTextContentElement
*iface
,
1073 LONG charnum
, float *p
)
1075 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1076 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
1080 static HRESULT WINAPI
SVGTextContentElement_getCharNumAtPosition(ISVGTextContentElement
*iface
,
1081 ISVGPoint
*point
, LONG
*p
)
1083 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1084 FIXME("(%p)->(%p %p)\n", This
, point
, p
);
1088 static HRESULT WINAPI
SVGTextContentElement_selectSubString(ISVGTextContentElement
*iface
,
1089 LONG charnum
, LONG nchars
)
1091 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1092 FIXME("(%p)->(%ld %ld)\n", This
, charnum
, nchars
);
1096 static const ISVGTextContentElementVtbl SVGTextContentElementVtbl
= {
1097 SVGTextContentElement_QueryInterface
,
1098 SVGTextContentElement_AddRef
,
1099 SVGTextContentElement_Release
,
1100 SVGTextContentElement_GetTypeInfoCount
,
1101 SVGTextContentElement_GetTypeInfo
,
1102 SVGTextContentElement_GetIDsOfNames
,
1103 SVGTextContentElement_Invoke
,
1104 SVGTextContentElement_putref_textLength
,
1105 SVGTextContentElement_get_textLength
,
1106 SVGTextContentElement_putref_lengthAdjust
,
1107 SVGTextContentElement_get_lengthAdjust
,
1108 SVGTextContentElement_getNumberOfChars
,
1109 SVGTextContentElement_getComputedTextLength
,
1110 SVGTextContentElement_getSubStringLength
,
1111 SVGTextContentElement_getStartPositionOfChar
,
1112 SVGTextContentElement_getEndPositionOfChar
,
1113 SVGTextContentElement_getExtentOfChar
,
1114 SVGTextContentElement_getRotationOfChar
,
1115 SVGTextContentElement_getCharNumAtPosition
,
1116 SVGTextContentElement_selectSubString
1119 static void init_text_content_element(SVGTextContentElement
*text_content
, SVGElement
*svg_element
)
1121 text_content
->ISVGTextContentElement_iface
.lpVtbl
= &SVGTextContentElementVtbl
;
1122 text_content
->svg_element
= svg_element
;
1125 struct SVGTSpanElement
{
1126 SVGElement svg_element
;
1127 SVGTextContentElement text_content
;
1130 static inline SVGTSpanElement
*SVGTSpanElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
1132 return CONTAINING_RECORD(iface
, SVGTSpanElement
, svg_element
.element
.node
);
1135 static HRESULT
SVGTSpanElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
1137 SVGTSpanElement
*This
= SVGTSpanElement_from_HTMLDOMNode(iface
);
1139 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
1141 if(IsEqualGUID(&IID_ISVGTSpanElement
, riid
))
1142 *ppv
= &This
->svg_element
.ISVGElement_iface
; /* no additional methods */
1143 else if(IsEqualGUID(&IID_ISVGTextContentElement
, riid
))
1144 *ppv
= &This
->text_content
.ISVGTextContentElement_iface
;
1146 return SVGElement_QI(&This
->svg_element
.element
.node
, riid
, ppv
);
1148 IUnknown_AddRef((IUnknown
*)*ppv
);
1152 static const NodeImplVtbl SVGTSpanElementImplVtbl
= {
1153 &CLSID_SVGTSpanElement
,
1155 HTMLElement_destructor
,
1158 HTMLElement_dispatch_nsevent_hook
,
1160 HTMLElement_get_attr_col
,
1163 static HRESULT
create_tspan_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
1165 SVGTSpanElement
*ret
;
1167 ret
= calloc(1, sizeof(SVGTSpanElement
));
1169 return E_OUTOFMEMORY
;
1171 ret
->svg_element
.element
.node
.vtbl
= &SVGTSpanElementImplVtbl
;
1172 init_text_content_element(&ret
->text_content
, &ret
->svg_element
);
1173 init_svg_element(&ret
->svg_element
, doc
, nselem
);
1175 *elem
= &ret
->svg_element
.element
;
1179 HRESULT
create_svg_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*dom_element
, const WCHAR
*tag_name
, HTMLElement
**elem
)
1181 SVGElement
*svg_element
;
1183 TRACE("%s\n", debugstr_w(tag_name
));
1185 if(!wcscmp(tag_name
, L
"svg"))
1186 return create_viewport_element(doc
, dom_element
, elem
);
1187 if(!wcscmp(tag_name
, L
"circle"))
1188 return create_circle_element(doc
, dom_element
, elem
);
1189 if(!wcscmp(tag_name
, L
"tspan"))
1190 return create_tspan_element(doc
, dom_element
, elem
);
1192 svg_element
= calloc(1, sizeof(*svg_element
));
1194 return E_OUTOFMEMORY
;
1196 init_svg_element(svg_element
, doc
, dom_element
);
1197 *elem
= &svg_element
->element
;