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 attrBorder
[] =
45 {'b','o','r','d','e','r',0};
46 static const WCHAR attrBorderLeft
[] =
47 {'b','o','r','d','e','r','-','l','e','f','t',0};
48 static const WCHAR attrBorderWidth
[] =
49 {'b','o','r','d','e','r','-','w','i','d','t','h',0};
50 static const WCHAR attrColor
[] =
51 {'c','o','l','o','r',0};
52 static const WCHAR attrCursor
[] =
53 {'c','u','r','s','o','r',0};
54 static const WCHAR attrDisplay
[] =
55 {'d','i','s','p','l','a','y',0};
56 static const WCHAR attrFilter
[] =
57 {'f','i','l','e','t','e','r',0};
58 static const WCHAR attrFontFamily
[] =
59 {'f','o','n','t','-','f','a','m','i','l','y',0};
60 static const WCHAR attrFontSize
[] =
61 {'f','o','n','t','-','s','i','z','e',0};
62 static const WCHAR attrFontStyle
[] =
63 {'f','o','n','t','-','s','t','y','l','e',0};
64 static const WCHAR attrFontVariant
[] =
65 {'f','o','n','t','-','v','a','r','i','a','n','t',0};
66 static const WCHAR attrFontWeight
[] =
67 {'f','o','n','t','-','w','e','i','g','h','t',0};
68 static const WCHAR attrHeight
[] =
69 {'h','e','i','g','h','t',0};
70 static const WCHAR attrLeft
[] =
72 static const WCHAR attrMargin
[] =
73 {'m','a','r','g','i','n',0};
74 static const WCHAR attrMarginLeft
[] =
75 {'m','a','r','g','i','n','-','l','e','f','t',0};
76 static const WCHAR attrMarginRight
[] =
77 {'m','a','r','g','i','n','-','r','i','g','h','t',0};
78 static const WCHAR attrOverflow
[] =
79 {'o','v','e','r','f','l','o','w',0};
80 static const WCHAR attrPaddingLeft
[] =
81 {'p','a','d','d','i','n','g','-','l','e','f','t',0};
82 static const WCHAR attrPosition
[] =
83 {'p','o','s','i','t','i','o','n',0};
84 static const WCHAR attrTextAlign
[] =
85 {'t','e','x','t','-','a','l','i','g','n',0};
86 static const WCHAR attrTextDecoration
[] =
87 {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
88 static const WCHAR attrTop
[] =
90 static const WCHAR attrVerticalAlign
[] =
91 {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
92 static const WCHAR attrVisibility
[] =
93 {'v','i','s','i','b','i','l','i','t','y',0};
94 static const WCHAR attrWidth
[] =
95 {'w','i','d','t','h',0};
96 static const WCHAR attrZIndex
[] =
97 {'z','-','i','n','d','e','x',0};
103 {attrBackground
, DISPID_IHTMLSTYLE_BACKGROUND
},
104 {attrBackgroundColor
, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR
},
105 {attrBackgroundImage
, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE
},
106 {attrBorder
, DISPID_IHTMLSTYLE_BORDER
},
107 {attrBorderLeft
, DISPID_IHTMLSTYLE_BORDERLEFT
},
108 {attrBorderWidth
, DISPID_IHTMLSTYLE_BORDERWIDTH
},
109 {attrColor
, DISPID_IHTMLSTYLE_COLOR
},
110 {attrCursor
, DISPID_IHTMLSTYLE_CURSOR
},
111 {attrDisplay
, DISPID_IHTMLSTYLE_DISPLAY
},
112 {attrFilter
, DISPID_IHTMLSTYLE_FILTER
},
113 {attrFontFamily
, DISPID_IHTMLSTYLE_FONTFAMILY
},
114 {attrFontSize
, DISPID_IHTMLSTYLE_FONTSIZE
},
115 {attrFontStyle
, DISPID_IHTMLSTYLE_FONTSTYLE
},
116 {attrFontVariant
, DISPID_IHTMLSTYLE_FONTVARIANT
},
117 {attrFontWeight
, DISPID_IHTMLSTYLE_FONTWEIGHT
},
118 {attrHeight
, DISPID_IHTMLSTYLE_HEIGHT
},
119 {attrLeft
, DISPID_IHTMLSTYLE_LEFT
},
120 {attrMargin
, DISPID_IHTMLSTYLE_MARGIN
},
121 {attrMarginLeft
, DISPID_IHTMLSTYLE_MARGINLEFT
},
122 {attrMarginRight
, DISPID_IHTMLSTYLE_MARGINRIGHT
},
123 {attrOverflow
, DISPID_IHTMLSTYLE_OVERFLOW
},
124 {attrPaddingLeft
, DISPID_IHTMLSTYLE_PADDINGLEFT
},
125 {attrPosition
, DISPID_IHTMLSTYLE2_POSITION
},
126 {attrTextAlign
, DISPID_IHTMLSTYLE_TEXTALIGN
},
127 {attrTextDecoration
, DISPID_IHTMLSTYLE_TEXTDECORATION
},
128 {attrTop
, DISPID_IHTMLSTYLE_TOP
},
129 {attrVerticalAlign
, DISPID_IHTMLSTYLE_VERTICALALIGN
},
130 {attrVisibility
, DISPID_IHTMLSTYLE_VISIBILITY
},
131 {attrWidth
, DISPID_IHTMLSTYLE_WIDTH
},
132 {attrZIndex
, DISPID_IHTMLSTYLE_ZINDEX
}
135 static const WCHAR valLineThrough
[] =
136 {'l','i','n','e','-','t','h','r','o','u','g','h',0};
137 static const WCHAR valUnderline
[] =
138 {'u','n','d','e','r','l','i','n','e',0};
139 static const WCHAR szNormal
[] =
140 {'n','o','r','m','a','l',0};
142 static const WCHAR px_formatW
[] = {'%','d','p','x',0};
143 static const WCHAR emptyW
[] = {0};
145 static LPWSTR
fix_px_value(LPCWSTR val
)
150 while(*ptr
&& isspaceW(*ptr
))
155 while(*ptr
&& isdigitW(*ptr
))
158 if(!*ptr
|| isspaceW(*ptr
)) {
160 int len
= strlenW(val
)+1;
162 ret
= heap_alloc((len
+2)*sizeof(WCHAR
));
163 memcpy(ret
, val
, (ptr
-val
)*sizeof(WCHAR
));
169 TRACE("fixed %s -> %s\n", debugstr_w(val
), debugstr_w(ret
));
174 while(*ptr
&& !isspaceW(*ptr
))
181 static LPWSTR
fix_url_value(LPCWSTR val
)
185 static const WCHAR urlW
[] = {'u','r','l','('};
187 if(strncmpW(val
, urlW
, sizeof(urlW
)/sizeof(WCHAR
)) || !strchrW(val
, '\\'))
190 ret
= heap_strdupW(val
);
192 for(ptr
= ret
; *ptr
; ptr
++) {
200 #define ATTR_FIX_PX 1
201 #define ATTR_FIX_URL 2
202 #define ATTR_STR_TO_INT 4
204 HRESULT
set_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
206 nsAString str_name
, str_value
, str_empty
;
210 static const PRUnichar wszEmpty
[] = {0};
212 if(flags
& ATTR_FIX_PX
)
213 val
= fix_px_value(value
);
214 if(flags
& ATTR_FIX_URL
)
215 val
= fix_url_value(value
);
217 nsAString_Init(&str_name
, style_tbl
[sid
].name
);
218 nsAString_Init(&str_value
, val
? val
: value
);
219 nsAString_Init(&str_empty
, wszEmpty
);
222 nsres
= nsIDOMCSSStyleDeclaration_SetProperty(nsstyle
, &str_name
, &str_value
, &str_empty
);
224 ERR("SetProperty failed: %08x\n", nsres
);
226 nsAString_Finish(&str_name
);
227 nsAString_Finish(&str_value
);
228 nsAString_Finish(&str_empty
);
233 static HRESULT
set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*value
, DWORD flags
)
235 switch(V_VT(value
)) {
237 return set_nsstyle_attr(nsstyle
, sid
, emptyW
, flags
);
240 return set_nsstyle_attr(nsstyle
, sid
, V_BSTR(value
), flags
);
243 FIXME("not implemented vt %d\n", V_VT(value
));
251 static inline HRESULT
set_style_attr(HTMLStyle
*This
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
253 return set_nsstyle_attr(This
->nsstyle
, sid
, value
, flags
);
256 static HRESULT
get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, nsAString
*value
)
261 nsAString_Init(&str_name
, style_tbl
[sid
].name
);
263 nsres
= nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle
, &str_name
, value
);
264 if(NS_FAILED(nsres
)) {
265 ERR("SetProperty failed: %08x\n", nsres
);
269 nsAString_Finish(&str_name
);
274 HRESULT
get_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, BSTR
*p
)
277 const PRUnichar
*value
;
279 nsAString_Init(&str_value
, NULL
);
281 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
283 nsAString_GetData(&str_value
, &value
);
284 *p
= *value
? SysAllocString(value
) : NULL
;
286 nsAString_Finish(&str_value
);
288 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_w(*p
));
292 static HRESULT
get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*p
, DWORD flags
)
295 const PRUnichar
*value
;
298 nsAString_Init(&str_value
, NULL
);
300 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
302 nsAString_GetData(&str_value
, &value
);
304 if(flags
& ATTR_STR_TO_INT
) {
305 const PRUnichar
*ptr
= value
;
314 while(isdigitW(*ptr
))
315 i
= i
*10 + (*ptr
++ - '0');
319 V_I4(p
) = neg
? -i
: i
;
328 str
= SysAllocString(value
);
330 return E_OUTOFMEMORY
;
337 nsAString_Finish(&str_value
);
339 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_variant(p
));
343 static inline HRESULT
get_style_attr(HTMLStyle
*This
, styleid_t sid
, BSTR
*p
)
345 return get_nsstyle_attr(This
->nsstyle
, sid
, p
);
348 static HRESULT
check_style_attr_value(HTMLStyle
*This
, styleid_t sid
, LPCWSTR exval
, VARIANT_BOOL
*p
)
351 const PRUnichar
*value
;
353 nsAString_Init(&str_value
, NULL
);
355 get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
357 nsAString_GetData(&str_value
, &value
);
358 *p
= strcmpW(value
, exval
) ? VARIANT_FALSE
: VARIANT_TRUE
;
359 nsAString_Finish(&str_value
);
361 TRACE("%s -> %x\n", debugstr_w(style_tbl
[sid
].name
), *p
);
365 static inline HRESULT
set_style_pos(HTMLStyle
*This
, styleid_t sid
, float value
)
368 WCHAR szFormat
[] = {'%','.','0','f','p','x',0};
370 value
= floor(value
);
372 sprintfW(szValue
, szFormat
, value
);
374 return set_style_attr(This
, sid
, szValue
, 0);
377 static HRESULT
get_nsstyle_pos(HTMLStyle
*This
, styleid_t sid
, float *p
)
381 WCHAR pxW
[] = {'p','x',0};
383 TRACE("%p %d %p\n", This
, sid
, p
);
387 nsAString_Init(&str_value
, NULL
);
389 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
393 const PRUnichar
*value
;
395 nsAString_GetData(&str_value
, &value
);
398 *p
= strtolW(value
, &ptr
, 10);
400 if(*ptr
&& strcmpW(ptr
, pxW
))
402 nsAString_Finish(&str_value
);
403 FIXME("only px values are currently supported\n");
409 TRACE("ret %f\n", *p
);
411 nsAString_Finish(&str_value
);
416 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
418 static HRESULT WINAPI
HTMLStyle_QueryInterface(IHTMLStyle
*iface
, REFIID riid
, void **ppv
)
420 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
424 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
425 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
426 *ppv
= HTMLSTYLE(This
);
427 }else if(IsEqualGUID(&IID_IHTMLStyle
, riid
)) {
428 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This
, ppv
);
429 *ppv
= HTMLSTYLE(This
);
430 }else if(IsEqualGUID(&IID_IHTMLStyle2
, riid
)) {
431 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This
, ppv
);
432 *ppv
= HTMLSTYLE2(This
);
433 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
434 return *ppv
? S_OK
: E_NOINTERFACE
;
438 IUnknown_AddRef((IUnknown
*)*ppv
);
442 WARN("unsupported %s\n", debugstr_guid(riid
));
443 return E_NOINTERFACE
;
446 static ULONG WINAPI
HTMLStyle_AddRef(IHTMLStyle
*iface
)
448 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
449 LONG ref
= InterlockedIncrement(&This
->ref
);
451 TRACE("(%p) ref=%d\n", This
, ref
);
456 static ULONG WINAPI
HTMLStyle_Release(IHTMLStyle
*iface
)
458 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
459 LONG ref
= InterlockedDecrement(&This
->ref
);
461 TRACE("(%p) ref=%d\n", This
, ref
);
465 nsIDOMCSSStyleDeclaration_Release(This
->nsstyle
);
472 static HRESULT WINAPI
HTMLStyle_GetTypeInfoCount(IHTMLStyle
*iface
, UINT
*pctinfo
)
474 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
475 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This
->dispex
), pctinfo
);
478 static HRESULT WINAPI
HTMLStyle_GetTypeInfo(IHTMLStyle
*iface
, UINT iTInfo
,
479 LCID lcid
, ITypeInfo
**ppTInfo
)
481 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
482 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->dispex
), iTInfo
, lcid
, ppTInfo
);
485 static HRESULT WINAPI
HTMLStyle_GetIDsOfNames(IHTMLStyle
*iface
, REFIID riid
,
486 LPOLESTR
*rgszNames
, UINT cNames
,
487 LCID lcid
, DISPID
*rgDispId
)
489 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
490 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
493 static HRESULT WINAPI
HTMLStyle_Invoke(IHTMLStyle
*iface
, DISPID dispIdMember
,
494 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
495 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
497 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
498 return IDispatchEx_Invoke(DISPATCHEX(&This
->dispex
), dispIdMember
, riid
, lcid
,
499 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
502 static HRESULT WINAPI
HTMLStyle_put_fontFamily(IHTMLStyle
*iface
, BSTR v
)
504 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
506 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
508 return set_style_attr(This
, STYLEID_FONT_FAMILY
, v
, 0);
511 static HRESULT WINAPI
HTMLStyle_get_fontFamily(IHTMLStyle
*iface
, BSTR
*p
)
513 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
515 TRACE("(%p)->(%p)\n", This
, p
);
517 return get_style_attr(This
, STYLEID_FONT_FAMILY
, p
);
520 static HRESULT WINAPI
HTMLStyle_put_fontStyle(IHTMLStyle
*iface
, BSTR v
)
522 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
523 static const WCHAR szItalic
[] = {'i','t','a','l','i','c',0};
524 static const WCHAR szOblique
[] = {'o','b','l','i','q','u','e',0};
526 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
528 /* fontStyle can only be one of the follow values. */
529 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(szItalic
, v
) == 0 ||
530 strcmpiW(szOblique
, v
) == 0)
532 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_STYLE
, v
, 0);
538 static HRESULT WINAPI
HTMLStyle_get_fontStyle(IHTMLStyle
*iface
, BSTR
*p
)
540 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
542 TRACE("(%p)->(%p)\n", This
, p
);
544 return get_style_attr(This
, STYLEID_FONT_STYLE
, p
);
547 static HRESULT WINAPI
HTMLStyle_put_fontVariant(IHTMLStyle
*iface
, BSTR v
)
549 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
550 static const WCHAR szCaps
[] = {'s','m','a','l','l','-','c','a','p','s',0};
552 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
554 /* fontVariant can only be one of the follow values. */
555 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(szCaps
, v
) == 0)
557 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_VARIANT
, v
, 0);
563 static HRESULT WINAPI
HTMLStyle_get_fontVariant(IHTMLStyle
*iface
, BSTR
*p
)
565 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
566 TRACE("(%p)->(%p)\n", This
, p
);
571 return get_style_attr(This
, STYLEID_FONT_VARIANT
, p
);
574 static HRESULT WINAPI
HTMLStyle_put_fontWeight(IHTMLStyle
*iface
, BSTR v
)
576 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
577 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
581 static HRESULT WINAPI
HTMLStyle_get_fontWeight(IHTMLStyle
*iface
, BSTR
*p
)
583 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
585 TRACE("(%p)->(%p)\n", This
, p
);
587 return get_style_attr(This
, STYLEID_FONT_WEIGHT
, p
);
590 static HRESULT WINAPI
HTMLStyle_put_fontSize(IHTMLStyle
*iface
, VARIANT v
)
592 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
594 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
598 return set_style_attr(This
, STYLEID_FONT_SIZE
, V_BSTR(&v
), 0);
600 FIXME("not supported vt %d\n", V_VT(&v
));
606 static HRESULT WINAPI
HTMLStyle_get_fontSize(IHTMLStyle
*iface
, VARIANT
*p
)
608 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
610 TRACE("(%p)->(%p)\n", This
, p
);
613 return get_style_attr(This
, STYLEID_FONT_SIZE
, &V_BSTR(p
));
616 static HRESULT WINAPI
HTMLStyle_put_font(IHTMLStyle
*iface
, BSTR v
)
618 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
619 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
623 static HRESULT WINAPI
HTMLStyle_get_font(IHTMLStyle
*iface
, BSTR
*p
)
625 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
626 FIXME("(%p)->(%p)\n", This
, p
);
630 static HRESULT WINAPI
HTMLStyle_put_color(IHTMLStyle
*iface
, VARIANT v
)
632 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
634 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
638 TRACE("%s\n", debugstr_w(V_BSTR(&v
)));
639 return set_style_attr(This
, STYLEID_COLOR
, V_BSTR(&v
), 0);
642 FIXME("unsupported vt=%d\n", V_VT(&v
));
648 static HRESULT WINAPI
HTMLStyle_get_color(IHTMLStyle
*iface
, VARIANT
*p
)
650 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
652 TRACE("(%p)->(%p)\n", This
, p
);
655 return get_style_attr(This
, STYLEID_COLOR
, &V_BSTR(p
));
658 static HRESULT WINAPI
HTMLStyle_put_background(IHTMLStyle
*iface
, BSTR v
)
660 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
662 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
664 return set_style_attr(This
, STYLEID_BACKGROUND
, v
, 0);
667 static HRESULT WINAPI
HTMLStyle_get_background(IHTMLStyle
*iface
, BSTR
*p
)
669 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
671 TRACE("(%p)->(%p)\n", This
, p
);
673 return get_style_attr(This
, STYLEID_BACKGROUND
, p
);
676 static HRESULT WINAPI
HTMLStyle_put_backgroundColor(IHTMLStyle
*iface
, VARIANT v
)
678 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
680 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
684 return set_style_attr(This
, STYLEID_BACKGROUND_COLOR
, V_BSTR(&v
), 0);
687 static const WCHAR format
[] = {'#','%','0','6','x',0};
689 wsprintfW(value
, format
, V_I4(&v
));
690 return set_style_attr(This
, STYLEID_BACKGROUND_COLOR
, value
, 0);
693 FIXME("unsupported vt %d\n", V_VT(&v
));
699 static HRESULT WINAPI
HTMLStyle_get_backgroundColor(IHTMLStyle
*iface
, VARIANT
*p
)
701 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
702 FIXME("(%p)->(%p)\n", This
, p
);
706 static HRESULT WINAPI
HTMLStyle_put_backgroundImage(IHTMLStyle
*iface
, BSTR v
)
708 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
710 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
712 return set_style_attr(This
, STYLEID_BACKGROUND_IMAGE
, v
, ATTR_FIX_URL
);
715 static HRESULT WINAPI
HTMLStyle_get_backgroundImage(IHTMLStyle
*iface
, BSTR
*p
)
717 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
718 FIXME("(%p)->(%p)\n", This
, p
);
722 static HRESULT WINAPI
HTMLStyle_put_backgroundRepeat(IHTMLStyle
*iface
, BSTR v
)
724 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
725 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
729 static HRESULT WINAPI
HTMLStyle_get_backgroundRepeat(IHTMLStyle
*iface
, BSTR
*p
)
731 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
732 FIXME("(%p)->(%p)\n", This
, p
);
736 static HRESULT WINAPI
HTMLStyle_put_backgroundAttachment(IHTMLStyle
*iface
, BSTR v
)
738 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
739 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
743 static HRESULT WINAPI
HTMLStyle_get_backgroundAttachment(IHTMLStyle
*iface
, BSTR
*p
)
745 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
746 FIXME("(%p)->(%p)\n", This
, p
);
750 static HRESULT WINAPI
HTMLStyle_put_backgroundPosition(IHTMLStyle
*iface
, BSTR v
)
752 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
753 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
757 static HRESULT WINAPI
HTMLStyle_get_backgroundPosition(IHTMLStyle
*iface
, BSTR
*p
)
759 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
760 FIXME("(%p)->(%p)\n", This
, p
);
764 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionX(IHTMLStyle
*iface
, VARIANT v
)
766 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
767 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
771 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionX(IHTMLStyle
*iface
, VARIANT
*p
)
773 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
774 FIXME("(%p)->(%p)\n", This
, p
);
778 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionY(IHTMLStyle
*iface
, VARIANT v
)
780 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
781 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
785 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionY(IHTMLStyle
*iface
, VARIANT
*p
)
787 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
788 FIXME("(%p)->(%p)\n", This
, p
);
792 static HRESULT WINAPI
HTMLStyle_put_wordSpacing(IHTMLStyle
*iface
, VARIANT v
)
794 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
795 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
799 static HRESULT WINAPI
HTMLStyle_get_wordSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
801 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
802 FIXME("(%p)->(%p)\n", This
, p
);
806 static HRESULT WINAPI
HTMLStyle_put_letterSpacing(IHTMLStyle
*iface
, VARIANT v
)
808 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
809 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
813 static HRESULT WINAPI
HTMLStyle_get_letterSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
815 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
816 FIXME("(%p)->(%p)\n", This
, p
);
820 static HRESULT WINAPI
HTMLStyle_put_textDecoration(IHTMLStyle
*iface
, BSTR v
)
822 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
823 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
827 static HRESULT WINAPI
HTMLStyle_get_textDecoration(IHTMLStyle
*iface
, BSTR
*p
)
829 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
831 TRACE("(%p)->(%p)\n", This
, p
);
833 return get_style_attr(This
, STYLEID_TEXT_DECORATION
, p
);
836 static HRESULT WINAPI
HTMLStyle_put_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL v
)
838 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
839 FIXME("(%p)->(%x)\n", This
, v
);
843 static HRESULT WINAPI
HTMLStyle_get_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
845 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
846 FIXME("(%p)->(%p)\n", This
, p
);
850 static HRESULT WINAPI
HTMLStyle_put_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
852 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
853 FIXME("(%p)->(%x)\n", This
, v
);
857 static HRESULT WINAPI
HTMLStyle_get_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
859 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
861 TRACE("(%p)->(%p)\n", This
, p
);
863 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valUnderline
, p
);
866 static HRESULT WINAPI
HTMLStyle_put_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
868 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
869 FIXME("(%p)->(%x)\n", This
, v
);
873 static HRESULT WINAPI
HTMLStyle_get_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
875 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
876 FIXME("(%p)->(%p)\n", This
, p
);
880 static HRESULT WINAPI
HTMLStyle_put_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL v
)
882 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
883 FIXME("(%p)->(%x)\n", This
, v
);
887 static HRESULT WINAPI
HTMLStyle_get_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
889 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
891 TRACE("(%p)->(%p)\n", This
, p
);
893 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valLineThrough
, p
);
896 static HRESULT WINAPI
HTMLStyle_put_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL v
)
898 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
899 FIXME("(%p)->(%x)\n", This
, v
);
903 static HRESULT WINAPI
HTMLStyle_get_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
905 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
906 FIXME("(%p)->(%p)\n", This
, p
);
910 static HRESULT WINAPI
HTMLStyle_put_verticalAlign(IHTMLStyle
*iface
, VARIANT v
)
912 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
914 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
918 return set_style_attr(This
, STYLEID_VERTICAL_ALIGN
, V_BSTR(&v
), 0);
920 FIXME("not implemented vt %d\n", V_VT(&v
));
927 static HRESULT WINAPI
HTMLStyle_get_verticalAlign(IHTMLStyle
*iface
, VARIANT
*p
)
929 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
933 TRACE("(%p)->(%p)\n", This
, p
);
935 hres
= get_style_attr(This
, STYLEID_VERTICAL_ALIGN
, &ret
);
944 static HRESULT WINAPI
HTMLStyle_put_textTransform(IHTMLStyle
*iface
, BSTR v
)
946 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
947 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
951 static HRESULT WINAPI
HTMLStyle_get_textTransform(IHTMLStyle
*iface
, BSTR
*p
)
953 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
954 FIXME("(%p)->(%p)\n", This
, p
);
958 static HRESULT WINAPI
HTMLStyle_put_textAlign(IHTMLStyle
*iface
, BSTR v
)
960 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
962 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
964 return set_style_attr(This
, STYLEID_TEXT_ALIGN
, v
, 0);
967 static HRESULT WINAPI
HTMLStyle_get_textAlign(IHTMLStyle
*iface
, BSTR
*p
)
969 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
971 TRACE("(%p)->(%p)\n", This
, p
);
973 return get_style_attr(This
, STYLEID_TEXT_ALIGN
, p
);
976 static HRESULT WINAPI
HTMLStyle_put_textIndent(IHTMLStyle
*iface
, VARIANT v
)
978 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
979 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
983 static HRESULT WINAPI
HTMLStyle_get_textIndent(IHTMLStyle
*iface
, VARIANT
*p
)
985 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
986 FIXME("(%p)->(%p)\n", This
, p
);
990 static HRESULT WINAPI
HTMLStyle_put_lineHeight(IHTMLStyle
*iface
, VARIANT v
)
992 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
993 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
997 static HRESULT WINAPI
HTMLStyle_get_lineHeight(IHTMLStyle
*iface
, VARIANT
*p
)
999 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1000 FIXME("(%p)->(%p)\n", This
, p
);
1004 static HRESULT WINAPI
HTMLStyle_put_marginTop(IHTMLStyle
*iface
, VARIANT v
)
1006 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1007 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1011 static HRESULT WINAPI
HTMLStyle_get_marginTop(IHTMLStyle
*iface
, VARIANT
*p
)
1013 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1014 FIXME("(%p)->(%p)\n", This
, p
);
1018 static HRESULT WINAPI
HTMLStyle_put_marginRight(IHTMLStyle
*iface
, VARIANT v
)
1020 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1022 TRACE("(%p)->(v(%d))\n", This
, V_VT(&v
));
1026 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, emptyW
, 0);
1030 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1031 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, buf
, 0);
1034 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, V_BSTR(&v
), 0);
1036 FIXME("Unsupported vt=%d\n", V_VT(&v
));
1042 static HRESULT WINAPI
HTMLStyle_get_marginRight(IHTMLStyle
*iface
, VARIANT
*p
)
1044 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1045 FIXME("(%p)->(%p)\n", This
, p
);
1049 static HRESULT WINAPI
HTMLStyle_put_marginBottom(IHTMLStyle
*iface
, VARIANT v
)
1051 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1052 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1056 static HRESULT WINAPI
HTMLStyle_get_marginBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1058 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1059 FIXME("(%p)->(%p)\n", This
, p
);
1063 static HRESULT WINAPI
HTMLStyle_put_marginLeft(IHTMLStyle
*iface
, VARIANT v
)
1065 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1069 TRACE("(%p)->(NULL)\n", This
);
1070 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, emptyW
, 0);
1074 TRACE("(%p)->(%d)\n", This
, V_I4(&v
));
1076 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1077 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, buf
, 0);
1080 TRACE("(%p)->(%s)\n", This
, debugstr_w(V_BSTR(&v
)));
1081 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, V_BSTR(&v
), 0);
1083 FIXME("Unsupported vt=%d\n", V_VT(&v
));
1089 static HRESULT WINAPI
HTMLStyle_put_margin(IHTMLStyle
*iface
, BSTR v
)
1091 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1093 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1095 return set_style_attr(This
, STYLEID_MARGIN
, v
, 0);
1098 static HRESULT WINAPI
HTMLStyle_get_margin(IHTMLStyle
*iface
, BSTR
*p
)
1100 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1102 TRACE("(%p)->(%p)\n", This
, p
);
1104 return get_style_attr(This
, STYLEID_MARGIN
, p
);
1107 static HRESULT WINAPI
HTMLStyle_get_marginLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1109 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1110 FIXME("(%p)->(%p)\n", This
, p
);
1114 static HRESULT WINAPI
HTMLStyle_put_paddingTop(IHTMLStyle
*iface
, VARIANT v
)
1116 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1117 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1121 static HRESULT WINAPI
HTMLStyle_get_paddingTop(IHTMLStyle
*iface
, VARIANT
*p
)
1123 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1124 FIXME("(%p)->(%p)\n", This
, p
);
1128 static HRESULT WINAPI
HTMLStyle_put_paddingRight(IHTMLStyle
*iface
, VARIANT v
)
1130 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1131 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1135 static HRESULT WINAPI
HTMLStyle_get_paddingRight(IHTMLStyle
*iface
, VARIANT
*p
)
1137 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1138 FIXME("(%p)->(%p)\n", This
, p
);
1142 static HRESULT WINAPI
HTMLStyle_put_paddingBottom(IHTMLStyle
*iface
, VARIANT v
)
1144 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1145 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1149 static HRESULT WINAPI
HTMLStyle_get_paddingBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1151 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1152 FIXME("(%p)->(%p)\n", This
, p
);
1156 static HRESULT WINAPI
HTMLStyle_put_paddingLeft(IHTMLStyle
*iface
, VARIANT v
)
1158 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1160 TRACE("(%p)->(vt=%d)\n", This
, V_VT(&v
));
1166 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1167 return set_style_attr(This
, STYLEID_PADDING_LEFT
, buf
, 0);
1170 return set_style_attr(This
, STYLEID_PADDING_LEFT
, V_BSTR(&v
), 0);
1172 FIXME("unsupported vt=%d\n", V_VT(&v
));
1178 static HRESULT WINAPI
HTMLStyle_get_paddingLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1180 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1181 FIXME("(%p)->(%p)\n", This
, p
);
1185 static HRESULT WINAPI
HTMLStyle_put_padding(IHTMLStyle
*iface
, BSTR v
)
1187 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1188 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1192 static HRESULT WINAPI
HTMLStyle_get_padding(IHTMLStyle
*iface
, BSTR
*p
)
1194 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1195 FIXME("(%p)->(%p)\n", This
, p
);
1199 static HRESULT WINAPI
HTMLStyle_put_border(IHTMLStyle
*iface
, BSTR v
)
1201 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1203 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1205 return set_style_attr(This
, STYLEID_BORDER
, v
, 0);
1208 static HRESULT WINAPI
HTMLStyle_get_border(IHTMLStyle
*iface
, BSTR
*p
)
1210 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1212 TRACE("(%p)->(%p)\n", This
, p
);
1214 return get_style_attr(This
, STYLEID_BORDER
, p
);
1217 static HRESULT WINAPI
HTMLStyle_put_borderTop(IHTMLStyle
*iface
, BSTR v
)
1219 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1220 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1224 static HRESULT WINAPI
HTMLStyle_get_borderTop(IHTMLStyle
*iface
, BSTR
*p
)
1226 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1227 FIXME("(%p)->(%p)\n", This
, p
);
1231 static HRESULT WINAPI
HTMLStyle_put_borderRight(IHTMLStyle
*iface
, BSTR v
)
1233 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1234 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1238 static HRESULT WINAPI
HTMLStyle_get_borderRight(IHTMLStyle
*iface
, BSTR
*p
)
1240 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1241 FIXME("(%p)->(%p)\n", This
, p
);
1245 static HRESULT WINAPI
HTMLStyle_put_borderBottom(IHTMLStyle
*iface
, BSTR v
)
1247 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1248 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1252 static HRESULT WINAPI
HTMLStyle_get_borderBottom(IHTMLStyle
*iface
, BSTR
*p
)
1254 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1255 FIXME("(%p)->(%p)\n", This
, p
);
1259 static HRESULT WINAPI
HTMLStyle_put_borderLeft(IHTMLStyle
*iface
, BSTR v
)
1261 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1263 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1265 return set_style_attr(This
, STYLEID_BORDER_LEFT
, v
, ATTR_FIX_PX
);
1268 static HRESULT WINAPI
HTMLStyle_get_borderLeft(IHTMLStyle
*iface
, BSTR
*p
)
1270 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1271 FIXME("(%p)->(%p)\n", This
, p
);
1275 static HRESULT WINAPI
HTMLStyle_put_borderColor(IHTMLStyle
*iface
, BSTR v
)
1277 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1278 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1282 static HRESULT WINAPI
HTMLStyle_get_borderColor(IHTMLStyle
*iface
, BSTR
*p
)
1284 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1285 FIXME("(%p)->(%p)\n", This
, p
);
1289 static HRESULT WINAPI
HTMLStyle_put_borderTopColor(IHTMLStyle
*iface
, VARIANT v
)
1291 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1292 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1296 static HRESULT WINAPI
HTMLStyle_get_borderTopColor(IHTMLStyle
*iface
, VARIANT
*p
)
1298 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1299 FIXME("(%p)->(%p)\n", This
, p
);
1303 static HRESULT WINAPI
HTMLStyle_put_borderRightColor(IHTMLStyle
*iface
, VARIANT v
)
1305 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1306 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1310 static HRESULT WINAPI
HTMLStyle_get_borderRightColor(IHTMLStyle
*iface
, VARIANT
*p
)
1312 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1313 FIXME("(%p)->(%p)\n", This
, p
);
1317 static HRESULT WINAPI
HTMLStyle_put_borderBottomColor(IHTMLStyle
*iface
, VARIANT v
)
1319 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1320 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1324 static HRESULT WINAPI
HTMLStyle_get_borderBottomColor(IHTMLStyle
*iface
, VARIANT
*p
)
1326 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1327 FIXME("(%p)->(%p)\n", This
, p
);
1331 static HRESULT WINAPI
HTMLStyle_put_borderLeftColor(IHTMLStyle
*iface
, VARIANT v
)
1333 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1334 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1338 static HRESULT WINAPI
HTMLStyle_get_borderLeftColor(IHTMLStyle
*iface
, VARIANT
*p
)
1340 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1341 FIXME("(%p)->(%p)\n", This
, p
);
1345 static HRESULT WINAPI
HTMLStyle_put_borderWidth(IHTMLStyle
*iface
, BSTR v
)
1347 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1348 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1349 return set_style_attr(This
, STYLEID_BORDER_WIDTH
, v
, ATTR_FIX_PX
);
1352 static HRESULT WINAPI
HTMLStyle_get_borderWidth(IHTMLStyle
*iface
, BSTR
*p
)
1354 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1355 TRACE("(%p)->(%p)\n", This
, p
);
1356 return get_style_attr(This
, STYLEID_BORDER_WIDTH
, p
);
1359 static HRESULT WINAPI
HTMLStyle_put_borderTopWidth(IHTMLStyle
*iface
, VARIANT v
)
1361 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1362 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1366 static HRESULT WINAPI
HTMLStyle_get_borderTopWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1368 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1369 FIXME("(%p)->(%p)\n", This
, p
);
1373 static HRESULT WINAPI
HTMLStyle_put_borderRightWidth(IHTMLStyle
*iface
, VARIANT v
)
1375 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1376 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1380 static HRESULT WINAPI
HTMLStyle_get_borderRightWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1382 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1383 FIXME("(%p)->(%p)\n", This
, p
);
1387 static HRESULT WINAPI
HTMLStyle_put_borderBottomWidth(IHTMLStyle
*iface
, VARIANT v
)
1389 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1390 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1394 static HRESULT WINAPI
HTMLStyle_get_borderBottomWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1396 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1397 FIXME("(%p)->(%p)\n", This
, p
);
1401 static HRESULT WINAPI
HTMLStyle_put_borderLeftWidth(IHTMLStyle
*iface
, VARIANT v
)
1403 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1404 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1408 static HRESULT WINAPI
HTMLStyle_get_borderLeftWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1410 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1411 FIXME("(%p)->(%p)\n", This
, p
);
1415 static HRESULT WINAPI
HTMLStyle_put_borderStyle(IHTMLStyle
*iface
, BSTR v
)
1417 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1418 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1422 static HRESULT WINAPI
HTMLStyle_get_borderStyle(IHTMLStyle
*iface
, BSTR
*p
)
1424 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1425 FIXME("(%p)->(%p)\n", This
, p
);
1429 static HRESULT WINAPI
HTMLStyle_put_borderTopStyle(IHTMLStyle
*iface
, BSTR v
)
1431 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1432 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1436 static HRESULT WINAPI
HTMLStyle_get_borderTopStyle(IHTMLStyle
*iface
, BSTR
*p
)
1438 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1439 FIXME("(%p)->(%p)\n", This
, p
);
1443 static HRESULT WINAPI
HTMLStyle_put_borderRightStyle(IHTMLStyle
*iface
, BSTR v
)
1445 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1446 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1450 static HRESULT WINAPI
HTMLStyle_get_borderRightStyle(IHTMLStyle
*iface
, BSTR
*p
)
1452 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1453 FIXME("(%p)->(%p)\n", This
, p
);
1457 static HRESULT WINAPI
HTMLStyle_put_borderBottomStyle(IHTMLStyle
*iface
, BSTR v
)
1459 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1460 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1464 static HRESULT WINAPI
HTMLStyle_get_borderBottomStyle(IHTMLStyle
*iface
, BSTR
*p
)
1466 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1467 FIXME("(%p)->(%p)\n", This
, p
);
1471 static HRESULT WINAPI
HTMLStyle_put_borderLeftStyle(IHTMLStyle
*iface
, BSTR v
)
1473 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1474 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1478 static HRESULT WINAPI
HTMLStyle_get_borderLeftStyle(IHTMLStyle
*iface
, BSTR
*p
)
1480 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1481 FIXME("(%p)->(%p)\n", This
, p
);
1485 static HRESULT WINAPI
HTMLStyle_put_width(IHTMLStyle
*iface
, VARIANT v
)
1487 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1489 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
1493 TRACE("%s\n", debugstr_w(V_BSTR(&v
)));
1494 return set_style_attr(This
, STYLEID_WIDTH
, V_BSTR(&v
), 0);
1496 FIXME("unsupported vt %d\n", V_VT(&v
));
1502 static HRESULT WINAPI
HTMLStyle_get_width(IHTMLStyle
*iface
, VARIANT
*p
)
1504 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1506 TRACE("(%p)->(%p)\n", This
, p
);
1509 return get_style_attr(This
, STYLEID_WIDTH
, &V_BSTR(p
));
1512 static HRESULT WINAPI
HTMLStyle_put_height(IHTMLStyle
*iface
, VARIANT v
)
1514 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1516 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1520 return set_style_attr(This
, STYLEID_HEIGHT
, V_BSTR(&v
), 0);
1522 FIXME("unimplemented vt %d\n", V_VT(&v
));
1529 static HRESULT WINAPI
HTMLStyle_get_height(IHTMLStyle
*iface
, VARIANT
*p
)
1531 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1535 TRACE("(%p)->(%p)\n", This
, p
);
1537 hres
= get_style_attr(This
, STYLEID_HEIGHT
, &ret
);
1546 static HRESULT WINAPI
HTMLStyle_put_styleFloat(IHTMLStyle
*iface
, BSTR v
)
1548 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1549 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1553 static HRESULT WINAPI
HTMLStyle_get_styleFloat(IHTMLStyle
*iface
, BSTR
*p
)
1555 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1556 FIXME("(%p)->(%p)\n", This
, p
);
1560 static HRESULT WINAPI
HTMLStyle_put_clear(IHTMLStyle
*iface
, BSTR v
)
1562 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1563 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1567 static HRESULT WINAPI
HTMLStyle_get_clear(IHTMLStyle
*iface
, BSTR
*p
)
1569 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1570 FIXME("(%p)->(%p)\n", This
, p
);
1574 static HRESULT WINAPI
HTMLStyle_put_display(IHTMLStyle
*iface
, BSTR v
)
1576 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1578 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1580 return set_style_attr(This
, STYLEID_DISPLAY
, v
, 0);
1583 static HRESULT WINAPI
HTMLStyle_get_display(IHTMLStyle
*iface
, BSTR
*p
)
1585 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1587 TRACE("(%p)->(%p)\n", This
, p
);
1589 return get_style_attr(This
, STYLEID_DISPLAY
, p
);
1592 static HRESULT WINAPI
HTMLStyle_put_visibility(IHTMLStyle
*iface
, BSTR v
)
1594 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1596 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1598 return set_style_attr(This
, STYLEID_VISIBILITY
, v
, 0);
1601 static HRESULT WINAPI
HTMLStyle_get_visibility(IHTMLStyle
*iface
, BSTR
*p
)
1603 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1605 TRACE("(%p)->(%p)\n", This
, p
);
1607 return get_style_attr(This
, STYLEID_VISIBILITY
, p
);
1610 static HRESULT WINAPI
HTMLStyle_put_listStyleType(IHTMLStyle
*iface
, BSTR v
)
1612 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1613 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1617 static HRESULT WINAPI
HTMLStyle_get_listStyleType(IHTMLStyle
*iface
, BSTR
*p
)
1619 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1620 FIXME("(%p)->(%p)\n", This
, p
);
1624 static HRESULT WINAPI
HTMLStyle_put_listStylePosition(IHTMLStyle
*iface
, BSTR v
)
1626 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1627 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1631 static HRESULT WINAPI
HTMLStyle_get_listStylePosition(IHTMLStyle
*iface
, BSTR
*p
)
1633 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1634 FIXME("(%p)->(%p)\n", This
, p
);
1638 static HRESULT WINAPI
HTMLStyle_put_listStyleImage(IHTMLStyle
*iface
, BSTR v
)
1640 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1641 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1645 static HRESULT WINAPI
HTMLStyle_get_listStyleImage(IHTMLStyle
*iface
, BSTR
*p
)
1647 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1648 FIXME("(%p)->(%p)\n", This
, p
);
1652 static HRESULT WINAPI
HTMLStyle_put_listStyle(IHTMLStyle
*iface
, BSTR v
)
1654 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1655 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1659 static HRESULT WINAPI
HTMLStyle_get_listStyle(IHTMLStyle
*iface
, BSTR
*p
)
1661 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1662 FIXME("(%p)->(%p)\n", This
, p
);
1666 static HRESULT WINAPI
HTMLStyle_put_whiteSpace(IHTMLStyle
*iface
, BSTR v
)
1668 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1669 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1673 static HRESULT WINAPI
HTMLStyle_get_whiteSpace(IHTMLStyle
*iface
, BSTR
*p
)
1675 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1676 FIXME("(%p)->(%p)\n", This
, p
);
1680 static HRESULT WINAPI
HTMLStyle_put_top(IHTMLStyle
*iface
, VARIANT v
)
1682 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1684 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1686 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_TOP
, &v
, 0);
1689 static HRESULT WINAPI
HTMLStyle_get_top(IHTMLStyle
*iface
, VARIANT
*p
)
1691 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1695 TRACE("(%p)->(%p)\n", This
, p
);
1697 hres
= get_style_attr(This
, STYLEID_TOP
, &ret
);
1706 static HRESULT WINAPI
HTMLStyle_put_left(IHTMLStyle
*iface
, VARIANT v
)
1708 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1710 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1712 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_LEFT
, &v
, 0);
1715 static HRESULT WINAPI
HTMLStyle_get_left(IHTMLStyle
*iface
, VARIANT
*p
)
1717 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1721 TRACE("(%p)->(%p)\n", This
, p
);
1723 hres
= get_style_attr(This
, STYLEID_LEFT
, &ret
);
1732 static HRESULT WINAPI
HTMLStyle_get_position(IHTMLStyle
*iface
, BSTR
*p
)
1734 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1735 FIXME("(%p)->(%p)\n", This
, p
);
1739 static HRESULT WINAPI
HTMLStyle_put_zIndex(IHTMLStyle
*iface
, VARIANT v
)
1741 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1743 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1747 return set_style_attr(This
, STYLEID_Z_INDEX
, V_BSTR(&v
), 0);
1750 static const WCHAR format
[] = {'%','d',0};
1752 wsprintfW(value
, format
, V_I4(&v
));
1753 return set_style_attr(This
, STYLEID_Z_INDEX
, value
, 0);
1756 FIXME("unimplemented vt %d\n", V_VT(&v
));
1763 static HRESULT WINAPI
HTMLStyle_get_zIndex(IHTMLStyle
*iface
, VARIANT
*p
)
1765 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1767 TRACE("(%p)->(%p)\n", This
, p
);
1769 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_Z_INDEX
, p
, ATTR_STR_TO_INT
);
1772 static HRESULT WINAPI
HTMLStyle_put_overflow(IHTMLStyle
*iface
, BSTR v
)
1774 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1775 static const WCHAR szVisible
[] = {'v','i','s','i','b','l','e',0};
1776 static const WCHAR szScroll
[] = {'s','c','r','o','l','l',0};
1777 static const WCHAR szHidden
[] = {'h','i','d','d','e','n',0};
1778 static const WCHAR szAuto
[] = {'a','u','t','o',0};
1780 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1782 /* overflow can only be one of the follow values. */
1783 if(!v
|| strcmpiW(szVisible
, v
) == 0 || strcmpiW(szScroll
, v
) == 0 ||
1784 strcmpiW(szHidden
, v
) == 0 || strcmpiW(szAuto
, v
) == 0)
1786 return set_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW
, v
, 0);
1789 return E_INVALIDARG
;
1793 static HRESULT WINAPI
HTMLStyle_get_overflow(IHTMLStyle
*iface
, BSTR
*p
)
1795 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1797 TRACE("(%p)->(%p)\n", This
, p
);
1800 return E_INVALIDARG
;
1802 return get_style_attr(This
, STYLEID_OVERFLOW
, p
);
1805 static HRESULT WINAPI
HTMLStyle_put_pageBreakBefore(IHTMLStyle
*iface
, BSTR v
)
1807 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1808 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1812 static HRESULT WINAPI
HTMLStyle_get_pageBreakBefore(IHTMLStyle
*iface
, BSTR
*p
)
1814 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1815 FIXME("(%p)->(%p)\n", This
, p
);
1819 static HRESULT WINAPI
HTMLStyle_put_pageBreakAfter(IHTMLStyle
*iface
, BSTR v
)
1821 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1822 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1826 static HRESULT WINAPI
HTMLStyle_get_pageBreakAfter(IHTMLStyle
*iface
, BSTR
*p
)
1828 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1829 FIXME("(%p)->(%p)\n", This
, p
);
1833 static HRESULT WINAPI
HTMLStyle_put_cssText(IHTMLStyle
*iface
, BSTR v
)
1835 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1836 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1840 static HRESULT WINAPI
HTMLStyle_get_cssText(IHTMLStyle
*iface
, BSTR
*p
)
1842 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1843 FIXME("(%p)->(%p)\n", This
, p
);
1847 static HRESULT WINAPI
HTMLStyle_put_pixelTop(IHTMLStyle
*iface
, long v
)
1849 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1850 FIXME("(%p)->()\n", This
);
1854 static HRESULT WINAPI
HTMLStyle_get_pixelTop(IHTMLStyle
*iface
, long *p
)
1856 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1857 FIXME("(%p)->()\n", This
);
1861 static HRESULT WINAPI
HTMLStyle_put_pixelLeft(IHTMLStyle
*iface
, long v
)
1863 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1864 FIXME("(%p)->()\n", This
);
1868 static HRESULT WINAPI
HTMLStyle_get_pixelLeft(IHTMLStyle
*iface
, long *p
)
1870 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1871 FIXME("(%p)->()\n", This
);
1875 static HRESULT WINAPI
HTMLStyle_put_pixelWidth(IHTMLStyle
*iface
, long v
)
1877 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1878 FIXME("(%p)->()\n", This
);
1882 static HRESULT WINAPI
HTMLStyle_get_pixelWidth(IHTMLStyle
*iface
, long *p
)
1884 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1885 FIXME("(%p)->()\n", This
);
1889 static HRESULT WINAPI
HTMLStyle_put_pixelHeight(IHTMLStyle
*iface
, long v
)
1891 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1892 FIXME("(%p)->()\n", This
);
1896 static HRESULT WINAPI
HTMLStyle_get_pixelHeight(IHTMLStyle
*iface
, long *p
)
1898 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1899 FIXME("(%p)->()\n", This
);
1903 static HRESULT WINAPI
HTMLStyle_put_posTop(IHTMLStyle
*iface
, float v
)
1905 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1907 TRACE("(%p)->(%f)\n", This
, v
);
1909 return set_style_pos(This
, STYLEID_TOP
, v
);
1912 static HRESULT WINAPI
HTMLStyle_get_posTop(IHTMLStyle
*iface
, float *p
)
1914 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1916 TRACE("(%p)->(%p)\n", This
, p
);
1921 return get_nsstyle_pos(This
, STYLEID_TOP
, p
);
1924 static HRESULT WINAPI
HTMLStyle_put_posLeft(IHTMLStyle
*iface
, float v
)
1926 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1928 TRACE("(%p)->(%f)\n", This
, v
);
1930 return set_style_pos(This
, STYLEID_LEFT
, v
);
1933 static HRESULT WINAPI
HTMLStyle_get_posLeft(IHTMLStyle
*iface
, float *p
)
1935 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1937 TRACE("(%p)->(%p)\n", This
, p
);
1942 return get_nsstyle_pos(This
, STYLEID_LEFT
, p
);
1945 static HRESULT WINAPI
HTMLStyle_put_posWidth(IHTMLStyle
*iface
, float v
)
1947 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1949 TRACE("(%p)->(%f)\n", This
, v
);
1951 return set_style_pos(This
, STYLEID_WIDTH
, v
);
1954 static HRESULT WINAPI
HTMLStyle_get_posWidth(IHTMLStyle
*iface
, float *p
)
1956 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1958 TRACE("(%p)->(%p)\n", This
, p
);
1963 if(get_nsstyle_pos(This
, STYLEID_WIDTH
, p
) != S_OK
)
1969 static HRESULT WINAPI
HTMLStyle_put_posHeight(IHTMLStyle
*iface
, float v
)
1971 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1973 TRACE("(%p)->(%f)\n", This
, v
);
1975 return set_style_pos(This
, STYLEID_HEIGHT
, v
);
1978 static HRESULT WINAPI
HTMLStyle_get_posHeight(IHTMLStyle
*iface
, float *p
)
1980 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1982 TRACE("(%p)->(%p)\n", This
, p
);
1987 if(get_nsstyle_pos(This
, STYLEID_HEIGHT
, p
) != S_OK
)
1993 static HRESULT WINAPI
HTMLStyle_put_cursor(IHTMLStyle
*iface
, BSTR v
)
1995 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1997 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1999 return set_style_attr(This
, STYLEID_CURSOR
, v
, 0);
2002 static HRESULT WINAPI
HTMLStyle_get_cursor(IHTMLStyle
*iface
, BSTR
*p
)
2004 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2006 TRACE("(%p)->(%p)\n", This
, p
);
2008 return get_style_attr(This
, STYLEID_CURSOR
, p
);
2011 static HRESULT WINAPI
HTMLStyle_put_clip(IHTMLStyle
*iface
, BSTR v
)
2013 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2014 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
2018 static HRESULT WINAPI
HTMLStyle_get_clip(IHTMLStyle
*iface
, BSTR
*p
)
2020 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2021 FIXME("(%p)->(%p)\n", This
, p
);
2025 static HRESULT WINAPI
HTMLStyle_put_filter(IHTMLStyle
*iface
, BSTR v
)
2027 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2029 WARN("(%p)->(%s)\n", This
, debugstr_w(v
));
2031 /* FIXME: Handle MS-style filters */
2032 return set_style_attr(This
, STYLEID_FILTER
, v
, 0);
2035 static HRESULT WINAPI
HTMLStyle_get_filter(IHTMLStyle
*iface
, BSTR
*p
)
2037 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2039 WARN("(%p)->(%p)\n", This
, p
);
2041 /* FIXME: Handle MS-style filters */
2042 return get_style_attr(This
, STYLEID_FILTER
, p
);
2045 static HRESULT WINAPI
HTMLStyle_setAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2046 VARIANT AttributeValue
, LONG lFlags
)
2048 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2049 FIXME("(%p)->(%s v%d %08x)\n", This
, debugstr_w(strAttributeName
),
2050 V_VT(&AttributeValue
), lFlags
);
2054 static HRESULT WINAPI
HTMLStyle_getAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2055 LONG lFlags
, VARIANT
*AttributeValue
)
2057 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2058 FIXME("(%p)->(%s %08x %p)\n", This
, debugstr_w(strAttributeName
),
2059 lFlags
, AttributeValue
);
2063 static HRESULT WINAPI
HTMLStyle_removeAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2064 LONG lFlags
, VARIANT_BOOL
*pfSuccess
)
2066 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2067 FIXME("(%p)->(%s %08x %p)\n", This
, debugstr_w(strAttributeName
),
2072 static HRESULT WINAPI
HTMLStyle_toString(IHTMLStyle
*iface
, BSTR
*String
)
2074 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2075 FIXME("(%p)->(%p)\n", This
, String
);
2079 static HRESULT
HTMLStyle_get_dispid(IUnknown
*iface
, BSTR name
, DWORD flags
, DISPID
*dispid
)
2081 int c
, i
, min
=0, max
= sizeof(style_tbl
)/sizeof(*style_tbl
)-1;
2086 c
= strcmpW(style_tbl
[i
].name
, name
);
2088 *dispid
= style_tbl
[i
].dispid
;
2098 return DISP_E_UNKNOWNNAME
;
2101 static const IHTMLStyleVtbl HTMLStyleVtbl
= {
2102 HTMLStyle_QueryInterface
,
2105 HTMLStyle_GetTypeInfoCount
,
2106 HTMLStyle_GetTypeInfo
,
2107 HTMLStyle_GetIDsOfNames
,
2109 HTMLStyle_put_fontFamily
,
2110 HTMLStyle_get_fontFamily
,
2111 HTMLStyle_put_fontStyle
,
2112 HTMLStyle_get_fontStyle
,
2113 HTMLStyle_put_fontVariant
,
2114 HTMLStyle_get_fontVariant
,
2115 HTMLStyle_put_fontWeight
,
2116 HTMLStyle_get_fontWeight
,
2117 HTMLStyle_put_fontSize
,
2118 HTMLStyle_get_fontSize
,
2121 HTMLStyle_put_color
,
2122 HTMLStyle_get_color
,
2123 HTMLStyle_put_background
,
2124 HTMLStyle_get_background
,
2125 HTMLStyle_put_backgroundColor
,
2126 HTMLStyle_get_backgroundColor
,
2127 HTMLStyle_put_backgroundImage
,
2128 HTMLStyle_get_backgroundImage
,
2129 HTMLStyle_put_backgroundRepeat
,
2130 HTMLStyle_get_backgroundRepeat
,
2131 HTMLStyle_put_backgroundAttachment
,
2132 HTMLStyle_get_backgroundAttachment
,
2133 HTMLStyle_put_backgroundPosition
,
2134 HTMLStyle_get_backgroundPosition
,
2135 HTMLStyle_put_backgroundPositionX
,
2136 HTMLStyle_get_backgroundPositionX
,
2137 HTMLStyle_put_backgroundPositionY
,
2138 HTMLStyle_get_backgroundPositionY
,
2139 HTMLStyle_put_wordSpacing
,
2140 HTMLStyle_get_wordSpacing
,
2141 HTMLStyle_put_letterSpacing
,
2142 HTMLStyle_get_letterSpacing
,
2143 HTMLStyle_put_textDecoration
,
2144 HTMLStyle_get_textDecoration
,
2145 HTMLStyle_put_textDecorationNone
,
2146 HTMLStyle_get_textDecorationNone
,
2147 HTMLStyle_put_textDecorationUnderline
,
2148 HTMLStyle_get_textDecorationUnderline
,
2149 HTMLStyle_put_textDecorationOverline
,
2150 HTMLStyle_get_textDecorationOverline
,
2151 HTMLStyle_put_textDecorationLineThrough
,
2152 HTMLStyle_get_textDecorationLineThrough
,
2153 HTMLStyle_put_textDecorationBlink
,
2154 HTMLStyle_get_textDecorationBlink
,
2155 HTMLStyle_put_verticalAlign
,
2156 HTMLStyle_get_verticalAlign
,
2157 HTMLStyle_put_textTransform
,
2158 HTMLStyle_get_textTransform
,
2159 HTMLStyle_put_textAlign
,
2160 HTMLStyle_get_textAlign
,
2161 HTMLStyle_put_textIndent
,
2162 HTMLStyle_get_textIndent
,
2163 HTMLStyle_put_lineHeight
,
2164 HTMLStyle_get_lineHeight
,
2165 HTMLStyle_put_marginTop
,
2166 HTMLStyle_get_marginTop
,
2167 HTMLStyle_put_marginRight
,
2168 HTMLStyle_get_marginRight
,
2169 HTMLStyle_put_marginBottom
,
2170 HTMLStyle_get_marginBottom
,
2171 HTMLStyle_put_marginLeft
,
2172 HTMLStyle_get_marginLeft
,
2173 HTMLStyle_put_margin
,
2174 HTMLStyle_get_margin
,
2175 HTMLStyle_put_paddingTop
,
2176 HTMLStyle_get_paddingTop
,
2177 HTMLStyle_put_paddingRight
,
2178 HTMLStyle_get_paddingRight
,
2179 HTMLStyle_put_paddingBottom
,
2180 HTMLStyle_get_paddingBottom
,
2181 HTMLStyle_put_paddingLeft
,
2182 HTMLStyle_get_paddingLeft
,
2183 HTMLStyle_put_padding
,
2184 HTMLStyle_get_padding
,
2185 HTMLStyle_put_border
,
2186 HTMLStyle_get_border
,
2187 HTMLStyle_put_borderTop
,
2188 HTMLStyle_get_borderTop
,
2189 HTMLStyle_put_borderRight
,
2190 HTMLStyle_get_borderRight
,
2191 HTMLStyle_put_borderBottom
,
2192 HTMLStyle_get_borderBottom
,
2193 HTMLStyle_put_borderLeft
,
2194 HTMLStyle_get_borderLeft
,
2195 HTMLStyle_put_borderColor
,
2196 HTMLStyle_get_borderColor
,
2197 HTMLStyle_put_borderTopColor
,
2198 HTMLStyle_get_borderTopColor
,
2199 HTMLStyle_put_borderRightColor
,
2200 HTMLStyle_get_borderRightColor
,
2201 HTMLStyle_put_borderBottomColor
,
2202 HTMLStyle_get_borderBottomColor
,
2203 HTMLStyle_put_borderLeftColor
,
2204 HTMLStyle_get_borderLeftColor
,
2205 HTMLStyle_put_borderWidth
,
2206 HTMLStyle_get_borderWidth
,
2207 HTMLStyle_put_borderTopWidth
,
2208 HTMLStyle_get_borderTopWidth
,
2209 HTMLStyle_put_borderRightWidth
,
2210 HTMLStyle_get_borderRightWidth
,
2211 HTMLStyle_put_borderBottomWidth
,
2212 HTMLStyle_get_borderBottomWidth
,
2213 HTMLStyle_put_borderLeftWidth
,
2214 HTMLStyle_get_borderLeftWidth
,
2215 HTMLStyle_put_borderStyle
,
2216 HTMLStyle_get_borderStyle
,
2217 HTMLStyle_put_borderTopStyle
,
2218 HTMLStyle_get_borderTopStyle
,
2219 HTMLStyle_put_borderRightStyle
,
2220 HTMLStyle_get_borderRightStyle
,
2221 HTMLStyle_put_borderBottomStyle
,
2222 HTMLStyle_get_borderBottomStyle
,
2223 HTMLStyle_put_borderLeftStyle
,
2224 HTMLStyle_get_borderLeftStyle
,
2225 HTMLStyle_put_width
,
2226 HTMLStyle_get_width
,
2227 HTMLStyle_put_height
,
2228 HTMLStyle_get_height
,
2229 HTMLStyle_put_styleFloat
,
2230 HTMLStyle_get_styleFloat
,
2231 HTMLStyle_put_clear
,
2232 HTMLStyle_get_clear
,
2233 HTMLStyle_put_display
,
2234 HTMLStyle_get_display
,
2235 HTMLStyle_put_visibility
,
2236 HTMLStyle_get_visibility
,
2237 HTMLStyle_put_listStyleType
,
2238 HTMLStyle_get_listStyleType
,
2239 HTMLStyle_put_listStylePosition
,
2240 HTMLStyle_get_listStylePosition
,
2241 HTMLStyle_put_listStyleImage
,
2242 HTMLStyle_get_listStyleImage
,
2243 HTMLStyle_put_listStyle
,
2244 HTMLStyle_get_listStyle
,
2245 HTMLStyle_put_whiteSpace
,
2246 HTMLStyle_get_whiteSpace
,
2251 HTMLStyle_get_position
,
2252 HTMLStyle_put_zIndex
,
2253 HTMLStyle_get_zIndex
,
2254 HTMLStyle_put_overflow
,
2255 HTMLStyle_get_overflow
,
2256 HTMLStyle_put_pageBreakBefore
,
2257 HTMLStyle_get_pageBreakBefore
,
2258 HTMLStyle_put_pageBreakAfter
,
2259 HTMLStyle_get_pageBreakAfter
,
2260 HTMLStyle_put_cssText
,
2261 HTMLStyle_get_cssText
,
2262 HTMLStyle_put_pixelTop
,
2263 HTMLStyle_get_pixelTop
,
2264 HTMLStyle_put_pixelLeft
,
2265 HTMLStyle_get_pixelLeft
,
2266 HTMLStyle_put_pixelWidth
,
2267 HTMLStyle_get_pixelWidth
,
2268 HTMLStyle_put_pixelHeight
,
2269 HTMLStyle_get_pixelHeight
,
2270 HTMLStyle_put_posTop
,
2271 HTMLStyle_get_posTop
,
2272 HTMLStyle_put_posLeft
,
2273 HTMLStyle_get_posLeft
,
2274 HTMLStyle_put_posWidth
,
2275 HTMLStyle_get_posWidth
,
2276 HTMLStyle_put_posHeight
,
2277 HTMLStyle_get_posHeight
,
2278 HTMLStyle_put_cursor
,
2279 HTMLStyle_get_cursor
,
2282 HTMLStyle_put_filter
,
2283 HTMLStyle_get_filter
,
2284 HTMLStyle_setAttribute
,
2285 HTMLStyle_getAttribute
,
2286 HTMLStyle_removeAttribute
,
2290 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl
= {
2291 HTMLStyle_get_dispid
,
2295 static const tid_t HTMLStyle_iface_tids
[] = {
2300 static dispex_static_data_t HTMLStyle_dispex
= {
2301 &HTMLStyle_dispex_vtbl
,
2304 HTMLStyle_iface_tids
2307 IHTMLStyle
*HTMLStyle_Create(nsIDOMCSSStyleDeclaration
*nsstyle
)
2309 HTMLStyle
*ret
= heap_alloc_zero(sizeof(HTMLStyle
));
2311 ret
->lpHTMLStyleVtbl
= &HTMLStyleVtbl
;
2313 ret
->nsstyle
= nsstyle
;
2314 HTMLStyle2_Init(ret
);
2316 nsIDOMCSSStyleDeclaration_AddRef(nsstyle
);
2318 init_dispex(&ret
->dispex
, (IUnknown
*)HTMLSTYLE(ret
), &HTMLStyle_dispex
);
2320 return HTMLSTYLE(ret
);