Revert r66580 and r66579.
[reactos.git] / reactos / dll / win32 / mshtml / htmlcurstyle.c
1 /*
2 * Copyright 2008 Jacek Caban for CodeWeavers
3 *
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.
8 *
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.
13 *
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
17 */
18
19 #include "mshtml_private.h"
20
21 struct HTMLCurrentStyle {
22 DispatchEx dispex;
23 IHTMLCurrentStyle IHTMLCurrentStyle_iface;
24 IHTMLCurrentStyle2 IHTMLCurrentStyle2_iface;
25 IHTMLCurrentStyle3 IHTMLCurrentStyle3_iface;
26 IHTMLCurrentStyle4 IHTMLCurrentStyle4_iface;
27
28 LONG ref;
29
30 nsIDOMCSSStyleDeclaration *nsstyle;
31 HTMLElement *elem;
32 };
33
34 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle *iface)
35 {
36 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle_iface);
37 }
38
39 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle2(IHTMLCurrentStyle2 *iface)
40 {
41 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle2_iface);
42 }
43
44 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle3(IHTMLCurrentStyle3 *iface)
45 {
46 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle3_iface);
47 }
48
49 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle4(IHTMLCurrentStyle4 *iface)
50 {
51 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle4_iface);
52 }
53
54 static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface, REFIID riid, void **ppv)
55 {
56 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
57
58 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
59
60 if(IsEqualGUID(&IID_IUnknown, riid)) {
61 *ppv = &This->IHTMLCurrentStyle_iface;
62 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle, riid)) {
63 *ppv = &This->IHTMLCurrentStyle_iface;
64 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle2, riid)) {
65 *ppv = &This->IHTMLCurrentStyle2_iface;
66 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle3, riid)) {
67 *ppv = &This->IHTMLCurrentStyle3_iface;
68 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle4, riid)) {
69 *ppv = &This->IHTMLCurrentStyle4_iface;
70 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
71 return *ppv ? S_OK : E_NOINTERFACE;
72 }else {
73 *ppv = NULL;
74 WARN("unsupported %s\n", debugstr_mshtml_guid(riid));
75 return E_NOINTERFACE;
76 }
77
78 IUnknown_AddRef((IUnknown*)*ppv);
79 return S_OK;
80 }
81
82 static ULONG WINAPI HTMLCurrentStyle_AddRef(IHTMLCurrentStyle *iface)
83 {
84 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
85 LONG ref = InterlockedIncrement(&This->ref);
86
87 TRACE("(%p) ref=%d\n", This, ref);
88
89 return ref;
90 }
91
92 static ULONG WINAPI HTMLCurrentStyle_Release(IHTMLCurrentStyle *iface)
93 {
94 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
95 LONG ref = InterlockedDecrement(&This->ref);
96
97 TRACE("(%p) ref=%d\n", This, ref);
98
99 if(!ref) {
100 if(This->nsstyle)
101 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
102 IHTMLElement_Release(&This->elem->IHTMLElement_iface);
103 release_dispex(&This->dispex);
104 heap_free(This);
105 }
106
107 return ref;
108 }
109
110 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle *iface, UINT *pctinfo)
111 {
112 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
113 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
114 }
115
116 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle *iface, UINT iTInfo,
117 LCID lcid, ITypeInfo **ppTInfo)
118 {
119 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
120 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
121 }
122
123 static HRESULT WINAPI HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle *iface, REFIID riid,
124 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
125 {
126 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
127 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
128 lcid, rgDispId);
129 }
130
131 static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID dispIdMember,
132 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
133 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
134 {
135 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
136 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
137 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
138 }
139
140 static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p)
141 {
142 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
143
144 TRACE("(%p)->(%p)\n", This, p);
145
146 return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p, 0);
147 }
148
149 static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
150 {
151 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
152 FIXME("(%p)->(%p)\n", This, p);
153 return E_NOTIMPL;
154 }
155
156 static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
157 {
158 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
159 TRACE("(%p)->(%p)\n", This, p);
160 return get_nsstyle_attr_var(This->nsstyle, STYLEID_COLOR, p, 0);
161 }
162
163 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
164 {
165 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
166 TRACE("(%p)->(%p)\n", This, p);
167 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_COLOR, p, 0);
168 }
169
170 static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
171 {
172 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
173
174 TRACE("(%p)->(%p)\n", This, p);
175
176 return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_FAMILY, p, 0);
177 }
178
179 static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
180 {
181 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
182 TRACE("(%p)->(%p)\n", This, p);
183 return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, p, 0);
184 }
185
186 static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
187 {
188 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
189 TRACE("(%p)->(%p)\n", This, p);
190 return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, p, 0);
191 }
192
193 static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
194 {
195 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
196 TRACE("(%p)->(%p)\n", This, p);
197 return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_WEIGHT, p, ATTR_STR_TO_INT);
198 }
199
200 static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
201 {
202 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
203 TRACE("(%p)->(%p)\n", This, p);
204 return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_SIZE, p, 0);
205 }
206
207 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
208 {
209 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
210 TRACE("(%p)->(%p)\n", This, p);
211 return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_IMAGE, p, 0);
212 }
213
214 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
215 {
216 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
217 FIXME("(%p)->(%p)\n", This, p);
218 return E_NOTIMPL;
219 }
220
221 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle *iface, VARIANT *p)
222 {
223 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
224 FIXME("(%p)->(%p)\n", This, p);
225 return E_NOTIMPL;
226 }
227
228 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *iface, BSTR *p)
229 {
230 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
231 TRACE("(%p)->(%p)\n", This, p);
232 return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_REPEAT, p, 0);
233 }
234
235 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
236 {
237 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
238 TRACE("(%p)->(%p)\n", This, p);
239 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_COLOR, p, 0);
240 }
241
242 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
243 {
244 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
245 TRACE("(%p)->(%p)\n", This, p);
246 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_COLOR, p, 0);
247 }
248
249 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
250 {
251 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
252 TRACE("(%p)->(%p)\n", This, p);
253 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_COLOR, p, 0);
254 }
255
256 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
257 {
258 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
259 TRACE("(%p)->(%p)\n", This, p);
260 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_COLOR, p, 0);
261 }
262
263 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
264 {
265 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
266 TRACE("(%p)->(%p)\n", This, p);
267 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_TOP_STYLE, p, 0);
268 }
269
270 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
271 {
272 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
273 TRACE("(%p)->(%p)\n", This, p);
274 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_RIGHT_STYLE, p, 0);
275 }
276
277 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
278 {
279 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
280 TRACE("(%p)->(%p)\n", This, p);
281 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_BOTTOM_STYLE, p, 0);
282 }
283
284 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
285 {
286 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
287 TRACE("(%p)->(%p)\n", This, p);
288 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_LEFT_STYLE, p, 0);
289 }
290
291 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
292 {
293 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
294 TRACE("(%p)->(%p)\n", This, p);
295 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
296 }
297
298 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
299 {
300 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
301 TRACE("(%p)->(%p)\n", This, p);
302 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
303 }
304
305 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
306 {
307 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
308 TRACE("(%p)->(%p)\n", This, p);
309 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
310 }
311
312 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
313 {
314 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
315 TRACE("(%p)->(%p)\n", This, p);
316 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
317 }
318
319 static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
320 {
321 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
322 TRACE("(%p)->(%p)\n", This, p);
323 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, p, 0);
324 }
325
326 static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
327 {
328 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
329 TRACE("(%p)->(%p)\n", This, p);
330 return get_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, p, 0);
331 }
332
333 static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
334 {
335 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
336 TRACE("(%p)->(%p)\n", This, p);
337 return get_nsstyle_attr_var(This->nsstyle, STYLEID_WIDTH, p, 0);
338 }
339
340 static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
341 {
342 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
343 TRACE("(%p)->(%p)\n", This, p);
344 return get_nsstyle_attr_var(This->nsstyle, STYLEID_HEIGHT, p, 0);
345 }
346
347 static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
348 {
349 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
350 TRACE("(%p)->(%p)\n", This, p);
351 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_LEFT, p, 0);
352 }
353
354 static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
355 {
356 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
357 TRACE("(%p)->(%p)\n", This, p);
358 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_TOP, p, 0);
359 }
360
361 static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
362 {
363 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
364 TRACE("(%p)->(%p)\n", This, p);
365 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_RIGHT, p, 0);
366 }
367
368 static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
369 {
370 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
371 TRACE("(%p)->(%p)\n", This, p);
372 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_BOTTOM, p, 0);
373 }
374
375 static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
376 {
377 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
378 TRACE("(%p)->(%p)\n", This, p);
379 return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_ALIGN, p, 0);
380 }
381
382 static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
383 {
384 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
385 TRACE("(%p)->(%p)\n", This, p);
386 return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_DECORATION, p, 0);
387 }
388
389 static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
390 {
391 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
392
393 TRACE("(%p)->(%p)\n", This, p);
394
395 return get_nsstyle_attr(This->nsstyle, STYLEID_DISPLAY, p, 0);
396 }
397
398 static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p)
399 {
400 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
401
402 TRACE("(%p)->(%p)\n", This, p);
403
404 return get_nsstyle_attr(This->nsstyle, STYLEID_VISIBILITY, p, 0);
405 }
406
407 static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
408 {
409 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
410 TRACE("(%p)->(%p)\n", This, p);
411 return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
412 }
413
414 static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
415 {
416 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
417 TRACE("(%p)->(%p)\n", This, p);
418 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
419 }
420
421 static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
422 {
423 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
424 TRACE("(%p)->(%p)\n", This, p);
425 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LINE_HEIGHT, p, 0);
426 }
427
428 static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
429 {
430 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
431 TRACE("(%p)->(%p)\n", This, p);
432 return get_nsstyle_attr_var(This->nsstyle, STYLEID_TEXT_INDENT, p, 0);
433 }
434
435 static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
436 {
437 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
438 TRACE("(%p)->(%p)\n", This, p);
439 return get_nsstyle_attr_var(This->nsstyle, STYLEID_VERTICAL_ALIGN, p, 0);
440 }
441
442 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
443 {
444 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
445 FIXME("(%p)->(%p)\n", This, p);
446 return E_NOTIMPL;
447 }
448
449 static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, VARIANT *p)
450 {
451 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
452 TRACE("(%p)->(%p)\n", This, p);
453 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_TOP, p, 0);
454 }
455
456 static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
457 {
458 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
459 TRACE("(%p)->(%p)\n", This, p);
460 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
461 }
462
463 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
464 {
465 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
466 TRACE("(%p)->(%p)\n", This, p);
467 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_BOTTOM, p, 0);
468 }
469
470 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
471 {
472 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
473 TRACE("(%p)->(%p)\n", This, p);
474 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
475 }
476
477 static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
478 {
479 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
480 FIXME("(%p)->(%p)\n", This, p);
481 return E_NOTIMPL;
482 }
483
484 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle *iface, BSTR *p)
485 {
486 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
487 FIXME("(%p)->(%p)\n", This, p);
488 return E_NOTIMPL;
489 }
490
491 static HRESULT WINAPI HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle *iface, BSTR *p)
492 {
493 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
494 FIXME("(%p)->(%p)\n", This, p);
495 return E_NOTIMPL;
496 }
497
498 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle *iface, BSTR *p)
499 {
500 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
501 FIXME("(%p)->(%p)\n", This, p);
502 return E_NOTIMPL;
503 }
504
505 static HRESULT WINAPI HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle *iface, VARIANT *p)
506 {
507 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
508 FIXME("(%p)->(%p)\n", This, p);
509 return E_NOTIMPL;
510 }
511
512 static HRESULT WINAPI HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle *iface, VARIANT *p)
513 {
514 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
515 FIXME("(%p)->(%p)\n", This, p);
516 return E_NOTIMPL;
517 }
518
519 static HRESULT WINAPI HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle *iface, VARIANT *p)
520 {
521 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
522 FIXME("(%p)->(%p)\n", This, p);
523 return E_NOTIMPL;
524 }
525
526 static HRESULT WINAPI HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle *iface, VARIANT *p)
527 {
528 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
529 FIXME("(%p)->(%p)\n", This, p);
530 return E_NOTIMPL;
531 }
532
533 static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BSTR *p)
534 {
535 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
536 TRACE("(%p)->(%p)\n", This, p);
537 return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, p, 0);
538 }
539
540 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
541 {
542 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
543 FIXME("(%p)->(%p)\n", This, p);
544 return E_NOTIMPL;
545 }
546
547 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *iface, BSTR *p)
548 {
549 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
550 FIXME("(%p)->(%p)\n", This, p);
551 return E_NOTIMPL;
552 }
553
554 static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
555 {
556 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
557 TRACE("(%p)->(%p)\n", This, p);
558 return get_nsstyle_attr(This->nsstyle, STYLEID_CURSOR, p, 0);
559 }
560
561 static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
562 {
563 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
564 FIXME("(%p)->(%p)\n", This, p);
565 return E_NOTIMPL;
566 }
567
568 static HRESULT WINAPI HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle *iface, BSTR *p)
569 {
570 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
571 FIXME("(%p)->(%p)\n", This, p);
572 return E_NOTIMPL;
573 }
574
575 static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, BSTR *p)
576 {
577 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
578 FIXME("(%p)->(%p)\n", This, p);
579 return E_NOTIMPL;
580 }
581
582 static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
583 {
584 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
585 FIXME("(%p)->(%p)\n", This, p);
586 return E_NOTIMPL;
587 }
588
589 static HRESULT WINAPI HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle *iface, BSTR strAttributeName,
590 LONG lFlags, VARIANT *AttributeValue)
591 {
592 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
593 FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(strAttributeName), lFlags, AttributeValue);
594 return E_NOTIMPL;
595 }
596
597 static HRESULT WINAPI HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle *iface, BSTR *p)
598 {
599 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
600 FIXME("(%p)->(%p)\n", This, p);
601 return E_NOTIMPL;
602 }
603
604 static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIANT *p)
605 {
606 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
607 TRACE("(%p)->(%p)\n", This, p);
608 return get_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, p, 0);
609 }
610
611 static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
612 {
613 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
614 TRACE("(%p)->(%p)\n", This, p);
615 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BOTTOM, p, 0);
616 }
617
618 static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
619 {
620 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
621 FIXME("(%p)->(%p)\n", This, p);
622 return E_NOTIMPL;
623 }
624
625 static HRESULT WINAPI HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle *iface, BSTR *p)
626 {
627 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
628 FIXME("(%p)->(%p)\n", This, p);
629 return E_NOTIMPL;
630 }
631
632 static HRESULT WINAPI HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle *iface, BSTR *p)
633 {
634 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
635 FIXME("(%p)->(%p)\n", This, p);
636 return E_NOTIMPL;
637 }
638
639 static HRESULT WINAPI HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle *iface, BSTR *p)
640 {
641 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
642 FIXME("(%p)->(%p)\n", This, p);
643 return E_NOTIMPL;
644 }
645
646 static HRESULT WINAPI HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle *iface, BSTR *p)
647 {
648 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
649 FIXME("(%p)->(%p)\n", This, p);
650 return E_NOTIMPL;
651 }
652
653 static HRESULT WINAPI HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle *iface, BSTR *p)
654 {
655 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
656 FIXME("(%p)->(%p)\n", This, p);
657 return E_NOTIMPL;
658 }
659
660 static HRESULT WINAPI HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle *iface, BSTR *p)
661 {
662 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
663 FIXME("(%p)->(%p)\n", This, p);
664 return E_NOTIMPL;
665 }
666
667 static HRESULT WINAPI HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle *iface, BSTR *p)
668 {
669 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
670 FIXME("(%p)->(%p)\n", This, p);
671 return E_NOTIMPL;
672 }
673
674 static HRESULT WINAPI HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle *iface, BSTR *p)
675 {
676 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
677 FIXME("(%p)->(%p)\n", This, p);
678 return E_NOTIMPL;
679 }
680
681 static HRESULT WINAPI HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle *iface, VARIANT *p)
682 {
683 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
684 FIXME("(%p)->(%p)\n", This, p);
685 return E_NOTIMPL;
686 }
687
688 static HRESULT WINAPI HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle *iface, BSTR *p)
689 {
690 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
691 FIXME("(%p)->(%p)\n", This, p);
692 return E_NOTIMPL;
693 }
694
695 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle *iface, VARIANT *p)
696 {
697 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
698 FIXME("(%p)->(%p)\n", This, p);
699 return E_NOTIMPL;
700 }
701
702 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle *iface, VARIANT *p)
703 {
704 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
705 FIXME("(%p)->(%p)\n", This, p);
706 return E_NOTIMPL;
707 }
708
709 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle *iface, BSTR *p)
710 {
711 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
712 FIXME("(%p)->(%p)\n", This, p);
713 return E_NOTIMPL;
714 }
715
716 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle *iface, BSTR *p)
717 {
718 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
719 FIXME("(%p)->(%p)\n", This, p);
720 return E_NOTIMPL;
721 }
722
723 static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, BSTR *p)
724 {
725 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
726 TRACE("(%p)->(%p)\n", This, p);
727 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, p, 0);
728 }
729
730 static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
731 {
732 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
733 TRACE("(%p)->(%p)\n", This, p);
734 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_COLOR, p, 0);
735 }
736
737 static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
738 {
739 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
740 TRACE("(%p)->(%p)\n", This, p);
741 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_WIDTH, p, 0);
742 }
743
744 static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
745 {
746 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
747 TRACE("(%p)->(%p)\n", This, p);
748 return get_nsstyle_attr(This->nsstyle, STYLEID_PADDING, p, 0);
749 }
750
751 static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
752 {
753 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
754 TRACE("(%p)->(%p)\n", This, p);
755 return get_nsstyle_attr(This->nsstyle, STYLEID_MARGIN, p, 0);
756 }
757
758 static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
759 {
760 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
761 FIXME("(%p)->(%p)\n", This, p);
762 return E_NOTIMPL;
763 }
764
765 static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, BSTR *p)
766 {
767 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
768 FIXME("(%p)->(%p)\n", This, p);
769 return E_NOTIMPL;
770 }
771
772 static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
773 {
774 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
775 FIXME("(%p)->(%p)\n", This, p);
776 return E_NOTIMPL;
777 }
778
779 static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
780 {
781 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
782 TRACE("(%p)->(%p)\n", This, p);
783 return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_TRANSFORM, p, 0);
784 }
785
786 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
787 HTMLCurrentStyle_QueryInterface,
788 HTMLCurrentStyle_AddRef,
789 HTMLCurrentStyle_Release,
790 HTMLCurrentStyle_GetTypeInfoCount,
791 HTMLCurrentStyle_GetTypeInfo,
792 HTMLCurrentStyle_GetIDsOfNames,
793 HTMLCurrentStyle_Invoke,
794 HTMLCurrentStyle_get_position,
795 HTMLCurrentStyle_get_styleFloat,
796 HTMLCurrentStyle_get_color,
797 HTMLCurrentStyle_get_backgroundColor,
798 HTMLCurrentStyle_get_fontFamily,
799 HTMLCurrentStyle_get_fontStyle,
800 HTMLCurrentStyle_get_fontVariant,
801 HTMLCurrentStyle_get_fontWeight,
802 HTMLCurrentStyle_get_fontSize,
803 HTMLCurrentStyle_get_backgroundImage,
804 HTMLCurrentStyle_get_backgroundPositionX,
805 HTMLCurrentStyle_get_backgroundPositionY,
806 HTMLCurrentStyle_get_backgroundRepeat,
807 HTMLCurrentStyle_get_borderLeftColor,
808 HTMLCurrentStyle_get_borderTopColor,
809 HTMLCurrentStyle_get_borderRightColor,
810 HTMLCurrentStyle_get_borderBottomColor,
811 HTMLCurrentStyle_get_borderTopStyle,
812 HTMLCurrentStyle_get_borderRightStyle,
813 HTMLCurrentStyle_get_borderBottomStyle,
814 HTMLCurrentStyle_get_borderLeftStyle,
815 HTMLCurrentStyle_get_borderTopWidth,
816 HTMLCurrentStyle_get_borderRightWidth,
817 HTMLCurrentStyle_get_borderBottomWidth,
818 HTMLCurrentStyle_get_borderLeftWidth,
819 HTMLCurrentStyle_get_left,
820 HTMLCurrentStyle_get_top,
821 HTMLCurrentStyle_get_width,
822 HTMLCurrentStyle_get_height,
823 HTMLCurrentStyle_get_paddingLeft,
824 HTMLCurrentStyle_get_paddingTop,
825 HTMLCurrentStyle_get_paddingRight,
826 HTMLCurrentStyle_get_paddingBottom,
827 HTMLCurrentStyle_get_textAlign,
828 HTMLCurrentStyle_get_textDecoration,
829 HTMLCurrentStyle_get_display,
830 HTMLCurrentStyle_get_visibility,
831 HTMLCurrentStyle_get_zIndex,
832 HTMLCurrentStyle_get_letterSpacing,
833 HTMLCurrentStyle_get_lineHeight,
834 HTMLCurrentStyle_get_textIndent,
835 HTMLCurrentStyle_get_verticalAlign,
836 HTMLCurrentStyle_get_backgroundAttachment,
837 HTMLCurrentStyle_get_marginTop,
838 HTMLCurrentStyle_get_marginRight,
839 HTMLCurrentStyle_get_marginBottom,
840 HTMLCurrentStyle_get_marginLeft,
841 HTMLCurrentStyle_get_clear,
842 HTMLCurrentStyle_get_listStyleType,
843 HTMLCurrentStyle_get_listStylePosition,
844 HTMLCurrentStyle_get_listStyleImage,
845 HTMLCurrentStyle_get_clipTop,
846 HTMLCurrentStyle_get_clipRight,
847 HTMLCurrentStyle_get_clipBottom,
848 HTMLCurrentStyle_get_clipLeft,
849 HTMLCurrentStyle_get_overflow,
850 HTMLCurrentStyle_get_pageBreakBefore,
851 HTMLCurrentStyle_get_pageBreakAfter,
852 HTMLCurrentStyle_get_cursor,
853 HTMLCurrentStyle_get_tableLayout,
854 HTMLCurrentStyle_get_borderCollapse,
855 HTMLCurrentStyle_get_direction,
856 HTMLCurrentStyle_get_behavior,
857 HTMLCurrentStyle_getAttribute,
858 HTMLCurrentStyle_get_unicodeBidi,
859 HTMLCurrentStyle_get_right,
860 HTMLCurrentStyle_get_bottom,
861 HTMLCurrentStyle_get_imeMode,
862 HTMLCurrentStyle_get_rubyAlign,
863 HTMLCurrentStyle_get_rubyPosition,
864 HTMLCurrentStyle_get_rubyOverhang,
865 HTMLCurrentStyle_get_textAutospace,
866 HTMLCurrentStyle_get_lineBreak,
867 HTMLCurrentStyle_get_wordBreak,
868 HTMLCurrentStyle_get_textJustify,
869 HTMLCurrentStyle_get_textJustifyTrim,
870 HTMLCurrentStyle_get_textKashida,
871 HTMLCurrentStyle_get_blockDirection,
872 HTMLCurrentStyle_get_layoutGridChar,
873 HTMLCurrentStyle_get_layoutGridLine,
874 HTMLCurrentStyle_get_layoutGridMode,
875 HTMLCurrentStyle_get_layoutGridType,
876 HTMLCurrentStyle_get_borderStyle,
877 HTMLCurrentStyle_get_borderColor,
878 HTMLCurrentStyle_get_borderWidth,
879 HTMLCurrentStyle_get_padding,
880 HTMLCurrentStyle_get_margin,
881 HTMLCurrentStyle_get_accelerator,
882 HTMLCurrentStyle_get_overflowX,
883 HTMLCurrentStyle_get_overflowY,
884 HTMLCurrentStyle_get_textTransform
885 };
886
887 /* IHTMLCurrentStyle2 */
888 static HRESULT WINAPI HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2 *iface, REFIID riid, void **ppv)
889 {
890 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
891
892 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
893 }
894
895 static ULONG WINAPI HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2 *iface)
896 {
897 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
898
899 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
900 }
901
902 static ULONG WINAPI HTMLCurrentStyle2_Release(IHTMLCurrentStyle2 *iface)
903 {
904 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
905 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
906 }
907
908 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2 *iface, UINT *pctinfo)
909 {
910 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
911 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
912 }
913
914 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2 *iface, UINT iTInfo,
915 LCID lcid, ITypeInfo **ppTInfo)
916 {
917 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
918 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
919 }
920
921 static HRESULT WINAPI HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2 *iface, REFIID riid,
922 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
923 {
924 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
925 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
926 lcid, rgDispId);
927 }
928
929 static HRESULT WINAPI HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2 *iface, DISPID dispIdMember,
930 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
931 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
932 {
933 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
934 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
935 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
936 }
937
938 static HRESULT WINAPI HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2 *iface, BSTR *p)
939 {
940 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
941 FIXME("(%p)->(%p)\n", This, p);
942 return E_NOTIMPL;
943 }
944
945 static HRESULT WINAPI HTMLCurrentStyle2_get_wordWrap(IHTMLCurrentStyle2 *iface, BSTR *p)
946 {
947 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
948 FIXME("(%p)->(%p)\n", This, p);
949 return E_NOTIMPL;
950 }
951
952 static HRESULT WINAPI HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentStyle2 *iface, BSTR *p)
953 {
954 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
955 FIXME("(%p)->(%p)\n", This, p);
956 return E_NOTIMPL;
957 }
958
959 static HRESULT WINAPI HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
960 {
961 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
962
963 FIXME("(%p)->(%p) returning true\n", This, p);
964
965 *p = VARIANT_TRUE;
966 return S_OK;
967 }
968
969 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
970 {
971 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
972 FIXME("(%p)->(%p)\n", This, p);
973 return E_NOTIMPL;
974 }
975
976 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarFaceColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
977 {
978 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
979 FIXME("(%p)->(%p)\n", This, p);
980 return E_NOTIMPL;
981 }
982
983 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbar3dLightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
984 {
985 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
986 FIXME("(%p)->(%p)\n", This, p);
987 return E_NOTIMPL;
988 }
989
990 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
991 {
992 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
993 FIXME("(%p)->(%p)\n", This, p);
994 return E_NOTIMPL;
995 }
996
997 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarHighlightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
998 {
999 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1000 FIXME("(%p)->(%p)\n", This, p);
1001 return E_NOTIMPL;
1002 }
1003
1004 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarDarkShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1005 {
1006 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1007 FIXME("(%p)->(%p)\n", This, p);
1008 return E_NOTIMPL;
1009 }
1010
1011 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarArrowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1012 {
1013 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1014 FIXME("(%p)->(%p)\n", This, p);
1015 return E_NOTIMPL;
1016 }
1017
1018 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarTrackColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1019 {
1020 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1021 FIXME("(%p)->(%p)\n", This, p);
1022 return E_NOTIMPL;
1023 }
1024
1025 static HRESULT WINAPI HTMLCurrentStyle2_get_writingMode(IHTMLCurrentStyle2 *iface, BSTR *p)
1026 {
1027 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1028 FIXME("(%p)->(%p)\n", This, p);
1029 return E_NOTIMPL;
1030 }
1031
1032 static HRESULT WINAPI HTMLCurrentStyle2_get_zoom(IHTMLCurrentStyle2 *iface, VARIANT *p)
1033 {
1034 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1035 FIXME("(%p)->(%p)\n", This, p);
1036 return E_NOTIMPL;
1037 }
1038
1039 static HRESULT WINAPI HTMLCurrentStyle2_get_filter(IHTMLCurrentStyle2 *iface, BSTR *p)
1040 {
1041 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1042
1043 TRACE("(%p)->(%p)\n", This, p);
1044
1045 if(This->elem->filter) {
1046 *p = SysAllocString(This->elem->filter);
1047 if(!*p)
1048 return E_OUTOFMEMORY;
1049 }else {
1050 *p = NULL;
1051 }
1052
1053 return S_OK;
1054 }
1055
1056 static HRESULT WINAPI HTMLCurrentStyle2_get_textAlignLast(IHTMLCurrentStyle2 *iface, BSTR *p)
1057 {
1058 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1059 FIXME("(%p)->(%p)\n", This, p);
1060 return E_NOTIMPL;
1061 }
1062
1063 static HRESULT WINAPI HTMLCurrentStyle2_get_textKashidaSpace(IHTMLCurrentStyle2 *iface, VARIANT *p)
1064 {
1065 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1066 FIXME("(%p)->(%p)\n", This, p);
1067 return E_NOTIMPL;
1068 }
1069
1070 static HRESULT WINAPI HTMLCurrentStyle2_get_isBlock(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
1071 {
1072 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1073 FIXME("(%p)->(%p)\n", This, p);
1074 return E_NOTIMPL;
1075 }
1076
1077 static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl = {
1078 HTMLCurrentStyle2_QueryInterface,
1079 HTMLCurrentStyle2_AddRef,
1080 HTMLCurrentStyle2_Release,
1081 HTMLCurrentStyle2_GetTypeInfoCount,
1082 HTMLCurrentStyle2_GetTypeInfo,
1083 HTMLCurrentStyle2_GetIDsOfNames,
1084 HTMLCurrentStyle2_Invoke,
1085 HTMLCurrentStyle2_get_layoutFlow,
1086 HTMLCurrentStyle2_get_wordWrap,
1087 HTMLCurrentStyle2_get_textUnderlinePosition,
1088 HTMLCurrentStyle2_get_hasLayout,
1089 HTMLCurrentStyle2_get_scrollbarBaseColor,
1090 HTMLCurrentStyle2_get_scrollbarFaceColor,
1091 HTMLCurrentStyle2_get_scrollbar3dLightColor,
1092 HTMLCurrentStyle2_get_scrollbarShadowColor,
1093 HTMLCurrentStyle2_get_scrollbarHighlightColor,
1094 HTMLCurrentStyle2_get_scrollbarDarkShadowColor,
1095 HTMLCurrentStyle2_get_scrollbarArrowColor,
1096 HTMLCurrentStyle2_get_scrollbarTrackColor,
1097 HTMLCurrentStyle2_get_writingMode,
1098 HTMLCurrentStyle2_get_zoom,
1099 HTMLCurrentStyle2_get_filter,
1100 HTMLCurrentStyle2_get_textAlignLast,
1101 HTMLCurrentStyle2_get_textKashidaSpace,
1102 HTMLCurrentStyle2_get_isBlock
1103 };
1104
1105 /* IHTMLCurrentStyle3 */
1106 static HRESULT WINAPI HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3 *iface, REFIID riid, void **ppv)
1107 {
1108 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1109
1110 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1111 }
1112
1113 static ULONG WINAPI HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3 *iface)
1114 {
1115 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1116
1117 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1118 }
1119
1120 static ULONG WINAPI HTMLCurrentStyle3_Release(IHTMLCurrentStyle3 *iface)
1121 {
1122 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1123 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1124 }
1125
1126 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3 *iface, UINT *pctinfo)
1127 {
1128 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1129 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
1130 }
1131
1132 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3 *iface, UINT iTInfo,
1133 LCID lcid, ITypeInfo **ppTInfo)
1134 {
1135 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1136 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1137 }
1138
1139 static HRESULT WINAPI HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3 *iface, REFIID riid,
1140 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1141 {
1142 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1143 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1144 lcid, rgDispId);
1145 }
1146
1147 static HRESULT WINAPI HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3 *iface, DISPID dispIdMember,
1148 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1149 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1150 {
1151 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1152 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1153 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1154 }
1155
1156 static HRESULT WINAPI HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3 *iface, BSTR *p)
1157 {
1158 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1159 FIXME("(%p)->(%p)\n", This, p);
1160 return E_NOTIMPL;
1161 }
1162
1163 static HRESULT WINAPI HTMLCurrentStyle3_get_minHeight(IHTMLCurrentStyle3 *iface, VARIANT *p)
1164 {
1165 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1166 FIXME("(%p)->(%p)\n", This, p);
1167 return E_NOTIMPL;
1168 }
1169
1170 static HRESULT WINAPI HTMLCurrentStyle3_get_wordSpacing(IHTMLCurrentStyle3 *iface, VARIANT *p)
1171 {
1172 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1173 FIXME("(%p)->(%p)\n", This, p);
1174 return E_NOTIMPL;
1175 }
1176
1177 static HRESULT WINAPI HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3 *iface, BSTR *p)
1178 {
1179 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1180 FIXME("(%p)->(%p)\n", This, p);
1181 return E_NOTIMPL;
1182 }
1183
1184 static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl = {
1185 HTMLCurrentStyle3_QueryInterface,
1186 HTMLCurrentStyle3_AddRef,
1187 HTMLCurrentStyle3_Release,
1188 HTMLCurrentStyle3_GetTypeInfoCount,
1189 HTMLCurrentStyle3_GetTypeInfo,
1190 HTMLCurrentStyle3_GetIDsOfNames,
1191 HTMLCurrentStyle3_Invoke,
1192 HTMLCurrentStyle3_get_textOverflow,
1193 HTMLCurrentStyle3_get_minHeight,
1194 HTMLCurrentStyle3_get_wordSpacing,
1195 HTMLCurrentStyle3_get_whiteSpace
1196 };
1197
1198 /* IHTMLCurrentStyle4 */
1199 static HRESULT WINAPI HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4 *iface, REFIID riid, void **ppv)
1200 {
1201 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1202
1203 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1204 }
1205
1206 static ULONG WINAPI HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4 *iface)
1207 {
1208 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1209
1210 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1211 }
1212
1213 static ULONG WINAPI HTMLCurrentStyle4_Release(IHTMLCurrentStyle4 *iface)
1214 {
1215 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1216 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1217 }
1218
1219 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4 *iface, UINT *pctinfo)
1220 {
1221 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1222 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
1223 }
1224
1225 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4 *iface, UINT iTInfo,
1226 LCID lcid, ITypeInfo **ppTInfo)
1227 {
1228 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1229 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1230 }
1231
1232 static HRESULT WINAPI HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4 *iface, REFIID riid,
1233 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1234 {
1235 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1236 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1237 lcid, rgDispId);
1238 }
1239
1240 static HRESULT WINAPI HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4 *iface, DISPID dispIdMember,
1241 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1242 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1243 {
1244 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1245 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1246 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1247 }
1248
1249 static HRESULT WINAPI HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4 *iface, BSTR *p)
1250 {
1251 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1252 FIXME("(%p)->(%p)\n", This, p);
1253 return E_NOTIMPL;
1254 }
1255
1256 static HRESULT WINAPI HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4 *iface, VARIANT *p)
1257 {
1258 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1259 FIXME("(%p)->(%p)\n", This, p);
1260 return E_NOTIMPL;
1261 }
1262
1263 static HRESULT WINAPI HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1264 {
1265 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1266 FIXME("(%p)->(%p)\n", This, p);
1267 return E_NOTIMPL;
1268 }
1269
1270 static HRESULT WINAPI HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1271 {
1272 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1273 FIXME("(%p)->(%p)\n", This, p);
1274 return E_NOTIMPL;
1275 }
1276
1277 static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl = {
1278 HTMLCurrentStyle4_QueryInterface,
1279 HTMLCurrentStyle4_AddRef,
1280 HTMLCurrentStyle4_Release,
1281 HTMLCurrentStyle4_GetTypeInfoCount,
1282 HTMLCurrentStyle4_GetTypeInfo,
1283 HTMLCurrentStyle4_GetIDsOfNames,
1284 HTMLCurrentStyle4_Invoke,
1285 HTMLCurrentStyle4_msInterpolationMode,
1286 HTMLCurrentStyle4_get_maxHeight,
1287 HTMLCurrentStyle4_get_minWidth,
1288 HTMLCurrentStyle4_get_maxWidth
1289 };
1290
1291 static const tid_t HTMLCurrentStyle_iface_tids[] = {
1292 IHTMLCurrentStyle_tid,
1293 IHTMLCurrentStyle2_tid,
1294 IHTMLCurrentStyle3_tid,
1295 IHTMLCurrentStyle4_tid,
1296 0
1297 };
1298 static dispex_static_data_t HTMLCurrentStyle_dispex = {
1299 NULL,
1300 DispHTMLCurrentStyle_tid,
1301 NULL,
1302 HTMLCurrentStyle_iface_tids
1303 };
1304
1305 HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
1306 {
1307 nsIDOMCSSStyleDeclaration *nsstyle;
1308 nsIDOMWindow *nsview;
1309 nsAString nsempty_str;
1310 HTMLCurrentStyle *ret;
1311 nsresult nsres;
1312
1313 if(!elem->node.doc->nsdoc) {
1314 WARN("NULL nsdoc\n");
1315 return E_UNEXPECTED;
1316 }
1317
1318 nsres = nsIDOMHTMLDocument_GetDefaultView(elem->node.doc->nsdoc, &nsview);
1319 if(NS_FAILED(nsres)) {
1320 ERR("GetDefaultView failed: %08x\n", nsres);
1321 return E_FAIL;
1322 }
1323
1324 nsAString_Init(&nsempty_str, NULL);
1325 nsres = nsIDOMWindow_GetComputedStyle(nsview, (nsIDOMElement*)elem->nselem, &nsempty_str, &nsstyle);
1326 nsAString_Finish(&nsempty_str);
1327 if(NS_FAILED(nsres)) {
1328 ERR("GetComputedStyle failed: %08x\n", nsres);
1329 return E_FAIL;
1330 }
1331
1332 ret = heap_alloc_zero(sizeof(HTMLCurrentStyle));
1333 if(!ret) {
1334 nsIDOMCSSStyleDeclaration_Release(nsstyle);
1335 return E_OUTOFMEMORY;
1336 }
1337
1338 ret->IHTMLCurrentStyle_iface.lpVtbl = &HTMLCurrentStyleVtbl;
1339 ret->IHTMLCurrentStyle2_iface.lpVtbl = &HTMLCurrentStyle2Vtbl;
1340 ret->IHTMLCurrentStyle3_iface.lpVtbl = &HTMLCurrentStyle3Vtbl;
1341 ret->IHTMLCurrentStyle4_iface.lpVtbl = &HTMLCurrentStyle4Vtbl;
1342 ret->ref = 1;
1343 ret->nsstyle = nsstyle;
1344
1345 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLCurrentStyle_iface, &HTMLCurrentStyle_dispex);
1346
1347 IHTMLElement_AddRef(&elem->IHTMLElement_iface);
1348 ret->elem = elem;
1349
1350 *p = &ret->IHTMLCurrentStyle_iface;
1351 return S_OK;
1352 }