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