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 attrMinHeight[] =
115 {'m','i','n','-','h','e','i','g','h','t',0};
116 static const WCHAR attrOverflow[] =
117 {'o','v','e','r','f','l','o','w',0};
118 static const WCHAR attrPaddingLeft[] =
119 {'p','a','d','d','i','n','g','-','l','e','f','t',0};
120 static const WCHAR attrPaddingTop[] =
121 {'p','a','d','d','i','n','g','-','t','o','p',0};
122 static const WCHAR attrPosition[] =
123 {'p','o','s','i','t','i','o','n',0};
124 static const WCHAR attrTextAlign[] =
125 {'t','e','x','t','-','a','l','i','g','n',0};
126 static const WCHAR attrTextDecoration[] =
127 {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
128 static const WCHAR attrTop[] =
130 static const WCHAR attrVerticalAlign[] =
131 {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
132 static const WCHAR attrVisibility[] =
133 {'v','i','s','i','b','i','l','i','t','y',0};
134 static const WCHAR attrWidth[] =
135 {'w','i','d','t','h',0};
136 static const WCHAR attrWordSpacing[] =
137 {'w','o','r','d','-','s','p','a','c','i','n','g',0};
138 static const WCHAR attrWordWrap[] =
139 {'w','o','r','d','-','w','r','a','p',0};
140 static const WCHAR attrZIndex[] =
141 {'z','-','i','n','d','e','x',0};
147 {attrBackground, DISPID_IHTMLSTYLE_BACKGROUND},
148 {attrBackgroundColor, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR},
149 {attrBackgroundImage, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE},
150 {attrBackgroundPositionX, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONX},
151 {attrBackgroundPositionY, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONY},
152 {attrBackgroundRepeat, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT},
153 {attrBorder, DISPID_IHTMLSTYLE_BORDER},
154 {attrBorderBottomColor, DISPID_IHTMLSTYLE_BORDERBOTTOMCOLOR},
155 {attrBorderBottomStyle, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE},
156 {attrBorderBottomWidth, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH},
157 {attrBorderColor, DISPID_IHTMLSTYLE_BORDERCOLOR},
158 {attrBorderLeft, DISPID_IHTMLSTYLE_BORDERLEFT},
159 {attrBorderLeftColor, DISPID_IHTMLSTYLE_BORDERLEFTCOLOR},
160 {attrBorderLeftStyle, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE},
161 {attrBorderLeftWidth, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH},
162 {attrBorderRightColor, DISPID_IHTMLSTYLE_BORDERRIGHTCOLOR},
163 {attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE},
164 {attrBorderRightWidth, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH},
165 {attrBorderStyle, DISPID_IHTMLSTYLE_BORDERSTYLE},
166 {attrBorderTopColor, DISPID_IHTMLSTYLE_BORDERTOPCOLOR},
167 {attrBorderTopStyle, DISPID_IHTMLSTYLE_BORDERTOPSTYLE},
168 {attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
169 {attrBorderWidth, DISPID_IHTMLSTYLE_BORDERWIDTH},
170 {attrColor, DISPID_IHTMLSTYLE_COLOR},
171 {attrCursor, DISPID_IHTMLSTYLE_CURSOR},
172 {attrDisplay, DISPID_IHTMLSTYLE_DISPLAY},
173 {attrFilter, DISPID_IHTMLSTYLE_FILTER},
174 {attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY},
175 {attrFontSize, DISPID_IHTMLSTYLE_FONTSIZE},
176 {attrFontStyle, DISPID_IHTMLSTYLE_FONTSTYLE},
177 {attrFontVariant, DISPID_IHTMLSTYLE_FONTVARIANT},
178 {attrFontWeight, DISPID_IHTMLSTYLE_FONTWEIGHT},
179 {attrHeight, DISPID_IHTMLSTYLE_HEIGHT},
180 {attrLeft, DISPID_IHTMLSTYLE_LEFT},
181 {attrLetterSpacing, DISPID_IHTMLSTYLE_LETTERSPACING},
182 {attrMargin, DISPID_IHTMLSTYLE_MARGIN},
183 {attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT},
184 {attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT},
185 {attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT},
186 {attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW},
187 {attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT},
188 {attrPaddingTop, DISPID_IHTMLSTYLE_PADDINGTOP},
189 {attrPosition, DISPID_IHTMLSTYLE2_POSITION},
190 {attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN},
191 {attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION},
192 {attrTop, DISPID_IHTMLSTYLE_TOP},
193 {attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN},
194 {attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY},
195 {attrWidth, DISPID_IHTMLSTYLE_WIDTH},
196 {attrWordSpacing, DISPID_IHTMLSTYLE_WORDSPACING},
197 {attrWordWrap, DISPID_IHTMLSTYLE3_WORDWRAP},
198 {attrZIndex, DISPID_IHTMLSTYLE_ZINDEX}
201 static const WCHAR valLineThrough[] =
202 {'l','i','n','e','-','t','h','r','o','u','g','h',0};
203 static const WCHAR valUnderline[] =
204 {'u','n','d','e','r','l','i','n','e',0};
205 static const WCHAR szNormal[] =
206 {'n','o','r','m','a','l',0};
207 static const WCHAR styleNone[] =
209 static const WCHAR valOverline[] =
210 {'o','v','e','r','l','i','n','e',0};
211 static const WCHAR valBlink[] =
212 {'b','l','i','n','k',0};
214 static const WCHAR px_formatW[] = {'%','d','p','x',0};
215 static const WCHAR emptyW[] = {0};
217 static LPWSTR fix_px_value(LPCWSTR val)
222 while(*ptr && isspaceW(*ptr))
227 while(*ptr && isdigitW(*ptr))
230 if(!*ptr || isspaceW(*ptr)) {
232 int len = strlenW(val)+1;
234 ret = heap_alloc((len+2)*sizeof(WCHAR));
235 memcpy(ret, val, (ptr-val)*sizeof(WCHAR));
241 TRACE("fixed %s -> %s\n", debugstr_w(val), debugstr_w(ret));
246 while(*ptr && !isspaceW(*ptr))
253 static LPWSTR fix_url_value(LPCWSTR val)
257 static const WCHAR urlW[] = {'u','r','l','('};
259 if(strncmpW(val, urlW, sizeof(urlW)/sizeof(WCHAR)) || !strchrW(val, '\\'))
262 ret = heap_strdupW(val);
264 for(ptr = ret; *ptr; ptr++) {
272 HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCWSTR value, DWORD flags)
274 nsAString str_name, str_value, str_empty;
278 static const PRUnichar wszEmpty[] = {0};
280 if(flags & ATTR_FIX_PX)
281 val = fix_px_value(value);
282 if(flags & ATTR_FIX_URL)
283 val = fix_url_value(value);
285 nsAString_Init(&str_name, style_tbl[sid].name);
286 nsAString_Init(&str_value, val ? val : value);
287 nsAString_Init(&str_empty, wszEmpty);
290 nsres = nsIDOMCSSStyleDeclaration_SetProperty(nsstyle, &str_name, &str_value, &str_empty);
292 ERR("SetProperty failed: %08x\n", nsres);
294 nsAString_Finish(&str_name);
295 nsAString_Finish(&str_value);
296 nsAString_Finish(&str_empty);
301 HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags)
303 switch(V_VT(value)) {
305 return set_nsstyle_attr(nsstyle, sid, emptyW, flags);
308 return set_nsstyle_attr(nsstyle, sid, V_BSTR(value), flags);
310 case VT_BSTR|VT_BYREF:
311 return set_nsstyle_attr(nsstyle, sid, *V_BSTRREF(value), flags);
315 static const WCHAR format[] = {'%','d',0};
317 wsprintfW(str, format, V_I4(value));
318 return set_nsstyle_attr(nsstyle, sid, str, flags);
321 FIXME("not implemented vt %d\n", V_VT(value));
329 static inline HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWORD flags)
331 return set_nsstyle_attr(This->nsstyle, sid, value, flags);
334 static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value)
339 nsAString_Init(&str_name, style_tbl[sid].name);
341 nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle, &str_name, value);
342 if(NS_FAILED(nsres)) {
343 ERR("SetProperty failed: %08x\n", nsres);
347 nsAString_Finish(&str_name);
352 HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p)
355 const PRUnichar *value;
357 nsAString_Init(&str_value, NULL);
359 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
361 nsAString_GetData(&str_value, &value);
362 *p = *value ? SysAllocString(value) : NULL;
364 nsAString_Finish(&str_value);
366 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p));
370 HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags)
373 const PRUnichar *value;
376 nsAString_Init(&str_value, NULL);
378 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
380 nsAString_GetData(&str_value, &value);
382 if(flags & ATTR_STR_TO_INT) {
383 const PRUnichar *ptr = value;
392 while(isdigitW(*ptr))
393 i = i*10 + (*ptr++ - '0');
397 V_I4(p) = neg ? -i : i;
406 str = SysAllocString(value);
408 return E_OUTOFMEMORY;
415 nsAString_Finish(&str_value);
417 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_variant(p));
421 static inline HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p)
423 return get_nsstyle_attr(This->nsstyle, sid, p);
426 static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p)
429 const PRUnichar *value;
431 nsAString_Init(&str_value, NULL);
433 get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
435 nsAString_GetData(&str_value, &value);
436 *p = strcmpW(value, exval) ? VARIANT_FALSE : VARIANT_TRUE;
437 nsAString_Finish(&str_value);
439 TRACE("%s -> %x\n", debugstr_w(style_tbl[sid].name), *p);
443 static inline HRESULT set_style_pos(HTMLStyle *This, styleid_t sid, float value)
446 WCHAR szFormat[] = {'%','.','0','f','p','x',0};
448 value = floor(value);
450 sprintfW(szValue, szFormat, value);
452 return set_style_attr(This, sid, szValue, 0);
455 static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p)
459 WCHAR pxW[] = {'p','x',0};
461 TRACE("%p %d %p\n", This, sid, p);
465 nsAString_Init(&str_value, NULL);
467 hres = get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
471 const PRUnichar *value;
473 nsAString_GetData(&str_value, &value);
476 *p = strtolW(value, &ptr, 10);
478 if(*ptr && strcmpW(ptr, pxW))
480 nsAString_Finish(&str_value);
481 FIXME("only px values are currently supported\n");
487 TRACE("ret %f\n", *p);
489 nsAString_Finish(&str_value);
494 static BOOL is_valid_border_style(BSTR v)
496 static const WCHAR styleDotted[] = {'d','o','t','t','e','d',0};
497 static const WCHAR styleDashed[] = {'d','a','s','h','e','d',0};
498 static const WCHAR styleSolid[] = {'s','o','l','i','d',0};
499 static const WCHAR styleDouble[] = {'d','o','u','b','l','e',0};
500 static const WCHAR styleGroove[] = {'g','r','o','o','v','e',0};
501 static const WCHAR styleRidge[] = {'r','i','d','g','e',0};
502 static const WCHAR styleInset[] = {'i','n','s','e','t',0};
503 static const WCHAR styleOutset[] = {'o','u','t','s','e','t',0};
505 TRACE("%s\n", debugstr_w(v));
507 if(!v || strcmpiW(v, styleNone) == 0 || strcmpiW(v, styleDotted) == 0 ||
508 strcmpiW(v, styleDashed) == 0 || strcmpiW(v, styleSolid) == 0 ||
509 strcmpiW(v, styleDouble) == 0 || strcmpiW(v, styleGroove) == 0 ||
510 strcmpiW(v, styleRidge) == 0 || strcmpiW(v, styleInset) == 0 ||
511 strcmpiW(v, styleOutset) == 0 )
519 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
521 static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, void **ppv)
523 HTMLStyle *This = HTMLSTYLE_THIS(iface);
527 if(IsEqualGUID(&IID_IUnknown, riid)) {
528 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
529 *ppv = HTMLSTYLE(This);
530 }else if(IsEqualGUID(&IID_IHTMLStyle, riid)) {
531 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This, ppv);
532 *ppv = HTMLSTYLE(This);
533 }else if(IsEqualGUID(&IID_IHTMLStyle2, riid)) {
534 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This, ppv);
535 *ppv = HTMLSTYLE2(This);
536 }else if(IsEqualGUID(&IID_IHTMLStyle3, riid)) {
537 TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This, ppv);
538 *ppv = HTMLSTYLE3(This);
539 }else if(IsEqualGUID(&IID_IHTMLStyle4, riid)) {
540 TRACE("(%p)->(IID_IHTMLStyle4 %p)\n", This, ppv);
541 *ppv = HTMLSTYLE4(This);
542 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
543 return *ppv ? S_OK : E_NOINTERFACE;
547 IUnknown_AddRef((IUnknown*)*ppv);
551 WARN("unsupported %s\n", debugstr_guid(riid));
552 return E_NOINTERFACE;
555 static ULONG WINAPI HTMLStyle_AddRef(IHTMLStyle *iface)
557 HTMLStyle *This = HTMLSTYLE_THIS(iface);
558 LONG ref = InterlockedIncrement(&This->ref);
560 TRACE("(%p) ref=%d\n", This, ref);
565 static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
567 HTMLStyle *This = HTMLSTYLE_THIS(iface);
568 LONG ref = InterlockedDecrement(&This->ref);
570 TRACE("(%p) ref=%d\n", This, ref);
574 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
575 release_dispex(&This->dispex);
582 static HRESULT WINAPI HTMLStyle_GetTypeInfoCount(IHTMLStyle *iface, UINT *pctinfo)
584 HTMLStyle *This = HTMLSTYLE_THIS(iface);
585 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
588 static HRESULT WINAPI HTMLStyle_GetTypeInfo(IHTMLStyle *iface, UINT iTInfo,
589 LCID lcid, ITypeInfo **ppTInfo)
591 HTMLStyle *This = HTMLSTYLE_THIS(iface);
592 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
595 static HRESULT WINAPI HTMLStyle_GetIDsOfNames(IHTMLStyle *iface, REFIID riid,
596 LPOLESTR *rgszNames, UINT cNames,
597 LCID lcid, DISPID *rgDispId)
599 HTMLStyle *This = HTMLSTYLE_THIS(iface);
600 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
603 static HRESULT WINAPI HTMLStyle_Invoke(IHTMLStyle *iface, DISPID dispIdMember,
604 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
605 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
607 HTMLStyle *This = HTMLSTYLE_THIS(iface);
608 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
609 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
612 static HRESULT WINAPI HTMLStyle_put_fontFamily(IHTMLStyle *iface, BSTR v)
614 HTMLStyle *This = HTMLSTYLE_THIS(iface);
616 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
618 return set_style_attr(This, STYLEID_FONT_FAMILY, v, 0);
621 static HRESULT WINAPI HTMLStyle_get_fontFamily(IHTMLStyle *iface, BSTR *p)
623 HTMLStyle *This = HTMLSTYLE_THIS(iface);
625 TRACE("(%p)->(%p)\n", This, p);
627 return get_style_attr(This, STYLEID_FONT_FAMILY, p);
630 static HRESULT WINAPI HTMLStyle_put_fontStyle(IHTMLStyle *iface, BSTR v)
632 HTMLStyle *This = HTMLSTYLE_THIS(iface);
633 static const WCHAR szItalic[] = {'i','t','a','l','i','c',0};
634 static const WCHAR szOblique[] = {'o','b','l','i','q','u','e',0};
636 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
638 /* fontStyle can only be one of the follow values. */
639 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(szItalic, v) == 0 ||
640 strcmpiW(szOblique, v) == 0)
642 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, v, 0);
648 static HRESULT WINAPI HTMLStyle_get_fontStyle(IHTMLStyle *iface, BSTR *p)
650 HTMLStyle *This = HTMLSTYLE_THIS(iface);
652 TRACE("(%p)->(%p)\n", This, p);
654 return get_style_attr(This, STYLEID_FONT_STYLE, p);
657 static HRESULT WINAPI HTMLStyle_put_fontVariant(IHTMLStyle *iface, BSTR v)
659 HTMLStyle *This = HTMLSTYLE_THIS(iface);
660 static const WCHAR szCaps[] = {'s','m','a','l','l','-','c','a','p','s',0};
662 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
664 /* fontVariant can only be one of the follow values. */
665 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(szCaps, v) == 0)
667 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, v, 0);
673 static HRESULT WINAPI HTMLStyle_get_fontVariant(IHTMLStyle *iface, BSTR *p)
675 HTMLStyle *This = HTMLSTYLE_THIS(iface);
676 TRACE("(%p)->(%p)\n", This, p);
681 return get_style_attr(This, STYLEID_FONT_VARIANT, p);
684 static HRESULT WINAPI HTMLStyle_put_fontWeight(IHTMLStyle *iface, BSTR v)
686 HTMLStyle *This = HTMLSTYLE_THIS(iface);
687 static const WCHAR styleBold[] = {'b','o','l','d',0};
688 static const WCHAR styleBolder[] = {'b','o','l','d','e','r',0};
689 static const WCHAR styleLighter[] = {'l','i','g','h','t','e','r',0};
690 static const WCHAR style100[] = {'1','0','0',0};
691 static const WCHAR style200[] = {'2','0','0',0};
692 static const WCHAR style300[] = {'3','0','0',0};
693 static const WCHAR style400[] = {'4','0','0',0};
694 static const WCHAR style500[] = {'5','0','0',0};
695 static const WCHAR style600[] = {'6','0','0',0};
696 static const WCHAR style700[] = {'7','0','0',0};
697 static const WCHAR style800[] = {'8','0','0',0};
698 static const WCHAR style900[] = {'9','0','0',0};
700 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
702 /* fontWeight can only be one of the following */
703 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(styleBold, v) == 0 ||
704 strcmpiW(styleBolder, v) == 0 || strcmpiW(styleLighter, v) == 0 ||
705 strcmpiW(style100, v) == 0 || strcmpiW(style200, v) == 0 ||
706 strcmpiW(style300, v) == 0 || strcmpiW(style400, v) == 0 ||
707 strcmpiW(style500, v) == 0 || strcmpiW(style600, v) == 0 ||
708 strcmpiW(style700, v) == 0 || strcmpiW(style800, v) == 0 ||
709 strcmpiW(style900, v) == 0
712 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_WEIGHT, v, 0);
718 static HRESULT WINAPI HTMLStyle_get_fontWeight(IHTMLStyle *iface, BSTR *p)
720 HTMLStyle *This = HTMLSTYLE_THIS(iface);
722 TRACE("(%p)->(%p)\n", This, p);
724 return get_style_attr(This, STYLEID_FONT_WEIGHT, p);
727 static HRESULT WINAPI HTMLStyle_put_fontSize(IHTMLStyle *iface, VARIANT v)
729 HTMLStyle *This = HTMLSTYLE_THIS(iface);
731 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
735 return set_style_attr(This, STYLEID_FONT_SIZE, V_BSTR(&v), 0);
737 FIXME("not supported vt %d\n", V_VT(&v));
743 static HRESULT WINAPI HTMLStyle_get_fontSize(IHTMLStyle *iface, VARIANT *p)
745 HTMLStyle *This = HTMLSTYLE_THIS(iface);
747 TRACE("(%p)->(%p)\n", This, p);
750 return get_style_attr(This, STYLEID_FONT_SIZE, &V_BSTR(p));
753 static HRESULT WINAPI HTMLStyle_put_font(IHTMLStyle *iface, BSTR v)
755 HTMLStyle *This = HTMLSTYLE_THIS(iface);
756 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
760 static HRESULT WINAPI HTMLStyle_get_font(IHTMLStyle *iface, BSTR *p)
762 HTMLStyle *This = HTMLSTYLE_THIS(iface);
763 FIXME("(%p)->(%p)\n", This, p);
767 static HRESULT WINAPI HTMLStyle_put_color(IHTMLStyle *iface, VARIANT v)
769 HTMLStyle *This = HTMLSTYLE_THIS(iface);
771 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
775 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
776 return set_style_attr(This, STYLEID_COLOR, V_BSTR(&v), 0);
779 FIXME("unsupported vt=%d\n", V_VT(&v));
785 static HRESULT WINAPI HTMLStyle_get_color(IHTMLStyle *iface, VARIANT *p)
787 HTMLStyle *This = HTMLSTYLE_THIS(iface);
789 TRACE("(%p)->(%p)\n", This, p);
792 return get_style_attr(This, STYLEID_COLOR, &V_BSTR(p));
795 static HRESULT WINAPI HTMLStyle_put_background(IHTMLStyle *iface, BSTR v)
797 HTMLStyle *This = HTMLSTYLE_THIS(iface);
799 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
801 return set_style_attr(This, STYLEID_BACKGROUND, v, 0);
804 static HRESULT WINAPI HTMLStyle_get_background(IHTMLStyle *iface, BSTR *p)
806 HTMLStyle *This = HTMLSTYLE_THIS(iface);
808 TRACE("(%p)->(%p)\n", This, p);
810 return get_style_attr(This, STYLEID_BACKGROUND, p);
813 static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v)
815 HTMLStyle *This = HTMLSTYLE_THIS(iface);
817 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
821 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, V_BSTR(&v), 0);
824 static const WCHAR format[] = {'#','%','0','6','x',0};
826 wsprintfW(value, format, V_I4(&v));
827 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, value, 0);
830 FIXME("unsupported vt %d\n", V_VT(&v));
836 static HRESULT WINAPI HTMLStyle_get_backgroundColor(IHTMLStyle *iface, VARIANT *p)
838 HTMLStyle *This = HTMLSTYLE_THIS(iface);
839 TRACE("(%p)->(%p)\n", This, p);
842 return get_style_attr(This, STYLEID_BACKGROUND_COLOR, &V_BSTR(p));
845 static HRESULT WINAPI HTMLStyle_put_backgroundImage(IHTMLStyle *iface, BSTR v)
847 HTMLStyle *This = HTMLSTYLE_THIS(iface);
849 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
851 return set_style_attr(This, STYLEID_BACKGROUND_IMAGE, v, ATTR_FIX_URL);
854 static HRESULT WINAPI HTMLStyle_get_backgroundImage(IHTMLStyle *iface, BSTR *p)
856 HTMLStyle *This = HTMLSTYLE_THIS(iface);
858 TRACE("(%p)->(%p)\n", This, p);
860 return get_style_attr(This, STYLEID_BACKGROUND_IMAGE, p);
863 static HRESULT WINAPI HTMLStyle_put_backgroundRepeat(IHTMLStyle *iface, BSTR v)
865 HTMLStyle *This = HTMLSTYLE_THIS(iface);
866 static const WCHAR styleRepeat[] = {'r','e','p','e','a','t',0};
867 static const WCHAR styleNoRepeat[] = {'n','o','-','r','e','p','e','a','t',0};
868 static const WCHAR styleRepeatX[] = {'r','e','p','e','a','t','-','x',0};
869 static const WCHAR styleRepeatY[] = {'r','e','p','e','a','t','-','y',0};
871 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
873 /* fontWeight can only be one of the following */
874 if(!v || strcmpiW(styleRepeat, v) == 0 || strcmpiW(styleNoRepeat, v) == 0 ||
875 strcmpiW(styleRepeatX, v) == 0 || strcmpiW(styleRepeatY, v) == 0 )
877 return set_style_attr(This, STYLEID_BACKGROUND_REPEAT , v, 0);
883 static HRESULT WINAPI HTMLStyle_get_backgroundRepeat(IHTMLStyle *iface, BSTR *p)
885 HTMLStyle *This = HTMLSTYLE_THIS(iface);
887 TRACE("(%p)->(%p)\n", This, p);
889 return get_style_attr(This, STYLEID_BACKGROUND_REPEAT, p);
892 static HRESULT WINAPI HTMLStyle_put_backgroundAttachment(IHTMLStyle *iface, BSTR v)
894 HTMLStyle *This = HTMLSTYLE_THIS(iface);
895 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
899 static HRESULT WINAPI HTMLStyle_get_backgroundAttachment(IHTMLStyle *iface, BSTR *p)
901 HTMLStyle *This = HTMLSTYLE_THIS(iface);
902 FIXME("(%p)->(%p)\n", This, p);
906 static HRESULT WINAPI HTMLStyle_put_backgroundPosition(IHTMLStyle *iface, BSTR v)
908 HTMLStyle *This = HTMLSTYLE_THIS(iface);
909 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
913 static HRESULT WINAPI HTMLStyle_get_backgroundPosition(IHTMLStyle *iface, BSTR *p)
915 HTMLStyle *This = HTMLSTYLE_THIS(iface);
916 FIXME("(%p)->(%p)\n", This, p);
920 static HRESULT WINAPI HTMLStyle_put_backgroundPositionX(IHTMLStyle *iface, VARIANT v)
922 HTMLStyle *This = HTMLSTYLE_THIS(iface);
923 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
924 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_X, &v, 0);
927 static HRESULT WINAPI HTMLStyle_get_backgroundPositionX(IHTMLStyle *iface, VARIANT *p)
929 HTMLStyle *This = HTMLSTYLE_THIS(iface);
930 TRACE("(%p)->(%p)\n", This, p);
931 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_X, p, 0);
934 static HRESULT WINAPI HTMLStyle_put_backgroundPositionY(IHTMLStyle *iface, VARIANT v)
936 HTMLStyle *This = HTMLSTYLE_THIS(iface);
937 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
938 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_Y, &v, 0);
941 static HRESULT WINAPI HTMLStyle_get_backgroundPositionY(IHTMLStyle *iface, VARIANT *p)
943 HTMLStyle *This = HTMLSTYLE_THIS(iface);
944 TRACE("(%p)->(%p)\n", This, p);
945 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_Y, p, 0);
948 static HRESULT WINAPI HTMLStyle_put_wordSpacing(IHTMLStyle *iface, VARIANT v)
950 HTMLStyle *This = HTMLSTYLE_THIS(iface);
951 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
952 return set_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, &v, 0);
955 static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p)
957 HTMLStyle *This = HTMLSTYLE_THIS(iface);
958 TRACE("(%p)->(%p)\n", This, p);
959 return get_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, p, 0);
962 static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
964 HTMLStyle *This = HTMLSTYLE_THIS(iface);
965 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
966 return set_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, &v, 0);
969 static HRESULT WINAPI HTMLStyle_get_letterSpacing(IHTMLStyle *iface, VARIANT *p)
971 HTMLStyle *This = HTMLSTYLE_THIS(iface);
972 TRACE("(%p)->(%p)\n", This, p);
973 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
976 static HRESULT WINAPI HTMLStyle_put_textDecoration(IHTMLStyle *iface, BSTR v)
978 HTMLStyle *This = HTMLSTYLE_THIS(iface);
980 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
982 /* textDecoration can only be one of the following */
983 if(!v || strcmpiW(styleNone, v) == 0 || strcmpiW(valUnderline, v) == 0 ||
984 strcmpiW(valOverline, v) == 0 || strcmpiW(valLineThrough, v) == 0 ||
985 strcmpiW(valBlink, v) == 0)
987 return set_style_attr(This, STYLEID_TEXT_DECORATION , v, 0);
993 static HRESULT WINAPI HTMLStyle_get_textDecoration(IHTMLStyle *iface, BSTR *p)
995 HTMLStyle *This = HTMLSTYLE_THIS(iface);
997 TRACE("(%p)->(%p)\n", This, p);
999 return get_style_attr(This, STYLEID_TEXT_DECORATION, p);
1002 static HRESULT WINAPI HTMLStyle_put_textDecorationNone(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 ? styleNone : emptyW, 0);
1011 static HRESULT WINAPI HTMLStyle_get_textDecorationNone(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, styleNone, p);
1020 static HRESULT WINAPI HTMLStyle_put_textDecorationUnderline(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 ? valUnderline : emptyW, 0);
1029 static HRESULT WINAPI HTMLStyle_get_textDecorationUnderline(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, valUnderline, p);
1038 static HRESULT WINAPI HTMLStyle_put_textDecorationOverline(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 ? valOverline : emptyW, 0);
1047 static HRESULT WINAPI HTMLStyle_get_textDecorationOverline(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, valOverline, p);
1056 static HRESULT WINAPI HTMLStyle_put_textDecorationLineThrough(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 ? valLineThrough : emptyW, 0);
1065 static HRESULT WINAPI HTMLStyle_get_textDecorationLineThrough(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, valLineThrough, p);
1074 static HRESULT WINAPI HTMLStyle_put_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL v)
1076 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1078 TRACE("(%p)->(%x)\n", This, v);
1080 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valBlink : emptyW, 0);
1083 static HRESULT WINAPI HTMLStyle_get_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL *p)
1085 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1087 TRACE("(%p)->(%p)\n", This, p);
1089 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valBlink, p);
1092 static HRESULT WINAPI HTMLStyle_put_verticalAlign(IHTMLStyle *iface, VARIANT v)
1094 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1096 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1100 return set_style_attr(This, STYLEID_VERTICAL_ALIGN, V_BSTR(&v), 0);
1102 FIXME("not implemented vt %d\n", V_VT(&v));
1109 static HRESULT WINAPI HTMLStyle_get_verticalAlign(IHTMLStyle *iface, VARIANT *p)
1111 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1115 TRACE("(%p)->(%p)\n", This, p);
1117 hres = get_style_attr(This, STYLEID_VERTICAL_ALIGN, &ret);
1126 static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v)
1128 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1129 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1133 static HRESULT WINAPI HTMLStyle_get_textTransform(IHTMLStyle *iface, BSTR *p)
1135 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1136 FIXME("(%p)->(%p)\n", This, p);
1140 static HRESULT WINAPI HTMLStyle_put_textAlign(IHTMLStyle *iface, BSTR v)
1142 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1144 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1146 return set_style_attr(This, STYLEID_TEXT_ALIGN, v, 0);
1149 static HRESULT WINAPI HTMLStyle_get_textAlign(IHTMLStyle *iface, BSTR *p)
1151 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1153 TRACE("(%p)->(%p)\n", This, p);
1155 return get_style_attr(This, STYLEID_TEXT_ALIGN, p);
1158 static HRESULT WINAPI HTMLStyle_put_textIndent(IHTMLStyle *iface, VARIANT v)
1160 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1161 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1165 static HRESULT WINAPI HTMLStyle_get_textIndent(IHTMLStyle *iface, VARIANT *p)
1167 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1168 FIXME("(%p)->(%p)\n", This, p);
1172 static HRESULT WINAPI HTMLStyle_put_lineHeight(IHTMLStyle *iface, VARIANT v)
1174 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1175 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1179 static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
1181 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1182 FIXME("(%p)->(%p)\n", This, p);
1186 static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
1188 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1189 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1193 static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
1195 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1196 FIXME("(%p)->(%p)\n", This, p);
1200 static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
1202 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1204 TRACE("(%p)->(v(%d))\n", This, V_VT(&v));
1208 return set_style_attr(This, STYLEID_MARGIN_RIGHT, emptyW, 0);
1212 wsprintfW(buf, px_formatW, V_I4(&v));
1213 return set_style_attr(This, STYLEID_MARGIN_RIGHT, buf, 0);
1216 return set_style_attr(This, STYLEID_MARGIN_RIGHT, V_BSTR(&v), 0);
1218 FIXME("Unsupported vt=%d\n", V_VT(&v));
1224 static HRESULT WINAPI HTMLStyle_get_marginRight(IHTMLStyle *iface, VARIANT *p)
1226 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1227 TRACE("(%p)->(%p)\n", This, p);
1228 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
1231 static HRESULT WINAPI HTMLStyle_put_marginBottom(IHTMLStyle *iface, VARIANT v)
1233 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1234 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1238 static HRESULT WINAPI HTMLStyle_get_marginBottom(IHTMLStyle *iface, VARIANT *p)
1240 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1241 FIXME("(%p)->(%p)\n", This, p);
1245 static HRESULT WINAPI HTMLStyle_put_marginLeft(IHTMLStyle *iface, VARIANT v)
1247 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1251 TRACE("(%p)->(NULL)\n", This);
1252 return set_style_attr(This, STYLEID_MARGIN_LEFT, emptyW, 0);
1256 TRACE("(%p)->(%d)\n", This, V_I4(&v));
1258 wsprintfW(buf, px_formatW, V_I4(&v));
1259 return set_style_attr(This, STYLEID_MARGIN_LEFT, buf, 0);
1262 TRACE("(%p)->(%s)\n", This, debugstr_w(V_BSTR(&v)));
1263 return set_style_attr(This, STYLEID_MARGIN_LEFT, V_BSTR(&v), 0);
1265 FIXME("Unsupported vt=%d\n", V_VT(&v));
1271 static HRESULT WINAPI HTMLStyle_put_margin(IHTMLStyle *iface, BSTR v)
1273 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1275 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1277 return set_style_attr(This, STYLEID_MARGIN, v, 0);
1280 static HRESULT WINAPI HTMLStyle_get_margin(IHTMLStyle *iface, BSTR *p)
1282 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1284 TRACE("(%p)->(%p)\n", This, p);
1286 return get_style_attr(This, STYLEID_MARGIN, p);
1289 static HRESULT WINAPI HTMLStyle_get_marginLeft(IHTMLStyle *iface, VARIANT *p)
1291 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1292 TRACE("(%p)->(%p)\n", This, p);
1293 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
1296 static HRESULT WINAPI HTMLStyle_put_paddingTop(IHTMLStyle *iface, VARIANT v)
1298 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1299 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1303 static HRESULT WINAPI HTMLStyle_get_paddingTop(IHTMLStyle *iface, VARIANT *p)
1305 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1306 FIXME("(%p)->(%p)\n", This, p);
1310 static HRESULT WINAPI HTMLStyle_put_paddingRight(IHTMLStyle *iface, VARIANT v)
1312 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1313 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1317 static HRESULT WINAPI HTMLStyle_get_paddingRight(IHTMLStyle *iface, VARIANT *p)
1319 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1320 FIXME("(%p)->(%p)\n", This, p);
1324 static HRESULT WINAPI HTMLStyle_put_paddingBottom(IHTMLStyle *iface, VARIANT v)
1326 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1327 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1331 static HRESULT WINAPI HTMLStyle_get_paddingBottom(IHTMLStyle *iface, VARIANT *p)
1333 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1334 FIXME("(%p)->(%p)\n", This, p);
1338 static HRESULT WINAPI HTMLStyle_put_paddingLeft(IHTMLStyle *iface, VARIANT v)
1340 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1342 TRACE("(%p)->(vt=%d)\n", This, V_VT(&v));
1348 wsprintfW(buf, px_formatW, V_I4(&v));
1349 return set_style_attr(This, STYLEID_PADDING_LEFT, buf, 0);
1352 return set_style_attr(This, STYLEID_PADDING_LEFT, V_BSTR(&v), 0);
1354 FIXME("unsupported vt=%d\n", V_VT(&v));
1360 static HRESULT WINAPI HTMLStyle_get_paddingLeft(IHTMLStyle *iface, VARIANT *p)
1362 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1366 TRACE("(%p)->(%p)\n", This, p);
1368 hres = get_style_attr(This, STYLEID_PADDING_LEFT, &ret);
1377 static HRESULT WINAPI HTMLStyle_put_padding(IHTMLStyle *iface, BSTR v)
1379 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1380 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1384 static HRESULT WINAPI HTMLStyle_get_padding(IHTMLStyle *iface, BSTR *p)
1386 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1387 FIXME("(%p)->(%p)\n", This, p);
1391 static HRESULT WINAPI HTMLStyle_put_border(IHTMLStyle *iface, BSTR v)
1393 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1395 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1397 return set_style_attr(This, STYLEID_BORDER, v, 0);
1400 static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p)
1402 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1404 TRACE("(%p)->(%p)\n", This, p);
1406 return get_style_attr(This, STYLEID_BORDER, p);
1409 static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
1411 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1412 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1416 static HRESULT WINAPI HTMLStyle_get_borderTop(IHTMLStyle *iface, BSTR *p)
1418 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1419 FIXME("(%p)->(%p)\n", This, p);
1423 static HRESULT WINAPI HTMLStyle_put_borderRight(IHTMLStyle *iface, BSTR v)
1425 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1426 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1430 static HRESULT WINAPI HTMLStyle_get_borderRight(IHTMLStyle *iface, BSTR *p)
1432 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1433 FIXME("(%p)->(%p)\n", This, p);
1437 static HRESULT WINAPI HTMLStyle_put_borderBottom(IHTMLStyle *iface, BSTR v)
1439 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1440 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1444 static HRESULT WINAPI HTMLStyle_get_borderBottom(IHTMLStyle *iface, BSTR *p)
1446 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1447 FIXME("(%p)->(%p)\n", This, p);
1451 static HRESULT WINAPI HTMLStyle_put_borderLeft(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_LEFT, v, ATTR_FIX_PX);
1460 static HRESULT WINAPI HTMLStyle_get_borderLeft(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_LEFT, p);
1469 static HRESULT WINAPI HTMLStyle_put_borderColor(IHTMLStyle *iface, BSTR v)
1471 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1473 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1475 return set_style_attr(This, STYLEID_BORDER_COLOR, v, 0);
1478 static HRESULT WINAPI HTMLStyle_get_borderColor(IHTMLStyle *iface, BSTR *p)
1480 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1482 TRACE("(%p)->(%p)\n", This, p);
1484 return get_style_attr(This, STYLEID_BORDER_COLOR, p);
1487 static HRESULT WINAPI HTMLStyle_put_borderTopColor(IHTMLStyle *iface, VARIANT v)
1489 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1490 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1494 static HRESULT WINAPI HTMLStyle_get_borderTopColor(IHTMLStyle *iface, VARIANT *p)
1496 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1497 FIXME("(%p)->(%p)\n", This, p);
1501 static HRESULT WINAPI HTMLStyle_put_borderRightColor(IHTMLStyle *iface, VARIANT v)
1503 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1504 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1508 static HRESULT WINAPI HTMLStyle_get_borderRightColor(IHTMLStyle *iface, VARIANT *p)
1510 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1511 FIXME("(%p)->(%p)\n", This, p);
1515 static HRESULT WINAPI HTMLStyle_put_borderBottomColor(IHTMLStyle *iface, VARIANT v)
1517 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1518 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1522 static HRESULT WINAPI HTMLStyle_get_borderBottomColor(IHTMLStyle *iface, VARIANT *p)
1524 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1525 FIXME("(%p)->(%p)\n", This, p);
1529 static HRESULT WINAPI HTMLStyle_put_borderLeftColor(IHTMLStyle *iface, VARIANT v)
1531 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1532 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1536 static HRESULT WINAPI HTMLStyle_get_borderLeftColor(IHTMLStyle *iface, VARIANT *p)
1538 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1539 FIXME("(%p)->(%p)\n", This, p);
1543 static HRESULT WINAPI HTMLStyle_put_borderWidth(IHTMLStyle *iface, BSTR v)
1545 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1546 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1547 return set_style_attr(This, STYLEID_BORDER_WIDTH, v, ATTR_FIX_PX);
1550 static HRESULT WINAPI HTMLStyle_get_borderWidth(IHTMLStyle *iface, BSTR *p)
1552 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1553 TRACE("(%p)->(%p)\n", This, p);
1554 return get_style_attr(This, STYLEID_BORDER_WIDTH, p);
1557 static HRESULT WINAPI HTMLStyle_put_borderTopWidth(IHTMLStyle *iface, VARIANT v)
1559 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1560 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1561 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, &v, 0);
1564 static HRESULT WINAPI HTMLStyle_get_borderTopWidth(IHTMLStyle *iface, VARIANT *p)
1566 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1568 TRACE("(%p)->(%p)\n", This, p);
1570 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
1573 static HRESULT WINAPI HTMLStyle_put_borderRightWidth(IHTMLStyle *iface, VARIANT v)
1575 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1576 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1577 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, &v, 0);
1580 static HRESULT WINAPI HTMLStyle_get_borderRightWidth(IHTMLStyle *iface, VARIANT *p)
1582 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1583 TRACE("(%p)->(%p)\n", This, p);
1584 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
1587 static HRESULT WINAPI HTMLStyle_put_borderBottomWidth(IHTMLStyle *iface, VARIANT v)
1589 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1591 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1592 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, &v, 0);
1595 static HRESULT WINAPI HTMLStyle_get_borderBottomWidth(IHTMLStyle *iface, VARIANT *p)
1597 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1598 TRACE("(%p)->(%p)\n", This, p);
1599 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
1602 static HRESULT WINAPI HTMLStyle_put_borderLeftWidth(IHTMLStyle *iface, VARIANT v)
1604 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1605 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1606 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, &v, 0);
1609 static HRESULT WINAPI HTMLStyle_get_borderLeftWidth(IHTMLStyle *iface, VARIANT *p)
1611 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1612 TRACE("(%p)->(%p)\n", This, p);
1613 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
1616 static HRESULT WINAPI HTMLStyle_put_borderStyle(IHTMLStyle *iface, BSTR v)
1618 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1619 static const WCHAR styleWindowInset[] = {'w','i','n','d','o','w','-','i','n','s','e','t',0};
1620 HRESULT hres = S_OK;
1625 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1627 while(v[i] && hres == S_OK)
1629 if(v[i] == (WCHAR)' ')
1631 pstyle = SysAllocStringLen(&v[last], (i-last));
1632 if( !(is_valid_border_style(pstyle) || strcmpiW(styleWindowInset, pstyle) == 0))
1634 TRACE("1. Invalid style (%s)\n", debugstr_w(pstyle));
1635 hres = E_INVALIDARG;
1637 SysFreeString(pstyle);
1645 pstyle = SysAllocStringLen(&v[last], i-last);
1646 if( !(is_valid_border_style(pstyle) || strcmpiW(styleWindowInset, pstyle) == 0))
1648 TRACE("2. Invalid style (%s)\n", debugstr_w(pstyle));
1649 hres = E_INVALIDARG;
1651 SysFreeString(pstyle);
1655 hres = set_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, v, 0);
1660 static HRESULT WINAPI HTMLStyle_get_borderStyle(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_STYLE, p);
1667 static HRESULT WINAPI HTMLStyle_put_borderTopStyle(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_TOP_STYLE, v, 0);
1678 static HRESULT WINAPI HTMLStyle_get_borderTopStyle(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_TOP_STYLE, p);
1685 static HRESULT WINAPI HTMLStyle_put_borderRightStyle(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_RIGHT_STYLE, v, 0);
1696 static HRESULT WINAPI HTMLStyle_get_borderRightStyle(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_RIGHT_STYLE, p);
1703 static HRESULT WINAPI HTMLStyle_put_borderBottomStyle(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_BOTTOM_STYLE, v, 0);
1714 static HRESULT WINAPI HTMLStyle_get_borderBottomStyle(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_BOTTOM_STYLE, p);
1721 static HRESULT WINAPI HTMLStyle_put_borderLeftStyle(IHTMLStyle *iface, BSTR v)
1723 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1724 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1726 if(!is_valid_border_style(v))
1727 return E_INVALIDARG;
1729 return set_style_attr(This, STYLEID_BORDER_LEFT_STYLE, v, 0);
1732 static HRESULT WINAPI HTMLStyle_get_borderLeftStyle(IHTMLStyle *iface, BSTR *p)
1734 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1735 TRACE("(%p)->(%p)\n", This, p);
1736 return get_style_attr(This, STYLEID_BORDER_LEFT_STYLE, p);
1739 static HRESULT WINAPI HTMLStyle_put_width(IHTMLStyle *iface, VARIANT v)
1741 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1743 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1747 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
1748 return set_style_attr(This, STYLEID_WIDTH, V_BSTR(&v), 0);
1750 FIXME("unsupported vt %d\n", V_VT(&v));
1756 static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p)
1758 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1760 TRACE("(%p)->(%p)\n", This, p);
1763 return get_style_attr(This, STYLEID_WIDTH, &V_BSTR(p));
1766 static HRESULT WINAPI HTMLStyle_put_height(IHTMLStyle *iface, VARIANT v)
1768 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1770 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1774 return set_style_attr(This, STYLEID_HEIGHT, V_BSTR(&v), 0);
1776 FIXME("unimplemented vt %d\n", V_VT(&v));
1783 static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p)
1785 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1789 TRACE("(%p)->(%p)\n", This, p);
1791 hres = get_style_attr(This, STYLEID_HEIGHT, &ret);
1800 static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v)
1802 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1803 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1807 static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p)
1809 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1810 FIXME("(%p)->(%p)\n", This, p);
1814 static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v)
1816 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1817 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1821 static HRESULT WINAPI HTMLStyle_get_clear(IHTMLStyle *iface, BSTR *p)
1823 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1824 FIXME("(%p)->(%p)\n", This, p);
1828 static HRESULT WINAPI HTMLStyle_put_display(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_DISPLAY, v, 0);
1837 static HRESULT WINAPI HTMLStyle_get_display(IHTMLStyle *iface, BSTR *p)
1839 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1841 TRACE("(%p)->(%p)\n", This, p);
1843 return get_style_attr(This, STYLEID_DISPLAY, p);
1846 static HRESULT WINAPI HTMLStyle_put_visibility(IHTMLStyle *iface, BSTR v)
1848 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1850 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1852 return set_style_attr(This, STYLEID_VISIBILITY, v, 0);
1855 static HRESULT WINAPI HTMLStyle_get_visibility(IHTMLStyle *iface, BSTR *p)
1857 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1859 TRACE("(%p)->(%p)\n", This, p);
1861 return get_style_attr(This, STYLEID_VISIBILITY, p);
1864 static HRESULT WINAPI HTMLStyle_put_listStyleType(IHTMLStyle *iface, BSTR v)
1866 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1867 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1871 static HRESULT WINAPI HTMLStyle_get_listStyleType(IHTMLStyle *iface, BSTR *p)
1873 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1874 FIXME("(%p)->(%p)\n", This, p);
1878 static HRESULT WINAPI HTMLStyle_put_listStylePosition(IHTMLStyle *iface, BSTR v)
1880 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1881 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1885 static HRESULT WINAPI HTMLStyle_get_listStylePosition(IHTMLStyle *iface, BSTR *p)
1887 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1888 FIXME("(%p)->(%p)\n", This, p);
1892 static HRESULT WINAPI HTMLStyle_put_listStyleImage(IHTMLStyle *iface, BSTR v)
1894 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1895 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1899 static HRESULT WINAPI HTMLStyle_get_listStyleImage(IHTMLStyle *iface, BSTR *p)
1901 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1902 FIXME("(%p)->(%p)\n", This, p);
1906 static HRESULT WINAPI HTMLStyle_put_listStyle(IHTMLStyle *iface, BSTR v)
1908 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1909 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1913 static HRESULT WINAPI HTMLStyle_get_listStyle(IHTMLStyle *iface, BSTR *p)
1915 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1916 FIXME("(%p)->(%p)\n", This, p);
1920 static HRESULT WINAPI HTMLStyle_put_whiteSpace(IHTMLStyle *iface, BSTR v)
1922 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1923 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1927 static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p)
1929 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1930 FIXME("(%p)->(%p)\n", This, p);
1934 static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v)
1936 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1938 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1940 return set_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, &v, 0);
1943 static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p)
1945 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1949 TRACE("(%p)->(%p)\n", This, p);
1951 hres = get_style_attr(This, STYLEID_TOP, &ret);
1960 static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v)
1962 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1964 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1966 return set_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, &v, 0);
1969 static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p)
1971 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1975 TRACE("(%p)->(%p)\n", This, p);
1977 hres = get_style_attr(This, STYLEID_LEFT, &ret);
1986 static HRESULT WINAPI HTMLStyle_get_position(IHTMLStyle *iface, BSTR *p)
1988 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1989 TRACE("(%p)->(%p)\n", This, p);
1990 return IHTMLStyle2_get_position(HTMLSTYLE2(This), p);
1993 static HRESULT WINAPI HTMLStyle_put_zIndex(IHTMLStyle *iface, VARIANT v)
1995 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1997 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
2001 return set_style_attr(This, STYLEID_Z_INDEX, V_BSTR(&v), 0);
2004 static const WCHAR format[] = {'%','d',0};
2006 wsprintfW(value, format, V_I4(&v));
2007 return set_style_attr(This, STYLEID_Z_INDEX, value, 0);
2010 FIXME("unimplemented vt %d\n", V_VT(&v));
2017 static HRESULT WINAPI HTMLStyle_get_zIndex(IHTMLStyle *iface, VARIANT *p)
2019 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2021 TRACE("(%p)->(%p)\n", This, p);
2023 return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
2026 static HRESULT WINAPI HTMLStyle_put_overflow(IHTMLStyle *iface, BSTR v)
2028 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2029 static const WCHAR szVisible[] = {'v','i','s','i','b','l','e',0};
2030 static const WCHAR szScroll[] = {'s','c','r','o','l','l',0};
2031 static const WCHAR szHidden[] = {'h','i','d','d','e','n',0};
2032 static const WCHAR szAuto[] = {'a','u','t','o',0};
2034 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2036 /* overflow can only be one of the follow values. */
2037 if(!v || !*v || strcmpiW(szVisible, v) == 0 || strcmpiW(szScroll, v) == 0 ||
2038 strcmpiW(szHidden, v) == 0 || strcmpiW(szAuto, v) == 0)
2040 return set_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, v, 0);
2043 return E_INVALIDARG;
2047 static HRESULT WINAPI HTMLStyle_get_overflow(IHTMLStyle *iface, BSTR *p)
2049 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2051 TRACE("(%p)->(%p)\n", This, p);
2054 return E_INVALIDARG;
2056 return get_style_attr(This, STYLEID_OVERFLOW, p);
2059 static HRESULT WINAPI HTMLStyle_put_pageBreakBefore(IHTMLStyle *iface, BSTR v)
2061 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2062 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2066 static HRESULT WINAPI HTMLStyle_get_pageBreakBefore(IHTMLStyle *iface, BSTR *p)
2068 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2069 FIXME("(%p)->(%p)\n", This, p);
2073 static HRESULT WINAPI HTMLStyle_put_pageBreakAfter(IHTMLStyle *iface, BSTR v)
2075 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2076 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2080 static HRESULT WINAPI HTMLStyle_get_pageBreakAfter(IHTMLStyle *iface, BSTR *p)
2082 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2083 FIXME("(%p)->(%p)\n", This, p);
2087 static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
2089 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2093 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2095 nsAString_Init(&text_str, v);
2096 nsres = nsIDOMCSSStyleDeclaration_SetCssText(This->nsstyle, &text_str);
2097 nsAString_Finish(&text_str);
2098 if(NS_FAILED(nsres)) {
2099 FIXME("SetCssStyle failed: %08x\n", nsres);
2106 static HRESULT WINAPI HTMLStyle_get_cssText(IHTMLStyle *iface, BSTR *p)
2108 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2112 TRACE("(%p)->(%p)\n", This, p);
2114 /* FIXME: Gecko style formatting is different than IE (uppercase). */
2115 nsAString_Init(&text_str, NULL);
2116 nsres = nsIDOMCSSStyleDeclaration_GetCssText(This->nsstyle, &text_str);
2117 if(NS_SUCCEEDED(nsres)) {
2118 const PRUnichar *text;
2120 nsAString_GetData(&text_str, &text);
2121 *p = *text ? SysAllocString(text) : NULL;
2123 FIXME("GetCssStyle failed: %08x\n", nsres);
2127 nsAString_Finish(&text_str);
2131 static HRESULT WINAPI HTMLStyle_put_pixelTop(IHTMLStyle *iface, LONG v)
2133 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2134 FIXME("(%p)->()\n", This);
2138 static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, LONG *p)
2140 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2141 FIXME("(%p)->()\n", This);
2145 static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, LONG v)
2147 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2148 FIXME("(%p)->()\n", This);
2152 static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p)
2154 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2155 FIXME("(%p)->()\n", This);
2159 static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v)
2161 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2162 FIXME("(%p)->()\n", This);
2166 static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p)
2168 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2169 FIXME("(%p)->()\n", This);
2173 static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, LONG v)
2175 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2176 FIXME("(%p)->()\n", This);
2180 static HRESULT WINAPI HTMLStyle_get_pixelHeight(IHTMLStyle *iface, LONG *p)
2182 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2183 FIXME("(%p)->()\n", This);
2187 static HRESULT WINAPI HTMLStyle_put_posTop(IHTMLStyle *iface, float v)
2189 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2191 TRACE("(%p)->(%f)\n", This, v);
2193 return set_style_pos(This, STYLEID_TOP, v);
2196 static HRESULT WINAPI HTMLStyle_get_posTop(IHTMLStyle *iface, float *p)
2198 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2200 TRACE("(%p)->(%p)\n", This, p);
2205 return get_nsstyle_pos(This, STYLEID_TOP, p);
2208 static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float v)
2210 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2212 TRACE("(%p)->(%f)\n", This, v);
2214 return set_style_pos(This, STYLEID_LEFT, v);
2217 static HRESULT WINAPI HTMLStyle_get_posLeft(IHTMLStyle *iface, float *p)
2219 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2221 TRACE("(%p)->(%p)\n", This, p);
2226 return get_nsstyle_pos(This, STYLEID_LEFT, p);
2229 static HRESULT WINAPI HTMLStyle_put_posWidth(IHTMLStyle *iface, float v)
2231 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2233 TRACE("(%p)->(%f)\n", This, v);
2235 return set_style_pos(This, STYLEID_WIDTH, v);
2238 static HRESULT WINAPI HTMLStyle_get_posWidth(IHTMLStyle *iface, float *p)
2240 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2242 TRACE("(%p)->(%p)\n", This, p);
2247 if(get_nsstyle_pos(This, STYLEID_WIDTH, p) != S_OK)
2253 static HRESULT WINAPI HTMLStyle_put_posHeight(IHTMLStyle *iface, float v)
2255 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2257 TRACE("(%p)->(%f)\n", This, v);
2259 return set_style_pos(This, STYLEID_HEIGHT, v);
2262 static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p)
2264 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2266 TRACE("(%p)->(%p)\n", This, p);
2271 if(get_nsstyle_pos(This, STYLEID_HEIGHT, p) != S_OK)
2277 static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v)
2279 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2281 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2283 return set_style_attr(This, STYLEID_CURSOR, v, 0);
2286 static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p)
2288 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2290 TRACE("(%p)->(%p)\n", This, p);
2292 return get_style_attr(This, STYLEID_CURSOR, p);
2295 static HRESULT WINAPI HTMLStyle_put_clip(IHTMLStyle *iface, BSTR v)
2297 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2298 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2302 static HRESULT WINAPI HTMLStyle_get_clip(IHTMLStyle *iface, BSTR *p)
2304 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2305 FIXME("(%p)->(%p)\n", This, p);
2309 static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v)
2311 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2313 WARN("(%p)->(%s)\n", This, debugstr_w(v));
2315 /* FIXME: Handle MS-style filters */
2316 return set_style_attr(This, STYLEID_FILTER, v, 0);
2319 static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p)
2321 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2323 WARN("(%p)->(%p)\n", This, p);
2325 /* FIXME: Handle MS-style filters */
2326 return get_style_attr(This, STYLEID_FILTER, p);
2329 static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2330 VARIANT AttributeValue, LONG lFlags)
2332 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2336 TRACE("(%p)->(%s v%d %08x)\n", This, debugstr_w(strAttributeName),
2337 V_VT(&AttributeValue), lFlags);
2339 if(!strAttributeName)
2340 return E_INVALIDARG;
2343 FIXME("Parameter lFlags ignored\n");
2345 hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
2346 LOCALE_USER_DEFAULT, &dispid);
2350 DISPID dispidNamed = DISPID_PROPERTYPUT;
2354 params.rgvarg = &AttributeValue;
2355 params.cNamedArgs = 1;
2356 params.rgdispidNamedArgs = &dispidNamed;
2358 hres = HTMLStyle_Invoke(iface, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
2359 DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, NULL);
2363 FIXME("Custom attributes not supported.\n");
2366 TRACE("ret: %08x\n", hres);
2371 static HRESULT WINAPI HTMLStyle_getAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2372 LONG lFlags, VARIANT *AttributeValue)
2374 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2378 TRACE("(%p)->(%s v%p %08x)\n", This, debugstr_w(strAttributeName),
2379 AttributeValue, lFlags);
2381 if(!AttributeValue || !strAttributeName)
2382 return E_INVALIDARG;
2385 FIXME("Parameter lFlags ignored\n");
2387 hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
2388 LOCALE_USER_DEFAULT, &dispid);
2391 DISPPARAMS params = {NULL, NULL, 0, 0 };
2393 hres = HTMLStyle_Invoke(iface, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
2394 DISPATCH_PROPERTYGET, ¶ms, AttributeValue, NULL, NULL);
2398 FIXME("Custom attributes not supported.\n");
2404 static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2405 LONG lFlags, VARIANT_BOOL *pfSuccess)
2407 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2408 FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
2413 static HRESULT WINAPI HTMLStyle_toString(IHTMLStyle *iface, BSTR *String)
2415 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2416 FIXME("(%p)->(%p)\n", This, String);
2420 static HRESULT HTMLStyle_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid)
2422 int c, i, min=0, max = sizeof(style_tbl)/sizeof(*style_tbl)-1;
2427 c = strcmpW(style_tbl[i].name, name);
2429 *dispid = style_tbl[i].dispid;
2439 return DISP_E_UNKNOWNNAME;
2442 static const IHTMLStyleVtbl HTMLStyleVtbl = {
2443 HTMLStyle_QueryInterface,
2446 HTMLStyle_GetTypeInfoCount,
2447 HTMLStyle_GetTypeInfo,
2448 HTMLStyle_GetIDsOfNames,
2450 HTMLStyle_put_fontFamily,
2451 HTMLStyle_get_fontFamily,
2452 HTMLStyle_put_fontStyle,
2453 HTMLStyle_get_fontStyle,
2454 HTMLStyle_put_fontVariant,
2455 HTMLStyle_get_fontVariant,
2456 HTMLStyle_put_fontWeight,
2457 HTMLStyle_get_fontWeight,
2458 HTMLStyle_put_fontSize,
2459 HTMLStyle_get_fontSize,
2462 HTMLStyle_put_color,
2463 HTMLStyle_get_color,
2464 HTMLStyle_put_background,
2465 HTMLStyle_get_background,
2466 HTMLStyle_put_backgroundColor,
2467 HTMLStyle_get_backgroundColor,
2468 HTMLStyle_put_backgroundImage,
2469 HTMLStyle_get_backgroundImage,
2470 HTMLStyle_put_backgroundRepeat,
2471 HTMLStyle_get_backgroundRepeat,
2472 HTMLStyle_put_backgroundAttachment,
2473 HTMLStyle_get_backgroundAttachment,
2474 HTMLStyle_put_backgroundPosition,
2475 HTMLStyle_get_backgroundPosition,
2476 HTMLStyle_put_backgroundPositionX,
2477 HTMLStyle_get_backgroundPositionX,
2478 HTMLStyle_put_backgroundPositionY,
2479 HTMLStyle_get_backgroundPositionY,
2480 HTMLStyle_put_wordSpacing,
2481 HTMLStyle_get_wordSpacing,
2482 HTMLStyle_put_letterSpacing,
2483 HTMLStyle_get_letterSpacing,
2484 HTMLStyle_put_textDecoration,
2485 HTMLStyle_get_textDecoration,
2486 HTMLStyle_put_textDecorationNone,
2487 HTMLStyle_get_textDecorationNone,
2488 HTMLStyle_put_textDecorationUnderline,
2489 HTMLStyle_get_textDecorationUnderline,
2490 HTMLStyle_put_textDecorationOverline,
2491 HTMLStyle_get_textDecorationOverline,
2492 HTMLStyle_put_textDecorationLineThrough,
2493 HTMLStyle_get_textDecorationLineThrough,
2494 HTMLStyle_put_textDecorationBlink,
2495 HTMLStyle_get_textDecorationBlink,
2496 HTMLStyle_put_verticalAlign,
2497 HTMLStyle_get_verticalAlign,
2498 HTMLStyle_put_textTransform,
2499 HTMLStyle_get_textTransform,
2500 HTMLStyle_put_textAlign,
2501 HTMLStyle_get_textAlign,
2502 HTMLStyle_put_textIndent,
2503 HTMLStyle_get_textIndent,
2504 HTMLStyle_put_lineHeight,
2505 HTMLStyle_get_lineHeight,
2506 HTMLStyle_put_marginTop,
2507 HTMLStyle_get_marginTop,
2508 HTMLStyle_put_marginRight,
2509 HTMLStyle_get_marginRight,
2510 HTMLStyle_put_marginBottom,
2511 HTMLStyle_get_marginBottom,
2512 HTMLStyle_put_marginLeft,
2513 HTMLStyle_get_marginLeft,
2514 HTMLStyle_put_margin,
2515 HTMLStyle_get_margin,
2516 HTMLStyle_put_paddingTop,
2517 HTMLStyle_get_paddingTop,
2518 HTMLStyle_put_paddingRight,
2519 HTMLStyle_get_paddingRight,
2520 HTMLStyle_put_paddingBottom,
2521 HTMLStyle_get_paddingBottom,
2522 HTMLStyle_put_paddingLeft,
2523 HTMLStyle_get_paddingLeft,
2524 HTMLStyle_put_padding,
2525 HTMLStyle_get_padding,
2526 HTMLStyle_put_border,
2527 HTMLStyle_get_border,
2528 HTMLStyle_put_borderTop,
2529 HTMLStyle_get_borderTop,
2530 HTMLStyle_put_borderRight,
2531 HTMLStyle_get_borderRight,
2532 HTMLStyle_put_borderBottom,
2533 HTMLStyle_get_borderBottom,
2534 HTMLStyle_put_borderLeft,
2535 HTMLStyle_get_borderLeft,
2536 HTMLStyle_put_borderColor,
2537 HTMLStyle_get_borderColor,
2538 HTMLStyle_put_borderTopColor,
2539 HTMLStyle_get_borderTopColor,
2540 HTMLStyle_put_borderRightColor,
2541 HTMLStyle_get_borderRightColor,
2542 HTMLStyle_put_borderBottomColor,
2543 HTMLStyle_get_borderBottomColor,
2544 HTMLStyle_put_borderLeftColor,
2545 HTMLStyle_get_borderLeftColor,
2546 HTMLStyle_put_borderWidth,
2547 HTMLStyle_get_borderWidth,
2548 HTMLStyle_put_borderTopWidth,
2549 HTMLStyle_get_borderTopWidth,
2550 HTMLStyle_put_borderRightWidth,
2551 HTMLStyle_get_borderRightWidth,
2552 HTMLStyle_put_borderBottomWidth,
2553 HTMLStyle_get_borderBottomWidth,
2554 HTMLStyle_put_borderLeftWidth,
2555 HTMLStyle_get_borderLeftWidth,
2556 HTMLStyle_put_borderStyle,
2557 HTMLStyle_get_borderStyle,
2558 HTMLStyle_put_borderTopStyle,
2559 HTMLStyle_get_borderTopStyle,
2560 HTMLStyle_put_borderRightStyle,
2561 HTMLStyle_get_borderRightStyle,
2562 HTMLStyle_put_borderBottomStyle,
2563 HTMLStyle_get_borderBottomStyle,
2564 HTMLStyle_put_borderLeftStyle,
2565 HTMLStyle_get_borderLeftStyle,
2566 HTMLStyle_put_width,
2567 HTMLStyle_get_width,
2568 HTMLStyle_put_height,
2569 HTMLStyle_get_height,
2570 HTMLStyle_put_styleFloat,
2571 HTMLStyle_get_styleFloat,
2572 HTMLStyle_put_clear,
2573 HTMLStyle_get_clear,
2574 HTMLStyle_put_display,
2575 HTMLStyle_get_display,
2576 HTMLStyle_put_visibility,
2577 HTMLStyle_get_visibility,
2578 HTMLStyle_put_listStyleType,
2579 HTMLStyle_get_listStyleType,
2580 HTMLStyle_put_listStylePosition,
2581 HTMLStyle_get_listStylePosition,
2582 HTMLStyle_put_listStyleImage,
2583 HTMLStyle_get_listStyleImage,
2584 HTMLStyle_put_listStyle,
2585 HTMLStyle_get_listStyle,
2586 HTMLStyle_put_whiteSpace,
2587 HTMLStyle_get_whiteSpace,
2592 HTMLStyle_get_position,
2593 HTMLStyle_put_zIndex,
2594 HTMLStyle_get_zIndex,
2595 HTMLStyle_put_overflow,
2596 HTMLStyle_get_overflow,
2597 HTMLStyle_put_pageBreakBefore,
2598 HTMLStyle_get_pageBreakBefore,
2599 HTMLStyle_put_pageBreakAfter,
2600 HTMLStyle_get_pageBreakAfter,
2601 HTMLStyle_put_cssText,
2602 HTMLStyle_get_cssText,
2603 HTMLStyle_put_pixelTop,
2604 HTMLStyle_get_pixelTop,
2605 HTMLStyle_put_pixelLeft,
2606 HTMLStyle_get_pixelLeft,
2607 HTMLStyle_put_pixelWidth,
2608 HTMLStyle_get_pixelWidth,
2609 HTMLStyle_put_pixelHeight,
2610 HTMLStyle_get_pixelHeight,
2611 HTMLStyle_put_posTop,
2612 HTMLStyle_get_posTop,
2613 HTMLStyle_put_posLeft,
2614 HTMLStyle_get_posLeft,
2615 HTMLStyle_put_posWidth,
2616 HTMLStyle_get_posWidth,
2617 HTMLStyle_put_posHeight,
2618 HTMLStyle_get_posHeight,
2619 HTMLStyle_put_cursor,
2620 HTMLStyle_get_cursor,
2623 HTMLStyle_put_filter,
2624 HTMLStyle_get_filter,
2625 HTMLStyle_setAttribute,
2626 HTMLStyle_getAttribute,
2627 HTMLStyle_removeAttribute,
2631 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl = {
2633 HTMLStyle_get_dispid,
2637 static const tid_t HTMLStyle_iface_tids[] = {
2644 static dispex_static_data_t HTMLStyle_dispex = {
2645 &HTMLStyle_dispex_vtbl,
2648 HTMLStyle_iface_tids
2651 IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle)
2653 HTMLStyle *ret = heap_alloc_zero(sizeof(HTMLStyle));
2655 ret->lpHTMLStyleVtbl = &HTMLStyleVtbl;
2657 ret->nsstyle = nsstyle;
2658 HTMLStyle2_Init(ret);
2659 HTMLStyle3_Init(ret);
2661 nsIDOMCSSStyleDeclaration_AddRef(nsstyle);
2663 init_dispex(&ret->dispex, (IUnknown*)HTMLSTYLE(ret), &HTMLStyle_dispex);
2665 return HTMLSTYLE(ret);