gdi32: Initialize font signature of "System" font link.
[wine] / dlls / mshtml / htmlcurstyle.c
1 /*
2  * Copyright 2008 Jacek Caban for CodeWeavers
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #include <stdarg.h>
20
21 #define COBJMACROS
22
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
27
28 #include "mshtml_private.h"
29 #include "htmlstyle.h"
30
31 #include "wine/debug.h"
32
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
34
35 struct HTMLCurrentStyle {
36     DispatchEx dispex;
37     IHTMLCurrentStyle  IHTMLCurrentStyle_iface;
38     IHTMLCurrentStyle2 IHTMLCurrentStyle2_iface;
39     IHTMLCurrentStyle3 IHTMLCurrentStyle3_iface;
40     IHTMLCurrentStyle4 IHTMLCurrentStyle4_iface;
41
42     LONG ref;
43
44     nsIDOMCSSStyleDeclaration *nsstyle;
45 };
46
47 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle *iface)
48 {
49     return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle_iface);
50 }
51
52 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle2(IHTMLCurrentStyle2 *iface)
53 {
54     return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle2_iface);
55 }
56
57 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle3(IHTMLCurrentStyle3 *iface)
58 {
59     return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle3_iface);
60 }
61
62 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle4(IHTMLCurrentStyle4 *iface)
63 {
64     return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle4_iface);
65 }
66
67 static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface, REFIID riid, void **ppv)
68 {
69     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
70
71     *ppv = NULL;
72
73     if(IsEqualGUID(&IID_IUnknown, riid)) {
74         TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
75         *ppv = &This->IHTMLCurrentStyle_iface;
76     }else if(IsEqualGUID(&IID_IHTMLCurrentStyle, riid)) {
77         TRACE("(%p)->(IID_IHTMLCurrentStyle %p)\n", This, ppv);
78         *ppv = &This->IHTMLCurrentStyle_iface;
79     }else if(IsEqualGUID(&IID_IHTMLCurrentStyle2, riid)) {
80         TRACE("(%p)->(IID_IHTMLCurrentStyle2 %p)\n", This, ppv);
81         *ppv = &This->IHTMLCurrentStyle2_iface;
82     }else if(IsEqualGUID(&IID_IHTMLCurrentStyle3, riid)) {
83         TRACE("(%p)->(IID_IHTMLCurrentStyle3 %p)\n", This, ppv);
84         *ppv = &This->IHTMLCurrentStyle3_iface;
85     }else if(IsEqualGUID(&IID_IHTMLCurrentStyle4, riid)) {
86         TRACE("(%p)->(IID_IHTMLCurrentStyle4 %p)\n", This, ppv);
87         *ppv = &This->IHTMLCurrentStyle4_iface;
88     }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
89         return *ppv ? S_OK : E_NOINTERFACE;
90     }
91
92     if(*ppv) {
93         IUnknown_AddRef((IUnknown*)*ppv);
94         return S_OK;
95     }
96
97     WARN("unsupported %s\n", debugstr_guid(riid));
98     return E_NOINTERFACE;
99 }
100
101 static ULONG WINAPI HTMLCurrentStyle_AddRef(IHTMLCurrentStyle *iface)
102 {
103     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
104     LONG ref = InterlockedIncrement(&This->ref);
105
106     TRACE("(%p) ref=%d\n", This, ref);
107
108     return ref;
109 }
110
111 static ULONG WINAPI HTMLCurrentStyle_Release(IHTMLCurrentStyle *iface)
112 {
113     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
114     LONG ref = InterlockedDecrement(&This->ref);
115
116     TRACE("(%p) ref=%d\n", This, ref);
117
118     if(!ref) {
119         if(This->nsstyle)
120             nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
121         release_dispex(&This->dispex);
122         heap_free(This);
123     }
124
125     return ref;
126 }
127
128 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle *iface, UINT *pctinfo)
129 {
130     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
131     return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
132 }
133
134 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle *iface, UINT iTInfo,
135         LCID lcid, ITypeInfo **ppTInfo)
136 {
137     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
138     return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
139 }
140
141 static HRESULT WINAPI HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle *iface, REFIID riid,
142         LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
143 {
144     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
145     return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
146             lcid, rgDispId);
147 }
148
149 static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID dispIdMember,
150         REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
151         VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
152 {
153     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
154     return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
155             wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
156 }
157
158 static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p)
159 {
160     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
161
162     TRACE("(%p)->(%p)\n", This, p);
163
164     return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p, 0);
165 }
166
167 static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
168 {
169     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
170     FIXME("(%p)->(%p)\n", This, p);
171     return E_NOTIMPL;
172 }
173
174 static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
175 {
176     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
177     TRACE("(%p)->(%p)\n", This, p);
178     return get_nsstyle_attr_var(This->nsstyle, STYLEID_COLOR, p, 0);
179 }
180
181 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
182 {
183     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
184     TRACE("(%p)->(%p)\n", This, p);
185     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_COLOR, p, 0);
186 }
187
188 static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
189 {
190     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
191
192     TRACE("(%p)->(%p)\n", This, p);
193
194     return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_FAMILY, p, 0);
195 }
196
197 static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
198 {
199     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
200     TRACE("(%p)->(%p)\n", This, p);
201     return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, p, 0);
202 }
203
204 static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
205 {
206     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
207     TRACE("(%p)->(%p)\n", This, p);
208     return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, p, 0);
209 }
210
211 static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
212 {
213     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
214     TRACE("(%p)->(%p)\n", This, p);
215     return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_WEIGHT, p, ATTR_STR_TO_INT);
216 }
217
218 static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
219 {
220     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
221     TRACE("(%p)->(%p)\n", This, p);
222     return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_SIZE, p, 0);
223 }
224
225 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
226 {
227     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
228     TRACE("(%p)->(%p)\n", This, p);
229     return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_IMAGE, p, 0);
230 }
231
232 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
233 {
234     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
235     FIXME("(%p)->(%p)\n", This, p);
236     return E_NOTIMPL;
237 }
238
239 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle *iface, VARIANT *p)
240 {
241     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
242     FIXME("(%p)->(%p)\n", This, p);
243     return E_NOTIMPL;
244 }
245
246 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *iface, BSTR *p)
247 {
248     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
249     TRACE("(%p)->(%p)\n", This, p);
250     return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_REPEAT, p, 0);
251 }
252
253 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
254 {
255     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
256     TRACE("(%p)->(%p)\n", This, p);
257     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_COLOR, p, 0);
258 }
259
260 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
261 {
262     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
263     TRACE("(%p)->(%p)\n", This, p);
264     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_COLOR, p, 0);
265 }
266
267 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
268 {
269     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
270     TRACE("(%p)->(%p)\n", This, p);
271     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_COLOR, p, 0);
272 }
273
274 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
275 {
276     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
277     TRACE("(%p)->(%p)\n", This, p);
278     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_COLOR, p, 0);
279 }
280
281 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
282 {
283     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
284     TRACE("(%p)->(%p)\n", This, p);
285     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_TOP_STYLE, p, 0);
286 }
287
288 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
289 {
290     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
291     TRACE("(%p)->(%p)\n", This, p);
292     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_RIGHT_STYLE, p, 0);
293 }
294
295 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
296 {
297     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
298     TRACE("(%p)->(%p)\n", This, p);
299     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_BOTTOM_STYLE, p, 0);
300 }
301
302 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
303 {
304     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
305     TRACE("(%p)->(%p)\n", This, p);
306     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_LEFT_STYLE, p, 0);
307 }
308
309 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
310 {
311     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
312     TRACE("(%p)->(%p)\n", This, p);
313     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
314 }
315
316 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
317 {
318     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
319     TRACE("(%p)->(%p)\n", This, p);
320     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
321 }
322
323 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
324 {
325     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
326     TRACE("(%p)->(%p)\n", This, p);
327     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
328 }
329
330 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
331 {
332     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
333     TRACE("(%p)->(%p)\n", This, p);
334     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
335 }
336
337 static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
338 {
339     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
340     TRACE("(%p)->(%p)\n", This, p);
341     return get_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, p, 0);
342 }
343
344 static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
345 {
346     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
347     TRACE("(%p)->(%p)\n", This, p);
348     return get_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, p, 0);
349 }
350
351 static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
352 {
353     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
354     TRACE("(%p)->(%p)\n", This, p);
355     return get_nsstyle_attr_var(This->nsstyle, STYLEID_WIDTH, p, 0);
356 }
357
358 static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
359 {
360     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
361     TRACE("(%p)->(%p)\n", This, p);
362     return get_nsstyle_attr_var(This->nsstyle, STYLEID_HEIGHT, p, 0);
363 }
364
365 static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
366 {
367     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
368     TRACE("(%p)->(%p)\n", This, p);
369     return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_LEFT, p, 0);
370 }
371
372 static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
373 {
374     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
375     TRACE("(%p)->(%p)\n", This, p);
376     return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_TOP, p, 0);
377 }
378
379 static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
380 {
381     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
382     TRACE("(%p)->(%p)\n", This, p);
383     return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_RIGHT, p, 0);
384 }
385
386 static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
387 {
388     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
389     TRACE("(%p)->(%p)\n", This, p);
390     return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_BOTTOM, p, 0);
391 }
392
393 static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
394 {
395     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
396     TRACE("(%p)->(%p)\n", This, p);
397     return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_ALIGN, p, 0);
398 }
399
400 static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
401 {
402     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
403     TRACE("(%p)->(%p)\n", This, p);
404     return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_DECORATION, p, 0);
405 }
406
407 static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
408 {
409     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
410
411     TRACE("(%p)->(%p)\n", This, p);
412
413     return get_nsstyle_attr(This->nsstyle, STYLEID_DISPLAY, p, 0);
414 }
415
416 static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p)
417 {
418     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
419
420     TRACE("(%p)->(%p)\n", This, p);
421
422     return get_nsstyle_attr(This->nsstyle, STYLEID_VISIBILITY, p, 0);
423 }
424
425 static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
426 {
427     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
428     TRACE("(%p)->(%p)\n", This, p);
429     return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
430 }
431
432 static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
433 {
434     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
435     TRACE("(%p)->(%p)\n", This, p);
436     return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
437 }
438
439 static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
440 {
441     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
442     TRACE("(%p)->(%p)\n", This, p);
443     return get_nsstyle_attr_var(This->nsstyle, STYLEID_LINE_HEIGHT, p, 0);
444 }
445
446 static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
447 {
448     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
449     TRACE("(%p)->(%p)\n", This, p);
450     return get_nsstyle_attr_var(This->nsstyle, STYLEID_TEXT_INDENT, p, 0);
451 }
452
453 static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
454 {
455     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
456     TRACE("(%p)->(%p)\n", This, p);
457     return get_nsstyle_attr_var(This->nsstyle, STYLEID_VERTICAL_ALIGN, p, 0);
458 }
459
460 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
461 {
462     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
463     FIXME("(%p)->(%p)\n", This, p);
464     return E_NOTIMPL;
465 }
466
467 static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, VARIANT *p)
468 {
469     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
470     TRACE("(%p)->(%p)\n", This, p);
471     return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_TOP, p, 0);
472 }
473
474 static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
475 {
476     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
477     TRACE("(%p)->(%p)\n", This, p);
478     return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
479 }
480
481 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
482 {
483     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
484     TRACE("(%p)->(%p)\n", This, p);
485     return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_BOTTOM, p, 0);
486 }
487
488 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
489 {
490     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
491     TRACE("(%p)->(%p)\n", This, p);
492     return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
493 }
494
495 static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
496 {
497     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
498     FIXME("(%p)->(%p)\n", This, p);
499     return E_NOTIMPL;
500 }
501
502 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle *iface, BSTR *p)
503 {
504     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
505     FIXME("(%p)->(%p)\n", This, p);
506     return E_NOTIMPL;
507 }
508
509 static HRESULT WINAPI HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle *iface, BSTR *p)
510 {
511     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
512     FIXME("(%p)->(%p)\n", This, p);
513     return E_NOTIMPL;
514 }
515
516 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle *iface, BSTR *p)
517 {
518     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
519     FIXME("(%p)->(%p)\n", This, p);
520     return E_NOTIMPL;
521 }
522
523 static HRESULT WINAPI HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle *iface, VARIANT *p)
524 {
525     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
526     FIXME("(%p)->(%p)\n", This, p);
527     return E_NOTIMPL;
528 }
529
530 static HRESULT WINAPI HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle *iface, VARIANT *p)
531 {
532     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
533     FIXME("(%p)->(%p)\n", This, p);
534     return E_NOTIMPL;
535 }
536
537 static HRESULT WINAPI HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle *iface, VARIANT *p)
538 {
539     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
540     FIXME("(%p)->(%p)\n", This, p);
541     return E_NOTIMPL;
542 }
543
544 static HRESULT WINAPI HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle *iface, VARIANT *p)
545 {
546     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
547     FIXME("(%p)->(%p)\n", This, p);
548     return E_NOTIMPL;
549 }
550
551 static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BSTR *p)
552 {
553     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
554     TRACE("(%p)->(%p)\n", This, p);
555     return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, p, 0);
556 }
557
558 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
559 {
560     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
561     FIXME("(%p)->(%p)\n", This, p);
562     return E_NOTIMPL;
563 }
564
565 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *iface, BSTR *p)
566 {
567     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
568     FIXME("(%p)->(%p)\n", This, p);
569     return E_NOTIMPL;
570 }
571
572 static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
573 {
574     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
575     TRACE("(%p)->(%p)\n", This, p);
576     return get_nsstyle_attr(This->nsstyle, STYLEID_CURSOR, p, 0);
577 }
578
579 static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
580 {
581     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
582     FIXME("(%p)->(%p)\n", This, p);
583     return E_NOTIMPL;
584 }
585
586 static HRESULT WINAPI HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle *iface, BSTR *p)
587 {
588     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
589     FIXME("(%p)->(%p)\n", This, p);
590     return E_NOTIMPL;
591 }
592
593 static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, BSTR *p)
594 {
595     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
596     FIXME("(%p)->(%p)\n", This, p);
597     return E_NOTIMPL;
598 }
599
600 static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
601 {
602     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
603     FIXME("(%p)->(%p)\n", This, p);
604     return E_NOTIMPL;
605 }
606
607 static HRESULT WINAPI HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle *iface, BSTR strAttributeName,
608         LONG lFlags, VARIANT *AttributeValue)
609 {
610     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
611     FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(strAttributeName), lFlags, AttributeValue);
612     return E_NOTIMPL;
613 }
614
615 static HRESULT WINAPI HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle *iface, BSTR *p)
616 {
617     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
618     FIXME("(%p)->(%p)\n", This, p);
619     return E_NOTIMPL;
620 }
621
622 static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIANT *p)
623 {
624     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
625     TRACE("(%p)->(%p)\n", This, p);
626     return get_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, p, 0);
627 }
628
629 static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
630 {
631     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
632     TRACE("(%p)->(%p)\n", This, p);
633     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BOTTOM, p, 0);
634 }
635
636 static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
637 {
638     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
639     FIXME("(%p)->(%p)\n", This, p);
640     return E_NOTIMPL;
641 }
642
643 static HRESULT WINAPI HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle *iface, BSTR *p)
644 {
645     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
646     FIXME("(%p)->(%p)\n", This, p);
647     return E_NOTIMPL;
648 }
649
650 static HRESULT WINAPI HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle *iface, BSTR *p)
651 {
652     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
653     FIXME("(%p)->(%p)\n", This, p);
654     return E_NOTIMPL;
655 }
656
657 static HRESULT WINAPI HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle *iface, BSTR *p)
658 {
659     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
660     FIXME("(%p)->(%p)\n", This, p);
661     return E_NOTIMPL;
662 }
663
664 static HRESULT WINAPI HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle *iface, BSTR *p)
665 {
666     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
667     FIXME("(%p)->(%p)\n", This, p);
668     return E_NOTIMPL;
669 }
670
671 static HRESULT WINAPI HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle *iface, BSTR *p)
672 {
673     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
674     FIXME("(%p)->(%p)\n", This, p);
675     return E_NOTIMPL;
676 }
677
678 static HRESULT WINAPI HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle *iface, BSTR *p)
679 {
680     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
681     FIXME("(%p)->(%p)\n", This, p);
682     return E_NOTIMPL;
683 }
684
685 static HRESULT WINAPI HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle *iface, BSTR *p)
686 {
687     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
688     FIXME("(%p)->(%p)\n", This, p);
689     return E_NOTIMPL;
690 }
691
692 static HRESULT WINAPI HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle *iface, BSTR *p)
693 {
694     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
695     FIXME("(%p)->(%p)\n", This, p);
696     return E_NOTIMPL;
697 }
698
699 static HRESULT WINAPI HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle *iface, VARIANT *p)
700 {
701     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
702     FIXME("(%p)->(%p)\n", This, p);
703     return E_NOTIMPL;
704 }
705
706 static HRESULT WINAPI HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle *iface, BSTR *p)
707 {
708     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
709     FIXME("(%p)->(%p)\n", This, p);
710     return E_NOTIMPL;
711 }
712
713 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle *iface, VARIANT *p)
714 {
715     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
716     FIXME("(%p)->(%p)\n", This, p);
717     return E_NOTIMPL;
718 }
719
720 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle *iface, VARIANT *p)
721 {
722     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
723     FIXME("(%p)->(%p)\n", This, p);
724     return E_NOTIMPL;
725 }
726
727 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle *iface, BSTR *p)
728 {
729     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
730     FIXME("(%p)->(%p)\n", This, p);
731     return E_NOTIMPL;
732 }
733
734 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle *iface, BSTR *p)
735 {
736     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
737     FIXME("(%p)->(%p)\n", This, p);
738     return E_NOTIMPL;
739 }
740
741 static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, BSTR *p)
742 {
743     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
744     TRACE("(%p)->(%p)\n", This, p);
745     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, p, 0);
746 }
747
748 static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
749 {
750     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
751     TRACE("(%p)->(%p)\n", This, p);
752     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_COLOR, p, 0);
753 }
754
755 static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
756 {
757     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
758     TRACE("(%p)->(%p)\n", This, p);
759     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_WIDTH, p, 0);
760 }
761
762 static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
763 {
764     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
765     TRACE("(%p)->(%p)\n", This, p);
766     return get_nsstyle_attr(This->nsstyle, STYLEID_PADDING, p, 0);
767 }
768
769 static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
770 {
771     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
772     TRACE("(%p)->(%p)\n", This, p);
773     return get_nsstyle_attr(This->nsstyle, STYLEID_MARGIN, p, 0);
774 }
775
776 static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
777 {
778     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
779     FIXME("(%p)->(%p)\n", This, p);
780     return E_NOTIMPL;
781 }
782
783 static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, BSTR *p)
784 {
785     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
786     FIXME("(%p)->(%p)\n", This, p);
787     return E_NOTIMPL;
788 }
789
790 static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
791 {
792     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
793     FIXME("(%p)->(%p)\n", This, p);
794     return E_NOTIMPL;
795 }
796
797 static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
798 {
799     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
800     FIXME("(%p)->(%p)\n", This, p);
801     return E_NOTIMPL;
802 }
803
804 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
805     HTMLCurrentStyle_QueryInterface,
806     HTMLCurrentStyle_AddRef,
807     HTMLCurrentStyle_Release,
808     HTMLCurrentStyle_GetTypeInfoCount,
809     HTMLCurrentStyle_GetTypeInfo,
810     HTMLCurrentStyle_GetIDsOfNames,
811     HTMLCurrentStyle_Invoke,
812     HTMLCurrentStyle_get_position,
813     HTMLCurrentStyle_get_styleFloat,
814     HTMLCurrentStyle_get_color,
815     HTMLCurrentStyle_get_backgroundColor,
816     HTMLCurrentStyle_get_fontFamily,
817     HTMLCurrentStyle_get_fontStyle,
818     HTMLCurrentStyle_get_fontVariant,
819     HTMLCurrentStyle_get_fontWeight,
820     HTMLCurrentStyle_get_fontSize,
821     HTMLCurrentStyle_get_backgroundImage,
822     HTMLCurrentStyle_get_backgroundPositionX,
823     HTMLCurrentStyle_get_backgroundPositionY,
824     HTMLCurrentStyle_get_backgroundRepeat,
825     HTMLCurrentStyle_get_borderLeftColor,
826     HTMLCurrentStyle_get_borderTopColor,
827     HTMLCurrentStyle_get_borderRightColor,
828     HTMLCurrentStyle_get_borderBottomColor,
829     HTMLCurrentStyle_get_borderTopStyle,
830     HTMLCurrentStyle_get_borderRightStyle,
831     HTMLCurrentStyle_get_borderBottomStyle,
832     HTMLCurrentStyle_get_borderLeftStyle,
833     HTMLCurrentStyle_get_borderTopWidth,
834     HTMLCurrentStyle_get_borderRightWidth,
835     HTMLCurrentStyle_get_borderBottomWidth,
836     HTMLCurrentStyle_get_borderLeftWidth,
837     HTMLCurrentStyle_get_left,
838     HTMLCurrentStyle_get_top,
839     HTMLCurrentStyle_get_width,
840     HTMLCurrentStyle_get_height,
841     HTMLCurrentStyle_get_paddingLeft,
842     HTMLCurrentStyle_get_paddingTop,
843     HTMLCurrentStyle_get_paddingRight,
844     HTMLCurrentStyle_get_paddingBottom,
845     HTMLCurrentStyle_get_textAlign,
846     HTMLCurrentStyle_get_textDecoration,
847     HTMLCurrentStyle_get_display,
848     HTMLCurrentStyle_get_visibility,
849     HTMLCurrentStyle_get_zIndex,
850     HTMLCurrentStyle_get_letterSpacing,
851     HTMLCurrentStyle_get_lineHeight,
852     HTMLCurrentStyle_get_textIndent,
853     HTMLCurrentStyle_get_verticalAlign,
854     HTMLCurrentStyle_get_backgroundAttachment,
855     HTMLCurrentStyle_get_marginTop,
856     HTMLCurrentStyle_get_marginRight,
857     HTMLCurrentStyle_get_marginBottom,
858     HTMLCurrentStyle_get_marginLeft,
859     HTMLCurrentStyle_get_clear,
860     HTMLCurrentStyle_get_listStyleType,
861     HTMLCurrentStyle_get_listStylePosition,
862     HTMLCurrentStyle_get_listStyleImage,
863     HTMLCurrentStyle_get_clipTop,
864     HTMLCurrentStyle_get_clipRight,
865     HTMLCurrentStyle_get_clipBottom,
866     HTMLCurrentStyle_get_clipLeft,
867     HTMLCurrentStyle_get_overflow,
868     HTMLCurrentStyle_get_pageBreakBefore,
869     HTMLCurrentStyle_get_pageBreakAfter,
870     HTMLCurrentStyle_get_cursor,
871     HTMLCurrentStyle_get_tableLayout,
872     HTMLCurrentStyle_get_borderCollapse,
873     HTMLCurrentStyle_get_direction,
874     HTMLCurrentStyle_get_behavior,
875     HTMLCurrentStyle_getAttribute,
876     HTMLCurrentStyle_get_unicodeBidi,
877     HTMLCurrentStyle_get_right,
878     HTMLCurrentStyle_get_bottom,
879     HTMLCurrentStyle_get_imeMode,
880     HTMLCurrentStyle_get_rubyAlign,
881     HTMLCurrentStyle_get_rubyPosition,
882     HTMLCurrentStyle_get_rubyOverhang,
883     HTMLCurrentStyle_get_textAutospace,
884     HTMLCurrentStyle_get_lineBreak,
885     HTMLCurrentStyle_get_wordBreak,
886     HTMLCurrentStyle_get_textJustify,
887     HTMLCurrentStyle_get_textJustifyTrim,
888     HTMLCurrentStyle_get_textKashida,
889     HTMLCurrentStyle_get_blockDirection,
890     HTMLCurrentStyle_get_layoutGridChar,
891     HTMLCurrentStyle_get_layoutGridLine,
892     HTMLCurrentStyle_get_layoutGridMode,
893     HTMLCurrentStyle_get_layoutGridType,
894     HTMLCurrentStyle_get_borderStyle,
895     HTMLCurrentStyle_get_borderColor,
896     HTMLCurrentStyle_get_borderWidth,
897     HTMLCurrentStyle_get_padding,
898     HTMLCurrentStyle_get_margin,
899     HTMLCurrentStyle_get_accelerator,
900     HTMLCurrentStyle_get_overflowX,
901     HTMLCurrentStyle_get_overflowY,
902     HTMLCurrentStyle_get_textTransform
903 };
904
905 /* IHTMLCurrentStyle2 */
906 static HRESULT WINAPI HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2 *iface, REFIID riid, void **ppv)
907 {
908    HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
909
910    return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
911 }
912
913 static ULONG WINAPI HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2 *iface)
914 {
915     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
916
917     return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
918 }
919
920 static ULONG WINAPI HTMLCurrentStyle2_Release(IHTMLCurrentStyle2 *iface)
921 {
922     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
923     return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
924 }
925
926 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2 *iface, UINT *pctinfo)
927 {
928     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
929     return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
930 }
931
932 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2 *iface, UINT iTInfo,
933         LCID lcid, ITypeInfo **ppTInfo)
934 {
935     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
936     return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
937 }
938
939 static HRESULT WINAPI HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2 *iface, REFIID riid,
940         LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
941 {
942     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
943     return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
944             lcid, rgDispId);
945 }
946
947 static HRESULT WINAPI HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2 *iface, DISPID dispIdMember,
948         REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
949         VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
950 {
951     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
952     return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
953             wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
954 }
955
956 static HRESULT WINAPI HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2 *iface, BSTR *p)
957 {
958     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
959     FIXME("(%p)->(%p)\n", This, p);
960     return E_NOTIMPL;
961 }
962
963 static HRESULT WINAPI HTMLCurrentStyle2_get_wordWrap(IHTMLCurrentStyle2 *iface, BSTR *p)
964 {
965     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
966     FIXME("(%p)->(%p)\n", This, p);
967     return E_NOTIMPL;
968 }
969
970 static HRESULT WINAPI HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentStyle2 *iface, BSTR *p)
971 {
972     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
973     FIXME("(%p)->(%p)\n", This, p);
974     return E_NOTIMPL;
975 }
976
977 static HRESULT WINAPI HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
978 {
979     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
980     FIXME("(%p)->(%p)\n", This, p);
981     return E_NOTIMPL;
982 }
983
984 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
985 {
986     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
987     FIXME("(%p)->(%p)\n", This, p);
988     return E_NOTIMPL;
989 }
990
991 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarFaceColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
992 {
993     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
994     FIXME("(%p)->(%p)\n", This, p);
995     return E_NOTIMPL;
996 }
997
998 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbar3dLightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
999 {
1000     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1001     FIXME("(%p)->(%p)\n", This, p);
1002     return E_NOTIMPL;
1003 }
1004
1005 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1006 {
1007     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1008     FIXME("(%p)->(%p)\n", This, p);
1009     return E_NOTIMPL;
1010 }
1011
1012 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarHighlightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1013 {
1014     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1015     FIXME("(%p)->(%p)\n", This, p);
1016     return E_NOTIMPL;
1017 }
1018
1019 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarDarkShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1020 {
1021     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1022     FIXME("(%p)->(%p)\n", This, p);
1023     return E_NOTIMPL;
1024 }
1025
1026 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarArrowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1027 {
1028     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1029     FIXME("(%p)->(%p)\n", This, p);
1030     return E_NOTIMPL;
1031 }
1032
1033 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarTrackColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1034 {
1035     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1036     FIXME("(%p)->(%p)\n", This, p);
1037     return E_NOTIMPL;
1038 }
1039
1040 static HRESULT WINAPI HTMLCurrentStyle2_get_writingMode(IHTMLCurrentStyle2 *iface, BSTR *p)
1041 {
1042     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1043     FIXME("(%p)->(%p)\n", This, p);
1044     return E_NOTIMPL;
1045 }
1046
1047 static HRESULT WINAPI HTMLCurrentStyle2_get_zoom(IHTMLCurrentStyle2 *iface, VARIANT *p)
1048 {
1049     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1050     FIXME("(%p)->(%p)\n", This, p);
1051     return E_NOTIMPL;
1052 }
1053
1054 static HRESULT WINAPI HTMLCurrentStyle2_get_filter(IHTMLCurrentStyle2 *iface, BSTR *p)
1055 {
1056     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1057     FIXME("(%p)->(%p)\n", This, p);
1058     return E_NOTIMPL;
1059 }
1060
1061 static HRESULT WINAPI HTMLCurrentStyle2_get_textAlignLast(IHTMLCurrentStyle2 *iface, BSTR *p)
1062 {
1063     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1064     FIXME("(%p)->(%p)\n", This, p);
1065     return E_NOTIMPL;
1066 }
1067
1068 static HRESULT WINAPI HTMLCurrentStyle2_get_textKashidaSpace(IHTMLCurrentStyle2 *iface, VARIANT *p)
1069 {
1070     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1071     FIXME("(%p)->(%p)\n", This, p);
1072     return E_NOTIMPL;
1073 }
1074
1075 static HRESULT WINAPI HTMLCurrentStyle2_get_isBlock(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
1076 {
1077     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1078     FIXME("(%p)->(%p)\n", This, p);
1079     return E_NOTIMPL;
1080 }
1081
1082 static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl = {
1083     HTMLCurrentStyle2_QueryInterface,
1084     HTMLCurrentStyle2_AddRef,
1085     HTMLCurrentStyle2_Release,
1086     HTMLCurrentStyle2_GetTypeInfoCount,
1087     HTMLCurrentStyle2_GetTypeInfo,
1088     HTMLCurrentStyle2_GetIDsOfNames,
1089     HTMLCurrentStyle2_Invoke,
1090     HTMLCurrentStyle2_get_layoutFlow,
1091     HTMLCurrentStyle2_get_wordWrap,
1092     HTMLCurrentStyle2_get_textUnderlinePosition,
1093     HTMLCurrentStyle2_get_hasLayout,
1094     HTMLCurrentStyle2_get_scrollbarBaseColor,
1095     HTMLCurrentStyle2_get_scrollbarFaceColor,
1096     HTMLCurrentStyle2_get_scrollbar3dLightColor,
1097     HTMLCurrentStyle2_get_scrollbarShadowColor,
1098     HTMLCurrentStyle2_get_scrollbarHighlightColor,
1099     HTMLCurrentStyle2_get_scrollbarDarkShadowColor,
1100     HTMLCurrentStyle2_get_scrollbarArrowColor,
1101     HTMLCurrentStyle2_get_scrollbarTrackColor,
1102     HTMLCurrentStyle2_get_writingMode,
1103     HTMLCurrentStyle2_get_zoom,
1104     HTMLCurrentStyle2_get_filter,
1105     HTMLCurrentStyle2_get_textAlignLast,
1106     HTMLCurrentStyle2_get_textKashidaSpace,
1107     HTMLCurrentStyle2_get_isBlock
1108 };
1109
1110 /* IHTMLCurrentStyle3 */
1111 static HRESULT WINAPI HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3 *iface, REFIID riid, void **ppv)
1112 {
1113    HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1114
1115    return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1116 }
1117
1118 static ULONG WINAPI HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3 *iface)
1119 {
1120     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1121
1122     return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1123 }
1124
1125 static ULONG WINAPI HTMLCurrentStyle3_Release(IHTMLCurrentStyle3 *iface)
1126 {
1127     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1128     return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1129 }
1130
1131 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3 *iface, UINT *pctinfo)
1132 {
1133     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1134     return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
1135 }
1136
1137 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3 *iface, UINT iTInfo,
1138         LCID lcid, ITypeInfo **ppTInfo)
1139 {
1140     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1141     return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1142 }
1143
1144 static HRESULT WINAPI HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3 *iface, REFIID riid,
1145         LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1146 {
1147     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1148     return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1149             lcid, rgDispId);
1150 }
1151
1152 static HRESULT WINAPI HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3 *iface, DISPID dispIdMember,
1153         REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1154         VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1155 {
1156     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1157     return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1158             wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1159 }
1160
1161 static HRESULT WINAPI HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3 *iface, BSTR *p)
1162 {
1163     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1164     FIXME("(%p)->(%p)\n", This, p);
1165     return E_NOTIMPL;
1166 }
1167
1168 static HRESULT WINAPI HTMLCurrentStyle3_get_minHeight(IHTMLCurrentStyle3 *iface, VARIANT *p)
1169 {
1170     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1171     FIXME("(%p)->(%p)\n", This, p);
1172     return E_NOTIMPL;
1173 }
1174
1175 static HRESULT WINAPI HTMLCurrentStyle3_get_wordSpacing(IHTMLCurrentStyle3 *iface, VARIANT *p)
1176 {
1177     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1178     FIXME("(%p)->(%p)\n", This, p);
1179     return E_NOTIMPL;
1180 }
1181
1182 static HRESULT WINAPI HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3 *iface, BSTR *p)
1183 {
1184     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1185     FIXME("(%p)->(%p)\n", This, p);
1186     return E_NOTIMPL;
1187 }
1188
1189 static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl = {
1190     HTMLCurrentStyle3_QueryInterface,
1191     HTMLCurrentStyle3_AddRef,
1192     HTMLCurrentStyle3_Release,
1193     HTMLCurrentStyle3_GetTypeInfoCount,
1194     HTMLCurrentStyle3_GetTypeInfo,
1195     HTMLCurrentStyle3_GetIDsOfNames,
1196     HTMLCurrentStyle3_Invoke,
1197     HTMLCurrentStyle3_get_textOverflow,
1198     HTMLCurrentStyle3_get_minHeight,
1199     HTMLCurrentStyle3_get_wordSpacing,
1200     HTMLCurrentStyle3_get_whiteSpace
1201 };
1202
1203 /* IHTMLCurrentStyle4 */
1204 static HRESULT WINAPI HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4 *iface, REFIID riid, void **ppv)
1205 {
1206    HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1207
1208    return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1209 }
1210
1211 static ULONG WINAPI HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4 *iface)
1212 {
1213     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1214
1215     return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1216 }
1217
1218 static ULONG WINAPI HTMLCurrentStyle4_Release(IHTMLCurrentStyle4 *iface)
1219 {
1220     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1221     return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1222 }
1223
1224 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4 *iface, UINT *pctinfo)
1225 {
1226     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1227     return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
1228 }
1229
1230 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4 *iface, UINT iTInfo,
1231         LCID lcid, ITypeInfo **ppTInfo)
1232 {
1233     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1234     return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1235 }
1236
1237 static HRESULT WINAPI HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4 *iface, REFIID riid,
1238         LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1239 {
1240     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1241     return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1242             lcid, rgDispId);
1243 }
1244
1245 static HRESULT WINAPI HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4 *iface, DISPID dispIdMember,
1246         REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1247         VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1248 {
1249     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1250     return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1251             wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1252 }
1253
1254 static HRESULT WINAPI HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4 *iface, BSTR *p)
1255 {
1256     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1257     FIXME("(%p)->(%p)\n", This, p);
1258     return E_NOTIMPL;
1259 }
1260
1261 static HRESULT WINAPI HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4 *iface, VARIANT *p)
1262 {
1263     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1264     FIXME("(%p)->(%p)\n", This, p);
1265     return E_NOTIMPL;
1266 }
1267
1268 static HRESULT WINAPI HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1269 {
1270     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1271     FIXME("(%p)->(%p)\n", This, p);
1272     return E_NOTIMPL;
1273 }
1274
1275 static HRESULT WINAPI HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1276 {
1277     HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1278     FIXME("(%p)->(%p)\n", This, p);
1279     return E_NOTIMPL;
1280 }
1281
1282 static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl = {
1283     HTMLCurrentStyle4_QueryInterface,
1284     HTMLCurrentStyle4_AddRef,
1285     HTMLCurrentStyle4_Release,
1286     HTMLCurrentStyle4_GetTypeInfoCount,
1287     HTMLCurrentStyle4_GetTypeInfo,
1288     HTMLCurrentStyle4_GetIDsOfNames,
1289     HTMLCurrentStyle4_Invoke,
1290     HTMLCurrentStyle4_msInterpolationMode,
1291     HTMLCurrentStyle4_get_maxHeight,
1292     HTMLCurrentStyle4_get_minWidth,
1293     HTMLCurrentStyle4_get_maxWidth
1294 };
1295
1296 static const tid_t HTMLCurrentStyle_iface_tids[] = {
1297     IHTMLCurrentStyle_tid,
1298     IHTMLCurrentStyle2_tid,
1299     IHTMLCurrentStyle3_tid,
1300     IHTMLCurrentStyle4_tid,
1301     0
1302 };
1303 static dispex_static_data_t HTMLCurrentStyle_dispex = {
1304     NULL,
1305     DispHTMLCurrentStyle_tid,
1306     NULL,
1307     HTMLCurrentStyle_iface_tids
1308 };
1309
1310 HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
1311 {
1312     nsIDOMCSSStyleDeclaration *nsstyle;
1313     nsIDOMWindow *nsview;
1314     nsAString nsempty_str;
1315     HTMLCurrentStyle *ret;
1316     nsresult nsres;
1317
1318     if(!elem->node.doc->nsdoc)  {
1319         WARN("NULL nsdoc\n");
1320         return E_UNEXPECTED;
1321     }
1322
1323     nsres = nsIDOMHTMLDocument_GetDefaultView(elem->node.doc->nsdoc, &nsview);
1324     if(NS_FAILED(nsres)) {
1325         ERR("GetDefaultView failed: %08x\n", nsres);
1326         return E_FAIL;
1327     }
1328
1329     nsAString_Init(&nsempty_str, NULL);
1330     nsres = nsIDOMWindow_GetComputedStyle(nsview, (nsIDOMElement*)elem->nselem, &nsempty_str, &nsstyle);
1331     nsAString_Finish(&nsempty_str);
1332     if(NS_FAILED(nsres)) {
1333         ERR("GetComputedStyle failed: %08x\n", nsres);
1334         return E_FAIL;
1335     }
1336
1337     ret = heap_alloc_zero(sizeof(HTMLCurrentStyle));
1338     if(!ret) {
1339         nsIDOMCSSStyleDeclaration_Release(nsstyle);
1340         return E_OUTOFMEMORY;
1341     }
1342
1343     ret->IHTMLCurrentStyle_iface.lpVtbl  = &HTMLCurrentStyleVtbl;
1344     ret->IHTMLCurrentStyle2_iface.lpVtbl = &HTMLCurrentStyle2Vtbl;
1345     ret->IHTMLCurrentStyle3_iface.lpVtbl = &HTMLCurrentStyle3Vtbl;
1346     ret->IHTMLCurrentStyle4_iface.lpVtbl = &HTMLCurrentStyle4Vtbl;
1347     ret->ref = 1;
1348     ret->nsstyle = nsstyle;
1349
1350     init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLCurrentStyle_iface,  &HTMLCurrentStyle_dispex);
1351
1352     *p = &ret->IHTMLCurrentStyle_iface;
1353     return S_OK;
1354 }