push 6ad4febc802779d39881ae7cccabf16fa19e6741
[wine/hacks.git] / dlls / mshtml / htmlstyle.c
blobe90d723add233bd0c3ecb79eb26a7bd4733958f6
1 /*
2 * Copyright 2006 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include <stdarg.h>
21 #define COBJMACROS
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
27 #include "mshtmdid.h"
29 #include "mshtml_private.h"
30 #include "htmlstyle.h"
32 #include "wine/debug.h"
33 #include "wine/unicode.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 static const WCHAR attrBackground[] =
38 {'b','a','c','k','g','r','o','u','n','d',0};
39 static const WCHAR attrBackgroundColor[] =
40 {'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0};
41 static const WCHAR attrBackgroundImage[] =
42 {'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e',0};
43 static const WCHAR attrBorder[] =
44 {'b','o','r','d','e','r',0};
45 static const WCHAR attrBorderLeft[] =
46 {'b','o','r','d','e','r','-','l','e','f','t',0};
47 static const WCHAR attrBorderWidth[] =
48 {'b','o','r','d','e','r','-','w','i','d','t','h',0};
49 static const WCHAR attrColor[] =
50 {'c','o','l','o','r',0};
51 static const WCHAR attrCursor[] =
52 {'c','u','r','s','o','r',0};
53 static const WCHAR attrDisplay[] =
54 {'d','i','s','p','l','a','y',0};
55 static const WCHAR attrFilter[] =
56 {'f','i','l','e','t','e','r',0};
57 static const WCHAR attrFontFamily[] =
58 {'f','o','n','t','-','f','a','m','i','l','y',0};
59 static const WCHAR attrFontSize[] =
60 {'f','o','n','t','-','s','i','z','e',0};
61 static const WCHAR attrFontStyle[] =
62 {'f','o','n','t','-','s','t','y','l','e',0};
63 static const WCHAR attrFontWeight[] =
64 {'f','o','n','t','-','w','e','i','g','h','t',0};
65 static const WCHAR attrHeight[] =
66 {'h','e','i','g','h','t',0};
67 static const WCHAR attrLeft[] =
68 {'l','e','f','t',0};
69 static const WCHAR attrMargin[] =
70 {'m','a','r','g','i','n',0};
71 static const WCHAR attrMarginLeft[] =
72 {'m','a','r','g','i','n','-','l','e','f','t',0};
73 static const WCHAR attrMarginRight[] =
74 {'m','a','r','g','i','n','-','r','i','g','h','t',0};
75 static const WCHAR attrPaddingLeft[] =
76 {'p','a','d','d','i','n','g','-','l','e','f','t',0};
77 static const WCHAR attrPosition[] =
78 {'p','o','s','i','t','i','o','n',0};
79 static const WCHAR attrTextAlign[] =
80 {'t','e','x','t','-','a','l','i','g','n',0};
81 static const WCHAR attrTextDecoration[] =
82 {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
83 static const WCHAR attrTop[] =
84 {'t','o','p',0};
85 static const WCHAR attrVerticalAlign[] =
86 {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
87 static const WCHAR attrVisibility[] =
88 {'v','i','s','i','b','i','l','i','t','y',0};
89 static const WCHAR attrWidth[] =
90 {'w','i','d','t','h',0};
91 static const WCHAR attrZIndex[] =
92 {'z','-','i','n','d','e','x',0};
94 static const struct{
95 const WCHAR *name;
96 DISPID dispid;
97 } style_tbl[] = {
98 {attrBackground, DISPID_IHTMLSTYLE_BACKGROUND},
99 {attrBackgroundColor, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR},
100 {attrBackgroundImage, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE},
101 {attrBorder, DISPID_IHTMLSTYLE_BORDER},
102 {attrBorderLeft, DISPID_IHTMLSTYLE_BORDERLEFT},
103 {attrBorderWidth, DISPID_IHTMLSTYLE_BORDERWIDTH},
104 {attrColor, DISPID_IHTMLSTYLE_COLOR},
105 {attrCursor, DISPID_IHTMLSTYLE_CURSOR},
106 {attrDisplay, DISPID_IHTMLSTYLE_DISPLAY},
107 {attrFilter, DISPID_IHTMLSTYLE_FILTER},
108 {attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY},
109 {attrFontSize, DISPID_IHTMLSTYLE_FONTSIZE},
110 {attrFontStyle, DISPID_IHTMLSTYLE_FONTSTYLE},
111 {attrFontWeight, DISPID_IHTMLSTYLE_FONTWEIGHT},
112 {attrHeight, DISPID_IHTMLSTYLE_HEIGHT},
113 {attrLeft, DISPID_IHTMLSTYLE_LEFT},
114 {attrMargin, DISPID_IHTMLSTYLE_MARGIN},
115 {attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT},
116 {attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT},
117 {attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT},
118 {attrPosition, DISPID_IHTMLSTYLE2_POSITION},
119 {attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN},
120 {attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION},
121 {attrTop, DISPID_IHTMLSTYLE_TOP},
122 {attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN},
123 {attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY},
124 {attrWidth, DISPID_IHTMLSTYLE_WIDTH},
125 {attrZIndex, DISPID_IHTMLSTYLE_ZINDEX}
128 static const WCHAR valLineThrough[] =
129 {'l','i','n','e','-','t','h','r','o','u','g','h',0};
130 static const WCHAR valUnderline[] =
131 {'u','n','d','e','r','l','i','n','e',0};
133 static const WCHAR px_formatW[] = {'%','d','p','x',0};
134 static const WCHAR emptyW[] = {0};
136 static LPWSTR fix_px_value(LPCWSTR val)
138 LPCWSTR ptr = val;
140 while(*ptr) {
141 while(*ptr && isspaceW(*ptr))
142 ptr++;
143 if(!*ptr)
144 break;
146 while(*ptr && isdigitW(*ptr))
147 ptr++;
149 if(!*ptr || isspaceW(*ptr)) {
150 LPWSTR ret, p;
151 int len = strlenW(val)+1;
153 ret = heap_alloc((len+2)*sizeof(WCHAR));
154 memcpy(ret, val, (ptr-val)*sizeof(WCHAR));
155 p = ret + (ptr-val);
156 *p++ = 'p';
157 *p++ = 'x';
158 strcpyW(p, ptr);
160 TRACE("fixed %s -> %s\n", debugstr_w(val), debugstr_w(ret));
162 return ret;
165 while(*ptr && !isspaceW(*ptr))
166 ptr++;
169 return NULL;
172 static LPWSTR fix_url_value(LPCWSTR val)
174 WCHAR *ret, *ptr;
176 static const WCHAR urlW[] = {'u','r','l','('};
178 if(strncmpW(val, urlW, sizeof(urlW)/sizeof(WCHAR)) || !strchrW(val, '\\'))
179 return NULL;
181 ret = heap_strdupW(val);
183 for(ptr = ret; *ptr; ptr++) {
184 if(*ptr == '\\')
185 *ptr = '/';
188 return ret;
191 #define ATTR_FIX_PX 1
192 #define ATTR_FIX_URL 2
193 #define ATTR_STR_TO_INT 4
195 HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCWSTR value, DWORD flags)
197 nsAString str_name, str_value, str_empty;
198 LPWSTR val = NULL;
199 nsresult nsres;
201 static const PRUnichar wszEmpty[] = {0};
203 if(flags & ATTR_FIX_PX)
204 val = fix_px_value(value);
205 if(flags & ATTR_FIX_URL)
206 val = fix_url_value(value);
208 nsAString_Init(&str_name, style_tbl[sid].name);
209 nsAString_Init(&str_value, val ? val : value);
210 nsAString_Init(&str_empty, wszEmpty);
211 heap_free(val);
213 nsres = nsIDOMCSSStyleDeclaration_SetProperty(nsstyle, &str_name, &str_value, &str_empty);
214 if(NS_FAILED(nsres))
215 ERR("SetProperty failed: %08x\n", nsres);
217 nsAString_Finish(&str_name);
218 nsAString_Finish(&str_value);
219 nsAString_Finish(&str_empty);
221 return S_OK;
224 static HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags)
226 switch(V_VT(value)) {
227 case VT_NULL:
228 return set_nsstyle_attr(nsstyle, sid, emptyW, flags);
230 case VT_BSTR:
231 return set_nsstyle_attr(nsstyle, sid, V_BSTR(value), flags);
233 default:
234 FIXME("not implemented vt %d\n", V_VT(value));
235 return E_NOTIMPL;
239 return S_OK;
242 static inline HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWORD flags)
244 return set_nsstyle_attr(This->nsstyle, sid, value, flags);
247 static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value)
249 nsAString str_name;
250 nsresult nsres;
252 nsAString_Init(&str_name, style_tbl[sid].name);
254 nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle, &str_name, value);
255 if(NS_FAILED(nsres)) {
256 ERR("SetProperty failed: %08x\n", nsres);
257 return E_FAIL;
260 nsAString_Finish(&str_name);
262 return NS_OK;
265 HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p)
267 nsAString str_value;
268 const PRUnichar *value;
270 nsAString_Init(&str_value, NULL);
272 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
274 nsAString_GetData(&str_value, &value);
275 *p = *value ? SysAllocString(value) : NULL;
277 nsAString_Finish(&str_value);
279 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p));
280 return S_OK;
283 HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags)
285 nsAString str_value;
286 const PRUnichar *value;
287 BOOL set = FALSE;
289 nsAString_Init(&str_value, NULL);
291 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
293 nsAString_GetData(&str_value, &value);
295 if(flags & ATTR_STR_TO_INT) {
296 const PRUnichar *ptr = value;
297 BOOL neg = FALSE;
298 INT i = 0;
300 if(*ptr == '-') {
301 neg = TRUE;
302 ptr++;
305 while(isdigitW(*ptr))
306 i = i*10 + (*ptr++ - '0');
308 if(!*ptr) {
309 V_VT(p) = VT_I4;
310 V_I4(p) = neg ? -i : i;
311 set = TRUE;
315 if(!set) {
316 BSTR str = NULL;
318 if(*value) {
319 str = SysAllocString(value);
320 if(!str)
321 return E_OUTOFMEMORY;
324 V_VT(p) = VT_BSTR;
325 V_BSTR(p) = str;
328 nsAString_Finish(&str_value);
330 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_variant(p));
331 return S_OK;
334 static inline HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p)
336 return get_nsstyle_attr(This->nsstyle, sid, p);
339 static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p)
341 nsAString str_value;
342 const PRUnichar *value;
344 nsAString_Init(&str_value, NULL);
346 get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
348 nsAString_GetData(&str_value, &value);
349 *p = strcmpW(value, exval) ? VARIANT_FALSE : VARIANT_TRUE;
350 nsAString_Finish(&str_value);
352 TRACE("%s -> %x\n", debugstr_w(style_tbl[sid].name), *p);
353 return S_OK;
356 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
358 static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, void **ppv)
360 HTMLStyle *This = HTMLSTYLE_THIS(iface);
362 *ppv = NULL;
364 if(IsEqualGUID(&IID_IUnknown, riid)) {
365 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
366 *ppv = HTMLSTYLE(This);
367 }else if(IsEqualGUID(&IID_IHTMLStyle, riid)) {
368 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This, ppv);
369 *ppv = HTMLSTYLE(This);
370 }else if(IsEqualGUID(&IID_IHTMLStyle2, riid)) {
371 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This, ppv);
372 *ppv = HTMLSTYLE2(This);
373 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
374 return *ppv ? S_OK : E_NOINTERFACE;
377 if(*ppv) {
378 IUnknown_AddRef((IUnknown*)*ppv);
379 return S_OK;
382 WARN("unsupported %s\n", debugstr_guid(riid));
383 return E_NOINTERFACE;
386 static ULONG WINAPI HTMLStyle_AddRef(IHTMLStyle *iface)
388 HTMLStyle *This = HTMLSTYLE_THIS(iface);
389 LONG ref = InterlockedIncrement(&This->ref);
391 TRACE("(%p) ref=%d\n", This, ref);
393 return ref;
396 static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
398 HTMLStyle *This = HTMLSTYLE_THIS(iface);
399 LONG ref = InterlockedDecrement(&This->ref);
401 TRACE("(%p) ref=%d\n", This, ref);
403 if(!ref) {
404 if(This->nsstyle)
405 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
406 heap_free(This);
409 return ref;
412 static HRESULT WINAPI HTMLStyle_GetTypeInfoCount(IHTMLStyle *iface, UINT *pctinfo)
414 HTMLStyle *This = HTMLSTYLE_THIS(iface);
415 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
418 static HRESULT WINAPI HTMLStyle_GetTypeInfo(IHTMLStyle *iface, UINT iTInfo,
419 LCID lcid, ITypeInfo **ppTInfo)
421 HTMLStyle *This = HTMLSTYLE_THIS(iface);
422 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
425 static HRESULT WINAPI HTMLStyle_GetIDsOfNames(IHTMLStyle *iface, REFIID riid,
426 LPOLESTR *rgszNames, UINT cNames,
427 LCID lcid, DISPID *rgDispId)
429 HTMLStyle *This = HTMLSTYLE_THIS(iface);
430 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
433 static HRESULT WINAPI HTMLStyle_Invoke(IHTMLStyle *iface, DISPID dispIdMember,
434 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
435 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
437 HTMLStyle *This = HTMLSTYLE_THIS(iface);
438 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
439 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
442 static HRESULT WINAPI HTMLStyle_put_fontFamily(IHTMLStyle *iface, BSTR v)
444 HTMLStyle *This = HTMLSTYLE_THIS(iface);
446 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
448 return set_style_attr(This, STYLEID_FONT_FAMILY, v, 0);
451 static HRESULT WINAPI HTMLStyle_get_fontFamily(IHTMLStyle *iface, BSTR *p)
453 HTMLStyle *This = HTMLSTYLE_THIS(iface);
455 TRACE("(%p)->(%p)\n", This, p);
457 return get_style_attr(This, STYLEID_FONT_FAMILY, p);
460 static HRESULT WINAPI HTMLStyle_put_fontStyle(IHTMLStyle *iface, BSTR v)
462 HTMLStyle *This = HTMLSTYLE_THIS(iface);
463 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
464 return E_NOTIMPL;
467 static HRESULT WINAPI HTMLStyle_get_fontStyle(IHTMLStyle *iface, BSTR *p)
469 HTMLStyle *This = HTMLSTYLE_THIS(iface);
471 TRACE("(%p)->(%p)\n", This, p);
473 return get_style_attr(This, STYLEID_FONT_STYLE, p);
476 static HRESULT WINAPI HTMLStyle_put_fontVariant(IHTMLStyle *iface, BSTR v)
478 HTMLStyle *This = HTMLSTYLE_THIS(iface);
479 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
480 return E_NOTIMPL;
483 static HRESULT WINAPI HTMLStyle_get_fontVariant(IHTMLStyle *iface, BSTR *p)
485 HTMLStyle *This = HTMLSTYLE_THIS(iface);
486 FIXME("(%p)->(%p)\n", This, p);
487 return E_NOTIMPL;
490 static HRESULT WINAPI HTMLStyle_put_fontWeight(IHTMLStyle *iface, BSTR v)
492 HTMLStyle *This = HTMLSTYLE_THIS(iface);
493 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
494 return E_NOTIMPL;
497 static HRESULT WINAPI HTMLStyle_get_fontWeight(IHTMLStyle *iface, BSTR *p)
499 HTMLStyle *This = HTMLSTYLE_THIS(iface);
501 TRACE("(%p)->(%p)\n", This, p);
503 return get_style_attr(This, STYLEID_FONT_WEIGHT, p);
506 static HRESULT WINAPI HTMLStyle_put_fontSize(IHTMLStyle *iface, VARIANT v)
508 HTMLStyle *This = HTMLSTYLE_THIS(iface);
510 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
512 switch(V_VT(&v)) {
513 case VT_BSTR:
514 return set_style_attr(This, STYLEID_FONT_SIZE, V_BSTR(&v), 0);
515 default:
516 FIXME("not supported vt %d\n", V_VT(&v));
519 return S_OK;
522 static HRESULT WINAPI HTMLStyle_get_fontSize(IHTMLStyle *iface, VARIANT *p)
524 HTMLStyle *This = HTMLSTYLE_THIS(iface);
526 TRACE("(%p)->(%p)\n", This, p);
528 V_VT(p) = VT_BSTR;
529 return get_style_attr(This, STYLEID_FONT_SIZE, &V_BSTR(p));
532 static HRESULT WINAPI HTMLStyle_put_font(IHTMLStyle *iface, BSTR v)
534 HTMLStyle *This = HTMLSTYLE_THIS(iface);
535 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
536 return E_NOTIMPL;
539 static HRESULT WINAPI HTMLStyle_get_font(IHTMLStyle *iface, BSTR *p)
541 HTMLStyle *This = HTMLSTYLE_THIS(iface);
542 FIXME("(%p)->(%p)\n", This, p);
543 return E_NOTIMPL;
546 static HRESULT WINAPI HTMLStyle_put_color(IHTMLStyle *iface, VARIANT v)
548 HTMLStyle *This = HTMLSTYLE_THIS(iface);
550 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
552 switch(V_VT(&v)) {
553 case VT_BSTR:
554 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
555 return set_style_attr(This, STYLEID_COLOR, V_BSTR(&v), 0);
557 default:
558 FIXME("unsupported vt=%d\n", V_VT(&v));
561 return E_NOTIMPL;
564 static HRESULT WINAPI HTMLStyle_get_color(IHTMLStyle *iface, VARIANT *p)
566 HTMLStyle *This = HTMLSTYLE_THIS(iface);
568 TRACE("(%p)->(%p)\n", This, p);
570 V_VT(p) = VT_BSTR;
571 return get_style_attr(This, STYLEID_COLOR, &V_BSTR(p));
574 static HRESULT WINAPI HTMLStyle_put_background(IHTMLStyle *iface, BSTR v)
576 HTMLStyle *This = HTMLSTYLE_THIS(iface);
578 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
580 return set_style_attr(This, STYLEID_BACKGROUND, v, 0);
583 static HRESULT WINAPI HTMLStyle_get_background(IHTMLStyle *iface, BSTR *p)
585 HTMLStyle *This = HTMLSTYLE_THIS(iface);
587 TRACE("(%p)->(%p)\n", This, p);
589 return get_style_attr(This, STYLEID_BACKGROUND, p);
592 static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v)
594 HTMLStyle *This = HTMLSTYLE_THIS(iface);
596 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
598 switch(V_VT(&v)) {
599 case VT_BSTR:
600 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, V_BSTR(&v), 0);
601 case VT_I4: {
602 WCHAR value[10];
603 static const WCHAR format[] = {'#','%','0','6','x',0};
605 wsprintfW(value, format, V_I4(&v));
606 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, value, 0);
608 default:
609 FIXME("unsupported vt %d\n", V_VT(&v));
612 return S_OK;
615 static HRESULT WINAPI HTMLStyle_get_backgroundColor(IHTMLStyle *iface, VARIANT *p)
617 HTMLStyle *This = HTMLSTYLE_THIS(iface);
618 FIXME("(%p)->(%p)\n", This, p);
619 return E_NOTIMPL;
622 static HRESULT WINAPI HTMLStyle_put_backgroundImage(IHTMLStyle *iface, BSTR v)
624 HTMLStyle *This = HTMLSTYLE_THIS(iface);
626 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
628 return set_style_attr(This, STYLEID_BACKGROUND_IMAGE, v, ATTR_FIX_URL);
631 static HRESULT WINAPI HTMLStyle_get_backgroundImage(IHTMLStyle *iface, BSTR *p)
633 HTMLStyle *This = HTMLSTYLE_THIS(iface);
634 FIXME("(%p)->(%p)\n", This, p);
635 return E_NOTIMPL;
638 static HRESULT WINAPI HTMLStyle_put_backgroundRepeat(IHTMLStyle *iface, BSTR v)
640 HTMLStyle *This = HTMLSTYLE_THIS(iface);
641 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
642 return E_NOTIMPL;
645 static HRESULT WINAPI HTMLStyle_get_backgroundRepeat(IHTMLStyle *iface, BSTR *p)
647 HTMLStyle *This = HTMLSTYLE_THIS(iface);
648 FIXME("(%p)->(%p)\n", This, p);
649 return E_NOTIMPL;
652 static HRESULT WINAPI HTMLStyle_put_backgroundAttachment(IHTMLStyle *iface, BSTR v)
654 HTMLStyle *This = HTMLSTYLE_THIS(iface);
655 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
656 return E_NOTIMPL;
659 static HRESULT WINAPI HTMLStyle_get_backgroundAttachment(IHTMLStyle *iface, BSTR *p)
661 HTMLStyle *This = HTMLSTYLE_THIS(iface);
662 FIXME("(%p)->(%p)\n", This, p);
663 return E_NOTIMPL;
666 static HRESULT WINAPI HTMLStyle_put_backgroundPosition(IHTMLStyle *iface, BSTR v)
668 HTMLStyle *This = HTMLSTYLE_THIS(iface);
669 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
670 return E_NOTIMPL;
673 static HRESULT WINAPI HTMLStyle_get_backgroundPosition(IHTMLStyle *iface, BSTR *p)
675 HTMLStyle *This = HTMLSTYLE_THIS(iface);
676 FIXME("(%p)->(%p)\n", This, p);
677 return E_NOTIMPL;
680 static HRESULT WINAPI HTMLStyle_put_backgroundPositionX(IHTMLStyle *iface, VARIANT v)
682 HTMLStyle *This = HTMLSTYLE_THIS(iface);
683 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
684 return E_NOTIMPL;
687 static HRESULT WINAPI HTMLStyle_get_backgroundPositionX(IHTMLStyle *iface, VARIANT *p)
689 HTMLStyle *This = HTMLSTYLE_THIS(iface);
690 FIXME("(%p)->(%p)\n", This, p);
691 return E_NOTIMPL;
694 static HRESULT WINAPI HTMLStyle_put_backgroundPositionY(IHTMLStyle *iface, VARIANT v)
696 HTMLStyle *This = HTMLSTYLE_THIS(iface);
697 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
698 return E_NOTIMPL;
701 static HRESULT WINAPI HTMLStyle_get_backgroundPositionY(IHTMLStyle *iface, VARIANT *p)
703 HTMLStyle *This = HTMLSTYLE_THIS(iface);
704 FIXME("(%p)->(%p)\n", This, p);
705 return E_NOTIMPL;
708 static HRESULT WINAPI HTMLStyle_put_wordSpacing(IHTMLStyle *iface, VARIANT v)
710 HTMLStyle *This = HTMLSTYLE_THIS(iface);
711 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
712 return E_NOTIMPL;
715 static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p)
717 HTMLStyle *This = HTMLSTYLE_THIS(iface);
718 FIXME("(%p)->(%p)\n", This, p);
719 return E_NOTIMPL;
722 static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
724 HTMLStyle *This = HTMLSTYLE_THIS(iface);
725 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
726 return E_NOTIMPL;
729 static HRESULT WINAPI HTMLStyle_get_letterSpacing(IHTMLStyle *iface, VARIANT *p)
731 HTMLStyle *This = HTMLSTYLE_THIS(iface);
732 FIXME("(%p)->(%p)\n", This, p);
733 return E_NOTIMPL;
736 static HRESULT WINAPI HTMLStyle_put_textDecoration(IHTMLStyle *iface, BSTR v)
738 HTMLStyle *This = HTMLSTYLE_THIS(iface);
739 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
740 return E_NOTIMPL;
743 static HRESULT WINAPI HTMLStyle_get_textDecoration(IHTMLStyle *iface, BSTR *p)
745 HTMLStyle *This = HTMLSTYLE_THIS(iface);
747 TRACE("(%p)->(%p)\n", This, p);
749 return get_style_attr(This, STYLEID_TEXT_DECORATION, p);
752 static HRESULT WINAPI HTMLStyle_put_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL v)
754 HTMLStyle *This = HTMLSTYLE_THIS(iface);
755 FIXME("(%p)->(%x)\n", This, v);
756 return E_NOTIMPL;
759 static HRESULT WINAPI HTMLStyle_get_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL *p)
761 HTMLStyle *This = HTMLSTYLE_THIS(iface);
762 FIXME("(%p)->(%p)\n", This, p);
763 return E_NOTIMPL;
766 static HRESULT WINAPI HTMLStyle_put_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL v)
768 HTMLStyle *This = HTMLSTYLE_THIS(iface);
769 FIXME("(%p)->(%x)\n", This, v);
770 return E_NOTIMPL;
773 static HRESULT WINAPI HTMLStyle_get_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL *p)
775 HTMLStyle *This = HTMLSTYLE_THIS(iface);
777 TRACE("(%p)->(%p)\n", This, p);
779 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valUnderline, p);
782 static HRESULT WINAPI HTMLStyle_put_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL v)
784 HTMLStyle *This = HTMLSTYLE_THIS(iface);
785 FIXME("(%p)->(%x)\n", This, v);
786 return E_NOTIMPL;
789 static HRESULT WINAPI HTMLStyle_get_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL *p)
791 HTMLStyle *This = HTMLSTYLE_THIS(iface);
792 FIXME("(%p)->(%p)\n", This, p);
793 return E_NOTIMPL;
796 static HRESULT WINAPI HTMLStyle_put_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL v)
798 HTMLStyle *This = HTMLSTYLE_THIS(iface);
799 FIXME("(%p)->(%x)\n", This, v);
800 return E_NOTIMPL;
803 static HRESULT WINAPI HTMLStyle_get_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL *p)
805 HTMLStyle *This = HTMLSTYLE_THIS(iface);
807 TRACE("(%p)->(%p)\n", This, p);
809 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valLineThrough, p);
812 static HRESULT WINAPI HTMLStyle_put_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL v)
814 HTMLStyle *This = HTMLSTYLE_THIS(iface);
815 FIXME("(%p)->(%x)\n", This, v);
816 return E_NOTIMPL;
819 static HRESULT WINAPI HTMLStyle_get_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL *p)
821 HTMLStyle *This = HTMLSTYLE_THIS(iface);
822 FIXME("(%p)->(%p)\n", This, p);
823 return E_NOTIMPL;
826 static HRESULT WINAPI HTMLStyle_put_verticalAlign(IHTMLStyle *iface, VARIANT v)
828 HTMLStyle *This = HTMLSTYLE_THIS(iface);
830 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
832 switch(V_VT(&v)) {
833 case VT_BSTR:
834 return set_style_attr(This, STYLEID_VERTICAL_ALIGN, V_BSTR(&v), 0);
835 default:
836 FIXME("not implemented vt %d\n", V_VT(&v));
837 return E_NOTIMPL;
840 return S_OK;
843 static HRESULT WINAPI HTMLStyle_get_verticalAlign(IHTMLStyle *iface, VARIANT *p)
845 HTMLStyle *This = HTMLSTYLE_THIS(iface);
846 BSTR ret;
847 HRESULT hres;
849 TRACE("(%p)->(%p)\n", This, p);
851 hres = get_style_attr(This, STYLEID_VERTICAL_ALIGN, &ret);
852 if(FAILED(hres))
853 return hres;
855 V_VT(p) = VT_BSTR;
856 V_BSTR(p) = ret;
857 return S_OK;
860 static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v)
862 HTMLStyle *This = HTMLSTYLE_THIS(iface);
863 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
864 return E_NOTIMPL;
867 static HRESULT WINAPI HTMLStyle_get_textTransform(IHTMLStyle *iface, BSTR *p)
869 HTMLStyle *This = HTMLSTYLE_THIS(iface);
870 FIXME("(%p)->(%p)\n", This, p);
871 return E_NOTIMPL;
874 static HRESULT WINAPI HTMLStyle_put_textAlign(IHTMLStyle *iface, BSTR v)
876 HTMLStyle *This = HTMLSTYLE_THIS(iface);
878 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
880 return set_style_attr(This, STYLEID_TEXT_ALIGN, v, 0);
883 static HRESULT WINAPI HTMLStyle_get_textAlign(IHTMLStyle *iface, BSTR *p)
885 HTMLStyle *This = HTMLSTYLE_THIS(iface);
887 TRACE("(%p)->(%p)\n", This, p);
889 return get_style_attr(This, STYLEID_TEXT_ALIGN, p);
892 static HRESULT WINAPI HTMLStyle_put_textIndent(IHTMLStyle *iface, VARIANT v)
894 HTMLStyle *This = HTMLSTYLE_THIS(iface);
895 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
896 return E_NOTIMPL;
899 static HRESULT WINAPI HTMLStyle_get_textIndent(IHTMLStyle *iface, VARIANT *p)
901 HTMLStyle *This = HTMLSTYLE_THIS(iface);
902 FIXME("(%p)->(%p)\n", This, p);
903 return E_NOTIMPL;
906 static HRESULT WINAPI HTMLStyle_put_lineHeight(IHTMLStyle *iface, VARIANT v)
908 HTMLStyle *This = HTMLSTYLE_THIS(iface);
909 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
910 return E_NOTIMPL;
913 static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
915 HTMLStyle *This = HTMLSTYLE_THIS(iface);
916 FIXME("(%p)->(%p)\n", This, p);
917 return E_NOTIMPL;
920 static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
922 HTMLStyle *This = HTMLSTYLE_THIS(iface);
923 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
924 return E_NOTIMPL;
927 static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
929 HTMLStyle *This = HTMLSTYLE_THIS(iface);
930 FIXME("(%p)->(%p)\n", This, p);
931 return E_NOTIMPL;
934 static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
936 HTMLStyle *This = HTMLSTYLE_THIS(iface);
938 TRACE("(%p)->(v(%d))\n", This, V_VT(&v));
940 switch(V_VT(&v)) {
941 case VT_NULL:
942 return set_style_attr(This, STYLEID_MARGIN_RIGHT, emptyW, 0);
943 case VT_I4: {
944 WCHAR buf[14];
946 wsprintfW(buf, px_formatW, V_I4(&v));
947 return set_style_attr(This, STYLEID_MARGIN_RIGHT, buf, 0);
949 case VT_BSTR:
950 return set_style_attr(This, STYLEID_MARGIN_RIGHT, V_BSTR(&v), 0);
951 default:
952 FIXME("Unsupported vt=%d\n", V_VT(&v));
955 return E_NOTIMPL;
958 static HRESULT WINAPI HTMLStyle_get_marginRight(IHTMLStyle *iface, VARIANT *p)
960 HTMLStyle *This = HTMLSTYLE_THIS(iface);
961 FIXME("(%p)->(%p)\n", This, p);
962 return E_NOTIMPL;
965 static HRESULT WINAPI HTMLStyle_put_marginBottom(IHTMLStyle *iface, VARIANT v)
967 HTMLStyle *This = HTMLSTYLE_THIS(iface);
968 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
969 return E_NOTIMPL;
972 static HRESULT WINAPI HTMLStyle_get_marginBottom(IHTMLStyle *iface, VARIANT *p)
974 HTMLStyle *This = HTMLSTYLE_THIS(iface);
975 FIXME("(%p)->(%p)\n", This, p);
976 return E_NOTIMPL;
979 static HRESULT WINAPI HTMLStyle_put_marginLeft(IHTMLStyle *iface, VARIANT v)
981 HTMLStyle *This = HTMLSTYLE_THIS(iface);
983 switch(V_VT(&v)) {
984 case VT_NULL:
985 TRACE("(%p)->(NULL)\n", This);
986 return set_style_attr(This, STYLEID_MARGIN_LEFT, emptyW, 0);
987 case VT_I4: {
988 WCHAR buf[14];
990 TRACE("(%p)->(%d)\n", This, V_I4(&v));
992 wsprintfW(buf, px_formatW, V_I4(&v));
993 return set_style_attr(This, STYLEID_MARGIN_LEFT, buf, 0);
995 case VT_BSTR:
996 TRACE("(%p)->(%s)\n", This, debugstr_w(V_BSTR(&v)));
997 return set_style_attr(This, STYLEID_MARGIN_LEFT, V_BSTR(&v), 0);
998 default:
999 FIXME("Unsupported vt=%d\n", V_VT(&v));
1002 return E_NOTIMPL;
1005 static HRESULT WINAPI HTMLStyle_put_margin(IHTMLStyle *iface, BSTR v)
1007 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1009 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1011 return set_style_attr(This, STYLEID_MARGIN, v, 0);
1014 static HRESULT WINAPI HTMLStyle_get_margin(IHTMLStyle *iface, BSTR *p)
1016 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1018 TRACE("(%p)->(%p)\n", This, p);
1020 return get_style_attr(This, STYLEID_MARGIN, p);
1023 static HRESULT WINAPI HTMLStyle_get_marginLeft(IHTMLStyle *iface, VARIANT *p)
1025 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1026 FIXME("(%p)->(%p)\n", This, p);
1027 return E_NOTIMPL;
1030 static HRESULT WINAPI HTMLStyle_put_paddingTop(IHTMLStyle *iface, VARIANT v)
1032 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1033 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1034 return E_NOTIMPL;
1037 static HRESULT WINAPI HTMLStyle_get_paddingTop(IHTMLStyle *iface, VARIANT *p)
1039 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1040 FIXME("(%p)->(%p)\n", This, p);
1041 return E_NOTIMPL;
1044 static HRESULT WINAPI HTMLStyle_put_paddingRight(IHTMLStyle *iface, VARIANT v)
1046 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1047 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1048 return E_NOTIMPL;
1051 static HRESULT WINAPI HTMLStyle_get_paddingRight(IHTMLStyle *iface, VARIANT *p)
1053 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1054 FIXME("(%p)->(%p)\n", This, p);
1055 return E_NOTIMPL;
1058 static HRESULT WINAPI HTMLStyle_put_paddingBottom(IHTMLStyle *iface, VARIANT v)
1060 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1061 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1062 return E_NOTIMPL;
1065 static HRESULT WINAPI HTMLStyle_get_paddingBottom(IHTMLStyle *iface, VARIANT *p)
1067 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1068 FIXME("(%p)->(%p)\n", This, p);
1069 return E_NOTIMPL;
1072 static HRESULT WINAPI HTMLStyle_put_paddingLeft(IHTMLStyle *iface, VARIANT v)
1074 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1076 TRACE("(%p)->(vt=%d)\n", This, V_VT(&v));
1078 switch(V_VT(&v)) {
1079 case VT_I4: {
1080 WCHAR buf[14];
1082 wsprintfW(buf, px_formatW, V_I4(&v));
1083 return set_style_attr(This, STYLEID_PADDING_LEFT, buf, 0);
1085 case VT_BSTR:
1086 return set_style_attr(This, STYLEID_PADDING_LEFT, V_BSTR(&v), 0);
1087 default:
1088 FIXME("unsupported vt=%d\n", V_VT(&v));
1091 return E_NOTIMPL;
1094 static HRESULT WINAPI HTMLStyle_get_paddingLeft(IHTMLStyle *iface, VARIANT *p)
1096 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1097 FIXME("(%p)->(%p)\n", This, p);
1098 return E_NOTIMPL;
1101 static HRESULT WINAPI HTMLStyle_put_padding(IHTMLStyle *iface, BSTR v)
1103 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1104 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1105 return E_NOTIMPL;
1108 static HRESULT WINAPI HTMLStyle_get_padding(IHTMLStyle *iface, BSTR *p)
1110 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1111 FIXME("(%p)->(%p)\n", This, p);
1112 return E_NOTIMPL;
1115 static HRESULT WINAPI HTMLStyle_put_border(IHTMLStyle *iface, BSTR v)
1117 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1119 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1121 return set_style_attr(This, STYLEID_BORDER, v, 0);
1124 static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p)
1126 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1128 TRACE("(%p)->(%p)\n", This, p);
1130 return get_style_attr(This, STYLEID_BORDER, p);
1133 static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
1135 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1136 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1137 return E_NOTIMPL;
1140 static HRESULT WINAPI HTMLStyle_get_borderTop(IHTMLStyle *iface, BSTR *p)
1142 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1143 FIXME("(%p)->(%p)\n", This, p);
1144 return E_NOTIMPL;
1147 static HRESULT WINAPI HTMLStyle_put_borderRight(IHTMLStyle *iface, BSTR v)
1149 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1150 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1151 return E_NOTIMPL;
1154 static HRESULT WINAPI HTMLStyle_get_borderRight(IHTMLStyle *iface, BSTR *p)
1156 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1157 FIXME("(%p)->(%p)\n", This, p);
1158 return E_NOTIMPL;
1161 static HRESULT WINAPI HTMLStyle_put_borderBottom(IHTMLStyle *iface, BSTR v)
1163 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1164 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1165 return E_NOTIMPL;
1168 static HRESULT WINAPI HTMLStyle_get_borderBottom(IHTMLStyle *iface, BSTR *p)
1170 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1171 FIXME("(%p)->(%p)\n", This, p);
1172 return E_NOTIMPL;
1175 static HRESULT WINAPI HTMLStyle_put_borderLeft(IHTMLStyle *iface, BSTR v)
1177 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1179 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1181 return set_style_attr(This, STYLEID_BORDER_LEFT, v, ATTR_FIX_PX);
1184 static HRESULT WINAPI HTMLStyle_get_borderLeft(IHTMLStyle *iface, BSTR *p)
1186 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1187 FIXME("(%p)->(%p)\n", This, p);
1188 return E_NOTIMPL;
1191 static HRESULT WINAPI HTMLStyle_put_borderColor(IHTMLStyle *iface, BSTR v)
1193 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1194 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1195 return E_NOTIMPL;
1198 static HRESULT WINAPI HTMLStyle_get_borderColor(IHTMLStyle *iface, BSTR *p)
1200 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1201 FIXME("(%p)->(%p)\n", This, p);
1202 return E_NOTIMPL;
1205 static HRESULT WINAPI HTMLStyle_put_borderTopColor(IHTMLStyle *iface, VARIANT v)
1207 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1208 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1209 return E_NOTIMPL;
1212 static HRESULT WINAPI HTMLStyle_get_borderTopColor(IHTMLStyle *iface, VARIANT *p)
1214 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1215 FIXME("(%p)->(%p)\n", This, p);
1216 return E_NOTIMPL;
1219 static HRESULT WINAPI HTMLStyle_put_borderRightColor(IHTMLStyle *iface, VARIANT v)
1221 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1222 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1223 return E_NOTIMPL;
1226 static HRESULT WINAPI HTMLStyle_get_borderRightColor(IHTMLStyle *iface, VARIANT *p)
1228 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1229 FIXME("(%p)->(%p)\n", This, p);
1230 return E_NOTIMPL;
1233 static HRESULT WINAPI HTMLStyle_put_borderBottomColor(IHTMLStyle *iface, VARIANT v)
1235 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1236 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1237 return E_NOTIMPL;
1240 static HRESULT WINAPI HTMLStyle_get_borderBottomColor(IHTMLStyle *iface, VARIANT *p)
1242 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1243 FIXME("(%p)->(%p)\n", This, p);
1244 return E_NOTIMPL;
1247 static HRESULT WINAPI HTMLStyle_put_borderLeftColor(IHTMLStyle *iface, VARIANT v)
1249 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1250 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1251 return E_NOTIMPL;
1254 static HRESULT WINAPI HTMLStyle_get_borderLeftColor(IHTMLStyle *iface, VARIANT *p)
1256 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1257 FIXME("(%p)->(%p)\n", This, p);
1258 return E_NOTIMPL;
1261 static HRESULT WINAPI HTMLStyle_put_borderWidth(IHTMLStyle *iface, BSTR v)
1263 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1264 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1265 return set_style_attr(This, STYLEID_BORDER_WIDTH, v, ATTR_FIX_PX);
1268 static HRESULT WINAPI HTMLStyle_get_borderWidth(IHTMLStyle *iface, BSTR *p)
1270 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1271 TRACE("(%p)->(%p)\n", This, p);
1272 return get_style_attr(This, STYLEID_BORDER_WIDTH, p);
1275 static HRESULT WINAPI HTMLStyle_put_borderTopWidth(IHTMLStyle *iface, VARIANT v)
1277 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1278 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1279 return E_NOTIMPL;
1282 static HRESULT WINAPI HTMLStyle_get_borderTopWidth(IHTMLStyle *iface, VARIANT *p)
1284 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1285 FIXME("(%p)->(%p)\n", This, p);
1286 return E_NOTIMPL;
1289 static HRESULT WINAPI HTMLStyle_put_borderRightWidth(IHTMLStyle *iface, VARIANT v)
1291 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1292 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1293 return E_NOTIMPL;
1296 static HRESULT WINAPI HTMLStyle_get_borderRightWidth(IHTMLStyle *iface, VARIANT *p)
1298 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1299 FIXME("(%p)->(%p)\n", This, p);
1300 return E_NOTIMPL;
1303 static HRESULT WINAPI HTMLStyle_put_borderBottomWidth(IHTMLStyle *iface, VARIANT v)
1305 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1306 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1307 return E_NOTIMPL;
1310 static HRESULT WINAPI HTMLStyle_get_borderBottomWidth(IHTMLStyle *iface, VARIANT *p)
1312 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1313 FIXME("(%p)->(%p)\n", This, p);
1314 return E_NOTIMPL;
1317 static HRESULT WINAPI HTMLStyle_put_borderLeftWidth(IHTMLStyle *iface, VARIANT v)
1319 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1320 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1321 return E_NOTIMPL;
1324 static HRESULT WINAPI HTMLStyle_get_borderLeftWidth(IHTMLStyle *iface, VARIANT *p)
1326 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1327 FIXME("(%p)->(%p)\n", This, p);
1328 return E_NOTIMPL;
1331 static HRESULT WINAPI HTMLStyle_put_borderStyle(IHTMLStyle *iface, BSTR v)
1333 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1334 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1335 return E_NOTIMPL;
1338 static HRESULT WINAPI HTMLStyle_get_borderStyle(IHTMLStyle *iface, BSTR *p)
1340 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1341 FIXME("(%p)->(%p)\n", This, p);
1342 return E_NOTIMPL;
1345 static HRESULT WINAPI HTMLStyle_put_borderTopStyle(IHTMLStyle *iface, BSTR v)
1347 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1348 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1349 return E_NOTIMPL;
1352 static HRESULT WINAPI HTMLStyle_get_borderTopStyle(IHTMLStyle *iface, BSTR *p)
1354 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1355 FIXME("(%p)->(%p)\n", This, p);
1356 return E_NOTIMPL;
1359 static HRESULT WINAPI HTMLStyle_put_borderRightStyle(IHTMLStyle *iface, BSTR v)
1361 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1362 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1363 return E_NOTIMPL;
1366 static HRESULT WINAPI HTMLStyle_get_borderRightStyle(IHTMLStyle *iface, BSTR *p)
1368 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1369 FIXME("(%p)->(%p)\n", This, p);
1370 return E_NOTIMPL;
1373 static HRESULT WINAPI HTMLStyle_put_borderBottomStyle(IHTMLStyle *iface, BSTR v)
1375 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1376 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1377 return E_NOTIMPL;
1380 static HRESULT WINAPI HTMLStyle_get_borderBottomStyle(IHTMLStyle *iface, BSTR *p)
1382 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1383 FIXME("(%p)->(%p)\n", This, p);
1384 return E_NOTIMPL;
1387 static HRESULT WINAPI HTMLStyle_put_borderLeftStyle(IHTMLStyle *iface, BSTR v)
1389 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1390 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1391 return E_NOTIMPL;
1394 static HRESULT WINAPI HTMLStyle_get_borderLeftStyle(IHTMLStyle *iface, BSTR *p)
1396 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1397 FIXME("(%p)->(%p)\n", This, p);
1398 return E_NOTIMPL;
1401 static HRESULT WINAPI HTMLStyle_put_width(IHTMLStyle *iface, VARIANT v)
1403 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1405 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1407 switch(V_VT(&v)) {
1408 case VT_BSTR:
1409 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
1410 return set_style_attr(This, STYLEID_WIDTH, V_BSTR(&v), 0);
1411 default:
1412 FIXME("unsupported vt %d\n", V_VT(&v));
1415 return E_NOTIMPL;
1418 static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p)
1420 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1422 TRACE("(%p)->(%p)\n", This, p);
1424 V_VT(p) = VT_BSTR;
1425 return get_style_attr(This, STYLEID_WIDTH, &V_BSTR(p));
1428 static HRESULT WINAPI HTMLStyle_put_height(IHTMLStyle *iface, VARIANT v)
1430 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1432 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1434 switch(V_VT(&v)) {
1435 case VT_BSTR:
1436 return set_style_attr(This, STYLEID_HEIGHT, V_BSTR(&v), 0);
1437 default:
1438 FIXME("unimplemented vt %d\n", V_VT(&v));
1439 return E_NOTIMPL;
1442 return S_OK;
1445 static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p)
1447 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1448 BSTR ret;
1449 HRESULT hres;
1451 TRACE("(%p)->(%p)\n", This, p);
1453 hres = get_style_attr(This, STYLEID_HEIGHT, &ret);
1454 if(FAILED(hres))
1455 return hres;
1457 V_VT(p) = VT_BSTR;
1458 V_BSTR(p) = ret;
1459 return S_OK;
1462 static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v)
1464 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1465 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1466 return E_NOTIMPL;
1469 static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p)
1471 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1472 FIXME("(%p)->(%p)\n", This, p);
1473 return E_NOTIMPL;
1476 static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v)
1478 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1479 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1480 return E_NOTIMPL;
1483 static HRESULT WINAPI HTMLStyle_get_clear(IHTMLStyle *iface, BSTR *p)
1485 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1486 FIXME("(%p)->(%p)\n", This, p);
1487 return E_NOTIMPL;
1490 static HRESULT WINAPI HTMLStyle_put_display(IHTMLStyle *iface, BSTR v)
1492 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1494 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1496 return set_style_attr(This, STYLEID_DISPLAY, v, 0);
1499 static HRESULT WINAPI HTMLStyle_get_display(IHTMLStyle *iface, BSTR *p)
1501 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1503 TRACE("(%p)->(%p)\n", This, p);
1505 return get_style_attr(This, STYLEID_DISPLAY, p);
1508 static HRESULT WINAPI HTMLStyle_put_visibility(IHTMLStyle *iface, BSTR v)
1510 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1512 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1514 return set_style_attr(This, STYLEID_VISIBILITY, v, 0);
1517 static HRESULT WINAPI HTMLStyle_get_visibility(IHTMLStyle *iface, BSTR *p)
1519 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1521 TRACE("(%p)->(%p)\n", This, p);
1523 return get_style_attr(This, STYLEID_VISIBILITY, p);
1526 static HRESULT WINAPI HTMLStyle_put_listStyleType(IHTMLStyle *iface, BSTR v)
1528 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1529 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1530 return E_NOTIMPL;
1533 static HRESULT WINAPI HTMLStyle_get_listStyleType(IHTMLStyle *iface, BSTR *p)
1535 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1536 FIXME("(%p)->(%p)\n", This, p);
1537 return E_NOTIMPL;
1540 static HRESULT WINAPI HTMLStyle_put_listStylePosition(IHTMLStyle *iface, BSTR v)
1542 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1543 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1544 return E_NOTIMPL;
1547 static HRESULT WINAPI HTMLStyle_get_listStylePosition(IHTMLStyle *iface, BSTR *p)
1549 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1550 FIXME("(%p)->(%p)\n", This, p);
1551 return E_NOTIMPL;
1554 static HRESULT WINAPI HTMLStyle_put_listStyleImage(IHTMLStyle *iface, BSTR v)
1556 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1557 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1558 return E_NOTIMPL;
1561 static HRESULT WINAPI HTMLStyle_get_listStyleImage(IHTMLStyle *iface, BSTR *p)
1563 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1564 FIXME("(%p)->(%p)\n", This, p);
1565 return E_NOTIMPL;
1568 static HRESULT WINAPI HTMLStyle_put_listStyle(IHTMLStyle *iface, BSTR v)
1570 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1571 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1572 return E_NOTIMPL;
1575 static HRESULT WINAPI HTMLStyle_get_listStyle(IHTMLStyle *iface, BSTR *p)
1577 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1578 FIXME("(%p)->(%p)\n", This, p);
1579 return E_NOTIMPL;
1582 static HRESULT WINAPI HTMLStyle_put_whiteSpace(IHTMLStyle *iface, BSTR v)
1584 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1585 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1586 return E_NOTIMPL;
1589 static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p)
1591 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1592 FIXME("(%p)->(%p)\n", This, p);
1593 return E_NOTIMPL;
1596 static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v)
1598 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1600 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1602 return set_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, &v, 0);
1605 static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p)
1607 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1608 BSTR ret;
1609 HRESULT hres;
1611 TRACE("(%p)->(%p)\n", This, p);
1613 hres = get_style_attr(This, STYLEID_TOP, &ret);
1614 if(FAILED(hres))
1615 return hres;
1617 V_VT(p) = VT_BSTR;
1618 V_BSTR(p) = ret;
1619 return S_OK;
1622 static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v)
1624 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1626 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1628 return set_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, &v, 0);
1631 static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p)
1633 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1634 BSTR ret;
1635 HRESULT hres;
1637 TRACE("(%p)->(%p)\n", This, p);
1639 hres = get_style_attr(This, STYLEID_LEFT, &ret);
1640 if(FAILED(hres))
1641 return hres;
1643 V_VT(p) = VT_BSTR;
1644 V_BSTR(p) = ret;
1645 return S_OK;
1648 static HRESULT WINAPI HTMLStyle_get_position(IHTMLStyle *iface, BSTR *p)
1650 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1651 FIXME("(%p)->(%p)\n", This, p);
1652 return E_NOTIMPL;
1655 static HRESULT WINAPI HTMLStyle_put_zIndex(IHTMLStyle *iface, VARIANT v)
1657 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1659 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1661 switch(V_VT(&v)) {
1662 case VT_BSTR:
1663 return set_style_attr(This, STYLEID_Z_INDEX, V_BSTR(&v), 0);
1664 default:
1665 FIXME("unimplemented vt %d\n", V_VT(&v));
1666 return E_NOTIMPL;
1669 return S_OK;
1672 static HRESULT WINAPI HTMLStyle_get_zIndex(IHTMLStyle *iface, VARIANT *p)
1674 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1676 TRACE("(%p)->(%p)\n", This, p);
1678 return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
1681 static HRESULT WINAPI HTMLStyle_put_overflow(IHTMLStyle *iface, BSTR v)
1683 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1684 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1685 return E_NOTIMPL;
1688 static HRESULT WINAPI HTMLStyle_get_overflow(IHTMLStyle *iface, BSTR *p)
1690 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1691 FIXME("(%p)->(%p)\n", This, p);
1692 return E_NOTIMPL;
1695 static HRESULT WINAPI HTMLStyle_put_pageBreakBefore(IHTMLStyle *iface, BSTR v)
1697 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1698 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1699 return E_NOTIMPL;
1702 static HRESULT WINAPI HTMLStyle_get_pageBreakBefore(IHTMLStyle *iface, BSTR *p)
1704 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1705 FIXME("(%p)->(%p)\n", This, p);
1706 return E_NOTIMPL;
1709 static HRESULT WINAPI HTMLStyle_put_pageBreakAfter(IHTMLStyle *iface, BSTR v)
1711 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1712 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1713 return E_NOTIMPL;
1716 static HRESULT WINAPI HTMLStyle_get_pageBreakAfter(IHTMLStyle *iface, BSTR *p)
1718 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1719 FIXME("(%p)->(%p)\n", This, p);
1720 return E_NOTIMPL;
1723 static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
1725 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1726 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1727 return E_NOTIMPL;
1730 static HRESULT WINAPI HTMLStyle_get_cssText(IHTMLStyle *iface, BSTR *p)
1732 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1733 FIXME("(%p)->(%p)\n", This, p);
1734 return E_NOTIMPL;
1737 static HRESULT WINAPI HTMLStyle_put_pixelTop(IHTMLStyle *iface, long v)
1739 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1740 FIXME("(%p)->()\n", This);
1741 return E_NOTIMPL;
1744 static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, long *p)
1746 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1747 FIXME("(%p)->()\n", This);
1748 return E_NOTIMPL;
1751 static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, long v)
1753 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1754 FIXME("(%p)->()\n", This);
1755 return E_NOTIMPL;
1758 static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, long *p)
1760 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1761 FIXME("(%p)->()\n", This);
1762 return E_NOTIMPL;
1765 static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, long v)
1767 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1768 FIXME("(%p)->()\n", This);
1769 return E_NOTIMPL;
1772 static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, long *p)
1774 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1775 FIXME("(%p)->()\n", This);
1776 return E_NOTIMPL;
1779 static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, long v)
1781 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1782 FIXME("(%p)->()\n", This);
1783 return E_NOTIMPL;
1786 static HRESULT WINAPI HTMLStyle_get_pixelHeight(IHTMLStyle *iface, long *p)
1788 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1789 FIXME("(%p)->()\n", This);
1790 return E_NOTIMPL;
1793 static HRESULT WINAPI HTMLStyle_put_posTop(IHTMLStyle *iface, float v)
1795 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1796 FIXME("(%p)->()\n", This);
1797 return E_NOTIMPL;
1800 static HRESULT WINAPI HTMLStyle_get_posTop(IHTMLStyle *iface, float *p)
1802 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1803 FIXME("(%p)->()\n", This);
1804 return E_NOTIMPL;
1807 static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float v)
1809 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1810 FIXME("(%p)->()\n", This);
1811 return E_NOTIMPL;
1814 static HRESULT WINAPI HTMLStyle_get_posLeft(IHTMLStyle *iface, float *p)
1816 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1817 FIXME("(%p)->()\n", This);
1818 return E_NOTIMPL;
1821 static HRESULT WINAPI HTMLStyle_put_posWidth(IHTMLStyle *iface, float v)
1823 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1824 FIXME("(%p)->()\n", This);
1825 return E_NOTIMPL;
1828 static HRESULT WINAPI HTMLStyle_get_posWidth(IHTMLStyle *iface, float *p)
1830 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1831 FIXME("(%p)->()\n", This);
1832 return E_NOTIMPL;
1835 static HRESULT WINAPI HTMLStyle_put_posHeight(IHTMLStyle *iface, float v)
1837 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1838 FIXME("(%p)->()\n", This);
1839 return E_NOTIMPL;
1842 static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p)
1844 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1845 FIXME("(%p)->()\n", This);
1846 return E_NOTIMPL;
1849 static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v)
1851 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1853 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1855 return set_style_attr(This, STYLEID_CURSOR, v, 0);
1858 static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p)
1860 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1862 TRACE("(%p)->(%p)\n", This, p);
1864 return get_style_attr(This, STYLEID_CURSOR, p);
1867 static HRESULT WINAPI HTMLStyle_put_clip(IHTMLStyle *iface, BSTR v)
1869 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1870 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1871 return E_NOTIMPL;
1874 static HRESULT WINAPI HTMLStyle_get_clip(IHTMLStyle *iface, BSTR *p)
1876 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1877 FIXME("(%p)->(%p)\n", This, p);
1878 return E_NOTIMPL;
1881 static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v)
1883 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1885 WARN("(%p)->(%s)\n", This, debugstr_w(v));
1887 /* FIXME: Handle MS-style filters */
1888 return set_style_attr(This, STYLEID_FILTER, v, 0);
1891 static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p)
1893 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1895 WARN("(%p)->(%p)\n", This, p);
1897 /* FIXME: Handle MS-style filters */
1898 return get_style_attr(This, STYLEID_FILTER, p);
1901 static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttributeName,
1902 VARIANT AttributeValue, LONG lFlags)
1904 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1905 FIXME("(%p)->(%s v%d %08x)\n", This, debugstr_w(strAttributeName),
1906 V_VT(&AttributeValue), lFlags);
1907 return E_NOTIMPL;
1910 static HRESULT WINAPI HTMLStyle_getAttribute(IHTMLStyle *iface, BSTR strAttributeName,
1911 LONG lFlags, VARIANT *AttributeValue)
1913 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1914 FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
1915 lFlags, AttributeValue);
1916 return E_NOTIMPL;
1919 static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttributeName,
1920 LONG lFlags, VARIANT_BOOL *pfSuccess)
1922 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1923 FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
1924 lFlags, pfSuccess);
1925 return E_NOTIMPL;
1928 static HRESULT WINAPI HTMLStyle_toString(IHTMLStyle *iface, BSTR *String)
1930 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1931 FIXME("(%p)->(%p)\n", This, String);
1932 return E_NOTIMPL;
1935 static HRESULT HTMLStyle_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid)
1937 int c, i, min=0, max = sizeof(style_tbl)/sizeof(*style_tbl)-1;
1939 while(min <= max) {
1940 i = (min+max)/2;
1942 c = strcmpW(style_tbl[i].name, name);
1943 if(!c) {
1944 *dispid = style_tbl[i].dispid;
1945 return S_OK;
1948 if(c > 0)
1949 max = i-1;
1950 else
1951 min = i+1;
1954 return DISP_E_UNKNOWNNAME;
1957 static const IHTMLStyleVtbl HTMLStyleVtbl = {
1958 HTMLStyle_QueryInterface,
1959 HTMLStyle_AddRef,
1960 HTMLStyle_Release,
1961 HTMLStyle_GetTypeInfoCount,
1962 HTMLStyle_GetTypeInfo,
1963 HTMLStyle_GetIDsOfNames,
1964 HTMLStyle_Invoke,
1965 HTMLStyle_put_fontFamily,
1966 HTMLStyle_get_fontFamily,
1967 HTMLStyle_put_fontStyle,
1968 HTMLStyle_get_fontStyle,
1969 HTMLStyle_put_fontVariant,
1970 HTMLStyle_get_fontVariant,
1971 HTMLStyle_put_fontWeight,
1972 HTMLStyle_get_fontWeight,
1973 HTMLStyle_put_fontSize,
1974 HTMLStyle_get_fontSize,
1975 HTMLStyle_put_font,
1976 HTMLStyle_get_font,
1977 HTMLStyle_put_color,
1978 HTMLStyle_get_color,
1979 HTMLStyle_put_background,
1980 HTMLStyle_get_background,
1981 HTMLStyle_put_backgroundColor,
1982 HTMLStyle_get_backgroundColor,
1983 HTMLStyle_put_backgroundImage,
1984 HTMLStyle_get_backgroundImage,
1985 HTMLStyle_put_backgroundRepeat,
1986 HTMLStyle_get_backgroundRepeat,
1987 HTMLStyle_put_backgroundAttachment,
1988 HTMLStyle_get_backgroundAttachment,
1989 HTMLStyle_put_backgroundPosition,
1990 HTMLStyle_get_backgroundPosition,
1991 HTMLStyle_put_backgroundPositionX,
1992 HTMLStyle_get_backgroundPositionX,
1993 HTMLStyle_put_backgroundPositionY,
1994 HTMLStyle_get_backgroundPositionY,
1995 HTMLStyle_put_wordSpacing,
1996 HTMLStyle_get_wordSpacing,
1997 HTMLStyle_put_letterSpacing,
1998 HTMLStyle_get_letterSpacing,
1999 HTMLStyle_put_textDecoration,
2000 HTMLStyle_get_textDecoration,
2001 HTMLStyle_put_textDecorationNone,
2002 HTMLStyle_get_textDecorationNone,
2003 HTMLStyle_put_textDecorationUnderline,
2004 HTMLStyle_get_textDecorationUnderline,
2005 HTMLStyle_put_textDecorationOverline,
2006 HTMLStyle_get_textDecorationOverline,
2007 HTMLStyle_put_textDecorationLineThrough,
2008 HTMLStyle_get_textDecorationLineThrough,
2009 HTMLStyle_put_textDecorationBlink,
2010 HTMLStyle_get_textDecorationBlink,
2011 HTMLStyle_put_verticalAlign,
2012 HTMLStyle_get_verticalAlign,
2013 HTMLStyle_put_textTransform,
2014 HTMLStyle_get_textTransform,
2015 HTMLStyle_put_textAlign,
2016 HTMLStyle_get_textAlign,
2017 HTMLStyle_put_textIndent,
2018 HTMLStyle_get_textIndent,
2019 HTMLStyle_put_lineHeight,
2020 HTMLStyle_get_lineHeight,
2021 HTMLStyle_put_marginTop,
2022 HTMLStyle_get_marginTop,
2023 HTMLStyle_put_marginRight,
2024 HTMLStyle_get_marginRight,
2025 HTMLStyle_put_marginBottom,
2026 HTMLStyle_get_marginBottom,
2027 HTMLStyle_put_marginLeft,
2028 HTMLStyle_get_marginLeft,
2029 HTMLStyle_put_margin,
2030 HTMLStyle_get_margin,
2031 HTMLStyle_put_paddingTop,
2032 HTMLStyle_get_paddingTop,
2033 HTMLStyle_put_paddingRight,
2034 HTMLStyle_get_paddingRight,
2035 HTMLStyle_put_paddingBottom,
2036 HTMLStyle_get_paddingBottom,
2037 HTMLStyle_put_paddingLeft,
2038 HTMLStyle_get_paddingLeft,
2039 HTMLStyle_put_padding,
2040 HTMLStyle_get_padding,
2041 HTMLStyle_put_border,
2042 HTMLStyle_get_border,
2043 HTMLStyle_put_borderTop,
2044 HTMLStyle_get_borderTop,
2045 HTMLStyle_put_borderRight,
2046 HTMLStyle_get_borderRight,
2047 HTMLStyle_put_borderBottom,
2048 HTMLStyle_get_borderBottom,
2049 HTMLStyle_put_borderLeft,
2050 HTMLStyle_get_borderLeft,
2051 HTMLStyle_put_borderColor,
2052 HTMLStyle_get_borderColor,
2053 HTMLStyle_put_borderTopColor,
2054 HTMLStyle_get_borderTopColor,
2055 HTMLStyle_put_borderRightColor,
2056 HTMLStyle_get_borderRightColor,
2057 HTMLStyle_put_borderBottomColor,
2058 HTMLStyle_get_borderBottomColor,
2059 HTMLStyle_put_borderLeftColor,
2060 HTMLStyle_get_borderLeftColor,
2061 HTMLStyle_put_borderWidth,
2062 HTMLStyle_get_borderWidth,
2063 HTMLStyle_put_borderTopWidth,
2064 HTMLStyle_get_borderTopWidth,
2065 HTMLStyle_put_borderRightWidth,
2066 HTMLStyle_get_borderRightWidth,
2067 HTMLStyle_put_borderBottomWidth,
2068 HTMLStyle_get_borderBottomWidth,
2069 HTMLStyle_put_borderLeftWidth,
2070 HTMLStyle_get_borderLeftWidth,
2071 HTMLStyle_put_borderStyle,
2072 HTMLStyle_get_borderStyle,
2073 HTMLStyle_put_borderTopStyle,
2074 HTMLStyle_get_borderTopStyle,
2075 HTMLStyle_put_borderRightStyle,
2076 HTMLStyle_get_borderRightStyle,
2077 HTMLStyle_put_borderBottomStyle,
2078 HTMLStyle_get_borderBottomStyle,
2079 HTMLStyle_put_borderLeftStyle,
2080 HTMLStyle_get_borderLeftStyle,
2081 HTMLStyle_put_width,
2082 HTMLStyle_get_width,
2083 HTMLStyle_put_height,
2084 HTMLStyle_get_height,
2085 HTMLStyle_put_styleFloat,
2086 HTMLStyle_get_styleFloat,
2087 HTMLStyle_put_clear,
2088 HTMLStyle_get_clear,
2089 HTMLStyle_put_display,
2090 HTMLStyle_get_display,
2091 HTMLStyle_put_visibility,
2092 HTMLStyle_get_visibility,
2093 HTMLStyle_put_listStyleType,
2094 HTMLStyle_get_listStyleType,
2095 HTMLStyle_put_listStylePosition,
2096 HTMLStyle_get_listStylePosition,
2097 HTMLStyle_put_listStyleImage,
2098 HTMLStyle_get_listStyleImage,
2099 HTMLStyle_put_listStyle,
2100 HTMLStyle_get_listStyle,
2101 HTMLStyle_put_whiteSpace,
2102 HTMLStyle_get_whiteSpace,
2103 HTMLStyle_put_top,
2104 HTMLStyle_get_top,
2105 HTMLStyle_put_left,
2106 HTMLStyle_get_left,
2107 HTMLStyle_get_position,
2108 HTMLStyle_put_zIndex,
2109 HTMLStyle_get_zIndex,
2110 HTMLStyle_put_overflow,
2111 HTMLStyle_get_overflow,
2112 HTMLStyle_put_pageBreakBefore,
2113 HTMLStyle_get_pageBreakBefore,
2114 HTMLStyle_put_pageBreakAfter,
2115 HTMLStyle_get_pageBreakAfter,
2116 HTMLStyle_put_cssText,
2117 HTMLStyle_get_cssText,
2118 HTMLStyle_put_pixelTop,
2119 HTMLStyle_get_pixelTop,
2120 HTMLStyle_put_pixelLeft,
2121 HTMLStyle_get_pixelLeft,
2122 HTMLStyle_put_pixelWidth,
2123 HTMLStyle_get_pixelWidth,
2124 HTMLStyle_put_pixelHeight,
2125 HTMLStyle_get_pixelHeight,
2126 HTMLStyle_put_posTop,
2127 HTMLStyle_get_posTop,
2128 HTMLStyle_put_posLeft,
2129 HTMLStyle_get_posLeft,
2130 HTMLStyle_put_posWidth,
2131 HTMLStyle_get_posWidth,
2132 HTMLStyle_put_posHeight,
2133 HTMLStyle_get_posHeight,
2134 HTMLStyle_put_cursor,
2135 HTMLStyle_get_cursor,
2136 HTMLStyle_put_clip,
2137 HTMLStyle_get_clip,
2138 HTMLStyle_put_filter,
2139 HTMLStyle_get_filter,
2140 HTMLStyle_setAttribute,
2141 HTMLStyle_getAttribute,
2142 HTMLStyle_removeAttribute,
2143 HTMLStyle_toString
2146 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl = {
2147 HTMLStyle_get_dispid,
2148 NULL
2151 static const tid_t HTMLStyle_iface_tids[] = {
2152 IHTMLStyle_tid,
2153 IHTMLStyle2_tid,
2156 static dispex_static_data_t HTMLStyle_dispex = {
2157 &HTMLStyle_dispex_vtbl,
2158 DispHTMLStyle_tid,
2159 NULL,
2160 HTMLStyle_iface_tids
2163 IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle)
2165 HTMLStyle *ret = heap_alloc_zero(sizeof(HTMLStyle));
2167 ret->lpHTMLStyleVtbl = &HTMLStyleVtbl;
2168 ret->ref = 1;
2169 ret->nsstyle = nsstyle;
2170 HTMLStyle2_Init(ret);
2172 nsIDOMCSSStyleDeclaration_AddRef(nsstyle);
2174 init_dispex(&ret->dispex, (IUnknown*)HTMLSTYLE(ret), &HTMLStyle_dispex);
2176 return HTMLSTYLE(ret);