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
31 #include "mshtml_private.h"
32 #include "htmlstyle.h"
34 #include "wine/debug.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 attrBackgroundAttachment
[] =
41 {'b','a','c','k','g','r','o','u','n','d','-','a','t','t','a','c','h','m','e','n','t',0};
42 static const WCHAR attrBackgroundColor
[] =
43 {'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0};
44 static const WCHAR attrBackgroundImage
[] =
45 {'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e',0};
46 static const WCHAR attrBackgroundPosition
[] =
47 {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n',0};
48 static const WCHAR attrBackgroundPositionX
[] =
49 {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','x',0};
50 static const WCHAR attrBackgroundPositionY
[] =
51 {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','y',0};
52 static const WCHAR attrBackgroundRepeat
[] =
53 {'b','a','c','k','g','r','o','u','n','d','-','r','e','p','e','a','t',0};
54 static const WCHAR attrBorder
[] =
55 {'b','o','r','d','e','r',0};
56 static const WCHAR attrBorderBottom
[] =
57 {'b','o','r','d','e','r','-','b','o','t','t','o','m',0};
58 static const WCHAR attrBorderBottomColor
[] =
59 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','c','o','l','o','r',0};
60 static const WCHAR attrBorderBottomStyle
[] =
61 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e',0};
62 static const WCHAR attrBorderBottomWidth
[] =
63 {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','w','i','d','t','h',0};
64 static const WCHAR attrBorderColor
[] =
65 {'b','o','r','d','e','r','-','c','o','l','o','r',0};
66 static const WCHAR attrBorderLeft
[] =
67 {'b','o','r','d','e','r','-','l','e','f','t',0};
68 static const WCHAR attrBorderLeftColor
[] =
69 {'b','o','r','d','e','r','-','l','e','f','t','-','c','o','l','o','r',0};
70 static const WCHAR attrBorderLeftStyle
[] =
71 {'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0};
72 static const WCHAR attrBorderLeftWidth
[] =
73 {'b','o','r','d','e','r','-','l','e','f','t','-','w','i','d','t','h',0};
74 static const WCHAR attrBorderRight
[] =
75 {'b','o','r','d','e','r','-','r','i','g','h','t',0};
76 static const WCHAR attrBorderRightColor
[] =
77 {'b','o','r','d','e','r','-','r','i','g','h','t','-','c','o','l','o','r',0};
78 static const WCHAR attrBorderRightStyle
[] =
79 {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
80 static const WCHAR attrBorderRightWidth
[] =
81 {'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0};
82 static const WCHAR attrBorderTop
[] =
83 {'b','o','r','d','e','r','-','t','o','p',0};
84 static const WCHAR attrBorderTopColor
[] =
85 {'b','o','r','d','e','r','-','t','o','p','-','c','o','l','o','r',0};
86 static const WCHAR attrBorderStyle
[] =
87 {'b','o','r','d','e','r','-','s','t','y','l','e',0};
88 static const WCHAR attrBorderTopStyle
[] =
89 {'b','o','r','d','e','r','-','t','o','p','-','s','t','y','l','e',0};
90 static const WCHAR attrBorderTopWidth
[] =
91 {'b','o','r','d','e','r','-','t','o','p','-','w','i','d','t','h',0};
92 static const WCHAR attrBorderWidth
[] =
93 {'b','o','r','d','e','r','-','w','i','d','t','h',0};
94 static const WCHAR attrBottom
[] =
95 {'b','o','t','t','o','m',0};
96 /* FIXME: Use unprefixed version (requires Gecko changes). */
97 static const WCHAR attrBoxSizing
[] =
98 {'-','m','o','z','-','b','o','x','-','s','i','z','i','n','g',0};
99 static const WCHAR attrClear
[] =
100 {'c','l','e','a','r',0};
101 static const WCHAR attrClip
[] =
103 static const WCHAR attrColor
[] =
104 {'c','o','l','o','r',0};
105 static const WCHAR attrCursor
[] =
106 {'c','u','r','s','o','r',0};
107 static const WCHAR attrDirection
[] =
108 {'d','i','r','e','c','t','i','o','n',0};
109 static const WCHAR attrDisplay
[] =
110 {'d','i','s','p','l','a','y',0};
111 static const WCHAR attrFilter
[] =
112 {'f','i','l','e','t','e','r',0};
113 static const WCHAR attrFloat
[] =
114 {'f','l','o','a','t',0};
115 static const WCHAR attrFontFamily
[] =
116 {'f','o','n','t','-','f','a','m','i','l','y',0};
117 static const WCHAR attrFontSize
[] =
118 {'f','o','n','t','-','s','i','z','e',0};
119 static const WCHAR attrFontStyle
[] =
120 {'f','o','n','t','-','s','t','y','l','e',0};
121 static const WCHAR attrFontVariant
[] =
122 {'f','o','n','t','-','v','a','r','i','a','n','t',0};
123 static const WCHAR attrFontWeight
[] =
124 {'f','o','n','t','-','w','e','i','g','h','t',0};
125 static const WCHAR attrHeight
[] =
126 {'h','e','i','g','h','t',0};
127 static const WCHAR attrLeft
[] =
129 static const WCHAR attrLetterSpacing
[] =
130 {'l','e','t','t','e','r','-','s','p','a','c','i','n','g',0};
131 static const WCHAR attrLineHeight
[] =
132 {'l','i','n','e','-','h','e','i','g','h','t',0};
133 static const WCHAR attrListStyle
[] =
134 {'l','i','s','t','-','s','t','y','l','e',0};
135 static const WCHAR attrListStyleType
[] =
136 {'l','i','s','t','-','s','t','y','l','e','-','t','y','p','e',0};
137 static const WCHAR attrListStylePosition
[] =
138 {'l','i','s','t','-','s','t','y','l','e','-','p','o','s','i','t','i','o','n',0};
139 static const WCHAR attrMargin
[] =
140 {'m','a','r','g','i','n',0};
141 static const WCHAR attrMarginBottom
[] =
142 {'m','a','r','g','i','n','-','b','o','t','t','o','m',0};
143 static const WCHAR attrMarginLeft
[] =
144 {'m','a','r','g','i','n','-','l','e','f','t',0};
145 static const WCHAR attrMarginRight
[] =
146 {'m','a','r','g','i','n','-','r','i','g','h','t',0};
147 static const WCHAR attrMarginTop
[] =
148 {'m','a','r','g','i','n','-','t','o','p',0};
149 static const WCHAR attrMaxHeight
[] =
150 {'m','a','x','-','h','e','i','g','h','t',0};
151 static const WCHAR attrMaxWidth
[] =
152 {'m','a','x','-','w','i','d','t','h',0};
153 static const WCHAR attrMinHeight
[] =
154 {'m','i','n','-','h','e','i','g','h','t',0};
155 static const WCHAR attrMinWidth
[] =
156 {'m','i','n','-','w','i','d','t','h',0};
157 static const WCHAR attrOutline
[] =
158 {'o','u','t','l','i','n','e',0};
159 static const WCHAR attrOverflow
[] =
160 {'o','v','e','r','f','l','o','w',0};
161 static const WCHAR attrOverflowX
[] =
162 {'o','v','e','r','f','l','o','w','-','x',0};
163 static const WCHAR attrOverflowY
[] =
164 {'o','v','e','r','f','l','o','w','-','y',0};
165 static const WCHAR attrPadding
[] =
166 {'p','a','d','d','i','n','g',0};
167 static const WCHAR attrPaddingBottom
[] =
168 {'p','a','d','d','i','n','g','-','b','o','t','t','o','m',0};
169 static const WCHAR attrPaddingLeft
[] =
170 {'p','a','d','d','i','n','g','-','l','e','f','t',0};
171 static const WCHAR attrPaddingRight
[] =
172 {'p','a','d','d','i','n','g','-','r','i','g','h','t',0};
173 static const WCHAR attrPaddingTop
[] =
174 {'p','a','d','d','i','n','g','-','t','o','p',0};
175 static const WCHAR attrPageBreakAfter
[] =
176 {'p','a','g','e','-','b','r','e','a','k','-','a','f','t','e','r',0};
177 static const WCHAR attrPageBreakBefore
[] =
178 {'p','a','g','e','-','b','r','e','a','k','-','b','e','f','o','r','e',0};
179 static const WCHAR attrPosition
[] =
180 {'p','o','s','i','t','i','o','n',0};
181 static const WCHAR attrRight
[] =
182 {'r','i','g','h','t',0};
183 static const WCHAR attrTableLayout
[] =
184 {'t','a','b','l','e','-','l','a','y','o','u','t',0};
185 static const WCHAR attrTextAlign
[] =
186 {'t','e','x','t','-','a','l','i','g','n',0};
187 static const WCHAR attrTextDecoration
[] =
188 {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
189 static const WCHAR attrTextIndent
[] =
190 {'t','e','x','t','-','i','n','d','e','n','t',0};
191 static const WCHAR attrTextTransform
[] =
192 {'t','e','x','t','-','t','r','a','n','s','f','o','r','m',0};
193 static const WCHAR attrTop
[] =
195 static const WCHAR attrVerticalAlign
[] =
196 {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
197 static const WCHAR attrVisibility
[] =
198 {'v','i','s','i','b','i','l','i','t','y',0};
199 static const WCHAR attrWhiteSpace
[] =
200 {'w','h','i','t','e','-','s','p','a','c','e',0};
201 static const WCHAR attrWidth
[] =
202 {'w','i','d','t','h',0};
203 static const WCHAR attrWordSpacing
[] =
204 {'w','o','r','d','-','s','p','a','c','i','n','g',0};
205 static const WCHAR attrWordWrap
[] =
206 {'w','o','r','d','-','w','r','a','p',0};
207 static const WCHAR attrZIndex
[] =
208 {'z','-','i','n','d','e','x',0};
211 static const WCHAR pxW
[] = {'p','x',0};
218 static const style_tbl_entry_t style_tbl
[] = {
219 {attrBackground
, DISPID_IHTMLSTYLE_BACKGROUND
},
220 {attrBackgroundAttachment
, DISPID_IHTMLSTYLE_BACKGROUNDATTACHMENT
},
221 {attrBackgroundColor
, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR
},
222 {attrBackgroundImage
, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE
},
223 {attrBackgroundPosition
, DISPID_IHTMLSTYLE_BACKGROUNDPOSITION
},
224 {attrBackgroundPositionX
, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONX
},
225 {attrBackgroundPositionY
, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONY
},
226 {attrBackgroundRepeat
, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT
},
227 {attrBorder
, DISPID_IHTMLSTYLE_BORDER
},
228 {attrBorderBottom
, DISPID_IHTMLSTYLE_BORDERBOTTOM
},
229 {attrBorderBottomColor
, DISPID_IHTMLSTYLE_BORDERBOTTOMCOLOR
},
230 {attrBorderBottomStyle
, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE
},
231 {attrBorderBottomWidth
, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH
},
232 {attrBorderColor
, DISPID_IHTMLSTYLE_BORDERCOLOR
},
233 {attrBorderLeft
, DISPID_IHTMLSTYLE_BORDERLEFT
},
234 {attrBorderLeftColor
, DISPID_IHTMLSTYLE_BORDERLEFTCOLOR
},
235 {attrBorderLeftStyle
, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE
},
236 {attrBorderLeftWidth
, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH
},
237 {attrBorderRight
, DISPID_IHTMLSTYLE_BORDERRIGHT
},
238 {attrBorderRightColor
, DISPID_IHTMLSTYLE_BORDERRIGHTCOLOR
},
239 {attrBorderRightStyle
, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE
},
240 {attrBorderRightWidth
, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH
},
241 {attrBorderStyle
, DISPID_IHTMLSTYLE_BORDERSTYLE
},
242 {attrBorderTop
, DISPID_IHTMLSTYLE_BORDERTOP
},
243 {attrBorderTopColor
, DISPID_IHTMLSTYLE_BORDERTOPCOLOR
},
244 {attrBorderTopStyle
, DISPID_IHTMLSTYLE_BORDERTOPSTYLE
},
245 {attrBorderTopWidth
, DISPID_IHTMLSTYLE_BORDERTOPWIDTH
},
246 {attrBorderWidth
, DISPID_IHTMLSTYLE_BORDERWIDTH
},
247 {attrBottom
, DISPID_IHTMLSTYLE2_BOTTOM
},
248 {attrBoxSizing
, DISPID_IHTMLSTYLE6_BOXSIZING
},
249 {attrClear
, DISPID_IHTMLSTYLE_CLEAR
},
250 {attrClip
, DISPID_IHTMLSTYLE_CLIP
},
251 {attrColor
, DISPID_IHTMLSTYLE_COLOR
},
252 {attrCursor
, DISPID_IHTMLSTYLE_CURSOR
},
253 {attrDirection
, DISPID_IHTMLSTYLE2_DIRECTION
},
254 {attrDisplay
, DISPID_IHTMLSTYLE_DISPLAY
},
255 {attrFilter
, DISPID_IHTMLSTYLE_FILTER
},
256 {attrFloat
, DISPID_IHTMLSTYLE_STYLEFLOAT
},
257 {attrFontFamily
, DISPID_IHTMLSTYLE_FONTFAMILY
},
258 {attrFontSize
, DISPID_IHTMLSTYLE_FONTSIZE
},
259 {attrFontStyle
, DISPID_IHTMLSTYLE_FONTSTYLE
},
260 {attrFontVariant
, DISPID_IHTMLSTYLE_FONTVARIANT
},
261 {attrFontWeight
, DISPID_IHTMLSTYLE_FONTWEIGHT
},
262 {attrHeight
, DISPID_IHTMLSTYLE_HEIGHT
},
263 {attrLeft
, DISPID_IHTMLSTYLE_LEFT
},
264 {attrLetterSpacing
, DISPID_IHTMLSTYLE_LETTERSPACING
},
265 {attrLineHeight
, DISPID_IHTMLSTYLE_LINEHEIGHT
},
266 {attrListStyle
, DISPID_IHTMLSTYLE_LISTSTYLE
},
267 {attrListStylePosition
, DISPID_IHTMLSTYLE_LISTSTYLEPOSITION
},
268 {attrListStyleType
, DISPID_IHTMLSTYLE_LISTSTYLETYPE
},
269 {attrMargin
, DISPID_IHTMLSTYLE_MARGIN
},
270 {attrMarginBottom
, DISPID_IHTMLSTYLE_MARGINBOTTOM
},
271 {attrMarginLeft
, DISPID_IHTMLSTYLE_MARGINLEFT
},
272 {attrMarginRight
, DISPID_IHTMLSTYLE_MARGINRIGHT
},
273 {attrMarginTop
, DISPID_IHTMLSTYLE_MARGINTOP
},
274 {attrMaxHeight
, DISPID_IHTMLSTYLE5_MAXHEIGHT
},
275 {attrMaxWidth
, DISPID_IHTMLSTYLE5_MAXWIDTH
},
276 {attrMinHeight
, DISPID_IHTMLSTYLE4_MINHEIGHT
},
277 {attrMinWidth
, DISPID_IHTMLSTYLE5_MINWIDTH
},
278 {attrOutline
, DISPID_IHTMLSTYLE6_OUTLINE
},
279 {attrOverflow
, DISPID_IHTMLSTYLE_OVERFLOW
},
280 {attrOverflowX
, DISPID_IHTMLSTYLE2_OVERFLOWX
},
281 {attrOverflowY
, DISPID_IHTMLSTYLE2_OVERFLOWY
},
282 {attrPadding
, DISPID_IHTMLSTYLE_PADDING
},
283 {attrPaddingBottom
, DISPID_IHTMLSTYLE_PADDINGBOTTOM
},
284 {attrPaddingLeft
, DISPID_IHTMLSTYLE_PADDINGLEFT
},
285 {attrPaddingRight
, DISPID_IHTMLSTYLE_PADDINGRIGHT
},
286 {attrPaddingTop
, DISPID_IHTMLSTYLE_PADDINGTOP
},
287 {attrPageBreakAfter
, DISPID_IHTMLSTYLE_PAGEBREAKAFTER
},
288 {attrPageBreakBefore
, DISPID_IHTMLSTYLE_PAGEBREAKBEFORE
},
289 {attrPosition
, DISPID_IHTMLSTYLE2_POSITION
},
290 {attrRight
, DISPID_IHTMLSTYLE2_RIGHT
},
291 {attrTableLayout
, DISPID_IHTMLSTYLE2_TABLELAYOUT
},
292 {attrTextAlign
, DISPID_IHTMLSTYLE_TEXTALIGN
},
293 {attrTextDecoration
, DISPID_IHTMLSTYLE_TEXTDECORATION
},
294 {attrTextIndent
, DISPID_IHTMLSTYLE_TEXTINDENT
},
295 {attrTextTransform
, DISPID_IHTMLSTYLE_TEXTTRANSFORM
},
296 {attrTop
, DISPID_IHTMLSTYLE_TOP
},
297 {attrVerticalAlign
, DISPID_IHTMLSTYLE_VERTICALALIGN
},
298 {attrVisibility
, DISPID_IHTMLSTYLE_VISIBILITY
},
299 {attrWhiteSpace
, DISPID_IHTMLSTYLE_WHITESPACE
},
300 {attrWidth
, DISPID_IHTMLSTYLE_WIDTH
},
301 {attrWordSpacing
, DISPID_IHTMLSTYLE_WORDSPACING
},
302 {attrWordWrap
, DISPID_IHTMLSTYLE3_WORDWRAP
},
303 {attrZIndex
, DISPID_IHTMLSTYLE_ZINDEX
}
306 C_ASSERT(sizeof(style_tbl
)/sizeof(*style_tbl
) == STYLEID_MAX_VALUE
);
308 static const WCHAR valLineThrough
[] =
309 {'l','i','n','e','-','t','h','r','o','u','g','h',0};
310 static const WCHAR valUnderline
[] =
311 {'u','n','d','e','r','l','i','n','e',0};
312 static const WCHAR szNormal
[] =
313 {'n','o','r','m','a','l',0};
314 static const WCHAR styleNone
[] =
316 static const WCHAR valOverline
[] =
317 {'o','v','e','r','l','i','n','e',0};
318 static const WCHAR valBlink
[] =
319 {'b','l','i','n','k',0};
321 static const WCHAR px_formatW
[] = {'%','d','p','x',0};
322 static const WCHAR emptyW
[] = {0};
324 static const style_tbl_entry_t
*lookup_style_tbl(const WCHAR
*name
)
326 int c
, i
, min
= 0, max
= sizeof(style_tbl
)/sizeof(*style_tbl
)-1;
331 c
= strcmpW(style_tbl
[i
].name
, name
);
344 static LPWSTR
fix_px_value(LPCWSTR val
)
349 while(*ptr
&& isspaceW(*ptr
))
354 while(*ptr
&& isdigitW(*ptr
))
357 if(!*ptr
|| isspaceW(*ptr
)) {
359 int len
= strlenW(val
)+1;
361 ret
= heap_alloc((len
+2)*sizeof(WCHAR
));
362 memcpy(ret
, val
, (ptr
-val
)*sizeof(WCHAR
));
368 TRACE("fixed %s -> %s\n", debugstr_w(val
), debugstr_w(ret
));
373 while(*ptr
&& !isspaceW(*ptr
))
380 static LPWSTR
fix_url_value(LPCWSTR val
)
384 static const WCHAR urlW
[] = {'u','r','l','('};
386 if(strncmpW(val
, urlW
, sizeof(urlW
)/sizeof(WCHAR
)) || !strchrW(val
, '\\'))
389 ret
= heap_strdupW(val
);
391 for(ptr
= ret
; *ptr
; ptr
++) {
399 static HRESULT
set_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, const WCHAR
*value
, DWORD flags
)
401 nsAString str_name
, str_value
, str_empty
;
406 if(flags
& ATTR_FIX_PX
)
407 val
= fix_px_value(value
);
408 else if(flags
& ATTR_FIX_URL
)
409 val
= fix_url_value(value
);
412 nsAString_InitDepend(&str_name
, style_tbl
[sid
].name
);
413 nsAString_InitDepend(&str_value
, val
? val
: value
);
414 nsAString_InitDepend(&str_empty
, emptyW
);
416 nsres
= nsIDOMCSSStyleDeclaration_SetProperty(nsstyle
, &str_name
, &str_value
, &str_empty
);
418 ERR("SetProperty failed: %08x\n", nsres
);
420 nsAString_Finish(&str_name
);
421 nsAString_Finish(&str_value
);
422 nsAString_Finish(&str_empty
);
428 static HRESULT
var_to_styleval(const VARIANT
*v
, WCHAR
*buf
, DWORD flags
, const WCHAR
**ret
)
439 case VT_BSTR
|VT_BYREF
:
440 *ret
= *V_BSTRREF(v
);
444 static const WCHAR formatW
[] = {'%','d',0};
445 static const WCHAR hex_formatW
[] = {'#','%','0','6','x',0};
447 if(flags
& ATTR_HEX_INT
)
448 wsprintfW(buf
, hex_formatW
, V_I4(v
));
449 else if(flags
& ATTR_FIX_PX
)
450 wsprintfW(buf
, px_formatW
, V_I4(v
));
452 wsprintfW(buf
, formatW
, V_I4(v
));
458 FIXME("not implemented for %s\n", debugstr_variant(v
));
464 static HRESULT
set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*value
, DWORD flags
)
470 hres
= var_to_styleval(value
, buf
, flags
, &val
);
474 return set_nsstyle_attr(nsstyle
, sid
, val
, flags
);
477 static inline HRESULT
set_style_attr(HTMLStyle
*This
, styleid_t sid
, LPCWSTR value
, DWORD flags
)
479 return set_nsstyle_attr(This
->nsstyle
, sid
, value
, flags
);
482 static HRESULT
get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, nsAString
*value
)
487 nsAString_InitDepend(&str_name
, style_tbl
[sid
].name
);
488 nsres
= nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle
, &str_name
, value
);
489 nsAString_Finish(&str_name
);
490 if(NS_FAILED(nsres
)) {
491 ERR("SetProperty failed: %08x\n", nsres
);
498 static HRESULT
nsstyle_to_bstr(const WCHAR
*val
, DWORD flags
, BSTR
*p
)
504 *p
= (flags
& ATTR_NO_NULL
) ? SysAllocStringLen(NULL
, 0) : NULL
;
508 ret
= SysAllocString(val
);
510 return E_OUTOFMEMORY
;
512 len
= SysStringLen(ret
);
514 if(flags
& ATTR_REMOVE_COMMA
) {
518 for(ptr
= ret
; (ptr
= strchrW(ptr
, ',')); ptr
++)
524 new_ret
= SysAllocStringLen(NULL
, new_len
);
527 return E_OUTOFMEMORY
;
530 for(ptr2
= new_ret
, ptr
= ret
; *ptr
; ptr
++) {
544 HRESULT
get_nsstyle_attr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, BSTR
*p
, DWORD flags
)
547 const PRUnichar
*value
;
550 nsAString_Init(&str_value
, NULL
);
552 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
554 nsAString_GetData(&str_value
, &value
);
555 hres
= nsstyle_to_bstr(value
, flags
, p
);
556 nsAString_Finish(&str_value
);
558 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_w(*p
));
562 HRESULT
get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, VARIANT
*p
, DWORD flags
)
565 const PRUnichar
*value
;
569 nsAString_Init(&str_value
, NULL
);
571 get_nsstyle_attr_nsval(nsstyle
, sid
, &str_value
);
573 nsAString_GetData(&str_value
, &value
);
575 if(flags
& ATTR_STR_TO_INT
) {
576 const PRUnichar
*ptr
= value
;
585 while(isdigitW(*ptr
))
586 i
= i
*10 + (*ptr
++ - '0');
590 V_I4(p
) = neg
? -i
: i
;
598 hres
= nsstyle_to_bstr(value
, flags
, &str
);
599 if(SUCCEEDED(hres
)) {
605 nsAString_Finish(&str_value
);
607 TRACE("%s -> %s\n", debugstr_w(style_tbl
[sid
].name
), debugstr_variant(p
));
611 static inline HRESULT
get_style_attr(HTMLStyle
*This
, styleid_t sid
, BSTR
*p
)
613 return get_nsstyle_attr(This
->nsstyle
, sid
, p
, 0);
616 static HRESULT
check_style_attr_value(HTMLStyle
*This
, styleid_t sid
, LPCWSTR exval
, VARIANT_BOOL
*p
)
619 const PRUnichar
*value
;
621 nsAString_Init(&str_value
, NULL
);
623 get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
625 nsAString_GetData(&str_value
, &value
);
626 *p
= strcmpW(value
, exval
) ? VARIANT_FALSE
: VARIANT_TRUE
;
627 nsAString_Finish(&str_value
);
629 TRACE("%s -> %x\n", debugstr_w(style_tbl
[sid
].name
), *p
);
633 static inline HRESULT
set_style_pos(HTMLStyle
*This
, styleid_t sid
, float value
)
636 WCHAR szFormat
[] = {'%','.','0','f','p','x',0};
638 value
= floor(value
);
640 sprintfW(szValue
, szFormat
, value
);
642 return set_style_attr(This
, sid
, szValue
, 0);
645 static HRESULT
set_style_pxattr(nsIDOMCSSStyleDeclaration
*nsstyle
, styleid_t sid
, LONG value
)
649 sprintfW(value_str
, px_formatW
, value
);
651 return set_nsstyle_attr(nsstyle
, sid
, value_str
, 0);
654 static HRESULT
get_nsstyle_pos(HTMLStyle
*This
, styleid_t sid
, float *p
)
659 TRACE("%p %d %p\n", This
, sid
, p
);
663 nsAString_Init(&str_value
, NULL
);
665 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
669 const PRUnichar
*value
;
671 nsAString_GetData(&str_value
, &value
);
674 *p
= strtolW(value
, &ptr
, 10);
676 if(*ptr
&& strcmpW(ptr
, pxW
))
678 nsAString_Finish(&str_value
);
679 FIXME("only px values are currently supported\n");
685 TRACE("ret %f\n", *p
);
687 nsAString_Finish(&str_value
);
691 static HRESULT
get_nsstyle_pixel_val(HTMLStyle
*This
, styleid_t sid
, LONG
*p
)
699 nsAString_Init(&str_value
, NULL
);
701 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, sid
, &str_value
);
704 const PRUnichar
*value
;
706 nsAString_GetData(&str_value
, &value
);
708 *p
= strtolW(value
, &ptr
, 10);
711 /* Skip all digits. We have tests showing that we should not round the value. */
712 while(isdigitW(*++ptr
));
716 if(!ptr
|| (*ptr
&& strcmpW(ptr
, pxW
)))
720 nsAString_Finish(&str_value
);
724 static BOOL
is_valid_border_style(BSTR v
)
726 static const WCHAR styleDotted
[] = {'d','o','t','t','e','d',0};
727 static const WCHAR styleDashed
[] = {'d','a','s','h','e','d',0};
728 static const WCHAR styleSolid
[] = {'s','o','l','i','d',0};
729 static const WCHAR styleDouble
[] = {'d','o','u','b','l','e',0};
730 static const WCHAR styleGroove
[] = {'g','r','o','o','v','e',0};
731 static const WCHAR styleRidge
[] = {'r','i','d','g','e',0};
732 static const WCHAR styleInset
[] = {'i','n','s','e','t',0};
733 static const WCHAR styleOutset
[] = {'o','u','t','s','e','t',0};
735 TRACE("%s\n", debugstr_w(v
));
737 if(!v
|| strcmpiW(v
, styleNone
) == 0 || strcmpiW(v
, styleDotted
) == 0 ||
738 strcmpiW(v
, styleDashed
) == 0 || strcmpiW(v
, styleSolid
) == 0 ||
739 strcmpiW(v
, styleDouble
) == 0 || strcmpiW(v
, styleGroove
) == 0 ||
740 strcmpiW(v
, styleRidge
) == 0 || strcmpiW(v
, styleInset
) == 0 ||
741 strcmpiW(v
, styleOutset
) == 0 )
749 static inline HTMLStyle
*impl_from_IHTMLStyle(IHTMLStyle
*iface
)
751 return CONTAINING_RECORD(iface
, HTMLStyle
, IHTMLStyle_iface
);
754 static HRESULT WINAPI
HTMLStyle_QueryInterface(IHTMLStyle
*iface
, REFIID riid
, void **ppv
)
756 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
758 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
760 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
761 *ppv
= &This
->IHTMLStyle_iface
;
762 }else if(IsEqualGUID(&IID_IHTMLStyle
, riid
)) {
763 *ppv
= &This
->IHTMLStyle_iface
;
764 }else if(IsEqualGUID(&IID_IHTMLStyle2
, riid
)) {
765 *ppv
= &This
->IHTMLStyle2_iface
;
766 }else if(IsEqualGUID(&IID_IHTMLStyle3
, riid
)) {
767 *ppv
= &This
->IHTMLStyle3_iface
;
768 }else if(IsEqualGUID(&IID_IHTMLStyle4
, riid
)) {
769 *ppv
= &This
->IHTMLStyle4_iface
;
770 }else if(IsEqualGUID(&IID_IHTMLStyle5
, riid
)) {
771 *ppv
= &This
->IHTMLStyle5_iface
;
772 }else if(IsEqualGUID(&IID_IHTMLStyle6
, riid
)) {
773 *ppv
= &This
->IHTMLStyle6_iface
;
774 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
775 return *ppv
? S_OK
: E_NOINTERFACE
;
778 WARN("unsupported iface %s\n", debugstr_mshtml_guid(riid
));
779 return E_NOINTERFACE
;
782 IUnknown_AddRef((IUnknown
*)*ppv
);
786 static ULONG WINAPI
HTMLStyle_AddRef(IHTMLStyle
*iface
)
788 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
789 LONG ref
= InterlockedIncrement(&This
->ref
);
791 TRACE("(%p) ref=%d\n", This
, ref
);
796 static ULONG WINAPI
HTMLStyle_Release(IHTMLStyle
*iface
)
798 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
799 LONG ref
= InterlockedDecrement(&This
->ref
);
801 TRACE("(%p) ref=%d\n", This
, ref
);
806 nsIDOMCSSStyleDeclaration_Release(This
->nsstyle
);
807 release_dispex(&This
->dispex
);
814 static HRESULT WINAPI
HTMLStyle_GetTypeInfoCount(IHTMLStyle
*iface
, UINT
*pctinfo
)
816 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
817 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
820 static HRESULT WINAPI
HTMLStyle_GetTypeInfo(IHTMLStyle
*iface
, UINT iTInfo
,
821 LCID lcid
, ITypeInfo
**ppTInfo
)
823 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
824 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
827 static HRESULT WINAPI
HTMLStyle_GetIDsOfNames(IHTMLStyle
*iface
, REFIID riid
,
828 LPOLESTR
*rgszNames
, UINT cNames
,
829 LCID lcid
, DISPID
*rgDispId
)
831 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
832 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
836 static HRESULT WINAPI
HTMLStyle_Invoke(IHTMLStyle
*iface
, DISPID dispIdMember
,
837 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
838 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
840 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
841 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
842 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
845 static HRESULT WINAPI
HTMLStyle_put_fontFamily(IHTMLStyle
*iface
, BSTR v
)
847 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
849 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
851 return set_style_attr(This
, STYLEID_FONT_FAMILY
, v
, 0);
854 static HRESULT WINAPI
HTMLStyle_get_fontFamily(IHTMLStyle
*iface
, BSTR
*p
)
856 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
858 TRACE("(%p)->(%p)\n", This
, p
);
860 return get_style_attr(This
, STYLEID_FONT_FAMILY
, p
);
863 static HRESULT WINAPI
HTMLStyle_put_fontStyle(IHTMLStyle
*iface
, BSTR v
)
865 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
866 static const WCHAR szItalic
[] = {'i','t','a','l','i','c',0};
867 static const WCHAR szOblique
[] = {'o','b','l','i','q','u','e',0};
869 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
871 /* fontStyle can only be one of the follow values. */
872 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(szItalic
, v
) == 0 ||
873 strcmpiW(szOblique
, v
) == 0)
875 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_STYLE
, v
, 0);
881 static HRESULT WINAPI
HTMLStyle_get_fontStyle(IHTMLStyle
*iface
, BSTR
*p
)
883 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
885 TRACE("(%p)->(%p)\n", This
, p
);
887 return get_style_attr(This
, STYLEID_FONT_STYLE
, p
);
890 static HRESULT WINAPI
HTMLStyle_put_fontVariant(IHTMLStyle
*iface
, BSTR v
)
892 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
893 static const WCHAR szCaps
[] = {'s','m','a','l','l','-','c','a','p','s',0};
895 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
897 /* fontVariant can only be one of the follow values. */
898 if(!v
|| strcmpiW(szNormal
, v
) == 0 || strcmpiW(szCaps
, v
) == 0)
900 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_VARIANT
, v
, 0);
906 static HRESULT WINAPI
HTMLStyle_get_fontVariant(IHTMLStyle
*iface
, BSTR
*p
)
908 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
909 TRACE("(%p)->(%p)\n", This
, p
);
914 return get_style_attr(This
, STYLEID_FONT_VARIANT
, p
);
917 static HRESULT WINAPI
HTMLStyle_put_fontWeight(IHTMLStyle
*iface
, BSTR v
)
919 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
920 static const WCHAR styleBold
[] = {'b','o','l','d',0};
921 static const WCHAR styleBolder
[] = {'b','o','l','d','e','r',0};
922 static const WCHAR styleLighter
[] = {'l','i','g','h','t','e','r',0};
923 static const WCHAR style100
[] = {'1','0','0',0};
924 static const WCHAR style200
[] = {'2','0','0',0};
925 static const WCHAR style300
[] = {'3','0','0',0};
926 static const WCHAR style400
[] = {'4','0','0',0};
927 static const WCHAR style500
[] = {'5','0','0',0};
928 static const WCHAR style600
[] = {'6','0','0',0};
929 static const WCHAR style700
[] = {'7','0','0',0};
930 static const WCHAR style800
[] = {'8','0','0',0};
931 static const WCHAR style900
[] = {'9','0','0',0};
933 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
935 /* fontWeight can only be one of the following */
936 if(v
&& *v
&& strcmpiW(szNormal
, v
) && strcmpiW(styleBold
, v
) && strcmpiW(styleBolder
, v
)
937 && strcmpiW(styleLighter
, v
) && strcmpiW(style100
, v
) && strcmpiW(style200
, v
)
938 && strcmpiW(style300
, v
) && strcmpiW(style400
, v
) && strcmpiW(style500
, v
) && strcmpiW(style600
, v
)
939 && strcmpiW(style700
, v
) && strcmpiW(style800
, v
) && strcmpiW(style900
, v
))
942 return set_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_WEIGHT
, v
, 0);
945 static HRESULT WINAPI
HTMLStyle_get_fontWeight(IHTMLStyle
*iface
, BSTR
*p
)
947 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
949 TRACE("(%p)->(%p)\n", This
, p
);
951 return get_style_attr(This
, STYLEID_FONT_WEIGHT
, p
);
954 static HRESULT WINAPI
HTMLStyle_put_fontSize(IHTMLStyle
*iface
, VARIANT v
)
956 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
958 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
960 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_FONT_SIZE
, &v
, ATTR_FIX_PX
);
963 static HRESULT WINAPI
HTMLStyle_get_fontSize(IHTMLStyle
*iface
, VARIANT
*p
)
965 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
967 TRACE("(%p)->(%p)\n", This
, p
);
969 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_FONT_SIZE
, p
, 0);
972 static HRESULT WINAPI
HTMLStyle_put_font(IHTMLStyle
*iface
, BSTR v
)
974 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
975 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
979 static HRESULT WINAPI
HTMLStyle_get_font(IHTMLStyle
*iface
, BSTR
*p
)
981 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
982 FIXME("(%p)->(%p)\n", This
, p
);
986 static HRESULT WINAPI
HTMLStyle_put_color(IHTMLStyle
*iface
, VARIANT v
)
988 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
990 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
992 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_COLOR
, &v
, ATTR_HEX_INT
);
995 static HRESULT WINAPI
HTMLStyle_get_color(IHTMLStyle
*iface
, VARIANT
*p
)
997 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
999 TRACE("(%p)->(%p)\n", This
, p
);
1001 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_COLOR
, p
, 0);
1004 static HRESULT WINAPI
HTMLStyle_put_background(IHTMLStyle
*iface
, BSTR v
)
1006 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1008 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1010 return set_style_attr(This
, STYLEID_BACKGROUND
, v
, 0);
1013 static HRESULT WINAPI
HTMLStyle_get_background(IHTMLStyle
*iface
, BSTR
*p
)
1015 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1017 TRACE("(%p)->(%p)\n", This
, p
);
1019 return get_style_attr(This
, STYLEID_BACKGROUND
, p
);
1022 static HRESULT WINAPI
HTMLStyle_put_backgroundColor(IHTMLStyle
*iface
, VARIANT v
)
1024 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1026 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1028 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BACKGROUND_COLOR
, &v
, ATTR_HEX_INT
);
1031 static HRESULT WINAPI
HTMLStyle_get_backgroundColor(IHTMLStyle
*iface
, VARIANT
*p
)
1033 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1035 TRACE("(%p)->(%p)\n", This
, p
);
1037 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BACKGROUND_COLOR
, p
, 0);
1040 static HRESULT WINAPI
HTMLStyle_put_backgroundImage(IHTMLStyle
*iface
, BSTR v
)
1042 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1044 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1046 return set_style_attr(This
, STYLEID_BACKGROUND_IMAGE
, v
, ATTR_FIX_URL
);
1049 static HRESULT WINAPI
HTMLStyle_get_backgroundImage(IHTMLStyle
*iface
, BSTR
*p
)
1051 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1053 TRACE("(%p)->(%p)\n", This
, p
);
1055 return get_style_attr(This
, STYLEID_BACKGROUND_IMAGE
, p
);
1058 static HRESULT WINAPI
HTMLStyle_put_backgroundRepeat(IHTMLStyle
*iface
, BSTR v
)
1060 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1061 static const WCHAR styleRepeat
[] = {'r','e','p','e','a','t',0};
1062 static const WCHAR styleNoRepeat
[] = {'n','o','-','r','e','p','e','a','t',0};
1063 static const WCHAR styleRepeatX
[] = {'r','e','p','e','a','t','-','x',0};
1064 static const WCHAR styleRepeatY
[] = {'r','e','p','e','a','t','-','y',0};
1066 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1068 /* fontWeight can only be one of the following */
1069 if(!v
|| strcmpiW(styleRepeat
, v
) == 0 || strcmpiW(styleNoRepeat
, v
) == 0 ||
1070 strcmpiW(styleRepeatX
, v
) == 0 || strcmpiW(styleRepeatY
, v
) == 0 )
1072 return set_style_attr(This
, STYLEID_BACKGROUND_REPEAT
, v
, 0);
1075 return E_INVALIDARG
;
1078 static HRESULT WINAPI
HTMLStyle_get_backgroundRepeat(IHTMLStyle
*iface
, BSTR
*p
)
1080 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1082 TRACE("(%p)->(%p)\n", This
, p
);
1084 return get_style_attr(This
, STYLEID_BACKGROUND_REPEAT
, p
);
1087 static HRESULT WINAPI
HTMLStyle_put_backgroundAttachment(IHTMLStyle
*iface
, BSTR v
)
1089 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1091 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1093 return set_style_attr(This
, STYLEID_BACKGROUND_ATTACHMENT
, v
, 0);
1096 static HRESULT WINAPI
HTMLStyle_get_backgroundAttachment(IHTMLStyle
*iface
, BSTR
*p
)
1098 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1100 TRACE("(%p)->(%p)\n", This
, p
);
1102 return get_style_attr(This
, STYLEID_BACKGROUND_ATTACHMENT
, p
);
1105 static HRESULT WINAPI
HTMLStyle_put_backgroundPosition(IHTMLStyle
*iface
, BSTR v
)
1107 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1109 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1111 return set_style_attr(This
, STYLEID_BACKGROUND_POSITION
, v
, 0);
1114 static HRESULT WINAPI
HTMLStyle_get_backgroundPosition(IHTMLStyle
*iface
, BSTR
*p
)
1116 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1118 TRACE("(%p)->(%p)\n", This
, p
);
1120 return get_style_attr(This
, STYLEID_BACKGROUND_POSITION
, p
);
1123 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionX(IHTMLStyle
*iface
, VARIANT v
)
1125 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1126 WCHAR buf
[14], *pos_val
;
1132 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1134 hres
= var_to_styleval(&v
, buf
, ATTR_FIX_PX
, &val
);
1138 val_len
= val
? strlenW(val
) : 0;
1140 nsAString_Init(&pos_str
, NULL
);
1141 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, STYLEID_BACKGROUND_POSITION
, &pos_str
);
1142 if(SUCCEEDED(hres
)) {
1143 const PRUnichar
*pos
, *posy
;
1146 nsAString_GetData(&pos_str
, &pos
);
1147 posy
= strchrW(pos
, ' ');
1149 static const WCHAR zero_pxW
[] = {' ','0','p','x',0};
1151 TRACE("no space in %s\n", debugstr_w(pos
));
1155 posy_len
= strlenW(posy
);
1156 pos_val
= heap_alloc((val_len
+posy_len
+1)*sizeof(WCHAR
));
1159 memcpy(pos_val
, val
, val_len
*sizeof(WCHAR
));
1161 memcpy(pos_val
+val_len
, posy
, posy_len
*sizeof(WCHAR
));
1162 pos_val
[val_len
+posy_len
] = 0;
1164 hres
= E_OUTOFMEMORY
;
1167 nsAString_Finish(&pos_str
);
1171 TRACE("setting position to %s\n", debugstr_w(pos_val
));
1172 hres
= set_nsstyle_attr(This
->nsstyle
, STYLEID_BACKGROUND_POSITION
, pos_val
, ATTR_FIX_PX
);
1177 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionX(IHTMLStyle
*iface
, VARIANT
*p
)
1179 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1184 TRACE("(%p)->(%p)\n", This
, p
);
1186 nsAString_Init(&pos_str
, NULL
);
1187 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, STYLEID_BACKGROUND_POSITION
, &pos_str
);
1188 if(SUCCEEDED(hres
)) {
1189 const PRUnichar
*pos
, *space
;
1191 nsAString_GetData(&pos_str
, &pos
);
1192 space
= strchrW(pos
, ' ');
1194 WARN("no space in %s\n", debugstr_w(pos
));
1195 space
= pos
+ strlenW(pos
);
1199 ret
= SysAllocStringLen(pos
, space
-pos
);
1201 hres
= E_OUTOFMEMORY
;
1206 nsAString_Finish(&pos_str
);
1210 TRACE("returning %s\n", debugstr_w(ret
));
1216 static HRESULT WINAPI
HTMLStyle_put_backgroundPositionY(IHTMLStyle
*iface
, VARIANT v
)
1218 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1219 WCHAR buf
[14], *pos_val
;
1225 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1227 hres
= var_to_styleval(&v
, buf
, ATTR_FIX_PX
, &val
);
1231 val_len
= val
? strlenW(val
) : 0;
1233 nsAString_Init(&pos_str
, NULL
);
1234 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, STYLEID_BACKGROUND_POSITION
, &pos_str
);
1235 if(SUCCEEDED(hres
)) {
1236 const PRUnichar
*pos
, *space
;
1239 nsAString_GetData(&pos_str
, &pos
);
1240 space
= strchrW(pos
, ' ');
1244 static const WCHAR zero_pxW
[] = {'0','p','x',' ',0};
1246 TRACE("no space in %s\n", debugstr_w(pos
));
1248 space
= pos
+ sizeof(zero_pxW
)/sizeof(WCHAR
)-1;
1251 posx_len
= space
-pos
;
1253 pos_val
= heap_alloc((posx_len
+val_len
+1)*sizeof(WCHAR
));
1255 memcpy(pos_val
, pos
, posx_len
*sizeof(WCHAR
));
1257 memcpy(pos_val
+posx_len
, val
, val_len
*sizeof(WCHAR
));
1258 pos_val
[posx_len
+val_len
] = 0;
1260 hres
= E_OUTOFMEMORY
;
1263 nsAString_Finish(&pos_str
);
1267 TRACE("setting position to %s\n", debugstr_w(pos_val
));
1268 hres
= set_nsstyle_attr(This
->nsstyle
, STYLEID_BACKGROUND_POSITION
, pos_val
, ATTR_FIX_PX
);
1273 static HRESULT WINAPI
HTMLStyle_get_backgroundPositionY(IHTMLStyle
*iface
, VARIANT
*p
)
1275 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1280 TRACE("(%p)->(%p)\n", This
, p
);
1282 nsAString_Init(&pos_str
, NULL
);
1283 hres
= get_nsstyle_attr_nsval(This
->nsstyle
, STYLEID_BACKGROUND_POSITION
, &pos_str
);
1284 if(SUCCEEDED(hres
)) {
1285 const PRUnichar
*pos
, *posy
;
1287 nsAString_GetData(&pos_str
, &pos
);
1288 posy
= strchrW(pos
, ' ');
1290 ret
= SysAllocString(posy
+1);
1292 hres
= E_OUTOFMEMORY
;
1297 nsAString_Finish(&pos_str
);
1301 TRACE("returning %s\n", debugstr_w(ret
));
1307 static HRESULT WINAPI
HTMLStyle_put_wordSpacing(IHTMLStyle
*iface
, VARIANT v
)
1309 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1311 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1313 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_WORD_SPACING
, &v
, 0);
1316 static HRESULT WINAPI
HTMLStyle_get_wordSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
1318 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1319 TRACE("(%p)->(%p)\n", This
, p
);
1320 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_WORD_SPACING
, p
, 0);
1323 static HRESULT WINAPI
HTMLStyle_put_letterSpacing(IHTMLStyle
*iface
, VARIANT v
)
1325 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1327 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1329 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_LETTER_SPACING
, &v
, 0);
1332 static HRESULT WINAPI
HTMLStyle_get_letterSpacing(IHTMLStyle
*iface
, VARIANT
*p
)
1334 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1335 TRACE("(%p)->(%p)\n", This
, p
);
1336 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LETTER_SPACING
, p
, 0);
1339 static HRESULT WINAPI
HTMLStyle_put_textDecoration(IHTMLStyle
*iface
, BSTR v
)
1341 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1343 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1345 /* textDecoration can only be one of the following */
1346 if(!v
|| strcmpiW(styleNone
, v
) == 0 || strcmpiW(valUnderline
, v
) == 0 ||
1347 strcmpiW(valOverline
, v
) == 0 || strcmpiW(valLineThrough
, v
) == 0 ||
1348 strcmpiW(valBlink
, v
) == 0)
1350 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
, 0);
1353 return E_INVALIDARG
;
1356 static HRESULT WINAPI
HTMLStyle_get_textDecoration(IHTMLStyle
*iface
, BSTR
*p
)
1358 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1360 TRACE("(%p)->(%p)\n", This
, p
);
1362 return get_style_attr(This
, STYLEID_TEXT_DECORATION
, p
);
1365 static HRESULT WINAPI
HTMLStyle_put_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL v
)
1367 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1369 TRACE("(%p)->(%x)\n", This
, v
);
1371 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? styleNone
: emptyW
, 0);
1374 static HRESULT WINAPI
HTMLStyle_get_textDecorationNone(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1376 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1378 TRACE("(%p)->(%p)\n", This
, p
);
1380 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, styleNone
, p
);
1383 static HRESULT WINAPI
HTMLStyle_put_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
1385 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1387 TRACE("(%p)->(%x)\n", This
, v
);
1389 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valUnderline
: emptyW
, 0);
1392 static HRESULT WINAPI
HTMLStyle_get_textDecorationUnderline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1394 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1396 TRACE("(%p)->(%p)\n", This
, p
);
1398 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valUnderline
, p
);
1401 static HRESULT WINAPI
HTMLStyle_put_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL v
)
1403 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1405 TRACE("(%p)->(%x)\n", This
, v
);
1407 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valOverline
: emptyW
, 0);
1410 static HRESULT WINAPI
HTMLStyle_get_textDecorationOverline(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1412 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1414 TRACE("(%p)->(%p)\n", This
, p
);
1416 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valOverline
, p
);
1419 static HRESULT WINAPI
HTMLStyle_put_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL v
)
1421 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1423 TRACE("(%p)->(%x)\n", This
, v
);
1425 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valLineThrough
: emptyW
, 0);
1428 static HRESULT WINAPI
HTMLStyle_get_textDecorationLineThrough(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1430 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1432 TRACE("(%p)->(%p)\n", This
, p
);
1434 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valLineThrough
, p
);
1437 static HRESULT WINAPI
HTMLStyle_put_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL v
)
1439 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1441 TRACE("(%p)->(%x)\n", This
, v
);
1443 return set_style_attr(This
, STYLEID_TEXT_DECORATION
, v
? valBlink
: emptyW
, 0);
1446 static HRESULT WINAPI
HTMLStyle_get_textDecorationBlink(IHTMLStyle
*iface
, VARIANT_BOOL
*p
)
1448 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1450 TRACE("(%p)->(%p)\n", This
, p
);
1452 return check_style_attr_value(This
, STYLEID_TEXT_DECORATION
, valBlink
, p
);
1455 static HRESULT WINAPI
HTMLStyle_put_verticalAlign(IHTMLStyle
*iface
, VARIANT v
)
1457 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1459 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1461 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_VERTICAL_ALIGN
, &v
, ATTR_FIX_PX
);
1464 static HRESULT WINAPI
HTMLStyle_get_verticalAlign(IHTMLStyle
*iface
, VARIANT
*p
)
1466 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1468 TRACE("(%p)->(%p)\n", This
, p
);
1470 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_VERTICAL_ALIGN
, p
, 0);
1473 static HRESULT WINAPI
HTMLStyle_put_textTransform(IHTMLStyle
*iface
, BSTR v
)
1475 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1477 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1479 return set_style_attr(This
, STYLEID_TEXT_TRANSFORM
, v
, 0);
1482 static HRESULT WINAPI
HTMLStyle_get_textTransform(IHTMLStyle
*iface
, BSTR
*p
)
1484 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1486 TRACE("(%p)->(%p)\n", This
, p
);
1488 return get_style_attr(This
, STYLEID_TEXT_TRANSFORM
, p
);
1491 static HRESULT WINAPI
HTMLStyle_put_textAlign(IHTMLStyle
*iface
, BSTR v
)
1493 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1495 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1497 return set_style_attr(This
, STYLEID_TEXT_ALIGN
, v
, 0);
1500 static HRESULT WINAPI
HTMLStyle_get_textAlign(IHTMLStyle
*iface
, BSTR
*p
)
1502 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1504 TRACE("(%p)->(%p)\n", This
, p
);
1506 return get_style_attr(This
, STYLEID_TEXT_ALIGN
, p
);
1509 static HRESULT WINAPI
HTMLStyle_put_textIndent(IHTMLStyle
*iface
, VARIANT v
)
1511 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1513 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1515 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_TEXT_INDENT
, &v
, ATTR_FIX_PX
);
1518 static HRESULT WINAPI
HTMLStyle_get_textIndent(IHTMLStyle
*iface
, VARIANT
*p
)
1520 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1522 TRACE("(%p)->(%p)\n", This
, p
);
1524 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_TEXT_INDENT
, p
, 0);
1527 static HRESULT WINAPI
HTMLStyle_put_lineHeight(IHTMLStyle
*iface
, VARIANT v
)
1529 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1531 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1533 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_LINE_HEIGHT
, &v
, 0);
1536 static HRESULT WINAPI
HTMLStyle_get_lineHeight(IHTMLStyle
*iface
, VARIANT
*p
)
1538 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1540 TRACE("(%p)->(%p)\n", This
, p
);
1542 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LINE_HEIGHT
, p
, 0);
1545 static HRESULT WINAPI
HTMLStyle_put_marginTop(IHTMLStyle
*iface
, VARIANT v
)
1547 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1549 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1551 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_TOP
, &v
, ATTR_FIX_PX
);
1554 static HRESULT WINAPI
HTMLStyle_get_marginTop(IHTMLStyle
*iface
, VARIANT
*p
)
1556 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1558 TRACE("(%p)->(%p)\n", This
, p
);
1560 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_TOP
, p
, 0);
1563 static HRESULT WINAPI
HTMLStyle_put_marginRight(IHTMLStyle
*iface
, VARIANT v
)
1565 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1567 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1569 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_RIGHT
, &v
, ATTR_FIX_PX
);
1572 static HRESULT WINAPI
HTMLStyle_get_marginRight(IHTMLStyle
*iface
, VARIANT
*p
)
1574 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1575 TRACE("(%p)->(%p)\n", This
, p
);
1576 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_RIGHT
, p
, 0);
1579 static HRESULT WINAPI
HTMLStyle_put_marginBottom(IHTMLStyle
*iface
, VARIANT v
)
1581 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1583 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1585 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_BOTTOM
, &v
, ATTR_FIX_PX
);
1588 static HRESULT WINAPI
HTMLStyle_get_marginBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1590 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1592 TRACE("(%p)->(%p)\n", This
, p
);
1594 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_BOTTOM
, p
, 0);
1597 static HRESULT WINAPI
HTMLStyle_put_marginLeft(IHTMLStyle
*iface
, VARIANT v
)
1599 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1601 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1603 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_LEFT
, &v
, ATTR_FIX_PX
);
1606 static HRESULT WINAPI
HTMLStyle_put_margin(IHTMLStyle
*iface
, BSTR v
)
1608 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1610 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1612 return set_style_attr(This
, STYLEID_MARGIN
, v
, 0);
1615 static HRESULT WINAPI
HTMLStyle_get_margin(IHTMLStyle
*iface
, BSTR
*p
)
1617 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1619 TRACE("(%p)->(%p)\n", This
, p
);
1621 return get_style_attr(This
, STYLEID_MARGIN
, p
);
1624 static HRESULT WINAPI
HTMLStyle_get_marginLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1626 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1627 TRACE("(%p)->(%p)\n", This
, p
);
1628 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_LEFT
, p
, 0);
1631 static HRESULT WINAPI
HTMLStyle_put_paddingTop(IHTMLStyle
*iface
, VARIANT v
)
1633 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1635 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1637 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_TOP
, &v
, ATTR_FIX_PX
);
1640 static HRESULT WINAPI
HTMLStyle_get_paddingTop(IHTMLStyle
*iface
, VARIANT
*p
)
1642 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1644 TRACE("(%p)->(%p)\n", This
, p
);
1646 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_TOP
, p
, 0);
1649 static HRESULT WINAPI
HTMLStyle_put_paddingRight(IHTMLStyle
*iface
, VARIANT v
)
1651 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1653 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1655 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_RIGHT
, &v
, ATTR_FIX_PX
);
1658 static HRESULT WINAPI
HTMLStyle_get_paddingRight(IHTMLStyle
*iface
, VARIANT
*p
)
1660 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1662 TRACE("(%p)->(%p)\n", This
, p
);
1664 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_RIGHT
, p
, 0);
1667 static HRESULT WINAPI
HTMLStyle_put_paddingBottom(IHTMLStyle
*iface
, VARIANT v
)
1669 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1671 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1673 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_BOTTOM
, &v
, ATTR_FIX_PX
);
1676 static HRESULT WINAPI
HTMLStyle_get_paddingBottom(IHTMLStyle
*iface
, VARIANT
*p
)
1678 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1680 TRACE("(%p)->(%p)\n", This
, p
);
1682 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_BOTTOM
, p
, 0);
1685 static HRESULT WINAPI
HTMLStyle_put_paddingLeft(IHTMLStyle
*iface
, VARIANT v
)
1687 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1689 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1691 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_LEFT
, &v
, ATTR_FIX_PX
);
1694 static HRESULT WINAPI
HTMLStyle_get_paddingLeft(IHTMLStyle
*iface
, VARIANT
*p
)
1696 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1698 TRACE("(%p)->(%p)\n", This
, p
);
1700 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_LEFT
, p
, 0);
1703 static HRESULT WINAPI
HTMLStyle_put_padding(IHTMLStyle
*iface
, BSTR v
)
1705 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1707 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1709 return set_style_attr(This
, STYLEID_PADDING
, v
, 0);
1712 static HRESULT WINAPI
HTMLStyle_get_padding(IHTMLStyle
*iface
, BSTR
*p
)
1714 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1716 TRACE("(%p)->(%p)\n", This
, p
);
1718 return get_style_attr(This
, STYLEID_PADDING
, p
);
1721 static HRESULT WINAPI
HTMLStyle_put_border(IHTMLStyle
*iface
, BSTR v
)
1723 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1725 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1727 return set_style_attr(This
, STYLEID_BORDER
, v
, 0);
1730 static HRESULT WINAPI
HTMLStyle_get_border(IHTMLStyle
*iface
, BSTR
*p
)
1732 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1734 TRACE("(%p)->(%p)\n", This
, p
);
1736 return get_style_attr(This
, STYLEID_BORDER
, p
);
1739 static HRESULT WINAPI
HTMLStyle_put_borderTop(IHTMLStyle
*iface
, BSTR v
)
1741 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1742 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1743 return set_style_attr(This
, STYLEID_BORDER_TOP
, v
, ATTR_FIX_PX
);
1746 static HRESULT WINAPI
HTMLStyle_get_borderTop(IHTMLStyle
*iface
, BSTR
*p
)
1748 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1749 TRACE("(%p)->(%p)\n", This
, p
);
1750 return get_style_attr(This
, STYLEID_BORDER_TOP
, p
);
1753 static HRESULT WINAPI
HTMLStyle_put_borderRight(IHTMLStyle
*iface
, BSTR v
)
1755 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1756 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1757 return set_style_attr(This
, STYLEID_BORDER_RIGHT
, v
, ATTR_FIX_PX
);
1760 static HRESULT WINAPI
HTMLStyle_get_borderRight(IHTMLStyle
*iface
, BSTR
*p
)
1762 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1763 TRACE("(%p)->(%p)\n", This
, p
);
1764 return get_style_attr(This
, STYLEID_BORDER_RIGHT
, p
);
1767 static HRESULT WINAPI
HTMLStyle_put_borderBottom(IHTMLStyle
*iface
, BSTR v
)
1769 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1770 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1771 return set_style_attr(This
, STYLEID_BORDER_BOTTOM
, v
, ATTR_FIX_PX
);
1774 static HRESULT WINAPI
HTMLStyle_get_borderBottom(IHTMLStyle
*iface
, BSTR
*p
)
1776 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1777 TRACE("(%p)->(%p)\n", This
, p
);
1778 return get_style_attr(This
, STYLEID_BORDER_BOTTOM
, p
);
1781 static HRESULT WINAPI
HTMLStyle_put_borderLeft(IHTMLStyle
*iface
, BSTR v
)
1783 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1785 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1787 return set_style_attr(This
, STYLEID_BORDER_LEFT
, v
, ATTR_FIX_PX
);
1790 static HRESULT WINAPI
HTMLStyle_get_borderLeft(IHTMLStyle
*iface
, BSTR
*p
)
1792 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1794 TRACE("(%p)->(%p)\n", This
, p
);
1796 return get_style_attr(This
, STYLEID_BORDER_LEFT
, p
);
1799 static HRESULT WINAPI
HTMLStyle_put_borderColor(IHTMLStyle
*iface
, BSTR v
)
1801 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1803 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1805 return set_style_attr(This
, STYLEID_BORDER_COLOR
, v
, 0);
1808 static HRESULT WINAPI
HTMLStyle_get_borderColor(IHTMLStyle
*iface
, BSTR
*p
)
1810 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1812 TRACE("(%p)->(%p)\n", This
, p
);
1814 return get_style_attr(This
, STYLEID_BORDER_COLOR
, p
);
1817 static HRESULT WINAPI
HTMLStyle_put_borderTopColor(IHTMLStyle
*iface
, VARIANT v
)
1819 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1821 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1823 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_COLOR
, &v
, ATTR_HEX_INT
);
1826 static HRESULT WINAPI
HTMLStyle_get_borderTopColor(IHTMLStyle
*iface
, VARIANT
*p
)
1828 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1830 TRACE("(%p)->(%p)\n", This
, p
);
1832 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_COLOR
, p
, 0);
1835 static HRESULT WINAPI
HTMLStyle_put_borderRightColor(IHTMLStyle
*iface
, VARIANT v
)
1837 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1839 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1841 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_COLOR
, &v
, ATTR_HEX_INT
);
1844 static HRESULT WINAPI
HTMLStyle_get_borderRightColor(IHTMLStyle
*iface
, VARIANT
*p
)
1846 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1848 TRACE("(%p)->(%p)\n", This
, p
);
1850 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_COLOR
, p
, 0);
1853 static HRESULT WINAPI
HTMLStyle_put_borderBottomColor(IHTMLStyle
*iface
, VARIANT v
)
1855 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1857 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1859 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_COLOR
, &v
, ATTR_HEX_INT
);
1862 static HRESULT WINAPI
HTMLStyle_get_borderBottomColor(IHTMLStyle
*iface
, VARIANT
*p
)
1864 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1866 TRACE("(%p)->(%p)\n", This
, p
);
1868 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_COLOR
, p
, 0);
1871 static HRESULT WINAPI
HTMLStyle_put_borderLeftColor(IHTMLStyle
*iface
, VARIANT v
)
1873 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1875 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1877 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_LEFT_COLOR
, &v
, ATTR_HEX_INT
);
1880 static HRESULT WINAPI
HTMLStyle_get_borderLeftColor(IHTMLStyle
*iface
, VARIANT
*p
)
1882 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1884 TRACE("(%p)->(%p)\n", This
, p
);
1886 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_LEFT_COLOR
, p
, 0);
1889 static HRESULT WINAPI
HTMLStyle_put_borderWidth(IHTMLStyle
*iface
, BSTR v
)
1891 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1892 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1893 return set_style_attr(This
, STYLEID_BORDER_WIDTH
, v
, ATTR_FIX_PX
);
1896 static HRESULT WINAPI
HTMLStyle_get_borderWidth(IHTMLStyle
*iface
, BSTR
*p
)
1898 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1899 TRACE("(%p)->(%p)\n", This
, p
);
1900 return get_style_attr(This
, STYLEID_BORDER_WIDTH
, p
);
1903 static HRESULT WINAPI
HTMLStyle_put_borderTopWidth(IHTMLStyle
*iface
, VARIANT v
)
1905 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1907 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1909 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_WIDTH
, &v
, 0);
1912 static HRESULT WINAPI
HTMLStyle_get_borderTopWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1914 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1916 TRACE("(%p)->(%p)\n", This
, p
);
1918 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_WIDTH
, p
, 0);
1921 static HRESULT WINAPI
HTMLStyle_put_borderRightWidth(IHTMLStyle
*iface
, VARIANT v
)
1923 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1925 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1927 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_WIDTH
, &v
, 0);
1930 static HRESULT WINAPI
HTMLStyle_get_borderRightWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1932 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1934 TRACE("(%p)->(%p)\n", This
, p
);
1936 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_WIDTH
, p
, 0);
1939 static HRESULT WINAPI
HTMLStyle_put_borderBottomWidth(IHTMLStyle
*iface
, VARIANT v
)
1941 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1943 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1945 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_WIDTH
, &v
, 0);
1948 static HRESULT WINAPI
HTMLStyle_get_borderBottomWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1950 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1951 TRACE("(%p)->(%p)\n", This
, p
);
1952 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_WIDTH
, p
, 0);
1955 static HRESULT WINAPI
HTMLStyle_put_borderLeftWidth(IHTMLStyle
*iface
, VARIANT v
)
1957 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1959 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1961 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_LEFT_WIDTH
, &v
, 0);
1964 static HRESULT WINAPI
HTMLStyle_get_borderLeftWidth(IHTMLStyle
*iface
, VARIANT
*p
)
1966 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1967 TRACE("(%p)->(%p)\n", This
, p
);
1968 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_LEFT_WIDTH
, p
, 0);
1971 static HRESULT WINAPI
HTMLStyle_put_borderStyle(IHTMLStyle
*iface
, BSTR v
)
1973 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
1974 static const WCHAR styleWindowInset
[] = {'w','i','n','d','o','w','-','i','n','s','e','t',0};
1975 HRESULT hres
= S_OK
;
1980 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1982 while(v
[i
] && hres
== S_OK
)
1984 if(v
[i
] == (WCHAR
)' ')
1986 pstyle
= SysAllocStringLen(&v
[last
], (i
-last
));
1987 if( !(is_valid_border_style(pstyle
) || strcmpiW(styleWindowInset
, pstyle
) == 0))
1989 TRACE("1. Invalid style (%s)\n", debugstr_w(pstyle
));
1990 hres
= E_INVALIDARG
;
1992 SysFreeString(pstyle
);
2000 pstyle
= SysAllocStringLen(&v
[last
], i
-last
);
2001 if( !(is_valid_border_style(pstyle
) || strcmpiW(styleWindowInset
, pstyle
) == 0))
2003 TRACE("2. Invalid style (%s)\n", debugstr_w(pstyle
));
2004 hres
= E_INVALIDARG
;
2006 SysFreeString(pstyle
);
2010 hres
= set_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_STYLE
, v
, 0);
2015 static HRESULT WINAPI
HTMLStyle_get_borderStyle(IHTMLStyle
*iface
, BSTR
*p
)
2017 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2018 TRACE("(%p)->(%p)\n", This
, p
);
2019 return get_style_attr(This
, STYLEID_BORDER_STYLE
, p
);
2022 static HRESULT WINAPI
HTMLStyle_put_borderTopStyle(IHTMLStyle
*iface
, BSTR v
)
2024 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2025 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2027 if(!is_valid_border_style(v
))
2028 return E_INVALIDARG
;
2030 return set_style_attr(This
, STYLEID_BORDER_TOP_STYLE
, v
, 0);
2033 static HRESULT WINAPI
HTMLStyle_get_borderTopStyle(IHTMLStyle
*iface
, BSTR
*p
)
2035 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2036 TRACE("(%p)->(%p)\n", This
, p
);
2037 return get_style_attr(This
, STYLEID_BORDER_TOP_STYLE
, p
);
2040 static HRESULT WINAPI
HTMLStyle_put_borderRightStyle(IHTMLStyle
*iface
, BSTR v
)
2042 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2043 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2045 if(!is_valid_border_style(v
))
2046 return E_INVALIDARG
;
2048 return set_style_attr(This
, STYLEID_BORDER_RIGHT_STYLE
, v
, 0);
2051 static HRESULT WINAPI
HTMLStyle_get_borderRightStyle(IHTMLStyle
*iface
, BSTR
*p
)
2053 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2054 TRACE("(%p)->(%p)\n", This
, p
);
2055 return get_style_attr(This
, STYLEID_BORDER_RIGHT_STYLE
, p
);
2058 static HRESULT WINAPI
HTMLStyle_put_borderBottomStyle(IHTMLStyle
*iface
, BSTR v
)
2060 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2061 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2063 if(!is_valid_border_style(v
))
2064 return E_INVALIDARG
;
2066 return set_style_attr(This
, STYLEID_BORDER_BOTTOM_STYLE
, v
, 0);
2069 static HRESULT WINAPI
HTMLStyle_get_borderBottomStyle(IHTMLStyle
*iface
, BSTR
*p
)
2071 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2072 TRACE("(%p)->(%p)\n", This
, p
);
2073 return get_style_attr(This
, STYLEID_BORDER_BOTTOM_STYLE
, p
);
2076 static HRESULT WINAPI
HTMLStyle_put_borderLeftStyle(IHTMLStyle
*iface
, BSTR v
)
2078 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2079 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2081 if(!is_valid_border_style(v
))
2082 return E_INVALIDARG
;
2084 return set_style_attr(This
, STYLEID_BORDER_LEFT_STYLE
, v
, 0);
2087 static HRESULT WINAPI
HTMLStyle_get_borderLeftStyle(IHTMLStyle
*iface
, BSTR
*p
)
2089 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2090 TRACE("(%p)->(%p)\n", This
, p
);
2091 return get_style_attr(This
, STYLEID_BORDER_LEFT_STYLE
, p
);
2094 static HRESULT WINAPI
HTMLStyle_put_width(IHTMLStyle
*iface
, VARIANT v
)
2096 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2098 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
2100 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_WIDTH
, &v
, ATTR_FIX_PX
);
2103 static HRESULT WINAPI
HTMLStyle_get_width(IHTMLStyle
*iface
, VARIANT
*p
)
2105 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2107 TRACE("(%p)->(%p)\n", This
, p
);
2109 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_WIDTH
, p
, 0);
2112 static HRESULT WINAPI
HTMLStyle_put_height(IHTMLStyle
*iface
, VARIANT v
)
2114 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2116 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
2118 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_HEIGHT
, &v
, ATTR_FIX_PX
);
2121 static HRESULT WINAPI
HTMLStyle_get_height(IHTMLStyle
*iface
, VARIANT
*p
)
2123 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2125 TRACE("(%p)->(%p)\n", This
, p
);
2127 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_HEIGHT
, p
, 0);
2130 static HRESULT WINAPI
HTMLStyle_put_styleFloat(IHTMLStyle
*iface
, BSTR v
)
2132 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2134 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2136 return set_style_attr(This
, STYLEID_FLOAT
, v
, 0);
2139 static HRESULT WINAPI
HTMLStyle_get_styleFloat(IHTMLStyle
*iface
, BSTR
*p
)
2141 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2143 TRACE("(%p)->(%p)\n", This
, p
);
2145 return get_style_attr(This
, STYLEID_FLOAT
, p
);
2148 static HRESULT WINAPI
HTMLStyle_put_clear(IHTMLStyle
*iface
, BSTR v
)
2150 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2152 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2154 return set_style_attr(This
, STYLEID_CLEAR
, v
, 0);
2157 static HRESULT WINAPI
HTMLStyle_get_clear(IHTMLStyle
*iface
, BSTR
*p
)
2159 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2161 TRACE("(%p)->(%p)\n", This
, p
);
2163 return get_style_attr(This
, STYLEID_CLEAR
, p
);
2166 static HRESULT WINAPI
HTMLStyle_put_display(IHTMLStyle
*iface
, BSTR v
)
2168 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2170 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2172 return set_style_attr(This
, STYLEID_DISPLAY
, v
, 0);
2175 static HRESULT WINAPI
HTMLStyle_get_display(IHTMLStyle
*iface
, BSTR
*p
)
2177 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2179 TRACE("(%p)->(%p)\n", This
, p
);
2181 return get_style_attr(This
, STYLEID_DISPLAY
, p
);
2184 static HRESULT WINAPI
HTMLStyle_put_visibility(IHTMLStyle
*iface
, BSTR v
)
2186 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2188 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2190 return set_style_attr(This
, STYLEID_VISIBILITY
, v
, 0);
2193 static HRESULT WINAPI
HTMLStyle_get_visibility(IHTMLStyle
*iface
, BSTR
*p
)
2195 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2197 TRACE("(%p)->(%p)\n", This
, p
);
2199 return get_style_attr(This
, STYLEID_VISIBILITY
, p
);
2202 static HRESULT WINAPI
HTMLStyle_put_listStyleType(IHTMLStyle
*iface
, BSTR v
)
2204 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2206 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2208 return set_style_attr(This
, STYLEID_LISTSTYLETYPE
, v
, 0);
2211 static HRESULT WINAPI
HTMLStyle_get_listStyleType(IHTMLStyle
*iface
, BSTR
*p
)
2213 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2215 TRACE("(%p)->(%p)\n", This
, p
);
2217 return get_style_attr(This
, STYLEID_LISTSTYLETYPE
, p
);
2220 static HRESULT WINAPI
HTMLStyle_put_listStylePosition(IHTMLStyle
*iface
, BSTR v
)
2222 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2224 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2226 return set_style_attr(This
, STYLEID_LISTSTYLEPOSITION
, v
, 0);
2229 static HRESULT WINAPI
HTMLStyle_get_listStylePosition(IHTMLStyle
*iface
, BSTR
*p
)
2231 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2233 TRACE("(%p)->(%p)\n", This
, p
);
2235 return get_style_attr(This
, STYLEID_LISTSTYLEPOSITION
, p
);
2238 static HRESULT WINAPI
HTMLStyle_put_listStyleImage(IHTMLStyle
*iface
, BSTR v
)
2240 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2241 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
2245 static HRESULT WINAPI
HTMLStyle_get_listStyleImage(IHTMLStyle
*iface
, BSTR
*p
)
2247 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2248 FIXME("(%p)->(%p)\n", This
, p
);
2252 static HRESULT WINAPI
HTMLStyle_put_listStyle(IHTMLStyle
*iface
, BSTR v
)
2254 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2256 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2258 return set_style_attr(This
, STYLEID_LIST_STYLE
, v
, 0);
2261 static HRESULT WINAPI
HTMLStyle_get_listStyle(IHTMLStyle
*iface
, BSTR
*p
)
2263 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2265 TRACE("(%p)->(%p)\n", This
, p
);
2267 return get_style_attr(This
, STYLEID_LIST_STYLE
, p
);
2270 static HRESULT WINAPI
HTMLStyle_put_whiteSpace(IHTMLStyle
*iface
, BSTR v
)
2272 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2274 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2276 return set_nsstyle_attr(This
->nsstyle
, STYLEID_WHITE_SPACE
, v
, 0);
2279 static HRESULT WINAPI
HTMLStyle_get_whiteSpace(IHTMLStyle
*iface
, BSTR
*p
)
2281 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2283 TRACE("(%p)->(%p)\n", This
, p
);
2285 return get_nsstyle_attr(This
->nsstyle
, STYLEID_WHITE_SPACE
, p
, 0);
2288 static HRESULT WINAPI
HTMLStyle_put_top(IHTMLStyle
*iface
, VARIANT v
)
2290 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2292 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
2294 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_TOP
, &v
, 0);
2297 static HRESULT WINAPI
HTMLStyle_get_top(IHTMLStyle
*iface
, VARIANT
*p
)
2299 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2301 TRACE("(%p)->(%p)\n", This
, p
);
2303 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_TOP
, p
, 0);
2306 static HRESULT WINAPI
HTMLStyle_put_left(IHTMLStyle
*iface
, VARIANT v
)
2308 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2310 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
2312 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_LEFT
, &v
, 0);
2315 static HRESULT WINAPI
HTMLStyle_get_left(IHTMLStyle
*iface
, VARIANT
*p
)
2317 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2319 TRACE("(%p)->(%p)\n", This
, p
);
2321 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LEFT
, p
, 0);
2324 static HRESULT WINAPI
HTMLStyle_get_position(IHTMLStyle
*iface
, BSTR
*p
)
2326 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2327 TRACE("(%p)->(%p)\n", This
, p
);
2328 return IHTMLStyle2_get_position(&This
->IHTMLStyle2_iface
, p
);
2331 static HRESULT WINAPI
HTMLStyle_put_zIndex(IHTMLStyle
*iface
, VARIANT v
)
2333 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2335 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
2337 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_Z_INDEX
, &v
, 0);
2340 static HRESULT WINAPI
HTMLStyle_get_zIndex(IHTMLStyle
*iface
, VARIANT
*p
)
2342 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2344 TRACE("(%p)->(%p)\n", This
, p
);
2346 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_Z_INDEX
, p
, ATTR_STR_TO_INT
);
2349 static HRESULT WINAPI
HTMLStyle_put_overflow(IHTMLStyle
*iface
, BSTR v
)
2351 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2352 static const WCHAR szVisible
[] = {'v','i','s','i','b','l','e',0};
2353 static const WCHAR szScroll
[] = {'s','c','r','o','l','l',0};
2354 static const WCHAR szHidden
[] = {'h','i','d','d','e','n',0};
2355 static const WCHAR szAuto
[] = {'a','u','t','o',0};
2357 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2359 /* overflow can only be one of the follow values. */
2360 if(!v
|| !*v
|| strcmpiW(szVisible
, v
) == 0 || strcmpiW(szScroll
, v
) == 0 ||
2361 strcmpiW(szHidden
, v
) == 0 || strcmpiW(szAuto
, v
) == 0)
2363 return set_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW
, v
, 0);
2366 return E_INVALIDARG
;
2370 static HRESULT WINAPI
HTMLStyle_get_overflow(IHTMLStyle
*iface
, BSTR
*p
)
2372 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2374 TRACE("(%p)->(%p)\n", This
, p
);
2377 return E_INVALIDARG
;
2379 return get_style_attr(This
, STYLEID_OVERFLOW
, p
);
2382 static HRESULT WINAPI
HTMLStyle_put_pageBreakBefore(IHTMLStyle
*iface
, BSTR v
)
2384 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2386 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2388 return set_nsstyle_attr(This
->nsstyle
, STYLEID_PAGE_BREAK_BEFORE
, v
, 0);
2391 static HRESULT WINAPI
HTMLStyle_get_pageBreakBefore(IHTMLStyle
*iface
, BSTR
*p
)
2393 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2395 TRACE("(%p)->(%p)\n", This
, p
);
2397 return get_nsstyle_attr(This
->nsstyle
, STYLEID_PAGE_BREAK_BEFORE
, p
, 0);
2400 static HRESULT WINAPI
HTMLStyle_put_pageBreakAfter(IHTMLStyle
*iface
, BSTR v
)
2402 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2404 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2406 return set_nsstyle_attr(This
->nsstyle
, STYLEID_PAGE_BREAK_AFTER
, v
, 0);
2409 static HRESULT WINAPI
HTMLStyle_get_pageBreakAfter(IHTMLStyle
*iface
, BSTR
*p
)
2411 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2413 TRACE("(%p)->(%p)\n", This
, p
);
2415 return get_nsstyle_attr(This
->nsstyle
, STYLEID_PAGE_BREAK_AFTER
, p
, 0);
2418 static HRESULT WINAPI
HTMLStyle_put_cssText(IHTMLStyle
*iface
, BSTR v
)
2420 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2424 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2426 nsAString_InitDepend(&text_str
, v
);
2427 nsres
= nsIDOMCSSStyleDeclaration_SetCssText(This
->nsstyle
, &text_str
);
2428 nsAString_Finish(&text_str
);
2429 if(NS_FAILED(nsres
)) {
2430 FIXME("SetCssStyle failed: %08x\n", nsres
);
2437 static HRESULT WINAPI
HTMLStyle_get_cssText(IHTMLStyle
*iface
, BSTR
*p
)
2439 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2443 TRACE("(%p)->(%p)\n", This
, p
);
2445 /* FIXME: Gecko style formatting is different than IE (uppercase). */
2446 nsAString_Init(&text_str
, NULL
);
2447 nsres
= nsIDOMCSSStyleDeclaration_GetCssText(This
->nsstyle
, &text_str
);
2448 if(NS_SUCCEEDED(nsres
)) {
2449 const PRUnichar
*text
;
2451 nsAString_GetData(&text_str
, &text
);
2452 *p
= *text
? SysAllocString(text
) : NULL
;
2454 FIXME("GetCssStyle failed: %08x\n", nsres
);
2458 nsAString_Finish(&text_str
);
2462 static HRESULT WINAPI
HTMLStyle_put_pixelTop(IHTMLStyle
*iface
, LONG v
)
2464 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2466 TRACE("(%p)->(%d)\n", This
, v
);
2468 return set_style_pxattr(This
->nsstyle
, STYLEID_TOP
, v
);
2471 static HRESULT WINAPI
HTMLStyle_get_pixelTop(IHTMLStyle
*iface
, LONG
*p
)
2473 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2475 TRACE("(%p)->(%p)\n", This
, p
);
2477 return get_nsstyle_pixel_val(This
, STYLEID_TOP
, p
);
2480 static HRESULT WINAPI
HTMLStyle_put_pixelLeft(IHTMLStyle
*iface
, LONG v
)
2482 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2484 TRACE("(%p)->(%d)\n", This
, v
);
2486 return set_style_pxattr(This
->nsstyle
, STYLEID_LEFT
, v
);
2489 static HRESULT WINAPI
HTMLStyle_get_pixelLeft(IHTMLStyle
*iface
, LONG
*p
)
2491 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2493 TRACE("(%p)->(%p)\n", This
, p
);
2495 return get_nsstyle_pixel_val(This
, STYLEID_LEFT
, p
);
2498 static HRESULT WINAPI
HTMLStyle_put_pixelWidth(IHTMLStyle
*iface
, LONG v
)
2500 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2502 TRACE("(%p)->()\n", This
);
2504 return set_style_pxattr(This
->nsstyle
, STYLEID_WIDTH
, v
);
2507 static HRESULT WINAPI
HTMLStyle_get_pixelWidth(IHTMLStyle
*iface
, LONG
*p
)
2509 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2511 TRACE("(%p)->(%p)\n", This
, p
);
2513 return get_nsstyle_pixel_val(This
, STYLEID_WIDTH
, p
);
2516 static HRESULT WINAPI
HTMLStyle_put_pixelHeight(IHTMLStyle
*iface
, LONG v
)
2518 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2520 TRACE("(%p)->(%d)\n", This
, v
);
2522 return set_style_pxattr(This
->nsstyle
, STYLEID_HEIGHT
, v
);
2525 static HRESULT WINAPI
HTMLStyle_get_pixelHeight(IHTMLStyle
*iface
, LONG
*p
)
2527 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2529 TRACE("(%p)->(%p)\n", This
, p
);
2531 return get_nsstyle_pixel_val(This
, STYLEID_HEIGHT
, p
);
2534 static HRESULT WINAPI
HTMLStyle_put_posTop(IHTMLStyle
*iface
, float v
)
2536 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2538 TRACE("(%p)->(%f)\n", This
, v
);
2540 return set_style_pos(This
, STYLEID_TOP
, v
);
2543 static HRESULT WINAPI
HTMLStyle_get_posTop(IHTMLStyle
*iface
, float *p
)
2545 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2547 TRACE("(%p)->(%p)\n", This
, p
);
2552 return get_nsstyle_pos(This
, STYLEID_TOP
, p
);
2555 static HRESULT WINAPI
HTMLStyle_put_posLeft(IHTMLStyle
*iface
, float v
)
2557 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2559 TRACE("(%p)->(%f)\n", This
, v
);
2561 return set_style_pos(This
, STYLEID_LEFT
, v
);
2564 static HRESULT WINAPI
HTMLStyle_get_posLeft(IHTMLStyle
*iface
, float *p
)
2566 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2568 TRACE("(%p)->(%p)\n", This
, p
);
2573 return get_nsstyle_pos(This
, STYLEID_LEFT
, p
);
2576 static HRESULT WINAPI
HTMLStyle_put_posWidth(IHTMLStyle
*iface
, float v
)
2578 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2580 TRACE("(%p)->(%f)\n", This
, v
);
2582 return set_style_pos(This
, STYLEID_WIDTH
, v
);
2585 static HRESULT WINAPI
HTMLStyle_get_posWidth(IHTMLStyle
*iface
, float *p
)
2587 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2589 TRACE("(%p)->(%p)\n", This
, p
);
2594 if(get_nsstyle_pos(This
, STYLEID_WIDTH
, p
) != S_OK
)
2600 static HRESULT WINAPI
HTMLStyle_put_posHeight(IHTMLStyle
*iface
, float v
)
2602 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2604 TRACE("(%p)->(%f)\n", This
, v
);
2606 return set_style_pos(This
, STYLEID_HEIGHT
, v
);
2609 static HRESULT WINAPI
HTMLStyle_get_posHeight(IHTMLStyle
*iface
, float *p
)
2611 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2613 TRACE("(%p)->(%p)\n", This
, p
);
2618 if(get_nsstyle_pos(This
, STYLEID_HEIGHT
, p
) != S_OK
)
2624 static HRESULT WINAPI
HTMLStyle_put_cursor(IHTMLStyle
*iface
, BSTR v
)
2626 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2628 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2630 return set_style_attr(This
, STYLEID_CURSOR
, v
, 0);
2633 static HRESULT WINAPI
HTMLStyle_get_cursor(IHTMLStyle
*iface
, BSTR
*p
)
2635 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2637 TRACE("(%p)->(%p)\n", This
, p
);
2639 return get_style_attr(This
, STYLEID_CURSOR
, p
);
2642 static HRESULT WINAPI
HTMLStyle_put_clip(IHTMLStyle
*iface
, BSTR v
)
2644 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2646 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2648 return set_style_attr(This
, STYLEID_CLIP
, v
, 0);
2651 static HRESULT WINAPI
HTMLStyle_get_clip(IHTMLStyle
*iface
, BSTR
*p
)
2653 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2655 TRACE("(%p)->(%p)\n", This
, p
);
2657 return get_nsstyle_attr(This
->nsstyle
, STYLEID_CLIP
, p
, ATTR_REMOVE_COMMA
);
2660 static void set_opacity(HTMLStyle
*This
, const WCHAR
*val
)
2662 nsAString name_str
, val_str
, empty_str
;
2665 static const WCHAR opacityW
[] = {'o','p','a','c','i','t','y',0};
2667 TRACE("%s\n", debugstr_w(val
));
2669 nsAString_InitDepend(&name_str
, opacityW
);
2670 nsAString_InitDepend(&val_str
, val
);
2671 nsAString_InitDepend(&empty_str
, emptyW
);
2673 nsres
= nsIDOMCSSStyleDeclaration_SetProperty(This
->nsstyle
, &name_str
, &val_str
, &empty_str
);
2674 if(NS_FAILED(nsres
))
2675 ERR("SetProperty failed: %08x\n", nsres
);
2677 nsAString_Finish(&name_str
);
2678 nsAString_Finish(&val_str
);
2679 nsAString_Finish(&empty_str
);
2682 static void update_filter(HTMLStyle
*This
)
2684 const WCHAR
*ptr
= This
->elem
->filter
, *ptr2
;
2686 static const WCHAR alphaW
[] = {'a','l','p','h','a'};
2689 set_opacity(This
, emptyW
);
2694 while(isspaceW(*ptr
))
2700 while(isalnumW(*ptr
))
2703 WARN("unexpected char '%c'\n", *ptr
);
2707 WARN("expected '('\n");
2711 if(ptr2
+ sizeof(alphaW
)/sizeof(WCHAR
) == ptr
&& !memcmp(ptr2
, alphaW
, sizeof(alphaW
))) {
2712 static const WCHAR formatW
[] = {'%','f',0};
2713 static const WCHAR opacityW
[] = {'o','p','a','c','i','t','y','='};
2717 while(isspaceW(*ptr
))
2721 while(*ptr
&& *ptr
!= ',' && *ptr
!= ')')
2724 WARN("unexpected end of string\n");
2728 if(ptr
-ptr2
> sizeof(opacityW
)/sizeof(WCHAR
) && !memcmp(ptr2
, opacityW
, sizeof(opacityW
))) {
2729 float fval
= 0.0f
, e
= 0.1f
;
2732 ptr2
+= sizeof(opacityW
)/sizeof(WCHAR
);
2734 while(isdigitW(*ptr2
))
2735 fval
= fval
*10.0f
+ (float)(*ptr2
++ - '0');
2738 while(isdigitW(*++ptr2
)) {
2739 fval
+= e
* (float)(*ptr2
++ - '0');
2744 sprintfW(buf
, formatW
, fval
* 0.01f
);
2745 set_opacity(This
, buf
);
2747 FIXME("unknown param %s\n", debugstr_wn(ptr2
, ptr
-ptr2
));
2752 }while(*ptr
!= ')');
2754 FIXME("unknown filter %s\n", debugstr_wn(ptr2
, ptr
-ptr2
));
2755 ptr
= strchrW(ptr
, ')');
2763 static HRESULT WINAPI
HTMLStyle_put_filter(IHTMLStyle
*iface
, BSTR v
)
2765 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2766 WCHAR
*new_filter
= NULL
;
2768 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
2771 FIXME("Element already destroyed\n");
2772 return E_UNEXPECTED
;
2776 new_filter
= heap_strdupW(v
);
2778 return E_OUTOFMEMORY
;
2781 heap_free(This
->elem
->filter
);
2782 This
->elem
->filter
= new_filter
;
2784 update_filter(This
);
2788 static HRESULT WINAPI
HTMLStyle_get_filter(IHTMLStyle
*iface
, BSTR
*p
)
2790 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2792 TRACE("(%p)->(%p)\n", This
, p
);
2795 FIXME("Element already destroyed\n");
2796 return E_UNEXPECTED
;
2799 if(This
->elem
->filter
) {
2800 *p
= SysAllocString(This
->elem
->filter
);
2802 return E_OUTOFMEMORY
;
2810 static HRESULT WINAPI
HTMLStyle_setAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2811 VARIANT AttributeValue
, LONG lFlags
)
2813 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2817 TRACE("(%p)->(%s %s %08x)\n", This
, debugstr_w(strAttributeName
),
2818 debugstr_variant(&AttributeValue
), lFlags
);
2820 if(!strAttributeName
)
2821 return E_INVALIDARG
;
2824 FIXME("Parameter lFlags ignored\n");
2826 hres
= HTMLStyle_GetIDsOfNames(iface
, &IID_NULL
, &strAttributeName
, 1,
2827 LOCALE_USER_DEFAULT
, &dispid
);
2831 DISPID dispidNamed
= DISPID_PROPERTYPUT
;
2835 params
.rgvarg
= &AttributeValue
;
2836 params
.cNamedArgs
= 1;
2837 params
.rgdispidNamedArgs
= &dispidNamed
;
2839 hres
= HTMLStyle_Invoke(iface
, dispid
, &IID_NULL
, LOCALE_SYSTEM_DEFAULT
,
2840 DISPATCH_PROPERTYPUT
, ¶ms
, &ret
, NULL
, NULL
);
2844 FIXME("Custom attributes not supported.\n");
2847 TRACE("ret: %08x\n", hres
);
2852 static HRESULT WINAPI
HTMLStyle_getAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2853 LONG lFlags
, VARIANT
*AttributeValue
)
2855 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2859 TRACE("(%p)->(%s v%p %08x)\n", This
, debugstr_w(strAttributeName
),
2860 AttributeValue
, lFlags
);
2862 if(!AttributeValue
|| !strAttributeName
)
2863 return E_INVALIDARG
;
2866 FIXME("Parameter lFlags ignored\n");
2868 hres
= HTMLStyle_GetIDsOfNames(iface
, &IID_NULL
, &strAttributeName
, 1,
2869 LOCALE_USER_DEFAULT
, &dispid
);
2872 DISPPARAMS params
= {NULL
, NULL
, 0, 0 };
2874 hres
= HTMLStyle_Invoke(iface
, dispid
, &IID_NULL
, LOCALE_SYSTEM_DEFAULT
,
2875 DISPATCH_PROPERTYGET
, ¶ms
, AttributeValue
, NULL
, NULL
);
2879 FIXME("Custom attributes not supported.\n");
2885 static HRESULT WINAPI
HTMLStyle_removeAttribute(IHTMLStyle
*iface
, BSTR strAttributeName
,
2886 LONG lFlags
, VARIANT_BOOL
*pfSuccess
)
2888 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2889 const style_tbl_entry_t
*style_entry
;
2890 nsAString name_str
, ret_str
;
2894 TRACE("(%p)->(%s %08x %p)\n", This
, debugstr_w(strAttributeName
), lFlags
, pfSuccess
);
2896 style_entry
= lookup_style_tbl(strAttributeName
);
2901 hres
= IDispatchEx_GetDispID(&This
->dispex
.IDispatchEx_iface
, strAttributeName
,
2902 (lFlags
&1) ? fdexNameCaseSensitive
: fdexNameCaseInsensitive
, &dispid
);
2904 *pfSuccess
= VARIANT_FALSE
;
2908 for(i
=0; i
< sizeof(style_tbl
)/sizeof(*style_tbl
); i
++) {
2909 if(dispid
== style_tbl
[i
].dispid
)
2913 if(i
== sizeof(style_tbl
)/sizeof(*style_tbl
))
2914 return remove_attribute(&This
->dispex
, dispid
, pfSuccess
);
2915 style_entry
= style_tbl
+i
;
2918 /* filter property is a special case */
2919 if(style_entry
->dispid
== DISPID_IHTMLSTYLE_FILTER
) {
2920 *pfSuccess
= This
->elem
->filter
&& *This
->elem
->filter
? VARIANT_TRUE
: VARIANT_FALSE
;
2921 heap_free(This
->elem
->filter
);
2922 This
->elem
->filter
= NULL
;
2923 update_filter(This
);
2927 nsAString_InitDepend(&name_str
, style_entry
->name
);
2928 nsAString_Init(&ret_str
, NULL
);
2929 nsres
= nsIDOMCSSStyleDeclaration_RemoveProperty(This
->nsstyle
, &name_str
, &ret_str
);
2930 if(NS_SUCCEEDED(nsres
)) {
2931 const PRUnichar
*ret
;
2932 nsAString_GetData(&ret_str
, &ret
);
2933 *pfSuccess
= *ret
? VARIANT_TRUE
: VARIANT_FALSE
;
2935 ERR("RemoveProperty failed: %08x\n", nsres
);
2937 nsAString_Finish(&name_str
);
2938 nsAString_Finish(&ret_str
);
2939 return NS_SUCCEEDED(nsres
) ? S_OK
: E_FAIL
;
2942 static HRESULT WINAPI
HTMLStyle_toString(IHTMLStyle
*iface
, BSTR
*String
)
2944 HTMLStyle
*This
= impl_from_IHTMLStyle(iface
);
2945 FIXME("(%p)->(%p)\n", This
, String
);
2949 static const IHTMLStyleVtbl HTMLStyleVtbl
= {
2950 HTMLStyle_QueryInterface
,
2953 HTMLStyle_GetTypeInfoCount
,
2954 HTMLStyle_GetTypeInfo
,
2955 HTMLStyle_GetIDsOfNames
,
2957 HTMLStyle_put_fontFamily
,
2958 HTMLStyle_get_fontFamily
,
2959 HTMLStyle_put_fontStyle
,
2960 HTMLStyle_get_fontStyle
,
2961 HTMLStyle_put_fontVariant
,
2962 HTMLStyle_get_fontVariant
,
2963 HTMLStyle_put_fontWeight
,
2964 HTMLStyle_get_fontWeight
,
2965 HTMLStyle_put_fontSize
,
2966 HTMLStyle_get_fontSize
,
2969 HTMLStyle_put_color
,
2970 HTMLStyle_get_color
,
2971 HTMLStyle_put_background
,
2972 HTMLStyle_get_background
,
2973 HTMLStyle_put_backgroundColor
,
2974 HTMLStyle_get_backgroundColor
,
2975 HTMLStyle_put_backgroundImage
,
2976 HTMLStyle_get_backgroundImage
,
2977 HTMLStyle_put_backgroundRepeat
,
2978 HTMLStyle_get_backgroundRepeat
,
2979 HTMLStyle_put_backgroundAttachment
,
2980 HTMLStyle_get_backgroundAttachment
,
2981 HTMLStyle_put_backgroundPosition
,
2982 HTMLStyle_get_backgroundPosition
,
2983 HTMLStyle_put_backgroundPositionX
,
2984 HTMLStyle_get_backgroundPositionX
,
2985 HTMLStyle_put_backgroundPositionY
,
2986 HTMLStyle_get_backgroundPositionY
,
2987 HTMLStyle_put_wordSpacing
,
2988 HTMLStyle_get_wordSpacing
,
2989 HTMLStyle_put_letterSpacing
,
2990 HTMLStyle_get_letterSpacing
,
2991 HTMLStyle_put_textDecoration
,
2992 HTMLStyle_get_textDecoration
,
2993 HTMLStyle_put_textDecorationNone
,
2994 HTMLStyle_get_textDecorationNone
,
2995 HTMLStyle_put_textDecorationUnderline
,
2996 HTMLStyle_get_textDecorationUnderline
,
2997 HTMLStyle_put_textDecorationOverline
,
2998 HTMLStyle_get_textDecorationOverline
,
2999 HTMLStyle_put_textDecorationLineThrough
,
3000 HTMLStyle_get_textDecorationLineThrough
,
3001 HTMLStyle_put_textDecorationBlink
,
3002 HTMLStyle_get_textDecorationBlink
,
3003 HTMLStyle_put_verticalAlign
,
3004 HTMLStyle_get_verticalAlign
,
3005 HTMLStyle_put_textTransform
,
3006 HTMLStyle_get_textTransform
,
3007 HTMLStyle_put_textAlign
,
3008 HTMLStyle_get_textAlign
,
3009 HTMLStyle_put_textIndent
,
3010 HTMLStyle_get_textIndent
,
3011 HTMLStyle_put_lineHeight
,
3012 HTMLStyle_get_lineHeight
,
3013 HTMLStyle_put_marginTop
,
3014 HTMLStyle_get_marginTop
,
3015 HTMLStyle_put_marginRight
,
3016 HTMLStyle_get_marginRight
,
3017 HTMLStyle_put_marginBottom
,
3018 HTMLStyle_get_marginBottom
,
3019 HTMLStyle_put_marginLeft
,
3020 HTMLStyle_get_marginLeft
,
3021 HTMLStyle_put_margin
,
3022 HTMLStyle_get_margin
,
3023 HTMLStyle_put_paddingTop
,
3024 HTMLStyle_get_paddingTop
,
3025 HTMLStyle_put_paddingRight
,
3026 HTMLStyle_get_paddingRight
,
3027 HTMLStyle_put_paddingBottom
,
3028 HTMLStyle_get_paddingBottom
,
3029 HTMLStyle_put_paddingLeft
,
3030 HTMLStyle_get_paddingLeft
,
3031 HTMLStyle_put_padding
,
3032 HTMLStyle_get_padding
,
3033 HTMLStyle_put_border
,
3034 HTMLStyle_get_border
,
3035 HTMLStyle_put_borderTop
,
3036 HTMLStyle_get_borderTop
,
3037 HTMLStyle_put_borderRight
,
3038 HTMLStyle_get_borderRight
,
3039 HTMLStyle_put_borderBottom
,
3040 HTMLStyle_get_borderBottom
,
3041 HTMLStyle_put_borderLeft
,
3042 HTMLStyle_get_borderLeft
,
3043 HTMLStyle_put_borderColor
,
3044 HTMLStyle_get_borderColor
,
3045 HTMLStyle_put_borderTopColor
,
3046 HTMLStyle_get_borderTopColor
,
3047 HTMLStyle_put_borderRightColor
,
3048 HTMLStyle_get_borderRightColor
,
3049 HTMLStyle_put_borderBottomColor
,
3050 HTMLStyle_get_borderBottomColor
,
3051 HTMLStyle_put_borderLeftColor
,
3052 HTMLStyle_get_borderLeftColor
,
3053 HTMLStyle_put_borderWidth
,
3054 HTMLStyle_get_borderWidth
,
3055 HTMLStyle_put_borderTopWidth
,
3056 HTMLStyle_get_borderTopWidth
,
3057 HTMLStyle_put_borderRightWidth
,
3058 HTMLStyle_get_borderRightWidth
,
3059 HTMLStyle_put_borderBottomWidth
,
3060 HTMLStyle_get_borderBottomWidth
,
3061 HTMLStyle_put_borderLeftWidth
,
3062 HTMLStyle_get_borderLeftWidth
,
3063 HTMLStyle_put_borderStyle
,
3064 HTMLStyle_get_borderStyle
,
3065 HTMLStyle_put_borderTopStyle
,
3066 HTMLStyle_get_borderTopStyle
,
3067 HTMLStyle_put_borderRightStyle
,
3068 HTMLStyle_get_borderRightStyle
,
3069 HTMLStyle_put_borderBottomStyle
,
3070 HTMLStyle_get_borderBottomStyle
,
3071 HTMLStyle_put_borderLeftStyle
,
3072 HTMLStyle_get_borderLeftStyle
,
3073 HTMLStyle_put_width
,
3074 HTMLStyle_get_width
,
3075 HTMLStyle_put_height
,
3076 HTMLStyle_get_height
,
3077 HTMLStyle_put_styleFloat
,
3078 HTMLStyle_get_styleFloat
,
3079 HTMLStyle_put_clear
,
3080 HTMLStyle_get_clear
,
3081 HTMLStyle_put_display
,
3082 HTMLStyle_get_display
,
3083 HTMLStyle_put_visibility
,
3084 HTMLStyle_get_visibility
,
3085 HTMLStyle_put_listStyleType
,
3086 HTMLStyle_get_listStyleType
,
3087 HTMLStyle_put_listStylePosition
,
3088 HTMLStyle_get_listStylePosition
,
3089 HTMLStyle_put_listStyleImage
,
3090 HTMLStyle_get_listStyleImage
,
3091 HTMLStyle_put_listStyle
,
3092 HTMLStyle_get_listStyle
,
3093 HTMLStyle_put_whiteSpace
,
3094 HTMLStyle_get_whiteSpace
,
3099 HTMLStyle_get_position
,
3100 HTMLStyle_put_zIndex
,
3101 HTMLStyle_get_zIndex
,
3102 HTMLStyle_put_overflow
,
3103 HTMLStyle_get_overflow
,
3104 HTMLStyle_put_pageBreakBefore
,
3105 HTMLStyle_get_pageBreakBefore
,
3106 HTMLStyle_put_pageBreakAfter
,
3107 HTMLStyle_get_pageBreakAfter
,
3108 HTMLStyle_put_cssText
,
3109 HTMLStyle_get_cssText
,
3110 HTMLStyle_put_pixelTop
,
3111 HTMLStyle_get_pixelTop
,
3112 HTMLStyle_put_pixelLeft
,
3113 HTMLStyle_get_pixelLeft
,
3114 HTMLStyle_put_pixelWidth
,
3115 HTMLStyle_get_pixelWidth
,
3116 HTMLStyle_put_pixelHeight
,
3117 HTMLStyle_get_pixelHeight
,
3118 HTMLStyle_put_posTop
,
3119 HTMLStyle_get_posTop
,
3120 HTMLStyle_put_posLeft
,
3121 HTMLStyle_get_posLeft
,
3122 HTMLStyle_put_posWidth
,
3123 HTMLStyle_get_posWidth
,
3124 HTMLStyle_put_posHeight
,
3125 HTMLStyle_get_posHeight
,
3126 HTMLStyle_put_cursor
,
3127 HTMLStyle_get_cursor
,
3130 HTMLStyle_put_filter
,
3131 HTMLStyle_get_filter
,
3132 HTMLStyle_setAttribute
,
3133 HTMLStyle_getAttribute
,
3134 HTMLStyle_removeAttribute
,
3138 static inline HTMLStyle
*impl_from_IHTMLStyle2(IHTMLStyle2
*iface
)
3140 return CONTAINING_RECORD(iface
, HTMLStyle
, IHTMLStyle2_iface
);
3143 static HRESULT WINAPI
HTMLStyle2_QueryInterface(IHTMLStyle2
*iface
, REFIID riid
, void **ppv
)
3145 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3147 return IHTMLStyle_QueryInterface(&This
->IHTMLStyle_iface
, riid
, ppv
);
3150 static ULONG WINAPI
HTMLStyle2_AddRef(IHTMLStyle2
*iface
)
3152 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3154 return IHTMLStyle_AddRef(&This
->IHTMLStyle_iface
);
3157 static ULONG WINAPI
HTMLStyle2_Release(IHTMLStyle2
*iface
)
3159 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3161 return IHTMLStyle_Release(&This
->IHTMLStyle_iface
);
3164 static HRESULT WINAPI
HTMLStyle2_GetTypeInfoCount(IHTMLStyle2
*iface
, UINT
*pctinfo
)
3166 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3167 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
3170 static HRESULT WINAPI
HTMLStyle2_GetTypeInfo(IHTMLStyle2
*iface
, UINT iTInfo
,
3171 LCID lcid
, ITypeInfo
**ppTInfo
)
3173 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3174 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
3177 static HRESULT WINAPI
HTMLStyle2_GetIDsOfNames(IHTMLStyle2
*iface
, REFIID riid
,
3178 LPOLESTR
*rgszNames
, UINT cNames
,
3179 LCID lcid
, DISPID
*rgDispId
)
3181 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3182 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
3186 static HRESULT WINAPI
HTMLStyle2_Invoke(IHTMLStyle2
*iface
, DISPID dispIdMember
,
3187 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
3188 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
3190 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3191 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
3192 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
3195 static HRESULT WINAPI
HTMLStyle2_put_tableLayout(IHTMLStyle2
*iface
, BSTR v
)
3197 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3199 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
3201 return set_nsstyle_attr(This
->nsstyle
, STYLEID_TABLE_LAYOUT
, v
, 0);
3204 static HRESULT WINAPI
HTMLStyle2_get_tableLayout(IHTMLStyle2
*iface
, BSTR
*p
)
3206 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3208 TRACE("(%p)->(%p)\n", This
, p
);
3210 return get_nsstyle_attr(This
->nsstyle
, STYLEID_TABLE_LAYOUT
, p
, 0);
3213 static HRESULT WINAPI
HTMLStyle2_put_borderCollapse(IHTMLStyle2
*iface
, BSTR v
)
3215 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3216 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3220 static HRESULT WINAPI
HTMLStyle2_get_borderCollapse(IHTMLStyle2
*iface
, BSTR
*p
)
3222 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3223 FIXME("(%p)->(%p)\n", This
, p
);
3227 static HRESULT WINAPI
HTMLStyle2_put_direction(IHTMLStyle2
*iface
, BSTR v
)
3229 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3231 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
3233 return set_nsstyle_attr(This
->nsstyle
, STYLEID_DIRECTION
, v
, 0);
3236 static HRESULT WINAPI
HTMLStyle2_get_direction(IHTMLStyle2
*iface
, BSTR
*p
)
3238 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3240 TRACE("(%p)->(%p)\n", This
, p
);
3242 return get_nsstyle_attr(This
->nsstyle
, STYLEID_DIRECTION
, p
, 0);
3245 static HRESULT WINAPI
HTMLStyle2_put_behavior(IHTMLStyle2
*iface
, BSTR v
)
3247 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3248 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3252 static HRESULT WINAPI
HTMLStyle2_get_behavior(IHTMLStyle2
*iface
, BSTR
*p
)
3254 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3255 FIXME("(%p)->(%p)\n", This
, p
);
3259 static HRESULT WINAPI
HTMLStyle2_setExpression(IHTMLStyle2
*iface
, BSTR propname
, BSTR expression
, BSTR language
)
3261 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3262 FIXME("(%p)->(%s %s %s)\n", This
, debugstr_w(propname
), debugstr_w(expression
), debugstr_w(language
));
3266 static HRESULT WINAPI
HTMLStyle2_getExpression(IHTMLStyle2
*iface
, BSTR propname
, VARIANT
*expression
)
3268 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3269 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(propname
), expression
);
3273 static HRESULT WINAPI
HTMLStyle2_removeExpression(IHTMLStyle2
*iface
, BSTR propname
, VARIANT_BOOL
*pfSuccess
)
3275 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3276 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(propname
), pfSuccess
);
3280 static HRESULT WINAPI
HTMLStyle2_put_position(IHTMLStyle2
*iface
, BSTR v
)
3282 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3284 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
3286 return set_nsstyle_attr(This
->nsstyle
, STYLEID_POSITION
, v
, 0);
3289 static HRESULT WINAPI
HTMLStyle2_get_position(IHTMLStyle2
*iface
, BSTR
*p
)
3291 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3293 TRACE("(%p)->(%p)\n", This
, p
);
3295 return get_nsstyle_attr(This
->nsstyle
, STYLEID_POSITION
, p
, 0);
3298 static HRESULT WINAPI
HTMLStyle2_put_unicodeBidi(IHTMLStyle2
*iface
, BSTR v
)
3300 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3301 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3305 static HRESULT WINAPI
HTMLStyle2_get_unicodeBidi(IHTMLStyle2
*iface
, BSTR
*p
)
3307 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3308 FIXME("(%p)->(%p)\n", This
, p
);
3312 static HRESULT WINAPI
HTMLStyle2_put_bottom(IHTMLStyle2
*iface
, VARIANT v
)
3314 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3316 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3318 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_BOTTOM
, &v
, ATTR_FIX_PX
);
3321 static HRESULT WINAPI
HTMLStyle2_get_bottom(IHTMLStyle2
*iface
, VARIANT
*p
)
3323 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3325 TRACE("(%p)->(%p)\n", This
, p
);
3327 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BOTTOM
, p
, 0);
3330 static HRESULT WINAPI
HTMLStyle2_put_right(IHTMLStyle2
*iface
, VARIANT v
)
3332 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3334 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3336 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_RIGHT
, &v
, 0);
3339 static HRESULT WINAPI
HTMLStyle2_get_right(IHTMLStyle2
*iface
, VARIANT
*p
)
3341 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3343 TRACE("(%p)->(%p)\n", This
, p
);
3345 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_RIGHT
, p
, 0);
3348 static HRESULT WINAPI
HTMLStyle2_put_pixelBottom(IHTMLStyle2
*iface
, LONG v
)
3350 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3351 FIXME("(%p)->(%d)\n", This
, v
);
3355 static HRESULT WINAPI
HTMLStyle2_get_pixelBottom(IHTMLStyle2
*iface
, LONG
*p
)
3357 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3358 FIXME("(%p)->(%p)\n", This
, p
);
3362 static HRESULT WINAPI
HTMLStyle2_put_pixelRight(IHTMLStyle2
*iface
, LONG v
)
3364 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3365 FIXME("(%p)->(%d)\n", This
, v
);
3369 static HRESULT WINAPI
HTMLStyle2_get_pixelRight(IHTMLStyle2
*iface
, LONG
*p
)
3371 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3372 FIXME("(%p)->(%p)\n", This
, p
);
3376 static HRESULT WINAPI
HTMLStyle2_put_posBottom(IHTMLStyle2
*iface
, float v
)
3378 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3379 FIXME("(%p)->(%f)\n", This
, v
);
3383 static HRESULT WINAPI
HTMLStyle2_get_posBottom(IHTMLStyle2
*iface
, float *p
)
3385 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3386 FIXME("(%p)->(%p)\n", This
, p
);
3390 static HRESULT WINAPI
HTMLStyle2_put_posRight(IHTMLStyle2
*iface
, float v
)
3392 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3393 FIXME("(%p)->(%f)\n", This
, v
);
3397 static HRESULT WINAPI
HTMLStyle2_get_posRight(IHTMLStyle2
*iface
, float *p
)
3399 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3400 FIXME("(%p)->(%p)\n", This
, p
);
3404 static HRESULT WINAPI
HTMLStyle2_put_imeMode(IHTMLStyle2
*iface
, BSTR v
)
3406 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3407 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3411 static HRESULT WINAPI
HTMLStyle2_get_imeMode(IHTMLStyle2
*iface
, BSTR
*p
)
3413 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3414 FIXME("(%p)->(%p)\n", This
, p
);
3418 static HRESULT WINAPI
HTMLStyle2_put_rubyAlign(IHTMLStyle2
*iface
, BSTR v
)
3420 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3421 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3425 static HRESULT WINAPI
HTMLStyle2_get_rubyAlign(IHTMLStyle2
*iface
, BSTR
*p
)
3427 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3428 FIXME("(%p)->(%p)\n", This
, p
);
3432 static HRESULT WINAPI
HTMLStyle2_put_rubyPosition(IHTMLStyle2
*iface
, BSTR v
)
3434 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3435 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3439 static HRESULT WINAPI
HTMLStyle2_get_rubyPosition(IHTMLStyle2
*iface
, BSTR
*p
)
3441 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3442 FIXME("(%p)->(%p)\n", This
, p
);
3446 static HRESULT WINAPI
HTMLStyle2_put_rubyOverhang(IHTMLStyle2
*iface
, BSTR v
)
3448 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3449 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3453 static HRESULT WINAPI
HTMLStyle2_get_rubyOverhang(IHTMLStyle2
*iface
, BSTR
*p
)
3455 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3456 FIXME("(%p)->(%p)\n", This
, p
);
3460 static HRESULT WINAPI
HTMLStyle2_put_layoutGridChar(IHTMLStyle2
*iface
, VARIANT v
)
3462 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3463 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3467 static HRESULT WINAPI
HTMLStyle2_get_layoutGridChar(IHTMLStyle2
*iface
, VARIANT
*p
)
3469 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3470 FIXME("(%p)->(%p)\n", This
, p
);
3474 static HRESULT WINAPI
HTMLStyle2_put_layoutGridLine(IHTMLStyle2
*iface
, VARIANT v
)
3476 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3477 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3481 static HRESULT WINAPI
HTMLStyle2_get_layoutGridLine(IHTMLStyle2
*iface
, VARIANT
*p
)
3483 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3484 FIXME("(%p)->(%p)\n", This
, p
);
3488 static HRESULT WINAPI
HTMLStyle2_put_layoutGridMode(IHTMLStyle2
*iface
, BSTR v
)
3490 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3491 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3495 static HRESULT WINAPI
HTMLStyle2_get_layoutGridMode(IHTMLStyle2
*iface
, BSTR
*p
)
3497 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3498 FIXME("(%p)->(%p)\n", This
, p
);
3502 static HRESULT WINAPI
HTMLStyle2_put_layoutGridType(IHTMLStyle2
*iface
, BSTR v
)
3504 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3505 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3509 static HRESULT WINAPI
HTMLStyle2_get_layoutGridType(IHTMLStyle2
*iface
, BSTR
*p
)
3511 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3512 FIXME("(%p)->(%p)\n", This
, p
);
3516 static HRESULT WINAPI
HTMLStyle2_put_layoutGrid(IHTMLStyle2
*iface
, BSTR v
)
3518 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3519 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3523 static HRESULT WINAPI
HTMLStyle2_get_layoutGrid(IHTMLStyle2
*iface
, BSTR
*p
)
3525 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3526 FIXME("(%p)->(%p)\n", This
, p
);
3530 static HRESULT WINAPI
HTMLStyle2_put_wordBreak(IHTMLStyle2
*iface
, BSTR v
)
3532 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3533 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3537 static HRESULT WINAPI
HTMLStyle2_get_wordBreak(IHTMLStyle2
*iface
, BSTR
*p
)
3539 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3540 FIXME("(%p)->(%p)\n", This
, p
);
3544 static HRESULT WINAPI
HTMLStyle2_put_lineBreak(IHTMLStyle2
*iface
, BSTR v
)
3546 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3547 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3551 static HRESULT WINAPI
HTMLStyle2_get_lineBreak(IHTMLStyle2
*iface
, BSTR
*p
)
3553 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3554 FIXME("(%p)->(%p)\n", This
, p
);
3558 static HRESULT WINAPI
HTMLStyle2_put_textJustify(IHTMLStyle2
*iface
, BSTR v
)
3560 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3561 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3565 static HRESULT WINAPI
HTMLStyle2_get_textJustify(IHTMLStyle2
*iface
, BSTR
*p
)
3567 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3568 FIXME("(%p)->(%p)\n", This
, p
);
3572 static HRESULT WINAPI
HTMLStyle2_put_textJustifyTrim(IHTMLStyle2
*iface
, BSTR v
)
3574 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3575 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3579 static HRESULT WINAPI
HTMLStyle2_get_textJustifyTrim(IHTMLStyle2
*iface
, BSTR
*p
)
3581 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3582 FIXME("(%p)->(%p)\n", This
, p
);
3586 static HRESULT WINAPI
HTMLStyle2_put_textKashida(IHTMLStyle2
*iface
, VARIANT v
)
3588 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3589 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3593 static HRESULT WINAPI
HTMLStyle2_get_textKashida(IHTMLStyle2
*iface
, VARIANT
*p
)
3595 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3596 FIXME("(%p)->(%p)\n", This
, p
);
3600 static HRESULT WINAPI
HTMLStyle2_put_textAutospace(IHTMLStyle2
*iface
, BSTR v
)
3602 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3603 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3607 static HRESULT WINAPI
HTMLStyle2_get_textAutospace(IHTMLStyle2
*iface
, BSTR
*p
)
3609 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3610 FIXME("(%p)->(%p)\n", This
, p
);
3614 static HRESULT WINAPI
HTMLStyle2_put_overflowX(IHTMLStyle2
*iface
, BSTR v
)
3616 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3618 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
3620 return set_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW_X
, v
, 0);
3623 static HRESULT WINAPI
HTMLStyle2_get_overflowX(IHTMLStyle2
*iface
, BSTR
*p
)
3625 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3627 TRACE("(%p)->(%p)\n", This
, p
);
3629 return get_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW_X
, p
, 0);
3632 static HRESULT WINAPI
HTMLStyle2_put_overflowY(IHTMLStyle2
*iface
, BSTR v
)
3634 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3636 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
3638 return set_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW_Y
, v
, 0);
3641 static HRESULT WINAPI
HTMLStyle2_get_overflowY(IHTMLStyle2
*iface
, BSTR
*p
)
3643 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3645 TRACE("(%p)->(%p)\n", This
, p
);
3647 return get_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW_Y
, p
, 0);
3650 static HRESULT WINAPI
HTMLStyle2_put_accelerator(IHTMLStyle2
*iface
, BSTR v
)
3652 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3653 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3657 static HRESULT WINAPI
HTMLStyle2_get_accelerator(IHTMLStyle2
*iface
, BSTR
*p
)
3659 HTMLStyle
*This
= impl_from_IHTMLStyle2(iface
);
3660 FIXME("(%p)->(%p)\n", This
, p
);
3664 static const IHTMLStyle2Vtbl HTMLStyle2Vtbl
= {
3665 HTMLStyle2_QueryInterface
,
3668 HTMLStyle2_GetTypeInfoCount
,
3669 HTMLStyle2_GetTypeInfo
,
3670 HTMLStyle2_GetIDsOfNames
,
3672 HTMLStyle2_put_tableLayout
,
3673 HTMLStyle2_get_tableLayout
,
3674 HTMLStyle2_put_borderCollapse
,
3675 HTMLStyle2_get_borderCollapse
,
3676 HTMLStyle2_put_direction
,
3677 HTMLStyle2_get_direction
,
3678 HTMLStyle2_put_behavior
,
3679 HTMLStyle2_get_behavior
,
3680 HTMLStyle2_setExpression
,
3681 HTMLStyle2_getExpression
,
3682 HTMLStyle2_removeExpression
,
3683 HTMLStyle2_put_position
,
3684 HTMLStyle2_get_position
,
3685 HTMLStyle2_put_unicodeBidi
,
3686 HTMLStyle2_get_unicodeBidi
,
3687 HTMLStyle2_put_bottom
,
3688 HTMLStyle2_get_bottom
,
3689 HTMLStyle2_put_right
,
3690 HTMLStyle2_get_right
,
3691 HTMLStyle2_put_pixelBottom
,
3692 HTMLStyle2_get_pixelBottom
,
3693 HTMLStyle2_put_pixelRight
,
3694 HTMLStyle2_get_pixelRight
,
3695 HTMLStyle2_put_posBottom
,
3696 HTMLStyle2_get_posBottom
,
3697 HTMLStyle2_put_posRight
,
3698 HTMLStyle2_get_posRight
,
3699 HTMLStyle2_put_imeMode
,
3700 HTMLStyle2_get_imeMode
,
3701 HTMLStyle2_put_rubyAlign
,
3702 HTMLStyle2_get_rubyAlign
,
3703 HTMLStyle2_put_rubyPosition
,
3704 HTMLStyle2_get_rubyPosition
,
3705 HTMLStyle2_put_rubyOverhang
,
3706 HTMLStyle2_get_rubyOverhang
,
3707 HTMLStyle2_put_layoutGridChar
,
3708 HTMLStyle2_get_layoutGridChar
,
3709 HTMLStyle2_put_layoutGridLine
,
3710 HTMLStyle2_get_layoutGridLine
,
3711 HTMLStyle2_put_layoutGridMode
,
3712 HTMLStyle2_get_layoutGridMode
,
3713 HTMLStyle2_put_layoutGridType
,
3714 HTMLStyle2_get_layoutGridType
,
3715 HTMLStyle2_put_layoutGrid
,
3716 HTMLStyle2_get_layoutGrid
,
3717 HTMLStyle2_put_wordBreak
,
3718 HTMLStyle2_get_wordBreak
,
3719 HTMLStyle2_put_lineBreak
,
3720 HTMLStyle2_get_lineBreak
,
3721 HTMLStyle2_put_textJustify
,
3722 HTMLStyle2_get_textJustify
,
3723 HTMLStyle2_put_textJustifyTrim
,
3724 HTMLStyle2_get_textJustifyTrim
,
3725 HTMLStyle2_put_textKashida
,
3726 HTMLStyle2_get_textKashida
,
3727 HTMLStyle2_put_textAutospace
,
3728 HTMLStyle2_get_textAutospace
,
3729 HTMLStyle2_put_overflowX
,
3730 HTMLStyle2_get_overflowX
,
3731 HTMLStyle2_put_overflowY
,
3732 HTMLStyle2_get_overflowY
,
3733 HTMLStyle2_put_accelerator
,
3734 HTMLStyle2_get_accelerator
3737 static inline HTMLStyle
*impl_from_IHTMLStyle3(IHTMLStyle3
*iface
)
3739 return CONTAINING_RECORD(iface
, HTMLStyle
, IHTMLStyle3_iface
);
3742 static HRESULT WINAPI
HTMLStyle3_QueryInterface(IHTMLStyle3
*iface
, REFIID riid
, void **ppv
)
3744 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3746 return IHTMLStyle_QueryInterface(&This
->IHTMLStyle_iface
, riid
, ppv
);
3749 static ULONG WINAPI
HTMLStyle3_AddRef(IHTMLStyle3
*iface
)
3751 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3753 return IHTMLStyle_AddRef(&This
->IHTMLStyle_iface
);
3756 static ULONG WINAPI
HTMLStyle3_Release(IHTMLStyle3
*iface
)
3758 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3760 return IHTMLStyle_Release(&This
->IHTMLStyle_iface
);
3763 static HRESULT WINAPI
HTMLStyle3_GetTypeInfoCount(IHTMLStyle3
*iface
, UINT
*pctinfo
)
3765 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3766 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
3769 static HRESULT WINAPI
HTMLStyle3_GetTypeInfo(IHTMLStyle3
*iface
, UINT iTInfo
,
3770 LCID lcid
, ITypeInfo
**ppTInfo
)
3772 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3773 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
3776 static HRESULT WINAPI
HTMLStyle3_GetIDsOfNames(IHTMLStyle3
*iface
, REFIID riid
,
3777 LPOLESTR
*rgszNames
, UINT cNames
,
3778 LCID lcid
, DISPID
*rgDispId
)
3780 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3781 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
3785 static HRESULT WINAPI
HTMLStyle3_Invoke(IHTMLStyle3
*iface
, DISPID dispIdMember
,
3786 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
3787 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
3789 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3790 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
3791 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
3794 static HRESULT WINAPI
HTMLStyle3_put_layoutFlow(IHTMLStyle3
*iface
, BSTR v
)
3796 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3797 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3801 static HRESULT WINAPI
HTMLStyle3_get_layoutFlow(IHTMLStyle3
*iface
, BSTR
*p
)
3803 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3804 FIXME("(%p)->(%p)\n", This
, p
);
3808 static const WCHAR zoomW
[] = {'z','o','o','m',0};
3810 static HRESULT WINAPI
HTMLStyle3_put_zoom(IHTMLStyle3
*iface
, VARIANT v
)
3812 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3816 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3818 /* zoom property is IE CSS extension that is mostly used as a hack to workaround IE bugs.
3819 * The value is set to 1 then. We can safely ignore setting zoom to 1. */
3820 if(V_VT(&v
) != VT_I4
|| V_I4(&v
) != 1)
3821 WARN("stub for %s\n", debugstr_variant(&v
));
3823 hres
= dispex_get_dprop_ref(&This
->dispex
, zoomW
, TRUE
, &var
);
3827 return VariantChangeType(var
, &v
, 0, VT_BSTR
);
3830 static HRESULT WINAPI
HTMLStyle3_get_zoom(IHTMLStyle3
*iface
, VARIANT
*p
)
3832 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3836 TRACE("(%p)->(%p)\n", This
, p
);
3838 hres
= dispex_get_dprop_ref(&This
->dispex
, zoomW
, FALSE
, &var
);
3839 if(hres
== DISP_E_UNKNOWNNAME
) {
3847 return VariantCopy(p
, var
);
3850 static HRESULT WINAPI
HTMLStyle3_put_wordWrap(IHTMLStyle3
*iface
, BSTR v
)
3852 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3854 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
3856 return set_nsstyle_attr(This
->nsstyle
, STYLEID_WORD_WRAP
, v
, 0);
3859 static HRESULT WINAPI
HTMLStyle3_get_wordWrap(IHTMLStyle3
*iface
, BSTR
*p
)
3861 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3863 TRACE("(%p)->(%p)\n", This
, p
);
3865 return get_nsstyle_attr(This
->nsstyle
, STYLEID_WORD_WRAP
, p
, 0);
3868 static HRESULT WINAPI
HTMLStyle3_put_textUnderlinePosition(IHTMLStyle3
*iface
, BSTR v
)
3870 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3871 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
3875 static HRESULT WINAPI
HTMLStyle3_get_textUnderlinePosition(IHTMLStyle3
*iface
, BSTR
*p
)
3877 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3878 FIXME("(%p)->(%p)\n", This
, p
);
3882 static HRESULT WINAPI
HTMLStyle3_put_scrollbarBaseColor(IHTMLStyle3
*iface
, VARIANT v
)
3884 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3885 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3889 static HRESULT WINAPI
HTMLStyle3_get_scrollbarBaseColor(IHTMLStyle3
*iface
, VARIANT
*p
)
3891 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3892 FIXME("(%p)->(%p)\n", This
, p
);
3896 static HRESULT WINAPI
HTMLStyle3_put_scrollbarFaceColor(IHTMLStyle3
*iface
, VARIANT v
)
3898 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3899 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3903 static HRESULT WINAPI
HTMLStyle3_get_scrollbarFaceColor(IHTMLStyle3
*iface
, VARIANT
*p
)
3905 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3906 FIXME("(%p)->(%p)\n", This
, p
);
3910 static HRESULT WINAPI
HTMLStyle3_put_scrollbar3dLightColor(IHTMLStyle3
*iface
, VARIANT v
)
3912 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3913 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3917 static HRESULT WINAPI
HTMLStyle3_get_scrollbar3dLightColor(IHTMLStyle3
*iface
, VARIANT
*p
)
3919 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3920 FIXME("(%p)->(%p)\n", This
, p
);
3924 static HRESULT WINAPI
HTMLStyle3_put_scrollbarShadowColor(IHTMLStyle3
*iface
, VARIANT v
)
3926 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3927 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3931 static HRESULT WINAPI
HTMLStyle3_get_scrollbarShadowColor(IHTMLStyle3
*iface
, VARIANT
*p
)
3933 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3934 FIXME("(%p)->(%p)\n", This
, p
);
3938 static HRESULT WINAPI
HTMLStyle3_put_scrollbarHighlightColor(IHTMLStyle3
*iface
, VARIANT v
)
3940 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3941 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3945 static HRESULT WINAPI
HTMLStyle3_get_scrollbarHighlightColor(IHTMLStyle3
*iface
, VARIANT
*p
)
3947 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3948 FIXME("(%p)->(%p)\n", This
, p
);
3952 static HRESULT WINAPI
HTMLStyle3_put_scrollbarDarkShadowColor(IHTMLStyle3
*iface
, VARIANT v
)
3954 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3955 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3959 static HRESULT WINAPI
HTMLStyle3_get_scrollbarDarkShadowColor(IHTMLStyle3
*iface
, VARIANT
*p
)
3961 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3962 FIXME("(%p)->(%p)\n", This
, p
);
3966 static HRESULT WINAPI
HTMLStyle3_put_scrollbarArrowColor(IHTMLStyle3
*iface
, VARIANT v
)
3968 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3969 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3973 static HRESULT WINAPI
HTMLStyle3_get_scrollbarArrowColor(IHTMLStyle3
*iface
, VARIANT
*p
)
3975 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3976 FIXME("(%p)->(%p)\n", This
, p
);
3980 static HRESULT WINAPI
HTMLStyle3_put_scrollbarTrackColor(IHTMLStyle3
*iface
, VARIANT v
)
3982 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3983 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
3987 static HRESULT WINAPI
HTMLStyle3_get_scrollbarTrackColor(IHTMLStyle3
*iface
, VARIANT
*p
)
3989 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3990 FIXME("(%p)->(%p)\n", This
, p
);
3994 static HRESULT WINAPI
HTMLStyle3_put_writingMode(IHTMLStyle3
*iface
, BSTR v
)
3996 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
3997 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4001 static HRESULT WINAPI
HTMLStyle3_get_writingMode(IHTMLStyle3
*iface
, BSTR
*p
)
4003 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
4004 FIXME("(%p)->(%p)\n", This
, p
);
4008 static HRESULT WINAPI
HTMLStyle3_put_textAlignLast(IHTMLStyle3
*iface
, BSTR v
)
4010 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
4011 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4015 static HRESULT WINAPI
HTMLStyle3_get_textAlignLast(IHTMLStyle3
*iface
, BSTR
*p
)
4017 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
4018 FIXME("(%p)->(%p)\n", This
, p
);
4022 static HRESULT WINAPI
HTMLStyle3_put_textKashidaSpace(IHTMLStyle3
*iface
, VARIANT v
)
4024 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
4025 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
4029 static HRESULT WINAPI
HTMLStyle3_get_textKashidaSpace(IHTMLStyle3
*iface
, VARIANT
*p
)
4031 HTMLStyle
*This
= impl_from_IHTMLStyle3(iface
);
4032 FIXME("(%p)->(%p)\n", This
, p
);
4036 static const IHTMLStyle3Vtbl HTMLStyle3Vtbl
= {
4037 HTMLStyle3_QueryInterface
,
4040 HTMLStyle3_GetTypeInfoCount
,
4041 HTMLStyle3_GetTypeInfo
,
4042 HTMLStyle3_GetIDsOfNames
,
4044 HTMLStyle3_put_layoutFlow
,
4045 HTMLStyle3_get_layoutFlow
,
4046 HTMLStyle3_put_zoom
,
4047 HTMLStyle3_get_zoom
,
4048 HTMLStyle3_put_wordWrap
,
4049 HTMLStyle3_get_wordWrap
,
4050 HTMLStyle3_put_textUnderlinePosition
,
4051 HTMLStyle3_get_textUnderlinePosition
,
4052 HTMLStyle3_put_scrollbarBaseColor
,
4053 HTMLStyle3_get_scrollbarBaseColor
,
4054 HTMLStyle3_put_scrollbarFaceColor
,
4055 HTMLStyle3_get_scrollbarFaceColor
,
4056 HTMLStyle3_put_scrollbar3dLightColor
,
4057 HTMLStyle3_get_scrollbar3dLightColor
,
4058 HTMLStyle3_put_scrollbarShadowColor
,
4059 HTMLStyle3_get_scrollbarShadowColor
,
4060 HTMLStyle3_put_scrollbarHighlightColor
,
4061 HTMLStyle3_get_scrollbarHighlightColor
,
4062 HTMLStyle3_put_scrollbarDarkShadowColor
,
4063 HTMLStyle3_get_scrollbarDarkShadowColor
,
4064 HTMLStyle3_put_scrollbarArrowColor
,
4065 HTMLStyle3_get_scrollbarArrowColor
,
4066 HTMLStyle3_put_scrollbarTrackColor
,
4067 HTMLStyle3_get_scrollbarTrackColor
,
4068 HTMLStyle3_put_writingMode
,
4069 HTMLStyle3_get_writingMode
,
4070 HTMLStyle3_put_textAlignLast
,
4071 HTMLStyle3_get_textAlignLast
,
4072 HTMLStyle3_put_textKashidaSpace
,
4073 HTMLStyle3_get_textKashidaSpace
4077 * IHTMLStyle4 Interface
4079 static inline HTMLStyle
*impl_from_IHTMLStyle4(IHTMLStyle4
*iface
)
4081 return CONTAINING_RECORD(iface
, HTMLStyle
, IHTMLStyle4_iface
);
4084 static HRESULT WINAPI
HTMLStyle4_QueryInterface(IHTMLStyle4
*iface
, REFIID riid
, void **ppv
)
4086 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4088 return IHTMLStyle_QueryInterface(&This
->IHTMLStyle_iface
, riid
, ppv
);
4091 static ULONG WINAPI
HTMLStyle4_AddRef(IHTMLStyle4
*iface
)
4093 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4095 return IHTMLStyle_AddRef(&This
->IHTMLStyle_iface
);
4098 static ULONG WINAPI
HTMLStyle4_Release(IHTMLStyle4
*iface
)
4100 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4102 return IHTMLStyle_Release(&This
->IHTMLStyle_iface
);
4105 static HRESULT WINAPI
HTMLStyle4_GetTypeInfoCount(IHTMLStyle4
*iface
, UINT
*pctinfo
)
4107 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4108 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
4111 static HRESULT WINAPI
HTMLStyle4_GetTypeInfo(IHTMLStyle4
*iface
, UINT iTInfo
,
4112 LCID lcid
, ITypeInfo
**ppTInfo
)
4114 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4115 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
4118 static HRESULT WINAPI
HTMLStyle4_GetIDsOfNames(IHTMLStyle4
*iface
, REFIID riid
,
4119 LPOLESTR
*rgszNames
, UINT cNames
,
4120 LCID lcid
, DISPID
*rgDispId
)
4122 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4123 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
4127 static HRESULT WINAPI
HTMLStyle4_Invoke(IHTMLStyle4
*iface
, DISPID dispIdMember
,
4128 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
4129 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
4131 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4132 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
4133 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
4136 static HRESULT WINAPI
HTMLStyle4_put_textOverflow(IHTMLStyle4
*iface
, BSTR v
)
4138 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4139 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4143 static HRESULT WINAPI
HTMLStyle4_get_textOverflow(IHTMLStyle4
*iface
, BSTR
*p
)
4145 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4146 FIXME("(%p)->(%p)\n", This
, p
);
4150 static HRESULT WINAPI
HTMLStyle4_put_minHeight(IHTMLStyle4
*iface
, VARIANT v
)
4152 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4154 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
4156 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_MIN_HEIGHT
, &v
, 0);
4159 static HRESULT WINAPI
HTMLStyle4_get_minHeight(IHTMLStyle4
*iface
, VARIANT
*p
)
4161 HTMLStyle
*This
= impl_from_IHTMLStyle4(iface
);
4163 TRACE("(%p)->(%p)\n", This
, p
);
4165 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MIN_HEIGHT
, p
, 0);
4168 static const IHTMLStyle4Vtbl HTMLStyle4Vtbl
= {
4169 HTMLStyle4_QueryInterface
,
4172 HTMLStyle4_GetTypeInfoCount
,
4173 HTMLStyle4_GetTypeInfo
,
4174 HTMLStyle4_GetIDsOfNames
,
4176 HTMLStyle4_put_textOverflow
,
4177 HTMLStyle4_get_textOverflow
,
4178 HTMLStyle4_put_minHeight
,
4179 HTMLStyle4_get_minHeight
4182 static inline HTMLStyle
*impl_from_IHTMLStyle5(IHTMLStyle5
*iface
)
4184 return CONTAINING_RECORD(iface
, HTMLStyle
, IHTMLStyle5_iface
);
4187 static HRESULT WINAPI
HTMLStyle5_QueryInterface(IHTMLStyle5
*iface
, REFIID riid
, void **ppv
)
4189 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4191 return IHTMLStyle_QueryInterface(&This
->IHTMLStyle_iface
, riid
, ppv
);
4194 static ULONG WINAPI
HTMLStyle5_AddRef(IHTMLStyle5
*iface
)
4196 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4198 return IHTMLStyle_AddRef(&This
->IHTMLStyle_iface
);
4201 static ULONG WINAPI
HTMLStyle5_Release(IHTMLStyle5
*iface
)
4203 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4205 return IHTMLStyle_Release(&This
->IHTMLStyle_iface
);
4208 static HRESULT WINAPI
HTMLStyle5_GetTypeInfoCount(IHTMLStyle5
*iface
, UINT
*pctinfo
)
4210 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4211 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
4214 static HRESULT WINAPI
HTMLStyle5_GetTypeInfo(IHTMLStyle5
*iface
, UINT iTInfo
,
4215 LCID lcid
, ITypeInfo
**ppTInfo
)
4217 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4218 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
4221 static HRESULT WINAPI
HTMLStyle5_GetIDsOfNames(IHTMLStyle5
*iface
, REFIID riid
,
4222 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
4224 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4225 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
4229 static HRESULT WINAPI
HTMLStyle5_Invoke(IHTMLStyle5
*iface
, DISPID dispIdMember
,
4230 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
4231 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
4233 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4234 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
4235 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
4238 static HRESULT WINAPI
HTMLStyle5_put_msInterpolationMode(IHTMLStyle5
*iface
, BSTR v
)
4240 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4241 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4245 static HRESULT WINAPI
HTMLStyle5_get_msInterpolationMode(IHTMLStyle5
*iface
, BSTR
*p
)
4247 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4248 FIXME("(%p)->(%p)\n", This
, p
);
4252 static HRESULT WINAPI
HTMLStyle5_put_maxHeight(IHTMLStyle5
*iface
, VARIANT v
)
4254 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4256 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
4258 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_MAX_HEIGHT
, &v
, ATTR_FIX_PX
);
4261 static HRESULT WINAPI
HTMLStyle5_get_maxHeight(IHTMLStyle5
*iface
, VARIANT
*p
)
4263 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4265 TRACE("(%p)->(%s)\n", This
, debugstr_variant(p
));
4267 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MAX_HEIGHT
, p
, 0);
4270 static HRESULT WINAPI
HTMLStyle5_put_minWidth(IHTMLStyle5
*iface
, VARIANT v
)
4272 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4274 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
4276 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_MIN_WIDTH
, &v
, ATTR_FIX_PX
);
4279 static HRESULT WINAPI
HTMLStyle5_get_minWidth(IHTMLStyle5
*iface
, VARIANT
*p
)
4281 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4283 TRACE("(%p)->(%p)\n", This
, p
);
4285 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MIN_WIDTH
, p
, 0);
4288 static HRESULT WINAPI
HTMLStyle5_put_maxWidth(IHTMLStyle5
*iface
, VARIANT v
)
4290 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4292 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
4294 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_MAX_WIDTH
, &v
, ATTR_FIX_PX
);
4297 static HRESULT WINAPI
HTMLStyle5_get_maxWidth(IHTMLStyle5
*iface
, VARIANT
*p
)
4299 HTMLStyle
*This
= impl_from_IHTMLStyle5(iface
);
4301 TRACE("(%p)->(%p)\n", This
, p
);
4303 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MAX_WIDTH
, p
, 0);
4306 static const IHTMLStyle5Vtbl HTMLStyle5Vtbl
= {
4307 HTMLStyle5_QueryInterface
,
4310 HTMLStyle5_GetTypeInfoCount
,
4311 HTMLStyle5_GetTypeInfo
,
4312 HTMLStyle5_GetIDsOfNames
,
4314 HTMLStyle5_put_msInterpolationMode
,
4315 HTMLStyle5_get_msInterpolationMode
,
4316 HTMLStyle5_put_maxHeight
,
4317 HTMLStyle5_get_maxHeight
,
4318 HTMLStyle5_put_minWidth
,
4319 HTMLStyle5_get_minWidth
,
4320 HTMLStyle5_put_maxWidth
,
4321 HTMLStyle5_get_maxWidth
4324 static inline HTMLStyle
*impl_from_IHTMLStyle6(IHTMLStyle6
*iface
)
4326 return CONTAINING_RECORD(iface
, HTMLStyle
, IHTMLStyle6_iface
);
4329 static HRESULT WINAPI
HTMLStyle6_QueryInterface(IHTMLStyle6
*iface
, REFIID riid
, void **ppv
)
4331 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4333 return IHTMLStyle_QueryInterface(&This
->IHTMLStyle_iface
, riid
, ppv
);
4336 static ULONG WINAPI
HTMLStyle6_AddRef(IHTMLStyle6
*iface
)
4338 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4340 return IHTMLStyle_AddRef(&This
->IHTMLStyle_iface
);
4343 static ULONG WINAPI
HTMLStyle6_Release(IHTMLStyle6
*iface
)
4345 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4347 return IHTMLStyle_Release(&This
->IHTMLStyle_iface
);
4350 static HRESULT WINAPI
HTMLStyle6_GetTypeInfoCount(IHTMLStyle6
*iface
, UINT
*pctinfo
)
4352 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4353 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
4356 static HRESULT WINAPI
HTMLStyle6_GetTypeInfo(IHTMLStyle6
*iface
, UINT iTInfo
,
4357 LCID lcid
, ITypeInfo
**ppTInfo
)
4359 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4360 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
4363 static HRESULT WINAPI
HTMLStyle6_GetIDsOfNames(IHTMLStyle6
*iface
, REFIID riid
,
4364 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
4366 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4367 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
4371 static HRESULT WINAPI
HTMLStyle6_Invoke(IHTMLStyle6
*iface
, DISPID dispIdMember
,
4372 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
4373 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
4375 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4376 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
4377 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
4380 static HRESULT WINAPI
HTMLStyle6_put_content(IHTMLStyle6
*iface
, BSTR v
)
4382 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4383 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4387 static HRESULT WINAPI
HTMLStyle6_get_content(IHTMLStyle6
*iface
, BSTR
*p
)
4389 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4390 FIXME("(%p)->(%p)\n", This
, p
);
4394 static HRESULT WINAPI
HTMLStyle6_put_contentSide(IHTMLStyle6
*iface
, BSTR v
)
4396 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4397 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4401 static HRESULT WINAPI
HTMLStyle6_get_contentSide(IHTMLStyle6
*iface
, BSTR
*p
)
4403 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4404 FIXME("(%p)->(%p)\n", This
, p
);
4408 static HRESULT WINAPI
HTMLStyle6_put_counterIncrement(IHTMLStyle6
*iface
, BSTR v
)
4410 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4411 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4415 static HRESULT WINAPI
HTMLStyle6_get_counterIncrement(IHTMLStyle6
*iface
, BSTR
*p
)
4417 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4418 FIXME("(%p)->(%p)\n", This
, p
);
4422 static HRESULT WINAPI
HTMLStyle6_put_counterReset(IHTMLStyle6
*iface
, BSTR v
)
4424 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4425 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4429 static HRESULT WINAPI
HTMLStyle6_get_counterReset(IHTMLStyle6
*iface
, BSTR
*p
)
4431 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4432 FIXME("(%p)->(%p)\n", This
, p
);
4436 static HRESULT WINAPI
HTMLStyle6_put_outline(IHTMLStyle6
*iface
, BSTR v
)
4438 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4440 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
4442 return set_nsstyle_attr(This
->nsstyle
, STYLEID_OUTLINE
, v
, 0);
4445 static HRESULT WINAPI
HTMLStyle6_get_outline(IHTMLStyle6
*iface
, BSTR
*p
)
4447 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4449 TRACE("(%p)->(%p)\n", This
, p
);
4451 return get_nsstyle_attr(This
->nsstyle
, STYLEID_OUTLINE
, p
, ATTR_NO_NULL
);
4454 static HRESULT WINAPI
HTMLStyle6_put_outlineWidth(IHTMLStyle6
*iface
, VARIANT v
)
4456 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4457 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
4461 static HRESULT WINAPI
HTMLStyle6_get_outlineWidth(IHTMLStyle6
*iface
, VARIANT
*p
)
4463 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4464 FIXME("(%p)->(%p)\n", This
, p
);
4468 static HRESULT WINAPI
HTMLStyle6_put_outlineStyle(IHTMLStyle6
*iface
, BSTR v
)
4470 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4471 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4475 static HRESULT WINAPI
HTMLStyle6_get_outlineStyle(IHTMLStyle6
*iface
, BSTR
*p
)
4477 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4478 FIXME("(%p)->(%p)\n", This
, p
);
4482 static HRESULT WINAPI
HTMLStyle6_put_outlineColor(IHTMLStyle6
*iface
, VARIANT v
)
4484 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4485 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
4489 static HRESULT WINAPI
HTMLStyle6_get_outlineColor(IHTMLStyle6
*iface
, VARIANT
*p
)
4491 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4492 FIXME("(%p)->(%p)\n", This
, p
);
4496 static HRESULT WINAPI
HTMLStyle6_put_boxSizing(IHTMLStyle6
*iface
, BSTR v
)
4498 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4500 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
4502 return set_nsstyle_attr(This
->nsstyle
, STYLEID_BOX_SIZING
, v
, 0);
4505 static HRESULT WINAPI
HTMLStyle6_get_boxSizing(IHTMLStyle6
*iface
, BSTR
*p
)
4507 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4509 TRACE("(%p)->(%p)\n", This
, p
);
4511 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BOX_SIZING
, p
, 0);
4514 static HRESULT WINAPI
HTMLStyle6_put_boxSpacing(IHTMLStyle6
*iface
, BSTR v
)
4516 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4517 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4521 static HRESULT WINAPI
HTMLStyle6_get_boxSpacing(IHTMLStyle6
*iface
, BSTR
*p
)
4523 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4524 FIXME("(%p)->(%p)\n", This
, p
);
4528 static HRESULT WINAPI
HTMLStyle6_put_orphans(IHTMLStyle6
*iface
, VARIANT v
)
4530 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4531 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
4535 static HRESULT WINAPI
HTMLStyle6_get_orphans(IHTMLStyle6
*iface
, VARIANT
*p
)
4537 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4538 FIXME("(%p)->(%p)\n", This
, p
);
4542 static HRESULT WINAPI
HTMLStyle6_put_windows(IHTMLStyle6
*iface
, VARIANT v
)
4544 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4545 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
4549 static HRESULT WINAPI
HTMLStyle6_get_windows(IHTMLStyle6
*iface
, VARIANT
*p
)
4551 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4552 FIXME("(%p)->(%p)\n", This
, p
);
4556 static HRESULT WINAPI
HTMLStyle6_put_pageBreakInside(IHTMLStyle6
*iface
, BSTR v
)
4558 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4559 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4563 static HRESULT WINAPI
HTMLStyle6_get_pageBreakInside(IHTMLStyle6
*iface
, BSTR
*p
)
4565 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4566 FIXME("(%p)->(%p)\n", This
, p
);
4570 static HRESULT WINAPI
HTMLStyle6_put_emptyCells(IHTMLStyle6
*iface
, BSTR v
)
4572 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4573 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4577 static HRESULT WINAPI
HTMLStyle6_get_emptyCells(IHTMLStyle6
*iface
, BSTR
*p
)
4579 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4580 FIXME("(%p)->(%p)\n", This
, p
);
4584 static HRESULT WINAPI
HTMLStyle6_put_msBlockProgression(IHTMLStyle6
*iface
, BSTR v
)
4586 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4587 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4591 static HRESULT WINAPI
HTMLStyle6_get_msBlockProgression(IHTMLStyle6
*iface
, BSTR
*p
)
4593 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4594 FIXME("(%p)->(%p)\n", This
, p
);
4598 static HRESULT WINAPI
HTMLStyle6_put_quotes(IHTMLStyle6
*iface
, BSTR v
)
4600 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4601 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
4605 static HRESULT WINAPI
HTMLStyle6_get_quotes(IHTMLStyle6
*iface
, BSTR
*p
)
4607 HTMLStyle
*This
= impl_from_IHTMLStyle6(iface
);
4608 FIXME("(%p)->(%p)\n", This
, p
);
4612 static const IHTMLStyle6Vtbl HTMLStyle6Vtbl
= {
4613 HTMLStyle6_QueryInterface
,
4616 HTMLStyle6_GetTypeInfoCount
,
4617 HTMLStyle6_GetTypeInfo
,
4618 HTMLStyle6_GetIDsOfNames
,
4620 HTMLStyle6_put_content
,
4621 HTMLStyle6_get_content
,
4622 HTMLStyle6_put_contentSide
,
4623 HTMLStyle6_get_contentSide
,
4624 HTMLStyle6_put_counterIncrement
,
4625 HTMLStyle6_get_counterIncrement
,
4626 HTMLStyle6_put_counterReset
,
4627 HTMLStyle6_get_counterReset
,
4628 HTMLStyle6_put_outline
,
4629 HTMLStyle6_get_outline
,
4630 HTMLStyle6_put_outlineWidth
,
4631 HTMLStyle6_get_outlineWidth
,
4632 HTMLStyle6_put_outlineStyle
,
4633 HTMLStyle6_get_outlineStyle
,
4634 HTMLStyle6_put_outlineColor
,
4635 HTMLStyle6_get_outlineColor
,
4636 HTMLStyle6_put_boxSizing
,
4637 HTMLStyle6_get_boxSizing
,
4638 HTMLStyle6_put_boxSpacing
,
4639 HTMLStyle6_get_boxSpacing
,
4640 HTMLStyle6_put_orphans
,
4641 HTMLStyle6_get_orphans
,
4642 HTMLStyle6_put_windows
,
4643 HTMLStyle6_get_windows
,
4644 HTMLStyle6_put_pageBreakInside
,
4645 HTMLStyle6_get_pageBreakInside
,
4646 HTMLStyle6_put_emptyCells
,
4647 HTMLStyle6_get_emptyCells
,
4648 HTMLStyle6_put_msBlockProgression
,
4649 HTMLStyle6_get_msBlockProgression
,
4650 HTMLStyle6_put_quotes
,
4651 HTMLStyle6_get_quotes
4654 static HRESULT
HTMLStyle_get_dispid(DispatchEx
*dispex
, BSTR name
, DWORD flags
, DISPID
*dispid
)
4656 const style_tbl_entry_t
*style_entry
;
4658 style_entry
= lookup_style_tbl(name
);
4660 *dispid
= style_entry
->dispid
;
4664 return DISP_E_UNKNOWNNAME
;
4667 static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl
= {
4669 HTMLStyle_get_dispid
,
4674 static const tid_t HTMLStyle_iface_tids
[] = {
4683 static dispex_static_data_t HTMLStyle_dispex
= {
4684 &HTMLStyle_dispex_vtbl
,
4686 HTMLStyle_iface_tids
4689 static HRESULT
get_style_from_elem(HTMLElement
*elem
, nsIDOMCSSStyleDeclaration
**ret
)
4691 nsIDOMElementCSSInlineStyle
*nselemstyle
;
4695 FIXME("NULL nselem\n");
4699 nsres
= nsIDOMHTMLElement_QueryInterface(elem
->nselem
, &IID_nsIDOMElementCSSInlineStyle
,
4700 (void**)&nselemstyle
);
4701 assert(nsres
== NS_OK
);
4703 nsres
= nsIDOMElementCSSInlineStyle_GetStyle(nselemstyle
, ret
);
4704 nsIDOMElementCSSInlineStyle_Release(nselemstyle
);
4705 if(NS_FAILED(nsres
)) {
4706 ERR("GetStyle failed: %08x\n", nsres
);
4713 HRESULT
HTMLStyle_Create(HTMLElement
*elem
, HTMLStyle
**ret
)
4715 nsIDOMCSSStyleDeclaration
*nsstyle
;
4719 hres
= get_style_from_elem(elem
, &nsstyle
);
4723 style
= heap_alloc_zero(sizeof(HTMLStyle
));
4725 nsIDOMCSSStyleDeclaration_Release(nsstyle
);
4726 return E_OUTOFMEMORY
;
4729 style
->IHTMLStyle_iface
.lpVtbl
= &HTMLStyleVtbl
;
4730 style
->IHTMLStyle2_iface
.lpVtbl
= &HTMLStyle2Vtbl
;
4731 style
->IHTMLStyle3_iface
.lpVtbl
= &HTMLStyle3Vtbl
;
4732 style
->IHTMLStyle4_iface
.lpVtbl
= &HTMLStyle4Vtbl
;
4733 style
->IHTMLStyle5_iface
.lpVtbl
= &HTMLStyle5Vtbl
;
4734 style
->IHTMLStyle6_iface
.lpVtbl
= &HTMLStyle6Vtbl
;
4737 style
->nsstyle
= nsstyle
;
4740 nsIDOMCSSStyleDeclaration_AddRef(nsstyle
);
4742 init_dispex(&style
->dispex
, (IUnknown
*)&style
->IHTMLStyle_iface
, &HTMLStyle_dispex
);
4748 HRESULT
get_elem_style(HTMLElement
*elem
, styleid_t styleid
, BSTR
*ret
)
4750 nsIDOMCSSStyleDeclaration
*style
;
4753 hres
= get_style_from_elem(elem
, &style
);
4757 hres
= get_nsstyle_attr(style
, styleid
, ret
, 0);
4758 nsIDOMCSSStyleDeclaration_Release(style
);
4762 HRESULT
set_elem_style(HTMLElement
*elem
, styleid_t styleid
, const WCHAR
*val
)
4764 nsIDOMCSSStyleDeclaration
*style
;
4767 hres
= get_style_from_elem(elem
, &style
);
4771 hres
= set_nsstyle_attr(style
, styleid
, val
, 0);
4772 nsIDOMCSSStyleDeclaration_Release(style
);