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
= {
196 .clsid
= &CLSID_SVGElement
,
198 .destructor
= HTMLElement_destructor
,
199 .cpc_entries
= HTMLElement_cpc
,
200 .clone
= HTMLElement_clone
,
201 .get_attr_col
= HTMLElement_get_attr_col
,
204 static void init_svg_element(SVGElement
*svg_element
, HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
)
206 if(!svg_element
->element
.node
.vtbl
)
207 svg_element
->element
.node
.vtbl
= &SVGElementImplVtbl
;
208 svg_element
->ISVGElement_iface
.lpVtbl
= &SVGElementVtbl
;
209 HTMLElement_Init(&svg_element
->element
, doc
, (nsIDOMElement
*)nselem
, NULL
);
212 struct SVGSVGElement
{
213 SVGElement svg_element
;
214 ISVGSVGElement ISVGSVGElement_iface
;
217 static inline SVGSVGElement
*impl_from_ISVGSVGElement(ISVGSVGElement
*iface
)
219 return CONTAINING_RECORD(iface
, SVGSVGElement
, ISVGSVGElement_iface
);
222 static HRESULT WINAPI
SVGSVGElement_QueryInterface(ISVGSVGElement
*iface
,
223 REFIID riid
, void **ppv
)
225 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
227 return IHTMLDOMNode_QueryInterface(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
230 static ULONG WINAPI
SVGSVGElement_AddRef(ISVGSVGElement
*iface
)
232 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
234 return IHTMLDOMNode_AddRef(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
);
237 static ULONG WINAPI
SVGSVGElement_Release(ISVGSVGElement
*iface
)
239 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
241 return IHTMLDOMNode_Release(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
);
244 static HRESULT WINAPI
SVGSVGElement_GetTypeInfoCount(ISVGSVGElement
*iface
, UINT
*pctinfo
)
246 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
247 return IDispatchEx_GetTypeInfoCount(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
250 static HRESULT WINAPI
SVGSVGElement_GetTypeInfo(ISVGSVGElement
*iface
, UINT iTInfo
,
251 LCID lcid
, ITypeInfo
**ppTInfo
)
253 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
254 return IDispatchEx_GetTypeInfo(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
258 static HRESULT WINAPI
SVGSVGElement_GetIDsOfNames(ISVGSVGElement
*iface
, REFIID riid
,
259 LPOLESTR
*rgszNames
, UINT cNames
,
260 LCID lcid
, DISPID
*rgDispId
)
262 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
263 return IDispatchEx_GetIDsOfNames(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
264 cNames
, lcid
, rgDispId
);
267 static HRESULT WINAPI
SVGSVGElement_Invoke(ISVGSVGElement
*iface
, DISPID dispIdMember
,
268 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
269 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
271 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
272 return IDispatchEx_Invoke(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
273 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
276 static HRESULT WINAPI
SVGSVGElement_putref_x(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
278 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
279 FIXME("(%p)->(%p)\n", This
, v
);
283 static HRESULT WINAPI
SVGSVGElement_get_x(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
285 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
286 FIXME("(%p)->(%p)\n", This
, p
);
290 static HRESULT WINAPI
SVGSVGElement_putref_y(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
292 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
293 FIXME("(%p)->(%p)\n", This
, v
);
297 static HRESULT WINAPI
SVGSVGElement_get_y(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
299 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
300 FIXME("(%p)->(%p)\n", This
, p
);
304 static HRESULT WINAPI
SVGSVGElement_putref_width(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
306 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
307 FIXME("(%p)->(%p)\n", This
, v
);
311 static HRESULT WINAPI
SVGSVGElement_get_width(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
313 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
314 FIXME("(%p)->(%p)\n", This
, p
);
318 static HRESULT WINAPI
SVGSVGElement_putref_height(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
320 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
321 FIXME("(%p)->(%p)\n", This
, v
);
325 static HRESULT WINAPI
SVGSVGElement_get_height(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
327 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
328 FIXME("(%p)->(%p)\n", This
, p
);
332 static HRESULT WINAPI
SVGSVGElement_put_contentScriptType(ISVGSVGElement
*iface
, BSTR v
)
334 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
335 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
339 static HRESULT WINAPI
SVGSVGElement_get_contentScriptType(ISVGSVGElement
*iface
, BSTR
*p
)
341 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
342 FIXME("(%p)->(%p)\n", This
, p
);
346 static HRESULT WINAPI
SVGSVGElement_put_contentStyleType(ISVGSVGElement
*iface
, BSTR v
)
348 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
349 FIXME("(%p)->(%p)\n", This
, v
);
353 static HRESULT WINAPI
SVGSVGElement_get_contentStyleType(ISVGSVGElement
*iface
, BSTR
*p
)
355 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
356 FIXME("(%p)->(%p)\n", This
, p
);
360 static HRESULT WINAPI
SVGSVGElement_putref_viewport(ISVGSVGElement
*iface
, ISVGRect
*v
)
362 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
363 FIXME("(%p)->(%p)\n", This
, v
);
367 static HRESULT WINAPI
SVGSVGElement_get_viewport(ISVGSVGElement
*iface
, ISVGRect
**p
)
369 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
370 FIXME("(%p)->(%p)\n", This
, p
);
374 static HRESULT WINAPI
SVGSVGElement_put_pixelUnitToMillimeterX(ISVGSVGElement
*iface
, float v
)
376 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
377 FIXME("(%p)->(%f)\n", This
, v
);
381 static HRESULT WINAPI
SVGSVGElement_get_pixelUnitToMillimeterX(ISVGSVGElement
*iface
, float *p
)
383 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
384 FIXME("(%p)->(%p)\n", This
, p
);
388 static HRESULT WINAPI
SVGSVGElement_put_pixelUnitToMillimeterY(ISVGSVGElement
*iface
, float v
)
390 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
391 FIXME("(%p)->(%f)\n", This
, v
);
395 static HRESULT WINAPI
SVGSVGElement_get_pixelUnitToMillimeterY(ISVGSVGElement
*iface
, float *p
)
397 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
398 FIXME("(%p)->(%p)\n", This
, p
);
402 static HRESULT WINAPI
SVGSVGElement_put_screenPixelToMillimeterX(ISVGSVGElement
*iface
, float v
)
404 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
405 FIXME("(%p)->(%f)\n", This
, v
);
409 static HRESULT WINAPI
SVGSVGElement_get_screenPixelToMillimeterX(ISVGSVGElement
*iface
, float *p
)
411 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
412 FIXME("(%p)->(%p)\n", This
, p
);
416 static HRESULT WINAPI
SVGSVGElement_put_screenPixelToMillimeterY(ISVGSVGElement
*iface
, float v
)
418 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
419 FIXME("(%p)->(%f)\n", This
, v
);
423 static HRESULT WINAPI
SVGSVGElement_get_screenPixelToMillimeterY(ISVGSVGElement
*iface
, float *p
)
425 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
426 FIXME("(%p)->(%p)\n", This
, p
);
430 static HRESULT WINAPI
SVGSVGElement_put_useCurrentView(ISVGSVGElement
*iface
, VARIANT_BOOL v
)
432 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
433 FIXME("(%p)->(%x)\n", This
, v
);
437 static HRESULT WINAPI
SVGSVGElement_get_useCurrentView(ISVGSVGElement
*iface
, VARIANT_BOOL
*p
)
439 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
440 FIXME("(%p)->(%p)\n", This
, p
);
444 static HRESULT WINAPI
SVGSVGElement_putref_currentView(ISVGSVGElement
*iface
, ISVGViewSpec
*v
)
446 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
447 FIXME("(%p)->(%p)\n", This
, v
);
451 static HRESULT WINAPI
SVGSVGElement_get_currentView(ISVGSVGElement
*iface
, ISVGViewSpec
**p
)
453 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
454 FIXME("(%p)->(%p)\n", This
, p
);
458 static HRESULT WINAPI
SVGSVGElement_put_currentScale(ISVGSVGElement
*iface
, float v
)
460 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
461 FIXME("(%p)->(%f)\n", This
, v
);
465 static HRESULT WINAPI
SVGSVGElement_get_currentScale(ISVGSVGElement
*iface
, float *p
)
467 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
468 FIXME("(%p)->(%p)\n", This
, p
);
472 static HRESULT WINAPI
SVGSVGElement_putref_currentTranslate(ISVGSVGElement
*iface
, ISVGPoint
*v
)
474 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
475 FIXME("(%p)->(%p)\n", This
, v
);
479 static HRESULT WINAPI
SVGSVGElement_get_currentTranslate(ISVGSVGElement
*iface
, ISVGPoint
**p
)
481 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
482 FIXME("(%p)->(%p)\n", This
, p
);
486 static HRESULT WINAPI
SVGSVGElement_suspendRedraw(ISVGSVGElement
*iface
, ULONG max_wait
, ULONG
*p
)
488 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
489 FIXME("(%p)->(%lu %p)\n", This
, max_wait
, p
);
493 static HRESULT WINAPI
SVGSVGElement_unsuspendRedraw(ISVGSVGElement
*iface
, ULONG id
)
495 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
496 FIXME("(%p)->(%lu)\n", This
, id
);
500 static HRESULT WINAPI
SVGSVGElement_unsuspendRedrawAll(ISVGSVGElement
*iface
)
502 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
503 FIXME("(%p)\n", This
);
507 static HRESULT WINAPI
SVGSVGElement_forceRedraw(ISVGSVGElement
*iface
)
509 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
510 FIXME("(%p)\n", This
);
514 static HRESULT WINAPI
SVGSVGElement_pauseAnimations(ISVGSVGElement
*iface
)
516 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
517 FIXME("(%p)\n", This
);
521 static HRESULT WINAPI
SVGSVGElement_unpauseAnimations(ISVGSVGElement
*iface
)
523 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
524 FIXME("(%p)\n", This
);
528 static HRESULT WINAPI
SVGSVGElement_animationsPaused(ISVGSVGElement
*iface
, VARIANT_BOOL
*p
)
530 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
531 FIXME("(%p)->(%p)\n", This
, p
);
535 static HRESULT WINAPI
SVGSVGElement_getCurrentTime(ISVGSVGElement
*iface
, float *p
)
537 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
538 FIXME("(%p)->(%p)\n", This
, p
);
542 static HRESULT WINAPI
SVGSVGElement_setCurrentTime(ISVGSVGElement
*iface
, float v
)
544 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
545 FIXME("(%p)->(%f)\n", This
, v
);
549 static HRESULT WINAPI
SVGSVGElement_getIntersectionList(ISVGSVGElement
*iface
, ISVGRect
*rect
,
550 ISVGElement
*reference_element
, VARIANT
*p
)
552 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
553 FIXME("(%p)->(%p %p %p)\n", This
, rect
, reference_element
, p
);
557 static HRESULT WINAPI
SVGSVGElement_getEnclosureList(ISVGSVGElement
*iface
, ISVGRect
*rect
,
558 ISVGElement
*reference_element
, VARIANT
*p
)
560 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
561 FIXME("(%p)->()\n", This
);
565 static HRESULT WINAPI
SVGSVGElement_checkIntersection(ISVGSVGElement
*iface
, ISVGElement
*element
,
566 ISVGRect
*rect
, VARIANT_BOOL
*p
)
568 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
569 FIXME("(%p)->(%p %p %p)\n", This
, element
, rect
, p
);
573 static HRESULT WINAPI
SVGSVGElement_checkEnclosure(ISVGSVGElement
*iface
, ISVGElement
*element
,
574 ISVGRect
*rect
, VARIANT_BOOL
*p
)
576 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
577 FIXME("(%p)->(%p %p %p)\n", This
, element
, rect
, p
);
581 static HRESULT WINAPI
SVGSVGElement_deselectAll(ISVGSVGElement
*iface
)
583 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
584 FIXME("(%p)\n", This
);
588 static HRESULT WINAPI
SVGSVGElement_createSVGNumber(ISVGSVGElement
*iface
, ISVGNumber
**p
)
590 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
591 FIXME("(%p)->(%p)\n", This
, p
);
595 static HRESULT WINAPI
SVGSVGElement_createSVGLength(ISVGSVGElement
*iface
, ISVGLength
**p
)
597 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
598 FIXME("(%p)->(%p)\n", This
, p
);
602 static HRESULT WINAPI
SVGSVGElement_createSVGAngle(ISVGSVGElement
*iface
, ISVGAngle
**p
)
604 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
605 FIXME("(%p)->(%p)\n", This
, p
);
609 static HRESULT WINAPI
SVGSVGElement_createSVGPoint(ISVGSVGElement
*iface
, ISVGPoint
**p
)
611 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
612 FIXME("(%p)->(%p)\n", This
, p
);
616 static HRESULT WINAPI
SVGSVGElement_createSVGMatrix(ISVGSVGElement
*iface
, ISVGMatrix
**p
)
618 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
619 FIXME("(%p)->(%p)\n", This
, p
);
623 static HRESULT WINAPI
SVGSVGElement_createSVGRect(ISVGSVGElement
*iface
, ISVGRect
**p
)
625 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
626 FIXME("(%p)->(%p)\n", This
, p
);
630 static HRESULT WINAPI
SVGSVGElement_createSVGTransform(ISVGSVGElement
*iface
, ISVGTransform
**p
)
632 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
633 FIXME("(%p)->(%p)\n", This
, p
);
637 static HRESULT WINAPI
SVGSVGElement_createSVGTransformFromMatrix(ISVGSVGElement
*iface
,
638 ISVGMatrix
*matrix
, ISVGTransform
**p
)
640 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
641 FIXME("(%p)->(%p %p)\n", This
, matrix
, p
);
645 static HRESULT WINAPI
SVGSVGElement_getElementById(ISVGSVGElement
*iface
, BSTR id
, IHTMLElement
**p
)
647 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
648 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(id
), p
);
652 static const ISVGSVGElementVtbl SVGSVGElementVtbl
= {
653 SVGSVGElement_QueryInterface
,
654 SVGSVGElement_AddRef
,
655 SVGSVGElement_Release
,
656 SVGSVGElement_GetTypeInfoCount
,
657 SVGSVGElement_GetTypeInfo
,
658 SVGSVGElement_GetIDsOfNames
,
659 SVGSVGElement_Invoke
,
660 SVGSVGElement_putref_x
,
662 SVGSVGElement_putref_y
,
664 SVGSVGElement_putref_width
,
665 SVGSVGElement_get_width
,
666 SVGSVGElement_putref_height
,
667 SVGSVGElement_get_height
,
668 SVGSVGElement_put_contentScriptType
,
669 SVGSVGElement_get_contentScriptType
,
670 SVGSVGElement_put_contentStyleType
,
671 SVGSVGElement_get_contentStyleType
,
672 SVGSVGElement_putref_viewport
,
673 SVGSVGElement_get_viewport
,
674 SVGSVGElement_put_pixelUnitToMillimeterX
,
675 SVGSVGElement_get_pixelUnitToMillimeterX
,
676 SVGSVGElement_put_pixelUnitToMillimeterY
,
677 SVGSVGElement_get_pixelUnitToMillimeterY
,
678 SVGSVGElement_put_screenPixelToMillimeterX
,
679 SVGSVGElement_get_screenPixelToMillimeterX
,
680 SVGSVGElement_put_screenPixelToMillimeterY
,
681 SVGSVGElement_get_screenPixelToMillimeterY
,
682 SVGSVGElement_put_useCurrentView
,
683 SVGSVGElement_get_useCurrentView
,
684 SVGSVGElement_putref_currentView
,
685 SVGSVGElement_get_currentView
,
686 SVGSVGElement_put_currentScale
,
687 SVGSVGElement_get_currentScale
,
688 SVGSVGElement_putref_currentTranslate
,
689 SVGSVGElement_get_currentTranslate
,
690 SVGSVGElement_suspendRedraw
,
691 SVGSVGElement_unsuspendRedraw
,
692 SVGSVGElement_unsuspendRedrawAll
,
693 SVGSVGElement_forceRedraw
,
694 SVGSVGElement_pauseAnimations
,
695 SVGSVGElement_unpauseAnimations
,
696 SVGSVGElement_animationsPaused
,
697 SVGSVGElement_getCurrentTime
,
698 SVGSVGElement_setCurrentTime
,
699 SVGSVGElement_getIntersectionList
,
700 SVGSVGElement_getEnclosureList
,
701 SVGSVGElement_checkIntersection
,
702 SVGSVGElement_checkEnclosure
,
703 SVGSVGElement_deselectAll
,
704 SVGSVGElement_createSVGNumber
,
705 SVGSVGElement_createSVGLength
,
706 SVGSVGElement_createSVGAngle
,
707 SVGSVGElement_createSVGPoint
,
708 SVGSVGElement_createSVGMatrix
,
709 SVGSVGElement_createSVGRect
,
710 SVGSVGElement_createSVGTransform
,
711 SVGSVGElement_createSVGTransformFromMatrix
,
712 SVGSVGElement_getElementById
715 static inline SVGSVGElement
*SVGSVGElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
717 return CONTAINING_RECORD(iface
, SVGSVGElement
, svg_element
.element
.node
);
720 static HRESULT
SVGSVGElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
722 SVGSVGElement
*This
= SVGSVGElement_from_HTMLDOMNode(iface
);
724 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
726 if(IsEqualGUID(&IID_ISVGSVGElement
, riid
))
727 *ppv
= &This
->ISVGSVGElement_iface
;
729 return SVGElement_QI(&This
->svg_element
.element
.node
, riid
, ppv
);
731 IUnknown_AddRef((IUnknown
*)*ppv
);
735 static const NodeImplVtbl SVGSVGElementImplVtbl
= {
736 .clsid
= &CLSID_SVGSVGElement
,
737 .qi
= SVGSVGElement_QI
,
738 .destructor
= HTMLElement_destructor
,
739 .cpc_entries
= HTMLElement_cpc
,
740 .clone
= HTMLElement_clone
,
741 .get_attr_col
= HTMLElement_get_attr_col
,
744 static HRESULT
create_viewport_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
748 ret
= calloc(1, sizeof(SVGSVGElement
));
750 return E_OUTOFMEMORY
;
752 ret
->ISVGSVGElement_iface
.lpVtbl
= &SVGSVGElementVtbl
;
753 ret
->svg_element
.element
.node
.vtbl
= &SVGSVGElementImplVtbl
;
755 init_svg_element(&ret
->svg_element
, doc
, nselem
);
757 *elem
= &ret
->svg_element
.element
;
761 struct SVGCircleElement
{
762 SVGElement svg_element
;
763 ISVGCircleElement ISVGCircleElement_iface
;
766 static inline SVGCircleElement
*impl_from_ISVGCircleElement(ISVGCircleElement
*iface
)
768 return CONTAINING_RECORD(iface
, SVGCircleElement
, ISVGCircleElement_iface
);
771 static HRESULT WINAPI
SVGCircleElement_QueryInterface(ISVGCircleElement
*iface
,
772 REFIID riid
, void **ppv
)
774 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
776 return IHTMLDOMNode_QueryInterface(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
779 static ULONG WINAPI
SVGCircleElement_AddRef(ISVGCircleElement
*iface
)
781 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
783 return IHTMLDOMNode_AddRef(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
);
786 static ULONG WINAPI
SVGCircleElement_Release(ISVGCircleElement
*iface
)
788 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
790 return IHTMLDOMNode_Release(&This
->svg_element
.element
.node
.IHTMLDOMNode_iface
);
793 static HRESULT WINAPI
SVGCircleElement_GetTypeInfoCount(ISVGCircleElement
*iface
, UINT
*pctinfo
)
795 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
796 return IDispatchEx_GetTypeInfoCount(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
799 static HRESULT WINAPI
SVGCircleElement_GetTypeInfo(ISVGCircleElement
*iface
, UINT iTInfo
,
800 LCID lcid
, ITypeInfo
**ppTInfo
)
802 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
803 return IDispatchEx_GetTypeInfo(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
807 static HRESULT WINAPI
SVGCircleElement_GetIDsOfNames(ISVGCircleElement
*iface
, REFIID riid
,
808 LPOLESTR
*rgszNames
, UINT cNames
,
809 LCID lcid
, DISPID
*rgDispId
)
811 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
812 return IDispatchEx_GetIDsOfNames(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
813 cNames
, lcid
, rgDispId
);
816 static HRESULT WINAPI
SVGCircleElement_Invoke(ISVGCircleElement
*iface
, DISPID dispIdMember
,
817 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
818 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
820 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
821 return IDispatchEx_Invoke(&This
->svg_element
.element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
822 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
825 static HRESULT WINAPI
SVGCircleElement_putref_cx(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
827 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
828 FIXME("(%p)->(%p)\n", This
, v
);
832 static HRESULT WINAPI
SVGCircleElement_get_cx(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
834 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
835 FIXME("(%p)->(%p)\n", This
, p
);
839 static HRESULT WINAPI
SVGCircleElement_putref_cy(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
841 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
842 FIXME("(%p)->(%p)\n", This
, v
);
846 static HRESULT WINAPI
SVGCircleElement_get_cy(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
848 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
849 FIXME("(%p)->(%p)\n", This
, p
);
853 static HRESULT WINAPI
SVGCircleElement_putref_r(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
855 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
856 FIXME("(%p)->(%p)\n", This
, v
);
860 static HRESULT WINAPI
SVGCircleElement_get_r(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
862 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
863 FIXME("(%p)->(%p)\n", This
, p
);
867 static const ISVGCircleElementVtbl SVGCircleElementVtbl
= {
868 SVGCircleElement_QueryInterface
,
869 SVGCircleElement_AddRef
,
870 SVGCircleElement_Release
,
871 SVGCircleElement_GetTypeInfoCount
,
872 SVGCircleElement_GetTypeInfo
,
873 SVGCircleElement_GetIDsOfNames
,
874 SVGCircleElement_Invoke
,
875 SVGCircleElement_putref_cx
,
876 SVGCircleElement_get_cx
,
877 SVGCircleElement_putref_cy
,
878 SVGCircleElement_get_cy
,
879 SVGCircleElement_putref_r
,
880 SVGCircleElement_get_r
883 static inline SVGCircleElement
*SVGCircleElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
885 return CONTAINING_RECORD(iface
, SVGCircleElement
, svg_element
.element
.node
);
888 static HRESULT
SVGCircleElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
890 SVGCircleElement
*This
= SVGCircleElement_from_HTMLDOMNode(iface
);
892 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
894 if(IsEqualGUID(&IID_ISVGCircleElement
, riid
))
895 *ppv
= &This
->ISVGCircleElement_iface
;
897 return SVGElement_QI(&This
->svg_element
.element
.node
, riid
, ppv
);
899 IUnknown_AddRef((IUnknown
*)*ppv
);
903 static const NodeImplVtbl SVGCircleElementImplVtbl
= {
904 .clsid
= &CLSID_SVGCircleElement
,
905 .qi
= SVGCircleElement_QI
,
906 .destructor
= HTMLElement_destructor
,
907 .cpc_entries
= HTMLElement_cpc
,
908 .clone
= HTMLElement_clone
,
909 .get_attr_col
= HTMLElement_get_attr_col
,
912 static HRESULT
create_circle_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
914 SVGCircleElement
*ret
;
916 ret
= calloc(1, sizeof(SVGCircleElement
));
918 return E_OUTOFMEMORY
;
920 ret
->ISVGCircleElement_iface
.lpVtbl
= &SVGCircleElementVtbl
;
921 ret
->svg_element
.element
.node
.vtbl
= &SVGCircleElementImplVtbl
;
923 init_svg_element(&ret
->svg_element
, doc
, nselem
);
925 *elem
= &ret
->svg_element
.element
;
930 ISVGTextContentElement ISVGTextContentElement_iface
;
931 SVGElement
*svg_element
;
932 } SVGTextContentElement
;
934 static inline SVGTextContentElement
*impl_from_ISVGTextContentElement(ISVGTextContentElement
*iface
)
936 return CONTAINING_RECORD(iface
, SVGTextContentElement
, ISVGTextContentElement_iface
);
939 static HRESULT WINAPI
SVGTextContentElement_QueryInterface(ISVGTextContentElement
*iface
,
940 REFIID riid
, void **ppv
)
942 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
943 return IHTMLDOMNode_QueryInterface(&This
->svg_element
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
946 static ULONG WINAPI
SVGTextContentElement_AddRef(ISVGTextContentElement
*iface
)
948 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
950 return IHTMLDOMNode_AddRef(&This
->svg_element
->element
.node
.IHTMLDOMNode_iface
);
953 static ULONG WINAPI
SVGTextContentElement_Release(ISVGTextContentElement
*iface
)
955 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
957 return IHTMLDOMNode_Release(&This
->svg_element
->element
.node
.IHTMLDOMNode_iface
);
960 static HRESULT WINAPI
SVGTextContentElement_GetTypeInfoCount(ISVGTextContentElement
*iface
, UINT
*pctinfo
)
962 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
963 return IDispatchEx_GetTypeInfoCount(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
966 static HRESULT WINAPI
SVGTextContentElement_GetTypeInfo(ISVGTextContentElement
*iface
, UINT iTInfo
,
967 LCID lcid
, ITypeInfo
**ppTInfo
)
969 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
970 return IDispatchEx_GetTypeInfo(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
974 static HRESULT WINAPI
SVGTextContentElement_GetIDsOfNames(ISVGTextContentElement
*iface
, REFIID riid
,
975 LPOLESTR
*rgszNames
, UINT cNames
,
976 LCID lcid
, DISPID
*rgDispId
)
978 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
979 return IDispatchEx_GetIDsOfNames(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
980 cNames
, lcid
, rgDispId
);
983 static HRESULT WINAPI
SVGTextContentElement_Invoke(ISVGTextContentElement
*iface
, DISPID dispIdMember
,
984 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
985 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
987 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
988 return IDispatchEx_Invoke(&This
->svg_element
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
989 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
992 static HRESULT WINAPI
SVGTextContentElement_putref_textLength(ISVGTextContentElement
*iface
, ISVGAnimatedLength
*v
)
994 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
995 FIXME("(%p)->(%p)\n", This
, v
);
999 static HRESULT WINAPI
SVGTextContentElement_get_textLength(ISVGTextContentElement
*iface
, ISVGAnimatedLength
**p
)
1001 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1002 FIXME("(%p)->(%p)\n", This
, p
);
1006 static HRESULT WINAPI
SVGTextContentElement_putref_lengthAdjust(ISVGTextContentElement
*iface
, ISVGAnimatedEnumeration
*v
)
1008 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1009 FIXME("(%p)->(%p)\n", This
, v
);
1013 static HRESULT WINAPI
SVGTextContentElement_get_lengthAdjust(ISVGTextContentElement
*iface
, ISVGAnimatedEnumeration
**p
)
1015 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1016 FIXME("(%p)->(%p)\n", This
, p
);
1020 static HRESULT WINAPI
SVGTextContentElement_getNumberOfChars(ISVGTextContentElement
*iface
, LONG
*p
)
1022 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1023 FIXME("(%p)->(%p)\n", This
, p
);
1027 static HRESULT WINAPI
SVGTextContentElement_getComputedTextLength(ISVGTextContentElement
*iface
, float *p
)
1029 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1030 FIXME("(%p)->(%p)\n", This
, p
);
1034 static HRESULT WINAPI
SVGTextContentElement_getSubStringLength(ISVGTextContentElement
*iface
,
1035 LONG charnum
, LONG nchars
, float *p
)
1037 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1038 FIXME("(%p)->(%ld %ld %p)\n", This
, charnum
, nchars
, p
);
1042 static HRESULT WINAPI
SVGTextContentElement_getStartPositionOfChar(ISVGTextContentElement
*iface
,
1043 LONG charnum
, ISVGPoint
**p
)
1045 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1046 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
1050 static HRESULT WINAPI
SVGTextContentElement_getEndPositionOfChar(ISVGTextContentElement
*iface
,
1051 LONG charnum
, ISVGPoint
**p
)
1053 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1054 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
1058 static HRESULT WINAPI
SVGTextContentElement_getExtentOfChar(ISVGTextContentElement
*iface
,
1059 LONG charnum
, ISVGRect
**p
)
1061 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1062 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
1066 static HRESULT WINAPI
SVGTextContentElement_getRotationOfChar(ISVGTextContentElement
*iface
,
1067 LONG charnum
, float *p
)
1069 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1070 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
1074 static HRESULT WINAPI
SVGTextContentElement_getCharNumAtPosition(ISVGTextContentElement
*iface
,
1075 ISVGPoint
*point
, LONG
*p
)
1077 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1078 FIXME("(%p)->(%p %p)\n", This
, point
, p
);
1082 static HRESULT WINAPI
SVGTextContentElement_selectSubString(ISVGTextContentElement
*iface
,
1083 LONG charnum
, LONG nchars
)
1085 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
1086 FIXME("(%p)->(%ld %ld)\n", This
, charnum
, nchars
);
1090 static const ISVGTextContentElementVtbl SVGTextContentElementVtbl
= {
1091 SVGTextContentElement_QueryInterface
,
1092 SVGTextContentElement_AddRef
,
1093 SVGTextContentElement_Release
,
1094 SVGTextContentElement_GetTypeInfoCount
,
1095 SVGTextContentElement_GetTypeInfo
,
1096 SVGTextContentElement_GetIDsOfNames
,
1097 SVGTextContentElement_Invoke
,
1098 SVGTextContentElement_putref_textLength
,
1099 SVGTextContentElement_get_textLength
,
1100 SVGTextContentElement_putref_lengthAdjust
,
1101 SVGTextContentElement_get_lengthAdjust
,
1102 SVGTextContentElement_getNumberOfChars
,
1103 SVGTextContentElement_getComputedTextLength
,
1104 SVGTextContentElement_getSubStringLength
,
1105 SVGTextContentElement_getStartPositionOfChar
,
1106 SVGTextContentElement_getEndPositionOfChar
,
1107 SVGTextContentElement_getExtentOfChar
,
1108 SVGTextContentElement_getRotationOfChar
,
1109 SVGTextContentElement_getCharNumAtPosition
,
1110 SVGTextContentElement_selectSubString
1113 static void init_text_content_element(SVGTextContentElement
*text_content
, SVGElement
*svg_element
)
1115 text_content
->ISVGTextContentElement_iface
.lpVtbl
= &SVGTextContentElementVtbl
;
1116 text_content
->svg_element
= svg_element
;
1119 struct SVGTSpanElement
{
1120 SVGElement svg_element
;
1121 SVGTextContentElement text_content
;
1124 static inline SVGTSpanElement
*SVGTSpanElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
1126 return CONTAINING_RECORD(iface
, SVGTSpanElement
, svg_element
.element
.node
);
1129 static HRESULT
SVGTSpanElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
1131 SVGTSpanElement
*This
= SVGTSpanElement_from_HTMLDOMNode(iface
);
1133 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
1135 if(IsEqualGUID(&IID_ISVGTSpanElement
, riid
))
1136 *ppv
= &This
->svg_element
.ISVGElement_iface
; /* no additional methods */
1137 else if(IsEqualGUID(&IID_ISVGTextContentElement
, riid
))
1138 *ppv
= &This
->text_content
.ISVGTextContentElement_iface
;
1140 return SVGElement_QI(&This
->svg_element
.element
.node
, riid
, ppv
);
1142 IUnknown_AddRef((IUnknown
*)*ppv
);
1146 static const NodeImplVtbl SVGTSpanElementImplVtbl
= {
1147 .clsid
= &CLSID_SVGTSpanElement
,
1148 .qi
= SVGTSpanElement_QI
,
1149 .destructor
= HTMLElement_destructor
,
1150 .cpc_entries
= HTMLElement_cpc
,
1151 .clone
= HTMLElement_clone
,
1152 .get_attr_col
= HTMLElement_get_attr_col
,
1155 static HRESULT
create_tspan_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
1157 SVGTSpanElement
*ret
;
1159 ret
= calloc(1, sizeof(SVGTSpanElement
));
1161 return E_OUTOFMEMORY
;
1163 ret
->svg_element
.element
.node
.vtbl
= &SVGTSpanElementImplVtbl
;
1164 init_text_content_element(&ret
->text_content
, &ret
->svg_element
);
1165 init_svg_element(&ret
->svg_element
, doc
, nselem
);
1167 *elem
= &ret
->svg_element
.element
;
1171 HRESULT
create_svg_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*dom_element
, const WCHAR
*tag_name
, HTMLElement
**elem
)
1173 SVGElement
*svg_element
;
1175 TRACE("%s\n", debugstr_w(tag_name
));
1177 if(!wcscmp(tag_name
, L
"svg"))
1178 return create_viewport_element(doc
, dom_element
, elem
);
1179 if(!wcscmp(tag_name
, L
"circle"))
1180 return create_circle_element(doc
, dom_element
, elem
);
1181 if(!wcscmp(tag_name
, L
"tspan"))
1182 return create_tspan_element(doc
, dom_element
, elem
);
1184 svg_element
= calloc(1, sizeof(*svg_element
));
1186 return E_OUTOFMEMORY
;
1188 init_svg_element(svg_element
, doc
, dom_element
);
1189 *elem
= &svg_element
->element
;