push 5bdbf5929ff53e78410b88336df0dc6549434b50
[wine/hacks.git] / dlls / mshtml / htmlstyle.c
blob8d6564d0eb6d1435f1ec55aeb7f4af41a96cac37
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 inline HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWORD flags)
226 return set_nsstyle_attr(This->nsstyle, sid, value, flags);
229 static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value)
231 nsAString str_name;
232 nsresult nsres;
234 nsAString_Init(&str_name, style_tbl[sid].name);
236 nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle, &str_name, value);
237 if(NS_FAILED(nsres)) {
238 ERR("SetProperty failed: %08x\n", nsres);
239 return E_FAIL;
242 nsAString_Finish(&str_name);
244 return NS_OK;
247 HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p)
249 nsAString str_value;
250 const PRUnichar *value;
252 nsAString_Init(&str_value, NULL);
254 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
256 nsAString_GetData(&str_value, &value);
257 *p = *value ? SysAllocString(value) : NULL;
259 nsAString_Finish(&str_value);
261 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p));
262 return S_OK;
265 HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags)
267 nsAString str_value;
268 const PRUnichar *value;
269 BOOL set = FALSE;
271 nsAString_Init(&str_value, NULL);
273 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
275 nsAString_GetData(&str_value, &value);
277 if(flags & ATTR_STR_TO_INT) {
278 const PRUnichar *ptr = value;
279 BOOL neg = FALSE;
280 INT i = 0;
282 if(*ptr == '-') {
283 neg = TRUE;
284 ptr++;
287 while(isdigitW(*ptr))
288 i = i*10 + (*ptr++ - '0');
290 if(!*ptr) {
291 V_VT(p) = VT_I4;
292 V_I4(p) = neg ? -i : i;
293 set = TRUE;
297 if(!set) {
298 BSTR str = NULL;
300 if(*value) {
301 str = SysAllocString(value);
302 if(!str)
303 return E_OUTOFMEMORY;
306 V_VT(p) = VT_BSTR;
307 V_BSTR(p) = str;
310 nsAString_Finish(&str_value);
312 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_variant(p));
313 return S_OK;
316 static inline HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p)
318 return get_nsstyle_attr(This->nsstyle, sid, p);
321 static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p)
323 nsAString str_value;
324 const PRUnichar *value;
326 nsAString_Init(&str_value, NULL);
328 get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
330 nsAString_GetData(&str_value, &value);
331 *p = strcmpW(value, exval) ? VARIANT_FALSE : VARIANT_TRUE;
332 nsAString_Finish(&str_value);
334 TRACE("%s -> %x\n", debugstr_w(style_tbl[sid].name), *p);
335 return S_OK;
338 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
340 static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, void **ppv)
342 HTMLStyle *This = HTMLSTYLE_THIS(iface);
344 *ppv = NULL;
346 if(IsEqualGUID(&IID_IUnknown, riid)) {
347 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
348 *ppv = HTMLSTYLE(This);
349 }else if(IsEqualGUID(&IID_IHTMLStyle, riid)) {
350 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This, ppv);
351 *ppv = HTMLSTYLE(This);
352 }else if(IsEqualGUID(&IID_IHTMLStyle2, riid)) {
353 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This, ppv);
354 *ppv = HTMLSTYLE2(This);
355 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
356 return *ppv ? S_OK : E_NOINTERFACE;
359 if(*ppv) {
360 IUnknown_AddRef((IUnknown*)*ppv);
361 return S_OK;
364 WARN("unsupported %s\n", debugstr_guid(riid));
365 return E_NOINTERFACE;
368 static ULONG WINAPI HTMLStyle_AddRef(IHTMLStyle *iface)
370 HTMLStyle *This = HTMLSTYLE_THIS(iface);
371 LONG ref = InterlockedIncrement(&This->ref);
373 TRACE("(%p) ref=%d\n", This, ref);
375 return ref;
378 static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
380 HTMLStyle *This = HTMLSTYLE_THIS(iface);
381 LONG ref = InterlockedDecrement(&This->ref);
383 TRACE("(%p) ref=%d\n", This, ref);
385 if(!ref) {
386 if(This->nsstyle)
387 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
388 heap_free(This);
391 return ref;
394 static HRESULT WINAPI HTMLStyle_GetTypeInfoCount(IHTMLStyle *iface, UINT *pctinfo)
396 HTMLStyle *This = HTMLSTYLE_THIS(iface);
397 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
400 static HRESULT WINAPI HTMLStyle_GetTypeInfo(IHTMLStyle *iface, UINT iTInfo,
401 LCID lcid, ITypeInfo **ppTInfo)
403 HTMLStyle *This = HTMLSTYLE_THIS(iface);
404 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
407 static HRESULT WINAPI HTMLStyle_GetIDsOfNames(IHTMLStyle *iface, REFIID riid,
408 LPOLESTR *rgszNames, UINT cNames,
409 LCID lcid, DISPID *rgDispId)
411 HTMLStyle *This = HTMLSTYLE_THIS(iface);
412 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
415 static HRESULT WINAPI HTMLStyle_Invoke(IHTMLStyle *iface, DISPID dispIdMember,
416 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
417 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
419 HTMLStyle *This = HTMLSTYLE_THIS(iface);
420 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
421 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
424 static HRESULT WINAPI HTMLStyle_put_fontFamily(IHTMLStyle *iface, BSTR v)
426 HTMLStyle *This = HTMLSTYLE_THIS(iface);
428 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
430 return set_style_attr(This, STYLEID_FONT_FAMILY, v, 0);
433 static HRESULT WINAPI HTMLStyle_get_fontFamily(IHTMLStyle *iface, BSTR *p)
435 HTMLStyle *This = HTMLSTYLE_THIS(iface);
437 TRACE("(%p)->(%p)\n", This, p);
439 return get_style_attr(This, STYLEID_FONT_FAMILY, p);
442 static HRESULT WINAPI HTMLStyle_put_fontStyle(IHTMLStyle *iface, BSTR v)
444 HTMLStyle *This = HTMLSTYLE_THIS(iface);
445 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
446 return E_NOTIMPL;
449 static HRESULT WINAPI HTMLStyle_get_fontStyle(IHTMLStyle *iface, BSTR *p)
451 HTMLStyle *This = HTMLSTYLE_THIS(iface);
453 TRACE("(%p)->(%p)\n", This, p);
455 return get_style_attr(This, STYLEID_FONT_STYLE, p);
458 static HRESULT WINAPI HTMLStyle_put_fontVariant(IHTMLStyle *iface, BSTR v)
460 HTMLStyle *This = HTMLSTYLE_THIS(iface);
461 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
462 return E_NOTIMPL;
465 static HRESULT WINAPI HTMLStyle_get_fontVariant(IHTMLStyle *iface, BSTR *p)
467 HTMLStyle *This = HTMLSTYLE_THIS(iface);
468 FIXME("(%p)->(%p)\n", This, p);
469 return E_NOTIMPL;
472 static HRESULT WINAPI HTMLStyle_put_fontWeight(IHTMLStyle *iface, BSTR v)
474 HTMLStyle *This = HTMLSTYLE_THIS(iface);
475 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
476 return E_NOTIMPL;
479 static HRESULT WINAPI HTMLStyle_get_fontWeight(IHTMLStyle *iface, BSTR *p)
481 HTMLStyle *This = HTMLSTYLE_THIS(iface);
483 TRACE("(%p)->(%p)\n", This, p);
485 return get_style_attr(This, STYLEID_FONT_WEIGHT, p);
488 static HRESULT WINAPI HTMLStyle_put_fontSize(IHTMLStyle *iface, VARIANT v)
490 HTMLStyle *This = HTMLSTYLE_THIS(iface);
492 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
494 switch(V_VT(&v)) {
495 case VT_BSTR:
496 return set_style_attr(This, STYLEID_FONT_SIZE, V_BSTR(&v), 0);
497 default:
498 FIXME("not supported vt %d\n", V_VT(&v));
501 return S_OK;
504 static HRESULT WINAPI HTMLStyle_get_fontSize(IHTMLStyle *iface, VARIANT *p)
506 HTMLStyle *This = HTMLSTYLE_THIS(iface);
508 TRACE("(%p)->(%p)\n", This, p);
510 V_VT(p) = VT_BSTR;
511 return get_style_attr(This, STYLEID_FONT_SIZE, &V_BSTR(p));
514 static HRESULT WINAPI HTMLStyle_put_font(IHTMLStyle *iface, BSTR v)
516 HTMLStyle *This = HTMLSTYLE_THIS(iface);
517 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
518 return E_NOTIMPL;
521 static HRESULT WINAPI HTMLStyle_get_font(IHTMLStyle *iface, BSTR *p)
523 HTMLStyle *This = HTMLSTYLE_THIS(iface);
524 FIXME("(%p)->(%p)\n", This, p);
525 return E_NOTIMPL;
528 static HRESULT WINAPI HTMLStyle_put_color(IHTMLStyle *iface, VARIANT v)
530 HTMLStyle *This = HTMLSTYLE_THIS(iface);
532 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
534 switch(V_VT(&v)) {
535 case VT_BSTR:
536 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
537 return set_style_attr(This, STYLEID_COLOR, V_BSTR(&v), 0);
539 default:
540 FIXME("unsupported vt=%d\n", V_VT(&v));
543 return E_NOTIMPL;
546 static HRESULT WINAPI HTMLStyle_get_color(IHTMLStyle *iface, VARIANT *p)
548 HTMLStyle *This = HTMLSTYLE_THIS(iface);
550 TRACE("(%p)->(%p)\n", This, p);
552 V_VT(p) = VT_BSTR;
553 return get_style_attr(This, STYLEID_COLOR, &V_BSTR(p));
556 static HRESULT WINAPI HTMLStyle_put_background(IHTMLStyle *iface, BSTR v)
558 HTMLStyle *This = HTMLSTYLE_THIS(iface);
560 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
562 return set_style_attr(This, STYLEID_BACKGROUND, v, 0);
565 static HRESULT WINAPI HTMLStyle_get_background(IHTMLStyle *iface, BSTR *p)
567 HTMLStyle *This = HTMLSTYLE_THIS(iface);
569 TRACE("(%p)->(%p)\n", This, p);
571 return get_style_attr(This, STYLEID_BACKGROUND, p);
574 static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v)
576 HTMLStyle *This = HTMLSTYLE_THIS(iface);
578 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
580 switch(V_VT(&v)) {
581 case VT_BSTR:
582 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, V_BSTR(&v), 0);
583 case VT_I4: {
584 WCHAR value[10];
585 static const WCHAR format[] = {'#','%','0','6','x',0};
587 wsprintfW(value, format, V_I4(&v));
588 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, value, 0);
590 default:
591 FIXME("unsupported vt %d\n", V_VT(&v));
594 return S_OK;
597 static HRESULT WINAPI HTMLStyle_get_backgroundColor(IHTMLStyle *iface, VARIANT *p)
599 HTMLStyle *This = HTMLSTYLE_THIS(iface);
600 FIXME("(%p)->(%p)\n", This, p);
601 return E_NOTIMPL;
604 static HRESULT WINAPI HTMLStyle_put_backgroundImage(IHTMLStyle *iface, BSTR v)
606 HTMLStyle *This = HTMLSTYLE_THIS(iface);
608 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
610 return set_style_attr(This, STYLEID_BACKGROUND_IMAGE, v, ATTR_FIX_URL);
613 static HRESULT WINAPI HTMLStyle_get_backgroundImage(IHTMLStyle *iface, BSTR *p)
615 HTMLStyle *This = HTMLSTYLE_THIS(iface);
616 FIXME("(%p)->(%p)\n", This, p);
617 return E_NOTIMPL;
620 static HRESULT WINAPI HTMLStyle_put_backgroundRepeat(IHTMLStyle *iface, BSTR v)
622 HTMLStyle *This = HTMLSTYLE_THIS(iface);
623 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
624 return E_NOTIMPL;
627 static HRESULT WINAPI HTMLStyle_get_backgroundRepeat(IHTMLStyle *iface, BSTR *p)
629 HTMLStyle *This = HTMLSTYLE_THIS(iface);
630 FIXME("(%p)->(%p)\n", This, p);
631 return E_NOTIMPL;
634 static HRESULT WINAPI HTMLStyle_put_backgroundAttachment(IHTMLStyle *iface, BSTR v)
636 HTMLStyle *This = HTMLSTYLE_THIS(iface);
637 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
638 return E_NOTIMPL;
641 static HRESULT WINAPI HTMLStyle_get_backgroundAttachment(IHTMLStyle *iface, BSTR *p)
643 HTMLStyle *This = HTMLSTYLE_THIS(iface);
644 FIXME("(%p)->(%p)\n", This, p);
645 return E_NOTIMPL;
648 static HRESULT WINAPI HTMLStyle_put_backgroundPosition(IHTMLStyle *iface, BSTR v)
650 HTMLStyle *This = HTMLSTYLE_THIS(iface);
651 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
652 return E_NOTIMPL;
655 static HRESULT WINAPI HTMLStyle_get_backgroundPosition(IHTMLStyle *iface, BSTR *p)
657 HTMLStyle *This = HTMLSTYLE_THIS(iface);
658 FIXME("(%p)->(%p)\n", This, p);
659 return E_NOTIMPL;
662 static HRESULT WINAPI HTMLStyle_put_backgroundPositionX(IHTMLStyle *iface, VARIANT v)
664 HTMLStyle *This = HTMLSTYLE_THIS(iface);
665 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
666 return E_NOTIMPL;
669 static HRESULT WINAPI HTMLStyle_get_backgroundPositionX(IHTMLStyle *iface, VARIANT *p)
671 HTMLStyle *This = HTMLSTYLE_THIS(iface);
672 FIXME("(%p)->(%p)\n", This, p);
673 return E_NOTIMPL;
676 static HRESULT WINAPI HTMLStyle_put_backgroundPositionY(IHTMLStyle *iface, VARIANT v)
678 HTMLStyle *This = HTMLSTYLE_THIS(iface);
679 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
680 return E_NOTIMPL;
683 static HRESULT WINAPI HTMLStyle_get_backgroundPositionY(IHTMLStyle *iface, VARIANT *p)
685 HTMLStyle *This = HTMLSTYLE_THIS(iface);
686 FIXME("(%p)->(%p)\n", This, p);
687 return E_NOTIMPL;
690 static HRESULT WINAPI HTMLStyle_put_wordSpacing(IHTMLStyle *iface, VARIANT v)
692 HTMLStyle *This = HTMLSTYLE_THIS(iface);
693 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
694 return E_NOTIMPL;
697 static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p)
699 HTMLStyle *This = HTMLSTYLE_THIS(iface);
700 FIXME("(%p)->(%p)\n", This, p);
701 return E_NOTIMPL;
704 static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
706 HTMLStyle *This = HTMLSTYLE_THIS(iface);
707 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
708 return E_NOTIMPL;
711 static HRESULT WINAPI HTMLStyle_get_letterSpacing(IHTMLStyle *iface, VARIANT *p)
713 HTMLStyle *This = HTMLSTYLE_THIS(iface);
714 FIXME("(%p)->(%p)\n", This, p);
715 return E_NOTIMPL;
718 static HRESULT WINAPI HTMLStyle_put_textDecoration(IHTMLStyle *iface, BSTR v)
720 HTMLStyle *This = HTMLSTYLE_THIS(iface);
721 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
722 return E_NOTIMPL;
725 static HRESULT WINAPI HTMLStyle_get_textDecoration(IHTMLStyle *iface, BSTR *p)
727 HTMLStyle *This = HTMLSTYLE_THIS(iface);
729 TRACE("(%p)->(%p)\n", This, p);
731 return get_style_attr(This, STYLEID_TEXT_DECORATION, p);
734 static HRESULT WINAPI HTMLStyle_put_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL v)
736 HTMLStyle *This = HTMLSTYLE_THIS(iface);
737 FIXME("(%p)->(%x)\n", This, v);
738 return E_NOTIMPL;
741 static HRESULT WINAPI HTMLStyle_get_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL *p)
743 HTMLStyle *This = HTMLSTYLE_THIS(iface);
744 FIXME("(%p)->(%p)\n", This, p);
745 return E_NOTIMPL;
748 static HRESULT WINAPI HTMLStyle_put_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL v)
750 HTMLStyle *This = HTMLSTYLE_THIS(iface);
751 FIXME("(%p)->(%x)\n", This, v);
752 return E_NOTIMPL;
755 static HRESULT WINAPI HTMLStyle_get_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL *p)
757 HTMLStyle *This = HTMLSTYLE_THIS(iface);
759 TRACE("(%p)->(%p)\n", This, p);
761 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valUnderline, p);
764 static HRESULT WINAPI HTMLStyle_put_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL v)
766 HTMLStyle *This = HTMLSTYLE_THIS(iface);
767 FIXME("(%p)->(%x)\n", This, v);
768 return E_NOTIMPL;
771 static HRESULT WINAPI HTMLStyle_get_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL *p)
773 HTMLStyle *This = HTMLSTYLE_THIS(iface);
774 FIXME("(%p)->(%p)\n", This, p);
775 return E_NOTIMPL;
778 static HRESULT WINAPI HTMLStyle_put_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL v)
780 HTMLStyle *This = HTMLSTYLE_THIS(iface);
781 FIXME("(%p)->(%x)\n", This, v);
782 return E_NOTIMPL;
785 static HRESULT WINAPI HTMLStyle_get_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL *p)
787 HTMLStyle *This = HTMLSTYLE_THIS(iface);
789 TRACE("(%p)->(%p)\n", This, p);
791 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valLineThrough, p);
794 static HRESULT WINAPI HTMLStyle_put_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL v)
796 HTMLStyle *This = HTMLSTYLE_THIS(iface);
797 FIXME("(%p)->(%x)\n", This, v);
798 return E_NOTIMPL;
801 static HRESULT WINAPI HTMLStyle_get_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL *p)
803 HTMLStyle *This = HTMLSTYLE_THIS(iface);
804 FIXME("(%p)->(%p)\n", This, p);
805 return E_NOTIMPL;
808 static HRESULT WINAPI HTMLStyle_put_verticalAlign(IHTMLStyle *iface, VARIANT v)
810 HTMLStyle *This = HTMLSTYLE_THIS(iface);
812 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
814 switch(V_VT(&v)) {
815 case VT_BSTR:
816 return set_style_attr(This, STYLEID_VERTICAL_ALIGN, V_BSTR(&v), 0);
817 default:
818 FIXME("not implemented vt %d\n", V_VT(&v));
819 return E_NOTIMPL;
822 return S_OK;
825 static HRESULT WINAPI HTMLStyle_get_verticalAlign(IHTMLStyle *iface, VARIANT *p)
827 HTMLStyle *This = HTMLSTYLE_THIS(iface);
828 BSTR ret;
829 HRESULT hres;
831 TRACE("(%p)->(%p)\n", This, p);
833 hres = get_style_attr(This, STYLEID_VERTICAL_ALIGN, &ret);
834 if(FAILED(hres))
835 return hres;
837 V_VT(p) = VT_BSTR;
838 V_BSTR(p) = ret;
839 return S_OK;
842 static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v)
844 HTMLStyle *This = HTMLSTYLE_THIS(iface);
845 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
846 return E_NOTIMPL;
849 static HRESULT WINAPI HTMLStyle_get_textTransform(IHTMLStyle *iface, BSTR *p)
851 HTMLStyle *This = HTMLSTYLE_THIS(iface);
852 FIXME("(%p)->(%p)\n", This, p);
853 return E_NOTIMPL;
856 static HRESULT WINAPI HTMLStyle_put_textAlign(IHTMLStyle *iface, BSTR v)
858 HTMLStyle *This = HTMLSTYLE_THIS(iface);
860 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
862 return set_style_attr(This, STYLEID_TEXT_ALIGN, v, 0);
865 static HRESULT WINAPI HTMLStyle_get_textAlign(IHTMLStyle *iface, BSTR *p)
867 HTMLStyle *This = HTMLSTYLE_THIS(iface);
869 TRACE("(%p)->(%p)\n", This, p);
871 return get_style_attr(This, STYLEID_TEXT_ALIGN, p);
874 static HRESULT WINAPI HTMLStyle_put_textIndent(IHTMLStyle *iface, VARIANT v)
876 HTMLStyle *This = HTMLSTYLE_THIS(iface);
877 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
878 return E_NOTIMPL;
881 static HRESULT WINAPI HTMLStyle_get_textIndent(IHTMLStyle *iface, VARIANT *p)
883 HTMLStyle *This = HTMLSTYLE_THIS(iface);
884 FIXME("(%p)->(%p)\n", This, p);
885 return E_NOTIMPL;
888 static HRESULT WINAPI HTMLStyle_put_lineHeight(IHTMLStyle *iface, VARIANT v)
890 HTMLStyle *This = HTMLSTYLE_THIS(iface);
891 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
892 return E_NOTIMPL;
895 static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
897 HTMLStyle *This = HTMLSTYLE_THIS(iface);
898 FIXME("(%p)->(%p)\n", This, p);
899 return E_NOTIMPL;
902 static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
904 HTMLStyle *This = HTMLSTYLE_THIS(iface);
905 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
906 return E_NOTIMPL;
909 static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
911 HTMLStyle *This = HTMLSTYLE_THIS(iface);
912 FIXME("(%p)->(%p)\n", This, p);
913 return E_NOTIMPL;
916 static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
918 HTMLStyle *This = HTMLSTYLE_THIS(iface);
920 TRACE("(%p)->(v(%d))\n", This, V_VT(&v));
922 switch(V_VT(&v)) {
923 case VT_NULL:
924 return set_style_attr(This, STYLEID_MARGIN_RIGHT, emptyW, 0);
925 case VT_I4: {
926 WCHAR buf[14];
928 wsprintfW(buf, px_formatW, V_I4(&v));
929 return set_style_attr(This, STYLEID_MARGIN_RIGHT, buf, 0);
931 case VT_BSTR:
932 return set_style_attr(This, STYLEID_MARGIN_RIGHT, V_BSTR(&v), 0);
933 default:
934 FIXME("Unsupported vt=%d\n", V_VT(&v));
937 return E_NOTIMPL;
940 static HRESULT WINAPI HTMLStyle_get_marginRight(IHTMLStyle *iface, VARIANT *p)
942 HTMLStyle *This = HTMLSTYLE_THIS(iface);
943 FIXME("(%p)->(%p)\n", This, p);
944 return E_NOTIMPL;
947 static HRESULT WINAPI HTMLStyle_put_marginBottom(IHTMLStyle *iface, VARIANT v)
949 HTMLStyle *This = HTMLSTYLE_THIS(iface);
950 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
951 return E_NOTIMPL;
954 static HRESULT WINAPI HTMLStyle_get_marginBottom(IHTMLStyle *iface, VARIANT *p)
956 HTMLStyle *This = HTMLSTYLE_THIS(iface);
957 FIXME("(%p)->(%p)\n", This, p);
958 return E_NOTIMPL;
961 static HRESULT WINAPI HTMLStyle_put_marginLeft(IHTMLStyle *iface, VARIANT v)
963 HTMLStyle *This = HTMLSTYLE_THIS(iface);
965 switch(V_VT(&v)) {
966 case VT_NULL:
967 TRACE("(%p)->(NULL)\n", This);
968 return set_style_attr(This, STYLEID_MARGIN_LEFT, emptyW, 0);
969 case VT_I4: {
970 WCHAR buf[14];
972 TRACE("(%p)->(%d)\n", This, V_I4(&v));
974 wsprintfW(buf, px_formatW, V_I4(&v));
975 return set_style_attr(This, STYLEID_MARGIN_LEFT, buf, 0);
977 case VT_BSTR:
978 TRACE("(%p)->(%s)\n", This, debugstr_w(V_BSTR(&v)));
979 return set_style_attr(This, STYLEID_MARGIN_LEFT, V_BSTR(&v), 0);
980 default:
981 FIXME("Unsupported vt=%d\n", V_VT(&v));
984 return E_NOTIMPL;
987 static HRESULT WINAPI HTMLStyle_put_margin(IHTMLStyle *iface, BSTR v)
989 HTMLStyle *This = HTMLSTYLE_THIS(iface);
991 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
993 return set_style_attr(This, STYLEID_MARGIN, v, 0);
996 static HRESULT WINAPI HTMLStyle_get_margin(IHTMLStyle *iface, BSTR *p)
998 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1000 TRACE("(%p)->(%p)\n", This, p);
1002 return get_style_attr(This, STYLEID_MARGIN, p);
1005 static HRESULT WINAPI HTMLStyle_get_marginLeft(IHTMLStyle *iface, VARIANT *p)
1007 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1008 FIXME("(%p)->(%p)\n", This, p);
1009 return E_NOTIMPL;
1012 static HRESULT WINAPI HTMLStyle_put_paddingTop(IHTMLStyle *iface, VARIANT v)
1014 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1015 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1016 return E_NOTIMPL;
1019 static HRESULT WINAPI HTMLStyle_get_paddingTop(IHTMLStyle *iface, VARIANT *p)
1021 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1022 FIXME("(%p)->(%p)\n", This, p);
1023 return E_NOTIMPL;
1026 static HRESULT WINAPI HTMLStyle_put_paddingRight(IHTMLStyle *iface, VARIANT v)
1028 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1029 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1030 return E_NOTIMPL;
1033 static HRESULT WINAPI HTMLStyle_get_paddingRight(IHTMLStyle *iface, VARIANT *p)
1035 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1036 FIXME("(%p)->(%p)\n", This, p);
1037 return E_NOTIMPL;
1040 static HRESULT WINAPI HTMLStyle_put_paddingBottom(IHTMLStyle *iface, VARIANT v)
1042 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1043 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1044 return E_NOTIMPL;
1047 static HRESULT WINAPI HTMLStyle_get_paddingBottom(IHTMLStyle *iface, VARIANT *p)
1049 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1050 FIXME("(%p)->(%p)\n", This, p);
1051 return E_NOTIMPL;
1054 static HRESULT WINAPI HTMLStyle_put_paddingLeft(IHTMLStyle *iface, VARIANT v)
1056 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1058 TRACE("(%p)->(vt=%d)\n", This, V_VT(&v));
1060 switch(V_VT(&v)) {
1061 case VT_I4: {
1062 WCHAR buf[14];
1064 wsprintfW(buf, px_formatW, V_I4(&v));
1065 return set_style_attr(This, STYLEID_PADDING_LEFT, buf, 0);
1067 case VT_BSTR:
1068 return set_style_attr(This, STYLEID_PADDING_LEFT, V_BSTR(&v), 0);
1069 default:
1070 FIXME("unsupported vt=%d\n", V_VT(&v));
1073 return E_NOTIMPL;
1076 static HRESULT WINAPI HTMLStyle_get_paddingLeft(IHTMLStyle *iface, VARIANT *p)
1078 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1079 FIXME("(%p)->(%p)\n", This, p);
1080 return E_NOTIMPL;
1083 static HRESULT WINAPI HTMLStyle_put_padding(IHTMLStyle *iface, BSTR v)
1085 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1086 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1087 return E_NOTIMPL;
1090 static HRESULT WINAPI HTMLStyle_get_padding(IHTMLStyle *iface, BSTR *p)
1092 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1093 FIXME("(%p)->(%p)\n", This, p);
1094 return E_NOTIMPL;
1097 static HRESULT WINAPI HTMLStyle_put_border(IHTMLStyle *iface, BSTR v)
1099 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1101 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1103 return set_style_attr(This, STYLEID_BORDER, v, 0);
1106 static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p)
1108 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1110 TRACE("(%p)->(%p)\n", This, p);
1112 return get_style_attr(This, STYLEID_BORDER, p);
1115 static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
1117 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1118 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1119 return E_NOTIMPL;
1122 static HRESULT WINAPI HTMLStyle_get_borderTop(IHTMLStyle *iface, BSTR *p)
1124 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1125 FIXME("(%p)->(%p)\n", This, p);
1126 return E_NOTIMPL;
1129 static HRESULT WINAPI HTMLStyle_put_borderRight(IHTMLStyle *iface, BSTR v)
1131 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1132 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1133 return E_NOTIMPL;
1136 static HRESULT WINAPI HTMLStyle_get_borderRight(IHTMLStyle *iface, BSTR *p)
1138 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1139 FIXME("(%p)->(%p)\n", This, p);
1140 return E_NOTIMPL;
1143 static HRESULT WINAPI HTMLStyle_put_borderBottom(IHTMLStyle *iface, BSTR v)
1145 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1146 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1147 return E_NOTIMPL;
1150 static HRESULT WINAPI HTMLStyle_get_borderBottom(IHTMLStyle *iface, BSTR *p)
1152 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1153 FIXME("(%p)->(%p)\n", This, p);
1154 return E_NOTIMPL;
1157 static HRESULT WINAPI HTMLStyle_put_borderLeft(IHTMLStyle *iface, BSTR v)
1159 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1161 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1163 return set_style_attr(This, STYLEID_BORDER_LEFT, v, ATTR_FIX_PX);
1166 static HRESULT WINAPI HTMLStyle_get_borderLeft(IHTMLStyle *iface, BSTR *p)
1168 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1169 FIXME("(%p)->(%p)\n", This, p);
1170 return E_NOTIMPL;
1173 static HRESULT WINAPI HTMLStyle_put_borderColor(IHTMLStyle *iface, BSTR v)
1175 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1176 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1177 return E_NOTIMPL;
1180 static HRESULT WINAPI HTMLStyle_get_borderColor(IHTMLStyle *iface, BSTR *p)
1182 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1183 FIXME("(%p)->(%p)\n", This, p);
1184 return E_NOTIMPL;
1187 static HRESULT WINAPI HTMLStyle_put_borderTopColor(IHTMLStyle *iface, VARIANT v)
1189 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1190 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1191 return E_NOTIMPL;
1194 static HRESULT WINAPI HTMLStyle_get_borderTopColor(IHTMLStyle *iface, VARIANT *p)
1196 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1197 FIXME("(%p)->(%p)\n", This, p);
1198 return E_NOTIMPL;
1201 static HRESULT WINAPI HTMLStyle_put_borderRightColor(IHTMLStyle *iface, VARIANT v)
1203 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1204 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1205 return E_NOTIMPL;
1208 static HRESULT WINAPI HTMLStyle_get_borderRightColor(IHTMLStyle *iface, VARIANT *p)
1210 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1211 FIXME("(%p)->(%p)\n", This, p);
1212 return E_NOTIMPL;
1215 static HRESULT WINAPI HTMLStyle_put_borderBottomColor(IHTMLStyle *iface, VARIANT v)
1217 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1218 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1219 return E_NOTIMPL;
1222 static HRESULT WINAPI HTMLStyle_get_borderBottomColor(IHTMLStyle *iface, VARIANT *p)
1224 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1225 FIXME("(%p)->(%p)\n", This, p);
1226 return E_NOTIMPL;
1229 static HRESULT WINAPI HTMLStyle_put_borderLeftColor(IHTMLStyle *iface, VARIANT v)
1231 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1232 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1233 return E_NOTIMPL;
1236 static HRESULT WINAPI HTMLStyle_get_borderLeftColor(IHTMLStyle *iface, VARIANT *p)
1238 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1239 FIXME("(%p)->(%p)\n", This, p);
1240 return E_NOTIMPL;
1243 static HRESULT WINAPI HTMLStyle_put_borderWidth(IHTMLStyle *iface, BSTR v)
1245 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1246 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1247 return set_style_attr(This, STYLEID_BORDER_WIDTH, v, ATTR_FIX_PX);
1250 static HRESULT WINAPI HTMLStyle_get_borderWidth(IHTMLStyle *iface, BSTR *p)
1252 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1253 TRACE("(%p)->(%p)\n", This, p);
1254 return get_style_attr(This, STYLEID_BORDER_WIDTH, p);
1257 static HRESULT WINAPI HTMLStyle_put_borderTopWidth(IHTMLStyle *iface, VARIANT v)
1259 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1260 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1261 return E_NOTIMPL;
1264 static HRESULT WINAPI HTMLStyle_get_borderTopWidth(IHTMLStyle *iface, VARIANT *p)
1266 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1267 FIXME("(%p)->(%p)\n", This, p);
1268 return E_NOTIMPL;
1271 static HRESULT WINAPI HTMLStyle_put_borderRightWidth(IHTMLStyle *iface, VARIANT v)
1273 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1274 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1275 return E_NOTIMPL;
1278 static HRESULT WINAPI HTMLStyle_get_borderRightWidth(IHTMLStyle *iface, VARIANT *p)
1280 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1281 FIXME("(%p)->(%p)\n", This, p);
1282 return E_NOTIMPL;
1285 static HRESULT WINAPI HTMLStyle_put_borderBottomWidth(IHTMLStyle *iface, VARIANT v)
1287 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1288 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1289 return E_NOTIMPL;
1292 static HRESULT WINAPI HTMLStyle_get_borderBottomWidth(IHTMLStyle *iface, VARIANT *p)
1294 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1295 FIXME("(%p)->(%p)\n", This, p);
1296 return E_NOTIMPL;
1299 static HRESULT WINAPI HTMLStyle_put_borderLeftWidth(IHTMLStyle *iface, VARIANT v)
1301 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1302 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1303 return E_NOTIMPL;
1306 static HRESULT WINAPI HTMLStyle_get_borderLeftWidth(IHTMLStyle *iface, VARIANT *p)
1308 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1309 FIXME("(%p)->(%p)\n", This, p);
1310 return E_NOTIMPL;
1313 static HRESULT WINAPI HTMLStyle_put_borderStyle(IHTMLStyle *iface, BSTR v)
1315 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1316 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1317 return E_NOTIMPL;
1320 static HRESULT WINAPI HTMLStyle_get_borderStyle(IHTMLStyle *iface, BSTR *p)
1322 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1323 FIXME("(%p)->(%p)\n", This, p);
1324 return E_NOTIMPL;
1327 static HRESULT WINAPI HTMLStyle_put_borderTopStyle(IHTMLStyle *iface, BSTR v)
1329 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1330 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1331 return E_NOTIMPL;
1334 static HRESULT WINAPI HTMLStyle_get_borderTopStyle(IHTMLStyle *iface, BSTR *p)
1336 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1337 FIXME("(%p)->(%p)\n", This, p);
1338 return E_NOTIMPL;
1341 static HRESULT WINAPI HTMLStyle_put_borderRightStyle(IHTMLStyle *iface, BSTR v)
1343 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1344 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1345 return E_NOTIMPL;
1348 static HRESULT WINAPI HTMLStyle_get_borderRightStyle(IHTMLStyle *iface, BSTR *p)
1350 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1351 FIXME("(%p)->(%p)\n", This, p);
1352 return E_NOTIMPL;
1355 static HRESULT WINAPI HTMLStyle_put_borderBottomStyle(IHTMLStyle *iface, BSTR v)
1357 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1358 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1359 return E_NOTIMPL;
1362 static HRESULT WINAPI HTMLStyle_get_borderBottomStyle(IHTMLStyle *iface, BSTR *p)
1364 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1365 FIXME("(%p)->(%p)\n", This, p);
1366 return E_NOTIMPL;
1369 static HRESULT WINAPI HTMLStyle_put_borderLeftStyle(IHTMLStyle *iface, BSTR v)
1371 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1372 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1373 return E_NOTIMPL;
1376 static HRESULT WINAPI HTMLStyle_get_borderLeftStyle(IHTMLStyle *iface, BSTR *p)
1378 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1379 FIXME("(%p)->(%p)\n", This, p);
1380 return E_NOTIMPL;
1383 static HRESULT WINAPI HTMLStyle_put_width(IHTMLStyle *iface, VARIANT v)
1385 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1387 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1389 switch(V_VT(&v)) {
1390 case VT_BSTR:
1391 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
1392 return set_style_attr(This, STYLEID_WIDTH, V_BSTR(&v), 0);
1393 default:
1394 FIXME("unsupported vt %d\n", V_VT(&v));
1397 return E_NOTIMPL;
1400 static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p)
1402 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1404 TRACE("(%p)->(%p)\n", This, p);
1406 V_VT(p) = VT_BSTR;
1407 return get_style_attr(This, STYLEID_WIDTH, &V_BSTR(p));
1410 static HRESULT WINAPI HTMLStyle_put_height(IHTMLStyle *iface, VARIANT v)
1412 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1414 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1416 switch(V_VT(&v)) {
1417 case VT_BSTR:
1418 return set_style_attr(This, STYLEID_HEIGHT, V_BSTR(&v), 0);
1419 default:
1420 FIXME("unimplemented vt %d\n", V_VT(&v));
1421 return E_NOTIMPL;
1424 return S_OK;
1427 static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p)
1429 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1430 BSTR ret;
1431 HRESULT hres;
1433 TRACE("(%p)->(%p)\n", This, p);
1435 hres = get_style_attr(This, STYLEID_HEIGHT, &ret);
1436 if(FAILED(hres))
1437 return hres;
1439 V_VT(p) = VT_BSTR;
1440 V_BSTR(p) = ret;
1441 return S_OK;
1444 static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v)
1446 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1447 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1448 return E_NOTIMPL;
1451 static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p)
1453 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1454 FIXME("(%p)->(%p)\n", This, p);
1455 return E_NOTIMPL;
1458 static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v)
1460 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1461 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1462 return E_NOTIMPL;
1465 static HRESULT WINAPI HTMLStyle_get_clear(IHTMLStyle *iface, BSTR *p)
1467 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1468 FIXME("(%p)->(%p)\n", This, p);
1469 return E_NOTIMPL;
1472 static HRESULT WINAPI HTMLStyle_put_display(IHTMLStyle *iface, BSTR v)
1474 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1476 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1478 return set_style_attr(This, STYLEID_DISPLAY, v, 0);
1481 static HRESULT WINAPI HTMLStyle_get_display(IHTMLStyle *iface, BSTR *p)
1483 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1485 TRACE("(%p)->(%p)\n", This, p);
1487 return get_style_attr(This, STYLEID_DISPLAY, p);
1490 static HRESULT WINAPI HTMLStyle_put_visibility(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_VISIBILITY, v, 0);
1499 static HRESULT WINAPI HTMLStyle_get_visibility(IHTMLStyle *iface, BSTR *p)
1501 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1503 TRACE("(%p)->(%p)\n", This, p);
1505 return get_style_attr(This, STYLEID_VISIBILITY, p);
1508 static HRESULT WINAPI HTMLStyle_put_listStyleType(IHTMLStyle *iface, BSTR v)
1510 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1511 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1512 return E_NOTIMPL;
1515 static HRESULT WINAPI HTMLStyle_get_listStyleType(IHTMLStyle *iface, BSTR *p)
1517 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1518 FIXME("(%p)->(%p)\n", This, p);
1519 return E_NOTIMPL;
1522 static HRESULT WINAPI HTMLStyle_put_listStylePosition(IHTMLStyle *iface, BSTR v)
1524 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1525 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1526 return E_NOTIMPL;
1529 static HRESULT WINAPI HTMLStyle_get_listStylePosition(IHTMLStyle *iface, BSTR *p)
1531 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1532 FIXME("(%p)->(%p)\n", This, p);
1533 return E_NOTIMPL;
1536 static HRESULT WINAPI HTMLStyle_put_listStyleImage(IHTMLStyle *iface, BSTR v)
1538 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1539 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1540 return E_NOTIMPL;
1543 static HRESULT WINAPI HTMLStyle_get_listStyleImage(IHTMLStyle *iface, BSTR *p)
1545 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1546 FIXME("(%p)->(%p)\n", This, p);
1547 return E_NOTIMPL;
1550 static HRESULT WINAPI HTMLStyle_put_listStyle(IHTMLStyle *iface, BSTR v)
1552 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1553 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1554 return E_NOTIMPL;
1557 static HRESULT WINAPI HTMLStyle_get_listStyle(IHTMLStyle *iface, BSTR *p)
1559 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1560 FIXME("(%p)->(%p)\n", This, p);
1561 return E_NOTIMPL;
1564 static HRESULT WINAPI HTMLStyle_put_whiteSpace(IHTMLStyle *iface, BSTR v)
1566 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1567 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1568 return E_NOTIMPL;
1571 static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p)
1573 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1574 FIXME("(%p)->(%p)\n", This, p);
1575 return E_NOTIMPL;
1578 static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v)
1580 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1582 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1584 switch(V_VT(&v)) {
1585 case VT_BSTR:
1586 return set_style_attr(This, STYLEID_TOP, V_BSTR(&v), 0);
1587 default:
1588 FIXME("unimplemented vt %d\n", V_VT(&v));
1589 return E_NOTIMPL;
1592 return S_OK;
1595 static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p)
1597 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1598 BSTR ret;
1599 HRESULT hres;
1601 TRACE("(%p)->(%p)\n", This, p);
1603 hres = get_style_attr(This, STYLEID_TOP, &ret);
1604 if(FAILED(hres))
1605 return hres;
1607 V_VT(p) = VT_BSTR;
1608 V_BSTR(p) = ret;
1609 return S_OK;
1612 static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v)
1614 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1616 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1618 switch(V_VT(&v)) {
1619 case VT_BSTR:
1620 return set_style_attr(This, STYLEID_LEFT, V_BSTR(&v), 0);
1621 default:
1622 FIXME("unimplemented vt %d\n", V_VT(&v));
1623 return E_NOTIMPL;
1626 return S_OK;
1629 static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p)
1631 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1632 BSTR ret;
1633 HRESULT hres;
1635 TRACE("(%p)->(%p)\n", This, p);
1637 hres = get_style_attr(This, STYLEID_LEFT, &ret);
1638 if(FAILED(hres))
1639 return hres;
1641 V_VT(p) = VT_BSTR;
1642 V_BSTR(p) = ret;
1643 return S_OK;
1646 static HRESULT WINAPI HTMLStyle_get_position(IHTMLStyle *iface, BSTR *p)
1648 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1649 FIXME("(%p)->(%p)\n", This, p);
1650 return E_NOTIMPL;
1653 static HRESULT WINAPI HTMLStyle_put_zIndex(IHTMLStyle *iface, VARIANT v)
1655 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1657 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1659 switch(V_VT(&v)) {
1660 case VT_BSTR:
1661 return set_style_attr(This, STYLEID_Z_INDEX, V_BSTR(&v), 0);
1662 default:
1663 FIXME("unimplemented vt %d\n", V_VT(&v));
1664 return E_NOTIMPL;
1667 return S_OK;
1670 static HRESULT WINAPI HTMLStyle_get_zIndex(IHTMLStyle *iface, VARIANT *p)
1672 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1674 TRACE("(%p)->(%p)\n", This, p);
1676 return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
1679 static HRESULT WINAPI HTMLStyle_put_overflow(IHTMLStyle *iface, BSTR v)
1681 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1682 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1683 return E_NOTIMPL;
1686 static HRESULT WINAPI HTMLStyle_get_overflow(IHTMLStyle *iface, BSTR *p)
1688 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1689 FIXME("(%p)->(%p)\n", This, p);
1690 return E_NOTIMPL;
1693 static HRESULT WINAPI HTMLStyle_put_pageBreakBefore(IHTMLStyle *iface, BSTR v)
1695 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1696 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1697 return E_NOTIMPL;
1700 static HRESULT WINAPI HTMLStyle_get_pageBreakBefore(IHTMLStyle *iface, BSTR *p)
1702 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1703 FIXME("(%p)->(%p)\n", This, p);
1704 return E_NOTIMPL;
1707 static HRESULT WINAPI HTMLStyle_put_pageBreakAfter(IHTMLStyle *iface, BSTR v)
1709 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1710 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1711 return E_NOTIMPL;
1714 static HRESULT WINAPI HTMLStyle_get_pageBreakAfter(IHTMLStyle *iface, BSTR *p)
1716 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1717 FIXME("(%p)->(%p)\n", This, p);
1718 return E_NOTIMPL;
1721 static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
1723 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1724 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1725 return E_NOTIMPL;
1728 static HRESULT WINAPI HTMLStyle_get_cssText(IHTMLStyle *iface, BSTR *p)
1730 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1731 FIXME("(%p)->(%p)\n", This, p);
1732 return E_NOTIMPL;
1735 static HRESULT WINAPI HTMLStyle_put_pixelTop(IHTMLStyle *iface, long v)
1737 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1738 FIXME("(%p)->()\n", This);
1739 return E_NOTIMPL;
1742 static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, long *p)
1744 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1745 FIXME("(%p)->()\n", This);
1746 return E_NOTIMPL;
1749 static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, long v)
1751 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1752 FIXME("(%p)->()\n", This);
1753 return E_NOTIMPL;
1756 static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, long *p)
1758 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1759 FIXME("(%p)->()\n", This);
1760 return E_NOTIMPL;
1763 static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, long v)
1765 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1766 FIXME("(%p)->()\n", This);
1767 return E_NOTIMPL;
1770 static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, long *p)
1772 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1773 FIXME("(%p)->()\n", This);
1774 return E_NOTIMPL;
1777 static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, long v)
1779 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1780 FIXME("(%p)->()\n", This);
1781 return E_NOTIMPL;
1784 static HRESULT WINAPI HTMLStyle_get_pixelHeight(IHTMLStyle *iface, long *p)
1786 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1787 FIXME("(%p)->()\n", This);
1788 return E_NOTIMPL;
1791 static HRESULT WINAPI HTMLStyle_put_posTop(IHTMLStyle *iface, float v)
1793 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1794 FIXME("(%p)->()\n", This);
1795 return E_NOTIMPL;
1798 static HRESULT WINAPI HTMLStyle_get_posTop(IHTMLStyle *iface, float *p)
1800 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1801 FIXME("(%p)->()\n", This);
1802 return E_NOTIMPL;
1805 static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float v)
1807 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1808 FIXME("(%p)->()\n", This);
1809 return E_NOTIMPL;
1812 static HRESULT WINAPI HTMLStyle_get_posLeft(IHTMLStyle *iface, float *p)
1814 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1815 FIXME("(%p)->()\n", This);
1816 return E_NOTIMPL;
1819 static HRESULT WINAPI HTMLStyle_put_posWidth(IHTMLStyle *iface, float v)
1821 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1822 FIXME("(%p)->()\n", This);
1823 return E_NOTIMPL;
1826 static HRESULT WINAPI HTMLStyle_get_posWidth(IHTMLStyle *iface, float *p)
1828 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1829 FIXME("(%p)->()\n", This);
1830 return E_NOTIMPL;
1833 static HRESULT WINAPI HTMLStyle_put_posHeight(IHTMLStyle *iface, float v)
1835 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1836 FIXME("(%p)->()\n", This);
1837 return E_NOTIMPL;
1840 static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p)
1842 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1843 FIXME("(%p)->()\n", This);
1844 return E_NOTIMPL;
1847 static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v)
1849 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1851 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1853 return set_style_attr(This, STYLEID_CURSOR, v, 0);
1856 static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p)
1858 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1860 TRACE("(%p)->(%p)\n", This, p);
1862 return get_style_attr(This, STYLEID_CURSOR, p);
1865 static HRESULT WINAPI HTMLStyle_put_clip(IHTMLStyle *iface, BSTR v)
1867 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1868 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1869 return E_NOTIMPL;
1872 static HRESULT WINAPI HTMLStyle_get_clip(IHTMLStyle *iface, BSTR *p)
1874 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1875 FIXME("(%p)->(%p)\n", This, p);
1876 return E_NOTIMPL;
1879 static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v)
1881 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1883 WARN("(%p)->(%s)\n", This, debugstr_w(v));
1885 /* FIXME: Handle MS-style filters */
1886 return set_style_attr(This, STYLEID_FILTER, v, 0);
1889 static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p)
1891 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1893 WARN("(%p)->(%p)\n", This, p);
1895 /* FIXME: Handle MS-style filters */
1896 return get_style_attr(This, STYLEID_FILTER, p);
1899 static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttributeName,
1900 VARIANT AttributeValue, LONG lFlags)
1902 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1903 FIXME("(%p)->(%s v%d %08x)\n", This, debugstr_w(strAttributeName),
1904 V_VT(&AttributeValue), lFlags);
1905 return E_NOTIMPL;
1908 static HRESULT WINAPI HTMLStyle_getAttribute(IHTMLStyle *iface, BSTR strAttributeName,
1909 LONG lFlags, VARIANT *AttributeValue)
1911 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1912 FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
1913 lFlags, AttributeValue);
1914 return E_NOTIMPL;
1917 static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttributeName,
1918 LONG lFlags, VARIANT_BOOL *pfSuccess)
1920 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1921 FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
1922 lFlags, pfSuccess);
1923 return E_NOTIMPL;
1926 static HRESULT WINAPI HTMLStyle_toString(IHTMLStyle *iface, BSTR *String)
1928 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1929 FIXME("(%p)->(%p)\n", This, String);
1930 return E_NOTIMPL;
1933 static HRESULT HTMLStyle_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid)
1935 int c, i, min=0, max = sizeof(style_tbl)/sizeof(*style_tbl)-1;
1937 while(min <= max) {
1938 i = (min+max)/2;
1940 c = strcmpW(style_tbl[i].name, name);
1941 if(!c) {
1942 *dispid = style_tbl[i].dispid;
1943 return S_OK;
1946 if(c > 0)
1947 max = i-1;
1948 else
1949 min = i+1;
1952 return DISP_E_UNKNOWNNAME;
1955 static const IHTMLStyleVtbl HTMLStyleVtbl = {
1956 HTMLStyle_QueryInterface,
1957 HTMLStyle_AddRef,
1958 HTMLStyle_Release,
1959 HTMLStyle_GetTypeInfoCount,
1960 HTMLStyle_GetTypeInfo,
1961 HTMLStyle_GetIDsOfNames,
1962 HTMLStyle_Invoke,
1963 HTMLStyle_put_fontFamily,
1964 HTMLStyle_get_fontFamily,
1965 HTMLStyle_put_fontStyle,
1966 HTMLStyle_get_fontStyle,
1967 HTMLStyle_put_fontVariant,
1968 HTMLStyle_get_fontVariant,
1969 HTMLStyle_put_fontWeight,
1970 HTMLStyle_get_fontWeight,
1971 HTMLStyle_put_fontSize,
1972 HTMLStyle_get_fontSize,
1973 HTMLStyle_put_font,
1974 HTMLStyle_get_font,
1975 HTMLStyle_put_color,
1976 HTMLStyle_get_color,
1977 HTMLStyle_put_background,
1978 HTMLStyle_get_background,
1979 HTMLStyle_put_backgroundColor,
1980 HTMLStyle_get_backgroundColor,
1981 HTMLStyle_put_backgroundImage,
1982 HTMLStyle_get_backgroundImage,
1983 HTMLStyle_put_backgroundRepeat,
1984 HTMLStyle_get_backgroundRepeat,
1985 HTMLStyle_put_backgroundAttachment,
1986 HTMLStyle_get_backgroundAttachment,
1987 HTMLStyle_put_backgroundPosition,
1988 HTMLStyle_get_backgroundPosition,
1989 HTMLStyle_put_backgroundPositionX,
1990 HTMLStyle_get_backgroundPositionX,
1991 HTMLStyle_put_backgroundPositionY,
1992 HTMLStyle_get_backgroundPositionY,
1993 HTMLStyle_put_wordSpacing,
1994 HTMLStyle_get_wordSpacing,
1995 HTMLStyle_put_letterSpacing,
1996 HTMLStyle_get_letterSpacing,
1997 HTMLStyle_put_textDecoration,
1998 HTMLStyle_get_textDecoration,
1999 HTMLStyle_put_textDecorationNone,
2000 HTMLStyle_get_textDecorationNone,
2001 HTMLStyle_put_textDecorationUnderline,
2002 HTMLStyle_get_textDecorationUnderline,
2003 HTMLStyle_put_textDecorationOverline,
2004 HTMLStyle_get_textDecorationOverline,
2005 HTMLStyle_put_textDecorationLineThrough,
2006 HTMLStyle_get_textDecorationLineThrough,
2007 HTMLStyle_put_textDecorationBlink,
2008 HTMLStyle_get_textDecorationBlink,
2009 HTMLStyle_put_verticalAlign,
2010 HTMLStyle_get_verticalAlign,
2011 HTMLStyle_put_textTransform,
2012 HTMLStyle_get_textTransform,
2013 HTMLStyle_put_textAlign,
2014 HTMLStyle_get_textAlign,
2015 HTMLStyle_put_textIndent,
2016 HTMLStyle_get_textIndent,
2017 HTMLStyle_put_lineHeight,
2018 HTMLStyle_get_lineHeight,
2019 HTMLStyle_put_marginTop,
2020 HTMLStyle_get_marginTop,
2021 HTMLStyle_put_marginRight,
2022 HTMLStyle_get_marginRight,
2023 HTMLStyle_put_marginBottom,
2024 HTMLStyle_get_marginBottom,
2025 HTMLStyle_put_marginLeft,
2026 HTMLStyle_get_marginLeft,
2027 HTMLStyle_put_margin,
2028 HTMLStyle_get_margin,
2029 HTMLStyle_put_paddingTop,
2030 HTMLStyle_get_paddingTop,
2031 HTMLStyle_put_paddingRight,
2032 HTMLStyle_get_paddingRight,
2033 HTMLStyle_put_paddingBottom,
2034 HTMLStyle_get_paddingBottom,
2035 HTMLStyle_put_paddingLeft,
2036 HTMLStyle_get_paddingLeft,
2037 HTMLStyle_put_padding,
2038 HTMLStyle_get_padding,
2039 HTMLStyle_put_border,
2040 HTMLStyle_get_border,
2041 HTMLStyle_put_borderTop,
2042 HTMLStyle_get_borderTop,
2043 HTMLStyle_put_borderRight,
2044 HTMLStyle_get_borderRight,
2045 HTMLStyle_put_borderBottom,
2046 HTMLStyle_get_borderBottom,
2047 HTMLStyle_put_borderLeft,
2048 HTMLStyle_get_borderLeft,
2049 HTMLStyle_put_borderColor,
2050 HTMLStyle_get_borderColor,
2051 HTMLStyle_put_borderTopColor,
2052 HTMLStyle_get_borderTopColor,
2053 HTMLStyle_put_borderRightColor,
2054 HTMLStyle_get_borderRightColor,
2055 HTMLStyle_put_borderBottomColor,
2056 HTMLStyle_get_borderBottomColor,
2057 HTMLStyle_put_borderLeftColor,
2058 HTMLStyle_get_borderLeftColor,
2059 HTMLStyle_put_borderWidth,
2060 HTMLStyle_get_borderWidth,
2061 HTMLStyle_put_borderTopWidth,
2062 HTMLStyle_get_borderTopWidth,
2063 HTMLStyle_put_borderRightWidth,
2064 HTMLStyle_get_borderRightWidth,
2065 HTMLStyle_put_borderBottomWidth,
2066 HTMLStyle_get_borderBottomWidth,
2067 HTMLStyle_put_borderLeftWidth,
2068 HTMLStyle_get_borderLeftWidth,
2069 HTMLStyle_put_borderStyle,
2070 HTMLStyle_get_borderStyle,
2071 HTMLStyle_put_borderTopStyle,
2072 HTMLStyle_get_borderTopStyle,
2073 HTMLStyle_put_borderRightStyle,
2074 HTMLStyle_get_borderRightStyle,
2075 HTMLStyle_put_borderBottomStyle,
2076 HTMLStyle_get_borderBottomStyle,
2077 HTMLStyle_put_borderLeftStyle,
2078 HTMLStyle_get_borderLeftStyle,
2079 HTMLStyle_put_width,
2080 HTMLStyle_get_width,
2081 HTMLStyle_put_height,
2082 HTMLStyle_get_height,
2083 HTMLStyle_put_styleFloat,
2084 HTMLStyle_get_styleFloat,
2085 HTMLStyle_put_clear,
2086 HTMLStyle_get_clear,
2087 HTMLStyle_put_display,
2088 HTMLStyle_get_display,
2089 HTMLStyle_put_visibility,
2090 HTMLStyle_get_visibility,
2091 HTMLStyle_put_listStyleType,
2092 HTMLStyle_get_listStyleType,
2093 HTMLStyle_put_listStylePosition,
2094 HTMLStyle_get_listStylePosition,
2095 HTMLStyle_put_listStyleImage,
2096 HTMLStyle_get_listStyleImage,
2097 HTMLStyle_put_listStyle,
2098 HTMLStyle_get_listStyle,
2099 HTMLStyle_put_whiteSpace,
2100 HTMLStyle_get_whiteSpace,
2101 HTMLStyle_put_top,
2102 HTMLStyle_get_top,
2103 HTMLStyle_put_left,
2104 HTMLStyle_get_left,
2105 HTMLStyle_get_position,
2106 HTMLStyle_put_zIndex,
2107 HTMLStyle_get_zIndex,
2108 HTMLStyle_put_overflow,
2109 HTMLStyle_get_overflow,
2110 HTMLStyle_put_pageBreakBefore,
2111 HTMLStyle_get_pageBreakBefore,
2112 HTMLStyle_put_pageBreakAfter,
2113 HTMLStyle_get_pageBreakAfter,
2114 HTMLStyle_put_cssText,
2115 HTMLStyle_get_cssText,
2116 HTMLStyle_put_pixelTop,
2117 HTMLStyle_get_pixelTop,
2118 HTMLStyle_put_pixelLeft,
2119 HTMLStyle_get_pixelLeft,
2120 HTMLStyle_put_pixelWidth,
2121 HTMLStyle_get_pixelWidth,
2122 HTMLStyle_put_pixelHeight,
2123 HTMLStyle_get_pixelHeight,
2124 HTMLStyle_put_posTop,
2125 HTMLStyle_get_posTop,
2126 HTMLStyle_put_posLeft,
2127 HTMLStyle_get_posLeft,
2128 HTMLStyle_put_posWidth,
2129 HTMLStyle_get_posWidth,
2130 HTMLStyle_put_posHeight,
2131 HTMLStyle_get_posHeight,
2132 HTMLStyle_put_cursor,
2133 HTMLStyle_get_cursor,
2134 HTMLStyle_put_clip,
2135 HTMLStyle_get_clip,
2136 HTMLStyle_put_filter,
2137 HTMLStyle_get_filter,
2138 HTMLStyle_setAttribute,
2139 HTMLStyle_getAttribute,
2140 HTMLStyle_removeAttribute,
2141 HTMLStyle_toString
2144 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl = {
2145 HTMLStyle_get_dispid,
2146 NULL
2149 static const tid_t HTMLStyle_iface_tids[] = {
2150 IHTMLStyle_tid,
2151 IHTMLStyle2_tid,
2154 static dispex_static_data_t HTMLStyle_dispex = {
2155 &HTMLStyle_dispex_vtbl,
2156 DispHTMLStyle_tid,
2157 NULL,
2158 HTMLStyle_iface_tids
2161 IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle)
2163 HTMLStyle *ret = heap_alloc_zero(sizeof(HTMLStyle));
2165 ret->lpHTMLStyleVtbl = &HTMLStyleVtbl;
2166 ret->ref = 1;
2167 ret->nsstyle = nsstyle;
2168 HTMLStyle2_Init(ret);
2170 nsIDOMCSSStyleDeclaration_AddRef(nsstyle);
2172 init_dispex(&ret->dispex, (IUnknown*)HTMLSTYLE(ret), &HTMLStyle_dispex);
2174 return HTMLSTYLE(ret);