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 attrPosition[] =
121 {'p','o','s','i','t','i','o','n',0};
122 static const WCHAR attrTextAlign[] =
123 {'t','e','x','t','-','a','l','i','g','n',0};
124 static const WCHAR attrTextDecoration[] =
125 {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
126 static const WCHAR attrTop[] =
128 static const WCHAR attrVerticalAlign[] =
129 {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
130 static const WCHAR attrVisibility[] =
131 {'v','i','s','i','b','i','l','i','t','y',0};
132 static const WCHAR attrWidth[] =
133 {'w','i','d','t','h',0};
134 static const WCHAR attrWordSpacing[] =
135 {'w','o','r','d','-','s','p','a','c','i','n','g',0};
136 static const WCHAR attrWordWrap[] =
137 {'w','o','r','d','-','w','r','a','p',0};
138 static const WCHAR attrZIndex[] =
139 {'z','-','i','n','d','e','x',0};
145 {attrBackground, DISPID_IHTMLSTYLE_BACKGROUND},
146 {attrBackgroundColor, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR},
147 {attrBackgroundImage, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE},
148 {attrBackgroundPositionX, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONX},
149 {attrBackgroundPositionY, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONY},
150 {attrBackgroundRepeat, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT},
151 {attrBorder, DISPID_IHTMLSTYLE_BORDER},
152 {attrBorderBottomColor, DISPID_IHTMLSTYLE_BORDERBOTTOMCOLOR},
153 {attrBorderBottomStyle, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE},
154 {attrBorderBottomWidth, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH},
155 {attrBorderColor, DISPID_IHTMLSTYLE_BORDERCOLOR},
156 {attrBorderLeft, DISPID_IHTMLSTYLE_BORDERLEFT},
157 {attrBorderLeftColor, DISPID_IHTMLSTYLE_BORDERLEFTCOLOR},
158 {attrBorderLeftStyle, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE},
159 {attrBorderLeftWidth, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH},
160 {attrBorderRightColor, DISPID_IHTMLSTYLE_BORDERRIGHTCOLOR},
161 {attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE},
162 {attrBorderRightWidth, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH},
163 {attrBorderStyle, DISPID_IHTMLSTYLE_BORDERSTYLE},
164 {attrBorderTopColor, DISPID_IHTMLSTYLE_BORDERTOPCOLOR},
165 {attrBorderTopStyle, DISPID_IHTMLSTYLE_BORDERTOPSTYLE},
166 {attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
167 {attrBorderWidth, DISPID_IHTMLSTYLE_BORDERWIDTH},
168 {attrColor, DISPID_IHTMLSTYLE_COLOR},
169 {attrCursor, DISPID_IHTMLSTYLE_CURSOR},
170 {attrDisplay, DISPID_IHTMLSTYLE_DISPLAY},
171 {attrFilter, DISPID_IHTMLSTYLE_FILTER},
172 {attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY},
173 {attrFontSize, DISPID_IHTMLSTYLE_FONTSIZE},
174 {attrFontStyle, DISPID_IHTMLSTYLE_FONTSTYLE},
175 {attrFontVariant, DISPID_IHTMLSTYLE_FONTVARIANT},
176 {attrFontWeight, DISPID_IHTMLSTYLE_FONTWEIGHT},
177 {attrHeight, DISPID_IHTMLSTYLE_HEIGHT},
178 {attrLeft, DISPID_IHTMLSTYLE_LEFT},
179 {attrLetterSpacing, DISPID_IHTMLSTYLE_LETTERSPACING},
180 {attrMargin, DISPID_IHTMLSTYLE_MARGIN},
181 {attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT},
182 {attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT},
183 {attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT},
184 {attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW},
185 {attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT},
186 {attrPosition, DISPID_IHTMLSTYLE2_POSITION},
187 {attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN},
188 {attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION},
189 {attrTop, DISPID_IHTMLSTYLE_TOP},
190 {attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN},
191 {attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY},
192 {attrWidth, DISPID_IHTMLSTYLE_WIDTH},
193 {attrWordSpacing, DISPID_IHTMLSTYLE_WORDSPACING},
194 {attrWordWrap, DISPID_IHTMLSTYLE3_WORDWRAP},
195 {attrZIndex, DISPID_IHTMLSTYLE_ZINDEX}
198 static const WCHAR valLineThrough[] =
199 {'l','i','n','e','-','t','h','r','o','u','g','h',0};
200 static const WCHAR valUnderline[] =
201 {'u','n','d','e','r','l','i','n','e',0};
202 static const WCHAR szNormal[] =
203 {'n','o','r','m','a','l',0};
204 static const WCHAR styleNone[] =
206 static const WCHAR valOverline[] =
207 {'o','v','e','r','l','i','n','e',0};
208 static const WCHAR valBlink[] =
209 {'b','l','i','n','k',0};
211 static const WCHAR px_formatW[] = {'%','d','p','x',0};
212 static const WCHAR emptyW[] = {0};
214 static LPWSTR fix_px_value(LPCWSTR val)
219 while(*ptr && isspaceW(*ptr))
224 while(*ptr && isdigitW(*ptr))
227 if(!*ptr || isspaceW(*ptr)) {
229 int len = strlenW(val)+1;
231 ret = heap_alloc((len+2)*sizeof(WCHAR));
232 memcpy(ret, val, (ptr-val)*sizeof(WCHAR));
238 TRACE("fixed %s -> %s\n", debugstr_w(val), debugstr_w(ret));
243 while(*ptr && !isspaceW(*ptr))
250 static LPWSTR fix_url_value(LPCWSTR val)
254 static const WCHAR urlW[] = {'u','r','l','('};
256 if(strncmpW(val, urlW, sizeof(urlW)/sizeof(WCHAR)) || !strchrW(val, '\\'))
259 ret = heap_strdupW(val);
261 for(ptr = ret; *ptr; ptr++) {
269 HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCWSTR value, DWORD flags)
271 nsAString str_name, str_value, str_empty;
275 static const PRUnichar wszEmpty[] = {0};
277 if(flags & ATTR_FIX_PX)
278 val = fix_px_value(value);
279 if(flags & ATTR_FIX_URL)
280 val = fix_url_value(value);
282 nsAString_Init(&str_name, style_tbl[sid].name);
283 nsAString_Init(&str_value, val ? val : value);
284 nsAString_Init(&str_empty, wszEmpty);
287 nsres = nsIDOMCSSStyleDeclaration_SetProperty(nsstyle, &str_name, &str_value, &str_empty);
289 ERR("SetProperty failed: %08x\n", nsres);
291 nsAString_Finish(&str_name);
292 nsAString_Finish(&str_value);
293 nsAString_Finish(&str_empty);
298 HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags)
300 switch(V_VT(value)) {
302 return set_nsstyle_attr(nsstyle, sid, emptyW, flags);
305 return set_nsstyle_attr(nsstyle, sid, V_BSTR(value), flags);
307 case VT_BSTR|VT_BYREF:
308 return set_nsstyle_attr(nsstyle, sid, *V_BSTRREF(value), flags);
312 static const WCHAR format[] = {'%','d',0};
314 wsprintfW(str, format, V_I4(value));
315 return set_nsstyle_attr(nsstyle, sid, str, flags);
318 FIXME("not implemented vt %d\n", V_VT(value));
326 static inline HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWORD flags)
328 return set_nsstyle_attr(This->nsstyle, sid, value, flags);
331 static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value)
336 nsAString_Init(&str_name, style_tbl[sid].name);
338 nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle, &str_name, value);
339 if(NS_FAILED(nsres)) {
340 ERR("SetProperty failed: %08x\n", nsres);
344 nsAString_Finish(&str_name);
349 HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p)
352 const PRUnichar *value;
354 nsAString_Init(&str_value, NULL);
356 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
358 nsAString_GetData(&str_value, &value);
359 *p = *value ? SysAllocString(value) : NULL;
361 nsAString_Finish(&str_value);
363 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p));
367 HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags)
370 const PRUnichar *value;
373 nsAString_Init(&str_value, NULL);
375 get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
377 nsAString_GetData(&str_value, &value);
379 if(flags & ATTR_STR_TO_INT) {
380 const PRUnichar *ptr = value;
389 while(isdigitW(*ptr))
390 i = i*10 + (*ptr++ - '0');
394 V_I4(p) = neg ? -i : i;
403 str = SysAllocString(value);
405 return E_OUTOFMEMORY;
412 nsAString_Finish(&str_value);
414 TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_variant(p));
418 static inline HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p)
420 return get_nsstyle_attr(This->nsstyle, sid, p);
423 static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p)
426 const PRUnichar *value;
428 nsAString_Init(&str_value, NULL);
430 get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
432 nsAString_GetData(&str_value, &value);
433 *p = strcmpW(value, exval) ? VARIANT_FALSE : VARIANT_TRUE;
434 nsAString_Finish(&str_value);
436 TRACE("%s -> %x\n", debugstr_w(style_tbl[sid].name), *p);
440 static inline HRESULT set_style_pos(HTMLStyle *This, styleid_t sid, float value)
443 WCHAR szFormat[] = {'%','.','0','f','p','x',0};
445 value = floor(value);
447 sprintfW(szValue, szFormat, value);
449 return set_style_attr(This, sid, szValue, 0);
452 static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p)
456 WCHAR pxW[] = {'p','x',0};
458 TRACE("%p %d %p\n", This, sid, p);
462 nsAString_Init(&str_value, NULL);
464 hres = get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
468 const PRUnichar *value;
470 nsAString_GetData(&str_value, &value);
473 *p = strtolW(value, &ptr, 10);
475 if(*ptr && strcmpW(ptr, pxW))
477 nsAString_Finish(&str_value);
478 FIXME("only px values are currently supported\n");
484 TRACE("ret %f\n", *p);
486 nsAString_Finish(&str_value);
491 static BOOL is_valid_border_style(BSTR v)
493 static const WCHAR styleDotted[] = {'d','o','t','t','e','d',0};
494 static const WCHAR styleDashed[] = {'d','a','s','h','e','d',0};
495 static const WCHAR styleSolid[] = {'s','o','l','i','d',0};
496 static const WCHAR styleDouble[] = {'d','o','u','b','l','e',0};
497 static const WCHAR styleGroove[] = {'g','r','o','o','v','e',0};
498 static const WCHAR styleRidge[] = {'r','i','d','g','e',0};
499 static const WCHAR styleInset[] = {'i','n','s','e','t',0};
500 static const WCHAR styleOutset[] = {'o','u','t','s','e','t',0};
502 TRACE("%s\n", debugstr_w(v));
504 if(!v || strcmpiW(v, styleNone) == 0 || strcmpiW(v, styleDotted) == 0 ||
505 strcmpiW(v, styleDashed) == 0 || strcmpiW(v, styleSolid) == 0 ||
506 strcmpiW(v, styleDouble) == 0 || strcmpiW(v, styleGroove) == 0 ||
507 strcmpiW(v, styleRidge) == 0 || strcmpiW(v, styleInset) == 0 ||
508 strcmpiW(v, styleOutset) == 0 )
516 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
518 static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, void **ppv)
520 HTMLStyle *This = HTMLSTYLE_THIS(iface);
524 if(IsEqualGUID(&IID_IUnknown, riid)) {
525 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
526 *ppv = HTMLSTYLE(This);
527 }else if(IsEqualGUID(&IID_IHTMLStyle, riid)) {
528 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This, ppv);
529 *ppv = HTMLSTYLE(This);
530 }else if(IsEqualGUID(&IID_IHTMLStyle2, riid)) {
531 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This, ppv);
532 *ppv = HTMLSTYLE2(This);
533 }else if(IsEqualGUID(&IID_IHTMLStyle3, riid)) {
534 TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This, ppv);
535 *ppv = HTMLSTYLE3(This);
536 }else if(IsEqualGUID(&IID_IHTMLStyle4, riid)) {
537 TRACE("(%p)->(IID_IHTMLStyle4 %p)\n", This, ppv);
538 *ppv = HTMLSTYLE4(This);
539 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
540 return *ppv ? S_OK : E_NOINTERFACE;
544 IUnknown_AddRef((IUnknown*)*ppv);
548 WARN("unsupported %s\n", debugstr_guid(riid));
549 return E_NOINTERFACE;
552 static ULONG WINAPI HTMLStyle_AddRef(IHTMLStyle *iface)
554 HTMLStyle *This = HTMLSTYLE_THIS(iface);
555 LONG ref = InterlockedIncrement(&This->ref);
557 TRACE("(%p) ref=%d\n", This, ref);
562 static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
564 HTMLStyle *This = HTMLSTYLE_THIS(iface);
565 LONG ref = InterlockedDecrement(&This->ref);
567 TRACE("(%p) ref=%d\n", This, ref);
571 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
572 release_dispex(&This->dispex);
579 static HRESULT WINAPI HTMLStyle_GetTypeInfoCount(IHTMLStyle *iface, UINT *pctinfo)
581 HTMLStyle *This = HTMLSTYLE_THIS(iface);
582 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
585 static HRESULT WINAPI HTMLStyle_GetTypeInfo(IHTMLStyle *iface, UINT iTInfo,
586 LCID lcid, ITypeInfo **ppTInfo)
588 HTMLStyle *This = HTMLSTYLE_THIS(iface);
589 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
592 static HRESULT WINAPI HTMLStyle_GetIDsOfNames(IHTMLStyle *iface, REFIID riid,
593 LPOLESTR *rgszNames, UINT cNames,
594 LCID lcid, DISPID *rgDispId)
596 HTMLStyle *This = HTMLSTYLE_THIS(iface);
597 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
600 static HRESULT WINAPI HTMLStyle_Invoke(IHTMLStyle *iface, DISPID dispIdMember,
601 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
602 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
604 HTMLStyle *This = HTMLSTYLE_THIS(iface);
605 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
606 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
609 static HRESULT WINAPI HTMLStyle_put_fontFamily(IHTMLStyle *iface, BSTR v)
611 HTMLStyle *This = HTMLSTYLE_THIS(iface);
613 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
615 return set_style_attr(This, STYLEID_FONT_FAMILY, v, 0);
618 static HRESULT WINAPI HTMLStyle_get_fontFamily(IHTMLStyle *iface, BSTR *p)
620 HTMLStyle *This = HTMLSTYLE_THIS(iface);
622 TRACE("(%p)->(%p)\n", This, p);
624 return get_style_attr(This, STYLEID_FONT_FAMILY, p);
627 static HRESULT WINAPI HTMLStyle_put_fontStyle(IHTMLStyle *iface, BSTR v)
629 HTMLStyle *This = HTMLSTYLE_THIS(iface);
630 static const WCHAR szItalic[] = {'i','t','a','l','i','c',0};
631 static const WCHAR szOblique[] = {'o','b','l','i','q','u','e',0};
633 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
635 /* fontStyle can only be one of the follow values. */
636 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(szItalic, v) == 0 ||
637 strcmpiW(szOblique, v) == 0)
639 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, v, 0);
645 static HRESULT WINAPI HTMLStyle_get_fontStyle(IHTMLStyle *iface, BSTR *p)
647 HTMLStyle *This = HTMLSTYLE_THIS(iface);
649 TRACE("(%p)->(%p)\n", This, p);
651 return get_style_attr(This, STYLEID_FONT_STYLE, p);
654 static HRESULT WINAPI HTMLStyle_put_fontVariant(IHTMLStyle *iface, BSTR v)
656 HTMLStyle *This = HTMLSTYLE_THIS(iface);
657 static const WCHAR szCaps[] = {'s','m','a','l','l','-','c','a','p','s',0};
659 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
661 /* fontVariant can only be one of the follow values. */
662 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(szCaps, v) == 0)
664 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, v, 0);
670 static HRESULT WINAPI HTMLStyle_get_fontVariant(IHTMLStyle *iface, BSTR *p)
672 HTMLStyle *This = HTMLSTYLE_THIS(iface);
673 TRACE("(%p)->(%p)\n", This, p);
678 return get_style_attr(This, STYLEID_FONT_VARIANT, p);
681 static HRESULT WINAPI HTMLStyle_put_fontWeight(IHTMLStyle *iface, BSTR v)
683 HTMLStyle *This = HTMLSTYLE_THIS(iface);
684 static const WCHAR styleBold[] = {'b','o','l','d',0};
685 static const WCHAR styleBolder[] = {'b','o','l','d','e','r',0};
686 static const WCHAR styleLighter[] = {'l','i','g','h','t','e','r',0};
687 static const WCHAR style100[] = {'1','0','0',0};
688 static const WCHAR style200[] = {'2','0','0',0};
689 static const WCHAR style300[] = {'3','0','0',0};
690 static const WCHAR style400[] = {'4','0','0',0};
691 static const WCHAR style500[] = {'5','0','0',0};
692 static const WCHAR style600[] = {'6','0','0',0};
693 static const WCHAR style700[] = {'7','0','0',0};
694 static const WCHAR style800[] = {'8','0','0',0};
695 static const WCHAR style900[] = {'9','0','0',0};
697 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
699 /* fontWeight can only be one of the following */
700 if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(styleBold, v) == 0 ||
701 strcmpiW(styleBolder, v) == 0 || strcmpiW(styleLighter, v) == 0 ||
702 strcmpiW(style100, v) == 0 || strcmpiW(style200, v) == 0 ||
703 strcmpiW(style300, v) == 0 || strcmpiW(style400, v) == 0 ||
704 strcmpiW(style500, v) == 0 || strcmpiW(style600, v) == 0 ||
705 strcmpiW(style700, v) == 0 || strcmpiW(style800, v) == 0 ||
706 strcmpiW(style900, v) == 0
709 return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_WEIGHT, v, 0);
715 static HRESULT WINAPI HTMLStyle_get_fontWeight(IHTMLStyle *iface, BSTR *p)
717 HTMLStyle *This = HTMLSTYLE_THIS(iface);
719 TRACE("(%p)->(%p)\n", This, p);
721 return get_style_attr(This, STYLEID_FONT_WEIGHT, p);
724 static HRESULT WINAPI HTMLStyle_put_fontSize(IHTMLStyle *iface, VARIANT v)
726 HTMLStyle *This = HTMLSTYLE_THIS(iface);
728 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
732 return set_style_attr(This, STYLEID_FONT_SIZE, V_BSTR(&v), 0);
734 FIXME("not supported vt %d\n", V_VT(&v));
740 static HRESULT WINAPI HTMLStyle_get_fontSize(IHTMLStyle *iface, VARIANT *p)
742 HTMLStyle *This = HTMLSTYLE_THIS(iface);
744 TRACE("(%p)->(%p)\n", This, p);
747 return get_style_attr(This, STYLEID_FONT_SIZE, &V_BSTR(p));
750 static HRESULT WINAPI HTMLStyle_put_font(IHTMLStyle *iface, BSTR v)
752 HTMLStyle *This = HTMLSTYLE_THIS(iface);
753 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
757 static HRESULT WINAPI HTMLStyle_get_font(IHTMLStyle *iface, BSTR *p)
759 HTMLStyle *This = HTMLSTYLE_THIS(iface);
760 FIXME("(%p)->(%p)\n", This, p);
764 static HRESULT WINAPI HTMLStyle_put_color(IHTMLStyle *iface, VARIANT v)
766 HTMLStyle *This = HTMLSTYLE_THIS(iface);
768 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
772 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
773 return set_style_attr(This, STYLEID_COLOR, V_BSTR(&v), 0);
776 FIXME("unsupported vt=%d\n", V_VT(&v));
782 static HRESULT WINAPI HTMLStyle_get_color(IHTMLStyle *iface, VARIANT *p)
784 HTMLStyle *This = HTMLSTYLE_THIS(iface);
786 TRACE("(%p)->(%p)\n", This, p);
789 return get_style_attr(This, STYLEID_COLOR, &V_BSTR(p));
792 static HRESULT WINAPI HTMLStyle_put_background(IHTMLStyle *iface, BSTR v)
794 HTMLStyle *This = HTMLSTYLE_THIS(iface);
796 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
798 return set_style_attr(This, STYLEID_BACKGROUND, v, 0);
801 static HRESULT WINAPI HTMLStyle_get_background(IHTMLStyle *iface, BSTR *p)
803 HTMLStyle *This = HTMLSTYLE_THIS(iface);
805 TRACE("(%p)->(%p)\n", This, p);
807 return get_style_attr(This, STYLEID_BACKGROUND, p);
810 static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v)
812 HTMLStyle *This = HTMLSTYLE_THIS(iface);
814 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
818 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, V_BSTR(&v), 0);
821 static const WCHAR format[] = {'#','%','0','6','x',0};
823 wsprintfW(value, format, V_I4(&v));
824 return set_style_attr(This, STYLEID_BACKGROUND_COLOR, value, 0);
827 FIXME("unsupported vt %d\n", V_VT(&v));
833 static HRESULT WINAPI HTMLStyle_get_backgroundColor(IHTMLStyle *iface, VARIANT *p)
835 HTMLStyle *This = HTMLSTYLE_THIS(iface);
836 TRACE("(%p)->(%p)\n", This, p);
839 return get_style_attr(This, STYLEID_BACKGROUND_COLOR, &V_BSTR(p));
842 static HRESULT WINAPI HTMLStyle_put_backgroundImage(IHTMLStyle *iface, BSTR v)
844 HTMLStyle *This = HTMLSTYLE_THIS(iface);
846 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
848 return set_style_attr(This, STYLEID_BACKGROUND_IMAGE, v, ATTR_FIX_URL);
851 static HRESULT WINAPI HTMLStyle_get_backgroundImage(IHTMLStyle *iface, BSTR *p)
853 HTMLStyle *This = HTMLSTYLE_THIS(iface);
855 TRACE("(%p)->(%p)\n", This, p);
857 return get_style_attr(This, STYLEID_BACKGROUND_IMAGE, p);
860 static HRESULT WINAPI HTMLStyle_put_backgroundRepeat(IHTMLStyle *iface, BSTR v)
862 HTMLStyle *This = HTMLSTYLE_THIS(iface);
863 static const WCHAR styleRepeat[] = {'r','e','p','e','a','t',0};
864 static const WCHAR styleNoRepeat[] = {'n','o','-','r','e','p','e','a','t',0};
865 static const WCHAR styleRepeatX[] = {'r','e','p','e','a','t','-','x',0};
866 static const WCHAR styleRepeatY[] = {'r','e','p','e','a','t','-','y',0};
868 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
870 /* fontWeight can only be one of the following */
871 if(!v || strcmpiW(styleRepeat, v) == 0 || strcmpiW(styleNoRepeat, v) == 0 ||
872 strcmpiW(styleRepeatX, v) == 0 || strcmpiW(styleRepeatY, v) == 0 )
874 return set_style_attr(This, STYLEID_BACKGROUND_REPEAT , v, 0);
880 static HRESULT WINAPI HTMLStyle_get_backgroundRepeat(IHTMLStyle *iface, BSTR *p)
882 HTMLStyle *This = HTMLSTYLE_THIS(iface);
884 TRACE("(%p)->(%p)\n", This, p);
886 return get_style_attr(This, STYLEID_BACKGROUND_REPEAT, p);
889 static HRESULT WINAPI HTMLStyle_put_backgroundAttachment(IHTMLStyle *iface, BSTR v)
891 HTMLStyle *This = HTMLSTYLE_THIS(iface);
892 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
896 static HRESULT WINAPI HTMLStyle_get_backgroundAttachment(IHTMLStyle *iface, BSTR *p)
898 HTMLStyle *This = HTMLSTYLE_THIS(iface);
899 FIXME("(%p)->(%p)\n", This, p);
903 static HRESULT WINAPI HTMLStyle_put_backgroundPosition(IHTMLStyle *iface, BSTR v)
905 HTMLStyle *This = HTMLSTYLE_THIS(iface);
906 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
910 static HRESULT WINAPI HTMLStyle_get_backgroundPosition(IHTMLStyle *iface, BSTR *p)
912 HTMLStyle *This = HTMLSTYLE_THIS(iface);
913 FIXME("(%p)->(%p)\n", This, p);
917 static HRESULT WINAPI HTMLStyle_put_backgroundPositionX(IHTMLStyle *iface, VARIANT v)
919 HTMLStyle *This = HTMLSTYLE_THIS(iface);
920 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
921 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_X, &v, 0);
924 static HRESULT WINAPI HTMLStyle_get_backgroundPositionX(IHTMLStyle *iface, VARIANT *p)
926 HTMLStyle *This = HTMLSTYLE_THIS(iface);
927 TRACE("(%p)->(%p)\n", This, p);
928 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_X, p, 0);
931 static HRESULT WINAPI HTMLStyle_put_backgroundPositionY(IHTMLStyle *iface, VARIANT v)
933 HTMLStyle *This = HTMLSTYLE_THIS(iface);
934 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
935 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_Y, &v, 0);
938 static HRESULT WINAPI HTMLStyle_get_backgroundPositionY(IHTMLStyle *iface, VARIANT *p)
940 HTMLStyle *This = HTMLSTYLE_THIS(iface);
941 TRACE("(%p)->(%p)\n", This, p);
942 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_Y, p, 0);
945 static HRESULT WINAPI HTMLStyle_put_wordSpacing(IHTMLStyle *iface, VARIANT v)
947 HTMLStyle *This = HTMLSTYLE_THIS(iface);
948 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
949 return set_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, &v, 0);
952 static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p)
954 HTMLStyle *This = HTMLSTYLE_THIS(iface);
955 TRACE("(%p)->(%p)\n", This, p);
956 return get_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, p, 0);
959 static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
961 HTMLStyle *This = HTMLSTYLE_THIS(iface);
962 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
963 return set_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, &v, 0);
966 static HRESULT WINAPI HTMLStyle_get_letterSpacing(IHTMLStyle *iface, VARIANT *p)
968 HTMLStyle *This = HTMLSTYLE_THIS(iface);
969 TRACE("(%p)->(%p)\n", This, p);
970 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
973 static HRESULT WINAPI HTMLStyle_put_textDecoration(IHTMLStyle *iface, BSTR v)
975 HTMLStyle *This = HTMLSTYLE_THIS(iface);
977 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
979 /* textDecoration can only be one of the following */
980 if(!v || strcmpiW(styleNone, v) == 0 || strcmpiW(valUnderline, v) == 0 ||
981 strcmpiW(valOverline, v) == 0 || strcmpiW(valLineThrough, v) == 0 ||
982 strcmpiW(valBlink, v) == 0)
984 return set_style_attr(This, STYLEID_TEXT_DECORATION , v, 0);
990 static HRESULT WINAPI HTMLStyle_get_textDecoration(IHTMLStyle *iface, BSTR *p)
992 HTMLStyle *This = HTMLSTYLE_THIS(iface);
994 TRACE("(%p)->(%p)\n", This, p);
996 return get_style_attr(This, STYLEID_TEXT_DECORATION, p);
999 static HRESULT WINAPI HTMLStyle_put_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL v)
1001 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1003 TRACE("(%p)->(%x)\n", This, v);
1005 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? styleNone : emptyW, 0);
1008 static HRESULT WINAPI HTMLStyle_get_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL *p)
1010 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1012 TRACE("(%p)->(%p)\n", This, p);
1014 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, styleNone, p);
1017 static HRESULT WINAPI HTMLStyle_put_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL v)
1019 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1021 TRACE("(%p)->(%x)\n", This, v);
1023 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valUnderline : emptyW, 0);
1026 static HRESULT WINAPI HTMLStyle_get_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL *p)
1028 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1030 TRACE("(%p)->(%p)\n", This, p);
1032 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valUnderline, p);
1035 static HRESULT WINAPI HTMLStyle_put_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL v)
1037 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1039 TRACE("(%p)->(%x)\n", This, v);
1041 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valOverline : emptyW, 0);
1044 static HRESULT WINAPI HTMLStyle_get_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL *p)
1046 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1048 TRACE("(%p)->(%p)\n", This, p);
1050 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valOverline, p);
1053 static HRESULT WINAPI HTMLStyle_put_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL v)
1055 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1057 TRACE("(%p)->(%x)\n", This, v);
1059 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valLineThrough : emptyW, 0);
1062 static HRESULT WINAPI HTMLStyle_get_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL *p)
1064 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1066 TRACE("(%p)->(%p)\n", This, p);
1068 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valLineThrough, p);
1071 static HRESULT WINAPI HTMLStyle_put_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL v)
1073 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1075 TRACE("(%p)->(%x)\n", This, v);
1077 return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valBlink : emptyW, 0);
1080 static HRESULT WINAPI HTMLStyle_get_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL *p)
1082 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1084 TRACE("(%p)->(%p)\n", This, p);
1086 return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valBlink, p);
1089 static HRESULT WINAPI HTMLStyle_put_verticalAlign(IHTMLStyle *iface, VARIANT v)
1091 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1093 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1097 return set_style_attr(This, STYLEID_VERTICAL_ALIGN, V_BSTR(&v), 0);
1099 FIXME("not implemented vt %d\n", V_VT(&v));
1106 static HRESULT WINAPI HTMLStyle_get_verticalAlign(IHTMLStyle *iface, VARIANT *p)
1108 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1112 TRACE("(%p)->(%p)\n", This, p);
1114 hres = get_style_attr(This, STYLEID_VERTICAL_ALIGN, &ret);
1123 static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v)
1125 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1126 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1130 static HRESULT WINAPI HTMLStyle_get_textTransform(IHTMLStyle *iface, BSTR *p)
1132 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1133 FIXME("(%p)->(%p)\n", This, p);
1137 static HRESULT WINAPI HTMLStyle_put_textAlign(IHTMLStyle *iface, BSTR v)
1139 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1141 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1143 return set_style_attr(This, STYLEID_TEXT_ALIGN, v, 0);
1146 static HRESULT WINAPI HTMLStyle_get_textAlign(IHTMLStyle *iface, BSTR *p)
1148 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1150 TRACE("(%p)->(%p)\n", This, p);
1152 return get_style_attr(This, STYLEID_TEXT_ALIGN, p);
1155 static HRESULT WINAPI HTMLStyle_put_textIndent(IHTMLStyle *iface, VARIANT v)
1157 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1158 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1162 static HRESULT WINAPI HTMLStyle_get_textIndent(IHTMLStyle *iface, VARIANT *p)
1164 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1165 FIXME("(%p)->(%p)\n", This, p);
1169 static HRESULT WINAPI HTMLStyle_put_lineHeight(IHTMLStyle *iface, VARIANT v)
1171 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1172 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1176 static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
1178 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1179 FIXME("(%p)->(%p)\n", This, p);
1183 static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
1185 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1186 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1190 static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
1192 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1193 FIXME("(%p)->(%p)\n", This, p);
1197 static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
1199 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1201 TRACE("(%p)->(v(%d))\n", This, V_VT(&v));
1205 return set_style_attr(This, STYLEID_MARGIN_RIGHT, emptyW, 0);
1209 wsprintfW(buf, px_formatW, V_I4(&v));
1210 return set_style_attr(This, STYLEID_MARGIN_RIGHT, buf, 0);
1213 return set_style_attr(This, STYLEID_MARGIN_RIGHT, V_BSTR(&v), 0);
1215 FIXME("Unsupported vt=%d\n", V_VT(&v));
1221 static HRESULT WINAPI HTMLStyle_get_marginRight(IHTMLStyle *iface, VARIANT *p)
1223 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1224 TRACE("(%p)->(%p)\n", This, p);
1225 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
1228 static HRESULT WINAPI HTMLStyle_put_marginBottom(IHTMLStyle *iface, VARIANT v)
1230 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1231 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1235 static HRESULT WINAPI HTMLStyle_get_marginBottom(IHTMLStyle *iface, VARIANT *p)
1237 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1238 FIXME("(%p)->(%p)\n", This, p);
1242 static HRESULT WINAPI HTMLStyle_put_marginLeft(IHTMLStyle *iface, VARIANT v)
1244 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1248 TRACE("(%p)->(NULL)\n", This);
1249 return set_style_attr(This, STYLEID_MARGIN_LEFT, emptyW, 0);
1253 TRACE("(%p)->(%d)\n", This, V_I4(&v));
1255 wsprintfW(buf, px_formatW, V_I4(&v));
1256 return set_style_attr(This, STYLEID_MARGIN_LEFT, buf, 0);
1259 TRACE("(%p)->(%s)\n", This, debugstr_w(V_BSTR(&v)));
1260 return set_style_attr(This, STYLEID_MARGIN_LEFT, V_BSTR(&v), 0);
1262 FIXME("Unsupported vt=%d\n", V_VT(&v));
1268 static HRESULT WINAPI HTMLStyle_put_margin(IHTMLStyle *iface, BSTR v)
1270 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1272 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1274 return set_style_attr(This, STYLEID_MARGIN, v, 0);
1277 static HRESULT WINAPI HTMLStyle_get_margin(IHTMLStyle *iface, BSTR *p)
1279 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1281 TRACE("(%p)->(%p)\n", This, p);
1283 return get_style_attr(This, STYLEID_MARGIN, p);
1286 static HRESULT WINAPI HTMLStyle_get_marginLeft(IHTMLStyle *iface, VARIANT *p)
1288 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1289 TRACE("(%p)->(%p)\n", This, p);
1290 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
1293 static HRESULT WINAPI HTMLStyle_put_paddingTop(IHTMLStyle *iface, VARIANT v)
1295 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1296 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1300 static HRESULT WINAPI HTMLStyle_get_paddingTop(IHTMLStyle *iface, VARIANT *p)
1302 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1303 FIXME("(%p)->(%p)\n", This, p);
1307 static HRESULT WINAPI HTMLStyle_put_paddingRight(IHTMLStyle *iface, VARIANT v)
1309 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1310 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1314 static HRESULT WINAPI HTMLStyle_get_paddingRight(IHTMLStyle *iface, VARIANT *p)
1316 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1317 FIXME("(%p)->(%p)\n", This, p);
1321 static HRESULT WINAPI HTMLStyle_put_paddingBottom(IHTMLStyle *iface, VARIANT v)
1323 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1324 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1328 static HRESULT WINAPI HTMLStyle_get_paddingBottom(IHTMLStyle *iface, VARIANT *p)
1330 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1331 FIXME("(%p)->(%p)\n", This, p);
1335 static HRESULT WINAPI HTMLStyle_put_paddingLeft(IHTMLStyle *iface, VARIANT v)
1337 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1339 TRACE("(%p)->(vt=%d)\n", This, V_VT(&v));
1345 wsprintfW(buf, px_formatW, V_I4(&v));
1346 return set_style_attr(This, STYLEID_PADDING_LEFT, buf, 0);
1349 return set_style_attr(This, STYLEID_PADDING_LEFT, V_BSTR(&v), 0);
1351 FIXME("unsupported vt=%d\n", V_VT(&v));
1357 static HRESULT WINAPI HTMLStyle_get_paddingLeft(IHTMLStyle *iface, VARIANT *p)
1359 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1363 TRACE("(%p)->(%p)\n", This, p);
1365 hres = get_style_attr(This, STYLEID_PADDING_LEFT, &ret);
1374 static HRESULT WINAPI HTMLStyle_put_padding(IHTMLStyle *iface, BSTR v)
1376 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1377 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1381 static HRESULT WINAPI HTMLStyle_get_padding(IHTMLStyle *iface, BSTR *p)
1383 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1384 FIXME("(%p)->(%p)\n", This, p);
1388 static HRESULT WINAPI HTMLStyle_put_border(IHTMLStyle *iface, BSTR v)
1390 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1392 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1394 return set_style_attr(This, STYLEID_BORDER, v, 0);
1397 static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p)
1399 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1401 TRACE("(%p)->(%p)\n", This, p);
1403 return get_style_attr(This, STYLEID_BORDER, p);
1406 static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
1408 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1409 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1413 static HRESULT WINAPI HTMLStyle_get_borderTop(IHTMLStyle *iface, BSTR *p)
1415 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1416 FIXME("(%p)->(%p)\n", This, p);
1420 static HRESULT WINAPI HTMLStyle_put_borderRight(IHTMLStyle *iface, BSTR v)
1422 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1423 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1427 static HRESULT WINAPI HTMLStyle_get_borderRight(IHTMLStyle *iface, BSTR *p)
1429 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1430 FIXME("(%p)->(%p)\n", This, p);
1434 static HRESULT WINAPI HTMLStyle_put_borderBottom(IHTMLStyle *iface, BSTR v)
1436 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1437 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1441 static HRESULT WINAPI HTMLStyle_get_borderBottom(IHTMLStyle *iface, BSTR *p)
1443 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1444 FIXME("(%p)->(%p)\n", This, p);
1448 static HRESULT WINAPI HTMLStyle_put_borderLeft(IHTMLStyle *iface, BSTR v)
1450 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1452 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1454 return set_style_attr(This, STYLEID_BORDER_LEFT, v, ATTR_FIX_PX);
1457 static HRESULT WINAPI HTMLStyle_get_borderLeft(IHTMLStyle *iface, BSTR *p)
1459 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1461 TRACE("(%p)->(%p)\n", This, p);
1463 return get_style_attr(This, STYLEID_BORDER_LEFT, p);
1466 static HRESULT WINAPI HTMLStyle_put_borderColor(IHTMLStyle *iface, BSTR v)
1468 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1470 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1472 return set_style_attr(This, STYLEID_BORDER_COLOR, v, 0);
1475 static HRESULT WINAPI HTMLStyle_get_borderColor(IHTMLStyle *iface, BSTR *p)
1477 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1479 TRACE("(%p)->(%p)\n", This, p);
1481 return get_style_attr(This, STYLEID_BORDER_COLOR, p);
1484 static HRESULT WINAPI HTMLStyle_put_borderTopColor(IHTMLStyle *iface, VARIANT v)
1486 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1487 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1491 static HRESULT WINAPI HTMLStyle_get_borderTopColor(IHTMLStyle *iface, VARIANT *p)
1493 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1494 FIXME("(%p)->(%p)\n", This, p);
1498 static HRESULT WINAPI HTMLStyle_put_borderRightColor(IHTMLStyle *iface, VARIANT v)
1500 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1501 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1505 static HRESULT WINAPI HTMLStyle_get_borderRightColor(IHTMLStyle *iface, VARIANT *p)
1507 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1508 FIXME("(%p)->(%p)\n", This, p);
1512 static HRESULT WINAPI HTMLStyle_put_borderBottomColor(IHTMLStyle *iface, VARIANT v)
1514 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1515 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1519 static HRESULT WINAPI HTMLStyle_get_borderBottomColor(IHTMLStyle *iface, VARIANT *p)
1521 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1522 FIXME("(%p)->(%p)\n", This, p);
1526 static HRESULT WINAPI HTMLStyle_put_borderLeftColor(IHTMLStyle *iface, VARIANT v)
1528 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1529 FIXME("(%p)->(v%d)\n", This, V_VT(&v));
1533 static HRESULT WINAPI HTMLStyle_get_borderLeftColor(IHTMLStyle *iface, VARIANT *p)
1535 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1536 FIXME("(%p)->(%p)\n", This, p);
1540 static HRESULT WINAPI HTMLStyle_put_borderWidth(IHTMLStyle *iface, BSTR v)
1542 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1543 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1544 return set_style_attr(This, STYLEID_BORDER_WIDTH, v, ATTR_FIX_PX);
1547 static HRESULT WINAPI HTMLStyle_get_borderWidth(IHTMLStyle *iface, BSTR *p)
1549 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1550 TRACE("(%p)->(%p)\n", This, p);
1551 return get_style_attr(This, STYLEID_BORDER_WIDTH, p);
1554 static HRESULT WINAPI HTMLStyle_put_borderTopWidth(IHTMLStyle *iface, VARIANT v)
1556 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1557 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1558 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, &v, 0);
1561 static HRESULT WINAPI HTMLStyle_get_borderTopWidth(IHTMLStyle *iface, VARIANT *p)
1563 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1565 TRACE("(%p)->(%p)\n", This, p);
1567 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
1570 static HRESULT WINAPI HTMLStyle_put_borderRightWidth(IHTMLStyle *iface, VARIANT v)
1572 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1573 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1574 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, &v, 0);
1577 static HRESULT WINAPI HTMLStyle_get_borderRightWidth(IHTMLStyle *iface, VARIANT *p)
1579 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1580 TRACE("(%p)->(%p)\n", This, p);
1581 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
1584 static HRESULT WINAPI HTMLStyle_put_borderBottomWidth(IHTMLStyle *iface, VARIANT v)
1586 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1588 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1589 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, &v, 0);
1592 static HRESULT WINAPI HTMLStyle_get_borderBottomWidth(IHTMLStyle *iface, VARIANT *p)
1594 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1595 TRACE("(%p)->(%p)\n", This, p);
1596 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
1599 static HRESULT WINAPI HTMLStyle_put_borderLeftWidth(IHTMLStyle *iface, VARIANT v)
1601 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1602 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1603 return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, &v, 0);
1606 static HRESULT WINAPI HTMLStyle_get_borderLeftWidth(IHTMLStyle *iface, VARIANT *p)
1608 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1609 TRACE("(%p)->(%p)\n", This, p);
1610 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
1613 static HRESULT WINAPI HTMLStyle_put_borderStyle(IHTMLStyle *iface, BSTR v)
1615 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1616 static const WCHAR styleWindowInset[] = {'w','i','n','d','o','w','-','i','n','s','e','t',0};
1617 HRESULT hres = S_OK;
1622 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1624 while(v[i] && hres == S_OK)
1626 if(v[i] == (WCHAR)' ')
1628 pstyle = SysAllocStringLen(&v[last], (i-last));
1629 if( !(is_valid_border_style(pstyle) || strcmpiW(styleWindowInset, pstyle) == 0))
1631 TRACE("1. Invalid style (%s)\n", debugstr_w(pstyle));
1632 hres = E_INVALIDARG;
1634 SysFreeString(pstyle);
1642 pstyle = SysAllocStringLen(&v[last], i-last);
1643 if( !(is_valid_border_style(pstyle) || strcmpiW(styleWindowInset, pstyle) == 0))
1645 TRACE("2. Invalid style (%s)\n", debugstr_w(pstyle));
1646 hres = E_INVALIDARG;
1648 SysFreeString(pstyle);
1652 hres = set_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, v, 0);
1657 static HRESULT WINAPI HTMLStyle_get_borderStyle(IHTMLStyle *iface, BSTR *p)
1659 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1660 TRACE("(%p)->(%p)\n", This, p);
1661 return get_style_attr(This, STYLEID_BORDER_STYLE, p);
1664 static HRESULT WINAPI HTMLStyle_put_borderTopStyle(IHTMLStyle *iface, BSTR v)
1666 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1667 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1669 if(!is_valid_border_style(v))
1670 return E_INVALIDARG;
1672 return set_style_attr(This, STYLEID_BORDER_TOP_STYLE, v, 0);
1675 static HRESULT WINAPI HTMLStyle_get_borderTopStyle(IHTMLStyle *iface, BSTR *p)
1677 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1678 TRACE("(%p)->(%p)\n", This, p);
1679 return get_style_attr(This, STYLEID_BORDER_TOP_STYLE, p);
1682 static HRESULT WINAPI HTMLStyle_put_borderRightStyle(IHTMLStyle *iface, BSTR v)
1684 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1685 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1687 if(!is_valid_border_style(v))
1688 return E_INVALIDARG;
1690 return set_style_attr(This, STYLEID_BORDER_RIGHT_STYLE, v, 0);
1693 static HRESULT WINAPI HTMLStyle_get_borderRightStyle(IHTMLStyle *iface, BSTR *p)
1695 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1696 TRACE("(%p)->(%p)\n", This, p);
1697 return get_style_attr(This, STYLEID_BORDER_RIGHT_STYLE, p);
1700 static HRESULT WINAPI HTMLStyle_put_borderBottomStyle(IHTMLStyle *iface, BSTR v)
1702 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1703 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1705 if(!is_valid_border_style(v))
1706 return E_INVALIDARG;
1708 return set_style_attr(This, STYLEID_BORDER_BOTTOM_STYLE, v, 0);
1711 static HRESULT WINAPI HTMLStyle_get_borderBottomStyle(IHTMLStyle *iface, BSTR *p)
1713 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1714 TRACE("(%p)->(%p)\n", This, p);
1715 return get_style_attr(This, STYLEID_BORDER_BOTTOM_STYLE, p);
1718 static HRESULT WINAPI HTMLStyle_put_borderLeftStyle(IHTMLStyle *iface, BSTR v)
1720 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1721 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1723 if(!is_valid_border_style(v))
1724 return E_INVALIDARG;
1726 return set_style_attr(This, STYLEID_BORDER_LEFT_STYLE, v, 0);
1729 static HRESULT WINAPI HTMLStyle_get_borderLeftStyle(IHTMLStyle *iface, BSTR *p)
1731 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1732 TRACE("(%p)->(%p)\n", This, p);
1733 return get_style_attr(This, STYLEID_BORDER_LEFT_STYLE, p);
1736 static HRESULT WINAPI HTMLStyle_put_width(IHTMLStyle *iface, VARIANT v)
1738 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1740 TRACE("(%p)->(v%d)\n", This, V_VT(&v));
1744 TRACE("%s\n", debugstr_w(V_BSTR(&v)));
1745 return set_style_attr(This, STYLEID_WIDTH, V_BSTR(&v), 0);
1747 FIXME("unsupported vt %d\n", V_VT(&v));
1753 static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p)
1755 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1757 TRACE("(%p)->(%p)\n", This, p);
1760 return get_style_attr(This, STYLEID_WIDTH, &V_BSTR(p));
1763 static HRESULT WINAPI HTMLStyle_put_height(IHTMLStyle *iface, VARIANT v)
1765 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1767 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1771 return set_style_attr(This, STYLEID_HEIGHT, V_BSTR(&v), 0);
1773 FIXME("unimplemented vt %d\n", V_VT(&v));
1780 static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p)
1782 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1786 TRACE("(%p)->(%p)\n", This, p);
1788 hres = get_style_attr(This, STYLEID_HEIGHT, &ret);
1797 static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v)
1799 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1800 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1804 static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p)
1806 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1807 FIXME("(%p)->(%p)\n", This, p);
1811 static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v)
1813 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1814 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1818 static HRESULT WINAPI HTMLStyle_get_clear(IHTMLStyle *iface, BSTR *p)
1820 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1821 FIXME("(%p)->(%p)\n", This, p);
1825 static HRESULT WINAPI HTMLStyle_put_display(IHTMLStyle *iface, BSTR v)
1827 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1829 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1831 return set_style_attr(This, STYLEID_DISPLAY, v, 0);
1834 static HRESULT WINAPI HTMLStyle_get_display(IHTMLStyle *iface, BSTR *p)
1836 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1838 TRACE("(%p)->(%p)\n", This, p);
1840 return get_style_attr(This, STYLEID_DISPLAY, p);
1843 static HRESULT WINAPI HTMLStyle_put_visibility(IHTMLStyle *iface, BSTR v)
1845 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1847 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1849 return set_style_attr(This, STYLEID_VISIBILITY, v, 0);
1852 static HRESULT WINAPI HTMLStyle_get_visibility(IHTMLStyle *iface, BSTR *p)
1854 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1856 TRACE("(%p)->(%p)\n", This, p);
1858 return get_style_attr(This, STYLEID_VISIBILITY, p);
1861 static HRESULT WINAPI HTMLStyle_put_listStyleType(IHTMLStyle *iface, BSTR v)
1863 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1864 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1868 static HRESULT WINAPI HTMLStyle_get_listStyleType(IHTMLStyle *iface, BSTR *p)
1870 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1871 FIXME("(%p)->(%p)\n", This, p);
1875 static HRESULT WINAPI HTMLStyle_put_listStylePosition(IHTMLStyle *iface, BSTR v)
1877 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1878 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1882 static HRESULT WINAPI HTMLStyle_get_listStylePosition(IHTMLStyle *iface, BSTR *p)
1884 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1885 FIXME("(%p)->(%p)\n", This, p);
1889 static HRESULT WINAPI HTMLStyle_put_listStyleImage(IHTMLStyle *iface, BSTR v)
1891 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1892 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1896 static HRESULT WINAPI HTMLStyle_get_listStyleImage(IHTMLStyle *iface, BSTR *p)
1898 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1899 FIXME("(%p)->(%p)\n", This, p);
1903 static HRESULT WINAPI HTMLStyle_put_listStyle(IHTMLStyle *iface, BSTR v)
1905 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1906 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1910 static HRESULT WINAPI HTMLStyle_get_listStyle(IHTMLStyle *iface, BSTR *p)
1912 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1913 FIXME("(%p)->(%p)\n", This, p);
1917 static HRESULT WINAPI HTMLStyle_put_whiteSpace(IHTMLStyle *iface, BSTR v)
1919 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1920 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1924 static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p)
1926 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1927 FIXME("(%p)->(%p)\n", This, p);
1931 static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v)
1933 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1935 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1937 return set_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, &v, 0);
1940 static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p)
1942 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1946 TRACE("(%p)->(%p)\n", This, p);
1948 hres = get_style_attr(This, STYLEID_TOP, &ret);
1957 static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v)
1959 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1961 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1963 return set_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, &v, 0);
1966 static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p)
1968 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1972 TRACE("(%p)->(%p)\n", This, p);
1974 hres = get_style_attr(This, STYLEID_LEFT, &ret);
1983 static HRESULT WINAPI HTMLStyle_get_position(IHTMLStyle *iface, BSTR *p)
1985 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1986 TRACE("(%p)->(%p)\n", This, p);
1987 return IHTMLStyle2_get_position(HTMLSTYLE2(This), p);
1990 static HRESULT WINAPI HTMLStyle_put_zIndex(IHTMLStyle *iface, VARIANT v)
1992 HTMLStyle *This = HTMLSTYLE_THIS(iface);
1994 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
1998 return set_style_attr(This, STYLEID_Z_INDEX, V_BSTR(&v), 0);
2001 static const WCHAR format[] = {'%','d',0};
2003 wsprintfW(value, format, V_I4(&v));
2004 return set_style_attr(This, STYLEID_Z_INDEX, value, 0);
2007 FIXME("unimplemented vt %d\n", V_VT(&v));
2014 static HRESULT WINAPI HTMLStyle_get_zIndex(IHTMLStyle *iface, VARIANT *p)
2016 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2018 TRACE("(%p)->(%p)\n", This, p);
2020 return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
2023 static HRESULT WINAPI HTMLStyle_put_overflow(IHTMLStyle *iface, BSTR v)
2025 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2026 static const WCHAR szVisible[] = {'v','i','s','i','b','l','e',0};
2027 static const WCHAR szScroll[] = {'s','c','r','o','l','l',0};
2028 static const WCHAR szHidden[] = {'h','i','d','d','e','n',0};
2029 static const WCHAR szAuto[] = {'a','u','t','o',0};
2031 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2033 /* overflow can only be one of the follow values. */
2034 if(!v || !*v || strcmpiW(szVisible, v) == 0 || strcmpiW(szScroll, v) == 0 ||
2035 strcmpiW(szHidden, v) == 0 || strcmpiW(szAuto, v) == 0)
2037 return set_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, v, 0);
2040 return E_INVALIDARG;
2044 static HRESULT WINAPI HTMLStyle_get_overflow(IHTMLStyle *iface, BSTR *p)
2046 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2048 TRACE("(%p)->(%p)\n", This, p);
2051 return E_INVALIDARG;
2053 return get_style_attr(This, STYLEID_OVERFLOW, p);
2056 static HRESULT WINAPI HTMLStyle_put_pageBreakBefore(IHTMLStyle *iface, BSTR v)
2058 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2059 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2063 static HRESULT WINAPI HTMLStyle_get_pageBreakBefore(IHTMLStyle *iface, BSTR *p)
2065 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2066 FIXME("(%p)->(%p)\n", This, p);
2070 static HRESULT WINAPI HTMLStyle_put_pageBreakAfter(IHTMLStyle *iface, BSTR v)
2072 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2073 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2077 static HRESULT WINAPI HTMLStyle_get_pageBreakAfter(IHTMLStyle *iface, BSTR *p)
2079 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2080 FIXME("(%p)->(%p)\n", This, p);
2084 static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
2086 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2090 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2092 nsAString_Init(&text_str, v);
2093 nsres = nsIDOMCSSStyleDeclaration_SetCssText(This->nsstyle, &text_str);
2094 nsAString_Finish(&text_str);
2095 if(NS_FAILED(nsres)) {
2096 FIXME("SetCssStyle failed: %08x\n", nsres);
2103 static HRESULT WINAPI HTMLStyle_get_cssText(IHTMLStyle *iface, BSTR *p)
2105 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2109 TRACE("(%p)->(%p)\n", This, p);
2111 /* FIXME: Gecko style formatting is different than IE (uppercase). */
2112 nsAString_Init(&text_str, NULL);
2113 nsres = nsIDOMCSSStyleDeclaration_GetCssText(This->nsstyle, &text_str);
2114 if(NS_SUCCEEDED(nsres)) {
2115 const PRUnichar *text;
2117 nsAString_GetData(&text_str, &text);
2118 *p = *text ? SysAllocString(text) : NULL;
2120 FIXME("GetCssStyle failed: %08x\n", nsres);
2124 nsAString_Finish(&text_str);
2128 static HRESULT WINAPI HTMLStyle_put_pixelTop(IHTMLStyle *iface, LONG v)
2130 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2131 FIXME("(%p)->()\n", This);
2135 static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, LONG *p)
2137 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2138 FIXME("(%p)->()\n", This);
2142 static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, LONG v)
2144 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2145 FIXME("(%p)->()\n", This);
2149 static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p)
2151 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2152 FIXME("(%p)->()\n", This);
2156 static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v)
2158 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2159 FIXME("(%p)->()\n", This);
2163 static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p)
2165 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2166 FIXME("(%p)->()\n", This);
2170 static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, LONG v)
2172 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2173 FIXME("(%p)->()\n", This);
2177 static HRESULT WINAPI HTMLStyle_get_pixelHeight(IHTMLStyle *iface, LONG *p)
2179 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2180 FIXME("(%p)->()\n", This);
2184 static HRESULT WINAPI HTMLStyle_put_posTop(IHTMLStyle *iface, float v)
2186 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2188 TRACE("(%p)->(%f)\n", This, v);
2190 return set_style_pos(This, STYLEID_TOP, v);
2193 static HRESULT WINAPI HTMLStyle_get_posTop(IHTMLStyle *iface, float *p)
2195 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2197 TRACE("(%p)->(%p)\n", This, p);
2202 return get_nsstyle_pos(This, STYLEID_TOP, p);
2205 static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float v)
2207 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2209 TRACE("(%p)->(%f)\n", This, v);
2211 return set_style_pos(This, STYLEID_LEFT, v);
2214 static HRESULT WINAPI HTMLStyle_get_posLeft(IHTMLStyle *iface, float *p)
2216 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2218 TRACE("(%p)->(%p)\n", This, p);
2223 return get_nsstyle_pos(This, STYLEID_LEFT, p);
2226 static HRESULT WINAPI HTMLStyle_put_posWidth(IHTMLStyle *iface, float v)
2228 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2230 TRACE("(%p)->(%f)\n", This, v);
2232 return set_style_pos(This, STYLEID_WIDTH, v);
2235 static HRESULT WINAPI HTMLStyle_get_posWidth(IHTMLStyle *iface, float *p)
2237 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2239 TRACE("(%p)->(%p)\n", This, p);
2244 if(get_nsstyle_pos(This, STYLEID_WIDTH, p) != S_OK)
2250 static HRESULT WINAPI HTMLStyle_put_posHeight(IHTMLStyle *iface, float v)
2252 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2254 TRACE("(%p)->(%f)\n", This, v);
2256 return set_style_pos(This, STYLEID_HEIGHT, v);
2259 static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p)
2261 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2263 TRACE("(%p)->(%p)\n", This, p);
2268 if(get_nsstyle_pos(This, STYLEID_HEIGHT, p) != S_OK)
2274 static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v)
2276 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2278 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
2280 return set_style_attr(This, STYLEID_CURSOR, v, 0);
2283 static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p)
2285 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2287 TRACE("(%p)->(%p)\n", This, p);
2289 return get_style_attr(This, STYLEID_CURSOR, p);
2292 static HRESULT WINAPI HTMLStyle_put_clip(IHTMLStyle *iface, BSTR v)
2294 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2295 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
2299 static HRESULT WINAPI HTMLStyle_get_clip(IHTMLStyle *iface, BSTR *p)
2301 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2302 FIXME("(%p)->(%p)\n", This, p);
2306 static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v)
2308 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2310 WARN("(%p)->(%s)\n", This, debugstr_w(v));
2312 /* FIXME: Handle MS-style filters */
2313 return set_style_attr(This, STYLEID_FILTER, v, 0);
2316 static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p)
2318 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2320 WARN("(%p)->(%p)\n", This, p);
2322 /* FIXME: Handle MS-style filters */
2323 return get_style_attr(This, STYLEID_FILTER, p);
2326 static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2327 VARIANT AttributeValue, LONG lFlags)
2329 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2333 TRACE("(%p)->(%s v%d %08x)\n", This, debugstr_w(strAttributeName),
2334 V_VT(&AttributeValue), lFlags);
2336 if(!strAttributeName)
2337 return E_INVALIDARG;
2340 FIXME("Parameter lFlags ignored\n");
2342 hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
2343 LOCALE_USER_DEFAULT, &dispid);
2347 DISPID dispidNamed = DISPID_PROPERTYPUT;
2351 params.rgvarg = &AttributeValue;
2352 params.cNamedArgs = 1;
2353 params.rgdispidNamedArgs = &dispidNamed;
2355 hres = HTMLStyle_Invoke(iface, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
2356 DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, NULL);
2360 FIXME("Custom attributes not supported.\n");
2363 TRACE("ret: %08x\n", hres);
2368 static HRESULT WINAPI HTMLStyle_getAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2369 LONG lFlags, VARIANT *AttributeValue)
2371 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2375 TRACE("(%p)->(%s v%p %08x)\n", This, debugstr_w(strAttributeName),
2376 AttributeValue, lFlags);
2378 if(!AttributeValue || !strAttributeName)
2379 return E_INVALIDARG;
2382 FIXME("Parameter lFlags ignored\n");
2384 hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
2385 LOCALE_USER_DEFAULT, &dispid);
2388 DISPPARAMS params = {NULL, NULL, 0, 0 };
2390 hres = HTMLStyle_Invoke(iface, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
2391 DISPATCH_PROPERTYGET, ¶ms, AttributeValue, NULL, NULL);
2395 FIXME("Custom attributes not supported.\n");
2401 static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttributeName,
2402 LONG lFlags, VARIANT_BOOL *pfSuccess)
2404 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2405 FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
2410 static HRESULT WINAPI HTMLStyle_toString(IHTMLStyle *iface, BSTR *String)
2412 HTMLStyle *This = HTMLSTYLE_THIS(iface);
2413 FIXME("(%p)->(%p)\n", This, String);
2417 static HRESULT HTMLStyle_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid)
2419 int c, i, min=0, max = sizeof(style_tbl)/sizeof(*style_tbl)-1;
2424 c = strcmpW(style_tbl[i].name, name);
2426 *dispid = style_tbl[i].dispid;
2436 return DISP_E_UNKNOWNNAME;
2439 static const IHTMLStyleVtbl HTMLStyleVtbl = {
2440 HTMLStyle_QueryInterface,
2443 HTMLStyle_GetTypeInfoCount,
2444 HTMLStyle_GetTypeInfo,
2445 HTMLStyle_GetIDsOfNames,
2447 HTMLStyle_put_fontFamily,
2448 HTMLStyle_get_fontFamily,
2449 HTMLStyle_put_fontStyle,
2450 HTMLStyle_get_fontStyle,
2451 HTMLStyle_put_fontVariant,
2452 HTMLStyle_get_fontVariant,
2453 HTMLStyle_put_fontWeight,
2454 HTMLStyle_get_fontWeight,
2455 HTMLStyle_put_fontSize,
2456 HTMLStyle_get_fontSize,
2459 HTMLStyle_put_color,
2460 HTMLStyle_get_color,
2461 HTMLStyle_put_background,
2462 HTMLStyle_get_background,
2463 HTMLStyle_put_backgroundColor,
2464 HTMLStyle_get_backgroundColor,
2465 HTMLStyle_put_backgroundImage,
2466 HTMLStyle_get_backgroundImage,
2467 HTMLStyle_put_backgroundRepeat,
2468 HTMLStyle_get_backgroundRepeat,
2469 HTMLStyle_put_backgroundAttachment,
2470 HTMLStyle_get_backgroundAttachment,
2471 HTMLStyle_put_backgroundPosition,
2472 HTMLStyle_get_backgroundPosition,
2473 HTMLStyle_put_backgroundPositionX,
2474 HTMLStyle_get_backgroundPositionX,
2475 HTMLStyle_put_backgroundPositionY,
2476 HTMLStyle_get_backgroundPositionY,
2477 HTMLStyle_put_wordSpacing,
2478 HTMLStyle_get_wordSpacing,
2479 HTMLStyle_put_letterSpacing,
2480 HTMLStyle_get_letterSpacing,
2481 HTMLStyle_put_textDecoration,
2482 HTMLStyle_get_textDecoration,
2483 HTMLStyle_put_textDecorationNone,
2484 HTMLStyle_get_textDecorationNone,
2485 HTMLStyle_put_textDecorationUnderline,
2486 HTMLStyle_get_textDecorationUnderline,
2487 HTMLStyle_put_textDecorationOverline,
2488 HTMLStyle_get_textDecorationOverline,
2489 HTMLStyle_put_textDecorationLineThrough,
2490 HTMLStyle_get_textDecorationLineThrough,
2491 HTMLStyle_put_textDecorationBlink,
2492 HTMLStyle_get_textDecorationBlink,
2493 HTMLStyle_put_verticalAlign,
2494 HTMLStyle_get_verticalAlign,
2495 HTMLStyle_put_textTransform,
2496 HTMLStyle_get_textTransform,
2497 HTMLStyle_put_textAlign,
2498 HTMLStyle_get_textAlign,
2499 HTMLStyle_put_textIndent,
2500 HTMLStyle_get_textIndent,
2501 HTMLStyle_put_lineHeight,
2502 HTMLStyle_get_lineHeight,
2503 HTMLStyle_put_marginTop,
2504 HTMLStyle_get_marginTop,
2505 HTMLStyle_put_marginRight,
2506 HTMLStyle_get_marginRight,
2507 HTMLStyle_put_marginBottom,
2508 HTMLStyle_get_marginBottom,
2509 HTMLStyle_put_marginLeft,
2510 HTMLStyle_get_marginLeft,
2511 HTMLStyle_put_margin,
2512 HTMLStyle_get_margin,
2513 HTMLStyle_put_paddingTop,
2514 HTMLStyle_get_paddingTop,
2515 HTMLStyle_put_paddingRight,
2516 HTMLStyle_get_paddingRight,
2517 HTMLStyle_put_paddingBottom,
2518 HTMLStyle_get_paddingBottom,
2519 HTMLStyle_put_paddingLeft,
2520 HTMLStyle_get_paddingLeft,
2521 HTMLStyle_put_padding,
2522 HTMLStyle_get_padding,
2523 HTMLStyle_put_border,
2524 HTMLStyle_get_border,
2525 HTMLStyle_put_borderTop,
2526 HTMLStyle_get_borderTop,
2527 HTMLStyle_put_borderRight,
2528 HTMLStyle_get_borderRight,
2529 HTMLStyle_put_borderBottom,
2530 HTMLStyle_get_borderBottom,
2531 HTMLStyle_put_borderLeft,
2532 HTMLStyle_get_borderLeft,
2533 HTMLStyle_put_borderColor,
2534 HTMLStyle_get_borderColor,
2535 HTMLStyle_put_borderTopColor,
2536 HTMLStyle_get_borderTopColor,
2537 HTMLStyle_put_borderRightColor,
2538 HTMLStyle_get_borderRightColor,
2539 HTMLStyle_put_borderBottomColor,
2540 HTMLStyle_get_borderBottomColor,
2541 HTMLStyle_put_borderLeftColor,
2542 HTMLStyle_get_borderLeftColor,
2543 HTMLStyle_put_borderWidth,
2544 HTMLStyle_get_borderWidth,
2545 HTMLStyle_put_borderTopWidth,
2546 HTMLStyle_get_borderTopWidth,
2547 HTMLStyle_put_borderRightWidth,
2548 HTMLStyle_get_borderRightWidth,
2549 HTMLStyle_put_borderBottomWidth,
2550 HTMLStyle_get_borderBottomWidth,
2551 HTMLStyle_put_borderLeftWidth,
2552 HTMLStyle_get_borderLeftWidth,
2553 HTMLStyle_put_borderStyle,
2554 HTMLStyle_get_borderStyle,
2555 HTMLStyle_put_borderTopStyle,
2556 HTMLStyle_get_borderTopStyle,
2557 HTMLStyle_put_borderRightStyle,
2558 HTMLStyle_get_borderRightStyle,
2559 HTMLStyle_put_borderBottomStyle,
2560 HTMLStyle_get_borderBottomStyle,
2561 HTMLStyle_put_borderLeftStyle,
2562 HTMLStyle_get_borderLeftStyle,
2563 HTMLStyle_put_width,
2564 HTMLStyle_get_width,
2565 HTMLStyle_put_height,
2566 HTMLStyle_get_height,
2567 HTMLStyle_put_styleFloat,
2568 HTMLStyle_get_styleFloat,
2569 HTMLStyle_put_clear,
2570 HTMLStyle_get_clear,
2571 HTMLStyle_put_display,
2572 HTMLStyle_get_display,
2573 HTMLStyle_put_visibility,
2574 HTMLStyle_get_visibility,
2575 HTMLStyle_put_listStyleType,
2576 HTMLStyle_get_listStyleType,
2577 HTMLStyle_put_listStylePosition,
2578 HTMLStyle_get_listStylePosition,
2579 HTMLStyle_put_listStyleImage,
2580 HTMLStyle_get_listStyleImage,
2581 HTMLStyle_put_listStyle,
2582 HTMLStyle_get_listStyle,
2583 HTMLStyle_put_whiteSpace,
2584 HTMLStyle_get_whiteSpace,
2589 HTMLStyle_get_position,
2590 HTMLStyle_put_zIndex,
2591 HTMLStyle_get_zIndex,
2592 HTMLStyle_put_overflow,
2593 HTMLStyle_get_overflow,
2594 HTMLStyle_put_pageBreakBefore,
2595 HTMLStyle_get_pageBreakBefore,
2596 HTMLStyle_put_pageBreakAfter,
2597 HTMLStyle_get_pageBreakAfter,
2598 HTMLStyle_put_cssText,
2599 HTMLStyle_get_cssText,
2600 HTMLStyle_put_pixelTop,
2601 HTMLStyle_get_pixelTop,
2602 HTMLStyle_put_pixelLeft,
2603 HTMLStyle_get_pixelLeft,
2604 HTMLStyle_put_pixelWidth,
2605 HTMLStyle_get_pixelWidth,
2606 HTMLStyle_put_pixelHeight,
2607 HTMLStyle_get_pixelHeight,
2608 HTMLStyle_put_posTop,
2609 HTMLStyle_get_posTop,
2610 HTMLStyle_put_posLeft,
2611 HTMLStyle_get_posLeft,
2612 HTMLStyle_put_posWidth,
2613 HTMLStyle_get_posWidth,
2614 HTMLStyle_put_posHeight,
2615 HTMLStyle_get_posHeight,
2616 HTMLStyle_put_cursor,
2617 HTMLStyle_get_cursor,
2620 HTMLStyle_put_filter,
2621 HTMLStyle_get_filter,
2622 HTMLStyle_setAttribute,
2623 HTMLStyle_getAttribute,
2624 HTMLStyle_removeAttribute,
2628 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl = {
2630 HTMLStyle_get_dispid,
2634 static const tid_t HTMLStyle_iface_tids[] = {
2641 static dispex_static_data_t HTMLStyle_dispex = {
2642 &HTMLStyle_dispex_vtbl,
2645 HTMLStyle_iface_tids
2648 IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle)
2650 HTMLStyle *ret = heap_alloc_zero(sizeof(HTMLStyle));
2652 ret->lpHTMLStyleVtbl = &HTMLStyleVtbl;
2654 ret->nsstyle = nsstyle;
2655 HTMLStyle2_Init(ret);
2656 HTMLStyle3_Init(ret);
2658 nsIDOMCSSStyleDeclaration_AddRef(nsstyle);
2660 init_dispex(&ret->dispex, (IUnknown*)HTMLSTYLE(ret), &HTMLStyle_dispex);
2662 return HTMLSTYLE(ret);