2 * Copyright 2006 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #include "mshtml_private.h"
31 #include "htmlstyle.h"
33 #include "wine/debug.h"
34 #include "wine/unicode.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
38 static const WCHAR attrBackground
[] =
39 {'b','a','c','k','g','r','o','u','n','d',0};
40 static const WCHAR attrBackgroundColor
[] =
41 {'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0};
42 static const WCHAR attrBackgroundImage
[] =
43 {'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e',0};
44 static const WCHAR attrBackgroundPositionX
[] =
45 {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','x',0};
46 static const WCHAR attrBackgroundPositionY
[] =
47 {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','y',0};
48 static const WCHAR attrBackgroundRepeat
[] =
49 {'b','a','c','k','g','r','o','u','n','d','-','r','e','p','e','a','t',0};
50 static const WCHAR attrBorder
[] =
51 {'b','o','r','d','e','r',0};
52 static const WCHAR attrBorderBottomStyle
[] =
53 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e',0};
54 static const WCHAR attrBorderBottomWidth
[] =
55 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','w','i','d','t','h',0};
56 static const WCHAR attrBorderColor
[] =
57 {'b','o','r','d','e','r','-','c','o','l','o','r',0};
58 static const WCHAR attrBorderLeft
[] =
59 {'b','o','r','d','e','r','-','l','e','f','t',0};
60 static const WCHAR attrBorderLeftStyle
[] =
61 {'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0};
62 static const WCHAR attrBorderRightStyle
[] =
63 {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
64 static const WCHAR attrBorderRightWidth
[] =
65 {'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0};
66 static const WCHAR attrBorderStyle
[] =
67 {'b','o','r','d','e','r','-','s','t','y','l','e',0};
68 static const WCHAR attrBorderTopStyle
[] =
69 {'b','o','r','d','e','r','-','t','o','p','-','s','t','y','l','e',0};
70 static const WCHAR attrBorderTopWidth
[] =
71 {'b','o','r','d','e','r','-','t','o','p','-','w','i','d','t','h',0};
72 static const WCHAR attrBorderWidth
[] =
73 {'b','o','r','d','e','r','-','w','i','d','t','h',0};
74 static const WCHAR attrColor
[] =
75 {'c','o','l','o','r',0};
76 static const WCHAR attrCursor
[] =
77 {'c','u','r','s','o','r',0};
78 static const WCHAR attrDisplay
[] =
79 {'d','i','s','p','l','a','y',0};
80 static const WCHAR attrFilter
[] =
81 {'f','i','l','e','t','e','r',0};
82 static const WCHAR attrFontFamily
[] =
83 {'f','o','n','t','-','f','a','m','i','l','y',0};
84 static const WCHAR attrFontSize
[] =
85 {'f','o','n','t','-','s','i','z','e',0};
86 static const WCHAR attrFontStyle
[] =
87 {'f','o','n','t','-','s','t','y','l','e',0};
88 static const WCHAR attrFontVariant
[] =
89 {'f','o','n','t','-','v','a','r','i','a','n','t',0};
90 static const WCHAR attrFontWeight
[] =
91 {'f','o','n','t','-','w','e','i','g','h','t',0};
92 static const WCHAR attrHeight
[] =
93 {'h','e','i','g','h','t',0};
94 static const WCHAR attrLeft
[] =
96 static const WCHAR attrMargin
[] =
97 {'m','a','r','g','i','n',0};
98 static const WCHAR attrMarginLeft
[] =
99 {'m','a','r','g','i','n','-','l','e','f','t',0};
100 static const WCHAR attrMarginRight
[] =
101 {'m','a','r','g','i','n','-','r','i','g','h','t',0};
102 static const WCHAR attrMinHeight
[] =
103 {'m','i','n','-','h','e','i','g','h','t',0};
104 static const WCHAR attrOverflow
[] =
105 {'o','v','e','r','f','l','o','w',0};
106 static const WCHAR attrPaddingLeft
[] =
107 {'p','a','d','d','i','n','g','-','l','e','f','t',0};
108 static const WCHAR attrPosition
[] =
109 {'p','o','s','i','t','i','o','n',0};
110 static const WCHAR attrTextAlign
[] =
111 {'t','e','x','t','-','a','l','i','g','n',0};
112 static const WCHAR attrTextDecoration
[] =
113 {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
114 static const WCHAR attrTop
[] =
116 static const WCHAR attrVerticalAlign
[] =
117 {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
118 static const WCHAR attrVisibility
[] =
119 {'v','i','s','i','b','i','l','i','t','y',0};
120 static const WCHAR attrWidth
[] =
121 {'w','i','d','t','h',0};
122 static const WCHAR attrWordWrap
[] =
123 {'w','o','r','d','-','w','r','a','p',0};
124 static const WCHAR attrZIndex
[] =
125 {'z','-','i','n','d','e','x',0};
131 {attrBackground
, DISPID_IHTMLSTYLE_BACKGROUND
},
132 {attrBackgroundColor
, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR
},
133 {attrBackgroundImage
, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE
},
134 {attrBackgroundPositionX
, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONX
},
135 {attrBackgroundPositionY
, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONY
},
136 {attrBackgroundRepeat
, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT
},
137 {attrBorder
, DISPID_IHTMLSTYLE_BORDER
},
138 {attrBorderBottomStyle
, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE
},
139 {attrBorderBottomWidth
, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH
},
140 {attrBorderColor
, DISPID_IHTMLSTYLE_BORDERCOLOR
},
141 {attrBorderLeft
, DISPID_IHTMLSTYLE_BORDERLEFT
},
142 {attrBorderLeftStyle
, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE
},
143 {attrBorderRightStyle
, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE
},
144 {attrBorderRightWidth
, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH
},
145 {attrBorderStyle
, DISPID_IHTMLSTYLE_BORDERSTYLE
},
146 {attrBorderTopStyle
, DISPID_IHTMLSTYLE_BORDERTOPSTYLE
},
147 {attrBorderTopWidth
, DISPID_IHTMLSTYLE_BORDERTOPWIDTH
},
148 {attrBorderWidth
, DISPID_IHTMLSTYLE_BORDERWIDTH
},
149 {attrColor
, DISPID_IHTMLSTYLE_COLOR
},
150 {attrCursor
, DISPID_IHTMLSTYLE_CURSOR
},
151 {attrDisplay
, DISPID_IHTMLSTYLE_DISPLAY
},
152 {attrFilter
, DISPID_IHTMLSTYLE_FILTER
},
153 {attrFontFamily
, DISPID_IHTMLSTYLE_FONTFAMILY
},
154 {attrFontSize
, DISPID_IHTMLSTYLE_FONTSIZE
},
155 {attrFontStyle
, DISPID_IHTMLSTYLE_FONTSTYLE
},
156 {attrFontVariant
, DISPID_IHTMLSTYLE_FONTVARIANT
},
157 {attrFontWeight
, DISPID_IHTMLSTYLE_FONTWEIGHT
},
158 {attrHeight
, DISPID_IHTMLSTYLE_HEIGHT
},
159 {attrLeft
, DISPID_IHTMLSTYLE_LEFT
},
160 {attrMargin
, DISPID_IHTMLSTYLE_MARGIN
},
161 {attrMarginLeft
, DISPID_IHTMLSTYLE_MARGINLEFT
},
162 {attrMarginRight
, DISPID_IHTMLSTYLE_MARGINRIGHT
},
163 {attrMinHeight
, DISPID_IHTMLSTYLE4_MINHEIGHT
},
164 {attrOverflow
, DISPID_IHTMLSTYLE_OVERFLOW
},
165 {attrPaddingLeft
, DISPID_IHTMLSTYLE_PADDINGLEFT
},
166 {attrPosition
, DISPID_IHTMLSTYLE2_POSITION
},
167 {attrTextAlign
, DISPID_IHTMLSTYLE_TEXTALIGN
},
168 {attrTextDecoration
, DISPID_IHTMLSTYLE_TEXTDECORATION
},
169 {attrTop
, DISPID_IHTMLSTYLE_TOP
},
170 {attrVerticalAlign
, DISPID_IHTMLSTYLE_VERTICALALIGN
},
171 {attrVisibility
, DISPID_IHTMLSTYLE_VISIBILITY
},
172 {attrWidth
, DISPID_IHTMLSTYLE_WIDTH
},
173 {attrWordWrap
, DISPID_IHTMLSTYLE3_WORDWRAP
},
174 {attrZIndex
, DISPID_IHTMLSTYLE_ZINDEX
}
177 static const WCHAR valLineThrough
[] =
178 {'l','i','n','e','-','t','h','r','o','u','g','h',0};
179 static const WCHAR valUnderline
[] =
180 {'u','n','d','e','r','l','i','n','e',0};
181 static const WCHAR szNormal
[] =
182 {'n','o','r','m','a','l',0};
183 static const WCHAR styleNone
[] =
185 static const WCHAR valOverline
[] =
186 {'o','v','e','r','l','i','n','e',0};
187 static const WCHAR valBlink
[] =
188 {'b','l','i','n','k',0};
190 static const WCHAR px_formatW
[] = {'%','d','p','x',0};
191 static const WCHAR emptyW
[] = {0};
193 static LPWSTR
fix_px_value(LPCWSTR val
)
198 while(*ptr
&& isspaceW(*ptr
))
203 while(*ptr
&& isdigitW(*ptr
))
206 if(!*ptr
|| isspaceW(*ptr
)) {
208 int len
= strlenW(val
)+1;
210 ret
= heap_alloc((len
+2)*sizeof(WCHAR
));
211 memcpy(ret
, val
, (ptr
-val
)*sizeof(WCHAR
));
217 TRACE("fixed %s -> %s\n", debugstr_w(val
), debugstr_w(ret
));
222 while(*ptr
&& !isspaceW(*ptr
))
229 static LPWSTR
fix_url_value(LPCWSTR val
)
233 static const WCHAR urlW
[] = {'u','r','l','('};
235 if(strncmpW(val
, urlW
, sizeof(urlW
)/sizeof(WCHAR
)) || !strchrW(val
, '\\'))
238 ret
= heap_strdupW(val
);
240 for(ptr
= ret
; *ptr
; ptr
++) {
248 HRESULT
set_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
250 nsAString str_name
, str_value
, str_empty
;
254 static const PRUnichar wszEmpty
[] = {0};
256 if(flags
& ATTR_FIX_PX
)
257 val
= fix_px_value(value
);
258 if(flags
& ATTR_FIX_URL
)
259 val
= fix_url_value(value
);
261 nsAString_Init(&str_name
, style_tbl
[sid
].name
);
262 nsAString_Init(&str_value
, val
? val
: value
);
263 nsAString_Init(&str_empty
, wszEmpty
);
266 nsres
= nsIDOMCSSStyleDeclaration_SetProperty(nsstyle
, &str_name
, &str_value
, &str_empty
);
268 ERR("SetProperty failed: %08x\n", nsres
);
270 nsAString_Finish(&str_name
);
271 nsAString_Finish(&str_value
);
272 nsAString_Finish(&str_empty
);
277 HRESULT
set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*value
, DWORD flags
)
279 switch(V_VT(value
)) {
281 return set_nsstyle_attr(nsstyle
, sid
, emptyW
, flags
);
284 return set_nsstyle_attr(nsstyle
, sid
, V_BSTR(value
), flags
);
288 static const WCHAR format
[] = {'%','d',0};
290 wsprintfW(str
, format
, V_I4(value
));
291 return set_nsstyle_attr(nsstyle
, sid
, str
, flags
);
294 FIXME("not implemented vt %d\n", V_VT(value
));
302 static inline HRESULT
set_style_attr(HTMLStyle
*This
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
304 return set_nsstyle_attr(This
->nsstyle
, sid
, value
, flags
);
307 static HRESULT
get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, nsAString
*value
)
312 nsAString_Init(&str_name
, style_tbl
[sid
].name
);
314 nsres
= nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle
, &str_name
, value
);
315 if(NS_FAILED(nsres
)) {
316 ERR("SetProperty failed: %08x\n", nsres
);
320 nsAString_Finish(&str_name
);
325 HRESULT
get_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, BSTR
*p
)
328 const PRUnichar
*value
;
330 nsAString_Init(&str_value
, NULL
);
332 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
334 nsAString_GetData(&str_value
, &value
);
335 *p
= *value
? SysAllocString(value
) : NULL
;
337 nsAString_Finish(&str_value
);
339 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_w(*p
));
343 HRESULT
get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*p
, DWORD flags
)
346 const PRUnichar
*value
;
349 nsAString_Init(&str_value
, NULL
);
351 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
353 nsAString_GetData(&str_value
, &value
);
355 if(flags
& ATTR_STR_TO_INT
) {
356 const PRUnichar
*ptr
= value
;
365 while(isdigitW(*ptr
))
366 i
= i
*10 + (*ptr
++ - '0');
370 V_I4(p
) = neg
? -i
: i
;
379 str
= SysAllocString(value
);
381 return E_OUTOFMEMORY
;
388 nsAString_Finish(&str_value
);
390 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_variant(p
));
394 static inline HRESULT
get_style_attr(HTMLStyle
*This
, styleid_t sid
, BSTR
*p
)
396 return get_nsstyle_attr(This
->nsstyle
, sid
, p
);
399 static HRESULT
check_style_attr_value(HTMLStyle
*This
, styleid_t sid
, LPCWSTR exval
, VARIANT_BOOL
*p
)
402 const PRUnichar
*value
;
404 nsAString_Init(&str_value
, NULL
);
406 get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
408 nsAString_GetData(&str_value
, &value
);
409 *p
= strcmpW(value
, exval
) ? VARIANT_FALSE
: VARIANT_TRUE
;
410 nsAString_Finish(&str_value
);
412 TRACE("%s -> %x\n", debugstr_w(style_tbl
[sid
].name
), *p
);
416 static inline HRESULT
set_style_pos(HTMLStyle
*This
, styleid_t sid
, float value
)
419 WCHAR szFormat
[] = {'%','.','0','f','p','x',0};
421 value
= floor(value
);
423 sprintfW(szValue
, szFormat
, value
);
425 return set_style_attr(This
, sid
, szValue
, 0);
428 static HRESULT
get_nsstyle_pos(HTMLStyle
*This
, styleid_t sid
, float *p
)
432 WCHAR pxW
[] = {'p','x',0};
434 TRACE("%p %d %p\n", This
, sid
, p
);
438 nsAString_Init(&str_value
, NULL
);
440 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
444 const PRUnichar
*value
;
446 nsAString_GetData(&str_value
, &value
);
449 *p
= strtolW(value
, &ptr
, 10);
451 if(*ptr
&& strcmpW(ptr
, pxW
))
453 nsAString_Finish(&str_value
);
454 FIXME("only px values are currently supported\n");
460 TRACE("ret %f\n", *p
);
462 nsAString_Finish(&str_value
);
467 static BOOL
is_valid_border_style(BSTR v
)
469 static const WCHAR styleDotted
[] = {'d','o','t','t','e','d',0};
470 static const WCHAR styleDashed
[] = {'d','a','s','h','e','d',0};
471 static const WCHAR styleSolid
[] = {'s','o','l','i','d',0};
472 static const WCHAR styleDouble
[] = {'d','o','u','b','l','e',0};
473 static const WCHAR styleGroove
[] = {'g','r','o','o','v','e',0};
474 static const WCHAR styleRidge
[] = {'r','i','d','g','e',0};
475 static const WCHAR styleInset
[] = {'i','n','s','e','t',0};
476 static const WCHAR styleOutset
[] = {'o','u','t','s','e','t',0};
478 TRACE("%s\n", debugstr_w(v
));
480 if(!v
|| strcmpiW(v
, styleNone
) == 0 || strcmpiW(v
, styleDotted
) == 0 ||
481 strcmpiW(v
, styleDashed
) == 0 || strcmpiW(v
, styleSolid
) == 0 ||
482 strcmpiW(v
, styleDouble
) == 0 || strcmpiW(v
, styleGroove
) == 0 ||
483 strcmpiW(v
, styleRidge
) == 0 || strcmpiW(v
, styleInset
) == 0 ||
484 strcmpiW(v
, styleOutset
) == 0 )
492 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
494 static HRESULT WINAPI
HTMLStyle_QueryInterface(IHTMLStyle
*iface
, REFIID riid
, void **ppv
)
496 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
500 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
501 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
502 *ppv
= HTMLSTYLE(This
);
503 }else if(IsEqualGUID(&IID_IHTMLStyle
, riid
)) {
504 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This
, ppv
);
505 *ppv
= HTMLSTYLE(This
);
506 }else if(IsEqualGUID(&IID_IHTMLStyle2
, riid
)) {
507 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This
, ppv
);
508 *ppv
= HTMLSTYLE2(This
);
509 }else if(IsEqualGUID(&IID_IHTMLStyle3
, riid
)) {
510 TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This
, ppv
);
511 *ppv
= HTMLSTYLE3(This
);
512 }else if(IsEqualGUID(&IID_IHTMLStyle4
, riid
)) {
513 TRACE("(%p)->(IID_IHTMLStyle4 %p)\n", This
, ppv
);
514 *ppv
= HTMLSTYLE4(This
);
515 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
516 return *ppv
? S_OK
: E_NOINTERFACE
;
520 IUnknown_AddRef((IUnknown
*)*ppv
);
524 WARN("unsupported %s\n", debugstr_guid(riid
));
525 return E_NOINTERFACE
;
528 static ULONG WINAPI
HTMLStyle_AddRef(IHTMLStyle
*iface
)
530 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
531 LONG ref
= InterlockedIncrement(&This
->ref
);
533 TRACE("(%p) ref=%d\n", This
, ref
);
538 static ULONG WINAPI
HTMLStyle_Release(IHTMLStyle
*iface
)
540 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
541 LONG ref
= InterlockedDecrement(&This
->ref
);
543 TRACE("(%p) ref=%d\n", This
, ref
);
547 nsIDOMCSSStyleDeclaration_Release(This
->nsstyle
);
554 static HRESULT WINAPI
HTMLStyle_GetTypeInfoCount(IHTMLStyle
*iface
, UINT
*pctinfo
)
556 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
557 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This
->dispex
), pctinfo
);
560 static HRESULT WINAPI
HTMLStyle_GetTypeInfo(IHTMLStyle
*iface
, UINT iTInfo
,
561 LCID lcid
, ITypeInfo
**ppTInfo
)
563 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
564 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->dispex
), iTInfo
, lcid
, ppTInfo
);
567 static HRESULT WINAPI
HTMLStyle_GetIDsOfNames(IHTMLStyle
*iface
, REFIID riid
,
568 LPOLESTR
*rgszNames
, UINT cNames
,
569 LCID lcid
, DISPID
*rgDispId
)
571 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
572 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
575 static HRESULT WINAPI
HTMLStyle_Invoke(IHTMLStyle
*iface
, DISPID dispIdMember
,
576 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
577 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
579 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
580 return IDispatchEx_Invoke(DISPATCHEX(&This
->dispex
), dispIdMember
, riid
, lcid
,
581 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
584 static HRESULT WINAPI
HTMLStyle_put_fontFamily(IHTMLStyle
*iface
, BSTR v
)
586 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
588 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
590 return set_style_attr(This
, STYLEID_FONT_FAMILY
, v
, 0);
593 static HRESULT WINAPI
HTMLStyle_get_fontFamily(IHTMLStyle
*iface
, BSTR
*p
)
595 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
597 TRACE("(%p)->(%p)\n", This
, p
);
599 return get_style_attr(This
, STYLEID_FONT_FAMILY
, p
);
602 static HRESULT WINAPI
HTMLStyle_put_fontStyle(IHTMLStyle
*iface
, BSTR v
)
604 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
605 static const WCHAR szItalic
[] = {'i','t','a','l','i','c',0};
606 static const WCHAR szOblique
[] = {'o','b','l','i','q','u','e',0};
608 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
610 /* fontStyle can only be one of the follow values. */
611 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(szItalic
, v
) == 0 ||
612 strcmpiW(szOblique
, v
) == 0)
614 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_STYLE
, v
, 0);
620 static HRESULT WINAPI
HTMLStyle_get_fontStyle(IHTMLStyle
*iface
, BSTR
*p
)
622 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
624 TRACE("(%p)->(%p)\n", This
, p
);
626 return get_style_attr(This
, STYLEID_FONT_STYLE
, p
);
629 static HRESULT WINAPI
HTMLStyle_put_fontVariant(IHTMLStyle
*iface
, BSTR v
)
631 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
632 static const WCHAR szCaps
[] = {'s','m','a','l','l','-','c','a','p','s',0};
634 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
636 /* fontVariant can only be one of the follow values. */
637 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(szCaps
, v
) == 0)
639 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_VARIANT
, v
, 0);
645 static HRESULT WINAPI
HTMLStyle_get_fontVariant(IHTMLStyle
*iface
, BSTR
*p
)
647 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
648 TRACE("(%p)->(%p)\n", This
, p
);
653 return get_style_attr(This
, STYLEID_FONT_VARIANT
, p
);
656 static HRESULT WINAPI
HTMLStyle_put_fontWeight(IHTMLStyle
*iface
, BSTR v
)
658 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
659 static const WCHAR styleBold
[] = {'b','o','l','d',0};
660 static const WCHAR styleBolder
[] = {'b','o','l','d','e','r',0};
661 static const WCHAR styleLighter
[] = {'l','i','g','h','t','e','r',0};
662 static const WCHAR style100
[] = {'1','0','0',0};
663 static const WCHAR style200
[] = {'2','0','0',0};
664 static const WCHAR style300
[] = {'3','0','0',0};
665 static const WCHAR style400
[] = {'4','0','0',0};
666 static const WCHAR style500
[] = {'5','0','0',0};
667 static const WCHAR style600
[] = {'6','0','0',0};
668 static const WCHAR style700
[] = {'7','0','0',0};
669 static const WCHAR style800
[] = {'8','0','0',0};
670 static const WCHAR style900
[] = {'9','0','0',0};
672 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
674 /* fontWeight can only be one of the following */
675 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(styleBold
, v
) == 0 ||
676 strcmpiW(styleBolder
, v
) == 0 || strcmpiW(styleLighter
, v
) == 0 ||
677 strcmpiW(style100
, v
) == 0 || strcmpiW(style200
, v
) == 0 ||
678 strcmpiW(style300
, v
) == 0 || strcmpiW(style400
, v
) == 0 ||
679 strcmpiW(style500
, v
) == 0 || strcmpiW(style600
, v
) == 0 ||
680 strcmpiW(style700
, v
) == 0 || strcmpiW(style800
, v
) == 0 ||
681 strcmpiW(style900
, v
) == 0
684 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_WEIGHT
, v
, 0);
690 static HRESULT WINAPI
HTMLStyle_get_fontWeight(IHTMLStyle
*iface
, BSTR
*p
)
692 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
694 TRACE("(%p)->(%p)\n", This
, p
);
696 return get_style_attr(This
, STYLEID_FONT_WEIGHT
, p
);
699 static HRESULT WINAPI
HTMLStyle_put_fontSize(IHTMLStyle
*iface
, VARIANT v
)
701 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
703 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
707 return set_style_attr(This
, STYLEID_FONT_SIZE
, V_BSTR(&v
), 0);
709 FIXME("not supported vt %d\n", V_VT(&v
));
715 static HRESULT WINAPI
HTMLStyle_get_fontSize(IHTMLStyle
*iface
, VARIANT
*p
)
717 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
719 TRACE("(%p)->(%p)\n", This
, p
);
722 return get_style_attr(This
, STYLEID_FONT_SIZE
, &V_BSTR(p
));
725 static HRESULT WINAPI
HTMLStyle_put_font(IHTMLStyle
*iface
, BSTR v
)
727 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
728 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
732 static HRESULT WINAPI
HTMLStyle_get_font(IHTMLStyle
*iface
, BSTR
*p
)
734 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
735 FIXME("(%p)->(%p)\n", This
, p
);
739 static HRESULT WINAPI
HTMLStyle_put_color(IHTMLStyle
*iface
, VARIANT v
)
741 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
743 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
747 TRACE("%s\n", debugstr_w(V_BSTR(&v
)));
748 return set_style_attr(This
, STYLEID_COLOR
, V_BSTR(&v
), 0);
751 FIXME("unsupported vt=%d\n", V_VT(&v
));
757 static HRESULT WINAPI
HTMLStyle_get_color(IHTMLStyle
*iface
, VARIANT
*p
)
759 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
761 TRACE("(%p)->(%p)\n", This
, p
);
764 return get_style_attr(This
, STYLEID_COLOR
, &V_BSTR(p
));
767 static HRESULT WINAPI
HTMLStyle_put_background(IHTMLStyle
*iface
, BSTR v
)
769 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
771 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
773 return set_style_attr(This
, STYLEID_BACKGROUND
, v
, 0);
776 static HRESULT WINAPI
HTMLStyle_get_background(IHTMLStyle
*iface
, BSTR
*p
)
778 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
780 TRACE("(%p)->(%p)\n", This
, p
);
782 return get_style_attr(This
, STYLEID_BACKGROUND
, p
);
785 static HRESULT WINAPI
HTMLStyle_put_backgroundColor(IHTMLStyle
*iface
, VARIANT v
)
787 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
789 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
793 return set_style_attr(This
, STYLEID_BACKGROUND_COLOR
, V_BSTR(&v
), 0);
796 static const WCHAR format
[] = {'#','%','0','6','x',0};
798 wsprintfW(value
, format
, V_I4(&v
));
799 return set_style_attr(This
, STYLEID_BACKGROUND_COLOR
, value
, 0);
802 FIXME("unsupported vt %d\n", V_VT(&v
));
808 static HRESULT WINAPI
HTMLStyle_get_backgroundColor(IHTMLStyle
*iface
, VARIANT
*p
)
810 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
811 TRACE("(%p)->(%p)\n", This
, p
);
814 return get_style_attr(This
, STYLEID_BACKGROUND_COLOR
, &V_BSTR(p
));
817 static HRESULT WINAPI
HTMLStyle_put_backgroundImage(IHTMLStyle
*iface
, BSTR v
)
819 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
821 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
823 return set_style_attr(This
, STYLEID_BACKGROUND_IMAGE
, v
, ATTR_FIX_URL
);
826 static HRESULT WINAPI
HTMLStyle_get_backgroundImage(IHTMLStyle
*iface
, BSTR
*p
)
828 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
830 TRACE("(%p)->(%p)\n", This
, p
);
832 return get_style_attr(This
, STYLEID_BACKGROUND_IMAGE
, p
);
835 static HRESULT WINAPI
HTMLStyle_put_backgroundRepeat(IHTMLStyle
*iface
, BSTR v
)
837 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
838 static const WCHAR styleRepeat
[] = {'r','e','p','e','a','t',0};
839 static const WCHAR styleNoRepeat
[] = {'n','o','-','r','e','p','e','a','t',0};
840 static const WCHAR styleRepeatX
[] = {'r','e','p','e','a','t','-','x',0};
841 static const WCHAR styleRepeatY
[] = {'r','e','p','e','a','t','-','y',0};
843 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
845 /* fontWeight can only be one of the following */
846 if(!v
|| strcmpiW(styleRepeat
, v
) == 0 || strcmpiW(styleNoRepeat
, v
) == 0 ||
847 strcmpiW(styleRepeatX
, v
) == 0 || strcmpiW(styleRepeatY
, v
) == 0 )
849 return set_style_attr(This
, STYLEID_BACKGROUND_REPEAT
, v
, 0);
855 static HRESULT WINAPI
HTMLStyle_get_backgroundRepeat(IHTMLStyle
*iface
, BSTR
*p
)
857 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
859 TRACE("(%p)->(%p)\n", This
, p
);
861 return get_style_attr(This
, STYLEID_BACKGROUND_REPEAT
, p
);
864 static HRESULT WINAPI
HTMLStyle_put_backgroundAttachment(IHTMLStyle
*iface
, BSTR v
)
866 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
867 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
871 static HRESULT WINAPI
HTMLStyle_get_backgroundAttachment(IHTMLStyle
*iface
, BSTR
*p
)
873 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
874 FIXME("(%p)->(%p)\n", This
, p
);
878 static HRESULT WINAPI
HTMLStyle_put_backgroundPosition(IHTMLStyle
*iface
, BSTR v
)
880 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
881 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
885 static HRESULT WINAPI
HTMLStyle_get_backgroundPosition(IHTMLStyle
*iface
, BSTR
*p
)
887 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
888 FIXME("(%p)->(%p)\n", This
, p
);
892 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionX(IHTMLStyle
*iface
, VARIANT v
)
894 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
895 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
896 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BACKGROUND_POSITION_X
, &v
, 0);
899 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionX(IHTMLStyle
*iface
, VARIANT
*p
)
901 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
902 TRACE("(%p)->(%p)\n", This
, p
);
903 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BACKGROUND_POSITION_X
, p
, 0);
906 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionY(IHTMLStyle
*iface
, VARIANT v
)
908 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
909 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
910 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BACKGROUND_POSITION_Y
, &v
, 0);
913 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionY(IHTMLStyle
*iface
, VARIANT
*p
)
915 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
916 TRACE("(%p)->(%p)\n", This
, p
);
917 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BACKGROUND_POSITION_Y
, p
, 0);
920 static HRESULT WINAPI
HTMLStyle_put_wordSpacing(IHTMLStyle
*iface
, VARIANT v
)
922 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
923 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
927 static HRESULT WINAPI
HTMLStyle_get_wordSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
929 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
930 FIXME("(%p)->(%p)\n", This
, p
);
934 static HRESULT WINAPI
HTMLStyle_put_letterSpacing(IHTMLStyle
*iface
, VARIANT v
)
936 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
937 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
941 static HRESULT WINAPI
HTMLStyle_get_letterSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
943 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
944 FIXME("(%p)->(%p)\n", This
, p
);
948 static HRESULT WINAPI
HTMLStyle_put_textDecoration(IHTMLStyle
*iface
, BSTR v
)
950 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
952 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
954 /* textDecoration can only be one of the following */
955 if(!v
|| strcmpiW(styleNone
, v
) == 0 || strcmpiW(valUnderline
, v
) == 0 ||
956 strcmpiW(valOverline
, v
) == 0 || strcmpiW(valLineThrough
, v
) == 0 ||
957 strcmpiW(valBlink
, v
) == 0)
959 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
, 0);
965 static HRESULT WINAPI
HTMLStyle_get_textDecoration(IHTMLStyle
*iface
, BSTR
*p
)
967 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
969 TRACE("(%p)->(%p)\n", This
, p
);
971 return get_style_attr(This
, STYLEID_TEXT_DECORATION
, p
);
974 static HRESULT WINAPI
HTMLStyle_put_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL v
)
976 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
978 TRACE("(%p)->(%x)\n", This
, v
);
980 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? styleNone
: emptyW
, 0);
983 static HRESULT WINAPI
HTMLStyle_get_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
985 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
987 TRACE("(%p)->(%p)\n", This
, p
);
989 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, styleNone
, p
);
992 static HRESULT WINAPI
HTMLStyle_put_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
994 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
996 TRACE("(%p)->(%x)\n", This
, v
);
998 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valUnderline
: emptyW
, 0);
1001 static HRESULT WINAPI
HTMLStyle_get_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1003 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1005 TRACE("(%p)->(%p)\n", This
, p
);
1007 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valUnderline
, p
);
1010 static HRESULT WINAPI
HTMLStyle_put_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
1012 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1014 TRACE("(%p)->(%x)\n", This
, v
);
1016 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valOverline
: emptyW
, 0);
1019 static HRESULT WINAPI
HTMLStyle_get_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1021 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1023 TRACE("(%p)->(%p)\n", This
, p
);
1025 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valOverline
, p
);
1028 static HRESULT WINAPI
HTMLStyle_put_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL v
)
1030 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1032 TRACE("(%p)->(%x)\n", This
, v
);
1034 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valLineThrough
: emptyW
, 0);
1037 static HRESULT WINAPI
HTMLStyle_get_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1039 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1041 TRACE("(%p)->(%p)\n", This
, p
);
1043 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valLineThrough
, p
);
1046 static HRESULT WINAPI
HTMLStyle_put_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL v
)
1048 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1050 TRACE("(%p)->(%x)\n", This
, v
);
1052 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valBlink
: emptyW
, 0);
1055 static HRESULT WINAPI
HTMLStyle_get_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1057 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1059 TRACE("(%p)->(%p)\n", This
, p
);
1061 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valBlink
, p
);
1064 static HRESULT WINAPI
HTMLStyle_put_verticalAlign(IHTMLStyle
*iface
, VARIANT v
)
1066 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1068 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1072 return set_style_attr(This
, STYLEID_VERTICAL_ALIGN
, V_BSTR(&v
), 0);
1074 FIXME("not implemented vt %d\n", V_VT(&v
));
1081 static HRESULT WINAPI
HTMLStyle_get_verticalAlign(IHTMLStyle
*iface
, VARIANT
*p
)
1083 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1087 TRACE("(%p)->(%p)\n", This
, p
);
1089 hres
= get_style_attr(This
, STYLEID_VERTICAL_ALIGN
, &ret
);
1098 static HRESULT WINAPI
HTMLStyle_put_textTransform(IHTMLStyle
*iface
, BSTR v
)
1100 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1101 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1105 static HRESULT WINAPI
HTMLStyle_get_textTransform(IHTMLStyle
*iface
, BSTR
*p
)
1107 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1108 FIXME("(%p)->(%p)\n", This
, p
);
1112 static HRESULT WINAPI
HTMLStyle_put_textAlign(IHTMLStyle
*iface
, BSTR v
)
1114 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1116 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1118 return set_style_attr(This
, STYLEID_TEXT_ALIGN
, v
, 0);
1121 static HRESULT WINAPI
HTMLStyle_get_textAlign(IHTMLStyle
*iface
, BSTR
*p
)
1123 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1125 TRACE("(%p)->(%p)\n", This
, p
);
1127 return get_style_attr(This
, STYLEID_TEXT_ALIGN
, p
);
1130 static HRESULT WINAPI
HTMLStyle_put_textIndent(IHTMLStyle
*iface
, VARIANT v
)
1132 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1133 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1137 static HRESULT WINAPI
HTMLStyle_get_textIndent(IHTMLStyle
*iface
, VARIANT
*p
)
1139 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1140 FIXME("(%p)->(%p)\n", This
, p
);
1144 static HRESULT WINAPI
HTMLStyle_put_lineHeight(IHTMLStyle
*iface
, VARIANT v
)
1146 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1147 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1151 static HRESULT WINAPI
HTMLStyle_get_lineHeight(IHTMLStyle
*iface
, VARIANT
*p
)
1153 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1154 FIXME("(%p)->(%p)\n", This
, p
);
1158 static HRESULT WINAPI
HTMLStyle_put_marginTop(IHTMLStyle
*iface
, VARIANT v
)
1160 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1161 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1165 static HRESULT WINAPI
HTMLStyle_get_marginTop(IHTMLStyle
*iface
, VARIANT
*p
)
1167 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1168 FIXME("(%p)->(%p)\n", This
, p
);
1172 static HRESULT WINAPI
HTMLStyle_put_marginRight(IHTMLStyle
*iface
, VARIANT v
)
1174 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1176 TRACE("(%p)->(v(%d))\n", This
, V_VT(&v
));
1180 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, emptyW
, 0);
1184 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1185 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, buf
, 0);
1188 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, V_BSTR(&v
), 0);
1190 FIXME("Unsupported vt=%d\n", V_VT(&v
));
1196 static HRESULT WINAPI
HTMLStyle_get_marginRight(IHTMLStyle
*iface
, VARIANT
*p
)
1198 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1199 TRACE("(%p)->(%p)\n", This
, p
);
1200 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_RIGHT
, p
, 0);
1203 static HRESULT WINAPI
HTMLStyle_put_marginBottom(IHTMLStyle
*iface
, VARIANT v
)
1205 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1206 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1210 static HRESULT WINAPI
HTMLStyle_get_marginBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1212 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1213 FIXME("(%p)->(%p)\n", This
, p
);
1217 static HRESULT WINAPI
HTMLStyle_put_marginLeft(IHTMLStyle
*iface
, VARIANT v
)
1219 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1223 TRACE("(%p)->(NULL)\n", This
);
1224 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, emptyW
, 0);
1228 TRACE("(%p)->(%d)\n", This
, V_I4(&v
));
1230 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1231 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, buf
, 0);
1234 TRACE("(%p)->(%s)\n", This
, debugstr_w(V_BSTR(&v
)));
1235 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, V_BSTR(&v
), 0);
1237 FIXME("Unsupported vt=%d\n", V_VT(&v
));
1243 static HRESULT WINAPI
HTMLStyle_put_margin(IHTMLStyle
*iface
, BSTR v
)
1245 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1247 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1249 return set_style_attr(This
, STYLEID_MARGIN
, v
, 0);
1252 static HRESULT WINAPI
HTMLStyle_get_margin(IHTMLStyle
*iface
, BSTR
*p
)
1254 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1256 TRACE("(%p)->(%p)\n", This
, p
);
1258 return get_style_attr(This
, STYLEID_MARGIN
, p
);
1261 static HRESULT WINAPI
HTMLStyle_get_marginLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1263 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1264 TRACE("(%p)->(%p)\n", This
, p
);
1265 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_LEFT
, p
, 0);
1268 static HRESULT WINAPI
HTMLStyle_put_paddingTop(IHTMLStyle
*iface
, VARIANT v
)
1270 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1271 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1275 static HRESULT WINAPI
HTMLStyle_get_paddingTop(IHTMLStyle
*iface
, VARIANT
*p
)
1277 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1278 FIXME("(%p)->(%p)\n", This
, p
);
1282 static HRESULT WINAPI
HTMLStyle_put_paddingRight(IHTMLStyle
*iface
, VARIANT v
)
1284 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1285 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1289 static HRESULT WINAPI
HTMLStyle_get_paddingRight(IHTMLStyle
*iface
, VARIANT
*p
)
1291 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1292 FIXME("(%p)->(%p)\n", This
, p
);
1296 static HRESULT WINAPI
HTMLStyle_put_paddingBottom(IHTMLStyle
*iface
, VARIANT v
)
1298 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1299 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1303 static HRESULT WINAPI
HTMLStyle_get_paddingBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1305 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1306 FIXME("(%p)->(%p)\n", This
, p
);
1310 static HRESULT WINAPI
HTMLStyle_put_paddingLeft(IHTMLStyle
*iface
, VARIANT v
)
1312 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1314 TRACE("(%p)->(vt=%d)\n", This
, V_VT(&v
));
1320 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1321 return set_style_attr(This
, STYLEID_PADDING_LEFT
, buf
, 0);
1324 return set_style_attr(This
, STYLEID_PADDING_LEFT
, V_BSTR(&v
), 0);
1326 FIXME("unsupported vt=%d\n", V_VT(&v
));
1332 static HRESULT WINAPI
HTMLStyle_get_paddingLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1334 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1338 TRACE("(%p)->(%p)\n", This
, p
);
1340 hres
= get_style_attr(This
, STYLEID_PADDING_LEFT
, &ret
);
1349 static HRESULT WINAPI
HTMLStyle_put_padding(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_padding(IHTMLStyle
*iface
, BSTR
*p
)
1358 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1359 FIXME("(%p)->(%p)\n", This
, p
);
1363 static HRESULT WINAPI
HTMLStyle_put_border(IHTMLStyle
*iface
, BSTR v
)
1365 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1367 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1369 return set_style_attr(This
, STYLEID_BORDER
, v
, 0);
1372 static HRESULT WINAPI
HTMLStyle_get_border(IHTMLStyle
*iface
, BSTR
*p
)
1374 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1376 TRACE("(%p)->(%p)\n", This
, p
);
1378 return get_style_attr(This
, STYLEID_BORDER
, p
);
1381 static HRESULT WINAPI
HTMLStyle_put_borderTop(IHTMLStyle
*iface
, BSTR v
)
1383 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1384 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1388 static HRESULT WINAPI
HTMLStyle_get_borderTop(IHTMLStyle
*iface
, BSTR
*p
)
1390 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1391 FIXME("(%p)->(%p)\n", This
, p
);
1395 static HRESULT WINAPI
HTMLStyle_put_borderRight(IHTMLStyle
*iface
, BSTR v
)
1397 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1398 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1402 static HRESULT WINAPI
HTMLStyle_get_borderRight(IHTMLStyle
*iface
, BSTR
*p
)
1404 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1405 FIXME("(%p)->(%p)\n", This
, p
);
1409 static HRESULT WINAPI
HTMLStyle_put_borderBottom(IHTMLStyle
*iface
, BSTR v
)
1411 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1412 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1416 static HRESULT WINAPI
HTMLStyle_get_borderBottom(IHTMLStyle
*iface
, BSTR
*p
)
1418 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1419 FIXME("(%p)->(%p)\n", This
, p
);
1423 static HRESULT WINAPI
HTMLStyle_put_borderLeft(IHTMLStyle
*iface
, BSTR v
)
1425 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1427 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1429 return set_style_attr(This
, STYLEID_BORDER_LEFT
, v
, ATTR_FIX_PX
);
1432 static HRESULT WINAPI
HTMLStyle_get_borderLeft(IHTMLStyle
*iface
, BSTR
*p
)
1434 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1436 TRACE("(%p)->(%p)\n", This
, p
);
1438 return get_style_attr(This
, STYLEID_BORDER_LEFT
, p
);
1441 static HRESULT WINAPI
HTMLStyle_put_borderColor(IHTMLStyle
*iface
, BSTR v
)
1443 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1445 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1447 return set_style_attr(This
, STYLEID_BORDER_COLOR
, v
, 0);
1450 static HRESULT WINAPI
HTMLStyle_get_borderColor(IHTMLStyle
*iface
, BSTR
*p
)
1452 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1454 TRACE("(%p)->(%p)\n", This
, p
);
1456 return get_style_attr(This
, STYLEID_BORDER_COLOR
, p
);
1459 static HRESULT WINAPI
HTMLStyle_put_borderTopColor(IHTMLStyle
*iface
, VARIANT v
)
1461 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1462 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1466 static HRESULT WINAPI
HTMLStyle_get_borderTopColor(IHTMLStyle
*iface
, VARIANT
*p
)
1468 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1469 FIXME("(%p)->(%p)\n", This
, p
);
1473 static HRESULT WINAPI
HTMLStyle_put_borderRightColor(IHTMLStyle
*iface
, VARIANT v
)
1475 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1476 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1480 static HRESULT WINAPI
HTMLStyle_get_borderRightColor(IHTMLStyle
*iface
, VARIANT
*p
)
1482 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1483 FIXME("(%p)->(%p)\n", This
, p
);
1487 static HRESULT WINAPI
HTMLStyle_put_borderBottomColor(IHTMLStyle
*iface
, VARIANT v
)
1489 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1490 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1494 static HRESULT WINAPI
HTMLStyle_get_borderBottomColor(IHTMLStyle
*iface
, VARIANT
*p
)
1496 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1497 FIXME("(%p)->(%p)\n", This
, p
);
1501 static HRESULT WINAPI
HTMLStyle_put_borderLeftColor(IHTMLStyle
*iface
, VARIANT v
)
1503 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1504 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1508 static HRESULT WINAPI
HTMLStyle_get_borderLeftColor(IHTMLStyle
*iface
, VARIANT
*p
)
1510 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1511 FIXME("(%p)->(%p)\n", This
, p
);
1515 static HRESULT WINAPI
HTMLStyle_put_borderWidth(IHTMLStyle
*iface
, BSTR v
)
1517 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1518 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1519 return set_style_attr(This
, STYLEID_BORDER_WIDTH
, v
, ATTR_FIX_PX
);
1522 static HRESULT WINAPI
HTMLStyle_get_borderWidth(IHTMLStyle
*iface
, BSTR
*p
)
1524 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1525 TRACE("(%p)->(%p)\n", This
, p
);
1526 return get_style_attr(This
, STYLEID_BORDER_WIDTH
, p
);
1529 static HRESULT WINAPI
HTMLStyle_put_borderTopWidth(IHTMLStyle
*iface
, VARIANT v
)
1531 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1532 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
1533 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_WIDTH
, &v
, 0);
1536 static HRESULT WINAPI
HTMLStyle_get_borderTopWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1538 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1540 TRACE("(%p)->(%p)\n", This
, p
);
1542 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_WIDTH
, p
, 0);
1545 static HRESULT WINAPI
HTMLStyle_put_borderRightWidth(IHTMLStyle
*iface
, VARIANT v
)
1547 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1548 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
1549 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_WIDTH
, &v
, 0);
1552 static HRESULT WINAPI
HTMLStyle_get_borderRightWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1554 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1555 TRACE("(%p)->(%p)\n", This
, p
);
1556 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_WIDTH
, p
, 0);
1559 static HRESULT WINAPI
HTMLStyle_put_borderBottomWidth(IHTMLStyle
*iface
, VARIANT v
)
1561 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1563 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
1564 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_WIDTH
, &v
, 0);
1567 static HRESULT WINAPI
HTMLStyle_get_borderBottomWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1569 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1570 TRACE("(%p)->(%p)\n", This
, p
);
1571 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_WIDTH
, p
, 0);
1574 static HRESULT WINAPI
HTMLStyle_put_borderLeftWidth(IHTMLStyle
*iface
, VARIANT v
)
1576 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1577 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1581 static HRESULT WINAPI
HTMLStyle_get_borderLeftWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1583 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1584 FIXME("(%p)->(%p)\n", This
, p
);
1588 static HRESULT WINAPI
HTMLStyle_put_borderStyle(IHTMLStyle
*iface
, BSTR v
)
1590 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1591 static const WCHAR styleWindowInset
[] = {'w','i','n','d','o','w','-','i','n','s','e','t',0};
1592 HRESULT hres
= S_OK
;
1597 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1599 while(v
[i
] && hres
== S_OK
)
1601 if(v
[i
] == (WCHAR
)' ')
1603 pstyle
= SysAllocStringLen(&v
[last
], (i
-last
));
1604 if( !(is_valid_border_style(pstyle
) || strcmpiW(styleWindowInset
, pstyle
) == 0))
1606 TRACE("1. Invalid style (%s)\n", debugstr_w(pstyle
));
1607 hres
= E_INVALIDARG
;
1609 SysFreeString(pstyle
);
1617 pstyle
= SysAllocStringLen(&v
[last
], i
-last
);
1618 if( !(is_valid_border_style(pstyle
) || strcmpiW(styleWindowInset
, pstyle
) == 0))
1620 TRACE("2. Invalid style (%s)\n", debugstr_w(pstyle
));
1621 hres
= E_INVALIDARG
;
1623 SysFreeString(pstyle
);
1627 hres
= set_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_STYLE
, v
, 0);
1632 static HRESULT WINAPI
HTMLStyle_get_borderStyle(IHTMLStyle
*iface
, BSTR
*p
)
1634 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1635 TRACE("(%p)->(%p)\n", This
, p
);
1636 return get_style_attr(This
, STYLEID_BORDER_STYLE
, p
);
1639 static HRESULT WINAPI
HTMLStyle_put_borderTopStyle(IHTMLStyle
*iface
, BSTR v
)
1641 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1642 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1644 if(!is_valid_border_style(v
))
1645 return E_INVALIDARG
;
1647 return set_style_attr(This
, STYLEID_BORDER_TOP_STYLE
, v
, 0);
1650 static HRESULT WINAPI
HTMLStyle_get_borderTopStyle(IHTMLStyle
*iface
, BSTR
*p
)
1652 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1653 TRACE("(%p)->(%p)\n", This
, p
);
1654 return get_style_attr(This
, STYLEID_BORDER_TOP_STYLE
, p
);
1657 static HRESULT WINAPI
HTMLStyle_put_borderRightStyle(IHTMLStyle
*iface
, BSTR v
)
1659 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1660 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1662 if(!is_valid_border_style(v
))
1663 return E_INVALIDARG
;
1665 return set_style_attr(This
, STYLEID_BORDER_RIGHT_STYLE
, v
, 0);
1668 static HRESULT WINAPI
HTMLStyle_get_borderRightStyle(IHTMLStyle
*iface
, BSTR
*p
)
1670 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1671 TRACE("(%p)->(%p)\n", This
, p
);
1672 return get_style_attr(This
, STYLEID_BORDER_RIGHT_STYLE
, p
);
1675 static HRESULT WINAPI
HTMLStyle_put_borderBottomStyle(IHTMLStyle
*iface
, BSTR v
)
1677 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1678 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1680 if(!is_valid_border_style(v
))
1681 return E_INVALIDARG
;
1683 return set_style_attr(This
, STYLEID_BORDER_BOTTOM_STYLE
, v
, 0);
1686 static HRESULT WINAPI
HTMLStyle_get_borderBottomStyle(IHTMLStyle
*iface
, BSTR
*p
)
1688 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1689 TRACE("(%p)->(%p)\n", This
, p
);
1690 return get_style_attr(This
, STYLEID_BORDER_BOTTOM_STYLE
, p
);
1693 static HRESULT WINAPI
HTMLStyle_put_borderLeftStyle(IHTMLStyle
*iface
, BSTR v
)
1695 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1696 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1698 if(!is_valid_border_style(v
))
1699 return E_INVALIDARG
;
1701 return set_style_attr(This
, STYLEID_BORDER_LEFT_STYLE
, v
, 0);
1704 static HRESULT WINAPI
HTMLStyle_get_borderLeftStyle(IHTMLStyle
*iface
, BSTR
*p
)
1706 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1707 TRACE("(%p)->(%p)\n", This
, p
);
1708 return get_style_attr(This
, STYLEID_BORDER_LEFT_STYLE
, p
);
1711 static HRESULT WINAPI
HTMLStyle_put_width(IHTMLStyle
*iface
, VARIANT v
)
1713 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1715 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
1719 TRACE("%s\n", debugstr_w(V_BSTR(&v
)));
1720 return set_style_attr(This
, STYLEID_WIDTH
, V_BSTR(&v
), 0);
1722 FIXME("unsupported vt %d\n", V_VT(&v
));
1728 static HRESULT WINAPI
HTMLStyle_get_width(IHTMLStyle
*iface
, VARIANT
*p
)
1730 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1732 TRACE("(%p)->(%p)\n", This
, p
);
1735 return get_style_attr(This
, STYLEID_WIDTH
, &V_BSTR(p
));
1738 static HRESULT WINAPI
HTMLStyle_put_height(IHTMLStyle
*iface
, VARIANT v
)
1740 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1742 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1746 return set_style_attr(This
, STYLEID_HEIGHT
, V_BSTR(&v
), 0);
1748 FIXME("unimplemented vt %d\n", V_VT(&v
));
1755 static HRESULT WINAPI
HTMLStyle_get_height(IHTMLStyle
*iface
, VARIANT
*p
)
1757 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1761 TRACE("(%p)->(%p)\n", This
, p
);
1763 hres
= get_style_attr(This
, STYLEID_HEIGHT
, &ret
);
1772 static HRESULT WINAPI
HTMLStyle_put_styleFloat(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_styleFloat(IHTMLStyle
*iface
, BSTR
*p
)
1781 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1782 FIXME("(%p)->(%p)\n", This
, p
);
1786 static HRESULT WINAPI
HTMLStyle_put_clear(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_clear(IHTMLStyle
*iface
, BSTR
*p
)
1795 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1796 FIXME("(%p)->(%p)\n", This
, p
);
1800 static HRESULT WINAPI
HTMLStyle_put_display(IHTMLStyle
*iface
, BSTR v
)
1802 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1804 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1806 return set_style_attr(This
, STYLEID_DISPLAY
, v
, 0);
1809 static HRESULT WINAPI
HTMLStyle_get_display(IHTMLStyle
*iface
, BSTR
*p
)
1811 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1813 TRACE("(%p)->(%p)\n", This
, p
);
1815 return get_style_attr(This
, STYLEID_DISPLAY
, p
);
1818 static HRESULT WINAPI
HTMLStyle_put_visibility(IHTMLStyle
*iface
, BSTR v
)
1820 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1822 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1824 return set_style_attr(This
, STYLEID_VISIBILITY
, v
, 0);
1827 static HRESULT WINAPI
HTMLStyle_get_visibility(IHTMLStyle
*iface
, BSTR
*p
)
1829 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1831 TRACE("(%p)->(%p)\n", This
, p
);
1833 return get_style_attr(This
, STYLEID_VISIBILITY
, p
);
1836 static HRESULT WINAPI
HTMLStyle_put_listStyleType(IHTMLStyle
*iface
, BSTR v
)
1838 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1839 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1843 static HRESULT WINAPI
HTMLStyle_get_listStyleType(IHTMLStyle
*iface
, BSTR
*p
)
1845 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1846 FIXME("(%p)->(%p)\n", This
, p
);
1850 static HRESULT WINAPI
HTMLStyle_put_listStylePosition(IHTMLStyle
*iface
, BSTR v
)
1852 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1853 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1857 static HRESULT WINAPI
HTMLStyle_get_listStylePosition(IHTMLStyle
*iface
, BSTR
*p
)
1859 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1860 FIXME("(%p)->(%p)\n", This
, p
);
1864 static HRESULT WINAPI
HTMLStyle_put_listStyleImage(IHTMLStyle
*iface
, BSTR v
)
1866 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1867 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1871 static HRESULT WINAPI
HTMLStyle_get_listStyleImage(IHTMLStyle
*iface
, BSTR
*p
)
1873 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1874 FIXME("(%p)->(%p)\n", This
, p
);
1878 static HRESULT WINAPI
HTMLStyle_put_listStyle(IHTMLStyle
*iface
, BSTR v
)
1880 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1881 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1885 static HRESULT WINAPI
HTMLStyle_get_listStyle(IHTMLStyle
*iface
, BSTR
*p
)
1887 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1888 FIXME("(%p)->(%p)\n", This
, p
);
1892 static HRESULT WINAPI
HTMLStyle_put_whiteSpace(IHTMLStyle
*iface
, BSTR v
)
1894 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1895 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1899 static HRESULT WINAPI
HTMLStyle_get_whiteSpace(IHTMLStyle
*iface
, BSTR
*p
)
1901 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1902 FIXME("(%p)->(%p)\n", This
, p
);
1906 static HRESULT WINAPI
HTMLStyle_put_top(IHTMLStyle
*iface
, VARIANT v
)
1908 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1910 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1912 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_TOP
, &v
, 0);
1915 static HRESULT WINAPI
HTMLStyle_get_top(IHTMLStyle
*iface
, VARIANT
*p
)
1917 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1921 TRACE("(%p)->(%p)\n", This
, p
);
1923 hres
= get_style_attr(This
, STYLEID_TOP
, &ret
);
1932 static HRESULT WINAPI
HTMLStyle_put_left(IHTMLStyle
*iface
, VARIANT v
)
1934 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1936 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1938 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_LEFT
, &v
, 0);
1941 static HRESULT WINAPI
HTMLStyle_get_left(IHTMLStyle
*iface
, VARIANT
*p
)
1943 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1947 TRACE("(%p)->(%p)\n", This
, p
);
1949 hres
= get_style_attr(This
, STYLEID_LEFT
, &ret
);
1958 static HRESULT WINAPI
HTMLStyle_get_position(IHTMLStyle
*iface
, BSTR
*p
)
1960 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1961 TRACE("(%p)->(%p)\n", This
, p
);
1962 return IHTMLStyle2_get_position(HTMLSTYLE2(This
), p
);
1965 static HRESULT WINAPI
HTMLStyle_put_zIndex(IHTMLStyle
*iface
, VARIANT v
)
1967 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1969 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1973 return set_style_attr(This
, STYLEID_Z_INDEX
, V_BSTR(&v
), 0);
1976 static const WCHAR format
[] = {'%','d',0};
1978 wsprintfW(value
, format
, V_I4(&v
));
1979 return set_style_attr(This
, STYLEID_Z_INDEX
, value
, 0);
1982 FIXME("unimplemented vt %d\n", V_VT(&v
));
1989 static HRESULT WINAPI
HTMLStyle_get_zIndex(IHTMLStyle
*iface
, VARIANT
*p
)
1991 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1993 TRACE("(%p)->(%p)\n", This
, p
);
1995 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_Z_INDEX
, p
, ATTR_STR_TO_INT
);
1998 static HRESULT WINAPI
HTMLStyle_put_overflow(IHTMLStyle
*iface
, BSTR v
)
2000 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2001 static const WCHAR szVisible
[] = {'v','i','s','i','b','l','e',0};
2002 static const WCHAR szScroll
[] = {'s','c','r','o','l','l',0};
2003 static const WCHAR szHidden
[] = {'h','i','d','d','e','n',0};
2004 static const WCHAR szAuto
[] = {'a','u','t','o',0};
2006 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2008 /* overflow can only be one of the follow values. */
2009 if(!v
|| strcmpiW(szVisible
, v
) == 0 || strcmpiW(szScroll
, v
) == 0 ||
2010 strcmpiW(szHidden
, v
) == 0 || strcmpiW(szAuto
, v
) == 0)
2012 return set_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW
, v
, 0);
2015 return E_INVALIDARG
;
2019 static HRESULT WINAPI
HTMLStyle_get_overflow(IHTMLStyle
*iface
, BSTR
*p
)
2021 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2023 TRACE("(%p)->(%p)\n", This
, p
);
2026 return E_INVALIDARG
;
2028 return get_style_attr(This
, STYLEID_OVERFLOW
, p
);
2031 static HRESULT WINAPI
HTMLStyle_put_pageBreakBefore(IHTMLStyle
*iface
, BSTR v
)
2033 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2034 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
2038 static HRESULT WINAPI
HTMLStyle_get_pageBreakBefore(IHTMLStyle
*iface
, BSTR
*p
)
2040 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2041 FIXME("(%p)->(%p)\n", This
, p
);
2045 static HRESULT WINAPI
HTMLStyle_put_pageBreakAfter(IHTMLStyle
*iface
, BSTR v
)
2047 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2048 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
2052 static HRESULT WINAPI
HTMLStyle_get_pageBreakAfter(IHTMLStyle
*iface
, BSTR
*p
)
2054 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2055 FIXME("(%p)->(%p)\n", This
, p
);
2059 static HRESULT WINAPI
HTMLStyle_put_cssText(IHTMLStyle
*iface
, BSTR v
)
2061 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2065 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2067 nsAString_Init(&text_str
, v
);
2068 nsres
= nsIDOMCSSStyleDeclaration_SetCssText(This
->nsstyle
, &text_str
);
2069 nsAString_Finish(&text_str
);
2070 if(NS_FAILED(nsres
)) {
2071 FIXME("SetCssStyle failed: %08x\n", nsres
);
2078 static HRESULT WINAPI
HTMLStyle_get_cssText(IHTMLStyle
*iface
, BSTR
*p
)
2080 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2084 TRACE("(%p)->(%p)\n", This
, p
);
2086 /* FIXME: Gecko style formatting is different than IE (uppercase). */
2087 nsAString_Init(&text_str
, NULL
);
2088 nsres
= nsIDOMCSSStyleDeclaration_GetCssText(This
->nsstyle
, &text_str
);
2089 if(NS_SUCCEEDED(nsres
)) {
2090 const PRUnichar
*text
;
2092 nsAString_GetData(&text_str
, &text
);
2093 *p
= *text
? SysAllocString(text
) : NULL
;
2095 FIXME("GetCssStyle failed: %08x\n", nsres
);
2099 nsAString_Finish(&text_str
);
2103 static HRESULT WINAPI
HTMLStyle_put_pixelTop(IHTMLStyle
*iface
, LONG v
)
2105 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2106 FIXME("(%p)->()\n", This
);
2110 static HRESULT WINAPI
HTMLStyle_get_pixelTop(IHTMLStyle
*iface
, LONG
*p
)
2112 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2113 FIXME("(%p)->()\n", This
);
2117 static HRESULT WINAPI
HTMLStyle_put_pixelLeft(IHTMLStyle
*iface
, LONG v
)
2119 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2120 FIXME("(%p)->()\n", This
);
2124 static HRESULT WINAPI
HTMLStyle_get_pixelLeft(IHTMLStyle
*iface
, LONG
*p
)
2126 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2127 FIXME("(%p)->()\n", This
);
2131 static HRESULT WINAPI
HTMLStyle_put_pixelWidth(IHTMLStyle
*iface
, LONG v
)
2133 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2134 FIXME("(%p)->()\n", This
);
2138 static HRESULT WINAPI
HTMLStyle_get_pixelWidth(IHTMLStyle
*iface
, LONG
*p
)
2140 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2141 FIXME("(%p)->()\n", This
);
2145 static HRESULT WINAPI
HTMLStyle_put_pixelHeight(IHTMLStyle
*iface
, LONG v
)
2147 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2148 FIXME("(%p)->()\n", This
);
2152 static HRESULT WINAPI
HTMLStyle_get_pixelHeight(IHTMLStyle
*iface
, LONG
*p
)
2154 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2155 FIXME("(%p)->()\n", This
);
2159 static HRESULT WINAPI
HTMLStyle_put_posTop(IHTMLStyle
*iface
, float v
)
2161 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2163 TRACE("(%p)->(%f)\n", This
, v
);
2165 return set_style_pos(This
, STYLEID_TOP
, v
);
2168 static HRESULT WINAPI
HTMLStyle_get_posTop(IHTMLStyle
*iface
, float *p
)
2170 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2172 TRACE("(%p)->(%p)\n", This
, p
);
2177 return get_nsstyle_pos(This
, STYLEID_TOP
, p
);
2180 static HRESULT WINAPI
HTMLStyle_put_posLeft(IHTMLStyle
*iface
, float v
)
2182 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2184 TRACE("(%p)->(%f)\n", This
, v
);
2186 return set_style_pos(This
, STYLEID_LEFT
, v
);
2189 static HRESULT WINAPI
HTMLStyle_get_posLeft(IHTMLStyle
*iface
, float *p
)
2191 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2193 TRACE("(%p)->(%p)\n", This
, p
);
2198 return get_nsstyle_pos(This
, STYLEID_LEFT
, p
);
2201 static HRESULT WINAPI
HTMLStyle_put_posWidth(IHTMLStyle
*iface
, float v
)
2203 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2205 TRACE("(%p)->(%f)\n", This
, v
);
2207 return set_style_pos(This
, STYLEID_WIDTH
, v
);
2210 static HRESULT WINAPI
HTMLStyle_get_posWidth(IHTMLStyle
*iface
, float *p
)
2212 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2214 TRACE("(%p)->(%p)\n", This
, p
);
2219 if(get_nsstyle_pos(This
, STYLEID_WIDTH
, p
) != S_OK
)
2225 static HRESULT WINAPI
HTMLStyle_put_posHeight(IHTMLStyle
*iface
, float v
)
2227 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2229 TRACE("(%p)->(%f)\n", This
, v
);
2231 return set_style_pos(This
, STYLEID_HEIGHT
, v
);
2234 static HRESULT WINAPI
HTMLStyle_get_posHeight(IHTMLStyle
*iface
, float *p
)
2236 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2238 TRACE("(%p)->(%p)\n", This
, p
);
2243 if(get_nsstyle_pos(This
, STYLEID_HEIGHT
, p
) != S_OK
)
2249 static HRESULT WINAPI
HTMLStyle_put_cursor(IHTMLStyle
*iface
, BSTR v
)
2251 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2253 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2255 return set_style_attr(This
, STYLEID_CURSOR
, v
, 0);
2258 static HRESULT WINAPI
HTMLStyle_get_cursor(IHTMLStyle
*iface
, BSTR
*p
)
2260 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2262 TRACE("(%p)->(%p)\n", This
, p
);
2264 return get_style_attr(This
, STYLEID_CURSOR
, p
);
2267 static HRESULT WINAPI
HTMLStyle_put_clip(IHTMLStyle
*iface
, BSTR v
)
2269 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2270 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
2274 static HRESULT WINAPI
HTMLStyle_get_clip(IHTMLStyle
*iface
, BSTR
*p
)
2276 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2277 FIXME("(%p)->(%p)\n", This
, p
);
2281 static HRESULT WINAPI
HTMLStyle_put_filter(IHTMLStyle
*iface
, BSTR v
)
2283 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2285 WARN("(%p)->(%s)\n", This
, debugstr_w(v
));
2287 /* FIXME: Handle MS-style filters */
2288 return set_style_attr(This
, STYLEID_FILTER
, v
, 0);
2291 static HRESULT WINAPI
HTMLStyle_get_filter(IHTMLStyle
*iface
, BSTR
*p
)
2293 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2295 WARN("(%p)->(%p)\n", This
, p
);
2297 /* FIXME: Handle MS-style filters */
2298 return get_style_attr(This
, STYLEID_FILTER
, p
);
2301 static HRESULT WINAPI
HTMLStyle_setAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2302 VARIANT AttributeValue
, LONG lFlags
)
2304 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2308 TRACE("(%p)->(%s v%d %08x)\n", This
, debugstr_w(strAttributeName
),
2309 V_VT(&AttributeValue
), lFlags
);
2311 if(!strAttributeName
)
2312 return E_INVALIDARG
;
2315 FIXME("Parameter lFlags ignored\n");
2317 hres
= HTMLStyle_GetIDsOfNames(iface
, &IID_NULL
, &strAttributeName
, 1,
2318 LOCALE_USER_DEFAULT
, &dispid
);
2322 DISPID dispidNamed
= DISPID_PROPERTYPUT
;
2326 params
.rgvarg
= &AttributeValue
;
2327 params
.cNamedArgs
= 1;
2328 params
.rgdispidNamedArgs
= &dispidNamed
;
2330 hres
= HTMLStyle_Invoke(iface
, dispid
, &IID_NULL
, LOCALE_SYSTEM_DEFAULT
,
2331 DISPATCH_PROPERTYPUT
, ¶ms
, &ret
, NULL
, NULL
);
2335 FIXME("Custom attributes not supported.\n");
2338 TRACE("ret: %08x\n", hres
);
2343 static HRESULT WINAPI
HTMLStyle_getAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2344 LONG lFlags
, VARIANT
*AttributeValue
)
2346 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2350 TRACE("(%p)->(%s v%p %08x)\n", This
, debugstr_w(strAttributeName
),
2351 AttributeValue
, lFlags
);
2353 if(!AttributeValue
|| !strAttributeName
)
2354 return E_INVALIDARG
;
2357 FIXME("Parameter lFlags ignored\n");
2359 hres
= HTMLStyle_GetIDsOfNames(iface
, &IID_NULL
, &strAttributeName
, 1,
2360 LOCALE_USER_DEFAULT
, &dispid
);
2363 DISPPARAMS params
= {NULL
, NULL
, 0, 0 };
2365 hres
= HTMLStyle_Invoke(iface
, dispid
, &IID_NULL
, LOCALE_SYSTEM_DEFAULT
,
2366 DISPATCH_PROPERTYGET
, ¶ms
, AttributeValue
, NULL
, NULL
);
2370 FIXME("Custom attributes not supported.\n");
2376 static HRESULT WINAPI
HTMLStyle_removeAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2377 LONG lFlags
, VARIANT_BOOL
*pfSuccess
)
2379 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2380 FIXME("(%p)->(%s %08x %p)\n", This
, debugstr_w(strAttributeName
),
2385 static HRESULT WINAPI
HTMLStyle_toString(IHTMLStyle
*iface
, BSTR
*String
)
2387 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2388 FIXME("(%p)->(%p)\n", This
, String
);
2392 static HRESULT
HTMLStyle_get_dispid(IUnknown
*iface
, BSTR name
, DWORD flags
, DISPID
*dispid
)
2394 int c
, i
, min
=0, max
= sizeof(style_tbl
)/sizeof(*style_tbl
)-1;
2399 c
= strcmpW(style_tbl
[i
].name
, name
);
2401 *dispid
= style_tbl
[i
].dispid
;
2411 return DISP_E_UNKNOWNNAME
;
2414 static const IHTMLStyleVtbl HTMLStyleVtbl
= {
2415 HTMLStyle_QueryInterface
,
2418 HTMLStyle_GetTypeInfoCount
,
2419 HTMLStyle_GetTypeInfo
,
2420 HTMLStyle_GetIDsOfNames
,
2422 HTMLStyle_put_fontFamily
,
2423 HTMLStyle_get_fontFamily
,
2424 HTMLStyle_put_fontStyle
,
2425 HTMLStyle_get_fontStyle
,
2426 HTMLStyle_put_fontVariant
,
2427 HTMLStyle_get_fontVariant
,
2428 HTMLStyle_put_fontWeight
,
2429 HTMLStyle_get_fontWeight
,
2430 HTMLStyle_put_fontSize
,
2431 HTMLStyle_get_fontSize
,
2434 HTMLStyle_put_color
,
2435 HTMLStyle_get_color
,
2436 HTMLStyle_put_background
,
2437 HTMLStyle_get_background
,
2438 HTMLStyle_put_backgroundColor
,
2439 HTMLStyle_get_backgroundColor
,
2440 HTMLStyle_put_backgroundImage
,
2441 HTMLStyle_get_backgroundImage
,
2442 HTMLStyle_put_backgroundRepeat
,
2443 HTMLStyle_get_backgroundRepeat
,
2444 HTMLStyle_put_backgroundAttachment
,
2445 HTMLStyle_get_backgroundAttachment
,
2446 HTMLStyle_put_backgroundPosition
,
2447 HTMLStyle_get_backgroundPosition
,
2448 HTMLStyle_put_backgroundPositionX
,
2449 HTMLStyle_get_backgroundPositionX
,
2450 HTMLStyle_put_backgroundPositionY
,
2451 HTMLStyle_get_backgroundPositionY
,
2452 HTMLStyle_put_wordSpacing
,
2453 HTMLStyle_get_wordSpacing
,
2454 HTMLStyle_put_letterSpacing
,
2455 HTMLStyle_get_letterSpacing
,
2456 HTMLStyle_put_textDecoration
,
2457 HTMLStyle_get_textDecoration
,
2458 HTMLStyle_put_textDecorationNone
,
2459 HTMLStyle_get_textDecorationNone
,
2460 HTMLStyle_put_textDecorationUnderline
,
2461 HTMLStyle_get_textDecorationUnderline
,
2462 HTMLStyle_put_textDecorationOverline
,
2463 HTMLStyle_get_textDecorationOverline
,
2464 HTMLStyle_put_textDecorationLineThrough
,
2465 HTMLStyle_get_textDecorationLineThrough
,
2466 HTMLStyle_put_textDecorationBlink
,
2467 HTMLStyle_get_textDecorationBlink
,
2468 HTMLStyle_put_verticalAlign
,
2469 HTMLStyle_get_verticalAlign
,
2470 HTMLStyle_put_textTransform
,
2471 HTMLStyle_get_textTransform
,
2472 HTMLStyle_put_textAlign
,
2473 HTMLStyle_get_textAlign
,
2474 HTMLStyle_put_textIndent
,
2475 HTMLStyle_get_textIndent
,
2476 HTMLStyle_put_lineHeight
,
2477 HTMLStyle_get_lineHeight
,
2478 HTMLStyle_put_marginTop
,
2479 HTMLStyle_get_marginTop
,
2480 HTMLStyle_put_marginRight
,
2481 HTMLStyle_get_marginRight
,
2482 HTMLStyle_put_marginBottom
,
2483 HTMLStyle_get_marginBottom
,
2484 HTMLStyle_put_marginLeft
,
2485 HTMLStyle_get_marginLeft
,
2486 HTMLStyle_put_margin
,
2487 HTMLStyle_get_margin
,
2488 HTMLStyle_put_paddingTop
,
2489 HTMLStyle_get_paddingTop
,
2490 HTMLStyle_put_paddingRight
,
2491 HTMLStyle_get_paddingRight
,
2492 HTMLStyle_put_paddingBottom
,
2493 HTMLStyle_get_paddingBottom
,
2494 HTMLStyle_put_paddingLeft
,
2495 HTMLStyle_get_paddingLeft
,
2496 HTMLStyle_put_padding
,
2497 HTMLStyle_get_padding
,
2498 HTMLStyle_put_border
,
2499 HTMLStyle_get_border
,
2500 HTMLStyle_put_borderTop
,
2501 HTMLStyle_get_borderTop
,
2502 HTMLStyle_put_borderRight
,
2503 HTMLStyle_get_borderRight
,
2504 HTMLStyle_put_borderBottom
,
2505 HTMLStyle_get_borderBottom
,
2506 HTMLStyle_put_borderLeft
,
2507 HTMLStyle_get_borderLeft
,
2508 HTMLStyle_put_borderColor
,
2509 HTMLStyle_get_borderColor
,
2510 HTMLStyle_put_borderTopColor
,
2511 HTMLStyle_get_borderTopColor
,
2512 HTMLStyle_put_borderRightColor
,
2513 HTMLStyle_get_borderRightColor
,
2514 HTMLStyle_put_borderBottomColor
,
2515 HTMLStyle_get_borderBottomColor
,
2516 HTMLStyle_put_borderLeftColor
,
2517 HTMLStyle_get_borderLeftColor
,
2518 HTMLStyle_put_borderWidth
,
2519 HTMLStyle_get_borderWidth
,
2520 HTMLStyle_put_borderTopWidth
,
2521 HTMLStyle_get_borderTopWidth
,
2522 HTMLStyle_put_borderRightWidth
,
2523 HTMLStyle_get_borderRightWidth
,
2524 HTMLStyle_put_borderBottomWidth
,
2525 HTMLStyle_get_borderBottomWidth
,
2526 HTMLStyle_put_borderLeftWidth
,
2527 HTMLStyle_get_borderLeftWidth
,
2528 HTMLStyle_put_borderStyle
,
2529 HTMLStyle_get_borderStyle
,
2530 HTMLStyle_put_borderTopStyle
,
2531 HTMLStyle_get_borderTopStyle
,
2532 HTMLStyle_put_borderRightStyle
,
2533 HTMLStyle_get_borderRightStyle
,
2534 HTMLStyle_put_borderBottomStyle
,
2535 HTMLStyle_get_borderBottomStyle
,
2536 HTMLStyle_put_borderLeftStyle
,
2537 HTMLStyle_get_borderLeftStyle
,
2538 HTMLStyle_put_width
,
2539 HTMLStyle_get_width
,
2540 HTMLStyle_put_height
,
2541 HTMLStyle_get_height
,
2542 HTMLStyle_put_styleFloat
,
2543 HTMLStyle_get_styleFloat
,
2544 HTMLStyle_put_clear
,
2545 HTMLStyle_get_clear
,
2546 HTMLStyle_put_display
,
2547 HTMLStyle_get_display
,
2548 HTMLStyle_put_visibility
,
2549 HTMLStyle_get_visibility
,
2550 HTMLStyle_put_listStyleType
,
2551 HTMLStyle_get_listStyleType
,
2552 HTMLStyle_put_listStylePosition
,
2553 HTMLStyle_get_listStylePosition
,
2554 HTMLStyle_put_listStyleImage
,
2555 HTMLStyle_get_listStyleImage
,
2556 HTMLStyle_put_listStyle
,
2557 HTMLStyle_get_listStyle
,
2558 HTMLStyle_put_whiteSpace
,
2559 HTMLStyle_get_whiteSpace
,
2564 HTMLStyle_get_position
,
2565 HTMLStyle_put_zIndex
,
2566 HTMLStyle_get_zIndex
,
2567 HTMLStyle_put_overflow
,
2568 HTMLStyle_get_overflow
,
2569 HTMLStyle_put_pageBreakBefore
,
2570 HTMLStyle_get_pageBreakBefore
,
2571 HTMLStyle_put_pageBreakAfter
,
2572 HTMLStyle_get_pageBreakAfter
,
2573 HTMLStyle_put_cssText
,
2574 HTMLStyle_get_cssText
,
2575 HTMLStyle_put_pixelTop
,
2576 HTMLStyle_get_pixelTop
,
2577 HTMLStyle_put_pixelLeft
,
2578 HTMLStyle_get_pixelLeft
,
2579 HTMLStyle_put_pixelWidth
,
2580 HTMLStyle_get_pixelWidth
,
2581 HTMLStyle_put_pixelHeight
,
2582 HTMLStyle_get_pixelHeight
,
2583 HTMLStyle_put_posTop
,
2584 HTMLStyle_get_posTop
,
2585 HTMLStyle_put_posLeft
,
2586 HTMLStyle_get_posLeft
,
2587 HTMLStyle_put_posWidth
,
2588 HTMLStyle_get_posWidth
,
2589 HTMLStyle_put_posHeight
,
2590 HTMLStyle_get_posHeight
,
2591 HTMLStyle_put_cursor
,
2592 HTMLStyle_get_cursor
,
2595 HTMLStyle_put_filter
,
2596 HTMLStyle_get_filter
,
2597 HTMLStyle_setAttribute
,
2598 HTMLStyle_getAttribute
,
2599 HTMLStyle_removeAttribute
,
2603 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl
= {
2604 HTMLStyle_get_dispid
,
2608 static const tid_t HTMLStyle_iface_tids
[] = {
2615 static dispex_static_data_t HTMLStyle_dispex
= {
2616 &HTMLStyle_dispex_vtbl
,
2619 HTMLStyle_iface_tids
2622 IHTMLStyle
*HTMLStyle_Create(nsIDOMCSSStyleDeclaration
*nsstyle
)
2624 HTMLStyle
*ret
= heap_alloc_zero(sizeof(HTMLStyle
));
2626 ret
->lpHTMLStyleVtbl
= &HTMLStyleVtbl
;
2628 ret
->nsstyle
= nsstyle
;
2629 HTMLStyle2_Init(ret
);
2630 HTMLStyle3_Init(ret
);
2632 nsIDOMCSSStyleDeclaration_AddRef(nsstyle
);
2634 init_dispex(&ret
->dispex
, (IUnknown
*)HTMLSTYLE(ret
), &HTMLStyle_dispex
);
2636 return HTMLSTYLE(ret
);