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 attrFontWeight
[] =
65 {'f','o','n','t','-','w','e','i','g','h','t',0};
66 static const WCHAR attrHeight
[] =
67 {'h','e','i','g','h','t',0};
68 static const WCHAR attrLeft
[] =
70 static const WCHAR attrMargin
[] =
71 {'m','a','r','g','i','n',0};
72 static const WCHAR attrMarginLeft
[] =
73 {'m','a','r','g','i','n','-','l','e','f','t',0};
74 static const WCHAR attrMarginRight
[] =
75 {'m','a','r','g','i','n','-','r','i','g','h','t',0};
76 static const WCHAR attrOverflow
[] =
77 {'o','v','e','r','f','l','o','w',0};
78 static const WCHAR attrPaddingLeft
[] =
79 {'p','a','d','d','i','n','g','-','l','e','f','t',0};
80 static const WCHAR attrPosition
[] =
81 {'p','o','s','i','t','i','o','n',0};
82 static const WCHAR attrTextAlign
[] =
83 {'t','e','x','t','-','a','l','i','g','n',0};
84 static const WCHAR attrTextDecoration
[] =
85 {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
86 static const WCHAR attrTop
[] =
88 static const WCHAR attrVerticalAlign
[] =
89 {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
90 static const WCHAR attrVisibility
[] =
91 {'v','i','s','i','b','i','l','i','t','y',0};
92 static const WCHAR attrWidth
[] =
93 {'w','i','d','t','h',0};
94 static const WCHAR attrZIndex
[] =
95 {'z','-','i','n','d','e','x',0};
101 {attrBackground
, DISPID_IHTMLSTYLE_BACKGROUND
},
102 {attrBackgroundColor
, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR
},
103 {attrBackgroundImage
, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE
},
104 {attrBorder
, DISPID_IHTMLSTYLE_BORDER
},
105 {attrBorderLeft
, DISPID_IHTMLSTYLE_BORDERLEFT
},
106 {attrBorderWidth
, DISPID_IHTMLSTYLE_BORDERWIDTH
},
107 {attrColor
, DISPID_IHTMLSTYLE_COLOR
},
108 {attrCursor
, DISPID_IHTMLSTYLE_CURSOR
},
109 {attrDisplay
, DISPID_IHTMLSTYLE_DISPLAY
},
110 {attrFilter
, DISPID_IHTMLSTYLE_FILTER
},
111 {attrFontFamily
, DISPID_IHTMLSTYLE_FONTFAMILY
},
112 {attrFontSize
, DISPID_IHTMLSTYLE_FONTSIZE
},
113 {attrFontStyle
, DISPID_IHTMLSTYLE_FONTSTYLE
},
114 {attrFontWeight
, DISPID_IHTMLSTYLE_FONTWEIGHT
},
115 {attrHeight
, DISPID_IHTMLSTYLE_HEIGHT
},
116 {attrLeft
, DISPID_IHTMLSTYLE_LEFT
},
117 {attrMargin
, DISPID_IHTMLSTYLE_MARGIN
},
118 {attrMarginLeft
, DISPID_IHTMLSTYLE_MARGINLEFT
},
119 {attrMarginRight
, DISPID_IHTMLSTYLE_MARGINRIGHT
},
120 {attrOverflow
, DISPID_IHTMLSTYLE_OVERFLOW
},
121 {attrPaddingLeft
, DISPID_IHTMLSTYLE_PADDINGLEFT
},
122 {attrPosition
, DISPID_IHTMLSTYLE2_POSITION
},
123 {attrTextAlign
, DISPID_IHTMLSTYLE_TEXTALIGN
},
124 {attrTextDecoration
, DISPID_IHTMLSTYLE_TEXTDECORATION
},
125 {attrTop
, DISPID_IHTMLSTYLE_TOP
},
126 {attrVerticalAlign
, DISPID_IHTMLSTYLE_VERTICALALIGN
},
127 {attrVisibility
, DISPID_IHTMLSTYLE_VISIBILITY
},
128 {attrWidth
, DISPID_IHTMLSTYLE_WIDTH
},
129 {attrZIndex
, DISPID_IHTMLSTYLE_ZINDEX
}
132 static const WCHAR valLineThrough
[] =
133 {'l','i','n','e','-','t','h','r','o','u','g','h',0};
134 static const WCHAR valUnderline
[] =
135 {'u','n','d','e','r','l','i','n','e',0};
137 static const WCHAR px_formatW
[] = {'%','d','p','x',0};
138 static const WCHAR emptyW
[] = {0};
140 static LPWSTR
fix_px_value(LPCWSTR val
)
145 while(*ptr
&& isspaceW(*ptr
))
150 while(*ptr
&& isdigitW(*ptr
))
153 if(!*ptr
|| isspaceW(*ptr
)) {
155 int len
= strlenW(val
)+1;
157 ret
= heap_alloc((len
+2)*sizeof(WCHAR
));
158 memcpy(ret
, val
, (ptr
-val
)*sizeof(WCHAR
));
164 TRACE("fixed %s -> %s\n", debugstr_w(val
), debugstr_w(ret
));
169 while(*ptr
&& !isspaceW(*ptr
))
176 static LPWSTR
fix_url_value(LPCWSTR val
)
180 static const WCHAR urlW
[] = {'u','r','l','('};
182 if(strncmpW(val
, urlW
, sizeof(urlW
)/sizeof(WCHAR
)) || !strchrW(val
, '\\'))
185 ret
= heap_strdupW(val
);
187 for(ptr
= ret
; *ptr
; ptr
++) {
195 #define ATTR_FIX_PX 1
196 #define ATTR_FIX_URL 2
197 #define ATTR_STR_TO_INT 4
199 HRESULT
set_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
201 nsAString str_name
, str_value
, str_empty
;
205 static const PRUnichar wszEmpty
[] = {0};
207 if(flags
& ATTR_FIX_PX
)
208 val
= fix_px_value(value
);
209 if(flags
& ATTR_FIX_URL
)
210 val
= fix_url_value(value
);
212 nsAString_Init(&str_name
, style_tbl
[sid
].name
);
213 nsAString_Init(&str_value
, val
? val
: value
);
214 nsAString_Init(&str_empty
, wszEmpty
);
217 nsres
= nsIDOMCSSStyleDeclaration_SetProperty(nsstyle
, &str_name
, &str_value
, &str_empty
);
219 ERR("SetProperty failed: %08x\n", nsres
);
221 nsAString_Finish(&str_name
);
222 nsAString_Finish(&str_value
);
223 nsAString_Finish(&str_empty
);
228 static HRESULT
set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*value
, DWORD flags
)
230 switch(V_VT(value
)) {
232 return set_nsstyle_attr(nsstyle
, sid
, emptyW
, flags
);
235 return set_nsstyle_attr(nsstyle
, sid
, V_BSTR(value
), flags
);
238 FIXME("not implemented vt %d\n", V_VT(value
));
246 static inline HRESULT
set_style_attr(HTMLStyle
*This
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
248 return set_nsstyle_attr(This
->nsstyle
, sid
, value
, flags
);
251 static HRESULT
get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, nsAString
*value
)
256 nsAString_Init(&str_name
, style_tbl
[sid
].name
);
258 nsres
= nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle
, &str_name
, value
);
259 if(NS_FAILED(nsres
)) {
260 ERR("SetProperty failed: %08x\n", nsres
);
264 nsAString_Finish(&str_name
);
269 HRESULT
get_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, BSTR
*p
)
272 const PRUnichar
*value
;
274 nsAString_Init(&str_value
, NULL
);
276 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
278 nsAString_GetData(&str_value
, &value
);
279 *p
= *value
? SysAllocString(value
) : NULL
;
281 nsAString_Finish(&str_value
);
283 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_w(*p
));
287 static HRESULT
get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*p
, DWORD flags
)
290 const PRUnichar
*value
;
293 nsAString_Init(&str_value
, NULL
);
295 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
297 nsAString_GetData(&str_value
, &value
);
299 if(flags
& ATTR_STR_TO_INT
) {
300 const PRUnichar
*ptr
= value
;
309 while(isdigitW(*ptr
))
310 i
= i
*10 + (*ptr
++ - '0');
314 V_I4(p
) = neg
? -i
: i
;
323 str
= SysAllocString(value
);
325 return E_OUTOFMEMORY
;
332 nsAString_Finish(&str_value
);
334 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_variant(p
));
338 static inline HRESULT
get_style_attr(HTMLStyle
*This
, styleid_t sid
, BSTR
*p
)
340 return get_nsstyle_attr(This
->nsstyle
, sid
, p
);
343 static HRESULT
check_style_attr_value(HTMLStyle
*This
, styleid_t sid
, LPCWSTR exval
, VARIANT_BOOL
*p
)
346 const PRUnichar
*value
;
348 nsAString_Init(&str_value
, NULL
);
350 get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
352 nsAString_GetData(&str_value
, &value
);
353 *p
= strcmpW(value
, exval
) ? VARIANT_FALSE
: VARIANT_TRUE
;
354 nsAString_Finish(&str_value
);
356 TRACE("%s -> %x\n", debugstr_w(style_tbl
[sid
].name
), *p
);
360 static inline HRESULT
set_style_pos(HTMLStyle
*This
, styleid_t sid
, float value
)
363 WCHAR szFormat
[] = {'%','.','0','f','p','x',0};
365 value
= floor(value
);
367 sprintfW(szValue
, szFormat
, value
);
369 return set_style_attr(This
, sid
, szValue
, 0);
372 static HRESULT
get_nsstyle_pos(HTMLStyle
*This
, styleid_t sid
, float *p
)
376 WCHAR pxW
[] = {'p','x',0};
378 TRACE("%p %d %p\n", This
, sid
, p
);
382 nsAString_Init(&str_value
, NULL
);
384 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
388 const PRUnichar
*value
;
390 nsAString_GetData(&str_value
, &value
);
393 *p
= strtolW(value
, &ptr
, 10);
395 if(*ptr
&& strcmpW(ptr
, pxW
))
397 nsAString_Finish(&str_value
);
398 FIXME("only px values are currently supported\n");
404 TRACE("ret %f\n", *p
);
406 nsAString_Finish(&str_value
);
411 #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
413 static HRESULT WINAPI
HTMLStyle_QueryInterface(IHTMLStyle
*iface
, REFIID riid
, void **ppv
)
415 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
419 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
420 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
421 *ppv
= HTMLSTYLE(This
);
422 }else if(IsEqualGUID(&IID_IHTMLStyle
, riid
)) {
423 TRACE("(%p)->(IID_IHTMLStyle %p)\n", This
, ppv
);
424 *ppv
= HTMLSTYLE(This
);
425 }else if(IsEqualGUID(&IID_IHTMLStyle2
, riid
)) {
426 TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This
, ppv
);
427 *ppv
= HTMLSTYLE2(This
);
428 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
429 return *ppv
? S_OK
: E_NOINTERFACE
;
433 IUnknown_AddRef((IUnknown
*)*ppv
);
437 WARN("unsupported %s\n", debugstr_guid(riid
));
438 return E_NOINTERFACE
;
441 static ULONG WINAPI
HTMLStyle_AddRef(IHTMLStyle
*iface
)
443 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
444 LONG ref
= InterlockedIncrement(&This
->ref
);
446 TRACE("(%p) ref=%d\n", This
, ref
);
451 static ULONG WINAPI
HTMLStyle_Release(IHTMLStyle
*iface
)
453 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
454 LONG ref
= InterlockedDecrement(&This
->ref
);
456 TRACE("(%p) ref=%d\n", This
, ref
);
460 nsIDOMCSSStyleDeclaration_Release(This
->nsstyle
);
467 static HRESULT WINAPI
HTMLStyle_GetTypeInfoCount(IHTMLStyle
*iface
, UINT
*pctinfo
)
469 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
470 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This
->dispex
), pctinfo
);
473 static HRESULT WINAPI
HTMLStyle_GetTypeInfo(IHTMLStyle
*iface
, UINT iTInfo
,
474 LCID lcid
, ITypeInfo
**ppTInfo
)
476 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
477 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->dispex
), iTInfo
, lcid
, ppTInfo
);
480 static HRESULT WINAPI
HTMLStyle_GetIDsOfNames(IHTMLStyle
*iface
, REFIID riid
,
481 LPOLESTR
*rgszNames
, UINT cNames
,
482 LCID lcid
, DISPID
*rgDispId
)
484 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
485 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
488 static HRESULT WINAPI
HTMLStyle_Invoke(IHTMLStyle
*iface
, DISPID dispIdMember
,
489 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
490 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
492 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
493 return IDispatchEx_Invoke(DISPATCHEX(&This
->dispex
), dispIdMember
, riid
, lcid
,
494 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
497 static HRESULT WINAPI
HTMLStyle_put_fontFamily(IHTMLStyle
*iface
, BSTR v
)
499 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
501 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
503 return set_style_attr(This
, STYLEID_FONT_FAMILY
, v
, 0);
506 static HRESULT WINAPI
HTMLStyle_get_fontFamily(IHTMLStyle
*iface
, BSTR
*p
)
508 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
510 TRACE("(%p)->(%p)\n", This
, p
);
512 return get_style_attr(This
, STYLEID_FONT_FAMILY
, p
);
515 static HRESULT WINAPI
HTMLStyle_put_fontStyle(IHTMLStyle
*iface
, BSTR v
)
517 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
518 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
522 static HRESULT WINAPI
HTMLStyle_get_fontStyle(IHTMLStyle
*iface
, BSTR
*p
)
524 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
526 TRACE("(%p)->(%p)\n", This
, p
);
528 return get_style_attr(This
, STYLEID_FONT_STYLE
, p
);
531 static HRESULT WINAPI
HTMLStyle_put_fontVariant(IHTMLStyle
*iface
, BSTR v
)
533 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
534 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
538 static HRESULT WINAPI
HTMLStyle_get_fontVariant(IHTMLStyle
*iface
, BSTR
*p
)
540 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
541 FIXME("(%p)->(%p)\n", This
, p
);
545 static HRESULT WINAPI
HTMLStyle_put_fontWeight(IHTMLStyle
*iface
, BSTR v
)
547 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
548 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
552 static HRESULT WINAPI
HTMLStyle_get_fontWeight(IHTMLStyle
*iface
, BSTR
*p
)
554 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
556 TRACE("(%p)->(%p)\n", This
, p
);
558 return get_style_attr(This
, STYLEID_FONT_WEIGHT
, p
);
561 static HRESULT WINAPI
HTMLStyle_put_fontSize(IHTMLStyle
*iface
, VARIANT v
)
563 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
565 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
569 return set_style_attr(This
, STYLEID_FONT_SIZE
, V_BSTR(&v
), 0);
571 FIXME("not supported vt %d\n", V_VT(&v
));
577 static HRESULT WINAPI
HTMLStyle_get_fontSize(IHTMLStyle
*iface
, VARIANT
*p
)
579 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
581 TRACE("(%p)->(%p)\n", This
, p
);
584 return get_style_attr(This
, STYLEID_FONT_SIZE
, &V_BSTR(p
));
587 static HRESULT WINAPI
HTMLStyle_put_font(IHTMLStyle
*iface
, BSTR v
)
589 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
590 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
594 static HRESULT WINAPI
HTMLStyle_get_font(IHTMLStyle
*iface
, BSTR
*p
)
596 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
597 FIXME("(%p)->(%p)\n", This
, p
);
601 static HRESULT WINAPI
HTMLStyle_put_color(IHTMLStyle
*iface
, VARIANT v
)
603 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
605 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
609 TRACE("%s\n", debugstr_w(V_BSTR(&v
)));
610 return set_style_attr(This
, STYLEID_COLOR
, V_BSTR(&v
), 0);
613 FIXME("unsupported vt=%d\n", V_VT(&v
));
619 static HRESULT WINAPI
HTMLStyle_get_color(IHTMLStyle
*iface
, VARIANT
*p
)
621 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
623 TRACE("(%p)->(%p)\n", This
, p
);
626 return get_style_attr(This
, STYLEID_COLOR
, &V_BSTR(p
));
629 static HRESULT WINAPI
HTMLStyle_put_background(IHTMLStyle
*iface
, BSTR v
)
631 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
633 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
635 return set_style_attr(This
, STYLEID_BACKGROUND
, v
, 0);
638 static HRESULT WINAPI
HTMLStyle_get_background(IHTMLStyle
*iface
, BSTR
*p
)
640 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
642 TRACE("(%p)->(%p)\n", This
, p
);
644 return get_style_attr(This
, STYLEID_BACKGROUND
, p
);
647 static HRESULT WINAPI
HTMLStyle_put_backgroundColor(IHTMLStyle
*iface
, VARIANT v
)
649 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
651 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
655 return set_style_attr(This
, STYLEID_BACKGROUND_COLOR
, V_BSTR(&v
), 0);
658 static const WCHAR format
[] = {'#','%','0','6','x',0};
660 wsprintfW(value
, format
, V_I4(&v
));
661 return set_style_attr(This
, STYLEID_BACKGROUND_COLOR
, value
, 0);
664 FIXME("unsupported vt %d\n", V_VT(&v
));
670 static HRESULT WINAPI
HTMLStyle_get_backgroundColor(IHTMLStyle
*iface
, VARIANT
*p
)
672 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
673 FIXME("(%p)->(%p)\n", This
, p
);
677 static HRESULT WINAPI
HTMLStyle_put_backgroundImage(IHTMLStyle
*iface
, BSTR v
)
679 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
681 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
683 return set_style_attr(This
, STYLEID_BACKGROUND_IMAGE
, v
, ATTR_FIX_URL
);
686 static HRESULT WINAPI
HTMLStyle_get_backgroundImage(IHTMLStyle
*iface
, BSTR
*p
)
688 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
689 FIXME("(%p)->(%p)\n", This
, p
);
693 static HRESULT WINAPI
HTMLStyle_put_backgroundRepeat(IHTMLStyle
*iface
, BSTR v
)
695 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
696 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
700 static HRESULT WINAPI
HTMLStyle_get_backgroundRepeat(IHTMLStyle
*iface
, BSTR
*p
)
702 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
703 FIXME("(%p)->(%p)\n", This
, p
);
707 static HRESULT WINAPI
HTMLStyle_put_backgroundAttachment(IHTMLStyle
*iface
, BSTR v
)
709 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
710 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
714 static HRESULT WINAPI
HTMLStyle_get_backgroundAttachment(IHTMLStyle
*iface
, BSTR
*p
)
716 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
717 FIXME("(%p)->(%p)\n", This
, p
);
721 static HRESULT WINAPI
HTMLStyle_put_backgroundPosition(IHTMLStyle
*iface
, BSTR v
)
723 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
724 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
728 static HRESULT WINAPI
HTMLStyle_get_backgroundPosition(IHTMLStyle
*iface
, BSTR
*p
)
730 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
731 FIXME("(%p)->(%p)\n", This
, p
);
735 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionX(IHTMLStyle
*iface
, VARIANT v
)
737 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
738 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
742 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionX(IHTMLStyle
*iface
, VARIANT
*p
)
744 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
745 FIXME("(%p)->(%p)\n", This
, p
);
749 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionY(IHTMLStyle
*iface
, VARIANT v
)
751 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
752 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
756 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionY(IHTMLStyle
*iface
, VARIANT
*p
)
758 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
759 FIXME("(%p)->(%p)\n", This
, p
);
763 static HRESULT WINAPI
HTMLStyle_put_wordSpacing(IHTMLStyle
*iface
, VARIANT v
)
765 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
766 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
770 static HRESULT WINAPI
HTMLStyle_get_wordSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
772 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
773 FIXME("(%p)->(%p)\n", This
, p
);
777 static HRESULT WINAPI
HTMLStyle_put_letterSpacing(IHTMLStyle
*iface
, VARIANT v
)
779 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
780 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
784 static HRESULT WINAPI
HTMLStyle_get_letterSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
786 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
787 FIXME("(%p)->(%p)\n", This
, p
);
791 static HRESULT WINAPI
HTMLStyle_put_textDecoration(IHTMLStyle
*iface
, BSTR v
)
793 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
794 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
798 static HRESULT WINAPI
HTMLStyle_get_textDecoration(IHTMLStyle
*iface
, BSTR
*p
)
800 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
802 TRACE("(%p)->(%p)\n", This
, p
);
804 return get_style_attr(This
, STYLEID_TEXT_DECORATION
, p
);
807 static HRESULT WINAPI
HTMLStyle_put_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL v
)
809 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
810 FIXME("(%p)->(%x)\n", This
, v
);
814 static HRESULT WINAPI
HTMLStyle_get_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
816 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
817 FIXME("(%p)->(%p)\n", This
, p
);
821 static HRESULT WINAPI
HTMLStyle_put_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
823 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
824 FIXME("(%p)->(%x)\n", This
, v
);
828 static HRESULT WINAPI
HTMLStyle_get_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
830 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
832 TRACE("(%p)->(%p)\n", This
, p
);
834 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valUnderline
, p
);
837 static HRESULT WINAPI
HTMLStyle_put_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
839 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
840 FIXME("(%p)->(%x)\n", This
, v
);
844 static HRESULT WINAPI
HTMLStyle_get_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
846 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
847 FIXME("(%p)->(%p)\n", This
, p
);
851 static HRESULT WINAPI
HTMLStyle_put_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL v
)
853 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
854 FIXME("(%p)->(%x)\n", This
, v
);
858 static HRESULT WINAPI
HTMLStyle_get_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
860 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
862 TRACE("(%p)->(%p)\n", This
, p
);
864 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valLineThrough
, p
);
867 static HRESULT WINAPI
HTMLStyle_put_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL v
)
869 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
870 FIXME("(%p)->(%x)\n", This
, v
);
874 static HRESULT WINAPI
HTMLStyle_get_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
876 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
877 FIXME("(%p)->(%p)\n", This
, p
);
881 static HRESULT WINAPI
HTMLStyle_put_verticalAlign(IHTMLStyle
*iface
, VARIANT v
)
883 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
885 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
889 return set_style_attr(This
, STYLEID_VERTICAL_ALIGN
, V_BSTR(&v
), 0);
891 FIXME("not implemented vt %d\n", V_VT(&v
));
898 static HRESULT WINAPI
HTMLStyle_get_verticalAlign(IHTMLStyle
*iface
, VARIANT
*p
)
900 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
904 TRACE("(%p)->(%p)\n", This
, p
);
906 hres
= get_style_attr(This
, STYLEID_VERTICAL_ALIGN
, &ret
);
915 static HRESULT WINAPI
HTMLStyle_put_textTransform(IHTMLStyle
*iface
, BSTR v
)
917 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
918 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
922 static HRESULT WINAPI
HTMLStyle_get_textTransform(IHTMLStyle
*iface
, BSTR
*p
)
924 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
925 FIXME("(%p)->(%p)\n", This
, p
);
929 static HRESULT WINAPI
HTMLStyle_put_textAlign(IHTMLStyle
*iface
, BSTR v
)
931 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
933 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
935 return set_style_attr(This
, STYLEID_TEXT_ALIGN
, v
, 0);
938 static HRESULT WINAPI
HTMLStyle_get_textAlign(IHTMLStyle
*iface
, BSTR
*p
)
940 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
942 TRACE("(%p)->(%p)\n", This
, p
);
944 return get_style_attr(This
, STYLEID_TEXT_ALIGN
, p
);
947 static HRESULT WINAPI
HTMLStyle_put_textIndent(IHTMLStyle
*iface
, VARIANT v
)
949 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
950 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
954 static HRESULT WINAPI
HTMLStyle_get_textIndent(IHTMLStyle
*iface
, VARIANT
*p
)
956 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
957 FIXME("(%p)->(%p)\n", This
, p
);
961 static HRESULT WINAPI
HTMLStyle_put_lineHeight(IHTMLStyle
*iface
, VARIANT v
)
963 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
964 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
968 static HRESULT WINAPI
HTMLStyle_get_lineHeight(IHTMLStyle
*iface
, VARIANT
*p
)
970 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
971 FIXME("(%p)->(%p)\n", This
, p
);
975 static HRESULT WINAPI
HTMLStyle_put_marginTop(IHTMLStyle
*iface
, VARIANT v
)
977 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
978 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
982 static HRESULT WINAPI
HTMLStyle_get_marginTop(IHTMLStyle
*iface
, VARIANT
*p
)
984 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
985 FIXME("(%p)->(%p)\n", This
, p
);
989 static HRESULT WINAPI
HTMLStyle_put_marginRight(IHTMLStyle
*iface
, VARIANT v
)
991 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
993 TRACE("(%p)->(v(%d))\n", This
, V_VT(&v
));
997 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, emptyW
, 0);
1001 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1002 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, buf
, 0);
1005 return set_style_attr(This
, STYLEID_MARGIN_RIGHT
, V_BSTR(&v
), 0);
1007 FIXME("Unsupported vt=%d\n", V_VT(&v
));
1013 static HRESULT WINAPI
HTMLStyle_get_marginRight(IHTMLStyle
*iface
, VARIANT
*p
)
1015 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1016 FIXME("(%p)->(%p)\n", This
, p
);
1020 static HRESULT WINAPI
HTMLStyle_put_marginBottom(IHTMLStyle
*iface
, VARIANT v
)
1022 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1023 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1027 static HRESULT WINAPI
HTMLStyle_get_marginBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1029 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1030 FIXME("(%p)->(%p)\n", This
, p
);
1034 static HRESULT WINAPI
HTMLStyle_put_marginLeft(IHTMLStyle
*iface
, VARIANT v
)
1036 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1040 TRACE("(%p)->(NULL)\n", This
);
1041 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, emptyW
, 0);
1045 TRACE("(%p)->(%d)\n", This
, V_I4(&v
));
1047 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1048 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, buf
, 0);
1051 TRACE("(%p)->(%s)\n", This
, debugstr_w(V_BSTR(&v
)));
1052 return set_style_attr(This
, STYLEID_MARGIN_LEFT
, V_BSTR(&v
), 0);
1054 FIXME("Unsupported vt=%d\n", V_VT(&v
));
1060 static HRESULT WINAPI
HTMLStyle_put_margin(IHTMLStyle
*iface
, BSTR v
)
1062 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1064 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1066 return set_style_attr(This
, STYLEID_MARGIN
, v
, 0);
1069 static HRESULT WINAPI
HTMLStyle_get_margin(IHTMLStyle
*iface
, BSTR
*p
)
1071 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1073 TRACE("(%p)->(%p)\n", This
, p
);
1075 return get_style_attr(This
, STYLEID_MARGIN
, p
);
1078 static HRESULT WINAPI
HTMLStyle_get_marginLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1080 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1081 FIXME("(%p)->(%p)\n", This
, p
);
1085 static HRESULT WINAPI
HTMLStyle_put_paddingTop(IHTMLStyle
*iface
, VARIANT v
)
1087 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1088 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1092 static HRESULT WINAPI
HTMLStyle_get_paddingTop(IHTMLStyle
*iface
, VARIANT
*p
)
1094 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1095 FIXME("(%p)->(%p)\n", This
, p
);
1099 static HRESULT WINAPI
HTMLStyle_put_paddingRight(IHTMLStyle
*iface
, VARIANT v
)
1101 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1102 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1106 static HRESULT WINAPI
HTMLStyle_get_paddingRight(IHTMLStyle
*iface
, VARIANT
*p
)
1108 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1109 FIXME("(%p)->(%p)\n", This
, p
);
1113 static HRESULT WINAPI
HTMLStyle_put_paddingBottom(IHTMLStyle
*iface
, VARIANT v
)
1115 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1116 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1120 static HRESULT WINAPI
HTMLStyle_get_paddingBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1122 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1123 FIXME("(%p)->(%p)\n", This
, p
);
1127 static HRESULT WINAPI
HTMLStyle_put_paddingLeft(IHTMLStyle
*iface
, VARIANT v
)
1129 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1131 TRACE("(%p)->(vt=%d)\n", This
, V_VT(&v
));
1137 wsprintfW(buf
, px_formatW
, V_I4(&v
));
1138 return set_style_attr(This
, STYLEID_PADDING_LEFT
, buf
, 0);
1141 return set_style_attr(This
, STYLEID_PADDING_LEFT
, V_BSTR(&v
), 0);
1143 FIXME("unsupported vt=%d\n", V_VT(&v
));
1149 static HRESULT WINAPI
HTMLStyle_get_paddingLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1151 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1152 FIXME("(%p)->(%p)\n", This
, p
);
1156 static HRESULT WINAPI
HTMLStyle_put_padding(IHTMLStyle
*iface
, BSTR v
)
1158 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1159 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1163 static HRESULT WINAPI
HTMLStyle_get_padding(IHTMLStyle
*iface
, BSTR
*p
)
1165 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1166 FIXME("(%p)->(%p)\n", This
, p
);
1170 static HRESULT WINAPI
HTMLStyle_put_border(IHTMLStyle
*iface
, BSTR v
)
1172 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1174 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1176 return set_style_attr(This
, STYLEID_BORDER
, v
, 0);
1179 static HRESULT WINAPI
HTMLStyle_get_border(IHTMLStyle
*iface
, BSTR
*p
)
1181 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1183 TRACE("(%p)->(%p)\n", This
, p
);
1185 return get_style_attr(This
, STYLEID_BORDER
, p
);
1188 static HRESULT WINAPI
HTMLStyle_put_borderTop(IHTMLStyle
*iface
, BSTR v
)
1190 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1191 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1195 static HRESULT WINAPI
HTMLStyle_get_borderTop(IHTMLStyle
*iface
, BSTR
*p
)
1197 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1198 FIXME("(%p)->(%p)\n", This
, p
);
1202 static HRESULT WINAPI
HTMLStyle_put_borderRight(IHTMLStyle
*iface
, BSTR v
)
1204 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1205 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1209 static HRESULT WINAPI
HTMLStyle_get_borderRight(IHTMLStyle
*iface
, BSTR
*p
)
1211 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1212 FIXME("(%p)->(%p)\n", This
, p
);
1216 static HRESULT WINAPI
HTMLStyle_put_borderBottom(IHTMLStyle
*iface
, BSTR v
)
1218 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1219 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1223 static HRESULT WINAPI
HTMLStyle_get_borderBottom(IHTMLStyle
*iface
, BSTR
*p
)
1225 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1226 FIXME("(%p)->(%p)\n", This
, p
);
1230 static HRESULT WINAPI
HTMLStyle_put_borderLeft(IHTMLStyle
*iface
, BSTR v
)
1232 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1234 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1236 return set_style_attr(This
, STYLEID_BORDER_LEFT
, v
, ATTR_FIX_PX
);
1239 static HRESULT WINAPI
HTMLStyle_get_borderLeft(IHTMLStyle
*iface
, BSTR
*p
)
1241 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1242 FIXME("(%p)->(%p)\n", This
, p
);
1246 static HRESULT WINAPI
HTMLStyle_put_borderColor(IHTMLStyle
*iface
, BSTR v
)
1248 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1249 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1253 static HRESULT WINAPI
HTMLStyle_get_borderColor(IHTMLStyle
*iface
, BSTR
*p
)
1255 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1256 FIXME("(%p)->(%p)\n", This
, p
);
1260 static HRESULT WINAPI
HTMLStyle_put_borderTopColor(IHTMLStyle
*iface
, VARIANT v
)
1262 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1263 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1267 static HRESULT WINAPI
HTMLStyle_get_borderTopColor(IHTMLStyle
*iface
, VARIANT
*p
)
1269 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1270 FIXME("(%p)->(%p)\n", This
, p
);
1274 static HRESULT WINAPI
HTMLStyle_put_borderRightColor(IHTMLStyle
*iface
, VARIANT v
)
1276 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1277 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1281 static HRESULT WINAPI
HTMLStyle_get_borderRightColor(IHTMLStyle
*iface
, VARIANT
*p
)
1283 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1284 FIXME("(%p)->(%p)\n", This
, p
);
1288 static HRESULT WINAPI
HTMLStyle_put_borderBottomColor(IHTMLStyle
*iface
, VARIANT v
)
1290 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1291 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1295 static HRESULT WINAPI
HTMLStyle_get_borderBottomColor(IHTMLStyle
*iface
, VARIANT
*p
)
1297 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1298 FIXME("(%p)->(%p)\n", This
, p
);
1302 static HRESULT WINAPI
HTMLStyle_put_borderLeftColor(IHTMLStyle
*iface
, VARIANT v
)
1304 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1305 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1309 static HRESULT WINAPI
HTMLStyle_get_borderLeftColor(IHTMLStyle
*iface
, VARIANT
*p
)
1311 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1312 FIXME("(%p)->(%p)\n", This
, p
);
1316 static HRESULT WINAPI
HTMLStyle_put_borderWidth(IHTMLStyle
*iface
, BSTR v
)
1318 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1319 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1320 return set_style_attr(This
, STYLEID_BORDER_WIDTH
, v
, ATTR_FIX_PX
);
1323 static HRESULT WINAPI
HTMLStyle_get_borderWidth(IHTMLStyle
*iface
, BSTR
*p
)
1325 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1326 TRACE("(%p)->(%p)\n", This
, p
);
1327 return get_style_attr(This
, STYLEID_BORDER_WIDTH
, p
);
1330 static HRESULT WINAPI
HTMLStyle_put_borderTopWidth(IHTMLStyle
*iface
, VARIANT v
)
1332 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1333 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1337 static HRESULT WINAPI
HTMLStyle_get_borderTopWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1339 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1340 FIXME("(%p)->(%p)\n", This
, p
);
1344 static HRESULT WINAPI
HTMLStyle_put_borderRightWidth(IHTMLStyle
*iface
, VARIANT v
)
1346 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1347 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1351 static HRESULT WINAPI
HTMLStyle_get_borderRightWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1353 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1354 FIXME("(%p)->(%p)\n", This
, p
);
1358 static HRESULT WINAPI
HTMLStyle_put_borderBottomWidth(IHTMLStyle
*iface
, VARIANT v
)
1360 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1361 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1365 static HRESULT WINAPI
HTMLStyle_get_borderBottomWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1367 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1368 FIXME("(%p)->(%p)\n", This
, p
);
1372 static HRESULT WINAPI
HTMLStyle_put_borderLeftWidth(IHTMLStyle
*iface
, VARIANT v
)
1374 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1375 FIXME("(%p)->(v%d)\n", This
, V_VT(&v
));
1379 static HRESULT WINAPI
HTMLStyle_get_borderLeftWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1381 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1382 FIXME("(%p)->(%p)\n", This
, p
);
1386 static HRESULT WINAPI
HTMLStyle_put_borderStyle(IHTMLStyle
*iface
, BSTR v
)
1388 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1389 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1393 static HRESULT WINAPI
HTMLStyle_get_borderStyle(IHTMLStyle
*iface
, BSTR
*p
)
1395 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1396 FIXME("(%p)->(%p)\n", This
, p
);
1400 static HRESULT WINAPI
HTMLStyle_put_borderTopStyle(IHTMLStyle
*iface
, BSTR v
)
1402 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1403 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1407 static HRESULT WINAPI
HTMLStyle_get_borderTopStyle(IHTMLStyle
*iface
, BSTR
*p
)
1409 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1410 FIXME("(%p)->(%p)\n", This
, p
);
1414 static HRESULT WINAPI
HTMLStyle_put_borderRightStyle(IHTMLStyle
*iface
, BSTR v
)
1416 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1417 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1421 static HRESULT WINAPI
HTMLStyle_get_borderRightStyle(IHTMLStyle
*iface
, BSTR
*p
)
1423 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1424 FIXME("(%p)->(%p)\n", This
, p
);
1428 static HRESULT WINAPI
HTMLStyle_put_borderBottomStyle(IHTMLStyle
*iface
, BSTR v
)
1430 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1431 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1435 static HRESULT WINAPI
HTMLStyle_get_borderBottomStyle(IHTMLStyle
*iface
, BSTR
*p
)
1437 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1438 FIXME("(%p)->(%p)\n", This
, p
);
1442 static HRESULT WINAPI
HTMLStyle_put_borderLeftStyle(IHTMLStyle
*iface
, BSTR v
)
1444 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1445 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1449 static HRESULT WINAPI
HTMLStyle_get_borderLeftStyle(IHTMLStyle
*iface
, BSTR
*p
)
1451 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1452 FIXME("(%p)->(%p)\n", This
, p
);
1456 static HRESULT WINAPI
HTMLStyle_put_width(IHTMLStyle
*iface
, VARIANT v
)
1458 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1460 TRACE("(%p)->(v%d)\n", This
, V_VT(&v
));
1464 TRACE("%s\n", debugstr_w(V_BSTR(&v
)));
1465 return set_style_attr(This
, STYLEID_WIDTH
, V_BSTR(&v
), 0);
1467 FIXME("unsupported vt %d\n", V_VT(&v
));
1473 static HRESULT WINAPI
HTMLStyle_get_width(IHTMLStyle
*iface
, VARIANT
*p
)
1475 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1477 TRACE("(%p)->(%p)\n", This
, p
);
1480 return get_style_attr(This
, STYLEID_WIDTH
, &V_BSTR(p
));
1483 static HRESULT WINAPI
HTMLStyle_put_height(IHTMLStyle
*iface
, VARIANT v
)
1485 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1487 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1491 return set_style_attr(This
, STYLEID_HEIGHT
, V_BSTR(&v
), 0);
1493 FIXME("unimplemented vt %d\n", V_VT(&v
));
1500 static HRESULT WINAPI
HTMLStyle_get_height(IHTMLStyle
*iface
, VARIANT
*p
)
1502 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1506 TRACE("(%p)->(%p)\n", This
, p
);
1508 hres
= get_style_attr(This
, STYLEID_HEIGHT
, &ret
);
1517 static HRESULT WINAPI
HTMLStyle_put_styleFloat(IHTMLStyle
*iface
, BSTR v
)
1519 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1520 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1524 static HRESULT WINAPI
HTMLStyle_get_styleFloat(IHTMLStyle
*iface
, BSTR
*p
)
1526 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1527 FIXME("(%p)->(%p)\n", This
, p
);
1531 static HRESULT WINAPI
HTMLStyle_put_clear(IHTMLStyle
*iface
, BSTR v
)
1533 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1534 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1538 static HRESULT WINAPI
HTMLStyle_get_clear(IHTMLStyle
*iface
, BSTR
*p
)
1540 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1541 FIXME("(%p)->(%p)\n", This
, p
);
1545 static HRESULT WINAPI
HTMLStyle_put_display(IHTMLStyle
*iface
, BSTR v
)
1547 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1549 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1551 return set_style_attr(This
, STYLEID_DISPLAY
, v
, 0);
1554 static HRESULT WINAPI
HTMLStyle_get_display(IHTMLStyle
*iface
, BSTR
*p
)
1556 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1558 TRACE("(%p)->(%p)\n", This
, p
);
1560 return get_style_attr(This
, STYLEID_DISPLAY
, p
);
1563 static HRESULT WINAPI
HTMLStyle_put_visibility(IHTMLStyle
*iface
, BSTR v
)
1565 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1567 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1569 return set_style_attr(This
, STYLEID_VISIBILITY
, v
, 0);
1572 static HRESULT WINAPI
HTMLStyle_get_visibility(IHTMLStyle
*iface
, BSTR
*p
)
1574 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1576 TRACE("(%p)->(%p)\n", This
, p
);
1578 return get_style_attr(This
, STYLEID_VISIBILITY
, p
);
1581 static HRESULT WINAPI
HTMLStyle_put_listStyleType(IHTMLStyle
*iface
, BSTR v
)
1583 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1584 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1588 static HRESULT WINAPI
HTMLStyle_get_listStyleType(IHTMLStyle
*iface
, BSTR
*p
)
1590 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1591 FIXME("(%p)->(%p)\n", This
, p
);
1595 static HRESULT WINAPI
HTMLStyle_put_listStylePosition(IHTMLStyle
*iface
, BSTR v
)
1597 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1598 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1602 static HRESULT WINAPI
HTMLStyle_get_listStylePosition(IHTMLStyle
*iface
, BSTR
*p
)
1604 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1605 FIXME("(%p)->(%p)\n", This
, p
);
1609 static HRESULT WINAPI
HTMLStyle_put_listStyleImage(IHTMLStyle
*iface
, BSTR v
)
1611 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1612 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1616 static HRESULT WINAPI
HTMLStyle_get_listStyleImage(IHTMLStyle
*iface
, BSTR
*p
)
1618 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1619 FIXME("(%p)->(%p)\n", This
, p
);
1623 static HRESULT WINAPI
HTMLStyle_put_listStyle(IHTMLStyle
*iface
, BSTR v
)
1625 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1626 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1630 static HRESULT WINAPI
HTMLStyle_get_listStyle(IHTMLStyle
*iface
, BSTR
*p
)
1632 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1633 FIXME("(%p)->(%p)\n", This
, p
);
1637 static HRESULT WINAPI
HTMLStyle_put_whiteSpace(IHTMLStyle
*iface
, BSTR v
)
1639 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1640 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1644 static HRESULT WINAPI
HTMLStyle_get_whiteSpace(IHTMLStyle
*iface
, BSTR
*p
)
1646 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1647 FIXME("(%p)->(%p)\n", This
, p
);
1651 static HRESULT WINAPI
HTMLStyle_put_top(IHTMLStyle
*iface
, VARIANT v
)
1653 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1655 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1657 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_TOP
, &v
, 0);
1660 static HRESULT WINAPI
HTMLStyle_get_top(IHTMLStyle
*iface
, VARIANT
*p
)
1662 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1666 TRACE("(%p)->(%p)\n", This
, p
);
1668 hres
= get_style_attr(This
, STYLEID_TOP
, &ret
);
1677 static HRESULT WINAPI
HTMLStyle_put_left(IHTMLStyle
*iface
, VARIANT v
)
1679 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1681 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1683 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_LEFT
, &v
, 0);
1686 static HRESULT WINAPI
HTMLStyle_get_left(IHTMLStyle
*iface
, VARIANT
*p
)
1688 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1692 TRACE("(%p)->(%p)\n", This
, p
);
1694 hres
= get_style_attr(This
, STYLEID_LEFT
, &ret
);
1703 static HRESULT WINAPI
HTMLStyle_get_position(IHTMLStyle
*iface
, BSTR
*p
)
1705 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1706 FIXME("(%p)->(%p)\n", This
, p
);
1710 static HRESULT WINAPI
HTMLStyle_put_zIndex(IHTMLStyle
*iface
, VARIANT v
)
1712 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1714 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1718 return set_style_attr(This
, STYLEID_Z_INDEX
, V_BSTR(&v
), 0);
1720 FIXME("unimplemented vt %d\n", V_VT(&v
));
1727 static HRESULT WINAPI
HTMLStyle_get_zIndex(IHTMLStyle
*iface
, VARIANT
*p
)
1729 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1731 TRACE("(%p)->(%p)\n", This
, p
);
1733 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_Z_INDEX
, p
, ATTR_STR_TO_INT
);
1736 static HRESULT WINAPI
HTMLStyle_put_overflow(IHTMLStyle
*iface
, BSTR v
)
1738 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1739 static const WCHAR szVisible
[] = {'v','i','s','i','b','l','e',0};
1740 static const WCHAR szScroll
[] = {'s','c','r','o','l','l',0};
1741 static const WCHAR szHidden
[] = {'h','i','d','d','e','n',0};
1742 static const WCHAR szAuto
[] = {'a','u','t','o',0};
1744 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1746 /* overflow can only be one of the follow values. */
1747 if(!v
|| strcmpiW(szVisible
, v
) == 0 || strcmpiW(szScroll
, v
) == 0 ||
1748 strcmpiW(szHidden
, v
) == 0 || strcmpiW(szAuto
, v
) == 0)
1750 return set_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW
, v
, 0);
1753 return E_INVALIDARG
;
1757 static HRESULT WINAPI
HTMLStyle_get_overflow(IHTMLStyle
*iface
, BSTR
*p
)
1759 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1761 TRACE("(%p)->(%p)\n", This
, p
);
1764 return E_INVALIDARG
;
1766 return get_style_attr(This
, STYLEID_OVERFLOW
, p
);
1769 static HRESULT WINAPI
HTMLStyle_put_pageBreakBefore(IHTMLStyle
*iface
, BSTR v
)
1771 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1772 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1776 static HRESULT WINAPI
HTMLStyle_get_pageBreakBefore(IHTMLStyle
*iface
, BSTR
*p
)
1778 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1779 FIXME("(%p)->(%p)\n", This
, p
);
1783 static HRESULT WINAPI
HTMLStyle_put_pageBreakAfter(IHTMLStyle
*iface
, BSTR v
)
1785 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1786 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1790 static HRESULT WINAPI
HTMLStyle_get_pageBreakAfter(IHTMLStyle
*iface
, BSTR
*p
)
1792 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1793 FIXME("(%p)->(%p)\n", This
, p
);
1797 static HRESULT WINAPI
HTMLStyle_put_cssText(IHTMLStyle
*iface
, BSTR v
)
1799 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1800 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1804 static HRESULT WINAPI
HTMLStyle_get_cssText(IHTMLStyle
*iface
, BSTR
*p
)
1806 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1807 FIXME("(%p)->(%p)\n", This
, p
);
1811 static HRESULT WINAPI
HTMLStyle_put_pixelTop(IHTMLStyle
*iface
, long v
)
1813 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1814 FIXME("(%p)->()\n", This
);
1818 static HRESULT WINAPI
HTMLStyle_get_pixelTop(IHTMLStyle
*iface
, long *p
)
1820 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1821 FIXME("(%p)->()\n", This
);
1825 static HRESULT WINAPI
HTMLStyle_put_pixelLeft(IHTMLStyle
*iface
, long v
)
1827 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1828 FIXME("(%p)->()\n", This
);
1832 static HRESULT WINAPI
HTMLStyle_get_pixelLeft(IHTMLStyle
*iface
, long *p
)
1834 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1835 FIXME("(%p)->()\n", This
);
1839 static HRESULT WINAPI
HTMLStyle_put_pixelWidth(IHTMLStyle
*iface
, long v
)
1841 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1842 FIXME("(%p)->()\n", This
);
1846 static HRESULT WINAPI
HTMLStyle_get_pixelWidth(IHTMLStyle
*iface
, long *p
)
1848 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1849 FIXME("(%p)->()\n", This
);
1853 static HRESULT WINAPI
HTMLStyle_put_pixelHeight(IHTMLStyle
*iface
, long v
)
1855 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1856 FIXME("(%p)->()\n", This
);
1860 static HRESULT WINAPI
HTMLStyle_get_pixelHeight(IHTMLStyle
*iface
, long *p
)
1862 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1863 FIXME("(%p)->()\n", This
);
1867 static HRESULT WINAPI
HTMLStyle_put_posTop(IHTMLStyle
*iface
, float v
)
1869 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1871 TRACE("(%p)->(%f)\n", This
, v
);
1873 return set_style_pos(This
, STYLEID_TOP
, v
);
1876 static HRESULT WINAPI
HTMLStyle_get_posTop(IHTMLStyle
*iface
, float *p
)
1878 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1880 TRACE("(%p)->(%p)\n", This
, p
);
1885 return get_nsstyle_pos(This
, STYLEID_TOP
, p
);
1888 static HRESULT WINAPI
HTMLStyle_put_posLeft(IHTMLStyle
*iface
, float v
)
1890 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1892 TRACE("(%p)->(%f)\n", This
, v
);
1894 return set_style_pos(This
, STYLEID_LEFT
, v
);
1897 static HRESULT WINAPI
HTMLStyle_get_posLeft(IHTMLStyle
*iface
, float *p
)
1899 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1901 TRACE("(%p)->(%p)\n", This
, p
);
1906 return get_nsstyle_pos(This
, STYLEID_LEFT
, p
);
1909 static HRESULT WINAPI
HTMLStyle_put_posWidth(IHTMLStyle
*iface
, float v
)
1911 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1912 FIXME("(%p)->()\n", This
);
1916 static HRESULT WINAPI
HTMLStyle_get_posWidth(IHTMLStyle
*iface
, float *p
)
1918 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1919 FIXME("(%p)->()\n", This
);
1923 static HRESULT WINAPI
HTMLStyle_put_posHeight(IHTMLStyle
*iface
, float v
)
1925 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1926 FIXME("(%p)->()\n", This
);
1930 static HRESULT WINAPI
HTMLStyle_get_posHeight(IHTMLStyle
*iface
, float *p
)
1932 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1933 FIXME("(%p)->()\n", This
);
1937 static HRESULT WINAPI
HTMLStyle_put_cursor(IHTMLStyle
*iface
, BSTR v
)
1939 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1941 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1943 return set_style_attr(This
, STYLEID_CURSOR
, v
, 0);
1946 static HRESULT WINAPI
HTMLStyle_get_cursor(IHTMLStyle
*iface
, BSTR
*p
)
1948 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1950 TRACE("(%p)->(%p)\n", This
, p
);
1952 return get_style_attr(This
, STYLEID_CURSOR
, p
);
1955 static HRESULT WINAPI
HTMLStyle_put_clip(IHTMLStyle
*iface
, BSTR v
)
1957 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1958 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1962 static HRESULT WINAPI
HTMLStyle_get_clip(IHTMLStyle
*iface
, BSTR
*p
)
1964 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1965 FIXME("(%p)->(%p)\n", This
, p
);
1969 static HRESULT WINAPI
HTMLStyle_put_filter(IHTMLStyle
*iface
, BSTR v
)
1971 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1973 WARN("(%p)->(%s)\n", This
, debugstr_w(v
));
1975 /* FIXME: Handle MS-style filters */
1976 return set_style_attr(This
, STYLEID_FILTER
, v
, 0);
1979 static HRESULT WINAPI
HTMLStyle_get_filter(IHTMLStyle
*iface
, BSTR
*p
)
1981 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1983 WARN("(%p)->(%p)\n", This
, p
);
1985 /* FIXME: Handle MS-style filters */
1986 return get_style_attr(This
, STYLEID_FILTER
, p
);
1989 static HRESULT WINAPI
HTMLStyle_setAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
1990 VARIANT AttributeValue
, LONG lFlags
)
1992 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
1993 FIXME("(%p)->(%s v%d %08x)\n", This
, debugstr_w(strAttributeName
),
1994 V_VT(&AttributeValue
), lFlags
);
1998 static HRESULT WINAPI
HTMLStyle_getAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
1999 LONG lFlags
, VARIANT
*AttributeValue
)
2001 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2002 FIXME("(%p)->(%s %08x %p)\n", This
, debugstr_w(strAttributeName
),
2003 lFlags
, AttributeValue
);
2007 static HRESULT WINAPI
HTMLStyle_removeAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2008 LONG lFlags
, VARIANT_BOOL
*pfSuccess
)
2010 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2011 FIXME("(%p)->(%s %08x %p)\n", This
, debugstr_w(strAttributeName
),
2016 static HRESULT WINAPI
HTMLStyle_toString(IHTMLStyle
*iface
, BSTR
*String
)
2018 HTMLStyle
*This
= HTMLSTYLE_THIS(iface
);
2019 FIXME("(%p)->(%p)\n", This
, String
);
2023 static HRESULT
HTMLStyle_get_dispid(IUnknown
*iface
, BSTR name
, DWORD flags
, DISPID
*dispid
)
2025 int c
, i
, min
=0, max
= sizeof(style_tbl
)/sizeof(*style_tbl
)-1;
2030 c
= strcmpW(style_tbl
[i
].name
, name
);
2032 *dispid
= style_tbl
[i
].dispid
;
2042 return DISP_E_UNKNOWNNAME
;
2045 static const IHTMLStyleVtbl HTMLStyleVtbl
= {
2046 HTMLStyle_QueryInterface
,
2049 HTMLStyle_GetTypeInfoCount
,
2050 HTMLStyle_GetTypeInfo
,
2051 HTMLStyle_GetIDsOfNames
,
2053 HTMLStyle_put_fontFamily
,
2054 HTMLStyle_get_fontFamily
,
2055 HTMLStyle_put_fontStyle
,
2056 HTMLStyle_get_fontStyle
,
2057 HTMLStyle_put_fontVariant
,
2058 HTMLStyle_get_fontVariant
,
2059 HTMLStyle_put_fontWeight
,
2060 HTMLStyle_get_fontWeight
,
2061 HTMLStyle_put_fontSize
,
2062 HTMLStyle_get_fontSize
,
2065 HTMLStyle_put_color
,
2066 HTMLStyle_get_color
,
2067 HTMLStyle_put_background
,
2068 HTMLStyle_get_background
,
2069 HTMLStyle_put_backgroundColor
,
2070 HTMLStyle_get_backgroundColor
,
2071 HTMLStyle_put_backgroundImage
,
2072 HTMLStyle_get_backgroundImage
,
2073 HTMLStyle_put_backgroundRepeat
,
2074 HTMLStyle_get_backgroundRepeat
,
2075 HTMLStyle_put_backgroundAttachment
,
2076 HTMLStyle_get_backgroundAttachment
,
2077 HTMLStyle_put_backgroundPosition
,
2078 HTMLStyle_get_backgroundPosition
,
2079 HTMLStyle_put_backgroundPositionX
,
2080 HTMLStyle_get_backgroundPositionX
,
2081 HTMLStyle_put_backgroundPositionY
,
2082 HTMLStyle_get_backgroundPositionY
,
2083 HTMLStyle_put_wordSpacing
,
2084 HTMLStyle_get_wordSpacing
,
2085 HTMLStyle_put_letterSpacing
,
2086 HTMLStyle_get_letterSpacing
,
2087 HTMLStyle_put_textDecoration
,
2088 HTMLStyle_get_textDecoration
,
2089 HTMLStyle_put_textDecorationNone
,
2090 HTMLStyle_get_textDecorationNone
,
2091 HTMLStyle_put_textDecorationUnderline
,
2092 HTMLStyle_get_textDecorationUnderline
,
2093 HTMLStyle_put_textDecorationOverline
,
2094 HTMLStyle_get_textDecorationOverline
,
2095 HTMLStyle_put_textDecorationLineThrough
,
2096 HTMLStyle_get_textDecorationLineThrough
,
2097 HTMLStyle_put_textDecorationBlink
,
2098 HTMLStyle_get_textDecorationBlink
,
2099 HTMLStyle_put_verticalAlign
,
2100 HTMLStyle_get_verticalAlign
,
2101 HTMLStyle_put_textTransform
,
2102 HTMLStyle_get_textTransform
,
2103 HTMLStyle_put_textAlign
,
2104 HTMLStyle_get_textAlign
,
2105 HTMLStyle_put_textIndent
,
2106 HTMLStyle_get_textIndent
,
2107 HTMLStyle_put_lineHeight
,
2108 HTMLStyle_get_lineHeight
,
2109 HTMLStyle_put_marginTop
,
2110 HTMLStyle_get_marginTop
,
2111 HTMLStyle_put_marginRight
,
2112 HTMLStyle_get_marginRight
,
2113 HTMLStyle_put_marginBottom
,
2114 HTMLStyle_get_marginBottom
,
2115 HTMLStyle_put_marginLeft
,
2116 HTMLStyle_get_marginLeft
,
2117 HTMLStyle_put_margin
,
2118 HTMLStyle_get_margin
,
2119 HTMLStyle_put_paddingTop
,
2120 HTMLStyle_get_paddingTop
,
2121 HTMLStyle_put_paddingRight
,
2122 HTMLStyle_get_paddingRight
,
2123 HTMLStyle_put_paddingBottom
,
2124 HTMLStyle_get_paddingBottom
,
2125 HTMLStyle_put_paddingLeft
,
2126 HTMLStyle_get_paddingLeft
,
2127 HTMLStyle_put_padding
,
2128 HTMLStyle_get_padding
,
2129 HTMLStyle_put_border
,
2130 HTMLStyle_get_border
,
2131 HTMLStyle_put_borderTop
,
2132 HTMLStyle_get_borderTop
,
2133 HTMLStyle_put_borderRight
,
2134 HTMLStyle_get_borderRight
,
2135 HTMLStyle_put_borderBottom
,
2136 HTMLStyle_get_borderBottom
,
2137 HTMLStyle_put_borderLeft
,
2138 HTMLStyle_get_borderLeft
,
2139 HTMLStyle_put_borderColor
,
2140 HTMLStyle_get_borderColor
,
2141 HTMLStyle_put_borderTopColor
,
2142 HTMLStyle_get_borderTopColor
,
2143 HTMLStyle_put_borderRightColor
,
2144 HTMLStyle_get_borderRightColor
,
2145 HTMLStyle_put_borderBottomColor
,
2146 HTMLStyle_get_borderBottomColor
,
2147 HTMLStyle_put_borderLeftColor
,
2148 HTMLStyle_get_borderLeftColor
,
2149 HTMLStyle_put_borderWidth
,
2150 HTMLStyle_get_borderWidth
,
2151 HTMLStyle_put_borderTopWidth
,
2152 HTMLStyle_get_borderTopWidth
,
2153 HTMLStyle_put_borderRightWidth
,
2154 HTMLStyle_get_borderRightWidth
,
2155 HTMLStyle_put_borderBottomWidth
,
2156 HTMLStyle_get_borderBottomWidth
,
2157 HTMLStyle_put_borderLeftWidth
,
2158 HTMLStyle_get_borderLeftWidth
,
2159 HTMLStyle_put_borderStyle
,
2160 HTMLStyle_get_borderStyle
,
2161 HTMLStyle_put_borderTopStyle
,
2162 HTMLStyle_get_borderTopStyle
,
2163 HTMLStyle_put_borderRightStyle
,
2164 HTMLStyle_get_borderRightStyle
,
2165 HTMLStyle_put_borderBottomStyle
,
2166 HTMLStyle_get_borderBottomStyle
,
2167 HTMLStyle_put_borderLeftStyle
,
2168 HTMLStyle_get_borderLeftStyle
,
2169 HTMLStyle_put_width
,
2170 HTMLStyle_get_width
,
2171 HTMLStyle_put_height
,
2172 HTMLStyle_get_height
,
2173 HTMLStyle_put_styleFloat
,
2174 HTMLStyle_get_styleFloat
,
2175 HTMLStyle_put_clear
,
2176 HTMLStyle_get_clear
,
2177 HTMLStyle_put_display
,
2178 HTMLStyle_get_display
,
2179 HTMLStyle_put_visibility
,
2180 HTMLStyle_get_visibility
,
2181 HTMLStyle_put_listStyleType
,
2182 HTMLStyle_get_listStyleType
,
2183 HTMLStyle_put_listStylePosition
,
2184 HTMLStyle_get_listStylePosition
,
2185 HTMLStyle_put_listStyleImage
,
2186 HTMLStyle_get_listStyleImage
,
2187 HTMLStyle_put_listStyle
,
2188 HTMLStyle_get_listStyle
,
2189 HTMLStyle_put_whiteSpace
,
2190 HTMLStyle_get_whiteSpace
,
2195 HTMLStyle_get_position
,
2196 HTMLStyle_put_zIndex
,
2197 HTMLStyle_get_zIndex
,
2198 HTMLStyle_put_overflow
,
2199 HTMLStyle_get_overflow
,
2200 HTMLStyle_put_pageBreakBefore
,
2201 HTMLStyle_get_pageBreakBefore
,
2202 HTMLStyle_put_pageBreakAfter
,
2203 HTMLStyle_get_pageBreakAfter
,
2204 HTMLStyle_put_cssText
,
2205 HTMLStyle_get_cssText
,
2206 HTMLStyle_put_pixelTop
,
2207 HTMLStyle_get_pixelTop
,
2208 HTMLStyle_put_pixelLeft
,
2209 HTMLStyle_get_pixelLeft
,
2210 HTMLStyle_put_pixelWidth
,
2211 HTMLStyle_get_pixelWidth
,
2212 HTMLStyle_put_pixelHeight
,
2213 HTMLStyle_get_pixelHeight
,
2214 HTMLStyle_put_posTop
,
2215 HTMLStyle_get_posTop
,
2216 HTMLStyle_put_posLeft
,
2217 HTMLStyle_get_posLeft
,
2218 HTMLStyle_put_posWidth
,
2219 HTMLStyle_get_posWidth
,
2220 HTMLStyle_put_posHeight
,
2221 HTMLStyle_get_posHeight
,
2222 HTMLStyle_put_cursor
,
2223 HTMLStyle_get_cursor
,
2226 HTMLStyle_put_filter
,
2227 HTMLStyle_get_filter
,
2228 HTMLStyle_setAttribute
,
2229 HTMLStyle_getAttribute
,
2230 HTMLStyle_removeAttribute
,
2234 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl
= {
2235 HTMLStyle_get_dispid
,
2239 static const tid_t HTMLStyle_iface_tids
[] = {
2244 static dispex_static_data_t HTMLStyle_dispex
= {
2245 &HTMLStyle_dispex_vtbl
,
2248 HTMLStyle_iface_tids
2251 IHTMLStyle
*HTMLStyle_Create(nsIDOMCSSStyleDeclaration
*nsstyle
)
2253 HTMLStyle
*ret
= heap_alloc_zero(sizeof(HTMLStyle
));
2255 ret
->lpHTMLStyleVtbl
= &HTMLStyleVtbl
;
2257 ret
->nsstyle
= nsstyle
;
2258 HTMLStyle2_Init(ret
);
2260 nsIDOMCSSStyleDeclaration_AddRef(nsstyle
);
2262 init_dispex(&ret
->dispex
, (IUnknown
*)HTMLSTYLE(ret
), &HTMLStyle_dispex
);
2264 return HTMLSTYLE(ret
);