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
32 #include "wine/debug.h"
34 #include "mshtml_private.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
40 ISVGElement ISVGElement_iface
;
43 static inline SVGElement
*impl_from_ISVGElement(ISVGElement
*iface
)
45 return CONTAINING_RECORD(iface
, SVGElement
, ISVGElement_iface
);
48 static HRESULT WINAPI
SVGElement_QueryInterface(ISVGElement
*iface
,
49 REFIID riid
, void **ppv
)
51 SVGElement
*This
= impl_from_ISVGElement(iface
);
53 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
56 static ULONG WINAPI
SVGElement_AddRef(ISVGElement
*iface
)
58 SVGElement
*This
= impl_from_ISVGElement(iface
);
60 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
63 static ULONG WINAPI
SVGElement_Release(ISVGElement
*iface
)
65 SVGElement
*This
= impl_from_ISVGElement(iface
);
67 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
70 static HRESULT WINAPI
SVGElement_GetTypeInfoCount(ISVGElement
*iface
, UINT
*pctinfo
)
72 SVGElement
*This
= impl_from_ISVGElement(iface
);
73 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
76 static HRESULT WINAPI
SVGElement_GetTypeInfo(ISVGElement
*iface
, UINT iTInfo
,
77 LCID lcid
, ITypeInfo
**ppTInfo
)
79 SVGElement
*This
= impl_from_ISVGElement(iface
);
80 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
84 static HRESULT WINAPI
SVGElement_GetIDsOfNames(ISVGElement
*iface
, REFIID riid
,
85 LPOLESTR
*rgszNames
, UINT cNames
,
86 LCID lcid
, DISPID
*rgDispId
)
88 SVGElement
*This
= impl_from_ISVGElement(iface
);
89 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
90 cNames
, lcid
, rgDispId
);
93 static HRESULT WINAPI
SVGElement_Invoke(ISVGElement
*iface
, DISPID dispIdMember
,
94 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
95 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
97 SVGElement
*This
= impl_from_ISVGElement(iface
);
98 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
99 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
102 static HRESULT WINAPI
SVGElement_put_xmlbase(ISVGElement
*iface
, BSTR v
)
104 SVGElement
*This
= impl_from_ISVGElement(iface
);
105 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
109 static HRESULT WINAPI
SVGElement_get_xmlbase(ISVGElement
*iface
, BSTR
*p
)
111 SVGElement
*This
= impl_from_ISVGElement(iface
);
112 FIXME("(%p)->(%p)\n", This
, p
);
116 static HRESULT WINAPI
SVGElement_putref_ownerSVGElement(ISVGElement
*iface
, ISVGSVGElement
*v
)
118 SVGElement
*This
= impl_from_ISVGElement(iface
);
119 FIXME("(%p)->(%p)\n", This
, v
);
123 static HRESULT WINAPI
SVGElement_get_ownerSVGElement(ISVGElement
*iface
, ISVGSVGElement
**p
)
125 SVGElement
*This
= impl_from_ISVGElement(iface
);
126 FIXME("(%p)->(%p)\n", This
, p
);
130 static HRESULT WINAPI
SVGElement_putref_viewportElement(ISVGElement
*iface
, ISVGElement
*v
)
132 SVGElement
*This
= impl_from_ISVGElement(iface
);
133 FIXME("(%p)->(%p)\n", This
, v
);
137 static HRESULT WINAPI
SVGElement_get_viewportElement(ISVGElement
*iface
, ISVGElement
**p
)
139 SVGElement
*This
= impl_from_ISVGElement(iface
);
140 FIXME("(%p)->(%p)\n", This
, p
);
144 static HRESULT WINAPI
SVGElement_putref_focusable(ISVGElement
*iface
, ISVGAnimatedEnumeration
*v
)
146 SVGElement
*This
= impl_from_ISVGElement(iface
);
147 FIXME("(%p)->(%p)\n", This
, v
);
151 static HRESULT WINAPI
SVGElement_get_focusable(ISVGElement
*iface
, ISVGAnimatedEnumeration
**p
)
153 SVGElement
*This
= impl_from_ISVGElement(iface
);
154 FIXME("(%p)->(%p)\n", This
, p
);
158 static const ISVGElementVtbl SVGElementVtbl
= {
159 SVGElement_QueryInterface
,
162 SVGElement_GetTypeInfoCount
,
163 SVGElement_GetTypeInfo
,
164 SVGElement_GetIDsOfNames
,
166 SVGElement_put_xmlbase
,
167 SVGElement_get_xmlbase
,
168 SVGElement_putref_ownerSVGElement
,
169 SVGElement_get_ownerSVGElement
,
170 SVGElement_putref_viewportElement
,
171 SVGElement_get_viewportElement
,
172 SVGElement_putref_focusable
,
173 SVGElement_get_focusable
176 static inline SVGElement
*SVGElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
178 return CONTAINING_RECORD(iface
, SVGElement
, element
.node
);
181 static HRESULT
SVGElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
183 SVGElement
*This
= SVGElement_from_HTMLDOMNode(iface
);
185 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
187 if(IsEqualGUID(&IID_ISVGElement
, riid
))
188 *ppv
= &This
->ISVGElement_iface
;
190 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
192 IUnknown_AddRef((IUnknown
*)*ppv
);
196 static const NodeImplVtbl SVGElementImplVtbl
= {
199 HTMLElement_destructor
,
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)->(%u %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)->(%u)\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
,
744 HTMLElement_get_attr_col
,
747 static HRESULT
create_viewport_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
751 ret
= heap_alloc_zero(sizeof(SVGSVGElement
));
753 return E_OUTOFMEMORY
;
755 ret
->ISVGSVGElement_iface
.lpVtbl
= &SVGSVGElementVtbl
;
756 ret
->svg_element
.element
.node
.vtbl
= &SVGSVGElementImplVtbl
;
758 init_svg_element(&ret
->svg_element
, doc
, nselem
);
760 *elem
= &ret
->svg_element
.element
;
764 struct SVGCircleElement
{
765 SVGElement svg_element
;
766 ISVGCircleElement ISVGCircleElement_iface
;
769 static inline SVGCircleElement
*impl_from_ISVGCircleElement(ISVGCircleElement
*iface
)
771 return CONTAINING_RECORD(iface
, SVGCircleElement
, ISVGCircleElement_iface
);
774 static HRESULT WINAPI
SVGCircleElement_QueryInterface(ISVGCircleElement
*iface
,
775 REFIID riid
, void **ppv
)
777 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
779 return IHTMLDOMNode_QueryInterface(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
782 static ULONG WINAPI
SVGCircleElement_AddRef(ISVGCircleElement
*iface
)
784 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
786 return IHTMLDOMNode_AddRef(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
);
789 static ULONG WINAPI
SVGCircleElement_Release(ISVGCircleElement
*iface
)
791 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
793 return IHTMLDOMNode_Release(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
);
796 static HRESULT WINAPI
SVGCircleElement_GetTypeInfoCount(ISVGCircleElement
*iface
, UINT
*pctinfo
)
798 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
799 return IDispatchEx_GetTypeInfoCount(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
802 static HRESULT WINAPI
SVGCircleElement_GetTypeInfo(ISVGCircleElement
*iface
, UINT iTInfo
,
803 LCID lcid
, ITypeInfo
**ppTInfo
)
805 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
806 return IDispatchEx_GetTypeInfo(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
810 static HRESULT WINAPI
SVGCircleElement_GetIDsOfNames(ISVGCircleElement
*iface
, REFIID riid
,
811 LPOLESTR
*rgszNames
, UINT cNames
,
812 LCID lcid
, DISPID
*rgDispId
)
814 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
815 return IDispatchEx_GetIDsOfNames(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
816 cNames
, lcid
, rgDispId
);
819 static HRESULT WINAPI
SVGCircleElement_Invoke(ISVGCircleElement
*iface
, DISPID dispIdMember
,
820 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
821 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
823 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
824 return IDispatchEx_Invoke(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
825 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
828 static HRESULT WINAPI
SVGCircleElement_putref_cx(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
830 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
831 FIXME("(%p)->(%p)\n", This
, v
);
835 static HRESULT WINAPI
SVGCircleElement_get_cx(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
837 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
838 FIXME("(%p)->(%p)\n", This
, p
);
842 static HRESULT WINAPI
SVGCircleElement_putref_cy(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
844 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
845 FIXME("(%p)->(%p)\n", This
, v
);
849 static HRESULT WINAPI
SVGCircleElement_get_cy(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
851 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
852 FIXME("(%p)->(%p)\n", This
, p
);
856 static HRESULT WINAPI
SVGCircleElement_putref_r(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
858 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
859 FIXME("(%p)->(%p)\n", This
, v
);
863 static HRESULT WINAPI
SVGCircleElement_get_r(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
865 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
866 FIXME("(%p)->(%p)\n", This
, p
);
870 static const ISVGCircleElementVtbl SVGCircleElementVtbl
= {
871 SVGCircleElement_QueryInterface
,
872 SVGCircleElement_AddRef
,
873 SVGCircleElement_Release
,
874 SVGCircleElement_GetTypeInfoCount
,
875 SVGCircleElement_GetTypeInfo
,
876 SVGCircleElement_GetIDsOfNames
,
877 SVGCircleElement_Invoke
,
878 SVGCircleElement_putref_cx
,
879 SVGCircleElement_get_cx
,
880 SVGCircleElement_putref_cy
,
881 SVGCircleElement_get_cy
,
882 SVGCircleElement_putref_r
,
883 SVGCircleElement_get_r
886 static inline SVGCircleElement
*SVGCircleElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
888 return CONTAINING_RECORD(iface
, SVGCircleElement
, svg_element
.element
.node
);
891 static HRESULT
SVGCircleElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
893 SVGCircleElement
*This
= SVGCircleElement_from_HTMLDOMNode(iface
);
895 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
897 if(IsEqualGUID(&IID_ISVGCircleElement
, riid
))
898 *ppv
= &This
->ISVGCircleElement_iface
;
900 return SVGElement_QI(&This
->svg_element
.element
.node
, riid
, ppv
);
902 IUnknown_AddRef((IUnknown
*)*ppv
);
906 static const NodeImplVtbl SVGCircleElementImplVtbl
= {
907 &CLSID_SVGCircleElement
,
909 HTMLElement_destructor
,
913 HTMLElement_get_attr_col
,
916 static HRESULT
create_circle_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
918 SVGCircleElement
*ret
;
920 ret
= heap_alloc_zero(sizeof(SVGCircleElement
));
922 return E_OUTOFMEMORY
;
924 ret
->ISVGCircleElement_iface
.lpVtbl
= &SVGCircleElementVtbl
;
925 ret
->svg_element
.element
.node
.vtbl
= &SVGCircleElementImplVtbl
;
927 init_svg_element(&ret
->svg_element
, doc
, nselem
);
929 *elem
= &ret
->svg_element
.element
;
934 ISVGTextContentElement ISVGTextContentElement_iface
;
935 SVGElement
*svg_element
;
936 } SVGTextContentElement
;
938 static inline SVGTextContentElement
*impl_from_ISVGTextContentElement(ISVGTextContentElement
*iface
)
940 return CONTAINING_RECORD(iface
, SVGTextContentElement
, ISVGTextContentElement_iface
);
943 static HRESULT WINAPI
SVGTextContentElement_QueryInterface(ISVGTextContentElement
*iface
,
944 REFIID riid
, void **ppv
)
946 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
947 return IHTMLDOMNode_QueryInterface(&This
->svg_element
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
950 static ULONG WINAPI
SVGTextContentElement_AddRef(ISVGTextContentElement
*iface
)
952 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
954 return IHTMLDOMNode_AddRef(&This
->svg_element
->element
.node
.IHTMLDOMNode_iface
);
957 static ULONG WINAPI
SVGTextContentElement_Release(ISVGTextContentElement
*iface
)
959 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
961 return IHTMLDOMNode_Release(&This
->svg_element
->element
.node
.IHTMLDOMNode_iface
);
964 static HRESULT WINAPI
SVGTextContentElement_GetTypeInfoCount(ISVGTextContentElement
*iface
, UINT
*pctinfo
)
966 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
967 return IDispatchEx_GetTypeInfoCount(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
970 static HRESULT WINAPI
SVGTextContentElement_GetTypeInfo(ISVGTextContentElement
*iface
, UINT iTInfo
,
971 LCID lcid
, ITypeInfo
**ppTInfo
)
973 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
974 return IDispatchEx_GetTypeInfo(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
978 static HRESULT WINAPI
SVGTextContentElement_GetIDsOfNames(ISVGTextContentElement
*iface
, REFIID riid
,
979 LPOLESTR
*rgszNames
, UINT cNames
,
980 LCID lcid
, DISPID
*rgDispId
)
982 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
983 return IDispatchEx_GetIDsOfNames(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
984 cNames
, lcid
, rgDispId
);
987 static HRESULT WINAPI
SVGTextContentElement_Invoke(ISVGTextContentElement
*iface
, DISPID dispIdMember
,
988 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
989 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
991 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
992 return IDispatchEx_Invoke(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
993 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
996 static HRESULT WINAPI
SVGTextContentElement_putref_textLength(ISVGTextContentElement
*iface
, ISVGAnimatedLength
*v
)
998 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
999 FIXME("(%p)->(%p)\n", This
, v
);
1003 static HRESULT WINAPI
SVGTextContentElement_get_textLength(ISVGTextContentElement
*iface
, ISVGAnimatedLength
**p
)
1005 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1006 FIXME("(%p)->(%p)\n", This
, p
);
1010 static HRESULT WINAPI
SVGTextContentElement_putref_lengthAdjust(ISVGTextContentElement
*iface
, ISVGAnimatedEnumeration
*v
)
1012 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1013 FIXME("(%p)->(%p)\n", This
, v
);
1017 static HRESULT WINAPI
SVGTextContentElement_get_lengthAdjust(ISVGTextContentElement
*iface
, ISVGAnimatedEnumeration
**p
)
1019 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1020 FIXME("(%p)->(%p)\n", This
, p
);
1024 static HRESULT WINAPI
SVGTextContentElement_getNumberOfChars(ISVGTextContentElement
*iface
, LONG
*p
)
1026 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1027 FIXME("(%p)->(%p)\n", This
, p
);
1031 static HRESULT WINAPI
SVGTextContentElement_getComputedTextLength(ISVGTextContentElement
*iface
, float *p
)
1033 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1034 FIXME("(%p)->(%p)\n", This
, p
);
1038 static HRESULT WINAPI
SVGTextContentElement_getSubStringLength(ISVGTextContentElement
*iface
,
1039 LONG charnum
, LONG nchars
, float *p
)
1041 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1042 FIXME("(%p)->(%d %d %p)\n", This
, charnum
, nchars
, p
);
1046 static HRESULT WINAPI
SVGTextContentElement_getStartPositionOfChar(ISVGTextContentElement
*iface
,
1047 LONG charnum
, ISVGPoint
**p
)
1049 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1050 FIXME("(%p)->(%d %p)\n", This
, charnum
, p
);
1054 static HRESULT WINAPI
SVGTextContentElement_getEndPositionOfChar(ISVGTextContentElement
*iface
,
1055 LONG charnum
, ISVGPoint
**p
)
1057 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1058 FIXME("(%p)->(%d %p)\n", This
, charnum
, p
);
1062 static HRESULT WINAPI
SVGTextContentElement_getExtentOfChar(ISVGTextContentElement
*iface
,
1063 LONG charnum
, ISVGRect
**p
)
1065 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1066 FIXME("(%p)->(%d %p)\n", This
, charnum
, p
);
1070 static HRESULT WINAPI
SVGTextContentElement_getRotationOfChar(ISVGTextContentElement
*iface
,
1071 LONG charnum
, float *p
)
1073 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1074 FIXME("(%p)->(%d %p)\n", This
, charnum
, p
);
1078 static HRESULT WINAPI
SVGTextContentElement_getCharNumAtPosition(ISVGTextContentElement
*iface
,
1079 ISVGPoint
*point
, LONG
*p
)
1081 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1082 FIXME("(%p)->(%p %p)\n", This
, point
, p
);
1086 static HRESULT WINAPI
SVGTextContentElement_selectSubString(ISVGTextContentElement
*iface
,
1087 LONG charnum
, LONG nchars
)
1089 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1090 FIXME("(%p)->(%d %d)\n", This
, charnum
, nchars
);
1094 static const ISVGTextContentElementVtbl SVGTextContentElementVtbl
= {
1095 SVGTextContentElement_QueryInterface
,
1096 SVGTextContentElement_AddRef
,
1097 SVGTextContentElement_Release
,
1098 SVGTextContentElement_GetTypeInfoCount
,
1099 SVGTextContentElement_GetTypeInfo
,
1100 SVGTextContentElement_GetIDsOfNames
,
1101 SVGTextContentElement_Invoke
,
1102 SVGTextContentElement_putref_textLength
,
1103 SVGTextContentElement_get_textLength
,
1104 SVGTextContentElement_putref_lengthAdjust
,
1105 SVGTextContentElement_get_lengthAdjust
,
1106 SVGTextContentElement_getNumberOfChars
,
1107 SVGTextContentElement_getComputedTextLength
,
1108 SVGTextContentElement_getSubStringLength
,
1109 SVGTextContentElement_getStartPositionOfChar
,
1110 SVGTextContentElement_getEndPositionOfChar
,
1111 SVGTextContentElement_getExtentOfChar
,
1112 SVGTextContentElement_getRotationOfChar
,
1113 SVGTextContentElement_getCharNumAtPosition
,
1114 SVGTextContentElement_selectSubString
1117 static void init_text_content_element(SVGTextContentElement
*text_content
, SVGElement
*svg_element
)
1119 text_content
->ISVGTextContentElement_iface
.lpVtbl
= &SVGTextContentElementVtbl
;
1120 text_content
->svg_element
= svg_element
;
1123 struct SVGTSpanElement
{
1124 SVGElement svg_element
;
1125 SVGTextContentElement text_content
;
1128 static inline SVGTSpanElement
*SVGTSpanElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
1130 return CONTAINING_RECORD(iface
, SVGTSpanElement
, svg_element
.element
.node
);
1133 static HRESULT
SVGTSpanElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
1135 SVGTSpanElement
*This
= SVGTSpanElement_from_HTMLDOMNode(iface
);
1137 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
1139 if(IsEqualGUID(&IID_ISVGTSpanElement
, riid
))
1140 *ppv
= &This
->svg_element
.ISVGElement_iface
; /* no additional methods */
1141 else if(IsEqualGUID(&IID_ISVGTextContentElement
, riid
))
1142 *ppv
= &This
->text_content
.ISVGTextContentElement_iface
;
1144 return SVGElement_QI(&This
->svg_element
.element
.node
, riid
, ppv
);
1146 IUnknown_AddRef((IUnknown
*)*ppv
);
1150 static const NodeImplVtbl SVGTSpanElementImplVtbl
= {
1151 &CLSID_SVGTSpanElement
,
1153 HTMLElement_destructor
,
1157 HTMLElement_get_attr_col
,
1160 static HRESULT
create_tspan_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
1162 SVGTSpanElement
*ret
;
1164 ret
= heap_alloc_zero(sizeof(SVGTSpanElement
));
1166 return E_OUTOFMEMORY
;
1168 ret
->svg_element
.element
.node
.vtbl
= &SVGTSpanElementImplVtbl
;
1169 init_text_content_element(&ret
->text_content
, &ret
->svg_element
);
1170 init_svg_element(&ret
->svg_element
, doc
, nselem
);
1172 *elem
= &ret
->svg_element
.element
;
1176 static const WCHAR circleW
[] = {'c','i','r','c','l','e',0};
1177 static const WCHAR svgW
[] = {'s','v','g',0};
1178 static const WCHAR tspanW
[] = {'t','s','p','a','n',0};
1180 HRESULT
create_svg_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*dom_element
, const WCHAR
*tag_name
, HTMLElement
**elem
)
1182 SVGElement
*svg_element
;
1184 TRACE("%s\n", debugstr_w(tag_name
));
1186 if(!wcscmp(tag_name
, svgW
))
1187 return create_viewport_element(doc
, dom_element
, elem
);
1188 if(!wcscmp(tag_name
, circleW
))
1189 return create_circle_element(doc
, dom_element
, elem
);
1190 if(!wcscmp(tag_name
, tspanW
))
1191 return create_tspan_element(doc
, dom_element
, elem
);
1193 svg_element
= heap_alloc_zero(sizeof(*svg_element
));
1195 return E_OUTOFMEMORY
;
1197 init_svg_element(svg_element
, doc
, dom_element
);
1198 *elem
= &svg_element
->element
;