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
30 #include "mshtml_private.h"
31 #include "htmlstyle.h"
33 #include "wine/debug.h"
34 #include "wine/unicode.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
38 static const WCHAR attrBackground[] =
39 {'b','a','c','k','g','r','o','u','n','d',0};
40 static const WCHAR attrBackgroundColor[] =
41 {'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0};
42 static const WCHAR attrBackgroundImage[] =
43 {'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e',0};
44 static const WCHAR attrBackgroundPositionX[] =
45 {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','x',0};
46 static const WCHAR attrBackgroundPositionY[] =
47 {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','y',0};
48 static const WCHAR attrBackgroundRepeat[] =
49 {'b','a','c','k','g','r','o','u','n','d','-','r','e','p','e','a','t',0};
50 static const WCHAR attrBorder[] =
51 {'b','o','r','d','e','r',0};
52 static const WCHAR attrBorderBottomStyle[] =
53 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e',0};
54 static const WCHAR attrBorderBottomWidth[] =
55 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','w','i','d','t','h',0};
56 static const WCHAR attrBorderColor[] =
57 {'b','o','r','d','e','r','-','c','o','l','o','r',0};
58 static const WCHAR attrBorderLeft[] =
59 {'b','o','r','d','e','r','-','l','e','f','t',0};
60 static const WCHAR attrBorderLeftStyle[] =
61 {'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0};
62 static const WCHAR attrBorderLeftWidth[] =
63 {'b','o','r','d','e','r','-','l','e','f','t','-','w','i','d','t','h',0};
64 static const WCHAR attrBorderRightStyle[] =
65 {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
66 static const WCHAR attrBorderRightWidth[] =
67 {'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0};
68 static const WCHAR attrBorderStyle[] =
69 {'b','o','r','d','e','r','-','s','t','y','l','e',0};
70 static const WCHAR attrBorderTopStyle[] =
71 {'b','o','r','d','e','r','-','t','o','p','-','s','t','y','l','e',0};
72 static const WCHAR attrBorderTopWidth[] =
73 {'b','o','r','d','e','r','-','t','o','p','-','w','i','d','t','h',0};
74 static const WCHAR attrBorderWidth[] =
75 {'b','o','r','d','e','r','-','w','i','d','t','h',0};
76 static const WCHAR attrColor[] =
77 {'c','o','l','o','r',0};
78 static const WCHAR attrCursor[] =
79 {'c','u','r','s','o','r',0};
80 static const WCHAR attrDisplay[] =
81 {'d','i','s','p','l','a','y',0};
82 static const WCHAR attrFilter[] =
83 {'f','i','l','e','t','e','r',0};
84 static const WCHAR attrFontFamily[] =
85 {'f','o','n','t','-','f','a','m','i','l','y',0};
86 static const WCHAR attrFontSize[] =
87 {'f','o','n','t','-','s','i','z','e',0};
88 static const WCHAR attrFontStyle[] =
89 {'f','o','n','t','-','s','t','y','l','e',0};
90 static const WCHAR attrFontVariant[] =
91 {'f','o','n','t','-','v','a','r','i','a','n','t',0};
92 static const WCHAR attrFontWeight[] =
93 {'f','o','n','t','-','w','e','i','g','h','t',0};
94 static const WCHAR attrHeight[] =
95 {'h','e','i','g','h','t',0};
96 static const WCHAR attrLeft[] =
98 static const WCHAR attrLetterSpacing[] =
99 {'l','e','t','t','e','r','-','s','p','a','c','i','n','g',0};
100 static const WCHAR attrMargin[] =
101 {'m','a','r','g','i','n',0};
102 static const WCHAR attrMarginLeft[] =
103 {'m','a','r','g','i','n','-','l','e','f','t',0};
104 static const WCHAR attrMarginRight[] =
105 {'m','a','r','g','i','n','-','r','i','g','h','t',0};
106 static const WCHAR attrMinHeight[] =
107 {'m','i','n','-','h','e','i','g','h','t',0};
108 static const WCHAR attrOverflow[] =
109 {'o','v','e','r','f','l','o','w',0};
110 static const WCHAR attrPaddingLeft[] =
111 {'p','a','d','d','i','n','g','-','l','e','f','t',0};
112 static const WCHAR attrPosition[] =
113 {'p','o','s','i','t','i','o','n',0};
114 static const WCHAR attrTextAlign[] =
115 {'t','e','x','t','-','a','l','i','g','n',0};
116 static const WCHAR attrTextDecoration[] =
117 {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
118 static const WCHAR attrTop[] =
120 static const WCHAR attrVerticalAlign[] =
121 {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
122 static const WCHAR attrVisibility[] =
123 {'v','i','s','i','b','i','l','i','t','y',0};
124 static const WCHAR attrWidth[] =
125 {'w','i','d','t','h',0};
126 static const WCHAR attrWordSpacing[] =
127 {'w','o','r','d','-','s','p','a','c','i','n','g',0};
128 static const WCHAR attrWordWrap[] =
129 {'w','o','r','d','-','w','r','a','p',0};
130 static const WCHAR attrZIndex[] =
131 {'z','-','i','n','d','e','x',0};
137 {attrBackground, DISPID_IHTMLSTYLE_BACKGROUND},
138 {attrBackgroundColor, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR},
139 {attrBackgroundImage, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE},
140 {attrBackgroundPositionX, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONX},
141 {attrBackgroundPositionY, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONY},
142 {attrBackgroundRepeat, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT},
143 {attrBorder, DISPID_IHTMLSTYLE_BORDER},
144 {attrBorderBottomStyle, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE},
145 {attrBorderBottomWidth, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH},
146 {attrBorderColor, DISPID_IHTMLSTYLE_BORDERCOLOR},
147 {attrBorderLeft, DISPID_IHTMLSTYLE_BORDERLEFT},
148 {attrBorderLeftStyle, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE},
149 {attrBorderLeftWidth, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH},
150 {attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE},
151 {attrBorderRightWidth, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH},
152 {attrBorderStyle, DISPID_IHTMLSTYLE_BORDERSTYLE},
153 {attrBorderTopStyle, DISPID_IHTMLSTYLE_BORDERTOPSTYLE},
154 {attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
155 {attrBorderWidth, DISPID_IHTMLSTYLE_BORDERWIDTH},
156 {attrColor, DISPID_IHTMLSTYLE_COLOR},
157 {attrCursor, DISPID_IHTMLSTYLE_CURSOR},
158 {attrDisplay, DISPID_IHTMLSTYLE_DISPLAY},
159 {attrFilter, DISPID_IHTMLSTYLE_FILTER},
160 {attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY},
161 {attrFontSize, DISPID_IHTMLSTYLE_FONTSIZE},
162 {attrFontStyle, DISPID_IHTMLSTYLE_FONTSTYLE},
163 {attrFontVariant, DISPID_IHTMLSTYLE_FONTVARIANT},
164 {attrFontWeight, DISPID_IHTMLSTYLE_FONTWEIGHT},
165 {attrHeight, DISPID_IHTMLSTYLE_HEIGHT},
166 {attrLeft, DISPID_IHTMLSTYLE_LEFT},
167 {attrLetterSpacing, DISPID_IHTMLSTYLE_LETTERSPACING},
168 {attrMargin, DISPID_IHTMLSTYLE_MARGIN},
169 {attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT},
170 {attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT},
171 {attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT},
172 {attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW},
173 {attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT},
174 {attrPosition, DISPID_IHTMLSTYLE2_POSITION},
175 {attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN},
176 {attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION},
177 {attrTop, DISPID_IHTMLSTYLE_TOP},
178 {attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN},
179 {attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY},
180 {attrWidth, DISPID_IHTMLSTYLE_WIDTH},
181 {attrWordSpacing, DISPID_IHTMLSTYLE_WORDSPACING},
182 {attrWordWrap, DISPID_IHTMLSTYLE3_WORDWRAP},
183 {attrZIndex, DISPID_IHTMLSTYLE_ZINDEX}
186 static const WCHAR valLineThrough[] =
187 {'l','i','n','e','-','t','h','r','o','u','g','h',0};
188 static const WCHAR valUnderline[] =
189 {'u','n','d','e','r','l','i','n','e',0};
190 static const WCHAR szNormal[] =
191 {'n','o','r','m','a','l',0};
192 static const WCHAR styleNone[] =
194 static const WCHAR valOverline[] =
195 {'o','v','e','r','l','i','n','e',0};
196 static const WCHAR valBlink[] =
197 {'b','l','i','n','k',0};
199 static const WCHAR px_formatW[] = {'%','d','p','x',0};
200 static const WCHAR emptyW[] = {0};
202 static LPWSTR fix_px_value(LPCWSTR val)
207 while(*ptr && isspaceW(*ptr))
212 while(*ptr && isdigitW(*ptr))
215 if(!*ptr || isspaceW(*ptr)) {
217 int len = strlenW(val)+1;
219 ret = heap_alloc((len+2)*sizeof(WCHAR));
220 memcpy(ret, val, (ptr-val)*sizeof(WCHAR));
226 TRACE("fixed %s -> %s\n", debugstr_w(val), debugstr_w(ret));
231 while(*ptr && !isspaceW(*ptr))
238 static LPWSTR fix_url_value(LPCWSTR val)
242 static const WCHAR urlW[] = {'u','r','l','('};
244 if(strncmpW(val, urlW, sizeof(urlW)/sizeof(WCHAR)) || !strchrW(val, '\\'))
247 ret = heap_strdupW(val);
249 for(ptr = ret; *ptr; ptr++) {
257 HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCWSTR value, DWORD flags)
259 nsAString str_name, str_value, str_empty;
263 static const PRUnichar wszEmpty[] = {0};
265 if(flags & ATTR_FIX_PX)
266 val = fix_px_value(value);
267 if(flags & ATTR_FIX_URL)
268 val = fix_url_value(value);
270 nsAString_Init(&str_name, style_tbl[sid].name);
271 nsAString_Init(&str_value, val ? val : value);
272 nsAString_Init(&str_empty, wszEmpty);
275 nsres = nsIDOMCSSStyleDeclaration_SetProperty(nsstyle, &str_name, &str_value, &str_empty);
277 ERR("SetProperty failed: %08x\n", nsres);
279 nsAString_Finish(&str_name);
280 nsAString_Finish(&str_value);
281 nsAString_Finish(&str_empty);
286 HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags)
288 switch(V_VT(value)) {
290 return set_nsstyle_attr(nsstyle, sid, emptyW, flags);
293 return set_nsstyle_attr(nsstyle, sid, V_BSTR(value), flags);
297 static const WCHAR format[] = {'%','d',0};
299 wsprintfW(str, format, V_I4(value));
300 return set_nsstyle_attr(nsstyle, sid, str, flags);
303 FIXME("not implemented vt %d\n", V_VT(value));
311 static inline HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWORD flags)
313 return set_nsstyle_attr(This->nsstyle, sid, value, flags);
316 static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value)
321 nsAString_Init(&str_name, style_tbl[sid].name);
323 nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle, &str_name, value);
324 if(NS_FAILED(nsres)) {
325 ERR("SetProperty failed: %08x\n", nsres);
329 nsAString_Finish(&str_name);
334 HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p)
337 const PRUnichar *value;
339 nsAString_Init(&str_value, NULL);
341 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
343 nsAString_GetData(&str_value, &value);
344 *p = *value ? SysAllocString(value) : NULL;
346 nsAString_Finish(&str_value);
348 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p));
352 HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags)
355 const PRUnichar *value;
358 nsAString_Init(&str_value, NULL);
360 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
362 nsAString_GetData(&str_value, &value);
364 if(flags & ATTR_STR_TO_INT) {
365 const PRUnichar *ptr = value;
374 while(isdigitW(*ptr))
375 i = i*10 + (*ptr++ - '0');
379 V_I4(p) = neg ? -i : i;
388 str = SysAllocString(value);
390 return E_OUTOFMEMORY;
397 nsAString_Finish(&str_value);
399 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_variant(p));
403 static inline HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p)
405 return get_nsstyle_attr(This->nsstyle, sid, p);
408 static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p)
411 const PRUnichar *value;
413 nsAString_Init(&str_value, NULL);
415 get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
417 nsAString_GetData(&str_value, &value);
418 *p = strcmpW(value, exval) ? VARIANT_FALSE : VARIANT_TRUE;
419 nsAString_Finish(&str_value);
421 TRACE("%s -> %x\n", debugstr_w(style_tbl[sid].name), *p);
425 static inline HRESULT set_style_pos(HTMLStyle *This, styleid_t sid, float value)
428 WCHAR szFormat[] = {'%','.','0','f','p','x',0};
430 value = floor(value);
432 sprintfW(szValue, szFormat, value);
434 return set_style_attr(This, sid, szValue, 0);
437 static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p)
441 WCHAR pxW[] = {'p','x',0};
443 TRACE("%p %d %p\n", This, sid, p);
447 nsAString_Init(&str_value, NULL);
449 hres = get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
453 const PRUnichar *value;
455 nsAString_GetData(&str_value, &value);
458 *p = strtolW(value, &ptr, 10);
460 if(*ptr && strcmpW(ptr, pxW))
462 nsAString_Finish(&str_value);
463 FIXME("only px values are currently supported\n");
469 TRACE("ret %f\n", *p);
471 nsAString_Finish(&str_value);
476 static BOOL is_valid_border_style(BSTR v)
478 static const WCHAR styleDotted[] = {'d','o','t','t','e','d',0};
479 static const WCHAR styleDashed[] = {'d','a','s','h','e','d',0};
480 static const WCHAR styleSolid[] = {'s','o','l','i','d',0};
481 static const WCHAR styleDouble[] = {'d','o','u','b','l','e',0};
482 static const WCHAR styleGroove[] = {'g','r','o','o','v','e',0};
483 static const WCHAR styleRidge[] = {'r','i','d','g','e',0};
484 static const WCHAR styleInset[] = {'i','n','s','e','t',0};
485 static const WCHAR styleOutset[] = {'o','u','t','s','e','t',0};
487 TRACE("%s\n", debugstr_w(v));
489 if(!v || strcmpiW(v, styleNone) == 0 || strcmpiW(v, styleDotted) == 0 ||
490 strcmpiW(v, styleDashed) == 0 || strcmpiW(v, styleSolid) == 0 ||
491 strcmpiW(v, styleDouble) == 0 || strcmpiW(v, styleGroove) == 0 ||
492 strcmpiW(v, styleRidge) == 0 || strcmpiW(v, styleInset) == 0 ||
493 strcmpiW(v, styleOutset) == 0 )
501 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
503 static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, void **ppv)
505 HTMLStyle *This = HTMLSTYLE_THIS(iface);
509 if(IsEqualGUID(&IID_IUnknown, riid)) {
510 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
511 *ppv = HTMLSTYLE(This);
512 }else if(IsEqualGUID(&IID_IHTMLStyle, riid)) {
513 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This, ppv);
514 *ppv = HTMLSTYLE(This);
515 }else if(IsEqualGUID(&IID_IHTMLStyle2, riid)) {
516 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This, ppv);
517 *ppv = HTMLSTYLE2(This);
518 }else if(IsEqualGUID(&IID_IHTMLStyle3, riid)) {
519 TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This, ppv);
520 *ppv = HTMLSTYLE3(This);
521 }else if(IsEqualGUID(&IID_IHTMLStyle4, riid)) {
522 TRACE("(%p)->(IID_IHTMLStyle4 %p)\n", This, ppv);
523 *ppv = HTMLSTYLE4(This);
524 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
525 return *ppv ? S_OK : E_NOINTERFACE;
529 IUnknown_AddRef((IUnknown*)*ppv);
533 WARN("unsupported %s\n", debugstr_guid(riid));
534 return E_NOINTERFACE;
537 static ULONG WINAPI HTMLStyle_AddRef(IHTMLStyle *iface)
539 HTMLStyle *This = HTMLSTYLE_THIS(iface);
540 LONG ref = InterlockedIncrement(&This->ref);
542 TRACE("(%p) ref=%d\n", This, ref);
547 static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
549 HTMLStyle *This = HTMLSTYLE_THIS(iface);
550 LONG ref = InterlockedDecrement(&This->ref);
552 TRACE("(%p) ref=%d\n", This, ref);
556 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
557 release_dispex(&This->dispex);
564 static HRESULT WINAPI HTMLStyle_GetTypeInfoCount(IHTMLStyle *iface, UINT *pctinfo)
566 HTMLStyle *This = HTMLSTYLE_THIS(iface);
567 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
570 static HRESULT WINAPI HTMLStyle_GetTypeInfo(IHTMLStyle *iface, UINT iTInfo,
571 LCID lcid, ITypeInfo **ppTInfo)
573 HTMLStyle *This = HTMLSTYLE_THIS(iface);
574 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
577 static HRESULT WINAPI HTMLStyle_GetIDsOfNames(IHTMLStyle *iface, REFIID riid,
578 LPOLESTR *rgszNames, UINT cNames,
579 LCID lcid, DISPID *rgDispId)
581 HTMLStyle *This = HTMLSTYLE_THIS(iface);
582 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
585 static HRESULT WINAPI HTMLStyle_Invoke(IHTMLStyle *iface, DISPID dispIdMember,
586 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
587 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
589 HTMLStyle *This = HTMLSTYLE_THIS(iface);
590 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
591 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
594 static HRESULT WINAPI HTMLStyle_put_fontFamily(IHTMLStyle *iface, BSTR v)
596 HTMLStyle *This = HTMLSTYLE_THIS(iface);
598 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
600 return set_style_attr(This, STYLEID_FONT_FAMILY, v, 0);
603 static HRESULT WINAPI HTMLStyle_get_fontFamily(IHTMLStyle *iface, BSTR *p)
605 HTMLStyle *This = HTMLSTYLE_THIS(iface);
607 TRACE("(%p)->(%p)\n", This, p);
609 return get_style_attr(This, STYLEID_FONT_FAMILY, p);
612 static HRESULT WINAPI HTMLStyle_put_fontStyle(IHTMLStyle *iface, BSTR v)
614 HTMLStyle *This = HTMLSTYLE_THIS(iface);
615 static const WCHAR szItalic[] = {'i','t','a','l','i','c',0};
616 static const WCHAR szOblique[] = {'o','b','l','i','q','u','e',0};
618 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
620 /* fontStyle can only be one of the follow values. */
621 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(szItalic, v) == 0 ||
622 strcmpiW(szOblique, v) == 0)
624 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, v, 0);
630 static HRESULT WINAPI HTMLStyle_get_fontStyle(IHTMLStyle *iface, BSTR *p)
632 HTMLStyle *This = HTMLSTYLE_THIS(iface);
634 TRACE("(%p)->(%p)\n", This, p);
636 return get_style_attr(This, STYLEID_FONT_STYLE, p);
639 static HRESULT WINAPI HTMLStyle_put_fontVariant(IHTMLStyle *iface, BSTR v)
641 HTMLStyle *This = HTMLSTYLE_THIS(iface);
642 static const WCHAR szCaps[] = {'s','m','a','l','l','-','c','a','p','s',0};
644 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
646 /* fontVariant can only be one of the follow values. */
647 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(szCaps, v) == 0)
649 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, v, 0);
655 static HRESULT WINAPI HTMLStyle_get_fontVariant(IHTMLStyle *iface, BSTR *p)
657 HTMLStyle *This = HTMLSTYLE_THIS(iface);
658 TRACE("(%p)->(%p)\n", This, p);
663 return get_style_attr(This, STYLEID_FONT_VARIANT, p);
666 static HRESULT WINAPI HTMLStyle_put_fontWeight(IHTMLStyle *iface, BSTR v)
668 HTMLStyle *This = HTMLSTYLE_THIS(iface);
669 static const WCHAR styleBold[] = {'b','o','l','d',0};
670 static const WCHAR styleBolder[] = {'b','o','l','d','e','r',0};
671 static const WCHAR styleLighter[] = {'l','i','g','h','t','e','r',0};
672 static const WCHAR style100[] = {'1','0','0',0};
673 static const WCHAR style200[] = {'2','0','0',0};
674 static const WCHAR style300[] = {'3','0','0',0};
675 static const WCHAR style400[] = {'4','0','0',0};
676 static const WCHAR style500[] = {'5','0','0',0};
677 static const WCHAR style600[] = {'6','0','0',0};
678 static const WCHAR style700[] = {'7','0','0',0};
679 static const WCHAR style800[] = {'8','0','0',0};
680 static const WCHAR style900[] = {'9','0','0',0};
682 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
684 /* fontWeight can only be one of the following */
685 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(styleBold, v) == 0 ||
686 strcmpiW(styleBolder, v) == 0 || strcmpiW(styleLighter, v) == 0 ||
687 strcmpiW(style100, v) == 0 || strcmpiW(style200, v) == 0 ||
688 strcmpiW(style300, v) == 0 || strcmpiW(style400, v) == 0 ||
689 strcmpiW(style500, v) == 0 || strcmpiW(style600, v) == 0 ||
690 strcmpiW(style700, v) == 0 || strcmpiW(style800, v) == 0 ||
691 strcmpiW(style900, v) == 0
694 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_WEIGHT, v, 0);
700 static HRESULT WINAPI HTMLStyle_get_fontWeight(IHTMLStyle *iface, BSTR *p)
702 HTMLStyle *This = HTMLSTYLE_THIS(iface);
704 TRACE("(%p)->(%p)\n", This, p);
706 return get_style_attr(This, STYLEID_FONT_WEIGHT, p);
709 static HRESULT WINAPI HTMLStyle_put_fontSize(IHTMLStyle *iface, VARIANT v)
711 HTMLStyle *This = HTMLSTYLE_THIS(iface);
713 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
717 return set_style_attr(This, STYLEID_FONT_SIZE, V_BSTR(&v), 0);
719 FIXME("not supported vt %d\n", V_VT(&v));
725 static HRESULT WINAPI HTMLStyle_get_fontSize(IHTMLStyle *iface, VARIANT *p)
727 HTMLStyle *This = HTMLSTYLE_THIS(iface);
729 TRACE("(%p)->(%p)\n", This, p);
732 return get_style_attr(This, STYLEID_FONT_SIZE, &V_BSTR(p));
735 static HRESULT WINAPI HTMLStyle_put_font(IHTMLStyle *iface, BSTR v)
737 HTMLStyle *This = HTMLSTYLE_THIS(iface);
738 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
742 static HRESULT WINAPI HTMLStyle_get_font(IHTMLStyle *iface, BSTR *p)
744 HTMLStyle *This = HTMLSTYLE_THIS(iface);
745 FIXME("(%p)->(%p)\n", This, p);
749 static HRESULT WINAPI HTMLStyle_put_color(IHTMLStyle *iface, VARIANT v)
751 HTMLStyle *This = HTMLSTYLE_THIS(iface);
753 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
757 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
758 return set_style_attr(This, STYLEID_COLOR, V_BSTR(&v), 0);
761 FIXME("unsupported vt=%d\n", V_VT(&v));
767 static HRESULT WINAPI HTMLStyle_get_color(IHTMLStyle *iface, VARIANT *p)
769 HTMLStyle *This = HTMLSTYLE_THIS(iface);
771 TRACE("(%p)->(%p)\n", This, p);
774 return get_style_attr(This, STYLEID_COLOR, &V_BSTR(p));
777 static HRESULT WINAPI HTMLStyle_put_background(IHTMLStyle *iface, BSTR v)
779 HTMLStyle *This = HTMLSTYLE_THIS(iface);
781 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
783 return set_style_attr(This, STYLEID_BACKGROUND, v, 0);
786 static HRESULT WINAPI HTMLStyle_get_background(IHTMLStyle *iface, BSTR *p)
788 HTMLStyle *This = HTMLSTYLE_THIS(iface);
790 TRACE("(%p)->(%p)\n", This, p);
792 return get_style_attr(This, STYLEID_BACKGROUND, p);
795 static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v)
797 HTMLStyle *This = HTMLSTYLE_THIS(iface);
799 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
803 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, V_BSTR(&v), 0);
806 static const WCHAR format[] = {'#','%','0','6','x',0};
808 wsprintfW(value, format, V_I4(&v));
809 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, value, 0);
812 FIXME("unsupported vt %d\n", V_VT(&v));
818 static HRESULT WINAPI HTMLStyle_get_backgroundColor(IHTMLStyle *iface, VARIANT *p)
820 HTMLStyle *This = HTMLSTYLE_THIS(iface);
821 TRACE("(%p)->(%p)\n", This, p);
824 return get_style_attr(This, STYLEID_BACKGROUND_COLOR, &V_BSTR(p));
827 static HRESULT WINAPI HTMLStyle_put_backgroundImage(IHTMLStyle *iface, BSTR v)
829 HTMLStyle *This = HTMLSTYLE_THIS(iface);
831 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
833 return set_style_attr(This, STYLEID_BACKGROUND_IMAGE, v, ATTR_FIX_URL);
836 static HRESULT WINAPI HTMLStyle_get_backgroundImage(IHTMLStyle *iface, BSTR *p)
838 HTMLStyle *This = HTMLSTYLE_THIS(iface);
840 TRACE("(%p)->(%p)\n", This, p);
842 return get_style_attr(This, STYLEID_BACKGROUND_IMAGE, p);
845 static HRESULT WINAPI HTMLStyle_put_backgroundRepeat(IHTMLStyle *iface, BSTR v)
847 HTMLStyle *This = HTMLSTYLE_THIS(iface);
848 static const WCHAR styleRepeat[] = {'r','e','p','e','a','t',0};
849 static const WCHAR styleNoRepeat[] = {'n','o','-','r','e','p','e','a','t',0};
850 static const WCHAR styleRepeatX[] = {'r','e','p','e','a','t','-','x',0};
851 static const WCHAR styleRepeatY[] = {'r','e','p','e','a','t','-','y',0};
853 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
855 /* fontWeight can only be one of the following */
856 if(!v || strcmpiW(styleRepeat, v) == 0 || strcmpiW(styleNoRepeat, v) == 0 ||
857 strcmpiW(styleRepeatX, v) == 0 || strcmpiW(styleRepeatY, v) == 0 )
859 return set_style_attr(This, STYLEID_BACKGROUND_REPEAT , v, 0);
865 static HRESULT WINAPI HTMLStyle_get_backgroundRepeat(IHTMLStyle *iface, BSTR *p)
867 HTMLStyle *This = HTMLSTYLE_THIS(iface);
869 TRACE("(%p)->(%p)\n", This, p);
871 return get_style_attr(This, STYLEID_BACKGROUND_REPEAT, p);
874 static HRESULT WINAPI HTMLStyle_put_backgroundAttachment(IHTMLStyle *iface, BSTR v)
876 HTMLStyle *This = HTMLSTYLE_THIS(iface);
877 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
881 static HRESULT WINAPI HTMLStyle_get_backgroundAttachment(IHTMLStyle *iface, BSTR *p)
883 HTMLStyle *This = HTMLSTYLE_THIS(iface);
884 FIXME("(%p)->(%p)\n", This, p);
888 static HRESULT WINAPI HTMLStyle_put_backgroundPosition(IHTMLStyle *iface, BSTR v)
890 HTMLStyle *This = HTMLSTYLE_THIS(iface);
891 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
895 static HRESULT WINAPI HTMLStyle_get_backgroundPosition(IHTMLStyle *iface, BSTR *p)
897 HTMLStyle *This = HTMLSTYLE_THIS(iface);
898 FIXME("(%p)->(%p)\n", This, p);
902 static HRESULT WINAPI HTMLStyle_put_backgroundPositionX(IHTMLStyle *iface, VARIANT v)
904 HTMLStyle *This = HTMLSTYLE_THIS(iface);
905 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
906 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_X, &v, 0);
909 static HRESULT WINAPI HTMLStyle_get_backgroundPositionX(IHTMLStyle *iface, VARIANT *p)
911 HTMLStyle *This = HTMLSTYLE_THIS(iface);
912 TRACE("(%p)->(%p)\n", This, p);
913 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_X, p, 0);
916 static HRESULT WINAPI HTMLStyle_put_backgroundPositionY(IHTMLStyle *iface, VARIANT v)
918 HTMLStyle *This = HTMLSTYLE_THIS(iface);
919 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
920 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_Y, &v, 0);
923 static HRESULT WINAPI HTMLStyle_get_backgroundPositionY(IHTMLStyle *iface, VARIANT *p)
925 HTMLStyle *This = HTMLSTYLE_THIS(iface);
926 TRACE("(%p)->(%p)\n", This, p);
927 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_Y, p, 0);
930 static HRESULT WINAPI HTMLStyle_put_wordSpacing(IHTMLStyle *iface, VARIANT v)
932 HTMLStyle *This = HTMLSTYLE_THIS(iface);
933 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
934 return set_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, &v, 0);
937 static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p)
939 HTMLStyle *This = HTMLSTYLE_THIS(iface);
940 TRACE("(%p)->(%p)\n", This, p);
941 return get_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, p, 0);
944 static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
946 HTMLStyle *This = HTMLSTYLE_THIS(iface);
947 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
948 return set_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, &v, 0);
951 static HRESULT WINAPI HTMLStyle_get_letterSpacing(IHTMLStyle *iface, VARIANT *p)
953 HTMLStyle *This = HTMLSTYLE_THIS(iface);
954 TRACE("(%p)->(%p)\n", This, p);
955 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
958 static HRESULT WINAPI HTMLStyle_put_textDecoration(IHTMLStyle *iface, BSTR v)
960 HTMLStyle *This = HTMLSTYLE_THIS(iface);
962 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
964 /* textDecoration can only be one of the following */
965 if(!v || strcmpiW(styleNone, v) == 0 || strcmpiW(valUnderline, v) == 0 ||
966 strcmpiW(valOverline, v) == 0 || strcmpiW(valLineThrough, v) == 0 ||
967 strcmpiW(valBlink, v) == 0)
969 return set_style_attr(This, STYLEID_TEXT_DECORATION , v, 0);
975 static HRESULT WINAPI HTMLStyle_get_textDecoration(IHTMLStyle *iface, BSTR *p)
977 HTMLStyle *This = HTMLSTYLE_THIS(iface);
979 TRACE("(%p)->(%p)\n", This, p);
981 return get_style_attr(This, STYLEID_TEXT_DECORATION, p);
984 static HRESULT WINAPI HTMLStyle_put_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL v)
986 HTMLStyle *This = HTMLSTYLE_THIS(iface);
988 TRACE("(%p)->(%x)\n", This, v);
990 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? styleNone : emptyW, 0);
993 static HRESULT WINAPI HTMLStyle_get_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL *p)
995 HTMLStyle *This = HTMLSTYLE_THIS(iface);
997 TRACE("(%p)->(%p)\n", This, p);
999 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, styleNone, p);
1002 static HRESULT WINAPI HTMLStyle_put_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL v)
1004 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1006 TRACE("(%p)->(%x)\n", This, v);
1008 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valUnderline : emptyW, 0);
1011 static HRESULT WINAPI HTMLStyle_get_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL *p)
1013 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1015 TRACE("(%p)->(%p)\n", This, p);
1017 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valUnderline, p);
1020 static HRESULT WINAPI HTMLStyle_put_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL v)
1022 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1024 TRACE("(%p)->(%x)\n", This, v);
1026 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valOverline : emptyW, 0);
1029 static HRESULT WINAPI HTMLStyle_get_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL *p)
1031 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1033 TRACE("(%p)->(%p)\n", This, p);
1035 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valOverline, p);
1038 static HRESULT WINAPI HTMLStyle_put_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL v)
1040 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1042 TRACE("(%p)->(%x)\n", This, v);
1044 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valLineThrough : emptyW, 0);
1047 static HRESULT WINAPI HTMLStyle_get_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL *p)
1049 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1051 TRACE("(%p)->(%p)\n", This, p);
1053 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valLineThrough, p);
1056 static HRESULT WINAPI HTMLStyle_put_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL v)
1058 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1060 TRACE("(%p)->(%x)\n", This, v);
1062 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valBlink : emptyW, 0);
1065 static HRESULT WINAPI HTMLStyle_get_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL *p)
1067 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1069 TRACE("(%p)->(%p)\n", This, p);
1071 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valBlink, p);
1074 static HRESULT WINAPI HTMLStyle_put_verticalAlign(IHTMLStyle *iface, VARIANT v)
1076 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1078 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1082 return set_style_attr(This, STYLEID_VERTICAL_ALIGN, V_BSTR(&v), 0);
1084 FIXME("not implemented vt %d\n", V_VT(&v));
1091 static HRESULT WINAPI HTMLStyle_get_verticalAlign(IHTMLStyle *iface, VARIANT *p)
1093 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1097 TRACE("(%p)->(%p)\n", This, p);
1099 hres = get_style_attr(This, STYLEID_VERTICAL_ALIGN, &ret);
1108 static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v)
1110 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1111 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1115 static HRESULT WINAPI HTMLStyle_get_textTransform(IHTMLStyle *iface, BSTR *p)
1117 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1118 FIXME("(%p)->(%p)\n", This, p);
1122 static HRESULT WINAPI HTMLStyle_put_textAlign(IHTMLStyle *iface, BSTR v)
1124 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1126 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1128 return set_style_attr(This, STYLEID_TEXT_ALIGN, v, 0);
1131 static HRESULT WINAPI HTMLStyle_get_textAlign(IHTMLStyle *iface, BSTR *p)
1133 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1135 TRACE("(%p)->(%p)\n", This, p);
1137 return get_style_attr(This, STYLEID_TEXT_ALIGN, p);
1140 static HRESULT WINAPI HTMLStyle_put_textIndent(IHTMLStyle *iface, VARIANT v)
1142 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1143 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1147 static HRESULT WINAPI HTMLStyle_get_textIndent(IHTMLStyle *iface, VARIANT *p)
1149 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1150 FIXME("(%p)->(%p)\n", This, p);
1154 static HRESULT WINAPI HTMLStyle_put_lineHeight(IHTMLStyle *iface, VARIANT v)
1156 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1157 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1161 static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
1163 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1164 FIXME("(%p)->(%p)\n", This, p);
1168 static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
1170 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1171 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1175 static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
1177 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1178 FIXME("(%p)->(%p)\n", This, p);
1182 static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
1184 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1186 TRACE("(%p)->(v(%d))\n", This, V_VT(&v));
1190 return set_style_attr(This, STYLEID_MARGIN_RIGHT, emptyW, 0);
1194 wsprintfW(buf, px_formatW, V_I4(&v));
1195 return set_style_attr(This, STYLEID_MARGIN_RIGHT, buf, 0);
1198 return set_style_attr(This, STYLEID_MARGIN_RIGHT, V_BSTR(&v), 0);
1200 FIXME("Unsupported vt=%d\n", V_VT(&v));
1206 static HRESULT WINAPI HTMLStyle_get_marginRight(IHTMLStyle *iface, VARIANT *p)
1208 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1209 TRACE("(%p)->(%p)\n", This, p);
1210 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
1213 static HRESULT WINAPI HTMLStyle_put_marginBottom(IHTMLStyle *iface, VARIANT v)
1215 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1216 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1220 static HRESULT WINAPI HTMLStyle_get_marginBottom(IHTMLStyle *iface, VARIANT *p)
1222 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1223 FIXME("(%p)->(%p)\n", This, p);
1227 static HRESULT WINAPI HTMLStyle_put_marginLeft(IHTMLStyle *iface, VARIANT v)
1229 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1233 TRACE("(%p)->(NULL)\n", This);
1234 return set_style_attr(This, STYLEID_MARGIN_LEFT, emptyW, 0);
1238 TRACE("(%p)->(%d)\n", This, V_I4(&v));
1240 wsprintfW(buf, px_formatW, V_I4(&v));
1241 return set_style_attr(This, STYLEID_MARGIN_LEFT, buf, 0);
1244 TRACE("(%p)->(%s)\n", This, debugstr_w(V_BSTR(&v)));
1245 return set_style_attr(This, STYLEID_MARGIN_LEFT, V_BSTR(&v), 0);
1247 FIXME("Unsupported vt=%d\n", V_VT(&v));
1253 static HRESULT WINAPI HTMLStyle_put_margin(IHTMLStyle *iface, BSTR v)
1255 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1257 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1259 return set_style_attr(This, STYLEID_MARGIN, v, 0);
1262 static HRESULT WINAPI HTMLStyle_get_margin(IHTMLStyle *iface, BSTR *p)
1264 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1266 TRACE("(%p)->(%p)\n", This, p);
1268 return get_style_attr(This, STYLEID_MARGIN, p);
1271 static HRESULT WINAPI HTMLStyle_get_marginLeft(IHTMLStyle *iface, VARIANT *p)
1273 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1274 TRACE("(%p)->(%p)\n", This, p);
1275 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
1278 static HRESULT WINAPI HTMLStyle_put_paddingTop(IHTMLStyle *iface, VARIANT v)
1280 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1281 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1285 static HRESULT WINAPI HTMLStyle_get_paddingTop(IHTMLStyle *iface, VARIANT *p)
1287 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1288 FIXME("(%p)->(%p)\n", This, p);
1292 static HRESULT WINAPI HTMLStyle_put_paddingRight(IHTMLStyle *iface, VARIANT v)
1294 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1295 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1299 static HRESULT WINAPI HTMLStyle_get_paddingRight(IHTMLStyle *iface, VARIANT *p)
1301 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1302 FIXME("(%p)->(%p)\n", This, p);
1306 static HRESULT WINAPI HTMLStyle_put_paddingBottom(IHTMLStyle *iface, VARIANT v)
1308 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1309 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1313 static HRESULT WINAPI HTMLStyle_get_paddingBottom(IHTMLStyle *iface, VARIANT *p)
1315 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1316 FIXME("(%p)->(%p)\n", This, p);
1320 static HRESULT WINAPI HTMLStyle_put_paddingLeft(IHTMLStyle *iface, VARIANT v)
1322 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1324 TRACE("(%p)->(vt=%d)\n", This, V_VT(&v));
1330 wsprintfW(buf, px_formatW, V_I4(&v));
1331 return set_style_attr(This, STYLEID_PADDING_LEFT, buf, 0);
1334 return set_style_attr(This, STYLEID_PADDING_LEFT, V_BSTR(&v), 0);
1336 FIXME("unsupported vt=%d\n", V_VT(&v));
1342 static HRESULT WINAPI HTMLStyle_get_paddingLeft(IHTMLStyle *iface, VARIANT *p)
1344 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1348 TRACE("(%p)->(%p)\n", This, p);
1350 hres = get_style_attr(This, STYLEID_PADDING_LEFT, &ret);
1359 static HRESULT WINAPI HTMLStyle_put_padding(IHTMLStyle *iface, BSTR v)
1361 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1362 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1366 static HRESULT WINAPI HTMLStyle_get_padding(IHTMLStyle *iface, BSTR *p)
1368 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1369 FIXME("(%p)->(%p)\n", This, p);
1373 static HRESULT WINAPI HTMLStyle_put_border(IHTMLStyle *iface, BSTR v)
1375 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1377 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1379 return set_style_attr(This, STYLEID_BORDER, v, 0);
1382 static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p)
1384 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1386 TRACE("(%p)->(%p)\n", This, p);
1388 return get_style_attr(This, STYLEID_BORDER, p);
1391 static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
1393 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1394 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1398 static HRESULT WINAPI HTMLStyle_get_borderTop(IHTMLStyle *iface, BSTR *p)
1400 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1401 FIXME("(%p)->(%p)\n", This, p);
1405 static HRESULT WINAPI HTMLStyle_put_borderRight(IHTMLStyle *iface, BSTR v)
1407 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1408 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1412 static HRESULT WINAPI HTMLStyle_get_borderRight(IHTMLStyle *iface, BSTR *p)
1414 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1415 FIXME("(%p)->(%p)\n", This, p);
1419 static HRESULT WINAPI HTMLStyle_put_borderBottom(IHTMLStyle *iface, BSTR v)
1421 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1422 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1426 static HRESULT WINAPI HTMLStyle_get_borderBottom(IHTMLStyle *iface, BSTR *p)
1428 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1429 FIXME("(%p)->(%p)\n", This, p);
1433 static HRESULT WINAPI HTMLStyle_put_borderLeft(IHTMLStyle *iface, BSTR v)
1435 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1437 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1439 return set_style_attr(This, STYLEID_BORDER_LEFT, v, ATTR_FIX_PX);
1442 static HRESULT WINAPI HTMLStyle_get_borderLeft(IHTMLStyle *iface, BSTR *p)
1444 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1446 TRACE("(%p)->(%p)\n", This, p);
1448 return get_style_attr(This, STYLEID_BORDER_LEFT, p);
1451 static HRESULT WINAPI HTMLStyle_put_borderColor(IHTMLStyle *iface, BSTR v)
1453 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1455 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1457 return set_style_attr(This, STYLEID_BORDER_COLOR, v, 0);
1460 static HRESULT WINAPI HTMLStyle_get_borderColor(IHTMLStyle *iface, BSTR *p)
1462 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1464 TRACE("(%p)->(%p)\n", This, p);
1466 return get_style_attr(This, STYLEID_BORDER_COLOR, p);
1469 static HRESULT WINAPI HTMLStyle_put_borderTopColor(IHTMLStyle *iface, VARIANT v)
1471 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1472 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1476 static HRESULT WINAPI HTMLStyle_get_borderTopColor(IHTMLStyle *iface, VARIANT *p)
1478 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1479 FIXME("(%p)->(%p)\n", This, p);
1483 static HRESULT WINAPI HTMLStyle_put_borderRightColor(IHTMLStyle *iface, VARIANT v)
1485 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1486 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1490 static HRESULT WINAPI HTMLStyle_get_borderRightColor(IHTMLStyle *iface, VARIANT *p)
1492 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1493 FIXME("(%p)->(%p)\n", This, p);
1497 static HRESULT WINAPI HTMLStyle_put_borderBottomColor(IHTMLStyle *iface, VARIANT v)
1499 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1500 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1504 static HRESULT WINAPI HTMLStyle_get_borderBottomColor(IHTMLStyle *iface, VARIANT *p)
1506 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1507 FIXME("(%p)->(%p)\n", This, p);
1511 static HRESULT WINAPI HTMLStyle_put_borderLeftColor(IHTMLStyle *iface, VARIANT v)
1513 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1514 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1518 static HRESULT WINAPI HTMLStyle_get_borderLeftColor(IHTMLStyle *iface, VARIANT *p)
1520 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1521 FIXME("(%p)->(%p)\n", This, p);
1525 static HRESULT WINAPI HTMLStyle_put_borderWidth(IHTMLStyle *iface, BSTR v)
1527 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1528 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1529 return set_style_attr(This, STYLEID_BORDER_WIDTH, v, ATTR_FIX_PX);
1532 static HRESULT WINAPI HTMLStyle_get_borderWidth(IHTMLStyle *iface, BSTR *p)
1534 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1535 TRACE("(%p)->(%p)\n", This, p);
1536 return get_style_attr(This, STYLEID_BORDER_WIDTH, p);
1539 static HRESULT WINAPI HTMLStyle_put_borderTopWidth(IHTMLStyle *iface, VARIANT v)
1541 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1542 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1543 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, &v, 0);
1546 static HRESULT WINAPI HTMLStyle_get_borderTopWidth(IHTMLStyle *iface, VARIANT *p)
1548 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1550 TRACE("(%p)->(%p)\n", This, p);
1552 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
1555 static HRESULT WINAPI HTMLStyle_put_borderRightWidth(IHTMLStyle *iface, VARIANT v)
1557 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1558 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1559 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, &v, 0);
1562 static HRESULT WINAPI HTMLStyle_get_borderRightWidth(IHTMLStyle *iface, VARIANT *p)
1564 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1565 TRACE("(%p)->(%p)\n", This, p);
1566 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
1569 static HRESULT WINAPI HTMLStyle_put_borderBottomWidth(IHTMLStyle *iface, VARIANT v)
1571 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1573 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1574 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, &v, 0);
1577 static HRESULT WINAPI HTMLStyle_get_borderBottomWidth(IHTMLStyle *iface, VARIANT *p)
1579 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1580 TRACE("(%p)->(%p)\n", This, p);
1581 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
1584 static HRESULT WINAPI HTMLStyle_put_borderLeftWidth(IHTMLStyle *iface, VARIANT v)
1586 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1587 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1588 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, &v, 0);
1591 static HRESULT WINAPI HTMLStyle_get_borderLeftWidth(IHTMLStyle *iface, VARIANT *p)
1593 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1594 TRACE("(%p)->(%p)\n", This, p);
1595 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
1598 static HRESULT WINAPI HTMLStyle_put_borderStyle(IHTMLStyle *iface, BSTR v)
1600 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1601 static const WCHAR styleWindowInset[] = {'w','i','n','d','o','w','-','i','n','s','e','t',0};
1602 HRESULT hres = S_OK;
1607 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1609 while(v[i] && hres == S_OK)
1611 if(v[i] == (WCHAR)' ')
1613 pstyle = SysAllocStringLen(&v[last], (i-last));
1614 if( !(is_valid_border_style(pstyle) || strcmpiW(styleWindowInset, pstyle) == 0))
1616 TRACE("1. Invalid style (%s)\n", debugstr_w(pstyle));
1617 hres = E_INVALIDARG;
1619 SysFreeString(pstyle);
1627 pstyle = SysAllocStringLen(&v[last], i-last);
1628 if( !(is_valid_border_style(pstyle) || strcmpiW(styleWindowInset, pstyle) == 0))
1630 TRACE("2. Invalid style (%s)\n", debugstr_w(pstyle));
1631 hres = E_INVALIDARG;
1633 SysFreeString(pstyle);
1637 hres = set_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, v, 0);
1642 static HRESULT WINAPI HTMLStyle_get_borderStyle(IHTMLStyle *iface, BSTR *p)
1644 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1645 TRACE("(%p)->(%p)\n", This, p);
1646 return get_style_attr(This, STYLEID_BORDER_STYLE, p);
1649 static HRESULT WINAPI HTMLStyle_put_borderTopStyle(IHTMLStyle *iface, BSTR v)
1651 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1652 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1654 if(!is_valid_border_style(v))
1655 return E_INVALIDARG;
1657 return set_style_attr(This, STYLEID_BORDER_TOP_STYLE, v, 0);
1660 static HRESULT WINAPI HTMLStyle_get_borderTopStyle(IHTMLStyle *iface, BSTR *p)
1662 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1663 TRACE("(%p)->(%p)\n", This, p);
1664 return get_style_attr(This, STYLEID_BORDER_TOP_STYLE, p);
1667 static HRESULT WINAPI HTMLStyle_put_borderRightStyle(IHTMLStyle *iface, BSTR v)
1669 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1670 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1672 if(!is_valid_border_style(v))
1673 return E_INVALIDARG;
1675 return set_style_attr(This, STYLEID_BORDER_RIGHT_STYLE, v, 0);
1678 static HRESULT WINAPI HTMLStyle_get_borderRightStyle(IHTMLStyle *iface, BSTR *p)
1680 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1681 TRACE("(%p)->(%p)\n", This, p);
1682 return get_style_attr(This, STYLEID_BORDER_RIGHT_STYLE, p);
1685 static HRESULT WINAPI HTMLStyle_put_borderBottomStyle(IHTMLStyle *iface, BSTR v)
1687 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1688 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1690 if(!is_valid_border_style(v))
1691 return E_INVALIDARG;
1693 return set_style_attr(This, STYLEID_BORDER_BOTTOM_STYLE, v, 0);
1696 static HRESULT WINAPI HTMLStyle_get_borderBottomStyle(IHTMLStyle *iface, BSTR *p)
1698 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1699 TRACE("(%p)->(%p)\n", This, p);
1700 return get_style_attr(This, STYLEID_BORDER_BOTTOM_STYLE, p);
1703 static HRESULT WINAPI HTMLStyle_put_borderLeftStyle(IHTMLStyle *iface, BSTR v)
1705 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1706 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1708 if(!is_valid_border_style(v))
1709 return E_INVALIDARG;
1711 return set_style_attr(This, STYLEID_BORDER_LEFT_STYLE, v, 0);
1714 static HRESULT WINAPI HTMLStyle_get_borderLeftStyle(IHTMLStyle *iface, BSTR *p)
1716 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1717 TRACE("(%p)->(%p)\n", This, p);
1718 return get_style_attr(This, STYLEID_BORDER_LEFT_STYLE, p);
1721 static HRESULT WINAPI HTMLStyle_put_width(IHTMLStyle *iface, VARIANT v)
1723 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1725 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1729 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
1730 return set_style_attr(This, STYLEID_WIDTH, V_BSTR(&v), 0);
1732 FIXME("unsupported vt %d\n", V_VT(&v));
1738 static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p)
1740 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1742 TRACE("(%p)->(%p)\n", This, p);
1745 return get_style_attr(This, STYLEID_WIDTH, &V_BSTR(p));
1748 static HRESULT WINAPI HTMLStyle_put_height(IHTMLStyle *iface, VARIANT v)
1750 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1752 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1756 return set_style_attr(This, STYLEID_HEIGHT, V_BSTR(&v), 0);
1758 FIXME("unimplemented vt %d\n", V_VT(&v));
1765 static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p)
1767 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1771 TRACE("(%p)->(%p)\n", This, p);
1773 hres = get_style_attr(This, STYLEID_HEIGHT, &ret);
1782 static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v)
1784 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1785 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1789 static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p)
1791 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1792 FIXME("(%p)->(%p)\n", This, p);
1796 static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v)
1798 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1799 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1803 static HRESULT WINAPI HTMLStyle_get_clear(IHTMLStyle *iface, BSTR *p)
1805 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1806 FIXME("(%p)->(%p)\n", This, p);
1810 static HRESULT WINAPI HTMLStyle_put_display(IHTMLStyle *iface, BSTR v)
1812 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1814 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1816 return set_style_attr(This, STYLEID_DISPLAY, v, 0);
1819 static HRESULT WINAPI HTMLStyle_get_display(IHTMLStyle *iface, BSTR *p)
1821 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1823 TRACE("(%p)->(%p)\n", This, p);
1825 return get_style_attr(This, STYLEID_DISPLAY, p);
1828 static HRESULT WINAPI HTMLStyle_put_visibility(IHTMLStyle *iface, BSTR v)
1830 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1832 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1834 return set_style_attr(This, STYLEID_VISIBILITY, v, 0);
1837 static HRESULT WINAPI HTMLStyle_get_visibility(IHTMLStyle *iface, BSTR *p)
1839 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1841 TRACE("(%p)->(%p)\n", This, p);
1843 return get_style_attr(This, STYLEID_VISIBILITY, p);
1846 static HRESULT WINAPI HTMLStyle_put_listStyleType(IHTMLStyle *iface, BSTR v)
1848 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1849 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1853 static HRESULT WINAPI HTMLStyle_get_listStyleType(IHTMLStyle *iface, BSTR *p)
1855 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1856 FIXME("(%p)->(%p)\n", This, p);
1860 static HRESULT WINAPI HTMLStyle_put_listStylePosition(IHTMLStyle *iface, BSTR v)
1862 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1863 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1867 static HRESULT WINAPI HTMLStyle_get_listStylePosition(IHTMLStyle *iface, BSTR *p)
1869 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1870 FIXME("(%p)->(%p)\n", This, p);
1874 static HRESULT WINAPI HTMLStyle_put_listStyleImage(IHTMLStyle *iface, BSTR v)
1876 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1877 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1881 static HRESULT WINAPI HTMLStyle_get_listStyleImage(IHTMLStyle *iface, BSTR *p)
1883 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1884 FIXME("(%p)->(%p)\n", This, p);
1888 static HRESULT WINAPI HTMLStyle_put_listStyle(IHTMLStyle *iface, BSTR v)
1890 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1891 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1895 static HRESULT WINAPI HTMLStyle_get_listStyle(IHTMLStyle *iface, BSTR *p)
1897 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1898 FIXME("(%p)->(%p)\n", This, p);
1902 static HRESULT WINAPI HTMLStyle_put_whiteSpace(IHTMLStyle *iface, BSTR v)
1904 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1905 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1909 static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p)
1911 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1912 FIXME("(%p)->(%p)\n", This, p);
1916 static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v)
1918 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1920 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1922 return set_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, &v, 0);
1925 static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p)
1927 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1931 TRACE("(%p)->(%p)\n", This, p);
1933 hres = get_style_attr(This, STYLEID_TOP, &ret);
1942 static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v)
1944 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1946 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1948 return set_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, &v, 0);
1951 static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p)
1953 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1957 TRACE("(%p)->(%p)\n", This, p);
1959 hres = get_style_attr(This, STYLEID_LEFT, &ret);
1968 static HRESULT WINAPI HTMLStyle_get_position(IHTMLStyle *iface, BSTR *p)
1970 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1971 TRACE("(%p)->(%p)\n", This, p);
1972 return IHTMLStyle2_get_position(HTMLSTYLE2(This), p);
1975 static HRESULT WINAPI HTMLStyle_put_zIndex(IHTMLStyle *iface, VARIANT v)
1977 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1979 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1983 return set_style_attr(This, STYLEID_Z_INDEX, V_BSTR(&v), 0);
1986 static const WCHAR format[] = {'%','d',0};
1988 wsprintfW(value, format, V_I4(&v));
1989 return set_style_attr(This, STYLEID_Z_INDEX, value, 0);
1992 FIXME("unimplemented vt %d\n", V_VT(&v));
1999 static HRESULT WINAPI HTMLStyle_get_zIndex(IHTMLStyle *iface, VARIANT *p)
2001 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2003 TRACE("(%p)->(%p)\n", This, p);
2005 return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
2008 static HRESULT WINAPI HTMLStyle_put_overflow(IHTMLStyle *iface, BSTR v)
2010 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2011 static const WCHAR szVisible[] = {'v','i','s','i','b','l','e',0};
2012 static const WCHAR szScroll[] = {'s','c','r','o','l','l',0};
2013 static const WCHAR szHidden[] = {'h','i','d','d','e','n',0};
2014 static const WCHAR szAuto[] = {'a','u','t','o',0};
2016 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2018 /* overflow can only be one of the follow values. */
2019 if(!v || strcmpiW(szVisible, v) == 0 || strcmpiW(szScroll, v) == 0 ||
2020 strcmpiW(szHidden, v) == 0 || strcmpiW(szAuto, v) == 0)
2022 return set_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, v, 0);
2025 return E_INVALIDARG;
2029 static HRESULT WINAPI HTMLStyle_get_overflow(IHTMLStyle *iface, BSTR *p)
2031 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2033 TRACE("(%p)->(%p)\n", This, p);
2036 return E_INVALIDARG;
2038 return get_style_attr(This, STYLEID_OVERFLOW, p);
2041 static HRESULT WINAPI HTMLStyle_put_pageBreakBefore(IHTMLStyle *iface, BSTR v)
2043 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2044 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2048 static HRESULT WINAPI HTMLStyle_get_pageBreakBefore(IHTMLStyle *iface, BSTR *p)
2050 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2051 FIXME("(%p)->(%p)\n", This, p);
2055 static HRESULT WINAPI HTMLStyle_put_pageBreakAfter(IHTMLStyle *iface, BSTR v)
2057 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2058 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2062 static HRESULT WINAPI HTMLStyle_get_pageBreakAfter(IHTMLStyle *iface, BSTR *p)
2064 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2065 FIXME("(%p)->(%p)\n", This, p);
2069 static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
2071 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2075 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2077 nsAString_Init(&text_str, v);
2078 nsres = nsIDOMCSSStyleDeclaration_SetCssText(This->nsstyle, &text_str);
2079 nsAString_Finish(&text_str);
2080 if(NS_FAILED(nsres)) {
2081 FIXME("SetCssStyle failed: %08x\n", nsres);
2088 static HRESULT WINAPI HTMLStyle_get_cssText(IHTMLStyle *iface, BSTR *p)
2090 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2094 TRACE("(%p)->(%p)\n", This, p);
2096 /* FIXME: Gecko style formatting is different than IE (uppercase). */
2097 nsAString_Init(&text_str, NULL);
2098 nsres = nsIDOMCSSStyleDeclaration_GetCssText(This->nsstyle, &text_str);
2099 if(NS_SUCCEEDED(nsres)) {
2100 const PRUnichar *text;
2102 nsAString_GetData(&text_str, &text);
2103 *p = *text ? SysAllocString(text) : NULL;
2105 FIXME("GetCssStyle failed: %08x\n", nsres);
2109 nsAString_Finish(&text_str);
2113 static HRESULT WINAPI HTMLStyle_put_pixelTop(IHTMLStyle *iface, LONG v)
2115 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2116 FIXME("(%p)->()\n", This);
2120 static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, LONG *p)
2122 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2123 FIXME("(%p)->()\n", This);
2127 static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, LONG v)
2129 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2130 FIXME("(%p)->()\n", This);
2134 static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p)
2136 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2137 FIXME("(%p)->()\n", This);
2141 static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v)
2143 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2144 FIXME("(%p)->()\n", This);
2148 static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p)
2150 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2151 FIXME("(%p)->()\n", This);
2155 static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, LONG v)
2157 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2158 FIXME("(%p)->()\n", This);
2162 static HRESULT WINAPI HTMLStyle_get_pixelHeight(IHTMLStyle *iface, LONG *p)
2164 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2165 FIXME("(%p)->()\n", This);
2169 static HRESULT WINAPI HTMLStyle_put_posTop(IHTMLStyle *iface, float v)
2171 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2173 TRACE("(%p)->(%f)\n", This, v);
2175 return set_style_pos(This, STYLEID_TOP, v);
2178 static HRESULT WINAPI HTMLStyle_get_posTop(IHTMLStyle *iface, float *p)
2180 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2182 TRACE("(%p)->(%p)\n", This, p);
2187 return get_nsstyle_pos(This, STYLEID_TOP, p);
2190 static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float v)
2192 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2194 TRACE("(%p)->(%f)\n", This, v);
2196 return set_style_pos(This, STYLEID_LEFT, v);
2199 static HRESULT WINAPI HTMLStyle_get_posLeft(IHTMLStyle *iface, float *p)
2201 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2203 TRACE("(%p)->(%p)\n", This, p);
2208 return get_nsstyle_pos(This, STYLEID_LEFT, p);
2211 static HRESULT WINAPI HTMLStyle_put_posWidth(IHTMLStyle *iface, float v)
2213 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2215 TRACE("(%p)->(%f)\n", This, v);
2217 return set_style_pos(This, STYLEID_WIDTH, v);
2220 static HRESULT WINAPI HTMLStyle_get_posWidth(IHTMLStyle *iface, float *p)
2222 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2224 TRACE("(%p)->(%p)\n", This, p);
2229 if(get_nsstyle_pos(This, STYLEID_WIDTH, p) != S_OK)
2235 static HRESULT WINAPI HTMLStyle_put_posHeight(IHTMLStyle *iface, float v)
2237 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2239 TRACE("(%p)->(%f)\n", This, v);
2241 return set_style_pos(This, STYLEID_HEIGHT, v);
2244 static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p)
2246 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2248 TRACE("(%p)->(%p)\n", This, p);
2253 if(get_nsstyle_pos(This, STYLEID_HEIGHT, p) != S_OK)
2259 static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v)
2261 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2263 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2265 return set_style_attr(This, STYLEID_CURSOR, v, 0);
2268 static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p)
2270 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2272 TRACE("(%p)->(%p)\n", This, p);
2274 return get_style_attr(This, STYLEID_CURSOR, p);
2277 static HRESULT WINAPI HTMLStyle_put_clip(IHTMLStyle *iface, BSTR v)
2279 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2280 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2284 static HRESULT WINAPI HTMLStyle_get_clip(IHTMLStyle *iface, BSTR *p)
2286 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2287 FIXME("(%p)->(%p)\n", This, p);
2291 static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v)
2293 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2295 WARN("(%p)->(%s)\n", This, debugstr_w(v));
2297 /* FIXME: Handle MS-style filters */
2298 return set_style_attr(This, STYLEID_FILTER, v, 0);
2301 static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p)
2303 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2305 WARN("(%p)->(%p)\n", This, p);
2307 /* FIXME: Handle MS-style filters */
2308 return get_style_attr(This, STYLEID_FILTER, p);
2311 static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2312 VARIANT AttributeValue, LONG lFlags)
2314 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2318 TRACE("(%p)->(%s v%d %08x)\n", This, debugstr_w(strAttributeName),
2319 V_VT(&AttributeValue), lFlags);
2321 if(!strAttributeName)
2322 return E_INVALIDARG;
2325 FIXME("Parameter lFlags ignored\n");
2327 hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
2328 LOCALE_USER_DEFAULT, &dispid);
2332 DISPID dispidNamed = DISPID_PROPERTYPUT;
2336 params.rgvarg = &AttributeValue;
2337 params.cNamedArgs = 1;
2338 params.rgdispidNamedArgs = &dispidNamed;
2340 hres = HTMLStyle_Invoke(iface, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
2341 DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, NULL);
2345 FIXME("Custom attributes not supported.\n");
2348 TRACE("ret: %08x\n", hres);
2353 static HRESULT WINAPI HTMLStyle_getAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2354 LONG lFlags, VARIANT *AttributeValue)
2356 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2360 TRACE("(%p)->(%s v%p %08x)\n", This, debugstr_w(strAttributeName),
2361 AttributeValue, lFlags);
2363 if(!AttributeValue || !strAttributeName)
2364 return E_INVALIDARG;
2367 FIXME("Parameter lFlags ignored\n");
2369 hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
2370 LOCALE_USER_DEFAULT, &dispid);
2373 DISPPARAMS params = {NULL, NULL, 0, 0 };
2375 hres = HTMLStyle_Invoke(iface, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
2376 DISPATCH_PROPERTYGET, ¶ms, AttributeValue, NULL, NULL);
2380 FIXME("Custom attributes not supported.\n");
2386 static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2387 LONG lFlags, VARIANT_BOOL *pfSuccess)
2389 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2390 FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
2395 static HRESULT WINAPI HTMLStyle_toString(IHTMLStyle *iface, BSTR *String)
2397 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2398 FIXME("(%p)->(%p)\n", This, String);
2402 static HRESULT HTMLStyle_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid)
2404 int c, i, min=0, max = sizeof(style_tbl)/sizeof(*style_tbl)-1;
2409 c = strcmpW(style_tbl[i].name, name);
2411 *dispid = style_tbl[i].dispid;
2421 return DISP_E_UNKNOWNNAME;
2424 static const IHTMLStyleVtbl HTMLStyleVtbl = {
2425 HTMLStyle_QueryInterface,
2428 HTMLStyle_GetTypeInfoCount,
2429 HTMLStyle_GetTypeInfo,
2430 HTMLStyle_GetIDsOfNames,
2432 HTMLStyle_put_fontFamily,
2433 HTMLStyle_get_fontFamily,
2434 HTMLStyle_put_fontStyle,
2435 HTMLStyle_get_fontStyle,
2436 HTMLStyle_put_fontVariant,
2437 HTMLStyle_get_fontVariant,
2438 HTMLStyle_put_fontWeight,
2439 HTMLStyle_get_fontWeight,
2440 HTMLStyle_put_fontSize,
2441 HTMLStyle_get_fontSize,
2444 HTMLStyle_put_color,
2445 HTMLStyle_get_color,
2446 HTMLStyle_put_background,
2447 HTMLStyle_get_background,
2448 HTMLStyle_put_backgroundColor,
2449 HTMLStyle_get_backgroundColor,
2450 HTMLStyle_put_backgroundImage,
2451 HTMLStyle_get_backgroundImage,
2452 HTMLStyle_put_backgroundRepeat,
2453 HTMLStyle_get_backgroundRepeat,
2454 HTMLStyle_put_backgroundAttachment,
2455 HTMLStyle_get_backgroundAttachment,
2456 HTMLStyle_put_backgroundPosition,
2457 HTMLStyle_get_backgroundPosition,
2458 HTMLStyle_put_backgroundPositionX,
2459 HTMLStyle_get_backgroundPositionX,
2460 HTMLStyle_put_backgroundPositionY,
2461 HTMLStyle_get_backgroundPositionY,
2462 HTMLStyle_put_wordSpacing,
2463 HTMLStyle_get_wordSpacing,
2464 HTMLStyle_put_letterSpacing,
2465 HTMLStyle_get_letterSpacing,
2466 HTMLStyle_put_textDecoration,
2467 HTMLStyle_get_textDecoration,
2468 HTMLStyle_put_textDecorationNone,
2469 HTMLStyle_get_textDecorationNone,
2470 HTMLStyle_put_textDecorationUnderline,
2471 HTMLStyle_get_textDecorationUnderline,
2472 HTMLStyle_put_textDecorationOverline,
2473 HTMLStyle_get_textDecorationOverline,
2474 HTMLStyle_put_textDecorationLineThrough,
2475 HTMLStyle_get_textDecorationLineThrough,
2476 HTMLStyle_put_textDecorationBlink,
2477 HTMLStyle_get_textDecorationBlink,
2478 HTMLStyle_put_verticalAlign,
2479 HTMLStyle_get_verticalAlign,
2480 HTMLStyle_put_textTransform,
2481 HTMLStyle_get_textTransform,
2482 HTMLStyle_put_textAlign,
2483 HTMLStyle_get_textAlign,
2484 HTMLStyle_put_textIndent,
2485 HTMLStyle_get_textIndent,
2486 HTMLStyle_put_lineHeight,
2487 HTMLStyle_get_lineHeight,
2488 HTMLStyle_put_marginTop,
2489 HTMLStyle_get_marginTop,
2490 HTMLStyle_put_marginRight,
2491 HTMLStyle_get_marginRight,
2492 HTMLStyle_put_marginBottom,
2493 HTMLStyle_get_marginBottom,
2494 HTMLStyle_put_marginLeft,
2495 HTMLStyle_get_marginLeft,
2496 HTMLStyle_put_margin,
2497 HTMLStyle_get_margin,
2498 HTMLStyle_put_paddingTop,
2499 HTMLStyle_get_paddingTop,
2500 HTMLStyle_put_paddingRight,
2501 HTMLStyle_get_paddingRight,
2502 HTMLStyle_put_paddingBottom,
2503 HTMLStyle_get_paddingBottom,
2504 HTMLStyle_put_paddingLeft,
2505 HTMLStyle_get_paddingLeft,
2506 HTMLStyle_put_padding,
2507 HTMLStyle_get_padding,
2508 HTMLStyle_put_border,
2509 HTMLStyle_get_border,
2510 HTMLStyle_put_borderTop,
2511 HTMLStyle_get_borderTop,
2512 HTMLStyle_put_borderRight,
2513 HTMLStyle_get_borderRight,
2514 HTMLStyle_put_borderBottom,
2515 HTMLStyle_get_borderBottom,
2516 HTMLStyle_put_borderLeft,
2517 HTMLStyle_get_borderLeft,
2518 HTMLStyle_put_borderColor,
2519 HTMLStyle_get_borderColor,
2520 HTMLStyle_put_borderTopColor,
2521 HTMLStyle_get_borderTopColor,
2522 HTMLStyle_put_borderRightColor,
2523 HTMLStyle_get_borderRightColor,
2524 HTMLStyle_put_borderBottomColor,
2525 HTMLStyle_get_borderBottomColor,
2526 HTMLStyle_put_borderLeftColor,
2527 HTMLStyle_get_borderLeftColor,
2528 HTMLStyle_put_borderWidth,
2529 HTMLStyle_get_borderWidth,
2530 HTMLStyle_put_borderTopWidth,
2531 HTMLStyle_get_borderTopWidth,
2532 HTMLStyle_put_borderRightWidth,
2533 HTMLStyle_get_borderRightWidth,
2534 HTMLStyle_put_borderBottomWidth,
2535 HTMLStyle_get_borderBottomWidth,
2536 HTMLStyle_put_borderLeftWidth,
2537 HTMLStyle_get_borderLeftWidth,
2538 HTMLStyle_put_borderStyle,
2539 HTMLStyle_get_borderStyle,
2540 HTMLStyle_put_borderTopStyle,
2541 HTMLStyle_get_borderTopStyle,
2542 HTMLStyle_put_borderRightStyle,
2543 HTMLStyle_get_borderRightStyle,
2544 HTMLStyle_put_borderBottomStyle,
2545 HTMLStyle_get_borderBottomStyle,
2546 HTMLStyle_put_borderLeftStyle,
2547 HTMLStyle_get_borderLeftStyle,
2548 HTMLStyle_put_width,
2549 HTMLStyle_get_width,
2550 HTMLStyle_put_height,
2551 HTMLStyle_get_height,
2552 HTMLStyle_put_styleFloat,
2553 HTMLStyle_get_styleFloat,
2554 HTMLStyle_put_clear,
2555 HTMLStyle_get_clear,
2556 HTMLStyle_put_display,
2557 HTMLStyle_get_display,
2558 HTMLStyle_put_visibility,
2559 HTMLStyle_get_visibility,
2560 HTMLStyle_put_listStyleType,
2561 HTMLStyle_get_listStyleType,
2562 HTMLStyle_put_listStylePosition,
2563 HTMLStyle_get_listStylePosition,
2564 HTMLStyle_put_listStyleImage,
2565 HTMLStyle_get_listStyleImage,
2566 HTMLStyle_put_listStyle,
2567 HTMLStyle_get_listStyle,
2568 HTMLStyle_put_whiteSpace,
2569 HTMLStyle_get_whiteSpace,
2574 HTMLStyle_get_position,
2575 HTMLStyle_put_zIndex,
2576 HTMLStyle_get_zIndex,
2577 HTMLStyle_put_overflow,
2578 HTMLStyle_get_overflow,
2579 HTMLStyle_put_pageBreakBefore,
2580 HTMLStyle_get_pageBreakBefore,
2581 HTMLStyle_put_pageBreakAfter,
2582 HTMLStyle_get_pageBreakAfter,
2583 HTMLStyle_put_cssText,
2584 HTMLStyle_get_cssText,
2585 HTMLStyle_put_pixelTop,
2586 HTMLStyle_get_pixelTop,
2587 HTMLStyle_put_pixelLeft,
2588 HTMLStyle_get_pixelLeft,
2589 HTMLStyle_put_pixelWidth,
2590 HTMLStyle_get_pixelWidth,
2591 HTMLStyle_put_pixelHeight,
2592 HTMLStyle_get_pixelHeight,
2593 HTMLStyle_put_posTop,
2594 HTMLStyle_get_posTop,
2595 HTMLStyle_put_posLeft,
2596 HTMLStyle_get_posLeft,
2597 HTMLStyle_put_posWidth,
2598 HTMLStyle_get_posWidth,
2599 HTMLStyle_put_posHeight,
2600 HTMLStyle_get_posHeight,
2601 HTMLStyle_put_cursor,
2602 HTMLStyle_get_cursor,
2605 HTMLStyle_put_filter,
2606 HTMLStyle_get_filter,
2607 HTMLStyle_setAttribute,
2608 HTMLStyle_getAttribute,
2609 HTMLStyle_removeAttribute,
2613 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl = {
2615 HTMLStyle_get_dispid,
2619 static const tid_t HTMLStyle_iface_tids[] = {
2626 static dispex_static_data_t HTMLStyle_dispex = {
2627 &HTMLStyle_dispex_vtbl,
2630 HTMLStyle_iface_tids
2633 IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle)
2635 HTMLStyle *ret = heap_alloc_zero(sizeof(HTMLStyle));
2637 ret->lpHTMLStyleVtbl = &HTMLStyleVtbl;
2639 ret->nsstyle = nsstyle;
2640 HTMLStyle2_Init(ret);
2641 HTMLStyle3_Init(ret);
2643 nsIDOMCSSStyleDeclaration_AddRef(nsstyle);
2645 init_dispex(&ret->dispex, (IUnknown*)HTMLSTYLE(ret), &HTMLStyle_dispex);
2647 return HTMLSTYLE(ret);