jscript: Optimize GetDispID usage.
[wine] / dlls / mshtml / htmlstyle.c
1 /*
2  * Copyright 2006 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 "wine/debug.h"
29 #include "wine/unicode.h"
30
31 #include "mshtml_private.h"
32
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
34
35 typedef struct {
36     DispatchEx dispex;
37     const IHTMLStyleVtbl *lpHTMLStyleVtbl;
38
39     LONG ref;
40
41     nsIDOMCSSStyleDeclaration *nsstyle;
42 } HTMLStyle;
43
44 #define HTMLSTYLE(x)  ((IHTMLStyle*) &(x)->lpHTMLStyleVtbl)
45
46 static const WCHAR attrBackground[] =
47     {'b','a','c','k','g','r','o','u','n','d',0};
48 static const WCHAR attrBackgroundColor[] =
49     {'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0};
50 static const WCHAR attrBackgroundImage[] =
51     {'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e',0};
52 static const WCHAR attrBorderLeft[] =
53     {'b','o','r','d','e','r','-','l','e','f','t',0};
54 static const WCHAR attrColor[] =
55     {'c','o','l','o','r',0};
56 static const WCHAR attrDisplay[] =
57     {'d','i','s','p','l','a','y',0};
58 static const WCHAR attrFontFamily[] =
59     {'f','o','n','t','-','f','a','m','i','l','y',0};
60 static const WCHAR attrFontSize[] =
61     {'f','o','n','t','-','s','i','z','e',0};
62 static const WCHAR attrFontStyle[] =
63     {'f','o','n','t','-','s','t','y','l','e',0};
64 static const WCHAR attrFontWeight[] =
65     {'f','o','n','t','-','w','e','i','g','h','t',0};
66 static const WCHAR attrMargin[] =
67     {'m','a','r','g','i','n',0};
68 static const WCHAR attrMarginLeft[] =
69     {'m','a','r','g','i','n','-','l','e','f','t',0};
70 static const WCHAR attrMarginRight[] =
71     {'m','a','r','g','i','n','-','r','i','g','h','t',0};
72 static const WCHAR attrPaddingLeft[] =
73     {'p','a','d','d','i','n','g','-','l','e','f','t',0};
74 static const WCHAR attrTextDecoration[] =
75     {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
76 static const WCHAR attrVisibility[] =
77     {'v','i','s','i','b','i','l','i','t','y',0};
78 static const WCHAR attrWidth[] =
79     {'w','i','d','t','h',0};
80
81 static const WCHAR valLineThrough[] =
82     {'l','i','n','e','-','t','h','r','o','u','g','h',0};
83 static const WCHAR valUnderline[] =
84     {'u','n','d','e','r','l','i','n','e',0};
85
86 static const WCHAR px_formatW[] = {'%','d','p','x',0};
87 static const WCHAR emptyW[] = {0};
88
89 static LPWSTR fix_px_value(LPCWSTR val)
90 {
91     LPCWSTR ptr = val;
92
93     while(*ptr) {
94         while(*ptr && isspaceW(*ptr))
95             ptr++;
96         if(!*ptr)
97             break;
98
99         while(*ptr && isdigitW(*ptr))
100             ptr++;
101
102         if(!*ptr || isspaceW(*ptr)) {
103             LPWSTR ret, p;
104             int len = strlenW(val)+1;
105
106             ret = heap_alloc((len+2)*sizeof(WCHAR));
107             memcpy(ret, val, (ptr-val)*sizeof(WCHAR));
108             p = ret + (ptr-val);
109             *p++ = 'p';
110             *p++ = 'x';
111             strcpyW(p, ptr);
112
113             TRACE("fixed %s -> %s\n", debugstr_w(val), debugstr_w(ret));
114
115             return ret;
116         }
117
118         while(*ptr && !isspaceW(*ptr))
119             ptr++;
120     }
121
122     return NULL;
123 }
124
125 static LPWSTR fix_url_value(LPCWSTR val)
126 {
127     WCHAR *ret, *ptr;
128
129     static const WCHAR urlW[] = {'u','r','l','('};
130
131     if(strncmpW(val, urlW, sizeof(urlW)/sizeof(WCHAR)) || !strchrW(val, '\\'))
132         return NULL;
133
134     ret = heap_strdupW(val);
135
136     for(ptr = ret; *ptr; ptr++) {
137         if(*ptr == '\\')
138             *ptr = '/';
139     }
140
141     return ret;
142 }
143
144 #define ATTR_FIX_PX  1
145 #define ATTR_FIX_URL 2
146
147 static HRESULT set_style_attr(HTMLStyle *This, LPCWSTR name, LPCWSTR value, DWORD flags)
148 {
149     nsAString str_name, str_value, str_empty;
150     LPWSTR val = NULL;
151     nsresult nsres;
152
153     static const PRUnichar wszEmpty[] = {0};
154
155     TRACE("(%p)->(%s %s)\n", This, debugstr_w(name), debugstr_w(value));
156
157     if(flags & ATTR_FIX_PX)
158         val = fix_px_value(value);
159     if(flags & ATTR_FIX_URL)
160         val = fix_url_value(value);
161
162     nsAString_Init(&str_name, name);
163     nsAString_Init(&str_value, val ? val : value);
164     nsAString_Init(&str_empty, wszEmpty);
165     heap_free(val);
166
167     nsres = nsIDOMCSSStyleDeclaration_SetProperty(This->nsstyle, &str_name, &str_value, &str_empty);
168     if(NS_FAILED(nsres))
169         ERR("SetProperty failed: %08x\n", nsres);
170
171     nsAString_Finish(&str_name);
172     nsAString_Finish(&str_value);
173     nsAString_Finish(&str_empty);
174
175     return S_OK;
176 }
177
178 static HRESULT get_style_attr_nsval(HTMLStyle *This, LPCWSTR name, nsAString *value)
179 {
180     nsAString str_name;
181     nsresult nsres;
182
183     nsAString_Init(&str_name, name);
184
185     nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(This->nsstyle, &str_name, value);
186     if(NS_FAILED(nsres)) {
187         ERR("SetProperty failed: %08x\n", nsres);
188         return E_FAIL;
189     }
190
191     nsAString_Finish(&str_name);
192
193     return NS_OK;
194 }
195
196 static HRESULT get_style_attr(HTMLStyle *This, LPCWSTR name, BSTR *p)
197 {
198     nsAString str_value;
199     const PRUnichar *value;
200
201     nsAString_Init(&str_value, NULL);
202
203     get_style_attr_nsval(This, name, &str_value);
204
205     nsAString_GetData(&str_value, &value);
206     *p = *value ? SysAllocString(value) : NULL;
207
208     nsAString_Finish(&str_value);
209
210     TRACE("%s -> %s\n", debugstr_w(name), debugstr_w(*p));
211     return S_OK;
212 }
213
214 static HRESULT check_style_attr_value(HTMLStyle *This, LPCWSTR name, LPCWSTR exval, VARIANT_BOOL *p)
215 {
216     nsAString str_value;
217     const PRUnichar *value;
218
219     nsAString_Init(&str_value, NULL);
220
221     get_style_attr_nsval(This, name, &str_value);
222
223     nsAString_GetData(&str_value, &value);
224     *p = strcmpW(value, exval) ? VARIANT_FALSE : VARIANT_TRUE;
225     nsAString_Finish(&str_value);
226
227     TRACE("%s -> %x\n", debugstr_w(name), *p);
228     return S_OK;
229 }
230
231 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
232
233 static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, void **ppv)
234 {
235     HTMLStyle *This = HTMLSTYLE_THIS(iface);
236
237     *ppv = NULL;
238
239     if(IsEqualGUID(&IID_IUnknown, riid)) {
240         TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
241         *ppv = HTMLSTYLE(This);
242     }else if(IsEqualGUID(&IID_IHTMLStyle, riid)) {
243         TRACE("(%p)->(IID_IHTMLStyle %p)\n", This, ppv);
244         *ppv = HTMLSTYLE(This);
245     }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
246         return *ppv ? S_OK : E_NOINTERFACE;
247     }
248
249     if(*ppv) {
250         IUnknown_AddRef((IUnknown*)*ppv);
251         return S_OK;
252     }
253
254     WARN("unsupported %s\n", debugstr_guid(riid));
255     return E_NOINTERFACE;
256 }
257
258 static ULONG WINAPI HTMLStyle_AddRef(IHTMLStyle *iface)
259 {
260     HTMLStyle *This = HTMLSTYLE_THIS(iface);
261     LONG ref = InterlockedIncrement(&This->ref);
262
263     TRACE("(%p) ref=%d\n", This, ref);
264
265     return ref;
266 }
267
268 static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
269 {
270     HTMLStyle *This = HTMLSTYLE_THIS(iface);
271     LONG ref = InterlockedDecrement(&This->ref);
272
273     TRACE("(%p) ref=%d\n", This, ref);
274
275     if(!ref)
276         heap_free(This);
277
278     return ref;
279 }
280
281 static HRESULT WINAPI HTMLStyle_GetTypeInfoCount(IHTMLStyle *iface, UINT *pctinfo)
282 {
283     HTMLStyle *This = HTMLSTYLE_THIS(iface);
284     return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
285 }
286
287 static HRESULT WINAPI HTMLStyle_GetTypeInfo(IHTMLStyle *iface, UINT iTInfo,
288                                               LCID lcid, ITypeInfo **ppTInfo)
289 {
290     HTMLStyle *This = HTMLSTYLE_THIS(iface);
291     return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
292 }
293
294 static HRESULT WINAPI HTMLStyle_GetIDsOfNames(IHTMLStyle *iface, REFIID riid,
295                                                 LPOLESTR *rgszNames, UINT cNames,
296                                                 LCID lcid, DISPID *rgDispId)
297 {
298     HTMLStyle *This = HTMLSTYLE_THIS(iface);
299     return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
300 }
301
302 static HRESULT WINAPI HTMLStyle_Invoke(IHTMLStyle *iface, DISPID dispIdMember,
303                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
304                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
305 {
306     HTMLStyle *This = HTMLSTYLE_THIS(iface);
307     return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
308             wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
309 }
310
311 static HRESULT WINAPI HTMLStyle_put_fontFamily(IHTMLStyle *iface, BSTR v)
312 {
313     HTMLStyle *This = HTMLSTYLE_THIS(iface);
314
315     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
316
317     return set_style_attr(This, attrFontFamily, v, 0);
318 }
319
320 static HRESULT WINAPI HTMLStyle_get_fontFamily(IHTMLStyle *iface, BSTR *p)
321 {
322     HTMLStyle *This = HTMLSTYLE_THIS(iface);
323
324     TRACE("(%p)->(%p)\n", This, p);
325
326     return get_style_attr(This, attrFontFamily, p);
327 }
328
329 static HRESULT WINAPI HTMLStyle_put_fontStyle(IHTMLStyle *iface, BSTR v)
330 {
331     HTMLStyle *This = HTMLSTYLE_THIS(iface);
332     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
333     return E_NOTIMPL;
334 }
335
336 static HRESULT WINAPI HTMLStyle_get_fontStyle(IHTMLStyle *iface, BSTR *p)
337 {
338     HTMLStyle *This = HTMLSTYLE_THIS(iface);
339
340     TRACE("(%p)->(%p)\n", This, p);
341
342     return get_style_attr(This, attrFontStyle, p);
343 }
344
345 static HRESULT WINAPI HTMLStyle_put_fontVariant(IHTMLStyle *iface, BSTR v)
346 {
347     HTMLStyle *This = HTMLSTYLE_THIS(iface);
348     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
349     return E_NOTIMPL;
350 }
351
352 static HRESULT WINAPI HTMLStyle_get_fontVariant(IHTMLStyle *iface, BSTR *p)
353 {
354     HTMLStyle *This = HTMLSTYLE_THIS(iface);
355     FIXME("(%p)->(%p)\n", This, p);
356     return E_NOTIMPL;
357 }
358
359 static HRESULT WINAPI HTMLStyle_put_fontWeight(IHTMLStyle *iface, BSTR v)
360 {
361     HTMLStyle *This = HTMLSTYLE_THIS(iface);
362     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
363     return E_NOTIMPL;
364 }
365
366 static HRESULT WINAPI HTMLStyle_get_fontWeight(IHTMLStyle *iface, BSTR *p)
367 {
368     HTMLStyle *This = HTMLSTYLE_THIS(iface);
369
370     TRACE("(%p)->(%p)\n", This, p);
371
372     return get_style_attr(This, attrFontWeight, p);
373 }
374
375 static HRESULT WINAPI HTMLStyle_put_fontSize(IHTMLStyle *iface, VARIANT v)
376 {
377     HTMLStyle *This = HTMLSTYLE_THIS(iface);
378
379     TRACE("(%p)->(v%d)\n", This, V_VT(&v));
380
381     switch(V_VT(&v)) {
382     case VT_BSTR:
383         return set_style_attr(This, attrFontSize, V_BSTR(&v), 0);
384     default:
385         FIXME("not supported vt %d\n", V_VT(&v));
386     }
387
388     return S_OK;
389 }
390
391 static HRESULT WINAPI HTMLStyle_get_fontSize(IHTMLStyle *iface, VARIANT *p)
392 {
393     HTMLStyle *This = HTMLSTYLE_THIS(iface);
394
395     TRACE("(%p)->(%p)\n", This, p);
396
397     V_VT(p) = VT_BSTR;
398     return get_style_attr(This, attrFontSize, &V_BSTR(p));
399 }
400
401 static HRESULT WINAPI HTMLStyle_put_font(IHTMLStyle *iface, BSTR v)
402 {
403     HTMLStyle *This = HTMLSTYLE_THIS(iface);
404     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
405     return E_NOTIMPL;
406 }
407
408 static HRESULT WINAPI HTMLStyle_get_font(IHTMLStyle *iface, BSTR *p)
409 {
410     HTMLStyle *This = HTMLSTYLE_THIS(iface);
411     FIXME("(%p)->(%p)\n", This, p);
412     return E_NOTIMPL;
413 }
414
415 static HRESULT WINAPI HTMLStyle_put_color(IHTMLStyle *iface, VARIANT v)
416 {
417     HTMLStyle *This = HTMLSTYLE_THIS(iface);
418
419     TRACE("(%p)->(v%d)\n", This, V_VT(&v));
420
421     switch(V_VT(&v)) {
422     case VT_BSTR:
423         TRACE("%s\n", debugstr_w(V_BSTR(&v)));
424         return set_style_attr(This, attrColor, V_BSTR(&v), 0);
425
426     default:
427         FIXME("unsupported vt=%d\n", V_VT(&v));
428     }
429
430     return E_NOTIMPL;
431 }
432
433 static HRESULT WINAPI HTMLStyle_get_color(IHTMLStyle *iface, VARIANT *p)
434 {
435     HTMLStyle *This = HTMLSTYLE_THIS(iface);
436
437     TRACE("(%p)->(%p)\n", This, p);
438
439     V_VT(p) = VT_BSTR;
440     return get_style_attr(This, attrColor, &V_BSTR(p));
441 }
442
443 static HRESULT WINAPI HTMLStyle_put_background(IHTMLStyle *iface, BSTR v)
444 {
445     HTMLStyle *This = HTMLSTYLE_THIS(iface);
446
447     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
448
449     return set_style_attr(This, attrBackground, v, 0);
450 }
451
452 static HRESULT WINAPI HTMLStyle_get_background(IHTMLStyle *iface, BSTR *p)
453 {
454     HTMLStyle *This = HTMLSTYLE_THIS(iface);
455
456     TRACE("(%p)->(%p)\n", This, p);
457
458     return get_style_attr(This, attrBackground, p);
459 }
460
461 static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v)
462 {
463     HTMLStyle *This = HTMLSTYLE_THIS(iface);
464
465     TRACE("(%p)->(v%d)\n", This, V_VT(&v));
466
467     switch(V_VT(&v)) {
468     case VT_BSTR:
469         return set_style_attr(This, attrBackgroundColor, V_BSTR(&v), 0);
470     case VT_I4: {
471         WCHAR value[10];
472         static const WCHAR format[] = {'#','%','0','6','x',0};
473
474         wsprintfW(value, format, V_I4(&v));
475         return set_style_attr(This, attrBackgroundColor, value, 0);
476     }
477     default:
478         FIXME("unsupported vt %d\n", V_VT(&v));
479     }
480
481     return S_OK;
482 }
483
484 static HRESULT WINAPI HTMLStyle_get_backgroundColor(IHTMLStyle *iface, VARIANT *p)
485 {
486     HTMLStyle *This = HTMLSTYLE_THIS(iface);
487     FIXME("(%p)->(%p)\n", This, p);
488     return E_NOTIMPL;
489 }
490
491 static HRESULT WINAPI HTMLStyle_put_backgroundImage(IHTMLStyle *iface, BSTR v)
492 {
493     HTMLStyle *This = HTMLSTYLE_THIS(iface);
494
495     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
496
497     return set_style_attr(This, attrBackgroundImage, v, ATTR_FIX_URL);
498 }
499
500 static HRESULT WINAPI HTMLStyle_get_backgroundImage(IHTMLStyle *iface, BSTR *p)
501 {
502     HTMLStyle *This = HTMLSTYLE_THIS(iface);
503     FIXME("(%p)->(%p)\n", This, p);
504     return E_NOTIMPL;
505 }
506
507 static HRESULT WINAPI HTMLStyle_put_backgroundRepeat(IHTMLStyle *iface, BSTR v)
508 {
509     HTMLStyle *This = HTMLSTYLE_THIS(iface);
510     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
511     return E_NOTIMPL;
512 }
513
514 static HRESULT WINAPI HTMLStyle_get_backgroundRepeat(IHTMLStyle *iface, BSTR *p)
515 {
516     HTMLStyle *This = HTMLSTYLE_THIS(iface);
517     FIXME("(%p)->(%p)\n", This, p);
518     return E_NOTIMPL;
519 }
520
521 static HRESULT WINAPI HTMLStyle_put_backgroundAttachment(IHTMLStyle *iface, BSTR v)
522 {
523     HTMLStyle *This = HTMLSTYLE_THIS(iface);
524     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
525     return E_NOTIMPL;
526 }
527
528 static HRESULT WINAPI HTMLStyle_get_backgroundAttachment(IHTMLStyle *iface, BSTR *p)
529 {
530     HTMLStyle *This = HTMLSTYLE_THIS(iface);
531     FIXME("(%p)->(%p)\n", This, p);
532     return E_NOTIMPL;
533 }
534
535 static HRESULT WINAPI HTMLStyle_put_backgroundPosition(IHTMLStyle *iface, BSTR v)
536 {
537     HTMLStyle *This = HTMLSTYLE_THIS(iface);
538     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
539     return E_NOTIMPL;
540 }
541
542 static HRESULT WINAPI HTMLStyle_get_backgroundPosition(IHTMLStyle *iface, BSTR *p)
543 {
544     HTMLStyle *This = HTMLSTYLE_THIS(iface);
545     FIXME("(%p)->(%p)\n", This, p);
546     return E_NOTIMPL;
547 }
548
549 static HRESULT WINAPI HTMLStyle_put_backgroundPositionX(IHTMLStyle *iface, VARIANT v)
550 {
551     HTMLStyle *This = HTMLSTYLE_THIS(iface);
552     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
553     return E_NOTIMPL;
554 }
555
556 static HRESULT WINAPI HTMLStyle_get_backgroundPositionX(IHTMLStyle *iface, VARIANT *p)
557 {
558     HTMLStyle *This = HTMLSTYLE_THIS(iface);
559     FIXME("(%p)->(%p)\n", This, p);
560     return E_NOTIMPL;
561 }
562
563 static HRESULT WINAPI HTMLStyle_put_backgroundPositionY(IHTMLStyle *iface, VARIANT v)
564 {
565     HTMLStyle *This = HTMLSTYLE_THIS(iface);
566     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
567     return E_NOTIMPL;
568 }
569
570 static HRESULT WINAPI HTMLStyle_get_backgroundPositionY(IHTMLStyle *iface, VARIANT *p)
571 {
572     HTMLStyle *This = HTMLSTYLE_THIS(iface);
573     FIXME("(%p)->(%p)\n", This, p);
574     return E_NOTIMPL;
575 }
576
577 static HRESULT WINAPI HTMLStyle_put_wordSpacing(IHTMLStyle *iface, VARIANT v)
578 {
579     HTMLStyle *This = HTMLSTYLE_THIS(iface);
580     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
581     return E_NOTIMPL;
582 }
583
584 static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p)
585 {
586     HTMLStyle *This = HTMLSTYLE_THIS(iface);
587     FIXME("(%p)->(%p)\n", This, p);
588     return E_NOTIMPL;
589 }
590
591 static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
592 {
593     HTMLStyle *This = HTMLSTYLE_THIS(iface);
594     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
595     return E_NOTIMPL;
596 }
597
598 static HRESULT WINAPI HTMLStyle_get_letterSpacing(IHTMLStyle *iface, VARIANT *p)
599 {
600     HTMLStyle *This = HTMLSTYLE_THIS(iface);
601     FIXME("(%p)->(%p)\n", This, p);
602     return E_NOTIMPL;
603 }
604
605 static HRESULT WINAPI HTMLStyle_put_textDecoration(IHTMLStyle *iface, BSTR v)
606 {
607     HTMLStyle *This = HTMLSTYLE_THIS(iface);
608     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
609     return E_NOTIMPL;
610 }
611
612 static HRESULT WINAPI HTMLStyle_get_textDecoration(IHTMLStyle *iface, BSTR *p)
613 {
614     HTMLStyle *This = HTMLSTYLE_THIS(iface);
615
616     TRACE("(%p)->(%p)\n", This, p);
617
618     return get_style_attr(This, attrTextDecoration, p);
619 }
620
621 static HRESULT WINAPI HTMLStyle_put_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL v)
622 {
623     HTMLStyle *This = HTMLSTYLE_THIS(iface);
624     FIXME("(%p)->(%x)\n", This, v);
625     return E_NOTIMPL;
626 }
627
628 static HRESULT WINAPI HTMLStyle_get_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL *p)
629 {
630     HTMLStyle *This = HTMLSTYLE_THIS(iface);
631     FIXME("(%p)->(%p)\n", This, p);
632     return E_NOTIMPL;
633 }
634
635 static HRESULT WINAPI HTMLStyle_put_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL v)
636 {
637     HTMLStyle *This = HTMLSTYLE_THIS(iface);
638     FIXME("(%p)->(%x)\n", This, v);
639     return E_NOTIMPL;
640 }
641
642 static HRESULT WINAPI HTMLStyle_get_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL *p)
643 {
644     HTMLStyle *This = HTMLSTYLE_THIS(iface);
645
646     TRACE("(%p)->(%p)\n", This, p);
647
648     return check_style_attr_value(This, attrTextDecoration, valUnderline, p);
649 }
650
651 static HRESULT WINAPI HTMLStyle_put_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL v)
652 {
653     HTMLStyle *This = HTMLSTYLE_THIS(iface);
654     FIXME("(%p)->(%x)\n", This, v);
655     return E_NOTIMPL;
656 }
657
658 static HRESULT WINAPI HTMLStyle_get_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL *p)
659 {
660     HTMLStyle *This = HTMLSTYLE_THIS(iface);
661     FIXME("(%p)->(%p)\n", This, p);
662     return E_NOTIMPL;
663 }
664
665 static HRESULT WINAPI HTMLStyle_put_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL v)
666 {
667     HTMLStyle *This = HTMLSTYLE_THIS(iface);
668     FIXME("(%p)->(%x)\n", This, v);
669     return E_NOTIMPL;
670 }
671
672 static HRESULT WINAPI HTMLStyle_get_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL *p)
673 {
674     HTMLStyle *This = HTMLSTYLE_THIS(iface);
675
676     TRACE("(%p)->(%p)\n", This, p);
677
678     return check_style_attr_value(This, attrTextDecoration, valLineThrough, p);
679 }
680
681 static HRESULT WINAPI HTMLStyle_put_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL v)
682 {
683     HTMLStyle *This = HTMLSTYLE_THIS(iface);
684     FIXME("(%p)->(%x)\n", This, v);
685     return E_NOTIMPL;
686 }
687
688 static HRESULT WINAPI HTMLStyle_get_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL *p)
689 {
690     HTMLStyle *This = HTMLSTYLE_THIS(iface);
691     FIXME("(%p)->(%p)\n", This, p);
692     return E_NOTIMPL;
693 }
694
695 static HRESULT WINAPI HTMLStyle_put_verticalAlign(IHTMLStyle *iface, VARIANT v)
696 {
697     HTMLStyle *This = HTMLSTYLE_THIS(iface);
698     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
699     return E_NOTIMPL;
700 }
701
702 static HRESULT WINAPI HTMLStyle_get_verticalAlign(IHTMLStyle *iface, VARIANT *p)
703 {
704     HTMLStyle *This = HTMLSTYLE_THIS(iface);
705     FIXME("(%p)->(%p)\n", This, p);
706     return E_NOTIMPL;
707 }
708
709 static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v)
710 {
711     HTMLStyle *This = HTMLSTYLE_THIS(iface);
712     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
713     return E_NOTIMPL;
714 }
715
716 static HRESULT WINAPI HTMLStyle_get_textTransform(IHTMLStyle *iface, BSTR *p)
717 {
718     HTMLStyle *This = HTMLSTYLE_THIS(iface);
719     FIXME("(%p)->(%p)\n", This, p);
720     return E_NOTIMPL;
721 }
722
723 static HRESULT WINAPI HTMLStyle_put_textAlign(IHTMLStyle *iface, BSTR v)
724 {
725     HTMLStyle *This = HTMLSTYLE_THIS(iface);
726     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
727     return E_NOTIMPL;
728 }
729
730 static HRESULT WINAPI HTMLStyle_get_textAlign(IHTMLStyle *iface, BSTR *p)
731 {
732     HTMLStyle *This = HTMLSTYLE_THIS(iface);
733     FIXME("(%p)->(%p)\n", This, p);
734     return E_NOTIMPL;
735 }
736
737 static HRESULT WINAPI HTMLStyle_put_textIndent(IHTMLStyle *iface, VARIANT v)
738 {
739     HTMLStyle *This = HTMLSTYLE_THIS(iface);
740     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
741     return E_NOTIMPL;
742 }
743
744 static HRESULT WINAPI HTMLStyle_get_textIndent(IHTMLStyle *iface, VARIANT *p)
745 {
746     HTMLStyle *This = HTMLSTYLE_THIS(iface);
747     FIXME("(%p)->(%p)\n", This, p);
748     return E_NOTIMPL;
749 }
750
751 static HRESULT WINAPI HTMLStyle_put_lineHeight(IHTMLStyle *iface, VARIANT v)
752 {
753     HTMLStyle *This = HTMLSTYLE_THIS(iface);
754     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
755     return E_NOTIMPL;
756 }
757
758 static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
759 {
760     HTMLStyle *This = HTMLSTYLE_THIS(iface);
761     FIXME("(%p)->(%p)\n", This, p);
762     return E_NOTIMPL;
763 }
764
765 static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
766 {
767     HTMLStyle *This = HTMLSTYLE_THIS(iface);
768     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
769     return E_NOTIMPL;
770 }
771
772 static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
773 {
774     HTMLStyle *This = HTMLSTYLE_THIS(iface);
775     FIXME("(%p)->(%p)\n", This, p);
776     return E_NOTIMPL;
777 }
778
779 static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
780 {
781     HTMLStyle *This = HTMLSTYLE_THIS(iface);
782
783     TRACE("(%p)->(v(%d))\n", This, V_VT(&v));
784
785     switch(V_VT(&v)) {
786     case VT_NULL:
787         return set_style_attr(This, attrMarginRight, emptyW, 0);
788     case VT_I4: {
789         WCHAR buf[14];
790
791         wsprintfW(buf, px_formatW, V_I4(&v));
792         return set_style_attr(This, attrMarginRight, buf, 0);
793     }
794     case VT_BSTR:
795         return set_style_attr(This, attrMarginRight, V_BSTR(&v), 0);
796     default:
797         FIXME("Unsupported vt=%d\n", V_VT(&v));
798     }
799
800     return E_NOTIMPL;
801 }
802
803 static HRESULT WINAPI HTMLStyle_get_marginRight(IHTMLStyle *iface, VARIANT *p)
804 {
805     HTMLStyle *This = HTMLSTYLE_THIS(iface);
806     FIXME("(%p)->(%p)\n", This, p);
807     return E_NOTIMPL;
808 }
809
810 static HRESULT WINAPI HTMLStyle_put_marginBottom(IHTMLStyle *iface, VARIANT v)
811 {
812     HTMLStyle *This = HTMLSTYLE_THIS(iface);
813     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
814     return E_NOTIMPL;
815 }
816
817 static HRESULT WINAPI HTMLStyle_get_marginBottom(IHTMLStyle *iface, VARIANT *p)
818 {
819     HTMLStyle *This = HTMLSTYLE_THIS(iface);
820     FIXME("(%p)->(%p)\n", This, p);
821     return E_NOTIMPL;
822 }
823
824 static HRESULT WINAPI HTMLStyle_put_marginLeft(IHTMLStyle *iface, VARIANT v)
825 {
826     HTMLStyle *This = HTMLSTYLE_THIS(iface);
827
828     switch(V_VT(&v)) {
829     case VT_NULL:
830         TRACE("(%p)->(NULL)\n", This);
831         return set_style_attr(This, attrMarginLeft, emptyW, 0);
832     case VT_I4: {
833         WCHAR buf[14];
834
835         TRACE("(%p)->(%d)\n", This, V_I4(&v));
836
837         wsprintfW(buf, px_formatW, V_I4(&v));
838         return set_style_attr(This, attrMarginLeft, buf, 0);
839     }
840     case VT_BSTR:
841         TRACE("(%p)->(%s)\n", This, debugstr_w(V_BSTR(&v)));
842         return set_style_attr(This, attrMarginLeft, V_BSTR(&v), 0);
843     default:
844         FIXME("Unsupported vt=%d\n", V_VT(&v));
845     }
846
847     return E_NOTIMPL;
848 }
849
850 static HRESULT WINAPI HTMLStyle_put_margin(IHTMLStyle *iface, BSTR v)
851 {
852     HTMLStyle *This = HTMLSTYLE_THIS(iface);
853
854     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
855
856     return set_style_attr(This, attrMargin, v, 0);
857 }
858
859 static HRESULT WINAPI HTMLStyle_get_margin(IHTMLStyle *iface, BSTR *p)
860 {
861     HTMLStyle *This = HTMLSTYLE_THIS(iface);
862
863     TRACE("(%p)->(%p)\n", This, p);
864
865     return get_style_attr(This, attrMargin, p);
866 }
867
868 static HRESULT WINAPI HTMLStyle_get_marginLeft(IHTMLStyle *iface, VARIANT *p)
869 {
870     HTMLStyle *This = HTMLSTYLE_THIS(iface);
871     FIXME("(%p)->(%p)\n", This, p);
872     return E_NOTIMPL;
873 }
874
875 static HRESULT WINAPI HTMLStyle_put_paddingTop(IHTMLStyle *iface, VARIANT v)
876 {
877     HTMLStyle *This = HTMLSTYLE_THIS(iface);
878     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
879     return E_NOTIMPL;
880 }
881
882 static HRESULT WINAPI HTMLStyle_get_paddingTop(IHTMLStyle *iface, VARIANT *p)
883 {
884     HTMLStyle *This = HTMLSTYLE_THIS(iface);
885     FIXME("(%p)->(%p)\n", This, p);
886     return E_NOTIMPL;
887 }
888
889 static HRESULT WINAPI HTMLStyle_put_paddingRight(IHTMLStyle *iface, VARIANT v)
890 {
891     HTMLStyle *This = HTMLSTYLE_THIS(iface);
892     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
893     return E_NOTIMPL;
894 }
895
896 static HRESULT WINAPI HTMLStyle_get_paddingRight(IHTMLStyle *iface, VARIANT *p)
897 {
898     HTMLStyle *This = HTMLSTYLE_THIS(iface);
899     FIXME("(%p)->(%p)\n", This, p);
900     return E_NOTIMPL;
901 }
902
903 static HRESULT WINAPI HTMLStyle_put_paddingBottom(IHTMLStyle *iface, VARIANT v)
904 {
905     HTMLStyle *This = HTMLSTYLE_THIS(iface);
906     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
907     return E_NOTIMPL;
908 }
909
910 static HRESULT WINAPI HTMLStyle_get_paddingBottom(IHTMLStyle *iface, VARIANT *p)
911 {
912     HTMLStyle *This = HTMLSTYLE_THIS(iface);
913     FIXME("(%p)->(%p)\n", This, p);
914     return E_NOTIMPL;
915 }
916
917 static HRESULT WINAPI HTMLStyle_put_paddingLeft(IHTMLStyle *iface, VARIANT v)
918 {
919     HTMLStyle *This = HTMLSTYLE_THIS(iface);
920
921     TRACE("(%p)->(vt=%d)\n", This, V_VT(&v));
922
923     switch(V_VT(&v)) {
924     case VT_I4: {
925         WCHAR buf[14];
926
927         wsprintfW(buf, px_formatW, V_I4(&v));
928         return set_style_attr(This, attrPaddingLeft, buf, 0);
929     }
930     case VT_BSTR:
931         return set_style_attr(This, attrPaddingLeft, V_BSTR(&v), 0);
932     default:
933         FIXME("unsupported vt=%d\n", V_VT(&v));
934     }
935
936     return E_NOTIMPL;
937 }
938
939 static HRESULT WINAPI HTMLStyle_get_paddingLeft(IHTMLStyle *iface, VARIANT *p)
940 {
941     HTMLStyle *This = HTMLSTYLE_THIS(iface);
942     FIXME("(%p)->(%p)\n", This, p);
943     return E_NOTIMPL;
944 }
945
946 static HRESULT WINAPI HTMLStyle_put_padding(IHTMLStyle *iface, BSTR v)
947 {
948     HTMLStyle *This = HTMLSTYLE_THIS(iface);
949     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
950     return E_NOTIMPL;
951 }
952
953 static HRESULT WINAPI HTMLStyle_get_padding(IHTMLStyle *iface, BSTR *p)
954 {
955     HTMLStyle *This = HTMLSTYLE_THIS(iface);
956     FIXME("(%p)->(%p)\n", This, p);
957     return E_NOTIMPL;
958 }
959
960 static HRESULT WINAPI HTMLStyle_put_border(IHTMLStyle *iface, BSTR v)
961 {
962     HTMLStyle *This = HTMLSTYLE_THIS(iface);
963     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
964     return E_NOTIMPL;
965 }
966
967 static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p)
968 {
969     HTMLStyle *This = HTMLSTYLE_THIS(iface);
970     FIXME("(%p)->(%p)\n", This, p);
971     return E_NOTIMPL;
972 }
973
974 static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
975 {
976     HTMLStyle *This = HTMLSTYLE_THIS(iface);
977     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
978     return E_NOTIMPL;
979 }
980
981 static HRESULT WINAPI HTMLStyle_get_borderTop(IHTMLStyle *iface, BSTR *p)
982 {
983     HTMLStyle *This = HTMLSTYLE_THIS(iface);
984     FIXME("(%p)->(%p)\n", This, p);
985     return E_NOTIMPL;
986 }
987
988 static HRESULT WINAPI HTMLStyle_put_borderRight(IHTMLStyle *iface, BSTR v)
989 {
990     HTMLStyle *This = HTMLSTYLE_THIS(iface);
991     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
992     return E_NOTIMPL;
993 }
994
995 static HRESULT WINAPI HTMLStyle_get_borderRight(IHTMLStyle *iface, BSTR *p)
996 {
997     HTMLStyle *This = HTMLSTYLE_THIS(iface);
998     FIXME("(%p)->(%p)\n", This, p);
999     return E_NOTIMPL;
1000 }
1001
1002 static HRESULT WINAPI HTMLStyle_put_borderBottom(IHTMLStyle *iface, BSTR v)
1003 {
1004     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1005     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1006     return E_NOTIMPL;
1007 }
1008
1009 static HRESULT WINAPI HTMLStyle_get_borderBottom(IHTMLStyle *iface, BSTR *p)
1010 {
1011     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1012     FIXME("(%p)->(%p)\n", This, p);
1013     return E_NOTIMPL;
1014 }
1015
1016 static HRESULT WINAPI HTMLStyle_put_borderLeft(IHTMLStyle *iface, BSTR v)
1017 {
1018     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1019
1020     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1021
1022     return set_style_attr(This, attrBorderLeft, v, ATTR_FIX_PX);
1023 }
1024
1025 static HRESULT WINAPI HTMLStyle_get_borderLeft(IHTMLStyle *iface, BSTR *p)
1026 {
1027     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1028     FIXME("(%p)->(%p)\n", This, p);
1029     return E_NOTIMPL;
1030 }
1031
1032 static HRESULT WINAPI HTMLStyle_put_borderColor(IHTMLStyle *iface, BSTR v)
1033 {
1034     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1035     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1036     return E_NOTIMPL;
1037 }
1038
1039 static HRESULT WINAPI HTMLStyle_get_borderColor(IHTMLStyle *iface, BSTR *p)
1040 {
1041     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1042     FIXME("(%p)->(%p)\n", This, p);
1043     return E_NOTIMPL;
1044 }
1045
1046 static HRESULT WINAPI HTMLStyle_put_borderTopColor(IHTMLStyle *iface, VARIANT v)
1047 {
1048     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1049     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1050     return E_NOTIMPL;
1051 }
1052
1053 static HRESULT WINAPI HTMLStyle_get_borderTopColor(IHTMLStyle *iface, VARIANT *p)
1054 {
1055     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1056     FIXME("(%p)->(%p)\n", This, p);
1057     return E_NOTIMPL;
1058 }
1059
1060 static HRESULT WINAPI HTMLStyle_put_borderRightColor(IHTMLStyle *iface, VARIANT v)
1061 {
1062     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1063     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1064     return E_NOTIMPL;
1065 }
1066
1067 static HRESULT WINAPI HTMLStyle_get_borderRightColor(IHTMLStyle *iface, VARIANT *p)
1068 {
1069     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1070     FIXME("(%p)->(%p)\n", This, p);
1071     return E_NOTIMPL;
1072 }
1073
1074 static HRESULT WINAPI HTMLStyle_put_borderBottomColor(IHTMLStyle *iface, VARIANT v)
1075 {
1076     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1077     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1078     return E_NOTIMPL;
1079 }
1080
1081 static HRESULT WINAPI HTMLStyle_get_borderBottomColor(IHTMLStyle *iface, VARIANT *p)
1082 {
1083     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1084     FIXME("(%p)->(%p)\n", This, p);
1085     return E_NOTIMPL;
1086 }
1087
1088 static HRESULT WINAPI HTMLStyle_put_borderLeftColor(IHTMLStyle *iface, VARIANT v)
1089 {
1090     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1091     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1092     return E_NOTIMPL;
1093 }
1094
1095 static HRESULT WINAPI HTMLStyle_get_borderLeftColor(IHTMLStyle *iface, VARIANT *p)
1096 {
1097     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1098     FIXME("(%p)->(%p)\n", This, p);
1099     return E_NOTIMPL;
1100 }
1101
1102 static HRESULT WINAPI HTMLStyle_put_borderWidth(IHTMLStyle *iface, BSTR v)
1103 {
1104     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1105     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1106     return E_NOTIMPL;
1107 }
1108
1109 static HRESULT WINAPI HTMLStyle_get_borderWidth(IHTMLStyle *iface, BSTR *p)
1110 {
1111     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1112     FIXME("(%p)->(%p)\n", This, p);
1113     return E_NOTIMPL;
1114 }
1115
1116 static HRESULT WINAPI HTMLStyle_put_borderTopWidth(IHTMLStyle *iface, VARIANT v)
1117 {
1118     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1119     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1120     return E_NOTIMPL;
1121 }
1122
1123 static HRESULT WINAPI HTMLStyle_get_borderTopWidth(IHTMLStyle *iface, VARIANT *p)
1124 {
1125     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1126     FIXME("(%p)->(%p)\n", This, p);
1127     return E_NOTIMPL;
1128 }
1129
1130 static HRESULT WINAPI HTMLStyle_put_borderRightWidth(IHTMLStyle *iface, VARIANT v)
1131 {
1132     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1133     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1134     return E_NOTIMPL;
1135 }
1136
1137 static HRESULT WINAPI HTMLStyle_get_borderRightWidth(IHTMLStyle *iface, VARIANT *p)
1138 {
1139     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1140     FIXME("(%p)->(%p)\n", This, p);
1141     return E_NOTIMPL;
1142 }
1143
1144 static HRESULT WINAPI HTMLStyle_put_borderBottomWidth(IHTMLStyle *iface, VARIANT v)
1145 {
1146     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1147     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1148     return E_NOTIMPL;
1149 }
1150
1151 static HRESULT WINAPI HTMLStyle_get_borderBottomWidth(IHTMLStyle *iface, VARIANT *p)
1152 {
1153     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1154     FIXME("(%p)->(%p)\n", This, p);
1155     return E_NOTIMPL;
1156 }
1157
1158 static HRESULT WINAPI HTMLStyle_put_borderLeftWidth(IHTMLStyle *iface, VARIANT v)
1159 {
1160     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1161     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1162     return E_NOTIMPL;
1163 }
1164
1165 static HRESULT WINAPI HTMLStyle_get_borderLeftWidth(IHTMLStyle *iface, VARIANT *p)
1166 {
1167     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1168     FIXME("(%p)->(%p)\n", This, p);
1169     return E_NOTIMPL;
1170 }
1171
1172 static HRESULT WINAPI HTMLStyle_put_borderStyle(IHTMLStyle *iface, BSTR v)
1173 {
1174     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1175     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1176     return E_NOTIMPL;
1177 }
1178
1179 static HRESULT WINAPI HTMLStyle_get_borderStyle(IHTMLStyle *iface, BSTR *p)
1180 {
1181     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1182     FIXME("(%p)->(%p)\n", This, p);
1183     return E_NOTIMPL;
1184 }
1185
1186 static HRESULT WINAPI HTMLStyle_put_borderTopStyle(IHTMLStyle *iface, BSTR v)
1187 {
1188     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1189     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1190     return E_NOTIMPL;
1191 }
1192
1193 static HRESULT WINAPI HTMLStyle_get_borderTopStyle(IHTMLStyle *iface, BSTR *p)
1194 {
1195     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1196     FIXME("(%p)->(%p)\n", This, p);
1197     return E_NOTIMPL;
1198 }
1199
1200 static HRESULT WINAPI HTMLStyle_put_borderRightStyle(IHTMLStyle *iface, BSTR v)
1201 {
1202     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1203     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1204     return E_NOTIMPL;
1205 }
1206
1207 static HRESULT WINAPI HTMLStyle_get_borderRightStyle(IHTMLStyle *iface, BSTR *p)
1208 {
1209     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1210     FIXME("(%p)->(%p)\n", This, p);
1211     return E_NOTIMPL;
1212 }
1213
1214 static HRESULT WINAPI HTMLStyle_put_borderBottomStyle(IHTMLStyle *iface, BSTR v)
1215 {
1216     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1217     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1218     return E_NOTIMPL;
1219 }
1220
1221 static HRESULT WINAPI HTMLStyle_get_borderBottomStyle(IHTMLStyle *iface, BSTR *p)
1222 {
1223     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1224     FIXME("(%p)->(%p)\n", This, p);
1225     return E_NOTIMPL;
1226 }
1227
1228 static HRESULT WINAPI HTMLStyle_put_borderLeftStyle(IHTMLStyle *iface, BSTR v)
1229 {
1230     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1231     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1232     return E_NOTIMPL;
1233 }
1234
1235 static HRESULT WINAPI HTMLStyle_get_borderLeftStyle(IHTMLStyle *iface, BSTR *p)
1236 {
1237     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1238     FIXME("(%p)->(%p)\n", This, p);
1239     return E_NOTIMPL;
1240 }
1241
1242 static HRESULT WINAPI HTMLStyle_put_width(IHTMLStyle *iface, VARIANT v)
1243 {
1244     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1245
1246     TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1247
1248     switch(V_VT(&v)) {
1249     case VT_BSTR:
1250         TRACE("%s\n", debugstr_w(V_BSTR(&v)));
1251         return set_style_attr(This, attrWidth, V_BSTR(&v), 0);
1252     default:
1253         FIXME("unsupported vt %d\n", V_VT(&v));
1254     }
1255
1256     return E_NOTIMPL;
1257 }
1258
1259 static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p)
1260 {
1261     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1262
1263     TRACE("(%p)->(%p)\n", This, p);
1264
1265     V_VT(p) = VT_BSTR;
1266     return get_style_attr(This, attrWidth, &V_BSTR(p));
1267 }
1268
1269 static HRESULT WINAPI HTMLStyle_put_height(IHTMLStyle *iface, VARIANT v)
1270 {
1271     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1272     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1273     return E_NOTIMPL;
1274 }
1275
1276 static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p)
1277 {
1278     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1279     FIXME("(%p)->(%p)\n", This, p);
1280     return E_NOTIMPL;
1281 }
1282
1283 static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v)
1284 {
1285     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1286     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1287     return E_NOTIMPL;
1288 }
1289
1290 static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p)
1291 {
1292     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1293     FIXME("(%p)->(%p)\n", This, p);
1294     return E_NOTIMPL;
1295 }
1296
1297 static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v)
1298 {
1299     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1300     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1301     return E_NOTIMPL;
1302 }
1303
1304 static HRESULT WINAPI HTMLStyle_get_clear(IHTMLStyle *iface, BSTR *p)
1305 {
1306     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1307     FIXME("(%p)->(%p)\n", This, p);
1308     return E_NOTIMPL;
1309 }
1310
1311 static HRESULT WINAPI HTMLStyle_put_display(IHTMLStyle *iface, BSTR v)
1312 {
1313     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1314
1315     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1316
1317     return set_style_attr(This, attrDisplay, v, 0);
1318 }
1319
1320 static HRESULT WINAPI HTMLStyle_get_display(IHTMLStyle *iface, BSTR *p)
1321 {
1322     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1323
1324     TRACE("(%p)->(%p)\n", This, p);
1325
1326     return get_style_attr(This, attrDisplay, p);
1327 }
1328
1329 static HRESULT WINAPI HTMLStyle_put_visibility(IHTMLStyle *iface, BSTR v)
1330 {
1331     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1332
1333     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1334
1335     return set_style_attr(This, attrVisibility, v, 0);
1336 }
1337
1338 static HRESULT WINAPI HTMLStyle_get_visibility(IHTMLStyle *iface, BSTR *p)
1339 {
1340     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1341
1342     TRACE("(%p)->(%p)\n", This, p);
1343
1344     return get_style_attr(This, attrVisibility, p);
1345 }
1346
1347 static HRESULT WINAPI HTMLStyle_put_listStyleType(IHTMLStyle *iface, BSTR v)
1348 {
1349     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1350     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1351     return E_NOTIMPL;
1352 }
1353
1354 static HRESULT WINAPI HTMLStyle_get_listStyleType(IHTMLStyle *iface, BSTR *p)
1355 {
1356     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1357     FIXME("(%p)->(%p)\n", This, p);
1358     return E_NOTIMPL;
1359 }
1360
1361 static HRESULT WINAPI HTMLStyle_put_listStylePosition(IHTMLStyle *iface, BSTR v)
1362 {
1363     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1364     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1365     return E_NOTIMPL;
1366 }
1367
1368 static HRESULT WINAPI HTMLStyle_get_listStylePosition(IHTMLStyle *iface, BSTR *p)
1369 {
1370     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1371     FIXME("(%p)->(%p)\n", This, p);
1372     return E_NOTIMPL;
1373 }
1374
1375 static HRESULT WINAPI HTMLStyle_put_listStyleImage(IHTMLStyle *iface, BSTR v)
1376 {
1377     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1378     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1379     return E_NOTIMPL;
1380 }
1381
1382 static HRESULT WINAPI HTMLStyle_get_listStyleImage(IHTMLStyle *iface, BSTR *p)
1383 {
1384     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1385     FIXME("(%p)->(%p)\n", This, p);
1386     return E_NOTIMPL;
1387 }
1388
1389 static HRESULT WINAPI HTMLStyle_put_listStyle(IHTMLStyle *iface, BSTR v)
1390 {
1391     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1392     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1393     return E_NOTIMPL;
1394 }
1395
1396 static HRESULT WINAPI HTMLStyle_get_listStyle(IHTMLStyle *iface, BSTR *p)
1397 {
1398     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1399     FIXME("(%p)->(%p)\n", This, p);
1400     return E_NOTIMPL;
1401 }
1402
1403 static HRESULT WINAPI HTMLStyle_put_whiteSpace(IHTMLStyle *iface, BSTR v)
1404 {
1405     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1406     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1407     return E_NOTIMPL;
1408 }
1409
1410 static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p)
1411 {
1412     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1413     FIXME("(%p)->(%p)\n", This, p);
1414     return E_NOTIMPL;
1415 }
1416
1417 static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v)
1418 {
1419     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1420     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1421     return E_NOTIMPL;
1422 }
1423
1424 static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p)
1425 {
1426     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1427     FIXME("(%p)->(%p)\n", This, p);
1428     return E_NOTIMPL;
1429 }
1430
1431 static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v)
1432 {
1433     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1434     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1435     return E_NOTIMPL;
1436 }
1437
1438 static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p)
1439 {
1440     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1441     FIXME("(%p)->(%p)\n", This, p);
1442     return E_NOTIMPL;
1443 }
1444
1445 static HRESULT WINAPI HTMLStyle_get_position(IHTMLStyle *iface, BSTR *p)
1446 {
1447     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1448     FIXME("(%p)->(%p)\n", This, p);
1449     return E_NOTIMPL;
1450 }
1451
1452 static HRESULT WINAPI HTMLStyle_put_zIndex(IHTMLStyle *iface, VARIANT v)
1453 {
1454     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1455     FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1456     return E_NOTIMPL;
1457 }
1458
1459 static HRESULT WINAPI HTMLStyle_get_zIndex(IHTMLStyle *iface, VARIANT *p)
1460 {
1461     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1462     FIXME("(%p)->(%p)\n", This, p);
1463     return E_NOTIMPL;
1464 }
1465
1466 static HRESULT WINAPI HTMLStyle_put_overflow(IHTMLStyle *iface, BSTR v)
1467 {
1468     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1469     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1470     return E_NOTIMPL;
1471 }
1472
1473 static HRESULT WINAPI HTMLStyle_get_overflow(IHTMLStyle *iface, BSTR *p)
1474 {
1475     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1476     FIXME("(%p)->(%p)\n", This, p);
1477     return E_NOTIMPL;
1478 }
1479
1480 static HRESULT WINAPI HTMLStyle_put_pageBreakBefore(IHTMLStyle *iface, BSTR v)
1481 {
1482     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1483     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1484     return E_NOTIMPL;
1485 }
1486
1487 static HRESULT WINAPI HTMLStyle_get_pageBreakBefore(IHTMLStyle *iface, BSTR *p)
1488 {
1489     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1490     FIXME("(%p)->(%p)\n", This, p);
1491     return E_NOTIMPL;
1492 }
1493
1494 static HRESULT WINAPI HTMLStyle_put_pageBreakAfter(IHTMLStyle *iface, BSTR v)
1495 {
1496     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1497     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1498     return E_NOTIMPL;
1499 }
1500
1501 static HRESULT WINAPI HTMLStyle_get_pageBreakAfter(IHTMLStyle *iface, BSTR *p)
1502 {
1503     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1504     FIXME("(%p)->(%p)\n", This, p);
1505     return E_NOTIMPL;
1506 }
1507
1508 static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
1509 {
1510     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1511     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1512     return E_NOTIMPL;
1513 }
1514
1515 static HRESULT WINAPI HTMLStyle_get_cssText(IHTMLStyle *iface, BSTR *p)
1516 {
1517     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1518     FIXME("(%p)->(%p)\n", This, p);
1519     return E_NOTIMPL;
1520 }
1521
1522 static HRESULT WINAPI HTMLStyle_put_pixelTop(IHTMLStyle *iface, long v)
1523 {
1524     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1525     FIXME("(%p)->()\n", This);
1526     return E_NOTIMPL;
1527 }
1528
1529 static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, long *p)
1530 {
1531     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1532     FIXME("(%p)->()\n", This);
1533     return E_NOTIMPL;
1534 }
1535
1536 static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, long v)
1537 {
1538     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1539     FIXME("(%p)->()\n", This);
1540     return E_NOTIMPL;
1541 }
1542
1543 static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, long *p)
1544 {
1545     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1546     FIXME("(%p)->()\n", This);
1547     return E_NOTIMPL;
1548 }
1549
1550 static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, long v)
1551 {
1552     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1553     FIXME("(%p)->()\n", This);
1554     return E_NOTIMPL;
1555 }
1556
1557 static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, long *p)
1558 {
1559     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1560     FIXME("(%p)->()\n", This);
1561     return E_NOTIMPL;
1562 }
1563
1564 static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, long v)
1565 {
1566     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1567     FIXME("(%p)->()\n", This);
1568     return E_NOTIMPL;
1569 }
1570
1571 static HRESULT WINAPI HTMLStyle_get_pixelHeight(IHTMLStyle *iface, long *p)
1572 {
1573     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1574     FIXME("(%p)->()\n", This);
1575     return E_NOTIMPL;
1576 }
1577
1578 static HRESULT WINAPI HTMLStyle_put_posTop(IHTMLStyle *iface, float v)
1579 {
1580     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1581     FIXME("(%p)->()\n", This);
1582     return E_NOTIMPL;
1583 }
1584
1585 static HRESULT WINAPI HTMLStyle_get_posTop(IHTMLStyle *iface, float *p)
1586 {
1587     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1588     FIXME("(%p)->()\n", This);
1589     return E_NOTIMPL;
1590 }
1591
1592 static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float v)
1593 {
1594     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1595     FIXME("(%p)->()\n", This);
1596     return E_NOTIMPL;
1597 }
1598
1599 static HRESULT WINAPI HTMLStyle_get_posLeft(IHTMLStyle *iface, float *p)
1600 {
1601     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1602     FIXME("(%p)->()\n", This);
1603     return E_NOTIMPL;
1604 }
1605
1606 static HRESULT WINAPI HTMLStyle_put_posWidth(IHTMLStyle *iface, float v)
1607 {
1608     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1609     FIXME("(%p)->()\n", This);
1610     return E_NOTIMPL;
1611 }
1612
1613 static HRESULT WINAPI HTMLStyle_get_posWidth(IHTMLStyle *iface, float *p)
1614 {
1615     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1616     FIXME("(%p)->()\n", This);
1617     return E_NOTIMPL;
1618 }
1619
1620 static HRESULT WINAPI HTMLStyle_put_posHeight(IHTMLStyle *iface, float v)
1621 {
1622     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1623     FIXME("(%p)->()\n", This);
1624     return E_NOTIMPL;
1625 }
1626
1627 static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p)
1628 {
1629     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1630     FIXME("(%p)->()\n", This);
1631     return E_NOTIMPL;
1632 }
1633
1634 static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v)
1635 {
1636     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1637     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1638     return E_NOTIMPL;
1639 }
1640
1641 static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p)
1642 {
1643     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1644     FIXME("(%p)->(%p)\n", This, p);
1645     return E_NOTIMPL;
1646 }
1647
1648 static HRESULT WINAPI HTMLStyle_put_clip(IHTMLStyle *iface, BSTR v)
1649 {
1650     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1651     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1652     return E_NOTIMPL;
1653 }
1654
1655 static HRESULT WINAPI HTMLStyle_get_clip(IHTMLStyle *iface, BSTR *p)
1656 {
1657     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1658     FIXME("(%p)->(%p)\n", This, p);
1659     return E_NOTIMPL;
1660 }
1661
1662 static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v)
1663 {
1664     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1665     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1666     return E_NOTIMPL;
1667 }
1668
1669 static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p)
1670 {
1671     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1672     FIXME("(%p)->(%p)\n", This, p);
1673     return E_NOTIMPL;
1674 }
1675
1676 static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttributeName,
1677         VARIANT AttributeValue, LONG lFlags)
1678 {
1679     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1680     FIXME("(%p)->(%s v%d %08x)\n", This, debugstr_w(strAttributeName),
1681           V_VT(&AttributeValue), lFlags);
1682     return E_NOTIMPL;
1683 }
1684
1685 static HRESULT WINAPI HTMLStyle_getAttribute(IHTMLStyle *iface, BSTR strAttributeName,
1686         LONG lFlags, VARIANT *AttributeValue)
1687 {
1688     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1689     FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
1690          lFlags, AttributeValue);
1691     return E_NOTIMPL;
1692 }
1693
1694 static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttributeName,
1695                                                 LONG lFlags, VARIANT_BOOL *pfSuccess)
1696 {
1697     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1698     FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
1699          lFlags, pfSuccess);
1700     return E_NOTIMPL;
1701 }
1702
1703 static HRESULT WINAPI HTMLStyle_toString(IHTMLStyle *iface, BSTR *String)
1704 {
1705     HTMLStyle *This = HTMLSTYLE_THIS(iface);
1706     FIXME("(%p)->(%p)\n", This, String);
1707     return E_NOTIMPL;
1708 }
1709
1710 static const IHTMLStyleVtbl HTMLStyleVtbl = {
1711     HTMLStyle_QueryInterface,
1712     HTMLStyle_AddRef,
1713     HTMLStyle_Release,
1714     HTMLStyle_GetTypeInfoCount,
1715     HTMLStyle_GetTypeInfo,
1716     HTMLStyle_GetIDsOfNames,
1717     HTMLStyle_Invoke,
1718     HTMLStyle_put_fontFamily,
1719     HTMLStyle_get_fontFamily,
1720     HTMLStyle_put_fontStyle,
1721     HTMLStyle_get_fontStyle,
1722     HTMLStyle_put_fontVariant,
1723     HTMLStyle_get_fontVariant,
1724     HTMLStyle_put_fontWeight,
1725     HTMLStyle_get_fontWeight,
1726     HTMLStyle_put_fontSize,
1727     HTMLStyle_get_fontSize,
1728     HTMLStyle_put_font,
1729     HTMLStyle_get_font,
1730     HTMLStyle_put_color,
1731     HTMLStyle_get_color,
1732     HTMLStyle_put_background,
1733     HTMLStyle_get_background,
1734     HTMLStyle_put_backgroundColor,
1735     HTMLStyle_get_backgroundColor,
1736     HTMLStyle_put_backgroundImage,
1737     HTMLStyle_get_backgroundImage,
1738     HTMLStyle_put_backgroundRepeat,
1739     HTMLStyle_get_backgroundRepeat,
1740     HTMLStyle_put_backgroundAttachment,
1741     HTMLStyle_get_backgroundAttachment,
1742     HTMLStyle_put_backgroundPosition,
1743     HTMLStyle_get_backgroundPosition,
1744     HTMLStyle_put_backgroundPositionX,
1745     HTMLStyle_get_backgroundPositionX,
1746     HTMLStyle_put_backgroundPositionY,
1747     HTMLStyle_get_backgroundPositionY,
1748     HTMLStyle_put_wordSpacing,
1749     HTMLStyle_get_wordSpacing,
1750     HTMLStyle_put_letterSpacing,
1751     HTMLStyle_get_letterSpacing,
1752     HTMLStyle_put_textDecoration,
1753     HTMLStyle_get_textDecoration,
1754     HTMLStyle_put_textDecorationNone,
1755     HTMLStyle_get_textDecorationNone,
1756     HTMLStyle_put_textDecorationUnderline,
1757     HTMLStyle_get_textDecorationUnderline,
1758     HTMLStyle_put_textDecorationOverline,
1759     HTMLStyle_get_textDecorationOverline,
1760     HTMLStyle_put_textDecorationLineThrough,
1761     HTMLStyle_get_textDecorationLineThrough,
1762     HTMLStyle_put_textDecorationBlink,
1763     HTMLStyle_get_textDecorationBlink,
1764     HTMLStyle_put_verticalAlign,
1765     HTMLStyle_get_verticalAlign,
1766     HTMLStyle_put_textTransform,
1767     HTMLStyle_get_textTransform,
1768     HTMLStyle_put_textAlign,
1769     HTMLStyle_get_textAlign,
1770     HTMLStyle_put_textIndent,
1771     HTMLStyle_get_textIndent,
1772     HTMLStyle_put_lineHeight,
1773     HTMLStyle_get_lineHeight,
1774     HTMLStyle_put_marginTop,
1775     HTMLStyle_get_marginTop,
1776     HTMLStyle_put_marginRight,
1777     HTMLStyle_get_marginRight,
1778     HTMLStyle_put_marginBottom,
1779     HTMLStyle_get_marginBottom,
1780     HTMLStyle_put_marginLeft,
1781     HTMLStyle_get_marginLeft,
1782     HTMLStyle_put_margin,
1783     HTMLStyle_get_margin,
1784     HTMLStyle_put_paddingTop,
1785     HTMLStyle_get_paddingTop,
1786     HTMLStyle_put_paddingRight,
1787     HTMLStyle_get_paddingRight,
1788     HTMLStyle_put_paddingBottom,
1789     HTMLStyle_get_paddingBottom,
1790     HTMLStyle_put_paddingLeft,
1791     HTMLStyle_get_paddingLeft,
1792     HTMLStyle_put_padding,
1793     HTMLStyle_get_padding,
1794     HTMLStyle_put_border,
1795     HTMLStyle_get_border,
1796     HTMLStyle_put_borderTop,
1797     HTMLStyle_get_borderTop,
1798     HTMLStyle_put_borderRight,
1799     HTMLStyle_get_borderRight,
1800     HTMLStyle_put_borderBottom,
1801     HTMLStyle_get_borderBottom,
1802     HTMLStyle_put_borderLeft,
1803     HTMLStyle_get_borderLeft,
1804     HTMLStyle_put_borderColor,
1805     HTMLStyle_get_borderColor,
1806     HTMLStyle_put_borderTopColor,
1807     HTMLStyle_get_borderTopColor,
1808     HTMLStyle_put_borderRightColor,
1809     HTMLStyle_get_borderRightColor,
1810     HTMLStyle_put_borderBottomColor,
1811     HTMLStyle_get_borderBottomColor,
1812     HTMLStyle_put_borderLeftColor,
1813     HTMLStyle_get_borderLeftColor,
1814     HTMLStyle_put_borderWidth,
1815     HTMLStyle_get_borderWidth,
1816     HTMLStyle_put_borderTopWidth,
1817     HTMLStyle_get_borderTopWidth,
1818     HTMLStyle_put_borderRightWidth,
1819     HTMLStyle_get_borderRightWidth,
1820     HTMLStyle_put_borderBottomWidth,
1821     HTMLStyle_get_borderBottomWidth,
1822     HTMLStyle_put_borderLeftWidth,
1823     HTMLStyle_get_borderLeftWidth,
1824     HTMLStyle_put_borderStyle,
1825     HTMLStyle_get_borderStyle,
1826     HTMLStyle_put_borderTopStyle,
1827     HTMLStyle_get_borderTopStyle,
1828     HTMLStyle_put_borderRightStyle,
1829     HTMLStyle_get_borderRightStyle,
1830     HTMLStyle_put_borderBottomStyle,
1831     HTMLStyle_get_borderBottomStyle,
1832     HTMLStyle_put_borderLeftStyle,
1833     HTMLStyle_get_borderLeftStyle,
1834     HTMLStyle_put_width,
1835     HTMLStyle_get_width,
1836     HTMLStyle_put_height,
1837     HTMLStyle_get_height,
1838     HTMLStyle_put_styleFloat,
1839     HTMLStyle_get_styleFloat,
1840     HTMLStyle_put_clear,
1841     HTMLStyle_get_clear,
1842     HTMLStyle_put_display,
1843     HTMLStyle_get_display,
1844     HTMLStyle_put_visibility,
1845     HTMLStyle_get_visibility,
1846     HTMLStyle_put_listStyleType,
1847     HTMLStyle_get_listStyleType,
1848     HTMLStyle_put_listStylePosition,
1849     HTMLStyle_get_listStylePosition,
1850     HTMLStyle_put_listStyleImage,
1851     HTMLStyle_get_listStyleImage,
1852     HTMLStyle_put_listStyle,
1853     HTMLStyle_get_listStyle,
1854     HTMLStyle_put_whiteSpace,
1855     HTMLStyle_get_whiteSpace,
1856     HTMLStyle_put_top,
1857     HTMLStyle_get_top,
1858     HTMLStyle_put_left,
1859     HTMLStyle_get_left,
1860     HTMLStyle_get_position,
1861     HTMLStyle_put_zIndex,
1862     HTMLStyle_get_zIndex,
1863     HTMLStyle_put_overflow,
1864     HTMLStyle_get_overflow,
1865     HTMLStyle_put_pageBreakBefore,
1866     HTMLStyle_get_pageBreakBefore,
1867     HTMLStyle_put_pageBreakAfter,
1868     HTMLStyle_get_pageBreakAfter,
1869     HTMLStyle_put_cssText,
1870     HTMLStyle_get_cssText,
1871     HTMLStyle_put_pixelTop,
1872     HTMLStyle_get_pixelTop,
1873     HTMLStyle_put_pixelLeft,
1874     HTMLStyle_get_pixelLeft,
1875     HTMLStyle_put_pixelWidth,
1876     HTMLStyle_get_pixelWidth,
1877     HTMLStyle_put_pixelHeight,
1878     HTMLStyle_get_pixelHeight,
1879     HTMLStyle_put_posTop,
1880     HTMLStyle_get_posTop,
1881     HTMLStyle_put_posLeft,
1882     HTMLStyle_get_posLeft,
1883     HTMLStyle_put_posWidth,
1884     HTMLStyle_get_posWidth,
1885     HTMLStyle_put_posHeight,
1886     HTMLStyle_get_posHeight,
1887     HTMLStyle_put_cursor,
1888     HTMLStyle_get_cursor,
1889     HTMLStyle_put_clip,
1890     HTMLStyle_get_clip,
1891     HTMLStyle_put_filter,
1892     HTMLStyle_get_filter,
1893     HTMLStyle_setAttribute,
1894     HTMLStyle_getAttribute,
1895     HTMLStyle_removeAttribute,
1896     HTMLStyle_toString
1897 };
1898
1899 static const tid_t HTMLStyle_iface_tids[] = {
1900     IHTMLStyle_tid,
1901     0
1902 };
1903 static dispex_static_data_t HTMLStyle_dispex = {
1904     NULL,
1905     DispHTMLStyle_tid,
1906     NULL,
1907     HTMLStyle_iface_tids
1908 };
1909
1910 IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle)
1911 {
1912     HTMLStyle *ret = heap_alloc(sizeof(HTMLStyle));
1913
1914     ret->lpHTMLStyleVtbl = &HTMLStyleVtbl;
1915     ret->ref = 1;
1916     ret->nsstyle = nsstyle;
1917
1918     nsIDOMCSSStyleDeclaration_AddRef(nsstyle);
1919
1920     init_dispex(&ret->dispex, (IUnknown*)HTMLSTYLE(ret),  &HTMLStyle_dispex);
1921
1922     return HTMLSTYLE(ret);
1923 }