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 attrBackgroundRepeat
[] =
45 {'b','a','c','k','g','r','o','u','n','d','-','r','e','p','e','a','t',0};
46 static const WCHAR attrBorder
[] =
47 {'b','o','r','d','e','r',0};
48 static const WCHAR attrBorderBottomStyle
[] =
49 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e',0};
50 static const WCHAR attrBorderLeft
[] =
51 {'b','o','r','d','e','r','-','l','e','f','t',0};
52 static const WCHAR attrBorderLeftStyle
[] =
53 {'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0};
54 static const WCHAR attrBorderRightStyle
[] =
55 {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
56 static const WCHAR attrBorderTopStyle
[] =
57 {'b','o','r','d','e','r','-','t','o','p','-','s','t','y','l','e',0};
58 static const WCHAR attrBorderWidth
[] =
59 {'b','o','r','d','e','r','-','w','i','d','t','h',0};
60 static const WCHAR attrColor
[] =
61 {'c','o','l','o','r',0};
62 static const WCHAR attrCursor
[] =
63 {'c','u','r','s','o','r',0};
64 static const WCHAR attrDisplay
[] =
65 {'d','i','s','p','l','a','y',0};
66 static const WCHAR attrFilter
[] =
67 {'f','i','l','e','t','e','r',0};
68 static const WCHAR attrFontFamily
[] =
69 {'f','o','n','t','-','f','a','m','i','l','y',0};
70 static const WCHAR attrFontSize
[] =
71 {'f','o','n','t','-','s','i','z','e',0};
72 static const WCHAR attrFontStyle
[] =
73 {'f','o','n','t','-','s','t','y','l','e',0};
74 static const WCHAR attrFontVariant
[] =
75 {'f','o','n','t','-','v','a','r','i','a','n','t',0};
76 static const WCHAR attrFontWeight
[] =
77 {'f','o','n','t','-','w','e','i','g','h','t',0};
78 static const WCHAR attrHeight
[] =
79 {'h','e','i','g','h','t',0};
80 static const WCHAR attrLeft
[] =
82 static const WCHAR attrMargin
[] =
83 {'m','a','r','g','i','n',0};
84 static const WCHAR attrMarginLeft
[] =
85 {'m','a','r','g','i','n','-','l','e','f','t',0};
86 static const WCHAR attrMarginRight
[] =
87 {'m','a','r','g','i','n','-','r','i','g','h','t',0};
88 static const WCHAR attrMinHeight
[] =
89 {'m','i','n','-','h','e','i','g','h','t',0};
90 static const WCHAR attrOverflow
[] =
91 {'o','v','e','r','f','l','o','w',0};
92 static const WCHAR attrPaddingLeft
[] =
93 {'p','a','d','d','i','n','g','-','l','e','f','t',0};
94 static const WCHAR attrPosition
[] =
95 {'p','o','s','i','t','i','o','n',0};
96 static const WCHAR attrTextAlign
[] =
97 {'t','e','x','t','-','a','l','i','g','n',0};
98 static const WCHAR attrTextDecoration
[] =
99 {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
100 static const WCHAR attrTop
[] =
102 static const WCHAR attrVerticalAlign
[] =
103 {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
104 static const WCHAR attrVisibility
[] =
105 {'v','i','s','i','b','i','l','i','t','y',0};
106 static const WCHAR attrWidth
[] =
107 {'w','i','d','t','h',0};
108 static const WCHAR attrZIndex
[] =
109 {'z','-','i','n','d','e','x',0};
115 {attrBackground
, DISPID_IHTMLSTYLE_BACKGROUND
},
116 {attrBackgroundColor
, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR
},
117 {attrBackgroundImage
, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE
},
118 {attrBackgroundRepeat
, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT
},
119 {attrBorder
, DISPID_IHTMLSTYLE_BORDER
},
120 {attrBorderBottomStyle
, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE
},
121 {attrBorderLeft
, DISPID_IHTMLSTYLE_BORDERLEFT
},
122 {attrBorderLeftStyle
, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE
},
123 {attrBorderRightStyle
, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE
},
124 {attrBorderTopStyle
, DISPID_IHTMLSTYLE_BORDERTOPSTYLE
},
125 {attrBorderWidth
, DISPID_IHTMLSTYLE_BORDERWIDTH
},
126 {attrColor
, DISPID_IHTMLSTYLE_COLOR
},
127 {attrCursor
, DISPID_IHTMLSTYLE_CURSOR
},
128 {attrDisplay
, DISPID_IHTMLSTYLE_DISPLAY
},
129 {attrFilter
, DISPID_IHTMLSTYLE_FILTER
},
130 {attrFontFamily
, DISPID_IHTMLSTYLE_FONTFAMILY
},
131 {attrFontSize
, DISPID_IHTMLSTYLE_FONTSIZE
},
132 {attrFontStyle
, DISPID_IHTMLSTYLE_FONTSTYLE
},
133 {attrFontVariant
, DISPID_IHTMLSTYLE_FONTVARIANT
},
134 {attrFontWeight
, DISPID_IHTMLSTYLE_FONTWEIGHT
},
135 {attrHeight
, DISPID_IHTMLSTYLE_HEIGHT
},
136 {attrLeft
, DISPID_IHTMLSTYLE_LEFT
},
137 {attrMargin
, DISPID_IHTMLSTYLE_MARGIN
},
138 {attrMarginLeft
, DISPID_IHTMLSTYLE_MARGINLEFT
},
139 {attrMarginRight
, DISPID_IHTMLSTYLE_MARGINRIGHT
},
140 {attrMinHeight
, DISPID_IHTMLSTYLE4_MINHEIGHT
},
141 {attrOverflow
, DISPID_IHTMLSTYLE_OVERFLOW
},
142 {attrPaddingLeft
, DISPID_IHTMLSTYLE_PADDINGLEFT
},
143 {attrPosition
, DISPID_IHTMLSTYLE2_POSITION
},
144 {attrTextAlign
, DISPID_IHTMLSTYLE_TEXTALIGN
},
145 {attrTextDecoration
, DISPID_IHTMLSTYLE_TEXTDECORATION
},
146 {attrTop
, DISPID_IHTMLSTYLE_TOP
},
147 {attrVerticalAlign
, DISPID_IHTMLSTYLE_VERTICALALIGN
},
148 {attrVisibility
, DISPID_IHTMLSTYLE_VISIBILITY
},
149 {attrWidth
, DISPID_IHTMLSTYLE_WIDTH
},
150 {attrZIndex
, DISPID_IHTMLSTYLE_ZINDEX
}
153 static const WCHAR valLineThrough
[] =
154 {'l','i','n','e','-','t','h','r','o','u','g','h',0};
155 static const WCHAR valUnderline
[] =
156 {'u','n','d','e','r','l','i','n','e',0};
157 static const WCHAR szNormal
[] =
158 {'n','o','r','m','a','l',0};
159 static const WCHAR styleNone
[] =
162 static const WCHAR px_formatW
[] = {'%','d','p','x',0};
163 static const WCHAR emptyW
[] = {0};
165 static LPWSTR
fix_px_value(LPCWSTR val
)
170 while(*ptr
&& isspaceW(*ptr
))
175 while(*ptr
&& isdigitW(*ptr
))
178 if(!*ptr
|| isspaceW(*ptr
)) {
180 int len
= strlenW(val
)+1;
182 ret
= heap_alloc((len
+2)*sizeof(WCHAR
));
183 memcpy(ret
, val
, (ptr
-val
)*sizeof(WCHAR
));
189 TRACE("fixed %s -> %s\n", debugstr_w(val
), debugstr_w(ret
));
194 while(*ptr
&& !isspaceW(*ptr
))
201 static LPWSTR
fix_url_value(LPCWSTR val
)
205 static const WCHAR urlW
[] = {'u','r','l','('};
207 if(strncmpW(val
, urlW
, sizeof(urlW
)/sizeof(WCHAR
)) || !strchrW(val
, '\\'))
210 ret
= heap_strdupW(val
);
212 for(ptr
= ret
; *ptr
; ptr
++) {
220 HRESULT
set_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
222 nsAString str_name
, str_value
, str_empty
;
226 static const PRUnichar wszEmpty
[] = {0};
228 if(flags
& ATTR_FIX_PX
)
229 val
= fix_px_value(value
);
230 if(flags
& ATTR_FIX_URL
)
231 val
= fix_url_value(value
);
233 nsAString_Init(&str_name
, style_tbl
[sid
].name
);
234 nsAString_Init(&str_value
, val
? val
: value
);
235 nsAString_Init(&str_empty
, wszEmpty
);
238 nsres
= nsIDOMCSSStyleDeclaration_SetProperty(nsstyle
, &str_name
, &str_value
, &str_empty
);
240 ERR("SetProperty failed: %08x\n", nsres
);
242 nsAString_Finish(&str_name
);
243 nsAString_Finish(&str_value
);
244 nsAString_Finish(&str_empty
);
249 HRESULT
set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*value
, DWORD flags
)
251 switch(V_VT(value
)) {
253 return set_nsstyle_attr(nsstyle
, sid
, emptyW
, flags
);
256 return set_nsstyle_attr(nsstyle
, sid
, V_BSTR(value
), flags
);
260 static const WCHAR format
[] = {'%','d',0};
262 wsprintfW(str
, format
, V_I4(value
));
263 return set_nsstyle_attr(nsstyle
, sid
, str
, flags
);
266 FIXME("not implemented vt %d\n", V_VT(value
));
274 static inline HRESULT
set_style_attr(HTMLStyle
*This
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
276 return set_nsstyle_attr(This
->nsstyle
, sid
, value
, flags
);
279 static HRESULT
get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, nsAString
*value
)
284 nsAString_Init(&str_name
, style_tbl
[sid
].name
);
286 nsres
= nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle
, &str_name
, value
);
287 if(NS_FAILED(nsres
)) {
288 ERR("SetProperty failed: %08x\n", nsres
);
292 nsAString_Finish(&str_name
);
297 HRESULT
get_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, BSTR
*p
)
300 const PRUnichar
*value
;
302 nsAString_Init(&str_value
, NULL
);
304 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
306 nsAString_GetData(&str_value
, &value
);
307 *p
= *value
? SysAllocString(value
) : NULL
;
309 nsAString_Finish(&str_value
);
311 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_w(*p
));
315 HRESULT
get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*p
, DWORD flags
)
318 const PRUnichar
*value
;
321 nsAString_Init(&str_value
, NULL
);
323 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
325 nsAString_GetData(&str_value
, &value
);
327 if(flags
& ATTR_STR_TO_INT
) {
328 const PRUnichar
*ptr
= value
;
337 while(isdigitW(*ptr
))
338 i
= i
*10 + (*ptr
++ - '0');
342 V_I4(p
) = neg
? -i
: i
;
351 str
= SysAllocString(value
);
353 return E_OUTOFMEMORY
;
360 nsAString_Finish(&str_value
);
362 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_variant(p
));
366 static inline HRESULT
get_style_attr(HTMLStyle
*This
, styleid_t sid
, BSTR
*p
)
368 return get_nsstyle_attr(This
->nsstyle
, sid
, p
);
371 static HRESULT
check_style_attr_value(HTMLStyle
*This
, styleid_t sid
, LPCWSTR exval
, VARIANT_BOOL
*p
)
374 const PRUnichar
*value
;
376 nsAString_Init(&str_value
, NULL
);
378 get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
380 nsAString_GetData(&str_value
, &value
);
381 *p
= strcmpW(value
, exval
) ? VARIANT_FALSE
: VARIANT_TRUE
;
382 nsAString_Finish(&str_value
);
384 TRACE("%s -> %x\n", debugstr_w(style_tbl
[sid
].name
), *p
);
388 static inline HRESULT
set_style_pos(HTMLStyle
*This
, styleid_t sid
, float value
)
391 WCHAR szFormat
[] = {'%','.','0','f','p','x',0};
393 value
= floor(value
);
395 sprintfW(szValue
, szFormat
, value
);
397 return set_style_attr(This
, sid
, szValue
, 0);
400 static HRESULT
get_nsstyle_pos(HTMLStyle
*This
, styleid_t sid
, float *p
)
404 WCHAR pxW
[] = {'p','x',0};
406 TRACE("%p %d %p\n", This
, sid
, p
);
410 nsAString_Init(&str_value
, NULL
);
412 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
416 const PRUnichar
*value
;
418 nsAString_GetData(&str_value
, &value
);
421 *p
= strtolW(value
, &ptr
, 10);
423 if(*ptr
&& strcmpW(ptr
, pxW
))
425 nsAString_Finish(&str_value
);
426 FIXME("only px values are currently supported\n");
432 TRACE("ret %f\n", *p
);
434 nsAString_Finish(&str_value
);
439 static BOOL
is_valid_border_style(BSTR v
)
441 static const WCHAR styleDotted
[] = {'d','o','t','t','e','d',0};
442 static const WCHAR styleDashed
[] = {'d','a','s','h','e','d',0};
443 static const WCHAR styleSolid
[] = {'s','o','l','i','d',0};
444 static const WCHAR styleDouble
[] = {'d','o','u','b','l','e',0};
445 static const WCHAR styleGroove
[] = {'g','r','o','o','v','e',0};
446 static const WCHAR styleRidge
[] = {'r','i','d','g','e',0};
447 static const WCHAR styleInset
[] = {'i','n','s','e','t',0};
448 static const WCHAR styleOutset
[] = {'o','u','t','s','e','t',0};
450 TRACE("%s\n", debugstr_w(v
));
452 if(!v
|| strcmpiW(v
, styleNone
) == 0 || strcmpiW(v
, styleDotted
) == 0 ||
453 strcmpiW(v
, styleDashed
) == 0 || strcmpiW(v
, styleSolid
) == 0 ||
454 strcmpiW(v
, styleDouble
) == 0 || strcmpiW(v
, styleGroove
) == 0 ||
455 strcmpiW(v
, styleRidge
) == 0 || strcmpiW(v
, styleInset
) == 0 ||
456 strcmpiW(v
, styleOutset
) == 0 )
464 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
466 static HRESULT WINAPI
HTMLStyle_QueryInterface(IHTMLStyle
*iface
, REFIID riid
, void **ppv
)
468 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
472 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
473 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
474 *ppv
= HTMLSTYLE(This
);
475 }else if(IsEqualGUID(&IID_IHTMLStyle
, riid
)) {
476 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This
, ppv
);
477 *ppv
= HTMLSTYLE(This
);
478 }else if(IsEqualGUID(&IID_IHTMLStyle2
, riid
)) {
479 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This
, ppv
);
480 *ppv
= HTMLSTYLE2(This
);
481 }else if(IsEqualGUID(&IID_IHTMLStyle3
, riid
)) {
482 TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This
, ppv
);
483 *ppv
= HTMLSTYLE3(This
);
484 }else if(IsEqualGUID(&IID_IHTMLStyle4
, riid
)) {
485 TRACE("(%p)->(IID_IHTMLStyle4 %p)\n", This
, ppv
);
486 *ppv
= HTMLSTYLE4(This
);
487 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
488 return *ppv
? S_OK
: E_NOINTERFACE
;
492 IUnknown_AddRef((IUnknown
*)*ppv
);
496 WARN("unsupported %s\n", debugstr_guid(riid
));
497 return E_NOINTERFACE
;
500 static ULONG WINAPI
HTMLStyle_AddRef(IHTMLStyle
*iface
)
502 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
503 LONG ref
= InterlockedIncrement(&This
->ref
);
505 TRACE("(%p) ref=%d\n", This
, ref
);
510 static ULONG WINAPI
HTMLStyle_Release(IHTMLStyle
*iface
)
512 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
513 LONG ref
= InterlockedDecrement(&This
->ref
);
515 TRACE("(%p) ref=%d\n", This
, ref
);
519 nsIDOMCSSStyleDeclaration_Release(This
->nsstyle
);
526 static HRESULT WINAPI
HTMLStyle_GetTypeInfoCount(IHTMLStyle
*iface
, UINT
*pctinfo
)
528 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
529 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This
->dispex
), pctinfo
);
532 static HRESULT WINAPI
HTMLStyle_GetTypeInfo(IHTMLStyle
*iface
, UINT iTInfo
,
533 LCID lcid
, ITypeInfo
**ppTInfo
)
535 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
536 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->dispex
), iTInfo
, lcid
, ppTInfo
);
539 static HRESULT WINAPI
HTMLStyle_GetIDsOfNames(IHTMLStyle
*iface
, REFIID riid
,
540 LPOLESTR
*rgszNames
, UINT cNames
,
541 LCID lcid
, DISPID
*rgDispId
)
543 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
544 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
547 static HRESULT WINAPI
HTMLStyle_Invoke(IHTMLStyle
*iface
, DISPID dispIdMember
,
548 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
549 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
551 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
552 return IDispatchEx_Invoke(DISPATCHEX(&This
->dispex
), dispIdMember
, riid
, lcid
,
553 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
556 static HRESULT WINAPI
HTMLStyle_put_fontFamily(IHTMLStyle
*iface
, BSTR v
)
558 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
560 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
562 return set_style_attr(This
, STYLEID_FONT_FAMILY
, v
, 0);
565 static HRESULT WINAPI
HTMLStyle_get_fontFamily(IHTMLStyle
*iface
, BSTR
*p
)
567 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
569 TRACE("(%p)->(%p)\n", This
, p
);
571 return get_style_attr(This
, STYLEID_FONT_FAMILY
, p
);
574 static HRESULT WINAPI
HTMLStyle_put_fontStyle(IHTMLStyle
*iface
, BSTR v
)
576 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
577 static const WCHAR szItalic
[] = {'i','t','a','l','i','c',0};
578 static const WCHAR szOblique
[] = {'o','b','l','i','q','u','e',0};
580 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
582 /* fontStyle can only be one of the follow values. */
583 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(szItalic
, v
) == 0 ||
584 strcmpiW(szOblique
, v
) == 0)
586 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_STYLE
, v
, 0);
592 static HRESULT WINAPI
HTMLStyle_get_fontStyle(IHTMLStyle
*iface
, BSTR
*p
)
594 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
596 TRACE("(%p)->(%p)\n", This
, p
);
598 return get_style_attr(This
, STYLEID_FONT_STYLE
, p
);
601 static HRESULT WINAPI
HTMLStyle_put_fontVariant(IHTMLStyle
*iface
, BSTR v
)
603 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
604 static const WCHAR szCaps
[] = {'s','m','a','l','l','-','c','a','p','s',0};
606 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
608 /* fontVariant can only be one of the follow values. */
609 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(szCaps
, v
) == 0)
611 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_VARIANT
, v
, 0);
617 static HRESULT WINAPI
HTMLStyle_get_fontVariant(IHTMLStyle
*iface
, BSTR
*p
)
619 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
620 TRACE("(%p)->(%p)\n", This
, p
);
625 return get_style_attr(This
, STYLEID_FONT_VARIANT
, p
);
628 static HRESULT WINAPI
HTMLStyle_put_fontWeight(IHTMLStyle
*iface
, BSTR v
)
630 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
631 static const WCHAR styleBold
[] = {'b','o','l','d',0};
632 static const WCHAR styleBolder
[] = {'b','o','l','d','e','r',0};
633 static const WCHAR styleLighter
[] = {'l','i','g','h','t','e','r',0};
634 static const WCHAR style100
[] = {'1','0','0',0};
635 static const WCHAR style200
[] = {'2','0','0',0};
636 static const WCHAR style300
[] = {'3','0','0',0};
637 static const WCHAR style400
[] = {'4','0','0',0};
638 static const WCHAR style500
[] = {'5','0','0',0};
639 static const WCHAR style600
[] = {'6','0','0',0};
640 static const WCHAR style700
[] = {'7','0','0',0};
641 static const WCHAR style800
[] = {'8','0','0',0};
642 static const WCHAR style900
[] = {'9','0','0',0};
644 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
646 /* fontWeight can only be one of the following */
647 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(styleBold
, v
) == 0 ||
648 strcmpiW(styleBolder
, v
) == 0 || strcmpiW(styleLighter
, v
) == 0 ||
649 strcmpiW(style100
, v
) == 0 || strcmpiW(style200
, v
) == 0 ||
650 strcmpiW(style300
, v
) == 0 || strcmpiW(style400
, v
) == 0 ||
651 strcmpiW(style500
, v
) == 0 || strcmpiW(style600
, v
) == 0 ||
652 strcmpiW(style700
, v
) == 0 || strcmpiW(style800
, v
) == 0 ||
653 strcmpiW(style900
, v
) == 0
656 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_WEIGHT
, v
, 0);
662 static HRESULT WINAPI
HTMLStyle_get_fontWeight(IHTMLStyle
*iface
, BSTR
*p
)
664 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
666 TRACE("(%p)->(%p)\n", This
, p
);
668 return get_style_attr(This
, STYLEID_FONT_WEIGHT
, p
);
671 static HRESULT WINAPI
HTMLStyle_put_fontSize(IHTMLStyle
*iface
, VARIANT v
)
673 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
675 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
679 return set_style_attr(This
, STYLEID_FONT_SIZE
, V_BSTR(&v
), 0);
681 FIXME("not supported vt %d\n", V_VT(&v
));
687 static HRESULT WINAPI
HTMLStyle_get_fontSize(IHTMLStyle
*iface
, VARIANT
*p
)
689 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
691 TRACE("(%p)->(%p)\n", This
, p
);
694 return get_style_attr(This
, STYLEID_FONT_SIZE
, &V_BSTR(p
));
697 static HRESULT WINAPI
HTMLStyle_put_font(IHTMLStyle
*iface
, BSTR v
)
699 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
700 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
704 static HRESULT WINAPI
HTMLStyle_get_font(IHTMLStyle
*iface
, BSTR
*p
)
706 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
707 FIXME("(%p)->(%p)\n", This
, p
);
711 static HRESULT WINAPI
HTMLStyle_put_color(IHTMLStyle
*iface
, VARIANT v
)
713 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
715 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
719 TRACE("%s\n", debugstr_w(V_BSTR(&v
)));
720 return set_style_attr(This
, STYLEID_COLOR
, V_BSTR(&v
), 0);
723 FIXME("unsupported vt=%d\n", V_VT(&v
));
729 static HRESULT WINAPI
HTMLStyle_get_color(IHTMLStyle
*iface
, VARIANT
*p
)
731 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
733 TRACE("(%p)->(%p)\n", This
, p
);
736 return get_style_attr(This
, STYLEID_COLOR
, &V_BSTR(p
));
739 static HRESULT WINAPI
HTMLStyle_put_background(IHTMLStyle
*iface
, BSTR v
)
741 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
743 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
745 return set_style_attr(This
, STYLEID_BACKGROUND
, v
, 0);
748 static HRESULT WINAPI
HTMLStyle_get_background(IHTMLStyle
*iface
, BSTR
*p
)
750 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
752 TRACE("(%p)->(%p)\n", This
, p
);
754 return get_style_attr(This
, STYLEID_BACKGROUND
, p
);
757 static HRESULT WINAPI
HTMLStyle_put_backgroundColor(IHTMLStyle
*iface
, VARIANT v
)
759 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
761 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
765 return set_style_attr(This
, STYLEID_BACKGROUND_COLOR
, V_BSTR(&v
), 0);
768 static const WCHAR format
[] = {'#','%','0','6','x',0};
770 wsprintfW(value
, format
, V_I4(&v
));
771 return set_style_attr(This
, STYLEID_BACKGROUND_COLOR
, value
, 0);
774 FIXME("unsupported vt %d\n", V_VT(&v
));
780 static HRESULT WINAPI
HTMLStyle_get_backgroundColor(IHTMLStyle
*iface
, VARIANT
*p
)
782 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
783 TRACE("(%p)->(%p)\n", This
, p
);
786 return get_style_attr(This
, STYLEID_BACKGROUND_COLOR
, &V_BSTR(p
));
789 static HRESULT WINAPI
HTMLStyle_put_backgroundImage(IHTMLStyle
*iface
, BSTR v
)
791 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
793 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
795 return set_style_attr(This
, STYLEID_BACKGROUND_IMAGE
, v
, ATTR_FIX_URL
);
798 static HRESULT WINAPI
HTMLStyle_get_backgroundImage(IHTMLStyle
*iface
, BSTR
*p
)
800 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
802 TRACE("(%p)->(%p)\n", This
, p
);
804 return get_style_attr(This
, STYLEID_BACKGROUND_IMAGE
, p
);
807 static HRESULT WINAPI
HTMLStyle_put_backgroundRepeat(IHTMLStyle
*iface
, BSTR v
)
809 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
810 static const WCHAR styleRepeat
[] = {'r','e','p','e','a','t',0};
811 static const WCHAR styleNoRepeat
[] = {'n','o','-','r','e','p','e','a','t',0};
812 static const WCHAR styleRepeatX
[] = {'r','e','p','e','a','t','-','x',0};
813 static const WCHAR styleRepeatY
[] = {'r','e','p','e','a','t','-','y',0};
815 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
817 /* fontWeight can only be one of the following */
818 if(!v
|| strcmpiW(styleRepeat
, v
) == 0 || strcmpiW(styleNoRepeat
, v
) == 0 ||
819 strcmpiW(styleRepeatX
, v
) == 0 || strcmpiW(styleRepeatY
, v
) == 0 )
821 return set_style_attr(This
, STYLEID_BACKGROUND_REPEAT
, v
, 0);
827 static HRESULT WINAPI
HTMLStyle_get_backgroundRepeat(IHTMLStyle
*iface
, BSTR
*p
)
829 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
831 TRACE("(%p)->(%p)\n", This
, p
);
833 return get_style_attr(This
, STYLEID_BACKGROUND_REPEAT
, p
);
836 static HRESULT WINAPI
HTMLStyle_put_backgroundAttachment(IHTMLStyle
*iface
, BSTR v
)
838 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
839 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
843 static HRESULT WINAPI
HTMLStyle_get_backgroundAttachment(IHTMLStyle
*iface
, BSTR
*p
)
845 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
846 FIXME("(%p)->(%p)\n", This
, p
);
850 static HRESULT WINAPI
HTMLStyle_put_backgroundPosition(IHTMLStyle
*iface
, BSTR v
)
852 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
853 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
857 static HRESULT WINAPI
HTMLStyle_get_backgroundPosition(IHTMLStyle
*iface
, BSTR
*p
)
859 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
860 FIXME("(%p)->(%p)\n", This
, p
);
864 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionX(IHTMLStyle
*iface
, VARIANT v
)
866 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
867 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
871 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionX(IHTMLStyle
*iface
, VARIANT
*p
)
873 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
874 FIXME("(%p)->(%p)\n", This
, p
);
878 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionY(IHTMLStyle
*iface
, VARIANT v
)
880 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
881 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
885 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionY(IHTMLStyle
*iface
, VARIANT
*p
)
887 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
888 FIXME("(%p)->(%p)\n", This
, p
);
892 static HRESULT WINAPI
HTMLStyle_put_wordSpacing(IHTMLStyle
*iface
, VARIANT v
)
894 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
895 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
899 static HRESULT WINAPI
HTMLStyle_get_wordSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
901 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
902 FIXME("(%p)->(%p)\n", This
, p
);
906 static HRESULT WINAPI
HTMLStyle_put_letterSpacing(IHTMLStyle
*iface
, VARIANT v
)
908 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
909 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
913 static HRESULT WINAPI
HTMLStyle_get_letterSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
915 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
916 FIXME("(%p)->(%p)\n", This
, p
);
920 static HRESULT WINAPI
HTMLStyle_put_textDecoration(IHTMLStyle
*iface
, BSTR v
)
922 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
923 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
927 static HRESULT WINAPI
HTMLStyle_get_textDecoration(IHTMLStyle
*iface
, BSTR
*p
)
929 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
931 TRACE("(%p)->(%p)\n", This
, p
);
933 return get_style_attr(This
, STYLEID_TEXT_DECORATION
, p
);
936 static HRESULT WINAPI
HTMLStyle_put_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL v
)
938 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
940 TRACE("(%p)->(%x)\n", This
, v
);
942 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? styleNone
: emptyW
, 0);
945 static HRESULT WINAPI
HTMLStyle_get_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
947 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
949 TRACE("(%p)->(%p)\n", This
, p
);
951 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, styleNone
, p
);
954 static HRESULT WINAPI
HTMLStyle_put_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
956 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
958 TRACE("(%p)->(%x)\n", This
, v
);
960 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valUnderline
: emptyW
, 0);
963 static HRESULT WINAPI
HTMLStyle_get_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
965 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
967 TRACE("(%p)->(%p)\n", This
, p
);
969 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valUnderline
, p
);
972 static HRESULT WINAPI
HTMLStyle_put_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
974 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
975 FIXME("(%p)->(%x)\n", This
, v
);
979 static HRESULT WINAPI
HTMLStyle_get_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
981 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
982 FIXME("(%p)->(%p)\n", This
, p
);
986 static HRESULT WINAPI
HTMLStyle_put_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL v
)
988 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
990 TRACE("(%p)->(%x)\n", This
, v
);
992 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valLineThrough
: emptyW
, 0);
995 static HRESULT WINAPI
HTMLStyle_get_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
997 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
999 TRACE("(%p)->(%p)\n", This
, p
);
1001 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valLineThrough
, p
);
1004 static HRESULT WINAPI
HTMLStyle_put_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL v
)
1006 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1007 FIXME("(%p)->(%x)\n", This
, v
);
1011 static HRESULT WINAPI
HTMLStyle_get_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1013 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1014 FIXME("(%p)->(%p)\n", This
, p
);
1018 static HRESULT WINAPI
HTMLStyle_put_verticalAlign(IHTMLStyle
*iface
, VARIANT v
)
1020 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1022 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1026 return set_style_attr(This
, STYLEID_VERTICAL_ALIGN
, V_BSTR(&v
), 0);
1028 FIXME("not implemented vt %d\n", V_VT(&v
));
1035 static HRESULT WINAPI
HTMLStyle_get_verticalAlign(IHTMLStyle
*iface
, VARIANT
*p
)
1037 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1041 TRACE("(%p)->(%p)\n", This
, p
);
1043 hres
= get_style_attr(This
, STYLEID_VERTICAL_ALIGN
, &ret
);
1052 static HRESULT WINAPI
HTMLStyle_put_textTransform(IHTMLStyle
*iface
, BSTR v
)
1054 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1055 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1059 static HRESULT WINAPI
HTMLStyle_get_textTransform(IHTMLStyle
*iface
, BSTR
*p
)
1061 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1062 FIXME("(%p)->(%p)\n", This
, p
);
1066 static HRESULT WINAPI
HTMLStyle_put_textAlign(IHTMLStyle
*iface
, BSTR v
)
1068 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1070 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1072 return set_style_attr(This
, STYLEID_TEXT_ALIGN
, v
, 0);
1075 static HRESULT WINAPI
HTMLStyle_get_textAlign(IHTMLStyle
*iface
, BSTR
*p
)
1077 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1079 TRACE("(%p)->(%p)\n", This
, p
);
1081 return get_style_attr(This
, STYLEID_TEXT_ALIGN
, p
);
1084 static HRESULT WINAPI
HTMLStyle_put_textIndent(IHTMLStyle
*iface
, VARIANT v
)
1086 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1087 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1091 static HRESULT WINAPI
HTMLStyle_get_textIndent(IHTMLStyle
*iface
, VARIANT
*p
)
1093 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1094 FIXME("(%p)->(%p)\n", This
, p
);
1098 static HRESULT WINAPI
HTMLStyle_put_lineHeight(IHTMLStyle
*iface
, VARIANT v
)
1100 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1101 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1105 static HRESULT WINAPI
HTMLStyle_get_lineHeight(IHTMLStyle
*iface
, VARIANT
*p
)
1107 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1108 FIXME("(%p)->(%p)\n", This
, p
);
1112 static HRESULT WINAPI
HTMLStyle_put_marginTop(IHTMLStyle
*iface
, VARIANT v
)
1114 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1115 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1119 static HRESULT WINAPI
HTMLStyle_get_marginTop(IHTMLStyle
*iface
, VARIANT
*p
)
1121 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1122 FIXME("(%p)->(%p)\n", This
, p
);
1126 static HRESULT WINAPI
HTMLStyle_put_marginRight(IHTMLStyle
*iface
, VARIANT v
)
1128 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1130 TRACE("(%p)->(v(%d))\n", This
, V_VT(&v
));
1134 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, emptyW
, 0);
1138 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1139 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, buf
, 0);
1142 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, V_BSTR(&v
), 0);
1144 FIXME("Unsupported vt=%d\n", V_VT(&v
));
1150 static HRESULT WINAPI
HTMLStyle_get_marginRight(IHTMLStyle
*iface
, VARIANT
*p
)
1152 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1153 TRACE("(%p)->(%p)\n", This
, p
);
1154 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_RIGHT
, p
, 0);
1157 static HRESULT WINAPI
HTMLStyle_put_marginBottom(IHTMLStyle
*iface
, VARIANT v
)
1159 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1160 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1164 static HRESULT WINAPI
HTMLStyle_get_marginBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1166 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1167 FIXME("(%p)->(%p)\n", This
, p
);
1171 static HRESULT WINAPI
HTMLStyle_put_marginLeft(IHTMLStyle
*iface
, VARIANT v
)
1173 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1177 TRACE("(%p)->(NULL)\n", This
);
1178 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, emptyW
, 0);
1182 TRACE("(%p)->(%d)\n", This
, V_I4(&v
));
1184 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1185 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, buf
, 0);
1188 TRACE("(%p)->(%s)\n", This
, debugstr_w(V_BSTR(&v
)));
1189 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, V_BSTR(&v
), 0);
1191 FIXME("Unsupported vt=%d\n", V_VT(&v
));
1197 static HRESULT WINAPI
HTMLStyle_put_margin(IHTMLStyle
*iface
, BSTR v
)
1199 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1201 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1203 return set_style_attr(This
, STYLEID_MARGIN
, v
, 0);
1206 static HRESULT WINAPI
HTMLStyle_get_margin(IHTMLStyle
*iface
, BSTR
*p
)
1208 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1210 TRACE("(%p)->(%p)\n", This
, p
);
1212 return get_style_attr(This
, STYLEID_MARGIN
, p
);
1215 static HRESULT WINAPI
HTMLStyle_get_marginLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1217 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1218 TRACE("(%p)->(%p)\n", This
, p
);
1219 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_LEFT
, p
, 0);
1222 static HRESULT WINAPI
HTMLStyle_put_paddingTop(IHTMLStyle
*iface
, VARIANT v
)
1224 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1225 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1229 static HRESULT WINAPI
HTMLStyle_get_paddingTop(IHTMLStyle
*iface
, VARIANT
*p
)
1231 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1232 FIXME("(%p)->(%p)\n", This
, p
);
1236 static HRESULT WINAPI
HTMLStyle_put_paddingRight(IHTMLStyle
*iface
, VARIANT v
)
1238 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1239 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1243 static HRESULT WINAPI
HTMLStyle_get_paddingRight(IHTMLStyle
*iface
, VARIANT
*p
)
1245 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1246 FIXME("(%p)->(%p)\n", This
, p
);
1250 static HRESULT WINAPI
HTMLStyle_put_paddingBottom(IHTMLStyle
*iface
, VARIANT v
)
1252 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1253 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1257 static HRESULT WINAPI
HTMLStyle_get_paddingBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1259 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1260 FIXME("(%p)->(%p)\n", This
, p
);
1264 static HRESULT WINAPI
HTMLStyle_put_paddingLeft(IHTMLStyle
*iface
, VARIANT v
)
1266 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1268 TRACE("(%p)->(vt=%d)\n", This
, V_VT(&v
));
1274 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1275 return set_style_attr(This
, STYLEID_PADDING_LEFT
, buf
, 0);
1278 return set_style_attr(This
, STYLEID_PADDING_LEFT
, V_BSTR(&v
), 0);
1280 FIXME("unsupported vt=%d\n", V_VT(&v
));
1286 static HRESULT WINAPI
HTMLStyle_get_paddingLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1288 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1292 TRACE("(%p)->(%p)\n", This
, p
);
1294 hres
= get_style_attr(This
, STYLEID_PADDING_LEFT
, &ret
);
1303 static HRESULT WINAPI
HTMLStyle_put_padding(IHTMLStyle
*iface
, BSTR v
)
1305 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1306 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1310 static HRESULT WINAPI
HTMLStyle_get_padding(IHTMLStyle
*iface
, BSTR
*p
)
1312 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1313 FIXME("(%p)->(%p)\n", This
, p
);
1317 static HRESULT WINAPI
HTMLStyle_put_border(IHTMLStyle
*iface
, BSTR v
)
1319 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1321 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1323 return set_style_attr(This
, STYLEID_BORDER
, v
, 0);
1326 static HRESULT WINAPI
HTMLStyle_get_border(IHTMLStyle
*iface
, BSTR
*p
)
1328 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1330 TRACE("(%p)->(%p)\n", This
, p
);
1332 return get_style_attr(This
, STYLEID_BORDER
, p
);
1335 static HRESULT WINAPI
HTMLStyle_put_borderTop(IHTMLStyle
*iface
, BSTR v
)
1337 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1338 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1342 static HRESULT WINAPI
HTMLStyle_get_borderTop(IHTMLStyle
*iface
, BSTR
*p
)
1344 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1345 FIXME("(%p)->(%p)\n", This
, p
);
1349 static HRESULT WINAPI
HTMLStyle_put_borderRight(IHTMLStyle
*iface
, BSTR v
)
1351 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1352 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1356 static HRESULT WINAPI
HTMLStyle_get_borderRight(IHTMLStyle
*iface
, BSTR
*p
)
1358 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1359 FIXME("(%p)->(%p)\n", This
, p
);
1363 static HRESULT WINAPI
HTMLStyle_put_borderBottom(IHTMLStyle
*iface
, BSTR v
)
1365 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1366 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1370 static HRESULT WINAPI
HTMLStyle_get_borderBottom(IHTMLStyle
*iface
, BSTR
*p
)
1372 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1373 FIXME("(%p)->(%p)\n", This
, p
);
1377 static HRESULT WINAPI
HTMLStyle_put_borderLeft(IHTMLStyle
*iface
, BSTR v
)
1379 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1381 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1383 return set_style_attr(This
, STYLEID_BORDER_LEFT
, v
, ATTR_FIX_PX
);
1386 static HRESULT WINAPI
HTMLStyle_get_borderLeft(IHTMLStyle
*iface
, BSTR
*p
)
1388 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1389 FIXME("(%p)->(%p)\n", This
, p
);
1393 static HRESULT WINAPI
HTMLStyle_put_borderColor(IHTMLStyle
*iface
, BSTR v
)
1395 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1396 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1400 static HRESULT WINAPI
HTMLStyle_get_borderColor(IHTMLStyle
*iface
, BSTR
*p
)
1402 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1403 FIXME("(%p)->(%p)\n", This
, p
);
1407 static HRESULT WINAPI
HTMLStyle_put_borderTopColor(IHTMLStyle
*iface
, VARIANT v
)
1409 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1410 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1414 static HRESULT WINAPI
HTMLStyle_get_borderTopColor(IHTMLStyle
*iface
, VARIANT
*p
)
1416 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1417 FIXME("(%p)->(%p)\n", This
, p
);
1421 static HRESULT WINAPI
HTMLStyle_put_borderRightColor(IHTMLStyle
*iface
, VARIANT v
)
1423 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1424 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1428 static HRESULT WINAPI
HTMLStyle_get_borderRightColor(IHTMLStyle
*iface
, VARIANT
*p
)
1430 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1431 FIXME("(%p)->(%p)\n", This
, p
);
1435 static HRESULT WINAPI
HTMLStyle_put_borderBottomColor(IHTMLStyle
*iface
, VARIANT v
)
1437 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1438 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1442 static HRESULT WINAPI
HTMLStyle_get_borderBottomColor(IHTMLStyle
*iface
, VARIANT
*p
)
1444 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1445 FIXME("(%p)->(%p)\n", This
, p
);
1449 static HRESULT WINAPI
HTMLStyle_put_borderLeftColor(IHTMLStyle
*iface
, VARIANT v
)
1451 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1452 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1456 static HRESULT WINAPI
HTMLStyle_get_borderLeftColor(IHTMLStyle
*iface
, VARIANT
*p
)
1458 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1459 FIXME("(%p)->(%p)\n", This
, p
);
1463 static HRESULT WINAPI
HTMLStyle_put_borderWidth(IHTMLStyle
*iface
, BSTR v
)
1465 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1466 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1467 return set_style_attr(This
, STYLEID_BORDER_WIDTH
, v
, ATTR_FIX_PX
);
1470 static HRESULT WINAPI
HTMLStyle_get_borderWidth(IHTMLStyle
*iface
, BSTR
*p
)
1472 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1473 TRACE("(%p)->(%p)\n", This
, p
);
1474 return get_style_attr(This
, STYLEID_BORDER_WIDTH
, p
);
1477 static HRESULT WINAPI
HTMLStyle_put_borderTopWidth(IHTMLStyle
*iface
, VARIANT v
)
1479 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1480 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1484 static HRESULT WINAPI
HTMLStyle_get_borderTopWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1486 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1487 FIXME("(%p)->(%p)\n", This
, p
);
1491 static HRESULT WINAPI
HTMLStyle_put_borderRightWidth(IHTMLStyle
*iface
, VARIANT v
)
1493 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1494 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1498 static HRESULT WINAPI
HTMLStyle_get_borderRightWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1500 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1501 FIXME("(%p)->(%p)\n", This
, p
);
1505 static HRESULT WINAPI
HTMLStyle_put_borderBottomWidth(IHTMLStyle
*iface
, VARIANT v
)
1507 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1508 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1512 static HRESULT WINAPI
HTMLStyle_get_borderBottomWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1514 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1515 FIXME("(%p)->(%p)\n", This
, p
);
1519 static HRESULT WINAPI
HTMLStyle_put_borderLeftWidth(IHTMLStyle
*iface
, VARIANT v
)
1521 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1522 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1526 static HRESULT WINAPI
HTMLStyle_get_borderLeftWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1528 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1529 FIXME("(%p)->(%p)\n", This
, p
);
1533 static HRESULT WINAPI
HTMLStyle_put_borderStyle(IHTMLStyle
*iface
, BSTR v
)
1535 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1536 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1540 static HRESULT WINAPI
HTMLStyle_get_borderStyle(IHTMLStyle
*iface
, BSTR
*p
)
1542 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1543 FIXME("(%p)->(%p)\n", This
, p
);
1547 static HRESULT WINAPI
HTMLStyle_put_borderTopStyle(IHTMLStyle
*iface
, BSTR v
)
1549 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1550 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1552 if(!is_valid_border_style(v
))
1553 return E_INVALIDARG
;
1555 return set_style_attr(This
, STYLEID_BORDER_TOP_STYLE
, v
, 0);
1558 static HRESULT WINAPI
HTMLStyle_get_borderTopStyle(IHTMLStyle
*iface
, BSTR
*p
)
1560 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1561 TRACE("(%p)->(%p)\n", This
, p
);
1562 return get_style_attr(This
, STYLEID_BORDER_TOP_STYLE
, p
);
1565 static HRESULT WINAPI
HTMLStyle_put_borderRightStyle(IHTMLStyle
*iface
, BSTR v
)
1567 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1568 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1570 if(!is_valid_border_style(v
))
1571 return E_INVALIDARG
;
1573 return set_style_attr(This
, STYLEID_BORDER_RIGHT_STYLE
, v
, 0);
1576 static HRESULT WINAPI
HTMLStyle_get_borderRightStyle(IHTMLStyle
*iface
, BSTR
*p
)
1578 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1579 TRACE("(%p)->(%p)\n", This
, p
);
1580 return get_style_attr(This
, STYLEID_BORDER_RIGHT_STYLE
, p
);
1583 static HRESULT WINAPI
HTMLStyle_put_borderBottomStyle(IHTMLStyle
*iface
, BSTR v
)
1585 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1586 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1588 if(!is_valid_border_style(v
))
1589 return E_INVALIDARG
;
1591 return set_style_attr(This
, STYLEID_BORDER_BOTTOM_STYLE
, v
, 0);
1594 static HRESULT WINAPI
HTMLStyle_get_borderBottomStyle(IHTMLStyle
*iface
, BSTR
*p
)
1596 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1597 TRACE("(%p)->(%p)\n", This
, p
);
1598 return get_style_attr(This
, STYLEID_BORDER_BOTTOM_STYLE
, p
);
1601 static HRESULT WINAPI
HTMLStyle_put_borderLeftStyle(IHTMLStyle
*iface
, BSTR v
)
1603 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1604 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1606 if(!is_valid_border_style(v
))
1607 return E_INVALIDARG
;
1609 return set_style_attr(This
, STYLEID_BORDER_LEFT_STYLE
, v
, 0);
1612 static HRESULT WINAPI
HTMLStyle_get_borderLeftStyle(IHTMLStyle
*iface
, BSTR
*p
)
1614 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1615 TRACE("(%p)->(%p)\n", This
, p
);
1616 return get_style_attr(This
, STYLEID_BORDER_LEFT_STYLE
, p
);
1619 static HRESULT WINAPI
HTMLStyle_put_width(IHTMLStyle
*iface
, VARIANT v
)
1621 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1623 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
1627 TRACE("%s\n", debugstr_w(V_BSTR(&v
)));
1628 return set_style_attr(This
, STYLEID_WIDTH
, V_BSTR(&v
), 0);
1630 FIXME("unsupported vt %d\n", V_VT(&v
));
1636 static HRESULT WINAPI
HTMLStyle_get_width(IHTMLStyle
*iface
, VARIANT
*p
)
1638 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1640 TRACE("(%p)->(%p)\n", This
, p
);
1643 return get_style_attr(This
, STYLEID_WIDTH
, &V_BSTR(p
));
1646 static HRESULT WINAPI
HTMLStyle_put_height(IHTMLStyle
*iface
, VARIANT v
)
1648 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1650 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1654 return set_style_attr(This
, STYLEID_HEIGHT
, V_BSTR(&v
), 0);
1656 FIXME("unimplemented vt %d\n", V_VT(&v
));
1663 static HRESULT WINAPI
HTMLStyle_get_height(IHTMLStyle
*iface
, VARIANT
*p
)
1665 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1669 TRACE("(%p)->(%p)\n", This
, p
);
1671 hres
= get_style_attr(This
, STYLEID_HEIGHT
, &ret
);
1680 static HRESULT WINAPI
HTMLStyle_put_styleFloat(IHTMLStyle
*iface
, BSTR v
)
1682 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1683 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1687 static HRESULT WINAPI
HTMLStyle_get_styleFloat(IHTMLStyle
*iface
, BSTR
*p
)
1689 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1690 FIXME("(%p)->(%p)\n", This
, p
);
1694 static HRESULT WINAPI
HTMLStyle_put_clear(IHTMLStyle
*iface
, BSTR v
)
1696 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1697 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1701 static HRESULT WINAPI
HTMLStyle_get_clear(IHTMLStyle
*iface
, BSTR
*p
)
1703 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1704 FIXME("(%p)->(%p)\n", This
, p
);
1708 static HRESULT WINAPI
HTMLStyle_put_display(IHTMLStyle
*iface
, BSTR v
)
1710 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1712 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1714 return set_style_attr(This
, STYLEID_DISPLAY
, v
, 0);
1717 static HRESULT WINAPI
HTMLStyle_get_display(IHTMLStyle
*iface
, BSTR
*p
)
1719 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1721 TRACE("(%p)->(%p)\n", This
, p
);
1723 return get_style_attr(This
, STYLEID_DISPLAY
, p
);
1726 static HRESULT WINAPI
HTMLStyle_put_visibility(IHTMLStyle
*iface
, BSTR v
)
1728 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1730 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1732 return set_style_attr(This
, STYLEID_VISIBILITY
, v
, 0);
1735 static HRESULT WINAPI
HTMLStyle_get_visibility(IHTMLStyle
*iface
, BSTR
*p
)
1737 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1739 TRACE("(%p)->(%p)\n", This
, p
);
1741 return get_style_attr(This
, STYLEID_VISIBILITY
, p
);
1744 static HRESULT WINAPI
HTMLStyle_put_listStyleType(IHTMLStyle
*iface
, BSTR v
)
1746 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1747 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1751 static HRESULT WINAPI
HTMLStyle_get_listStyleType(IHTMLStyle
*iface
, BSTR
*p
)
1753 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1754 FIXME("(%p)->(%p)\n", This
, p
);
1758 static HRESULT WINAPI
HTMLStyle_put_listStylePosition(IHTMLStyle
*iface
, BSTR v
)
1760 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1761 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1765 static HRESULT WINAPI
HTMLStyle_get_listStylePosition(IHTMLStyle
*iface
, BSTR
*p
)
1767 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1768 FIXME("(%p)->(%p)\n", This
, p
);
1772 static HRESULT WINAPI
HTMLStyle_put_listStyleImage(IHTMLStyle
*iface
, BSTR v
)
1774 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1775 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1779 static HRESULT WINAPI
HTMLStyle_get_listStyleImage(IHTMLStyle
*iface
, BSTR
*p
)
1781 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1782 FIXME("(%p)->(%p)\n", This
, p
);
1786 static HRESULT WINAPI
HTMLStyle_put_listStyle(IHTMLStyle
*iface
, BSTR v
)
1788 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1789 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1793 static HRESULT WINAPI
HTMLStyle_get_listStyle(IHTMLStyle
*iface
, BSTR
*p
)
1795 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1796 FIXME("(%p)->(%p)\n", This
, p
);
1800 static HRESULT WINAPI
HTMLStyle_put_whiteSpace(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_whiteSpace(IHTMLStyle
*iface
, BSTR
*p
)
1809 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1810 FIXME("(%p)->(%p)\n", This
, p
);
1814 static HRESULT WINAPI
HTMLStyle_put_top(IHTMLStyle
*iface
, VARIANT v
)
1816 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1818 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1820 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_TOP
, &v
, 0);
1823 static HRESULT WINAPI
HTMLStyle_get_top(IHTMLStyle
*iface
, VARIANT
*p
)
1825 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1829 TRACE("(%p)->(%p)\n", This
, p
);
1831 hres
= get_style_attr(This
, STYLEID_TOP
, &ret
);
1840 static HRESULT WINAPI
HTMLStyle_put_left(IHTMLStyle
*iface
, VARIANT v
)
1842 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1844 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1846 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_LEFT
, &v
, 0);
1849 static HRESULT WINAPI
HTMLStyle_get_left(IHTMLStyle
*iface
, VARIANT
*p
)
1851 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1855 TRACE("(%p)->(%p)\n", This
, p
);
1857 hres
= get_style_attr(This
, STYLEID_LEFT
, &ret
);
1866 static HRESULT WINAPI
HTMLStyle_get_position(IHTMLStyle
*iface
, BSTR
*p
)
1868 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1869 TRACE("(%p)->(%p)\n", This
, p
);
1870 return IHTMLStyle2_get_position(HTMLSTYLE2(This
), p
);
1873 static HRESULT WINAPI
HTMLStyle_put_zIndex(IHTMLStyle
*iface
, VARIANT v
)
1875 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1877 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1881 return set_style_attr(This
, STYLEID_Z_INDEX
, V_BSTR(&v
), 0);
1884 static const WCHAR format
[] = {'%','d',0};
1886 wsprintfW(value
, format
, V_I4(&v
));
1887 return set_style_attr(This
, STYLEID_Z_INDEX
, value
, 0);
1890 FIXME("unimplemented vt %d\n", V_VT(&v
));
1897 static HRESULT WINAPI
HTMLStyle_get_zIndex(IHTMLStyle
*iface
, VARIANT
*p
)
1899 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1901 TRACE("(%p)->(%p)\n", This
, p
);
1903 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_Z_INDEX
, p
, ATTR_STR_TO_INT
);
1906 static HRESULT WINAPI
HTMLStyle_put_overflow(IHTMLStyle
*iface
, BSTR v
)
1908 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1909 static const WCHAR szVisible
[] = {'v','i','s','i','b','l','e',0};
1910 static const WCHAR szScroll
[] = {'s','c','r','o','l','l',0};
1911 static const WCHAR szHidden
[] = {'h','i','d','d','e','n',0};
1912 static const WCHAR szAuto
[] = {'a','u','t','o',0};
1914 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1916 /* overflow can only be one of the follow values. */
1917 if(!v
|| strcmpiW(szVisible
, v
) == 0 || strcmpiW(szScroll
, v
) == 0 ||
1918 strcmpiW(szHidden
, v
) == 0 || strcmpiW(szAuto
, v
) == 0)
1920 return set_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW
, v
, 0);
1923 return E_INVALIDARG
;
1927 static HRESULT WINAPI
HTMLStyle_get_overflow(IHTMLStyle
*iface
, BSTR
*p
)
1929 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1931 TRACE("(%p)->(%p)\n", This
, p
);
1934 return E_INVALIDARG
;
1936 return get_style_attr(This
, STYLEID_OVERFLOW
, p
);
1939 static HRESULT WINAPI
HTMLStyle_put_pageBreakBefore(IHTMLStyle
*iface
, BSTR v
)
1941 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1942 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1946 static HRESULT WINAPI
HTMLStyle_get_pageBreakBefore(IHTMLStyle
*iface
, BSTR
*p
)
1948 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1949 FIXME("(%p)->(%p)\n", This
, p
);
1953 static HRESULT WINAPI
HTMLStyle_put_pageBreakAfter(IHTMLStyle
*iface
, BSTR v
)
1955 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1956 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1960 static HRESULT WINAPI
HTMLStyle_get_pageBreakAfter(IHTMLStyle
*iface
, BSTR
*p
)
1962 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1963 FIXME("(%p)->(%p)\n", This
, p
);
1967 static HRESULT WINAPI
HTMLStyle_put_cssText(IHTMLStyle
*iface
, BSTR v
)
1969 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1970 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1974 static HRESULT WINAPI
HTMLStyle_get_cssText(IHTMLStyle
*iface
, BSTR
*p
)
1976 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1977 FIXME("(%p)->(%p)\n", This
, p
);
1981 static HRESULT WINAPI
HTMLStyle_put_pixelTop(IHTMLStyle
*iface
, long v
)
1983 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1984 FIXME("(%p)->()\n", This
);
1988 static HRESULT WINAPI
HTMLStyle_get_pixelTop(IHTMLStyle
*iface
, long *p
)
1990 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1991 FIXME("(%p)->()\n", This
);
1995 static HRESULT WINAPI
HTMLStyle_put_pixelLeft(IHTMLStyle
*iface
, long v
)
1997 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1998 FIXME("(%p)->()\n", This
);
2002 static HRESULT WINAPI
HTMLStyle_get_pixelLeft(IHTMLStyle
*iface
, long *p
)
2004 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2005 FIXME("(%p)->()\n", This
);
2009 static HRESULT WINAPI
HTMLStyle_put_pixelWidth(IHTMLStyle
*iface
, long v
)
2011 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2012 FIXME("(%p)->()\n", This
);
2016 static HRESULT WINAPI
HTMLStyle_get_pixelWidth(IHTMLStyle
*iface
, long *p
)
2018 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2019 FIXME("(%p)->()\n", This
);
2023 static HRESULT WINAPI
HTMLStyle_put_pixelHeight(IHTMLStyle
*iface
, long v
)
2025 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2026 FIXME("(%p)->()\n", This
);
2030 static HRESULT WINAPI
HTMLStyle_get_pixelHeight(IHTMLStyle
*iface
, long *p
)
2032 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2033 FIXME("(%p)->()\n", This
);
2037 static HRESULT WINAPI
HTMLStyle_put_posTop(IHTMLStyle
*iface
, float v
)
2039 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2041 TRACE("(%p)->(%f)\n", This
, v
);
2043 return set_style_pos(This
, STYLEID_TOP
, v
);
2046 static HRESULT WINAPI
HTMLStyle_get_posTop(IHTMLStyle
*iface
, float *p
)
2048 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2050 TRACE("(%p)->(%p)\n", This
, p
);
2055 return get_nsstyle_pos(This
, STYLEID_TOP
, p
);
2058 static HRESULT WINAPI
HTMLStyle_put_posLeft(IHTMLStyle
*iface
, float v
)
2060 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2062 TRACE("(%p)->(%f)\n", This
, v
);
2064 return set_style_pos(This
, STYLEID_LEFT
, v
);
2067 static HRESULT WINAPI
HTMLStyle_get_posLeft(IHTMLStyle
*iface
, float *p
)
2069 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2071 TRACE("(%p)->(%p)\n", This
, p
);
2076 return get_nsstyle_pos(This
, STYLEID_LEFT
, p
);
2079 static HRESULT WINAPI
HTMLStyle_put_posWidth(IHTMLStyle
*iface
, float v
)
2081 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2083 TRACE("(%p)->(%f)\n", This
, v
);
2085 return set_style_pos(This
, STYLEID_WIDTH
, v
);
2088 static HRESULT WINAPI
HTMLStyle_get_posWidth(IHTMLStyle
*iface
, float *p
)
2090 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2092 TRACE("(%p)->(%p)\n", This
, p
);
2097 if(get_nsstyle_pos(This
, STYLEID_WIDTH
, p
) != S_OK
)
2103 static HRESULT WINAPI
HTMLStyle_put_posHeight(IHTMLStyle
*iface
, float v
)
2105 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2107 TRACE("(%p)->(%f)\n", This
, v
);
2109 return set_style_pos(This
, STYLEID_HEIGHT
, v
);
2112 static HRESULT WINAPI
HTMLStyle_get_posHeight(IHTMLStyle
*iface
, float *p
)
2114 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2116 TRACE("(%p)->(%p)\n", This
, p
);
2121 if(get_nsstyle_pos(This
, STYLEID_HEIGHT
, p
) != S_OK
)
2127 static HRESULT WINAPI
HTMLStyle_put_cursor(IHTMLStyle
*iface
, BSTR v
)
2129 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2131 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2133 return set_style_attr(This
, STYLEID_CURSOR
, v
, 0);
2136 static HRESULT WINAPI
HTMLStyle_get_cursor(IHTMLStyle
*iface
, BSTR
*p
)
2138 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2140 TRACE("(%p)->(%p)\n", This
, p
);
2142 return get_style_attr(This
, STYLEID_CURSOR
, p
);
2145 static HRESULT WINAPI
HTMLStyle_put_clip(IHTMLStyle
*iface
, BSTR v
)
2147 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2148 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
2152 static HRESULT WINAPI
HTMLStyle_get_clip(IHTMLStyle
*iface
, BSTR
*p
)
2154 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2155 FIXME("(%p)->(%p)\n", This
, p
);
2159 static HRESULT WINAPI
HTMLStyle_put_filter(IHTMLStyle
*iface
, BSTR v
)
2161 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2163 WARN("(%p)->(%s)\n", This
, debugstr_w(v
));
2165 /* FIXME: Handle MS-style filters */
2166 return set_style_attr(This
, STYLEID_FILTER
, v
, 0);
2169 static HRESULT WINAPI
HTMLStyle_get_filter(IHTMLStyle
*iface
, BSTR
*p
)
2171 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2173 WARN("(%p)->(%p)\n", This
, p
);
2175 /* FIXME: Handle MS-style filters */
2176 return get_style_attr(This
, STYLEID_FILTER
, p
);
2179 static HRESULT WINAPI
HTMLStyle_setAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2180 VARIANT AttributeValue
, LONG lFlags
)
2182 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2186 TRACE("(%p)->(%s v%d %08x)\n", This
, debugstr_w(strAttributeName
),
2187 V_VT(&AttributeValue
), lFlags
);
2189 if(!strAttributeName
)
2190 return E_INVALIDARG
;
2193 FIXME("Parameter lFlags ignored\n");
2195 hres
= HTMLStyle_GetIDsOfNames(iface
, &IID_NULL
, &strAttributeName
, 1,
2196 LOCALE_USER_DEFAULT
, &dispid
);
2200 DISPID dispidNamed
= DISPID_PROPERTYPUT
;
2204 params
.rgvarg
= &AttributeValue
;
2205 params
.cNamedArgs
= 1;
2206 params
.rgdispidNamedArgs
= &dispidNamed
;
2208 hres
= HTMLStyle_Invoke(iface
, dispid
, &IID_NULL
, LOCALE_SYSTEM_DEFAULT
,
2209 DISPATCH_PROPERTYPUT
, ¶ms
, &ret
, NULL
, NULL
);
2213 FIXME("Custom attributes not supported.\n");
2216 TRACE("ret: %08x\n", hres
);
2221 static HRESULT WINAPI
HTMLStyle_getAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2222 LONG lFlags
, VARIANT
*AttributeValue
)
2224 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2228 TRACE("(%p)->(%s v%p %08x)\n", This
, debugstr_w(strAttributeName
),
2229 AttributeValue
, lFlags
);
2231 if(!AttributeValue
|| !strAttributeName
)
2232 return E_INVALIDARG
;
2235 FIXME("Parameter lFlags ignored\n");
2237 hres
= HTMLStyle_GetIDsOfNames(iface
, &IID_NULL
, &strAttributeName
, 1,
2238 LOCALE_USER_DEFAULT
, &dispid
);
2241 DISPPARAMS params
= {NULL
, NULL
, 0, 0 };
2243 hres
= HTMLStyle_Invoke(iface
, dispid
, &IID_NULL
, LOCALE_SYSTEM_DEFAULT
,
2244 DISPATCH_PROPERTYGET
, ¶ms
, AttributeValue
, NULL
, NULL
);
2248 FIXME("Custom attributes not supported.\n");
2254 static HRESULT WINAPI
HTMLStyle_removeAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2255 LONG lFlags
, VARIANT_BOOL
*pfSuccess
)
2257 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2258 FIXME("(%p)->(%s %08x %p)\n", This
, debugstr_w(strAttributeName
),
2263 static HRESULT WINAPI
HTMLStyle_toString(IHTMLStyle
*iface
, BSTR
*String
)
2265 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2266 FIXME("(%p)->(%p)\n", This
, String
);
2270 static HRESULT
HTMLStyle_get_dispid(IUnknown
*iface
, BSTR name
, DWORD flags
, DISPID
*dispid
)
2272 int c
, i
, min
=0, max
= sizeof(style_tbl
)/sizeof(*style_tbl
)-1;
2277 c
= strcmpW(style_tbl
[i
].name
, name
);
2279 *dispid
= style_tbl
[i
].dispid
;
2289 return DISP_E_UNKNOWNNAME
;
2292 static const IHTMLStyleVtbl HTMLStyleVtbl
= {
2293 HTMLStyle_QueryInterface
,
2296 HTMLStyle_GetTypeInfoCount
,
2297 HTMLStyle_GetTypeInfo
,
2298 HTMLStyle_GetIDsOfNames
,
2300 HTMLStyle_put_fontFamily
,
2301 HTMLStyle_get_fontFamily
,
2302 HTMLStyle_put_fontStyle
,
2303 HTMLStyle_get_fontStyle
,
2304 HTMLStyle_put_fontVariant
,
2305 HTMLStyle_get_fontVariant
,
2306 HTMLStyle_put_fontWeight
,
2307 HTMLStyle_get_fontWeight
,
2308 HTMLStyle_put_fontSize
,
2309 HTMLStyle_get_fontSize
,
2312 HTMLStyle_put_color
,
2313 HTMLStyle_get_color
,
2314 HTMLStyle_put_background
,
2315 HTMLStyle_get_background
,
2316 HTMLStyle_put_backgroundColor
,
2317 HTMLStyle_get_backgroundColor
,
2318 HTMLStyle_put_backgroundImage
,
2319 HTMLStyle_get_backgroundImage
,
2320 HTMLStyle_put_backgroundRepeat
,
2321 HTMLStyle_get_backgroundRepeat
,
2322 HTMLStyle_put_backgroundAttachment
,
2323 HTMLStyle_get_backgroundAttachment
,
2324 HTMLStyle_put_backgroundPosition
,
2325 HTMLStyle_get_backgroundPosition
,
2326 HTMLStyle_put_backgroundPositionX
,
2327 HTMLStyle_get_backgroundPositionX
,
2328 HTMLStyle_put_backgroundPositionY
,
2329 HTMLStyle_get_backgroundPositionY
,
2330 HTMLStyle_put_wordSpacing
,
2331 HTMLStyle_get_wordSpacing
,
2332 HTMLStyle_put_letterSpacing
,
2333 HTMLStyle_get_letterSpacing
,
2334 HTMLStyle_put_textDecoration
,
2335 HTMLStyle_get_textDecoration
,
2336 HTMLStyle_put_textDecorationNone
,
2337 HTMLStyle_get_textDecorationNone
,
2338 HTMLStyle_put_textDecorationUnderline
,
2339 HTMLStyle_get_textDecorationUnderline
,
2340 HTMLStyle_put_textDecorationOverline
,
2341 HTMLStyle_get_textDecorationOverline
,
2342 HTMLStyle_put_textDecorationLineThrough
,
2343 HTMLStyle_get_textDecorationLineThrough
,
2344 HTMLStyle_put_textDecorationBlink
,
2345 HTMLStyle_get_textDecorationBlink
,
2346 HTMLStyle_put_verticalAlign
,
2347 HTMLStyle_get_verticalAlign
,
2348 HTMLStyle_put_textTransform
,
2349 HTMLStyle_get_textTransform
,
2350 HTMLStyle_put_textAlign
,
2351 HTMLStyle_get_textAlign
,
2352 HTMLStyle_put_textIndent
,
2353 HTMLStyle_get_textIndent
,
2354 HTMLStyle_put_lineHeight
,
2355 HTMLStyle_get_lineHeight
,
2356 HTMLStyle_put_marginTop
,
2357 HTMLStyle_get_marginTop
,
2358 HTMLStyle_put_marginRight
,
2359 HTMLStyle_get_marginRight
,
2360 HTMLStyle_put_marginBottom
,
2361 HTMLStyle_get_marginBottom
,
2362 HTMLStyle_put_marginLeft
,
2363 HTMLStyle_get_marginLeft
,
2364 HTMLStyle_put_margin
,
2365 HTMLStyle_get_margin
,
2366 HTMLStyle_put_paddingTop
,
2367 HTMLStyle_get_paddingTop
,
2368 HTMLStyle_put_paddingRight
,
2369 HTMLStyle_get_paddingRight
,
2370 HTMLStyle_put_paddingBottom
,
2371 HTMLStyle_get_paddingBottom
,
2372 HTMLStyle_put_paddingLeft
,
2373 HTMLStyle_get_paddingLeft
,
2374 HTMLStyle_put_padding
,
2375 HTMLStyle_get_padding
,
2376 HTMLStyle_put_border
,
2377 HTMLStyle_get_border
,
2378 HTMLStyle_put_borderTop
,
2379 HTMLStyle_get_borderTop
,
2380 HTMLStyle_put_borderRight
,
2381 HTMLStyle_get_borderRight
,
2382 HTMLStyle_put_borderBottom
,
2383 HTMLStyle_get_borderBottom
,
2384 HTMLStyle_put_borderLeft
,
2385 HTMLStyle_get_borderLeft
,
2386 HTMLStyle_put_borderColor
,
2387 HTMLStyle_get_borderColor
,
2388 HTMLStyle_put_borderTopColor
,
2389 HTMLStyle_get_borderTopColor
,
2390 HTMLStyle_put_borderRightColor
,
2391 HTMLStyle_get_borderRightColor
,
2392 HTMLStyle_put_borderBottomColor
,
2393 HTMLStyle_get_borderBottomColor
,
2394 HTMLStyle_put_borderLeftColor
,
2395 HTMLStyle_get_borderLeftColor
,
2396 HTMLStyle_put_borderWidth
,
2397 HTMLStyle_get_borderWidth
,
2398 HTMLStyle_put_borderTopWidth
,
2399 HTMLStyle_get_borderTopWidth
,
2400 HTMLStyle_put_borderRightWidth
,
2401 HTMLStyle_get_borderRightWidth
,
2402 HTMLStyle_put_borderBottomWidth
,
2403 HTMLStyle_get_borderBottomWidth
,
2404 HTMLStyle_put_borderLeftWidth
,
2405 HTMLStyle_get_borderLeftWidth
,
2406 HTMLStyle_put_borderStyle
,
2407 HTMLStyle_get_borderStyle
,
2408 HTMLStyle_put_borderTopStyle
,
2409 HTMLStyle_get_borderTopStyle
,
2410 HTMLStyle_put_borderRightStyle
,
2411 HTMLStyle_get_borderRightStyle
,
2412 HTMLStyle_put_borderBottomStyle
,
2413 HTMLStyle_get_borderBottomStyle
,
2414 HTMLStyle_put_borderLeftStyle
,
2415 HTMLStyle_get_borderLeftStyle
,
2416 HTMLStyle_put_width
,
2417 HTMLStyle_get_width
,
2418 HTMLStyle_put_height
,
2419 HTMLStyle_get_height
,
2420 HTMLStyle_put_styleFloat
,
2421 HTMLStyle_get_styleFloat
,
2422 HTMLStyle_put_clear
,
2423 HTMLStyle_get_clear
,
2424 HTMLStyle_put_display
,
2425 HTMLStyle_get_display
,
2426 HTMLStyle_put_visibility
,
2427 HTMLStyle_get_visibility
,
2428 HTMLStyle_put_listStyleType
,
2429 HTMLStyle_get_listStyleType
,
2430 HTMLStyle_put_listStylePosition
,
2431 HTMLStyle_get_listStylePosition
,
2432 HTMLStyle_put_listStyleImage
,
2433 HTMLStyle_get_listStyleImage
,
2434 HTMLStyle_put_listStyle
,
2435 HTMLStyle_get_listStyle
,
2436 HTMLStyle_put_whiteSpace
,
2437 HTMLStyle_get_whiteSpace
,
2442 HTMLStyle_get_position
,
2443 HTMLStyle_put_zIndex
,
2444 HTMLStyle_get_zIndex
,
2445 HTMLStyle_put_overflow
,
2446 HTMLStyle_get_overflow
,
2447 HTMLStyle_put_pageBreakBefore
,
2448 HTMLStyle_get_pageBreakBefore
,
2449 HTMLStyle_put_pageBreakAfter
,
2450 HTMLStyle_get_pageBreakAfter
,
2451 HTMLStyle_put_cssText
,
2452 HTMLStyle_get_cssText
,
2453 HTMLStyle_put_pixelTop
,
2454 HTMLStyle_get_pixelTop
,
2455 HTMLStyle_put_pixelLeft
,
2456 HTMLStyle_get_pixelLeft
,
2457 HTMLStyle_put_pixelWidth
,
2458 HTMLStyle_get_pixelWidth
,
2459 HTMLStyle_put_pixelHeight
,
2460 HTMLStyle_get_pixelHeight
,
2461 HTMLStyle_put_posTop
,
2462 HTMLStyle_get_posTop
,
2463 HTMLStyle_put_posLeft
,
2464 HTMLStyle_get_posLeft
,
2465 HTMLStyle_put_posWidth
,
2466 HTMLStyle_get_posWidth
,
2467 HTMLStyle_put_posHeight
,
2468 HTMLStyle_get_posHeight
,
2469 HTMLStyle_put_cursor
,
2470 HTMLStyle_get_cursor
,
2473 HTMLStyle_put_filter
,
2474 HTMLStyle_get_filter
,
2475 HTMLStyle_setAttribute
,
2476 HTMLStyle_getAttribute
,
2477 HTMLStyle_removeAttribute
,
2481 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl
= {
2482 HTMLStyle_get_dispid
,
2486 static const tid_t HTMLStyle_iface_tids
[] = {
2491 static dispex_static_data_t HTMLStyle_dispex
= {
2492 &HTMLStyle_dispex_vtbl
,
2495 HTMLStyle_iface_tids
2498 IHTMLStyle
*HTMLStyle_Create(nsIDOMCSSStyleDeclaration
*nsstyle
)
2500 HTMLStyle
*ret
= heap_alloc_zero(sizeof(HTMLStyle
));
2502 ret
->lpHTMLStyleVtbl
= &HTMLStyleVtbl
;
2504 ret
->nsstyle
= nsstyle
;
2505 HTMLStyle2_Init(ret
);
2506 HTMLStyle3_Init(ret
);
2508 nsIDOMCSSStyleDeclaration_AddRef(nsstyle
);
2510 init_dispex(&ret
->dispex
, (IUnknown
*)HTMLSTYLE(ret
), &HTMLStyle_dispex
);
2512 return HTMLSTYLE(ret
);