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 attrBorderBottomColor[] =
53 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','c','o','l','o','r',0};
54 static const WCHAR attrBorderBottomStyle[] =
55 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e',0};
56 static const WCHAR attrBorderBottomWidth[] =
57 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','w','i','d','t','h',0};
58 static const WCHAR attrBorderColor[] =
59 {'b','o','r','d','e','r','-','c','o','l','o','r',0};
60 static const WCHAR attrBorderLeft[] =
61 {'b','o','r','d','e','r','-','l','e','f','t',0};
62 static const WCHAR attrBorderLeftColor[] =
63 {'b','o','r','d','e','r','-','l','e','f','t','-','c','o','l','o','r',0};
64 static const WCHAR attrBorderLeftStyle[] =
65 {'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0};
66 static const WCHAR attrBorderLeftWidth[] =
67 {'b','o','r','d','e','r','-','l','e','f','t','-','w','i','d','t','h',0};
68 static const WCHAR attrBorderRightColor[] =
69 {'b','o','r','d','e','r','-','r','i','g','h','t','-','c','o','l','o','r',0};
70 static const WCHAR attrBorderRightStyle[] =
71 {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
72 static const WCHAR attrBorderRightWidth[] =
73 {'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0};
74 static const WCHAR attrBorderTopColor[] =
75 {'b','o','r','d','e','r','-','t','o','p','-','c','o','l','o','r',0};
76 static const WCHAR attrBorderStyle[] =
77 {'b','o','r','d','e','r','-','s','t','y','l','e',0};
78 static const WCHAR attrBorderTopStyle[] =
79 {'b','o','r','d','e','r','-','t','o','p','-','s','t','y','l','e',0};
80 static const WCHAR attrBorderTopWidth[] =
81 {'b','o','r','d','e','r','-','t','o','p','-','w','i','d','t','h',0};
82 static const WCHAR attrBorderWidth[] =
83 {'b','o','r','d','e','r','-','w','i','d','t','h',0};
84 static const WCHAR attrColor[] =
85 {'c','o','l','o','r',0};
86 static const WCHAR attrCursor[] =
87 {'c','u','r','s','o','r',0};
88 static const WCHAR attrDisplay[] =
89 {'d','i','s','p','l','a','y',0};
90 static const WCHAR attrFilter[] =
91 {'f','i','l','e','t','e','r',0};
92 static const WCHAR attrFontFamily[] =
93 {'f','o','n','t','-','f','a','m','i','l','y',0};
94 static const WCHAR attrFontSize[] =
95 {'f','o','n','t','-','s','i','z','e',0};
96 static const WCHAR attrFontStyle[] =
97 {'f','o','n','t','-','s','t','y','l','e',0};
98 static const WCHAR attrFontVariant[] =
99 {'f','o','n','t','-','v','a','r','i','a','n','t',0};
100 static const WCHAR attrFontWeight[] =
101 {'f','o','n','t','-','w','e','i','g','h','t',0};
102 static const WCHAR attrHeight[] =
103 {'h','e','i','g','h','t',0};
104 static const WCHAR attrLeft[] =
106 static const WCHAR attrLetterSpacing[] =
107 {'l','e','t','t','e','r','-','s','p','a','c','i','n','g',0};
108 static const WCHAR attrMargin[] =
109 {'m','a','r','g','i','n',0};
110 static const WCHAR attrMarginLeft[] =
111 {'m','a','r','g','i','n','-','l','e','f','t',0};
112 static const WCHAR attrMarginRight[] =
113 {'m','a','r','g','i','n','-','r','i','g','h','t',0};
114 static const WCHAR attrMarginTop[] =
115 {'m','a','r','g','i','n','-','t','o','p',0};
116 static const WCHAR attrMinHeight[] =
117 {'m','i','n','-','h','e','i','g','h','t',0};
118 static const WCHAR attrOverflow[] =
119 {'o','v','e','r','f','l','o','w',0};
120 static const WCHAR attrPaddingBottom[] =
121 {'p','a','d','d','i','n','g','-','b','o','t','t','o','m',0};
122 static const WCHAR attrPaddingLeft[] =
123 {'p','a','d','d','i','n','g','-','l','e','f','t',0};
124 static const WCHAR attrPaddingRight[] =
125 {'p','a','d','d','i','n','g','-','r','i','g','h','t',0};
126 static const WCHAR attrPaddingTop[] =
127 {'p','a','d','d','i','n','g','-','t','o','p',0};
128 static const WCHAR attrPosition[] =
129 {'p','o','s','i','t','i','o','n',0};
130 static const WCHAR attrTextAlign[] =
131 {'t','e','x','t','-','a','l','i','g','n',0};
132 static const WCHAR attrTextDecoration[] =
133 {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
134 static const WCHAR attrTop[] =
136 static const WCHAR attrVerticalAlign[] =
137 {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
138 static const WCHAR attrVisibility[] =
139 {'v','i','s','i','b','i','l','i','t','y',0};
140 static const WCHAR attrWidth[] =
141 {'w','i','d','t','h',0};
142 static const WCHAR attrWordSpacing[] =
143 {'w','o','r','d','-','s','p','a','c','i','n','g',0};
144 static const WCHAR attrWordWrap[] =
145 {'w','o','r','d','-','w','r','a','p',0};
146 static const WCHAR attrZIndex[] =
147 {'z','-','i','n','d','e','x',0};
153 {attrBackground, DISPID_IHTMLSTYLE_BACKGROUND},
154 {attrBackgroundColor, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR},
155 {attrBackgroundImage, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE},
156 {attrBackgroundPositionX, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONX},
157 {attrBackgroundPositionY, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONY},
158 {attrBackgroundRepeat, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT},
159 {attrBorder, DISPID_IHTMLSTYLE_BORDER},
160 {attrBorderBottomColor, DISPID_IHTMLSTYLE_BORDERBOTTOMCOLOR},
161 {attrBorderBottomStyle, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE},
162 {attrBorderBottomWidth, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH},
163 {attrBorderColor, DISPID_IHTMLSTYLE_BORDERCOLOR},
164 {attrBorderLeft, DISPID_IHTMLSTYLE_BORDERLEFT},
165 {attrBorderLeftColor, DISPID_IHTMLSTYLE_BORDERLEFTCOLOR},
166 {attrBorderLeftStyle, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE},
167 {attrBorderLeftWidth, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH},
168 {attrBorderRightColor, DISPID_IHTMLSTYLE_BORDERRIGHTCOLOR},
169 {attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE},
170 {attrBorderRightWidth, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH},
171 {attrBorderStyle, DISPID_IHTMLSTYLE_BORDERSTYLE},
172 {attrBorderTopColor, DISPID_IHTMLSTYLE_BORDERTOPCOLOR},
173 {attrBorderTopStyle, DISPID_IHTMLSTYLE_BORDERTOPSTYLE},
174 {attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
175 {attrBorderWidth, DISPID_IHTMLSTYLE_BORDERWIDTH},
176 {attrColor, DISPID_IHTMLSTYLE_COLOR},
177 {attrCursor, DISPID_IHTMLSTYLE_CURSOR},
178 {attrDisplay, DISPID_IHTMLSTYLE_DISPLAY},
179 {attrFilter, DISPID_IHTMLSTYLE_FILTER},
180 {attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY},
181 {attrFontSize, DISPID_IHTMLSTYLE_FONTSIZE},
182 {attrFontStyle, DISPID_IHTMLSTYLE_FONTSTYLE},
183 {attrFontVariant, DISPID_IHTMLSTYLE_FONTVARIANT},
184 {attrFontWeight, DISPID_IHTMLSTYLE_FONTWEIGHT},
185 {attrHeight, DISPID_IHTMLSTYLE_HEIGHT},
186 {attrLeft, DISPID_IHTMLSTYLE_LEFT},
187 {attrLetterSpacing, DISPID_IHTMLSTYLE_LETTERSPACING},
188 {attrMargin, DISPID_IHTMLSTYLE_MARGIN},
189 {attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT},
190 {attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT},
191 {attrMarginTop, DISPID_IHTMLSTYLE_MARGINTOP},
192 {attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT},
193 {attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW},
194 {attrPaddingBottom, DISPID_IHTMLSTYLE_PADDINGBOTTOM},
195 {attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT},
196 {attrPaddingRight, DISPID_IHTMLSTYLE_PADDINGRIGHT},
197 {attrPaddingTop, DISPID_IHTMLSTYLE_PADDINGTOP},
198 {attrPosition, DISPID_IHTMLSTYLE2_POSITION},
199 {attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN},
200 {attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION},
201 {attrTop, DISPID_IHTMLSTYLE_TOP},
202 {attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN},
203 {attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY},
204 {attrWidth, DISPID_IHTMLSTYLE_WIDTH},
205 {attrWordSpacing, DISPID_IHTMLSTYLE_WORDSPACING},
206 {attrWordWrap, DISPID_IHTMLSTYLE3_WORDWRAP},
207 {attrZIndex, DISPID_IHTMLSTYLE_ZINDEX}
210 static const WCHAR valLineThrough[] =
211 {'l','i','n','e','-','t','h','r','o','u','g','h',0};
212 static const WCHAR valUnderline[] =
213 {'u','n','d','e','r','l','i','n','e',0};
214 static const WCHAR szNormal[] =
215 {'n','o','r','m','a','l',0};
216 static const WCHAR styleNone[] =
218 static const WCHAR valOverline[] =
219 {'o','v','e','r','l','i','n','e',0};
220 static const WCHAR valBlink[] =
221 {'b','l','i','n','k',0};
223 static const WCHAR px_formatW[] = {'%','d','p','x',0};
224 static const WCHAR emptyW[] = {0};
226 static LPWSTR fix_px_value(LPCWSTR val)
231 while(*ptr && isspaceW(*ptr))
236 while(*ptr && isdigitW(*ptr))
239 if(!*ptr || isspaceW(*ptr)) {
241 int len = strlenW(val)+1;
243 ret = heap_alloc((len+2)*sizeof(WCHAR));
244 memcpy(ret, val, (ptr-val)*sizeof(WCHAR));
250 TRACE("fixed %s -> %s\n", debugstr_w(val), debugstr_w(ret));
255 while(*ptr && !isspaceW(*ptr))
262 static LPWSTR fix_url_value(LPCWSTR val)
266 static const WCHAR urlW[] = {'u','r','l','('};
268 if(strncmpW(val, urlW, sizeof(urlW)/sizeof(WCHAR)) || !strchrW(val, '\\'))
271 ret = heap_strdupW(val);
273 for(ptr = ret; *ptr; ptr++) {
281 HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCWSTR value, DWORD flags)
283 nsAString str_name, str_value, str_empty;
287 static const PRUnichar wszEmpty[] = {0};
289 if(flags & ATTR_FIX_PX)
290 val = fix_px_value(value);
291 if(flags & ATTR_FIX_URL)
292 val = fix_url_value(value);
294 nsAString_Init(&str_name, style_tbl[sid].name);
295 nsAString_Init(&str_value, val ? val : value);
296 nsAString_Init(&str_empty, wszEmpty);
299 nsres = nsIDOMCSSStyleDeclaration_SetProperty(nsstyle, &str_name, &str_value, &str_empty);
301 ERR("SetProperty failed: %08x\n", nsres);
303 nsAString_Finish(&str_name);
304 nsAString_Finish(&str_value);
305 nsAString_Finish(&str_empty);
310 HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags)
312 switch(V_VT(value)) {
314 return set_nsstyle_attr(nsstyle, sid, emptyW, flags);
317 return set_nsstyle_attr(nsstyle, sid, V_BSTR(value), flags);
319 case VT_BSTR|VT_BYREF:
320 return set_nsstyle_attr(nsstyle, sid, *V_BSTRREF(value), flags);
324 static const WCHAR format[] = {'%','d',0};
326 wsprintfW(str, format, V_I4(value));
327 return set_nsstyle_attr(nsstyle, sid, str, flags);
330 FIXME("not implemented vt %d\n", V_VT(value));
338 static inline HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWORD flags)
340 return set_nsstyle_attr(This->nsstyle, sid, value, flags);
343 static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value)
348 nsAString_Init(&str_name, style_tbl[sid].name);
350 nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle, &str_name, value);
351 if(NS_FAILED(nsres)) {
352 ERR("SetProperty failed: %08x\n", nsres);
356 nsAString_Finish(&str_name);
361 HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p)
364 const PRUnichar *value;
366 nsAString_Init(&str_value, NULL);
368 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
370 nsAString_GetData(&str_value, &value);
371 *p = *value ? SysAllocString(value) : NULL;
373 nsAString_Finish(&str_value);
375 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p));
379 HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags)
382 const PRUnichar *value;
385 nsAString_Init(&str_value, NULL);
387 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
389 nsAString_GetData(&str_value, &value);
391 if(flags & ATTR_STR_TO_INT) {
392 const PRUnichar *ptr = value;
401 while(isdigitW(*ptr))
402 i = i*10 + (*ptr++ - '0');
406 V_I4(p) = neg ? -i : i;
415 str = SysAllocString(value);
417 return E_OUTOFMEMORY;
424 nsAString_Finish(&str_value);
426 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_variant(p));
430 static inline HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p)
432 return get_nsstyle_attr(This->nsstyle, sid, p);
435 static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p)
438 const PRUnichar *value;
440 nsAString_Init(&str_value, NULL);
442 get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
444 nsAString_GetData(&str_value, &value);
445 *p = strcmpW(value, exval) ? VARIANT_FALSE : VARIANT_TRUE;
446 nsAString_Finish(&str_value);
448 TRACE("%s -> %x\n", debugstr_w(style_tbl[sid].name), *p);
452 static inline HRESULT set_style_pos(HTMLStyle *This, styleid_t sid, float value)
455 WCHAR szFormat[] = {'%','.','0','f','p','x',0};
457 value = floor(value);
459 sprintfW(szValue, szFormat, value);
461 return set_style_attr(This, sid, szValue, 0);
464 static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p)
468 WCHAR pxW[] = {'p','x',0};
470 TRACE("%p %d %p\n", This, sid, p);
474 nsAString_Init(&str_value, NULL);
476 hres = get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
480 const PRUnichar *value;
482 nsAString_GetData(&str_value, &value);
485 *p = strtolW(value, &ptr, 10);
487 if(*ptr && strcmpW(ptr, pxW))
489 nsAString_Finish(&str_value);
490 FIXME("only px values are currently supported\n");
496 TRACE("ret %f\n", *p);
498 nsAString_Finish(&str_value);
503 static BOOL is_valid_border_style(BSTR v)
505 static const WCHAR styleDotted[] = {'d','o','t','t','e','d',0};
506 static const WCHAR styleDashed[] = {'d','a','s','h','e','d',0};
507 static const WCHAR styleSolid[] = {'s','o','l','i','d',0};
508 static const WCHAR styleDouble[] = {'d','o','u','b','l','e',0};
509 static const WCHAR styleGroove[] = {'g','r','o','o','v','e',0};
510 static const WCHAR styleRidge[] = {'r','i','d','g','e',0};
511 static const WCHAR styleInset[] = {'i','n','s','e','t',0};
512 static const WCHAR styleOutset[] = {'o','u','t','s','e','t',0};
514 TRACE("%s\n", debugstr_w(v));
516 if(!v || strcmpiW(v, styleNone) == 0 || strcmpiW(v, styleDotted) == 0 ||
517 strcmpiW(v, styleDashed) == 0 || strcmpiW(v, styleSolid) == 0 ||
518 strcmpiW(v, styleDouble) == 0 || strcmpiW(v, styleGroove) == 0 ||
519 strcmpiW(v, styleRidge) == 0 || strcmpiW(v, styleInset) == 0 ||
520 strcmpiW(v, styleOutset) == 0 )
528 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
530 static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, void **ppv)
532 HTMLStyle *This = HTMLSTYLE_THIS(iface);
536 if(IsEqualGUID(&IID_IUnknown, riid)) {
537 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
538 *ppv = HTMLSTYLE(This);
539 }else if(IsEqualGUID(&IID_IHTMLStyle, riid)) {
540 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This, ppv);
541 *ppv = HTMLSTYLE(This);
542 }else if(IsEqualGUID(&IID_IHTMLStyle2, riid)) {
543 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This, ppv);
544 *ppv = HTMLSTYLE2(This);
545 }else if(IsEqualGUID(&IID_IHTMLStyle3, riid)) {
546 TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This, ppv);
547 *ppv = HTMLSTYLE3(This);
548 }else if(IsEqualGUID(&IID_IHTMLStyle4, riid)) {
549 TRACE("(%p)->(IID_IHTMLStyle4 %p)\n", This, ppv);
550 *ppv = HTMLSTYLE4(This);
551 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
552 return *ppv ? S_OK : E_NOINTERFACE;
556 IUnknown_AddRef((IUnknown*)*ppv);
560 WARN("unsupported %s\n", debugstr_guid(riid));
561 return E_NOINTERFACE;
564 static ULONG WINAPI HTMLStyle_AddRef(IHTMLStyle *iface)
566 HTMLStyle *This = HTMLSTYLE_THIS(iface);
567 LONG ref = InterlockedIncrement(&This->ref);
569 TRACE("(%p) ref=%d\n", This, ref);
574 static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
576 HTMLStyle *This = HTMLSTYLE_THIS(iface);
577 LONG ref = InterlockedDecrement(&This->ref);
579 TRACE("(%p) ref=%d\n", This, ref);
583 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
584 release_dispex(&This->dispex);
591 static HRESULT WINAPI HTMLStyle_GetTypeInfoCount(IHTMLStyle *iface, UINT *pctinfo)
593 HTMLStyle *This = HTMLSTYLE_THIS(iface);
594 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
597 static HRESULT WINAPI HTMLStyle_GetTypeInfo(IHTMLStyle *iface, UINT iTInfo,
598 LCID lcid, ITypeInfo **ppTInfo)
600 HTMLStyle *This = HTMLSTYLE_THIS(iface);
601 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
604 static HRESULT WINAPI HTMLStyle_GetIDsOfNames(IHTMLStyle *iface, REFIID riid,
605 LPOLESTR *rgszNames, UINT cNames,
606 LCID lcid, DISPID *rgDispId)
608 HTMLStyle *This = HTMLSTYLE_THIS(iface);
609 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
612 static HRESULT WINAPI HTMLStyle_Invoke(IHTMLStyle *iface, DISPID dispIdMember,
613 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
614 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
616 HTMLStyle *This = HTMLSTYLE_THIS(iface);
617 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
618 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
621 static HRESULT WINAPI HTMLStyle_put_fontFamily(IHTMLStyle *iface, BSTR v)
623 HTMLStyle *This = HTMLSTYLE_THIS(iface);
625 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
627 return set_style_attr(This, STYLEID_FONT_FAMILY, v, 0);
630 static HRESULT WINAPI HTMLStyle_get_fontFamily(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_FAMILY, p);
639 static HRESULT WINAPI HTMLStyle_put_fontStyle(IHTMLStyle *iface, BSTR v)
641 HTMLStyle *This = HTMLSTYLE_THIS(iface);
642 static const WCHAR szItalic[] = {'i','t','a','l','i','c',0};
643 static const WCHAR szOblique[] = {'o','b','l','i','q','u','e',0};
645 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
647 /* fontStyle can only be one of the follow values. */
648 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(szItalic, v) == 0 ||
649 strcmpiW(szOblique, v) == 0)
651 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, v, 0);
657 static HRESULT WINAPI HTMLStyle_get_fontStyle(IHTMLStyle *iface, BSTR *p)
659 HTMLStyle *This = HTMLSTYLE_THIS(iface);
661 TRACE("(%p)->(%p)\n", This, p);
663 return get_style_attr(This, STYLEID_FONT_STYLE, p);
666 static HRESULT WINAPI HTMLStyle_put_fontVariant(IHTMLStyle *iface, BSTR v)
668 HTMLStyle *This = HTMLSTYLE_THIS(iface);
669 static const WCHAR szCaps[] = {'s','m','a','l','l','-','c','a','p','s',0};
671 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
673 /* fontVariant can only be one of the follow values. */
674 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(szCaps, v) == 0)
676 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, v, 0);
682 static HRESULT WINAPI HTMLStyle_get_fontVariant(IHTMLStyle *iface, BSTR *p)
684 HTMLStyle *This = HTMLSTYLE_THIS(iface);
685 TRACE("(%p)->(%p)\n", This, p);
690 return get_style_attr(This, STYLEID_FONT_VARIANT, p);
693 static HRESULT WINAPI HTMLStyle_put_fontWeight(IHTMLStyle *iface, BSTR v)
695 HTMLStyle *This = HTMLSTYLE_THIS(iface);
696 static const WCHAR styleBold[] = {'b','o','l','d',0};
697 static const WCHAR styleBolder[] = {'b','o','l','d','e','r',0};
698 static const WCHAR styleLighter[] = {'l','i','g','h','t','e','r',0};
699 static const WCHAR style100[] = {'1','0','0',0};
700 static const WCHAR style200[] = {'2','0','0',0};
701 static const WCHAR style300[] = {'3','0','0',0};
702 static const WCHAR style400[] = {'4','0','0',0};
703 static const WCHAR style500[] = {'5','0','0',0};
704 static const WCHAR style600[] = {'6','0','0',0};
705 static const WCHAR style700[] = {'7','0','0',0};
706 static const WCHAR style800[] = {'8','0','0',0};
707 static const WCHAR style900[] = {'9','0','0',0};
709 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
711 /* fontWeight can only be one of the following */
712 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(styleBold, v) == 0 ||
713 strcmpiW(styleBolder, v) == 0 || strcmpiW(styleLighter, v) == 0 ||
714 strcmpiW(style100, v) == 0 || strcmpiW(style200, v) == 0 ||
715 strcmpiW(style300, v) == 0 || strcmpiW(style400, v) == 0 ||
716 strcmpiW(style500, v) == 0 || strcmpiW(style600, v) == 0 ||
717 strcmpiW(style700, v) == 0 || strcmpiW(style800, v) == 0 ||
718 strcmpiW(style900, v) == 0
721 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_WEIGHT, v, 0);
727 static HRESULT WINAPI HTMLStyle_get_fontWeight(IHTMLStyle *iface, BSTR *p)
729 HTMLStyle *This = HTMLSTYLE_THIS(iface);
731 TRACE("(%p)->(%p)\n", This, p);
733 return get_style_attr(This, STYLEID_FONT_WEIGHT, p);
736 static HRESULT WINAPI HTMLStyle_put_fontSize(IHTMLStyle *iface, VARIANT v)
738 HTMLStyle *This = HTMLSTYLE_THIS(iface);
740 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
744 return set_style_attr(This, STYLEID_FONT_SIZE, V_BSTR(&v), 0);
746 FIXME("not supported vt %d\n", V_VT(&v));
752 static HRESULT WINAPI HTMLStyle_get_fontSize(IHTMLStyle *iface, VARIANT *p)
754 HTMLStyle *This = HTMLSTYLE_THIS(iface);
756 TRACE("(%p)->(%p)\n", This, p);
759 return get_style_attr(This, STYLEID_FONT_SIZE, &V_BSTR(p));
762 static HRESULT WINAPI HTMLStyle_put_font(IHTMLStyle *iface, BSTR v)
764 HTMLStyle *This = HTMLSTYLE_THIS(iface);
765 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
769 static HRESULT WINAPI HTMLStyle_get_font(IHTMLStyle *iface, BSTR *p)
771 HTMLStyle *This = HTMLSTYLE_THIS(iface);
772 FIXME("(%p)->(%p)\n", This, p);
776 static HRESULT WINAPI HTMLStyle_put_color(IHTMLStyle *iface, VARIANT v)
778 HTMLStyle *This = HTMLSTYLE_THIS(iface);
780 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
784 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
785 return set_style_attr(This, STYLEID_COLOR, V_BSTR(&v), 0);
788 FIXME("unsupported vt=%d\n", V_VT(&v));
794 static HRESULT WINAPI HTMLStyle_get_color(IHTMLStyle *iface, VARIANT *p)
796 HTMLStyle *This = HTMLSTYLE_THIS(iface);
798 TRACE("(%p)->(%p)\n", This, p);
801 return get_style_attr(This, STYLEID_COLOR, &V_BSTR(p));
804 static HRESULT WINAPI HTMLStyle_put_background(IHTMLStyle *iface, BSTR v)
806 HTMLStyle *This = HTMLSTYLE_THIS(iface);
808 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
810 return set_style_attr(This, STYLEID_BACKGROUND, v, 0);
813 static HRESULT WINAPI HTMLStyle_get_background(IHTMLStyle *iface, BSTR *p)
815 HTMLStyle *This = HTMLSTYLE_THIS(iface);
817 TRACE("(%p)->(%p)\n", This, p);
819 return get_style_attr(This, STYLEID_BACKGROUND, p);
822 static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v)
824 HTMLStyle *This = HTMLSTYLE_THIS(iface);
826 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
830 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, V_BSTR(&v), 0);
833 static const WCHAR format[] = {'#','%','0','6','x',0};
835 wsprintfW(value, format, V_I4(&v));
836 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, value, 0);
839 FIXME("unsupported vt %d\n", V_VT(&v));
845 static HRESULT WINAPI HTMLStyle_get_backgroundColor(IHTMLStyle *iface, VARIANT *p)
847 HTMLStyle *This = HTMLSTYLE_THIS(iface);
848 TRACE("(%p)->(%p)\n", This, p);
851 return get_style_attr(This, STYLEID_BACKGROUND_COLOR, &V_BSTR(p));
854 static HRESULT WINAPI HTMLStyle_put_backgroundImage(IHTMLStyle *iface, BSTR v)
856 HTMLStyle *This = HTMLSTYLE_THIS(iface);
858 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
860 return set_style_attr(This, STYLEID_BACKGROUND_IMAGE, v, ATTR_FIX_URL);
863 static HRESULT WINAPI HTMLStyle_get_backgroundImage(IHTMLStyle *iface, BSTR *p)
865 HTMLStyle *This = HTMLSTYLE_THIS(iface);
867 TRACE("(%p)->(%p)\n", This, p);
869 return get_style_attr(This, STYLEID_BACKGROUND_IMAGE, p);
872 static HRESULT WINAPI HTMLStyle_put_backgroundRepeat(IHTMLStyle *iface, BSTR v)
874 HTMLStyle *This = HTMLSTYLE_THIS(iface);
875 static const WCHAR styleRepeat[] = {'r','e','p','e','a','t',0};
876 static const WCHAR styleNoRepeat[] = {'n','o','-','r','e','p','e','a','t',0};
877 static const WCHAR styleRepeatX[] = {'r','e','p','e','a','t','-','x',0};
878 static const WCHAR styleRepeatY[] = {'r','e','p','e','a','t','-','y',0};
880 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
882 /* fontWeight can only be one of the following */
883 if(!v || strcmpiW(styleRepeat, v) == 0 || strcmpiW(styleNoRepeat, v) == 0 ||
884 strcmpiW(styleRepeatX, v) == 0 || strcmpiW(styleRepeatY, v) == 0 )
886 return set_style_attr(This, STYLEID_BACKGROUND_REPEAT , v, 0);
892 static HRESULT WINAPI HTMLStyle_get_backgroundRepeat(IHTMLStyle *iface, BSTR *p)
894 HTMLStyle *This = HTMLSTYLE_THIS(iface);
896 TRACE("(%p)->(%p)\n", This, p);
898 return get_style_attr(This, STYLEID_BACKGROUND_REPEAT, p);
901 static HRESULT WINAPI HTMLStyle_put_backgroundAttachment(IHTMLStyle *iface, BSTR v)
903 HTMLStyle *This = HTMLSTYLE_THIS(iface);
904 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
908 static HRESULT WINAPI HTMLStyle_get_backgroundAttachment(IHTMLStyle *iface, BSTR *p)
910 HTMLStyle *This = HTMLSTYLE_THIS(iface);
911 FIXME("(%p)->(%p)\n", This, p);
915 static HRESULT WINAPI HTMLStyle_put_backgroundPosition(IHTMLStyle *iface, BSTR v)
917 HTMLStyle *This = HTMLSTYLE_THIS(iface);
918 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
922 static HRESULT WINAPI HTMLStyle_get_backgroundPosition(IHTMLStyle *iface, BSTR *p)
924 HTMLStyle *This = HTMLSTYLE_THIS(iface);
925 FIXME("(%p)->(%p)\n", This, p);
929 static HRESULT WINAPI HTMLStyle_put_backgroundPositionX(IHTMLStyle *iface, VARIANT v)
931 HTMLStyle *This = HTMLSTYLE_THIS(iface);
932 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
933 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_X, &v, 0);
936 static HRESULT WINAPI HTMLStyle_get_backgroundPositionX(IHTMLStyle *iface, VARIANT *p)
938 HTMLStyle *This = HTMLSTYLE_THIS(iface);
939 TRACE("(%p)->(%p)\n", This, p);
940 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_X, p, 0);
943 static HRESULT WINAPI HTMLStyle_put_backgroundPositionY(IHTMLStyle *iface, VARIANT v)
945 HTMLStyle *This = HTMLSTYLE_THIS(iface);
946 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
947 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_Y, &v, 0);
950 static HRESULT WINAPI HTMLStyle_get_backgroundPositionY(IHTMLStyle *iface, VARIANT *p)
952 HTMLStyle *This = HTMLSTYLE_THIS(iface);
953 TRACE("(%p)->(%p)\n", This, p);
954 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_Y, p, 0);
957 static HRESULT WINAPI HTMLStyle_put_wordSpacing(IHTMLStyle *iface, VARIANT v)
959 HTMLStyle *This = HTMLSTYLE_THIS(iface);
960 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
961 return set_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, &v, 0);
964 static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p)
966 HTMLStyle *This = HTMLSTYLE_THIS(iface);
967 TRACE("(%p)->(%p)\n", This, p);
968 return get_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, p, 0);
971 static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
973 HTMLStyle *This = HTMLSTYLE_THIS(iface);
974 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
975 return set_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, &v, 0);
978 static HRESULT WINAPI HTMLStyle_get_letterSpacing(IHTMLStyle *iface, VARIANT *p)
980 HTMLStyle *This = HTMLSTYLE_THIS(iface);
981 TRACE("(%p)->(%p)\n", This, p);
982 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
985 static HRESULT WINAPI HTMLStyle_put_textDecoration(IHTMLStyle *iface, BSTR v)
987 HTMLStyle *This = HTMLSTYLE_THIS(iface);
989 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
991 /* textDecoration can only be one of the following */
992 if(!v || strcmpiW(styleNone, v) == 0 || strcmpiW(valUnderline, v) == 0 ||
993 strcmpiW(valOverline, v) == 0 || strcmpiW(valLineThrough, v) == 0 ||
994 strcmpiW(valBlink, v) == 0)
996 return set_style_attr(This, STYLEID_TEXT_DECORATION , v, 0);
1002 static HRESULT WINAPI HTMLStyle_get_textDecoration(IHTMLStyle *iface, BSTR *p)
1004 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1006 TRACE("(%p)->(%p)\n", This, p);
1008 return get_style_attr(This, STYLEID_TEXT_DECORATION, p);
1011 static HRESULT WINAPI HTMLStyle_put_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL v)
1013 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1015 TRACE("(%p)->(%x)\n", This, v);
1017 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? styleNone : emptyW, 0);
1020 static HRESULT WINAPI HTMLStyle_get_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL *p)
1022 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1024 TRACE("(%p)->(%p)\n", This, p);
1026 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, styleNone, p);
1029 static HRESULT WINAPI HTMLStyle_put_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL v)
1031 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1033 TRACE("(%p)->(%x)\n", This, v);
1035 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valUnderline : emptyW, 0);
1038 static HRESULT WINAPI HTMLStyle_get_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL *p)
1040 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1042 TRACE("(%p)->(%p)\n", This, p);
1044 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valUnderline, p);
1047 static HRESULT WINAPI HTMLStyle_put_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL v)
1049 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1051 TRACE("(%p)->(%x)\n", This, v);
1053 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valOverline : emptyW, 0);
1056 static HRESULT WINAPI HTMLStyle_get_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL *p)
1058 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1060 TRACE("(%p)->(%p)\n", This, p);
1062 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valOverline, p);
1065 static HRESULT WINAPI HTMLStyle_put_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL v)
1067 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1069 TRACE("(%p)->(%x)\n", This, v);
1071 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valLineThrough : emptyW, 0);
1074 static HRESULT WINAPI HTMLStyle_get_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL *p)
1076 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1078 TRACE("(%p)->(%p)\n", This, p);
1080 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valLineThrough, p);
1083 static HRESULT WINAPI HTMLStyle_put_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL v)
1085 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1087 TRACE("(%p)->(%x)\n", This, v);
1089 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valBlink : emptyW, 0);
1092 static HRESULT WINAPI HTMLStyle_get_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL *p)
1094 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1096 TRACE("(%p)->(%p)\n", This, p);
1098 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valBlink, p);
1101 static HRESULT WINAPI HTMLStyle_put_verticalAlign(IHTMLStyle *iface, VARIANT v)
1103 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1105 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1109 return set_style_attr(This, STYLEID_VERTICAL_ALIGN, V_BSTR(&v), 0);
1111 FIXME("not implemented vt %d\n", V_VT(&v));
1118 static HRESULT WINAPI HTMLStyle_get_verticalAlign(IHTMLStyle *iface, VARIANT *p)
1120 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1124 TRACE("(%p)->(%p)\n", This, p);
1126 hres = get_style_attr(This, STYLEID_VERTICAL_ALIGN, &ret);
1135 static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v)
1137 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1138 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1142 static HRESULT WINAPI HTMLStyle_get_textTransform(IHTMLStyle *iface, BSTR *p)
1144 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1145 FIXME("(%p)->(%p)\n", This, p);
1149 static HRESULT WINAPI HTMLStyle_put_textAlign(IHTMLStyle *iface, BSTR v)
1151 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1153 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1155 return set_style_attr(This, STYLEID_TEXT_ALIGN, v, 0);
1158 static HRESULT WINAPI HTMLStyle_get_textAlign(IHTMLStyle *iface, BSTR *p)
1160 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1162 TRACE("(%p)->(%p)\n", This, p);
1164 return get_style_attr(This, STYLEID_TEXT_ALIGN, p);
1167 static HRESULT WINAPI HTMLStyle_put_textIndent(IHTMLStyle *iface, VARIANT v)
1169 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1170 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1174 static HRESULT WINAPI HTMLStyle_get_textIndent(IHTMLStyle *iface, VARIANT *p)
1176 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1177 FIXME("(%p)->(%p)\n", This, p);
1181 static HRESULT WINAPI HTMLStyle_put_lineHeight(IHTMLStyle *iface, VARIANT v)
1183 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1184 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1188 static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
1190 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1191 FIXME("(%p)->(%p)\n", This, p);
1195 static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
1197 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1198 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1202 static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
1204 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1205 FIXME("(%p)->(%p)\n", This, p);
1209 static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
1211 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1213 TRACE("(%p)->(v(%d))\n", This, V_VT(&v));
1217 return set_style_attr(This, STYLEID_MARGIN_RIGHT, emptyW, 0);
1221 wsprintfW(buf, px_formatW, V_I4(&v));
1222 return set_style_attr(This, STYLEID_MARGIN_RIGHT, buf, 0);
1225 return set_style_attr(This, STYLEID_MARGIN_RIGHT, V_BSTR(&v), 0);
1227 FIXME("Unsupported vt=%d\n", V_VT(&v));
1233 static HRESULT WINAPI HTMLStyle_get_marginRight(IHTMLStyle *iface, VARIANT *p)
1235 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1236 TRACE("(%p)->(%p)\n", This, p);
1237 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
1240 static HRESULT WINAPI HTMLStyle_put_marginBottom(IHTMLStyle *iface, VARIANT v)
1242 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1243 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1247 static HRESULT WINAPI HTMLStyle_get_marginBottom(IHTMLStyle *iface, VARIANT *p)
1249 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1250 FIXME("(%p)->(%p)\n", This, p);
1254 static HRESULT WINAPI HTMLStyle_put_marginLeft(IHTMLStyle *iface, VARIANT v)
1256 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1260 TRACE("(%p)->(NULL)\n", This);
1261 return set_style_attr(This, STYLEID_MARGIN_LEFT, emptyW, 0);
1265 TRACE("(%p)->(%d)\n", This, V_I4(&v));
1267 wsprintfW(buf, px_formatW, V_I4(&v));
1268 return set_style_attr(This, STYLEID_MARGIN_LEFT, buf, 0);
1271 TRACE("(%p)->(%s)\n", This, debugstr_w(V_BSTR(&v)));
1272 return set_style_attr(This, STYLEID_MARGIN_LEFT, V_BSTR(&v), 0);
1274 FIXME("Unsupported vt=%d\n", V_VT(&v));
1280 static HRESULT WINAPI HTMLStyle_put_margin(IHTMLStyle *iface, BSTR v)
1282 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1284 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1286 return set_style_attr(This, STYLEID_MARGIN, v, 0);
1289 static HRESULT WINAPI HTMLStyle_get_margin(IHTMLStyle *iface, BSTR *p)
1291 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1293 TRACE("(%p)->(%p)\n", This, p);
1295 return get_style_attr(This, STYLEID_MARGIN, p);
1298 static HRESULT WINAPI HTMLStyle_get_marginLeft(IHTMLStyle *iface, VARIANT *p)
1300 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1301 TRACE("(%p)->(%p)\n", This, p);
1302 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
1305 static HRESULT WINAPI HTMLStyle_put_paddingTop(IHTMLStyle *iface, VARIANT v)
1307 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1308 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1312 static HRESULT WINAPI HTMLStyle_get_paddingTop(IHTMLStyle *iface, VARIANT *p)
1314 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1315 FIXME("(%p)->(%p)\n", This, p);
1319 static HRESULT WINAPI HTMLStyle_put_paddingRight(IHTMLStyle *iface, VARIANT v)
1321 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1322 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1326 static HRESULT WINAPI HTMLStyle_get_paddingRight(IHTMLStyle *iface, VARIANT *p)
1328 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1329 FIXME("(%p)->(%p)\n", This, p);
1333 static HRESULT WINAPI HTMLStyle_put_paddingBottom(IHTMLStyle *iface, VARIANT v)
1335 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1336 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1340 static HRESULT WINAPI HTMLStyle_get_paddingBottom(IHTMLStyle *iface, VARIANT *p)
1342 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1343 FIXME("(%p)->(%p)\n", This, p);
1347 static HRESULT WINAPI HTMLStyle_put_paddingLeft(IHTMLStyle *iface, VARIANT v)
1349 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1351 TRACE("(%p)->(vt=%d)\n", This, V_VT(&v));
1357 wsprintfW(buf, px_formatW, V_I4(&v));
1358 return set_style_attr(This, STYLEID_PADDING_LEFT, buf, 0);
1361 return set_style_attr(This, STYLEID_PADDING_LEFT, V_BSTR(&v), 0);
1363 FIXME("unsupported vt=%d\n", V_VT(&v));
1369 static HRESULT WINAPI HTMLStyle_get_paddingLeft(IHTMLStyle *iface, VARIANT *p)
1371 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1375 TRACE("(%p)->(%p)\n", This, p);
1377 hres = get_style_attr(This, STYLEID_PADDING_LEFT, &ret);
1386 static HRESULT WINAPI HTMLStyle_put_padding(IHTMLStyle *iface, BSTR v)
1388 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1389 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1393 static HRESULT WINAPI HTMLStyle_get_padding(IHTMLStyle *iface, BSTR *p)
1395 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1396 FIXME("(%p)->(%p)\n", This, p);
1400 static HRESULT WINAPI HTMLStyle_put_border(IHTMLStyle *iface, BSTR v)
1402 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1404 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1406 return set_style_attr(This, STYLEID_BORDER, v, 0);
1409 static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p)
1411 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1413 TRACE("(%p)->(%p)\n", This, p);
1415 return get_style_attr(This, STYLEID_BORDER, p);
1418 static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
1420 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1421 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1425 static HRESULT WINAPI HTMLStyle_get_borderTop(IHTMLStyle *iface, BSTR *p)
1427 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1428 FIXME("(%p)->(%p)\n", This, p);
1432 static HRESULT WINAPI HTMLStyle_put_borderRight(IHTMLStyle *iface, BSTR v)
1434 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1435 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1439 static HRESULT WINAPI HTMLStyle_get_borderRight(IHTMLStyle *iface, BSTR *p)
1441 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1442 FIXME("(%p)->(%p)\n", This, p);
1446 static HRESULT WINAPI HTMLStyle_put_borderBottom(IHTMLStyle *iface, BSTR v)
1448 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1449 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1453 static HRESULT WINAPI HTMLStyle_get_borderBottom(IHTMLStyle *iface, BSTR *p)
1455 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1456 FIXME("(%p)->(%p)\n", This, p);
1460 static HRESULT WINAPI HTMLStyle_put_borderLeft(IHTMLStyle *iface, BSTR v)
1462 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1464 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1466 return set_style_attr(This, STYLEID_BORDER_LEFT, v, ATTR_FIX_PX);
1469 static HRESULT WINAPI HTMLStyle_get_borderLeft(IHTMLStyle *iface, BSTR *p)
1471 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1473 TRACE("(%p)->(%p)\n", This, p);
1475 return get_style_attr(This, STYLEID_BORDER_LEFT, p);
1478 static HRESULT WINAPI HTMLStyle_put_borderColor(IHTMLStyle *iface, BSTR v)
1480 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1482 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1484 return set_style_attr(This, STYLEID_BORDER_COLOR, v, 0);
1487 static HRESULT WINAPI HTMLStyle_get_borderColor(IHTMLStyle *iface, BSTR *p)
1489 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1491 TRACE("(%p)->(%p)\n", This, p);
1493 return get_style_attr(This, STYLEID_BORDER_COLOR, p);
1496 static HRESULT WINAPI HTMLStyle_put_borderTopColor(IHTMLStyle *iface, VARIANT v)
1498 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1499 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1503 static HRESULT WINAPI HTMLStyle_get_borderTopColor(IHTMLStyle *iface, VARIANT *p)
1505 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1506 FIXME("(%p)->(%p)\n", This, p);
1510 static HRESULT WINAPI HTMLStyle_put_borderRightColor(IHTMLStyle *iface, VARIANT v)
1512 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1513 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1517 static HRESULT WINAPI HTMLStyle_get_borderRightColor(IHTMLStyle *iface, VARIANT *p)
1519 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1520 FIXME("(%p)->(%p)\n", This, p);
1524 static HRESULT WINAPI HTMLStyle_put_borderBottomColor(IHTMLStyle *iface, VARIANT v)
1526 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1527 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1531 static HRESULT WINAPI HTMLStyle_get_borderBottomColor(IHTMLStyle *iface, VARIANT *p)
1533 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1534 FIXME("(%p)->(%p)\n", This, p);
1538 static HRESULT WINAPI HTMLStyle_put_borderLeftColor(IHTMLStyle *iface, VARIANT v)
1540 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1541 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1545 static HRESULT WINAPI HTMLStyle_get_borderLeftColor(IHTMLStyle *iface, VARIANT *p)
1547 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1548 FIXME("(%p)->(%p)\n", This, p);
1552 static HRESULT WINAPI HTMLStyle_put_borderWidth(IHTMLStyle *iface, BSTR v)
1554 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1555 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1556 return set_style_attr(This, STYLEID_BORDER_WIDTH, v, ATTR_FIX_PX);
1559 static HRESULT WINAPI HTMLStyle_get_borderWidth(IHTMLStyle *iface, BSTR *p)
1561 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1562 TRACE("(%p)->(%p)\n", This, p);
1563 return get_style_attr(This, STYLEID_BORDER_WIDTH, p);
1566 static HRESULT WINAPI HTMLStyle_put_borderTopWidth(IHTMLStyle *iface, VARIANT v)
1568 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1569 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1570 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, &v, 0);
1573 static HRESULT WINAPI HTMLStyle_get_borderTopWidth(IHTMLStyle *iface, VARIANT *p)
1575 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1577 TRACE("(%p)->(%p)\n", This, p);
1579 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
1582 static HRESULT WINAPI HTMLStyle_put_borderRightWidth(IHTMLStyle *iface, VARIANT v)
1584 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1585 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1586 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, &v, 0);
1589 static HRESULT WINAPI HTMLStyle_get_borderRightWidth(IHTMLStyle *iface, VARIANT *p)
1591 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1592 TRACE("(%p)->(%p)\n", This, p);
1593 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
1596 static HRESULT WINAPI HTMLStyle_put_borderBottomWidth(IHTMLStyle *iface, VARIANT v)
1598 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1600 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1601 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, &v, 0);
1604 static HRESULT WINAPI HTMLStyle_get_borderBottomWidth(IHTMLStyle *iface, VARIANT *p)
1606 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1607 TRACE("(%p)->(%p)\n", This, p);
1608 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
1611 static HRESULT WINAPI HTMLStyle_put_borderLeftWidth(IHTMLStyle *iface, VARIANT v)
1613 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1614 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1615 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, &v, 0);
1618 static HRESULT WINAPI HTMLStyle_get_borderLeftWidth(IHTMLStyle *iface, VARIANT *p)
1620 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1621 TRACE("(%p)->(%p)\n", This, p);
1622 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
1625 static HRESULT WINAPI HTMLStyle_put_borderStyle(IHTMLStyle *iface, BSTR v)
1627 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1628 static const WCHAR styleWindowInset[] = {'w','i','n','d','o','w','-','i','n','s','e','t',0};
1629 HRESULT hres = S_OK;
1634 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1636 while(v[i] && hres == S_OK)
1638 if(v[i] == (WCHAR)' ')
1640 pstyle = SysAllocStringLen(&v[last], (i-last));
1641 if( !(is_valid_border_style(pstyle) || strcmpiW(styleWindowInset, pstyle) == 0))
1643 TRACE("1. Invalid style (%s)\n", debugstr_w(pstyle));
1644 hres = E_INVALIDARG;
1646 SysFreeString(pstyle);
1654 pstyle = SysAllocStringLen(&v[last], i-last);
1655 if( !(is_valid_border_style(pstyle) || strcmpiW(styleWindowInset, pstyle) == 0))
1657 TRACE("2. Invalid style (%s)\n", debugstr_w(pstyle));
1658 hres = E_INVALIDARG;
1660 SysFreeString(pstyle);
1664 hres = set_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, v, 0);
1669 static HRESULT WINAPI HTMLStyle_get_borderStyle(IHTMLStyle *iface, BSTR *p)
1671 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1672 TRACE("(%p)->(%p)\n", This, p);
1673 return get_style_attr(This, STYLEID_BORDER_STYLE, p);
1676 static HRESULT WINAPI HTMLStyle_put_borderTopStyle(IHTMLStyle *iface, BSTR v)
1678 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1679 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1681 if(!is_valid_border_style(v))
1682 return E_INVALIDARG;
1684 return set_style_attr(This, STYLEID_BORDER_TOP_STYLE, v, 0);
1687 static HRESULT WINAPI HTMLStyle_get_borderTopStyle(IHTMLStyle *iface, BSTR *p)
1689 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1690 TRACE("(%p)->(%p)\n", This, p);
1691 return get_style_attr(This, STYLEID_BORDER_TOP_STYLE, p);
1694 static HRESULT WINAPI HTMLStyle_put_borderRightStyle(IHTMLStyle *iface, BSTR v)
1696 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1697 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1699 if(!is_valid_border_style(v))
1700 return E_INVALIDARG;
1702 return set_style_attr(This, STYLEID_BORDER_RIGHT_STYLE, v, 0);
1705 static HRESULT WINAPI HTMLStyle_get_borderRightStyle(IHTMLStyle *iface, BSTR *p)
1707 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1708 TRACE("(%p)->(%p)\n", This, p);
1709 return get_style_attr(This, STYLEID_BORDER_RIGHT_STYLE, p);
1712 static HRESULT WINAPI HTMLStyle_put_borderBottomStyle(IHTMLStyle *iface, BSTR v)
1714 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1715 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1717 if(!is_valid_border_style(v))
1718 return E_INVALIDARG;
1720 return set_style_attr(This, STYLEID_BORDER_BOTTOM_STYLE, v, 0);
1723 static HRESULT WINAPI HTMLStyle_get_borderBottomStyle(IHTMLStyle *iface, BSTR *p)
1725 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1726 TRACE("(%p)->(%p)\n", This, p);
1727 return get_style_attr(This, STYLEID_BORDER_BOTTOM_STYLE, p);
1730 static HRESULT WINAPI HTMLStyle_put_borderLeftStyle(IHTMLStyle *iface, BSTR v)
1732 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1733 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1735 if(!is_valid_border_style(v))
1736 return E_INVALIDARG;
1738 return set_style_attr(This, STYLEID_BORDER_LEFT_STYLE, v, 0);
1741 static HRESULT WINAPI HTMLStyle_get_borderLeftStyle(IHTMLStyle *iface, BSTR *p)
1743 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1744 TRACE("(%p)->(%p)\n", This, p);
1745 return get_style_attr(This, STYLEID_BORDER_LEFT_STYLE, p);
1748 static HRESULT WINAPI HTMLStyle_put_width(IHTMLStyle *iface, VARIANT v)
1750 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1752 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1756 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
1757 return set_style_attr(This, STYLEID_WIDTH, V_BSTR(&v), 0);
1759 FIXME("unsupported vt %d\n", V_VT(&v));
1765 static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p)
1767 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1769 TRACE("(%p)->(%p)\n", This, p);
1772 return get_style_attr(This, STYLEID_WIDTH, &V_BSTR(p));
1775 static HRESULT WINAPI HTMLStyle_put_height(IHTMLStyle *iface, VARIANT v)
1777 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1779 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1783 return set_style_attr(This, STYLEID_HEIGHT, V_BSTR(&v), 0);
1785 FIXME("unimplemented vt %d\n", V_VT(&v));
1792 static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p)
1794 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1798 TRACE("(%p)->(%p)\n", This, p);
1800 hres = get_style_attr(This, STYLEID_HEIGHT, &ret);
1809 static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v)
1811 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1812 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1816 static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p)
1818 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1819 FIXME("(%p)->(%p)\n", This, p);
1823 static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v)
1825 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1826 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1830 static HRESULT WINAPI HTMLStyle_get_clear(IHTMLStyle *iface, BSTR *p)
1832 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1833 FIXME("(%p)->(%p)\n", This, p);
1837 static HRESULT WINAPI HTMLStyle_put_display(IHTMLStyle *iface, BSTR v)
1839 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1841 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1843 return set_style_attr(This, STYLEID_DISPLAY, v, 0);
1846 static HRESULT WINAPI HTMLStyle_get_display(IHTMLStyle *iface, BSTR *p)
1848 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1850 TRACE("(%p)->(%p)\n", This, p);
1852 return get_style_attr(This, STYLEID_DISPLAY, p);
1855 static HRESULT WINAPI HTMLStyle_put_visibility(IHTMLStyle *iface, BSTR v)
1857 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1859 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1861 return set_style_attr(This, STYLEID_VISIBILITY, v, 0);
1864 static HRESULT WINAPI HTMLStyle_get_visibility(IHTMLStyle *iface, BSTR *p)
1866 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1868 TRACE("(%p)->(%p)\n", This, p);
1870 return get_style_attr(This, STYLEID_VISIBILITY, p);
1873 static HRESULT WINAPI HTMLStyle_put_listStyleType(IHTMLStyle *iface, BSTR v)
1875 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1876 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1880 static HRESULT WINAPI HTMLStyle_get_listStyleType(IHTMLStyle *iface, BSTR *p)
1882 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1883 FIXME("(%p)->(%p)\n", This, p);
1887 static HRESULT WINAPI HTMLStyle_put_listStylePosition(IHTMLStyle *iface, BSTR v)
1889 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1890 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1894 static HRESULT WINAPI HTMLStyle_get_listStylePosition(IHTMLStyle *iface, BSTR *p)
1896 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1897 FIXME("(%p)->(%p)\n", This, p);
1901 static HRESULT WINAPI HTMLStyle_put_listStyleImage(IHTMLStyle *iface, BSTR v)
1903 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1904 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1908 static HRESULT WINAPI HTMLStyle_get_listStyleImage(IHTMLStyle *iface, BSTR *p)
1910 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1911 FIXME("(%p)->(%p)\n", This, p);
1915 static HRESULT WINAPI HTMLStyle_put_listStyle(IHTMLStyle *iface, BSTR v)
1917 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1918 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1922 static HRESULT WINAPI HTMLStyle_get_listStyle(IHTMLStyle *iface, BSTR *p)
1924 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1925 FIXME("(%p)->(%p)\n", This, p);
1929 static HRESULT WINAPI HTMLStyle_put_whiteSpace(IHTMLStyle *iface, BSTR v)
1931 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1932 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1936 static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p)
1938 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1939 FIXME("(%p)->(%p)\n", This, p);
1943 static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v)
1945 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1947 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1949 return set_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, &v, 0);
1952 static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p)
1954 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1958 TRACE("(%p)->(%p)\n", This, p);
1960 hres = get_style_attr(This, STYLEID_TOP, &ret);
1969 static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v)
1971 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1973 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1975 return set_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, &v, 0);
1978 static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p)
1980 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1984 TRACE("(%p)->(%p)\n", This, p);
1986 hres = get_style_attr(This, STYLEID_LEFT, &ret);
1995 static HRESULT WINAPI HTMLStyle_get_position(IHTMLStyle *iface, BSTR *p)
1997 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1998 TRACE("(%p)->(%p)\n", This, p);
1999 return IHTMLStyle2_get_position(HTMLSTYLE2(This), p);
2002 static HRESULT WINAPI HTMLStyle_put_zIndex(IHTMLStyle *iface, VARIANT v)
2004 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2006 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
2010 return set_style_attr(This, STYLEID_Z_INDEX, V_BSTR(&v), 0);
2013 static const WCHAR format[] = {'%','d',0};
2015 wsprintfW(value, format, V_I4(&v));
2016 return set_style_attr(This, STYLEID_Z_INDEX, value, 0);
2019 FIXME("unimplemented vt %d\n", V_VT(&v));
2026 static HRESULT WINAPI HTMLStyle_get_zIndex(IHTMLStyle *iface, VARIANT *p)
2028 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2030 TRACE("(%p)->(%p)\n", This, p);
2032 return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
2035 static HRESULT WINAPI HTMLStyle_put_overflow(IHTMLStyle *iface, BSTR v)
2037 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2038 static const WCHAR szVisible[] = {'v','i','s','i','b','l','e',0};
2039 static const WCHAR szScroll[] = {'s','c','r','o','l','l',0};
2040 static const WCHAR szHidden[] = {'h','i','d','d','e','n',0};
2041 static const WCHAR szAuto[] = {'a','u','t','o',0};
2043 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2045 /* overflow can only be one of the follow values. */
2046 if(!v || !*v || strcmpiW(szVisible, v) == 0 || strcmpiW(szScroll, v) == 0 ||
2047 strcmpiW(szHidden, v) == 0 || strcmpiW(szAuto, v) == 0)
2049 return set_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, v, 0);
2052 return E_INVALIDARG;
2056 static HRESULT WINAPI HTMLStyle_get_overflow(IHTMLStyle *iface, BSTR *p)
2058 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2060 TRACE("(%p)->(%p)\n", This, p);
2063 return E_INVALIDARG;
2065 return get_style_attr(This, STYLEID_OVERFLOW, p);
2068 static HRESULT WINAPI HTMLStyle_put_pageBreakBefore(IHTMLStyle *iface, BSTR v)
2070 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2071 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2075 static HRESULT WINAPI HTMLStyle_get_pageBreakBefore(IHTMLStyle *iface, BSTR *p)
2077 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2078 FIXME("(%p)->(%p)\n", This, p);
2082 static HRESULT WINAPI HTMLStyle_put_pageBreakAfter(IHTMLStyle *iface, BSTR v)
2084 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2085 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2089 static HRESULT WINAPI HTMLStyle_get_pageBreakAfter(IHTMLStyle *iface, BSTR *p)
2091 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2092 FIXME("(%p)->(%p)\n", This, p);
2096 static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
2098 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2102 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2104 nsAString_Init(&text_str, v);
2105 nsres = nsIDOMCSSStyleDeclaration_SetCssText(This->nsstyle, &text_str);
2106 nsAString_Finish(&text_str);
2107 if(NS_FAILED(nsres)) {
2108 FIXME("SetCssStyle failed: %08x\n", nsres);
2115 static HRESULT WINAPI HTMLStyle_get_cssText(IHTMLStyle *iface, BSTR *p)
2117 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2121 TRACE("(%p)->(%p)\n", This, p);
2123 /* FIXME: Gecko style formatting is different than IE (uppercase). */
2124 nsAString_Init(&text_str, NULL);
2125 nsres = nsIDOMCSSStyleDeclaration_GetCssText(This->nsstyle, &text_str);
2126 if(NS_SUCCEEDED(nsres)) {
2127 const PRUnichar *text;
2129 nsAString_GetData(&text_str, &text);
2130 *p = *text ? SysAllocString(text) : NULL;
2132 FIXME("GetCssStyle failed: %08x\n", nsres);
2136 nsAString_Finish(&text_str);
2140 static HRESULT WINAPI HTMLStyle_put_pixelTop(IHTMLStyle *iface, LONG v)
2142 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2143 FIXME("(%p)->()\n", This);
2147 static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, LONG *p)
2149 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2150 FIXME("(%p)->()\n", This);
2154 static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, LONG v)
2156 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2157 FIXME("(%p)->()\n", This);
2161 static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p)
2163 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2164 FIXME("(%p)->()\n", This);
2168 static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v)
2170 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2171 FIXME("(%p)->()\n", This);
2175 static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p)
2177 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2178 FIXME("(%p)->()\n", This);
2182 static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, LONG v)
2184 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2185 FIXME("(%p)->()\n", This);
2189 static HRESULT WINAPI HTMLStyle_get_pixelHeight(IHTMLStyle *iface, LONG *p)
2191 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2192 FIXME("(%p)->()\n", This);
2196 static HRESULT WINAPI HTMLStyle_put_posTop(IHTMLStyle *iface, float v)
2198 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2200 TRACE("(%p)->(%f)\n", This, v);
2202 return set_style_pos(This, STYLEID_TOP, v);
2205 static HRESULT WINAPI HTMLStyle_get_posTop(IHTMLStyle *iface, float *p)
2207 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2209 TRACE("(%p)->(%p)\n", This, p);
2214 return get_nsstyle_pos(This, STYLEID_TOP, p);
2217 static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float v)
2219 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2221 TRACE("(%p)->(%f)\n", This, v);
2223 return set_style_pos(This, STYLEID_LEFT, v);
2226 static HRESULT WINAPI HTMLStyle_get_posLeft(IHTMLStyle *iface, float *p)
2228 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2230 TRACE("(%p)->(%p)\n", This, p);
2235 return get_nsstyle_pos(This, STYLEID_LEFT, p);
2238 static HRESULT WINAPI HTMLStyle_put_posWidth(IHTMLStyle *iface, float v)
2240 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2242 TRACE("(%p)->(%f)\n", This, v);
2244 return set_style_pos(This, STYLEID_WIDTH, v);
2247 static HRESULT WINAPI HTMLStyle_get_posWidth(IHTMLStyle *iface, float *p)
2249 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2251 TRACE("(%p)->(%p)\n", This, p);
2256 if(get_nsstyle_pos(This, STYLEID_WIDTH, p) != S_OK)
2262 static HRESULT WINAPI HTMLStyle_put_posHeight(IHTMLStyle *iface, float v)
2264 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2266 TRACE("(%p)->(%f)\n", This, v);
2268 return set_style_pos(This, STYLEID_HEIGHT, v);
2271 static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p)
2273 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2275 TRACE("(%p)->(%p)\n", This, p);
2280 if(get_nsstyle_pos(This, STYLEID_HEIGHT, p) != S_OK)
2286 static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v)
2288 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2290 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2292 return set_style_attr(This, STYLEID_CURSOR, v, 0);
2295 static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p)
2297 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2299 TRACE("(%p)->(%p)\n", This, p);
2301 return get_style_attr(This, STYLEID_CURSOR, p);
2304 static HRESULT WINAPI HTMLStyle_put_clip(IHTMLStyle *iface, BSTR v)
2306 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2307 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2311 static HRESULT WINAPI HTMLStyle_get_clip(IHTMLStyle *iface, BSTR *p)
2313 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2314 FIXME("(%p)->(%p)\n", This, p);
2318 static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v)
2320 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2322 WARN("(%p)->(%s)\n", This, debugstr_w(v));
2324 /* FIXME: Handle MS-style filters */
2325 return set_style_attr(This, STYLEID_FILTER, v, 0);
2328 static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p)
2330 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2332 WARN("(%p)->(%p)\n", This, p);
2334 /* FIXME: Handle MS-style filters */
2335 return get_style_attr(This, STYLEID_FILTER, p);
2338 static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2339 VARIANT AttributeValue, LONG lFlags)
2341 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2345 TRACE("(%p)->(%s v%d %08x)\n", This, debugstr_w(strAttributeName),
2346 V_VT(&AttributeValue), lFlags);
2348 if(!strAttributeName)
2349 return E_INVALIDARG;
2352 FIXME("Parameter lFlags ignored\n");
2354 hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
2355 LOCALE_USER_DEFAULT, &dispid);
2359 DISPID dispidNamed = DISPID_PROPERTYPUT;
2363 params.rgvarg = &AttributeValue;
2364 params.cNamedArgs = 1;
2365 params.rgdispidNamedArgs = &dispidNamed;
2367 hres = HTMLStyle_Invoke(iface, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
2368 DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, NULL);
2372 FIXME("Custom attributes not supported.\n");
2375 TRACE("ret: %08x\n", hres);
2380 static HRESULT WINAPI HTMLStyle_getAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2381 LONG lFlags, VARIANT *AttributeValue)
2383 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2387 TRACE("(%p)->(%s v%p %08x)\n", This, debugstr_w(strAttributeName),
2388 AttributeValue, lFlags);
2390 if(!AttributeValue || !strAttributeName)
2391 return E_INVALIDARG;
2394 FIXME("Parameter lFlags ignored\n");
2396 hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
2397 LOCALE_USER_DEFAULT, &dispid);
2400 DISPPARAMS params = {NULL, NULL, 0, 0 };
2402 hres = HTMLStyle_Invoke(iface, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
2403 DISPATCH_PROPERTYGET, ¶ms, AttributeValue, NULL, NULL);
2407 FIXME("Custom attributes not supported.\n");
2413 static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2414 LONG lFlags, VARIANT_BOOL *pfSuccess)
2416 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2417 FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
2422 static HRESULT WINAPI HTMLStyle_toString(IHTMLStyle *iface, BSTR *String)
2424 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2425 FIXME("(%p)->(%p)\n", This, String);
2429 static HRESULT HTMLStyle_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid)
2431 int c, i, min=0, max = sizeof(style_tbl)/sizeof(*style_tbl)-1;
2436 c = strcmpW(style_tbl[i].name, name);
2438 *dispid = style_tbl[i].dispid;
2448 return DISP_E_UNKNOWNNAME;
2451 static const IHTMLStyleVtbl HTMLStyleVtbl = {
2452 HTMLStyle_QueryInterface,
2455 HTMLStyle_GetTypeInfoCount,
2456 HTMLStyle_GetTypeInfo,
2457 HTMLStyle_GetIDsOfNames,
2459 HTMLStyle_put_fontFamily,
2460 HTMLStyle_get_fontFamily,
2461 HTMLStyle_put_fontStyle,
2462 HTMLStyle_get_fontStyle,
2463 HTMLStyle_put_fontVariant,
2464 HTMLStyle_get_fontVariant,
2465 HTMLStyle_put_fontWeight,
2466 HTMLStyle_get_fontWeight,
2467 HTMLStyle_put_fontSize,
2468 HTMLStyle_get_fontSize,
2471 HTMLStyle_put_color,
2472 HTMLStyle_get_color,
2473 HTMLStyle_put_background,
2474 HTMLStyle_get_background,
2475 HTMLStyle_put_backgroundColor,
2476 HTMLStyle_get_backgroundColor,
2477 HTMLStyle_put_backgroundImage,
2478 HTMLStyle_get_backgroundImage,
2479 HTMLStyle_put_backgroundRepeat,
2480 HTMLStyle_get_backgroundRepeat,
2481 HTMLStyle_put_backgroundAttachment,
2482 HTMLStyle_get_backgroundAttachment,
2483 HTMLStyle_put_backgroundPosition,
2484 HTMLStyle_get_backgroundPosition,
2485 HTMLStyle_put_backgroundPositionX,
2486 HTMLStyle_get_backgroundPositionX,
2487 HTMLStyle_put_backgroundPositionY,
2488 HTMLStyle_get_backgroundPositionY,
2489 HTMLStyle_put_wordSpacing,
2490 HTMLStyle_get_wordSpacing,
2491 HTMLStyle_put_letterSpacing,
2492 HTMLStyle_get_letterSpacing,
2493 HTMLStyle_put_textDecoration,
2494 HTMLStyle_get_textDecoration,
2495 HTMLStyle_put_textDecorationNone,
2496 HTMLStyle_get_textDecorationNone,
2497 HTMLStyle_put_textDecorationUnderline,
2498 HTMLStyle_get_textDecorationUnderline,
2499 HTMLStyle_put_textDecorationOverline,
2500 HTMLStyle_get_textDecorationOverline,
2501 HTMLStyle_put_textDecorationLineThrough,
2502 HTMLStyle_get_textDecorationLineThrough,
2503 HTMLStyle_put_textDecorationBlink,
2504 HTMLStyle_get_textDecorationBlink,
2505 HTMLStyle_put_verticalAlign,
2506 HTMLStyle_get_verticalAlign,
2507 HTMLStyle_put_textTransform,
2508 HTMLStyle_get_textTransform,
2509 HTMLStyle_put_textAlign,
2510 HTMLStyle_get_textAlign,
2511 HTMLStyle_put_textIndent,
2512 HTMLStyle_get_textIndent,
2513 HTMLStyle_put_lineHeight,
2514 HTMLStyle_get_lineHeight,
2515 HTMLStyle_put_marginTop,
2516 HTMLStyle_get_marginTop,
2517 HTMLStyle_put_marginRight,
2518 HTMLStyle_get_marginRight,
2519 HTMLStyle_put_marginBottom,
2520 HTMLStyle_get_marginBottom,
2521 HTMLStyle_put_marginLeft,
2522 HTMLStyle_get_marginLeft,
2523 HTMLStyle_put_margin,
2524 HTMLStyle_get_margin,
2525 HTMLStyle_put_paddingTop,
2526 HTMLStyle_get_paddingTop,
2527 HTMLStyle_put_paddingRight,
2528 HTMLStyle_get_paddingRight,
2529 HTMLStyle_put_paddingBottom,
2530 HTMLStyle_get_paddingBottom,
2531 HTMLStyle_put_paddingLeft,
2532 HTMLStyle_get_paddingLeft,
2533 HTMLStyle_put_padding,
2534 HTMLStyle_get_padding,
2535 HTMLStyle_put_border,
2536 HTMLStyle_get_border,
2537 HTMLStyle_put_borderTop,
2538 HTMLStyle_get_borderTop,
2539 HTMLStyle_put_borderRight,
2540 HTMLStyle_get_borderRight,
2541 HTMLStyle_put_borderBottom,
2542 HTMLStyle_get_borderBottom,
2543 HTMLStyle_put_borderLeft,
2544 HTMLStyle_get_borderLeft,
2545 HTMLStyle_put_borderColor,
2546 HTMLStyle_get_borderColor,
2547 HTMLStyle_put_borderTopColor,
2548 HTMLStyle_get_borderTopColor,
2549 HTMLStyle_put_borderRightColor,
2550 HTMLStyle_get_borderRightColor,
2551 HTMLStyle_put_borderBottomColor,
2552 HTMLStyle_get_borderBottomColor,
2553 HTMLStyle_put_borderLeftColor,
2554 HTMLStyle_get_borderLeftColor,
2555 HTMLStyle_put_borderWidth,
2556 HTMLStyle_get_borderWidth,
2557 HTMLStyle_put_borderTopWidth,
2558 HTMLStyle_get_borderTopWidth,
2559 HTMLStyle_put_borderRightWidth,
2560 HTMLStyle_get_borderRightWidth,
2561 HTMLStyle_put_borderBottomWidth,
2562 HTMLStyle_get_borderBottomWidth,
2563 HTMLStyle_put_borderLeftWidth,
2564 HTMLStyle_get_borderLeftWidth,
2565 HTMLStyle_put_borderStyle,
2566 HTMLStyle_get_borderStyle,
2567 HTMLStyle_put_borderTopStyle,
2568 HTMLStyle_get_borderTopStyle,
2569 HTMLStyle_put_borderRightStyle,
2570 HTMLStyle_get_borderRightStyle,
2571 HTMLStyle_put_borderBottomStyle,
2572 HTMLStyle_get_borderBottomStyle,
2573 HTMLStyle_put_borderLeftStyle,
2574 HTMLStyle_get_borderLeftStyle,
2575 HTMLStyle_put_width,
2576 HTMLStyle_get_width,
2577 HTMLStyle_put_height,
2578 HTMLStyle_get_height,
2579 HTMLStyle_put_styleFloat,
2580 HTMLStyle_get_styleFloat,
2581 HTMLStyle_put_clear,
2582 HTMLStyle_get_clear,
2583 HTMLStyle_put_display,
2584 HTMLStyle_get_display,
2585 HTMLStyle_put_visibility,
2586 HTMLStyle_get_visibility,
2587 HTMLStyle_put_listStyleType,
2588 HTMLStyle_get_listStyleType,
2589 HTMLStyle_put_listStylePosition,
2590 HTMLStyle_get_listStylePosition,
2591 HTMLStyle_put_listStyleImage,
2592 HTMLStyle_get_listStyleImage,
2593 HTMLStyle_put_listStyle,
2594 HTMLStyle_get_listStyle,
2595 HTMLStyle_put_whiteSpace,
2596 HTMLStyle_get_whiteSpace,
2601 HTMLStyle_get_position,
2602 HTMLStyle_put_zIndex,
2603 HTMLStyle_get_zIndex,
2604 HTMLStyle_put_overflow,
2605 HTMLStyle_get_overflow,
2606 HTMLStyle_put_pageBreakBefore,
2607 HTMLStyle_get_pageBreakBefore,
2608 HTMLStyle_put_pageBreakAfter,
2609 HTMLStyle_get_pageBreakAfter,
2610 HTMLStyle_put_cssText,
2611 HTMLStyle_get_cssText,
2612 HTMLStyle_put_pixelTop,
2613 HTMLStyle_get_pixelTop,
2614 HTMLStyle_put_pixelLeft,
2615 HTMLStyle_get_pixelLeft,
2616 HTMLStyle_put_pixelWidth,
2617 HTMLStyle_get_pixelWidth,
2618 HTMLStyle_put_pixelHeight,
2619 HTMLStyle_get_pixelHeight,
2620 HTMLStyle_put_posTop,
2621 HTMLStyle_get_posTop,
2622 HTMLStyle_put_posLeft,
2623 HTMLStyle_get_posLeft,
2624 HTMLStyle_put_posWidth,
2625 HTMLStyle_get_posWidth,
2626 HTMLStyle_put_posHeight,
2627 HTMLStyle_get_posHeight,
2628 HTMLStyle_put_cursor,
2629 HTMLStyle_get_cursor,
2632 HTMLStyle_put_filter,
2633 HTMLStyle_get_filter,
2634 HTMLStyle_setAttribute,
2635 HTMLStyle_getAttribute,
2636 HTMLStyle_removeAttribute,
2640 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl = {
2642 HTMLStyle_get_dispid,
2646 static const tid_t HTMLStyle_iface_tids[] = {
2653 static dispex_static_data_t HTMLStyle_dispex = {
2654 &HTMLStyle_dispex_vtbl,
2657 HTMLStyle_iface_tids
2660 IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle)
2662 HTMLStyle *ret = heap_alloc_zero(sizeof(HTMLStyle));
2664 ret->lpHTMLStyleVtbl = &HTMLStyleVtbl;
2666 ret->nsstyle = nsstyle;
2667 HTMLStyle2_Init(ret);
2668 HTMLStyle3_Init(ret);
2670 nsIDOMCSSStyleDeclaration_AddRef(nsstyle);
2672 init_dispex(&ret->dispex, (IUnknown*)HTMLSTYLE(ret), &HTMLStyle_dispex);
2674 return HTMLSTYLE(ret);