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
[] =
161 static const WCHAR valOverline
[] =
162 {'o','v','e','r','l','i','n','e',0};
163 static const WCHAR valBlink
[] =
164 {'b','l','i','n','k',0};
166 static const WCHAR px_formatW
[] = {'%','d','p','x',0};
167 static const WCHAR emptyW
[] = {0};
169 static LPWSTR
fix_px_value(LPCWSTR val
)
174 while(*ptr
&& isspaceW(*ptr
))
179 while(*ptr
&& isdigitW(*ptr
))
182 if(!*ptr
|| isspaceW(*ptr
)) {
184 int len
= strlenW(val
)+1;
186 ret
= heap_alloc((len
+2)*sizeof(WCHAR
));
187 memcpy(ret
, val
, (ptr
-val
)*sizeof(WCHAR
));
193 TRACE("fixed %s -> %s\n", debugstr_w(val
), debugstr_w(ret
));
198 while(*ptr
&& !isspaceW(*ptr
))
205 static LPWSTR
fix_url_value(LPCWSTR val
)
209 static const WCHAR urlW
[] = {'u','r','l','('};
211 if(strncmpW(val
, urlW
, sizeof(urlW
)/sizeof(WCHAR
)) || !strchrW(val
, '\\'))
214 ret
= heap_strdupW(val
);
216 for(ptr
= ret
; *ptr
; ptr
++) {
224 HRESULT
set_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
226 nsAString str_name
, str_value
, str_empty
;
230 static const PRUnichar wszEmpty
[] = {0};
232 if(flags
& ATTR_FIX_PX
)
233 val
= fix_px_value(value
);
234 if(flags
& ATTR_FIX_URL
)
235 val
= fix_url_value(value
);
237 nsAString_Init(&str_name
, style_tbl
[sid
].name
);
238 nsAString_Init(&str_value
, val
? val
: value
);
239 nsAString_Init(&str_empty
, wszEmpty
);
242 nsres
= nsIDOMCSSStyleDeclaration_SetProperty(nsstyle
, &str_name
, &str_value
, &str_empty
);
244 ERR("SetProperty failed: %08x\n", nsres
);
246 nsAString_Finish(&str_name
);
247 nsAString_Finish(&str_value
);
248 nsAString_Finish(&str_empty
);
253 HRESULT
set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*value
, DWORD flags
)
255 switch(V_VT(value
)) {
257 return set_nsstyle_attr(nsstyle
, sid
, emptyW
, flags
);
260 return set_nsstyle_attr(nsstyle
, sid
, V_BSTR(value
), flags
);
264 static const WCHAR format
[] = {'%','d',0};
266 wsprintfW(str
, format
, V_I4(value
));
267 return set_nsstyle_attr(nsstyle
, sid
, str
, flags
);
270 FIXME("not implemented vt %d\n", V_VT(value
));
278 static inline HRESULT
set_style_attr(HTMLStyle
*This
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
280 return set_nsstyle_attr(This
->nsstyle
, sid
, value
, flags
);
283 static HRESULT
get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, nsAString
*value
)
288 nsAString_Init(&str_name
, style_tbl
[sid
].name
);
290 nsres
= nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle
, &str_name
, value
);
291 if(NS_FAILED(nsres
)) {
292 ERR("SetProperty failed: %08x\n", nsres
);
296 nsAString_Finish(&str_name
);
301 HRESULT
get_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, BSTR
*p
)
304 const PRUnichar
*value
;
306 nsAString_Init(&str_value
, NULL
);
308 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
310 nsAString_GetData(&str_value
, &value
);
311 *p
= *value
? SysAllocString(value
) : NULL
;
313 nsAString_Finish(&str_value
);
315 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_w(*p
));
319 HRESULT
get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*p
, DWORD flags
)
322 const PRUnichar
*value
;
325 nsAString_Init(&str_value
, NULL
);
327 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
329 nsAString_GetData(&str_value
, &value
);
331 if(flags
& ATTR_STR_TO_INT
) {
332 const PRUnichar
*ptr
= value
;
341 while(isdigitW(*ptr
))
342 i
= i
*10 + (*ptr
++ - '0');
346 V_I4(p
) = neg
? -i
: i
;
355 str
= SysAllocString(value
);
357 return E_OUTOFMEMORY
;
364 nsAString_Finish(&str_value
);
366 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_variant(p
));
370 static inline HRESULT
get_style_attr(HTMLStyle
*This
, styleid_t sid
, BSTR
*p
)
372 return get_nsstyle_attr(This
->nsstyle
, sid
, p
);
375 static HRESULT
check_style_attr_value(HTMLStyle
*This
, styleid_t sid
, LPCWSTR exval
, VARIANT_BOOL
*p
)
378 const PRUnichar
*value
;
380 nsAString_Init(&str_value
, NULL
);
382 get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
384 nsAString_GetData(&str_value
, &value
);
385 *p
= strcmpW(value
, exval
) ? VARIANT_FALSE
: VARIANT_TRUE
;
386 nsAString_Finish(&str_value
);
388 TRACE("%s -> %x\n", debugstr_w(style_tbl
[sid
].name
), *p
);
392 static inline HRESULT
set_style_pos(HTMLStyle
*This
, styleid_t sid
, float value
)
395 WCHAR szFormat
[] = {'%','.','0','f','p','x',0};
397 value
= floor(value
);
399 sprintfW(szValue
, szFormat
, value
);
401 return set_style_attr(This
, sid
, szValue
, 0);
404 static HRESULT
get_nsstyle_pos(HTMLStyle
*This
, styleid_t sid
, float *p
)
408 WCHAR pxW
[] = {'p','x',0};
410 TRACE("%p %d %p\n", This
, sid
, p
);
414 nsAString_Init(&str_value
, NULL
);
416 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
420 const PRUnichar
*value
;
422 nsAString_GetData(&str_value
, &value
);
425 *p
= strtolW(value
, &ptr
, 10);
427 if(*ptr
&& strcmpW(ptr
, pxW
))
429 nsAString_Finish(&str_value
);
430 FIXME("only px values are currently supported\n");
436 TRACE("ret %f\n", *p
);
438 nsAString_Finish(&str_value
);
443 static BOOL
is_valid_border_style(BSTR v
)
445 static const WCHAR styleDotted
[] = {'d','o','t','t','e','d',0};
446 static const WCHAR styleDashed
[] = {'d','a','s','h','e','d',0};
447 static const WCHAR styleSolid
[] = {'s','o','l','i','d',0};
448 static const WCHAR styleDouble
[] = {'d','o','u','b','l','e',0};
449 static const WCHAR styleGroove
[] = {'g','r','o','o','v','e',0};
450 static const WCHAR styleRidge
[] = {'r','i','d','g','e',0};
451 static const WCHAR styleInset
[] = {'i','n','s','e','t',0};
452 static const WCHAR styleOutset
[] = {'o','u','t','s','e','t',0};
454 TRACE("%s\n", debugstr_w(v
));
456 if(!v
|| strcmpiW(v
, styleNone
) == 0 || strcmpiW(v
, styleDotted
) == 0 ||
457 strcmpiW(v
, styleDashed
) == 0 || strcmpiW(v
, styleSolid
) == 0 ||
458 strcmpiW(v
, styleDouble
) == 0 || strcmpiW(v
, styleGroove
) == 0 ||
459 strcmpiW(v
, styleRidge
) == 0 || strcmpiW(v
, styleInset
) == 0 ||
460 strcmpiW(v
, styleOutset
) == 0 )
468 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
470 static HRESULT WINAPI
HTMLStyle_QueryInterface(IHTMLStyle
*iface
, REFIID riid
, void **ppv
)
472 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
476 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
477 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
478 *ppv
= HTMLSTYLE(This
);
479 }else if(IsEqualGUID(&IID_IHTMLStyle
, riid
)) {
480 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This
, ppv
);
481 *ppv
= HTMLSTYLE(This
);
482 }else if(IsEqualGUID(&IID_IHTMLStyle2
, riid
)) {
483 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This
, ppv
);
484 *ppv
= HTMLSTYLE2(This
);
485 }else if(IsEqualGUID(&IID_IHTMLStyle3
, riid
)) {
486 TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This
, ppv
);
487 *ppv
= HTMLSTYLE3(This
);
488 }else if(IsEqualGUID(&IID_IHTMLStyle4
, riid
)) {
489 TRACE("(%p)->(IID_IHTMLStyle4 %p)\n", This
, ppv
);
490 *ppv
= HTMLSTYLE4(This
);
491 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
492 return *ppv
? S_OK
: E_NOINTERFACE
;
496 IUnknown_AddRef((IUnknown
*)*ppv
);
500 WARN("unsupported %s\n", debugstr_guid(riid
));
501 return E_NOINTERFACE
;
504 static ULONG WINAPI
HTMLStyle_AddRef(IHTMLStyle
*iface
)
506 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
507 LONG ref
= InterlockedIncrement(&This
->ref
);
509 TRACE("(%p) ref=%d\n", This
, ref
);
514 static ULONG WINAPI
HTMLStyle_Release(IHTMLStyle
*iface
)
516 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
517 LONG ref
= InterlockedDecrement(&This
->ref
);
519 TRACE("(%p) ref=%d\n", This
, ref
);
523 nsIDOMCSSStyleDeclaration_Release(This
->nsstyle
);
530 static HRESULT WINAPI
HTMLStyle_GetTypeInfoCount(IHTMLStyle
*iface
, UINT
*pctinfo
)
532 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
533 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This
->dispex
), pctinfo
);
536 static HRESULT WINAPI
HTMLStyle_GetTypeInfo(IHTMLStyle
*iface
, UINT iTInfo
,
537 LCID lcid
, ITypeInfo
**ppTInfo
)
539 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
540 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->dispex
), iTInfo
, lcid
, ppTInfo
);
543 static HRESULT WINAPI
HTMLStyle_GetIDsOfNames(IHTMLStyle
*iface
, REFIID riid
,
544 LPOLESTR
*rgszNames
, UINT cNames
,
545 LCID lcid
, DISPID
*rgDispId
)
547 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
548 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
551 static HRESULT WINAPI
HTMLStyle_Invoke(IHTMLStyle
*iface
, DISPID dispIdMember
,
552 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
553 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
555 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
556 return IDispatchEx_Invoke(DISPATCHEX(&This
->dispex
), dispIdMember
, riid
, lcid
,
557 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
560 static HRESULT WINAPI
HTMLStyle_put_fontFamily(IHTMLStyle
*iface
, BSTR v
)
562 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
564 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
566 return set_style_attr(This
, STYLEID_FONT_FAMILY
, v
, 0);
569 static HRESULT WINAPI
HTMLStyle_get_fontFamily(IHTMLStyle
*iface
, BSTR
*p
)
571 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
573 TRACE("(%p)->(%p)\n", This
, p
);
575 return get_style_attr(This
, STYLEID_FONT_FAMILY
, p
);
578 static HRESULT WINAPI
HTMLStyle_put_fontStyle(IHTMLStyle
*iface
, BSTR v
)
580 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
581 static const WCHAR szItalic
[] = {'i','t','a','l','i','c',0};
582 static const WCHAR szOblique
[] = {'o','b','l','i','q','u','e',0};
584 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
586 /* fontStyle can only be one of the follow values. */
587 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(szItalic
, v
) == 0 ||
588 strcmpiW(szOblique
, v
) == 0)
590 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_STYLE
, v
, 0);
596 static HRESULT WINAPI
HTMLStyle_get_fontStyle(IHTMLStyle
*iface
, BSTR
*p
)
598 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
600 TRACE("(%p)->(%p)\n", This
, p
);
602 return get_style_attr(This
, STYLEID_FONT_STYLE
, p
);
605 static HRESULT WINAPI
HTMLStyle_put_fontVariant(IHTMLStyle
*iface
, BSTR v
)
607 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
608 static const WCHAR szCaps
[] = {'s','m','a','l','l','-','c','a','p','s',0};
610 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
612 /* fontVariant can only be one of the follow values. */
613 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(szCaps
, v
) == 0)
615 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_VARIANT
, v
, 0);
621 static HRESULT WINAPI
HTMLStyle_get_fontVariant(IHTMLStyle
*iface
, BSTR
*p
)
623 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
624 TRACE("(%p)->(%p)\n", This
, p
);
629 return get_style_attr(This
, STYLEID_FONT_VARIANT
, p
);
632 static HRESULT WINAPI
HTMLStyle_put_fontWeight(IHTMLStyle
*iface
, BSTR v
)
634 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
635 static const WCHAR styleBold
[] = {'b','o','l','d',0};
636 static const WCHAR styleBolder
[] = {'b','o','l','d','e','r',0};
637 static const WCHAR styleLighter
[] = {'l','i','g','h','t','e','r',0};
638 static const WCHAR style100
[] = {'1','0','0',0};
639 static const WCHAR style200
[] = {'2','0','0',0};
640 static const WCHAR style300
[] = {'3','0','0',0};
641 static const WCHAR style400
[] = {'4','0','0',0};
642 static const WCHAR style500
[] = {'5','0','0',0};
643 static const WCHAR style600
[] = {'6','0','0',0};
644 static const WCHAR style700
[] = {'7','0','0',0};
645 static const WCHAR style800
[] = {'8','0','0',0};
646 static const WCHAR style900
[] = {'9','0','0',0};
648 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
650 /* fontWeight can only be one of the following */
651 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(styleBold
, v
) == 0 ||
652 strcmpiW(styleBolder
, v
) == 0 || strcmpiW(styleLighter
, v
) == 0 ||
653 strcmpiW(style100
, v
) == 0 || strcmpiW(style200
, v
) == 0 ||
654 strcmpiW(style300
, v
) == 0 || strcmpiW(style400
, v
) == 0 ||
655 strcmpiW(style500
, v
) == 0 || strcmpiW(style600
, v
) == 0 ||
656 strcmpiW(style700
, v
) == 0 || strcmpiW(style800
, v
) == 0 ||
657 strcmpiW(style900
, v
) == 0
660 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_WEIGHT
, v
, 0);
666 static HRESULT WINAPI
HTMLStyle_get_fontWeight(IHTMLStyle
*iface
, BSTR
*p
)
668 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
670 TRACE("(%p)->(%p)\n", This
, p
);
672 return get_style_attr(This
, STYLEID_FONT_WEIGHT
, p
);
675 static HRESULT WINAPI
HTMLStyle_put_fontSize(IHTMLStyle
*iface
, VARIANT v
)
677 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
679 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
683 return set_style_attr(This
, STYLEID_FONT_SIZE
, V_BSTR(&v
), 0);
685 FIXME("not supported vt %d\n", V_VT(&v
));
691 static HRESULT WINAPI
HTMLStyle_get_fontSize(IHTMLStyle
*iface
, VARIANT
*p
)
693 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
695 TRACE("(%p)->(%p)\n", This
, p
);
698 return get_style_attr(This
, STYLEID_FONT_SIZE
, &V_BSTR(p
));
701 static HRESULT WINAPI
HTMLStyle_put_font(IHTMLStyle
*iface
, BSTR v
)
703 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
704 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
708 static HRESULT WINAPI
HTMLStyle_get_font(IHTMLStyle
*iface
, BSTR
*p
)
710 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
711 FIXME("(%p)->(%p)\n", This
, p
);
715 static HRESULT WINAPI
HTMLStyle_put_color(IHTMLStyle
*iface
, VARIANT v
)
717 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
719 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
723 TRACE("%s\n", debugstr_w(V_BSTR(&v
)));
724 return set_style_attr(This
, STYLEID_COLOR
, V_BSTR(&v
), 0);
727 FIXME("unsupported vt=%d\n", V_VT(&v
));
733 static HRESULT WINAPI
HTMLStyle_get_color(IHTMLStyle
*iface
, VARIANT
*p
)
735 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
737 TRACE("(%p)->(%p)\n", This
, p
);
740 return get_style_attr(This
, STYLEID_COLOR
, &V_BSTR(p
));
743 static HRESULT WINAPI
HTMLStyle_put_background(IHTMLStyle
*iface
, BSTR v
)
745 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
747 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
749 return set_style_attr(This
, STYLEID_BACKGROUND
, v
, 0);
752 static HRESULT WINAPI
HTMLStyle_get_background(IHTMLStyle
*iface
, BSTR
*p
)
754 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
756 TRACE("(%p)->(%p)\n", This
, p
);
758 return get_style_attr(This
, STYLEID_BACKGROUND
, p
);
761 static HRESULT WINAPI
HTMLStyle_put_backgroundColor(IHTMLStyle
*iface
, VARIANT v
)
763 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
765 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
769 return set_style_attr(This
, STYLEID_BACKGROUND_COLOR
, V_BSTR(&v
), 0);
772 static const WCHAR format
[] = {'#','%','0','6','x',0};
774 wsprintfW(value
, format
, V_I4(&v
));
775 return set_style_attr(This
, STYLEID_BACKGROUND_COLOR
, value
, 0);
778 FIXME("unsupported vt %d\n", V_VT(&v
));
784 static HRESULT WINAPI
HTMLStyle_get_backgroundColor(IHTMLStyle
*iface
, VARIANT
*p
)
786 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
787 TRACE("(%p)->(%p)\n", This
, p
);
790 return get_style_attr(This
, STYLEID_BACKGROUND_COLOR
, &V_BSTR(p
));
793 static HRESULT WINAPI
HTMLStyle_put_backgroundImage(IHTMLStyle
*iface
, BSTR v
)
795 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
797 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
799 return set_style_attr(This
, STYLEID_BACKGROUND_IMAGE
, v
, ATTR_FIX_URL
);
802 static HRESULT WINAPI
HTMLStyle_get_backgroundImage(IHTMLStyle
*iface
, BSTR
*p
)
804 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
806 TRACE("(%p)->(%p)\n", This
, p
);
808 return get_style_attr(This
, STYLEID_BACKGROUND_IMAGE
, p
);
811 static HRESULT WINAPI
HTMLStyle_put_backgroundRepeat(IHTMLStyle
*iface
, BSTR v
)
813 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
814 static const WCHAR styleRepeat
[] = {'r','e','p','e','a','t',0};
815 static const WCHAR styleNoRepeat
[] = {'n','o','-','r','e','p','e','a','t',0};
816 static const WCHAR styleRepeatX
[] = {'r','e','p','e','a','t','-','x',0};
817 static const WCHAR styleRepeatY
[] = {'r','e','p','e','a','t','-','y',0};
819 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
821 /* fontWeight can only be one of the following */
822 if(!v
|| strcmpiW(styleRepeat
, v
) == 0 || strcmpiW(styleNoRepeat
, v
) == 0 ||
823 strcmpiW(styleRepeatX
, v
) == 0 || strcmpiW(styleRepeatY
, v
) == 0 )
825 return set_style_attr(This
, STYLEID_BACKGROUND_REPEAT
, v
, 0);
831 static HRESULT WINAPI
HTMLStyle_get_backgroundRepeat(IHTMLStyle
*iface
, BSTR
*p
)
833 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
835 TRACE("(%p)->(%p)\n", This
, p
);
837 return get_style_attr(This
, STYLEID_BACKGROUND_REPEAT
, p
);
840 static HRESULT WINAPI
HTMLStyle_put_backgroundAttachment(IHTMLStyle
*iface
, BSTR v
)
842 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
843 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
847 static HRESULT WINAPI
HTMLStyle_get_backgroundAttachment(IHTMLStyle
*iface
, BSTR
*p
)
849 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
850 FIXME("(%p)->(%p)\n", This
, p
);
854 static HRESULT WINAPI
HTMLStyle_put_backgroundPosition(IHTMLStyle
*iface
, BSTR v
)
856 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
857 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
861 static HRESULT WINAPI
HTMLStyle_get_backgroundPosition(IHTMLStyle
*iface
, BSTR
*p
)
863 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
864 FIXME("(%p)->(%p)\n", This
, p
);
868 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionX(IHTMLStyle
*iface
, VARIANT v
)
870 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
871 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
875 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionX(IHTMLStyle
*iface
, VARIANT
*p
)
877 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
878 FIXME("(%p)->(%p)\n", This
, p
);
882 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionY(IHTMLStyle
*iface
, VARIANT v
)
884 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
885 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
889 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionY(IHTMLStyle
*iface
, VARIANT
*p
)
891 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
892 FIXME("(%p)->(%p)\n", This
, p
);
896 static HRESULT WINAPI
HTMLStyle_put_wordSpacing(IHTMLStyle
*iface
, VARIANT v
)
898 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
899 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
903 static HRESULT WINAPI
HTMLStyle_get_wordSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
905 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
906 FIXME("(%p)->(%p)\n", This
, p
);
910 static HRESULT WINAPI
HTMLStyle_put_letterSpacing(IHTMLStyle
*iface
, VARIANT v
)
912 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
913 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
917 static HRESULT WINAPI
HTMLStyle_get_letterSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
919 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
920 FIXME("(%p)->(%p)\n", This
, p
);
924 static HRESULT WINAPI
HTMLStyle_put_textDecoration(IHTMLStyle
*iface
, BSTR v
)
926 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
927 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
931 static HRESULT WINAPI
HTMLStyle_get_textDecoration(IHTMLStyle
*iface
, BSTR
*p
)
933 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
935 TRACE("(%p)->(%p)\n", This
, p
);
937 return get_style_attr(This
, STYLEID_TEXT_DECORATION
, p
);
940 static HRESULT WINAPI
HTMLStyle_put_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL v
)
942 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
944 TRACE("(%p)->(%x)\n", This
, v
);
946 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? styleNone
: emptyW
, 0);
949 static HRESULT WINAPI
HTMLStyle_get_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
951 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
953 TRACE("(%p)->(%p)\n", This
, p
);
955 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, styleNone
, p
);
958 static HRESULT WINAPI
HTMLStyle_put_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
960 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
962 TRACE("(%p)->(%x)\n", This
, v
);
964 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valUnderline
: emptyW
, 0);
967 static HRESULT WINAPI
HTMLStyle_get_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
969 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
971 TRACE("(%p)->(%p)\n", This
, p
);
973 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valUnderline
, p
);
976 static HRESULT WINAPI
HTMLStyle_put_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
978 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
980 TRACE("(%p)->(%x)\n", This
, v
);
982 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valOverline
: emptyW
, 0);
985 static HRESULT WINAPI
HTMLStyle_get_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
987 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
989 TRACE("(%p)->(%p)\n", This
, p
);
991 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valOverline
, p
);
994 static HRESULT WINAPI
HTMLStyle_put_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL v
)
996 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
998 TRACE("(%p)->(%x)\n", This
, v
);
1000 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valLineThrough
: emptyW
, 0);
1003 static HRESULT WINAPI
HTMLStyle_get_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1005 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1007 TRACE("(%p)->(%p)\n", This
, p
);
1009 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valLineThrough
, p
);
1012 static HRESULT WINAPI
HTMLStyle_put_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL v
)
1014 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1016 TRACE("(%p)->(%x)\n", This
, v
);
1018 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valBlink
: emptyW
, 0);
1021 static HRESULT WINAPI
HTMLStyle_get_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1023 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1025 TRACE("(%p)->(%p)\n", This
, p
);
1027 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valBlink
, p
);
1030 static HRESULT WINAPI
HTMLStyle_put_verticalAlign(IHTMLStyle
*iface
, VARIANT v
)
1032 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1034 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1038 return set_style_attr(This
, STYLEID_VERTICAL_ALIGN
, V_BSTR(&v
), 0);
1040 FIXME("not implemented vt %d\n", V_VT(&v
));
1047 static HRESULT WINAPI
HTMLStyle_get_verticalAlign(IHTMLStyle
*iface
, VARIANT
*p
)
1049 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1053 TRACE("(%p)->(%p)\n", This
, p
);
1055 hres
= get_style_attr(This
, STYLEID_VERTICAL_ALIGN
, &ret
);
1064 static HRESULT WINAPI
HTMLStyle_put_textTransform(IHTMLStyle
*iface
, BSTR v
)
1066 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1067 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1071 static HRESULT WINAPI
HTMLStyle_get_textTransform(IHTMLStyle
*iface
, BSTR
*p
)
1073 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1074 FIXME("(%p)->(%p)\n", This
, p
);
1078 static HRESULT WINAPI
HTMLStyle_put_textAlign(IHTMLStyle
*iface
, BSTR v
)
1080 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1082 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1084 return set_style_attr(This
, STYLEID_TEXT_ALIGN
, v
, 0);
1087 static HRESULT WINAPI
HTMLStyle_get_textAlign(IHTMLStyle
*iface
, BSTR
*p
)
1089 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1091 TRACE("(%p)->(%p)\n", This
, p
);
1093 return get_style_attr(This
, STYLEID_TEXT_ALIGN
, p
);
1096 static HRESULT WINAPI
HTMLStyle_put_textIndent(IHTMLStyle
*iface
, VARIANT v
)
1098 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1099 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1103 static HRESULT WINAPI
HTMLStyle_get_textIndent(IHTMLStyle
*iface
, VARIANT
*p
)
1105 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1106 FIXME("(%p)->(%p)\n", This
, p
);
1110 static HRESULT WINAPI
HTMLStyle_put_lineHeight(IHTMLStyle
*iface
, VARIANT v
)
1112 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1113 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1117 static HRESULT WINAPI
HTMLStyle_get_lineHeight(IHTMLStyle
*iface
, VARIANT
*p
)
1119 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1120 FIXME("(%p)->(%p)\n", This
, p
);
1124 static HRESULT WINAPI
HTMLStyle_put_marginTop(IHTMLStyle
*iface
, VARIANT v
)
1126 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1127 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1131 static HRESULT WINAPI
HTMLStyle_get_marginTop(IHTMLStyle
*iface
, VARIANT
*p
)
1133 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1134 FIXME("(%p)->(%p)\n", This
, p
);
1138 static HRESULT WINAPI
HTMLStyle_put_marginRight(IHTMLStyle
*iface
, VARIANT v
)
1140 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1142 TRACE("(%p)->(v(%d))\n", This
, V_VT(&v
));
1146 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, emptyW
, 0);
1150 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1151 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, buf
, 0);
1154 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, V_BSTR(&v
), 0);
1156 FIXME("Unsupported vt=%d\n", V_VT(&v
));
1162 static HRESULT WINAPI
HTMLStyle_get_marginRight(IHTMLStyle
*iface
, VARIANT
*p
)
1164 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1165 TRACE("(%p)->(%p)\n", This
, p
);
1166 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_RIGHT
, p
, 0);
1169 static HRESULT WINAPI
HTMLStyle_put_marginBottom(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_marginBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1178 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1179 FIXME("(%p)->(%p)\n", This
, p
);
1183 static HRESULT WINAPI
HTMLStyle_put_marginLeft(IHTMLStyle
*iface
, VARIANT v
)
1185 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1189 TRACE("(%p)->(NULL)\n", This
);
1190 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, emptyW
, 0);
1194 TRACE("(%p)->(%d)\n", This
, V_I4(&v
));
1196 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1197 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, buf
, 0);
1200 TRACE("(%p)->(%s)\n", This
, debugstr_w(V_BSTR(&v
)));
1201 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, V_BSTR(&v
), 0);
1203 FIXME("Unsupported vt=%d\n", V_VT(&v
));
1209 static HRESULT WINAPI
HTMLStyle_put_margin(IHTMLStyle
*iface
, BSTR v
)
1211 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1213 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1215 return set_style_attr(This
, STYLEID_MARGIN
, v
, 0);
1218 static HRESULT WINAPI
HTMLStyle_get_margin(IHTMLStyle
*iface
, BSTR
*p
)
1220 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1222 TRACE("(%p)->(%p)\n", This
, p
);
1224 return get_style_attr(This
, STYLEID_MARGIN
, p
);
1227 static HRESULT WINAPI
HTMLStyle_get_marginLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1229 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1230 TRACE("(%p)->(%p)\n", This
, p
);
1231 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_LEFT
, p
, 0);
1234 static HRESULT WINAPI
HTMLStyle_put_paddingTop(IHTMLStyle
*iface
, VARIANT v
)
1236 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1237 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1241 static HRESULT WINAPI
HTMLStyle_get_paddingTop(IHTMLStyle
*iface
, VARIANT
*p
)
1243 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1244 FIXME("(%p)->(%p)\n", This
, p
);
1248 static HRESULT WINAPI
HTMLStyle_put_paddingRight(IHTMLStyle
*iface
, VARIANT v
)
1250 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1251 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1255 static HRESULT WINAPI
HTMLStyle_get_paddingRight(IHTMLStyle
*iface
, VARIANT
*p
)
1257 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1258 FIXME("(%p)->(%p)\n", This
, p
);
1262 static HRESULT WINAPI
HTMLStyle_put_paddingBottom(IHTMLStyle
*iface
, VARIANT v
)
1264 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1265 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1269 static HRESULT WINAPI
HTMLStyle_get_paddingBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1271 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1272 FIXME("(%p)->(%p)\n", This
, p
);
1276 static HRESULT WINAPI
HTMLStyle_put_paddingLeft(IHTMLStyle
*iface
, VARIANT v
)
1278 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1280 TRACE("(%p)->(vt=%d)\n", This
, V_VT(&v
));
1286 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1287 return set_style_attr(This
, STYLEID_PADDING_LEFT
, buf
, 0);
1290 return set_style_attr(This
, STYLEID_PADDING_LEFT
, V_BSTR(&v
), 0);
1292 FIXME("unsupported vt=%d\n", V_VT(&v
));
1298 static HRESULT WINAPI
HTMLStyle_get_paddingLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1300 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1304 TRACE("(%p)->(%p)\n", This
, p
);
1306 hres
= get_style_attr(This
, STYLEID_PADDING_LEFT
, &ret
);
1315 static HRESULT WINAPI
HTMLStyle_put_padding(IHTMLStyle
*iface
, BSTR v
)
1317 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1318 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1322 static HRESULT WINAPI
HTMLStyle_get_padding(IHTMLStyle
*iface
, BSTR
*p
)
1324 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1325 FIXME("(%p)->(%p)\n", This
, p
);
1329 static HRESULT WINAPI
HTMLStyle_put_border(IHTMLStyle
*iface
, BSTR v
)
1331 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1333 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1335 return set_style_attr(This
, STYLEID_BORDER
, v
, 0);
1338 static HRESULT WINAPI
HTMLStyle_get_border(IHTMLStyle
*iface
, BSTR
*p
)
1340 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1342 TRACE("(%p)->(%p)\n", This
, p
);
1344 return get_style_attr(This
, STYLEID_BORDER
, p
);
1347 static HRESULT WINAPI
HTMLStyle_put_borderTop(IHTMLStyle
*iface
, BSTR v
)
1349 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1350 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1354 static HRESULT WINAPI
HTMLStyle_get_borderTop(IHTMLStyle
*iface
, BSTR
*p
)
1356 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1357 FIXME("(%p)->(%p)\n", This
, p
);
1361 static HRESULT WINAPI
HTMLStyle_put_borderRight(IHTMLStyle
*iface
, BSTR v
)
1363 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1364 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1368 static HRESULT WINAPI
HTMLStyle_get_borderRight(IHTMLStyle
*iface
, BSTR
*p
)
1370 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1371 FIXME("(%p)->(%p)\n", This
, p
);
1375 static HRESULT WINAPI
HTMLStyle_put_borderBottom(IHTMLStyle
*iface
, BSTR v
)
1377 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1378 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1382 static HRESULT WINAPI
HTMLStyle_get_borderBottom(IHTMLStyle
*iface
, BSTR
*p
)
1384 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1385 FIXME("(%p)->(%p)\n", This
, p
);
1389 static HRESULT WINAPI
HTMLStyle_put_borderLeft(IHTMLStyle
*iface
, BSTR v
)
1391 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1393 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1395 return set_style_attr(This
, STYLEID_BORDER_LEFT
, v
, ATTR_FIX_PX
);
1398 static HRESULT WINAPI
HTMLStyle_get_borderLeft(IHTMLStyle
*iface
, BSTR
*p
)
1400 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1401 FIXME("(%p)->(%p)\n", This
, p
);
1405 static HRESULT WINAPI
HTMLStyle_put_borderColor(IHTMLStyle
*iface
, BSTR v
)
1407 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1408 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1412 static HRESULT WINAPI
HTMLStyle_get_borderColor(IHTMLStyle
*iface
, BSTR
*p
)
1414 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1415 FIXME("(%p)->(%p)\n", This
, p
);
1419 static HRESULT WINAPI
HTMLStyle_put_borderTopColor(IHTMLStyle
*iface
, VARIANT v
)
1421 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1422 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1426 static HRESULT WINAPI
HTMLStyle_get_borderTopColor(IHTMLStyle
*iface
, VARIANT
*p
)
1428 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1429 FIXME("(%p)->(%p)\n", This
, p
);
1433 static HRESULT WINAPI
HTMLStyle_put_borderRightColor(IHTMLStyle
*iface
, VARIANT v
)
1435 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1436 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1440 static HRESULT WINAPI
HTMLStyle_get_borderRightColor(IHTMLStyle
*iface
, VARIANT
*p
)
1442 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1443 FIXME("(%p)->(%p)\n", This
, p
);
1447 static HRESULT WINAPI
HTMLStyle_put_borderBottomColor(IHTMLStyle
*iface
, VARIANT v
)
1449 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1450 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1454 static HRESULT WINAPI
HTMLStyle_get_borderBottomColor(IHTMLStyle
*iface
, VARIANT
*p
)
1456 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1457 FIXME("(%p)->(%p)\n", This
, p
);
1461 static HRESULT WINAPI
HTMLStyle_put_borderLeftColor(IHTMLStyle
*iface
, VARIANT v
)
1463 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1464 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1468 static HRESULT WINAPI
HTMLStyle_get_borderLeftColor(IHTMLStyle
*iface
, VARIANT
*p
)
1470 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1471 FIXME("(%p)->(%p)\n", This
, p
);
1475 static HRESULT WINAPI
HTMLStyle_put_borderWidth(IHTMLStyle
*iface
, BSTR v
)
1477 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1478 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1479 return set_style_attr(This
, STYLEID_BORDER_WIDTH
, v
, ATTR_FIX_PX
);
1482 static HRESULT WINAPI
HTMLStyle_get_borderWidth(IHTMLStyle
*iface
, BSTR
*p
)
1484 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1485 TRACE("(%p)->(%p)\n", This
, p
);
1486 return get_style_attr(This
, STYLEID_BORDER_WIDTH
, p
);
1489 static HRESULT WINAPI
HTMLStyle_put_borderTopWidth(IHTMLStyle
*iface
, VARIANT v
)
1491 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1492 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1496 static HRESULT WINAPI
HTMLStyle_get_borderTopWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1498 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1499 FIXME("(%p)->(%p)\n", This
, p
);
1503 static HRESULT WINAPI
HTMLStyle_put_borderRightWidth(IHTMLStyle
*iface
, VARIANT v
)
1505 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1506 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1510 static HRESULT WINAPI
HTMLStyle_get_borderRightWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1512 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1513 FIXME("(%p)->(%p)\n", This
, p
);
1517 static HRESULT WINAPI
HTMLStyle_put_borderBottomWidth(IHTMLStyle
*iface
, VARIANT v
)
1519 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1520 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1524 static HRESULT WINAPI
HTMLStyle_get_borderBottomWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1526 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1527 FIXME("(%p)->(%p)\n", This
, p
);
1531 static HRESULT WINAPI
HTMLStyle_put_borderLeftWidth(IHTMLStyle
*iface
, VARIANT v
)
1533 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1534 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1538 static HRESULT WINAPI
HTMLStyle_get_borderLeftWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1540 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1541 FIXME("(%p)->(%p)\n", This
, p
);
1545 static HRESULT WINAPI
HTMLStyle_put_borderStyle(IHTMLStyle
*iface
, BSTR v
)
1547 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1548 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1552 static HRESULT WINAPI
HTMLStyle_get_borderStyle(IHTMLStyle
*iface
, BSTR
*p
)
1554 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1555 FIXME("(%p)->(%p)\n", This
, p
);
1559 static HRESULT WINAPI
HTMLStyle_put_borderTopStyle(IHTMLStyle
*iface
, BSTR v
)
1561 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1562 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1564 if(!is_valid_border_style(v
))
1565 return E_INVALIDARG
;
1567 return set_style_attr(This
, STYLEID_BORDER_TOP_STYLE
, v
, 0);
1570 static HRESULT WINAPI
HTMLStyle_get_borderTopStyle(IHTMLStyle
*iface
, BSTR
*p
)
1572 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1573 TRACE("(%p)->(%p)\n", This
, p
);
1574 return get_style_attr(This
, STYLEID_BORDER_TOP_STYLE
, p
);
1577 static HRESULT WINAPI
HTMLStyle_put_borderRightStyle(IHTMLStyle
*iface
, BSTR v
)
1579 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1580 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1582 if(!is_valid_border_style(v
))
1583 return E_INVALIDARG
;
1585 return set_style_attr(This
, STYLEID_BORDER_RIGHT_STYLE
, v
, 0);
1588 static HRESULT WINAPI
HTMLStyle_get_borderRightStyle(IHTMLStyle
*iface
, BSTR
*p
)
1590 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1591 TRACE("(%p)->(%p)\n", This
, p
);
1592 return get_style_attr(This
, STYLEID_BORDER_RIGHT_STYLE
, p
);
1595 static HRESULT WINAPI
HTMLStyle_put_borderBottomStyle(IHTMLStyle
*iface
, BSTR v
)
1597 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1598 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1600 if(!is_valid_border_style(v
))
1601 return E_INVALIDARG
;
1603 return set_style_attr(This
, STYLEID_BORDER_BOTTOM_STYLE
, v
, 0);
1606 static HRESULT WINAPI
HTMLStyle_get_borderBottomStyle(IHTMLStyle
*iface
, BSTR
*p
)
1608 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1609 TRACE("(%p)->(%p)\n", This
, p
);
1610 return get_style_attr(This
, STYLEID_BORDER_BOTTOM_STYLE
, p
);
1613 static HRESULT WINAPI
HTMLStyle_put_borderLeftStyle(IHTMLStyle
*iface
, BSTR v
)
1615 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1616 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1618 if(!is_valid_border_style(v
))
1619 return E_INVALIDARG
;
1621 return set_style_attr(This
, STYLEID_BORDER_LEFT_STYLE
, v
, 0);
1624 static HRESULT WINAPI
HTMLStyle_get_borderLeftStyle(IHTMLStyle
*iface
, BSTR
*p
)
1626 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1627 TRACE("(%p)->(%p)\n", This
, p
);
1628 return get_style_attr(This
, STYLEID_BORDER_LEFT_STYLE
, p
);
1631 static HRESULT WINAPI
HTMLStyle_put_width(IHTMLStyle
*iface
, VARIANT v
)
1633 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1635 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
1639 TRACE("%s\n", debugstr_w(V_BSTR(&v
)));
1640 return set_style_attr(This
, STYLEID_WIDTH
, V_BSTR(&v
), 0);
1642 FIXME("unsupported vt %d\n", V_VT(&v
));
1648 static HRESULT WINAPI
HTMLStyle_get_width(IHTMLStyle
*iface
, VARIANT
*p
)
1650 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1652 TRACE("(%p)->(%p)\n", This
, p
);
1655 return get_style_attr(This
, STYLEID_WIDTH
, &V_BSTR(p
));
1658 static HRESULT WINAPI
HTMLStyle_put_height(IHTMLStyle
*iface
, VARIANT v
)
1660 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1662 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1666 return set_style_attr(This
, STYLEID_HEIGHT
, V_BSTR(&v
), 0);
1668 FIXME("unimplemented vt %d\n", V_VT(&v
));
1675 static HRESULT WINAPI
HTMLStyle_get_height(IHTMLStyle
*iface
, VARIANT
*p
)
1677 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1681 TRACE("(%p)->(%p)\n", This
, p
);
1683 hres
= get_style_attr(This
, STYLEID_HEIGHT
, &ret
);
1692 static HRESULT WINAPI
HTMLStyle_put_styleFloat(IHTMLStyle
*iface
, BSTR v
)
1694 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1695 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1699 static HRESULT WINAPI
HTMLStyle_get_styleFloat(IHTMLStyle
*iface
, BSTR
*p
)
1701 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1702 FIXME("(%p)->(%p)\n", This
, p
);
1706 static HRESULT WINAPI
HTMLStyle_put_clear(IHTMLStyle
*iface
, BSTR v
)
1708 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1709 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1713 static HRESULT WINAPI
HTMLStyle_get_clear(IHTMLStyle
*iface
, BSTR
*p
)
1715 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1716 FIXME("(%p)->(%p)\n", This
, p
);
1720 static HRESULT WINAPI
HTMLStyle_put_display(IHTMLStyle
*iface
, BSTR v
)
1722 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1724 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1726 return set_style_attr(This
, STYLEID_DISPLAY
, v
, 0);
1729 static HRESULT WINAPI
HTMLStyle_get_display(IHTMLStyle
*iface
, BSTR
*p
)
1731 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1733 TRACE("(%p)->(%p)\n", This
, p
);
1735 return get_style_attr(This
, STYLEID_DISPLAY
, p
);
1738 static HRESULT WINAPI
HTMLStyle_put_visibility(IHTMLStyle
*iface
, BSTR v
)
1740 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1742 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1744 return set_style_attr(This
, STYLEID_VISIBILITY
, v
, 0);
1747 static HRESULT WINAPI
HTMLStyle_get_visibility(IHTMLStyle
*iface
, BSTR
*p
)
1749 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1751 TRACE("(%p)->(%p)\n", This
, p
);
1753 return get_style_attr(This
, STYLEID_VISIBILITY
, p
);
1756 static HRESULT WINAPI
HTMLStyle_put_listStyleType(IHTMLStyle
*iface
, BSTR v
)
1758 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1759 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1763 static HRESULT WINAPI
HTMLStyle_get_listStyleType(IHTMLStyle
*iface
, BSTR
*p
)
1765 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1766 FIXME("(%p)->(%p)\n", This
, p
);
1770 static HRESULT WINAPI
HTMLStyle_put_listStylePosition(IHTMLStyle
*iface
, BSTR v
)
1772 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1773 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1777 static HRESULT WINAPI
HTMLStyle_get_listStylePosition(IHTMLStyle
*iface
, BSTR
*p
)
1779 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1780 FIXME("(%p)->(%p)\n", This
, p
);
1784 static HRESULT WINAPI
HTMLStyle_put_listStyleImage(IHTMLStyle
*iface
, BSTR v
)
1786 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1787 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1791 static HRESULT WINAPI
HTMLStyle_get_listStyleImage(IHTMLStyle
*iface
, BSTR
*p
)
1793 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1794 FIXME("(%p)->(%p)\n", This
, p
);
1798 static HRESULT WINAPI
HTMLStyle_put_listStyle(IHTMLStyle
*iface
, BSTR v
)
1800 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1801 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1805 static HRESULT WINAPI
HTMLStyle_get_listStyle(IHTMLStyle
*iface
, BSTR
*p
)
1807 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1808 FIXME("(%p)->(%p)\n", This
, p
);
1812 static HRESULT WINAPI
HTMLStyle_put_whiteSpace(IHTMLStyle
*iface
, BSTR v
)
1814 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1815 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1819 static HRESULT WINAPI
HTMLStyle_get_whiteSpace(IHTMLStyle
*iface
, BSTR
*p
)
1821 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1822 FIXME("(%p)->(%p)\n", This
, p
);
1826 static HRESULT WINAPI
HTMLStyle_put_top(IHTMLStyle
*iface
, VARIANT v
)
1828 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1830 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1832 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_TOP
, &v
, 0);
1835 static HRESULT WINAPI
HTMLStyle_get_top(IHTMLStyle
*iface
, VARIANT
*p
)
1837 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1841 TRACE("(%p)->(%p)\n", This
, p
);
1843 hres
= get_style_attr(This
, STYLEID_TOP
, &ret
);
1852 static HRESULT WINAPI
HTMLStyle_put_left(IHTMLStyle
*iface
, VARIANT v
)
1854 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1856 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1858 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_LEFT
, &v
, 0);
1861 static HRESULT WINAPI
HTMLStyle_get_left(IHTMLStyle
*iface
, VARIANT
*p
)
1863 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1867 TRACE("(%p)->(%p)\n", This
, p
);
1869 hres
= get_style_attr(This
, STYLEID_LEFT
, &ret
);
1878 static HRESULT WINAPI
HTMLStyle_get_position(IHTMLStyle
*iface
, BSTR
*p
)
1880 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1881 TRACE("(%p)->(%p)\n", This
, p
);
1882 return IHTMLStyle2_get_position(HTMLSTYLE2(This
), p
);
1885 static HRESULT WINAPI
HTMLStyle_put_zIndex(IHTMLStyle
*iface
, VARIANT v
)
1887 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1889 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1893 return set_style_attr(This
, STYLEID_Z_INDEX
, V_BSTR(&v
), 0);
1896 static const WCHAR format
[] = {'%','d',0};
1898 wsprintfW(value
, format
, V_I4(&v
));
1899 return set_style_attr(This
, STYLEID_Z_INDEX
, value
, 0);
1902 FIXME("unimplemented vt %d\n", V_VT(&v
));
1909 static HRESULT WINAPI
HTMLStyle_get_zIndex(IHTMLStyle
*iface
, VARIANT
*p
)
1911 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1913 TRACE("(%p)->(%p)\n", This
, p
);
1915 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_Z_INDEX
, p
, ATTR_STR_TO_INT
);
1918 static HRESULT WINAPI
HTMLStyle_put_overflow(IHTMLStyle
*iface
, BSTR v
)
1920 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1921 static const WCHAR szVisible
[] = {'v','i','s','i','b','l','e',0};
1922 static const WCHAR szScroll
[] = {'s','c','r','o','l','l',0};
1923 static const WCHAR szHidden
[] = {'h','i','d','d','e','n',0};
1924 static const WCHAR szAuto
[] = {'a','u','t','o',0};
1926 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1928 /* overflow can only be one of the follow values. */
1929 if(!v
|| strcmpiW(szVisible
, v
) == 0 || strcmpiW(szScroll
, v
) == 0 ||
1930 strcmpiW(szHidden
, v
) == 0 || strcmpiW(szAuto
, v
) == 0)
1932 return set_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW
, v
, 0);
1935 return E_INVALIDARG
;
1939 static HRESULT WINAPI
HTMLStyle_get_overflow(IHTMLStyle
*iface
, BSTR
*p
)
1941 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1943 TRACE("(%p)->(%p)\n", This
, p
);
1946 return E_INVALIDARG
;
1948 return get_style_attr(This
, STYLEID_OVERFLOW
, p
);
1951 static HRESULT WINAPI
HTMLStyle_put_pageBreakBefore(IHTMLStyle
*iface
, BSTR v
)
1953 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1954 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1958 static HRESULT WINAPI
HTMLStyle_get_pageBreakBefore(IHTMLStyle
*iface
, BSTR
*p
)
1960 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1961 FIXME("(%p)->(%p)\n", This
, p
);
1965 static HRESULT WINAPI
HTMLStyle_put_pageBreakAfter(IHTMLStyle
*iface
, BSTR v
)
1967 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1968 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1972 static HRESULT WINAPI
HTMLStyle_get_pageBreakAfter(IHTMLStyle
*iface
, BSTR
*p
)
1974 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1975 FIXME("(%p)->(%p)\n", This
, p
);
1979 static HRESULT WINAPI
HTMLStyle_put_cssText(IHTMLStyle
*iface
, BSTR v
)
1981 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1982 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1986 static HRESULT WINAPI
HTMLStyle_get_cssText(IHTMLStyle
*iface
, BSTR
*p
)
1988 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1989 FIXME("(%p)->(%p)\n", This
, p
);
1993 static HRESULT WINAPI
HTMLStyle_put_pixelTop(IHTMLStyle
*iface
, long v
)
1995 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1996 FIXME("(%p)->()\n", This
);
2000 static HRESULT WINAPI
HTMLStyle_get_pixelTop(IHTMLStyle
*iface
, long *p
)
2002 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2003 FIXME("(%p)->()\n", This
);
2007 static HRESULT WINAPI
HTMLStyle_put_pixelLeft(IHTMLStyle
*iface
, long v
)
2009 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2010 FIXME("(%p)->()\n", This
);
2014 static HRESULT WINAPI
HTMLStyle_get_pixelLeft(IHTMLStyle
*iface
, long *p
)
2016 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2017 FIXME("(%p)->()\n", This
);
2021 static HRESULT WINAPI
HTMLStyle_put_pixelWidth(IHTMLStyle
*iface
, long v
)
2023 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2024 FIXME("(%p)->()\n", This
);
2028 static HRESULT WINAPI
HTMLStyle_get_pixelWidth(IHTMLStyle
*iface
, long *p
)
2030 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2031 FIXME("(%p)->()\n", This
);
2035 static HRESULT WINAPI
HTMLStyle_put_pixelHeight(IHTMLStyle
*iface
, long v
)
2037 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2038 FIXME("(%p)->()\n", This
);
2042 static HRESULT WINAPI
HTMLStyle_get_pixelHeight(IHTMLStyle
*iface
, long *p
)
2044 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2045 FIXME("(%p)->()\n", This
);
2049 static HRESULT WINAPI
HTMLStyle_put_posTop(IHTMLStyle
*iface
, float v
)
2051 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2053 TRACE("(%p)->(%f)\n", This
, v
);
2055 return set_style_pos(This
, STYLEID_TOP
, v
);
2058 static HRESULT WINAPI
HTMLStyle_get_posTop(IHTMLStyle
*iface
, float *p
)
2060 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2062 TRACE("(%p)->(%p)\n", This
, p
);
2067 return get_nsstyle_pos(This
, STYLEID_TOP
, p
);
2070 static HRESULT WINAPI
HTMLStyle_put_posLeft(IHTMLStyle
*iface
, float v
)
2072 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2074 TRACE("(%p)->(%f)\n", This
, v
);
2076 return set_style_pos(This
, STYLEID_LEFT
, v
);
2079 static HRESULT WINAPI
HTMLStyle_get_posLeft(IHTMLStyle
*iface
, float *p
)
2081 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2083 TRACE("(%p)->(%p)\n", This
, p
);
2088 return get_nsstyle_pos(This
, STYLEID_LEFT
, p
);
2091 static HRESULT WINAPI
HTMLStyle_put_posWidth(IHTMLStyle
*iface
, float v
)
2093 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2095 TRACE("(%p)->(%f)\n", This
, v
);
2097 return set_style_pos(This
, STYLEID_WIDTH
, v
);
2100 static HRESULT WINAPI
HTMLStyle_get_posWidth(IHTMLStyle
*iface
, float *p
)
2102 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2104 TRACE("(%p)->(%p)\n", This
, p
);
2109 if(get_nsstyle_pos(This
, STYLEID_WIDTH
, p
) != S_OK
)
2115 static HRESULT WINAPI
HTMLStyle_put_posHeight(IHTMLStyle
*iface
, float v
)
2117 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2119 TRACE("(%p)->(%f)\n", This
, v
);
2121 return set_style_pos(This
, STYLEID_HEIGHT
, v
);
2124 static HRESULT WINAPI
HTMLStyle_get_posHeight(IHTMLStyle
*iface
, float *p
)
2126 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2128 TRACE("(%p)->(%p)\n", This
, p
);
2133 if(get_nsstyle_pos(This
, STYLEID_HEIGHT
, p
) != S_OK
)
2139 static HRESULT WINAPI
HTMLStyle_put_cursor(IHTMLStyle
*iface
, BSTR v
)
2141 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2143 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2145 return set_style_attr(This
, STYLEID_CURSOR
, v
, 0);
2148 static HRESULT WINAPI
HTMLStyle_get_cursor(IHTMLStyle
*iface
, BSTR
*p
)
2150 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2152 TRACE("(%p)->(%p)\n", This
, p
);
2154 return get_style_attr(This
, STYLEID_CURSOR
, p
);
2157 static HRESULT WINAPI
HTMLStyle_put_clip(IHTMLStyle
*iface
, BSTR v
)
2159 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2160 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
2164 static HRESULT WINAPI
HTMLStyle_get_clip(IHTMLStyle
*iface
, BSTR
*p
)
2166 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2167 FIXME("(%p)->(%p)\n", This
, p
);
2171 static HRESULT WINAPI
HTMLStyle_put_filter(IHTMLStyle
*iface
, BSTR v
)
2173 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2175 WARN("(%p)->(%s)\n", This
, debugstr_w(v
));
2177 /* FIXME: Handle MS-style filters */
2178 return set_style_attr(This
, STYLEID_FILTER
, v
, 0);
2181 static HRESULT WINAPI
HTMLStyle_get_filter(IHTMLStyle
*iface
, BSTR
*p
)
2183 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2185 WARN("(%p)->(%p)\n", This
, p
);
2187 /* FIXME: Handle MS-style filters */
2188 return get_style_attr(This
, STYLEID_FILTER
, p
);
2191 static HRESULT WINAPI
HTMLStyle_setAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2192 VARIANT AttributeValue
, LONG lFlags
)
2194 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2198 TRACE("(%p)->(%s v%d %08x)\n", This
, debugstr_w(strAttributeName
),
2199 V_VT(&AttributeValue
), lFlags
);
2201 if(!strAttributeName
)
2202 return E_INVALIDARG
;
2205 FIXME("Parameter lFlags ignored\n");
2207 hres
= HTMLStyle_GetIDsOfNames(iface
, &IID_NULL
, &strAttributeName
, 1,
2208 LOCALE_USER_DEFAULT
, &dispid
);
2212 DISPID dispidNamed
= DISPID_PROPERTYPUT
;
2216 params
.rgvarg
= &AttributeValue
;
2217 params
.cNamedArgs
= 1;
2218 params
.rgdispidNamedArgs
= &dispidNamed
;
2220 hres
= HTMLStyle_Invoke(iface
, dispid
, &IID_NULL
, LOCALE_SYSTEM_DEFAULT
,
2221 DISPATCH_PROPERTYPUT
, ¶ms
, &ret
, NULL
, NULL
);
2225 FIXME("Custom attributes not supported.\n");
2228 TRACE("ret: %08x\n", hres
);
2233 static HRESULT WINAPI
HTMLStyle_getAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2234 LONG lFlags
, VARIANT
*AttributeValue
)
2236 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2240 TRACE("(%p)->(%s v%p %08x)\n", This
, debugstr_w(strAttributeName
),
2241 AttributeValue
, lFlags
);
2243 if(!AttributeValue
|| !strAttributeName
)
2244 return E_INVALIDARG
;
2247 FIXME("Parameter lFlags ignored\n");
2249 hres
= HTMLStyle_GetIDsOfNames(iface
, &IID_NULL
, &strAttributeName
, 1,
2250 LOCALE_USER_DEFAULT
, &dispid
);
2253 DISPPARAMS params
= {NULL
, NULL
, 0, 0 };
2255 hres
= HTMLStyle_Invoke(iface
, dispid
, &IID_NULL
, LOCALE_SYSTEM_DEFAULT
,
2256 DISPATCH_PROPERTYGET
, ¶ms
, AttributeValue
, NULL
, NULL
);
2260 FIXME("Custom attributes not supported.\n");
2266 static HRESULT WINAPI
HTMLStyle_removeAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2267 LONG lFlags
, VARIANT_BOOL
*pfSuccess
)
2269 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2270 FIXME("(%p)->(%s %08x %p)\n", This
, debugstr_w(strAttributeName
),
2275 static HRESULT WINAPI
HTMLStyle_toString(IHTMLStyle
*iface
, BSTR
*String
)
2277 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2278 FIXME("(%p)->(%p)\n", This
, String
);
2282 static HRESULT
HTMLStyle_get_dispid(IUnknown
*iface
, BSTR name
, DWORD flags
, DISPID
*dispid
)
2284 int c
, i
, min
=0, max
= sizeof(style_tbl
)/sizeof(*style_tbl
)-1;
2289 c
= strcmpW(style_tbl
[i
].name
, name
);
2291 *dispid
= style_tbl
[i
].dispid
;
2301 return DISP_E_UNKNOWNNAME
;
2304 static const IHTMLStyleVtbl HTMLStyleVtbl
= {
2305 HTMLStyle_QueryInterface
,
2308 HTMLStyle_GetTypeInfoCount
,
2309 HTMLStyle_GetTypeInfo
,
2310 HTMLStyle_GetIDsOfNames
,
2312 HTMLStyle_put_fontFamily
,
2313 HTMLStyle_get_fontFamily
,
2314 HTMLStyle_put_fontStyle
,
2315 HTMLStyle_get_fontStyle
,
2316 HTMLStyle_put_fontVariant
,
2317 HTMLStyle_get_fontVariant
,
2318 HTMLStyle_put_fontWeight
,
2319 HTMLStyle_get_fontWeight
,
2320 HTMLStyle_put_fontSize
,
2321 HTMLStyle_get_fontSize
,
2324 HTMLStyle_put_color
,
2325 HTMLStyle_get_color
,
2326 HTMLStyle_put_background
,
2327 HTMLStyle_get_background
,
2328 HTMLStyle_put_backgroundColor
,
2329 HTMLStyle_get_backgroundColor
,
2330 HTMLStyle_put_backgroundImage
,
2331 HTMLStyle_get_backgroundImage
,
2332 HTMLStyle_put_backgroundRepeat
,
2333 HTMLStyle_get_backgroundRepeat
,
2334 HTMLStyle_put_backgroundAttachment
,
2335 HTMLStyle_get_backgroundAttachment
,
2336 HTMLStyle_put_backgroundPosition
,
2337 HTMLStyle_get_backgroundPosition
,
2338 HTMLStyle_put_backgroundPositionX
,
2339 HTMLStyle_get_backgroundPositionX
,
2340 HTMLStyle_put_backgroundPositionY
,
2341 HTMLStyle_get_backgroundPositionY
,
2342 HTMLStyle_put_wordSpacing
,
2343 HTMLStyle_get_wordSpacing
,
2344 HTMLStyle_put_letterSpacing
,
2345 HTMLStyle_get_letterSpacing
,
2346 HTMLStyle_put_textDecoration
,
2347 HTMLStyle_get_textDecoration
,
2348 HTMLStyle_put_textDecorationNone
,
2349 HTMLStyle_get_textDecorationNone
,
2350 HTMLStyle_put_textDecorationUnderline
,
2351 HTMLStyle_get_textDecorationUnderline
,
2352 HTMLStyle_put_textDecorationOverline
,
2353 HTMLStyle_get_textDecorationOverline
,
2354 HTMLStyle_put_textDecorationLineThrough
,
2355 HTMLStyle_get_textDecorationLineThrough
,
2356 HTMLStyle_put_textDecorationBlink
,
2357 HTMLStyle_get_textDecorationBlink
,
2358 HTMLStyle_put_verticalAlign
,
2359 HTMLStyle_get_verticalAlign
,
2360 HTMLStyle_put_textTransform
,
2361 HTMLStyle_get_textTransform
,
2362 HTMLStyle_put_textAlign
,
2363 HTMLStyle_get_textAlign
,
2364 HTMLStyle_put_textIndent
,
2365 HTMLStyle_get_textIndent
,
2366 HTMLStyle_put_lineHeight
,
2367 HTMLStyle_get_lineHeight
,
2368 HTMLStyle_put_marginTop
,
2369 HTMLStyle_get_marginTop
,
2370 HTMLStyle_put_marginRight
,
2371 HTMLStyle_get_marginRight
,
2372 HTMLStyle_put_marginBottom
,
2373 HTMLStyle_get_marginBottom
,
2374 HTMLStyle_put_marginLeft
,
2375 HTMLStyle_get_marginLeft
,
2376 HTMLStyle_put_margin
,
2377 HTMLStyle_get_margin
,
2378 HTMLStyle_put_paddingTop
,
2379 HTMLStyle_get_paddingTop
,
2380 HTMLStyle_put_paddingRight
,
2381 HTMLStyle_get_paddingRight
,
2382 HTMLStyle_put_paddingBottom
,
2383 HTMLStyle_get_paddingBottom
,
2384 HTMLStyle_put_paddingLeft
,
2385 HTMLStyle_get_paddingLeft
,
2386 HTMLStyle_put_padding
,
2387 HTMLStyle_get_padding
,
2388 HTMLStyle_put_border
,
2389 HTMLStyle_get_border
,
2390 HTMLStyle_put_borderTop
,
2391 HTMLStyle_get_borderTop
,
2392 HTMLStyle_put_borderRight
,
2393 HTMLStyle_get_borderRight
,
2394 HTMLStyle_put_borderBottom
,
2395 HTMLStyle_get_borderBottom
,
2396 HTMLStyle_put_borderLeft
,
2397 HTMLStyle_get_borderLeft
,
2398 HTMLStyle_put_borderColor
,
2399 HTMLStyle_get_borderColor
,
2400 HTMLStyle_put_borderTopColor
,
2401 HTMLStyle_get_borderTopColor
,
2402 HTMLStyle_put_borderRightColor
,
2403 HTMLStyle_get_borderRightColor
,
2404 HTMLStyle_put_borderBottomColor
,
2405 HTMLStyle_get_borderBottomColor
,
2406 HTMLStyle_put_borderLeftColor
,
2407 HTMLStyle_get_borderLeftColor
,
2408 HTMLStyle_put_borderWidth
,
2409 HTMLStyle_get_borderWidth
,
2410 HTMLStyle_put_borderTopWidth
,
2411 HTMLStyle_get_borderTopWidth
,
2412 HTMLStyle_put_borderRightWidth
,
2413 HTMLStyle_get_borderRightWidth
,
2414 HTMLStyle_put_borderBottomWidth
,
2415 HTMLStyle_get_borderBottomWidth
,
2416 HTMLStyle_put_borderLeftWidth
,
2417 HTMLStyle_get_borderLeftWidth
,
2418 HTMLStyle_put_borderStyle
,
2419 HTMLStyle_get_borderStyle
,
2420 HTMLStyle_put_borderTopStyle
,
2421 HTMLStyle_get_borderTopStyle
,
2422 HTMLStyle_put_borderRightStyle
,
2423 HTMLStyle_get_borderRightStyle
,
2424 HTMLStyle_put_borderBottomStyle
,
2425 HTMLStyle_get_borderBottomStyle
,
2426 HTMLStyle_put_borderLeftStyle
,
2427 HTMLStyle_get_borderLeftStyle
,
2428 HTMLStyle_put_width
,
2429 HTMLStyle_get_width
,
2430 HTMLStyle_put_height
,
2431 HTMLStyle_get_height
,
2432 HTMLStyle_put_styleFloat
,
2433 HTMLStyle_get_styleFloat
,
2434 HTMLStyle_put_clear
,
2435 HTMLStyle_get_clear
,
2436 HTMLStyle_put_display
,
2437 HTMLStyle_get_display
,
2438 HTMLStyle_put_visibility
,
2439 HTMLStyle_get_visibility
,
2440 HTMLStyle_put_listStyleType
,
2441 HTMLStyle_get_listStyleType
,
2442 HTMLStyle_put_listStylePosition
,
2443 HTMLStyle_get_listStylePosition
,
2444 HTMLStyle_put_listStyleImage
,
2445 HTMLStyle_get_listStyleImage
,
2446 HTMLStyle_put_listStyle
,
2447 HTMLStyle_get_listStyle
,
2448 HTMLStyle_put_whiteSpace
,
2449 HTMLStyle_get_whiteSpace
,
2454 HTMLStyle_get_position
,
2455 HTMLStyle_put_zIndex
,
2456 HTMLStyle_get_zIndex
,
2457 HTMLStyle_put_overflow
,
2458 HTMLStyle_get_overflow
,
2459 HTMLStyle_put_pageBreakBefore
,
2460 HTMLStyle_get_pageBreakBefore
,
2461 HTMLStyle_put_pageBreakAfter
,
2462 HTMLStyle_get_pageBreakAfter
,
2463 HTMLStyle_put_cssText
,
2464 HTMLStyle_get_cssText
,
2465 HTMLStyle_put_pixelTop
,
2466 HTMLStyle_get_pixelTop
,
2467 HTMLStyle_put_pixelLeft
,
2468 HTMLStyle_get_pixelLeft
,
2469 HTMLStyle_put_pixelWidth
,
2470 HTMLStyle_get_pixelWidth
,
2471 HTMLStyle_put_pixelHeight
,
2472 HTMLStyle_get_pixelHeight
,
2473 HTMLStyle_put_posTop
,
2474 HTMLStyle_get_posTop
,
2475 HTMLStyle_put_posLeft
,
2476 HTMLStyle_get_posLeft
,
2477 HTMLStyle_put_posWidth
,
2478 HTMLStyle_get_posWidth
,
2479 HTMLStyle_put_posHeight
,
2480 HTMLStyle_get_posHeight
,
2481 HTMLStyle_put_cursor
,
2482 HTMLStyle_get_cursor
,
2485 HTMLStyle_put_filter
,
2486 HTMLStyle_get_filter
,
2487 HTMLStyle_setAttribute
,
2488 HTMLStyle_getAttribute
,
2489 HTMLStyle_removeAttribute
,
2493 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl
= {
2494 HTMLStyle_get_dispid
,
2498 static const tid_t HTMLStyle_iface_tids
[] = {
2503 static dispex_static_data_t HTMLStyle_dispex
= {
2504 &HTMLStyle_dispex_vtbl
,
2507 HTMLStyle_iface_tids
2510 IHTMLStyle
*HTMLStyle_Create(nsIDOMCSSStyleDeclaration
*nsstyle
)
2512 HTMLStyle
*ret
= heap_alloc_zero(sizeof(HTMLStyle
));
2514 ret
->lpHTMLStyleVtbl
= &HTMLStyleVtbl
;
2516 ret
->nsstyle
= nsstyle
;
2517 HTMLStyle2_Init(ret
);
2518 HTMLStyle3_Init(ret
);
2520 nsIDOMCSSStyleDeclaration_AddRef(nsstyle
);
2522 init_dispex(&ret
->dispex
, (IUnknown
*)HTMLSTYLE(ret
), &HTMLStyle_dispex
);
2524 return HTMLSTYLE(ret
);