include: Update the nldef.h and *mib.h headers.
[wine/multimedia.git] / dlls / mshtml / htmlcurstyle.c
blobc17b3ba437661632341092d7c4bfe49a18d4e167
1 /*
2 * Copyright 2008 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
19 #include <stdarg.h>
21 #define COBJMACROS
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
28 #include "mshtml_private.h"
29 #include "htmlstyle.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
35 struct HTMLCurrentStyle {
36 DispatchEx dispex;
37 IHTMLCurrentStyle IHTMLCurrentStyle_iface;
38 IHTMLCurrentStyle2 IHTMLCurrentStyle2_iface;
39 IHTMLCurrentStyle3 IHTMLCurrentStyle3_iface;
40 IHTMLCurrentStyle4 IHTMLCurrentStyle4_iface;
42 LONG ref;
44 nsIDOMCSSStyleDeclaration *nsstyle;
47 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle *iface)
49 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle_iface);
52 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle2(IHTMLCurrentStyle2 *iface)
54 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle2_iface);
57 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle3(IHTMLCurrentStyle3 *iface)
59 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle3_iface);
62 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle4(IHTMLCurrentStyle4 *iface)
64 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle4_iface);
67 static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface, REFIID riid, void **ppv)
69 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
71 *ppv = NULL;
73 if(IsEqualGUID(&IID_IUnknown, riid)) {
74 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
75 *ppv = &This->IHTMLCurrentStyle_iface;
76 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle, riid)) {
77 TRACE("(%p)->(IID_IHTMLCurrentStyle %p)\n", This, ppv);
78 *ppv = &This->IHTMLCurrentStyle_iface;
79 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle2, riid)) {
80 TRACE("(%p)->(IID_IHTMLCurrentStyle2 %p)\n", This, ppv);
81 *ppv = &This->IHTMLCurrentStyle2_iface;
82 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle3, riid)) {
83 TRACE("(%p)->(IID_IHTMLCurrentStyle3 %p)\n", This, ppv);
84 *ppv = &This->IHTMLCurrentStyle3_iface;
85 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle4, riid)) {
86 TRACE("(%p)->(IID_IHTMLCurrentStyle4 %p)\n", This, ppv);
87 *ppv = &This->IHTMLCurrentStyle4_iface;
88 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
89 return *ppv ? S_OK : E_NOINTERFACE;
92 if(*ppv) {
93 IUnknown_AddRef((IUnknown*)*ppv);
94 return S_OK;
97 WARN("unsupported %s\n", debugstr_guid(riid));
98 return E_NOINTERFACE;
101 static ULONG WINAPI HTMLCurrentStyle_AddRef(IHTMLCurrentStyle *iface)
103 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
104 LONG ref = InterlockedIncrement(&This->ref);
106 TRACE("(%p) ref=%d\n", This, ref);
108 return ref;
111 static ULONG WINAPI HTMLCurrentStyle_Release(IHTMLCurrentStyle *iface)
113 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
114 LONG ref = InterlockedDecrement(&This->ref);
116 TRACE("(%p) ref=%d\n", This, ref);
118 if(!ref) {
119 if(This->nsstyle)
120 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
121 release_dispex(&This->dispex);
122 heap_free(This);
125 return ref;
128 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle *iface, UINT *pctinfo)
130 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
131 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
134 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle *iface, UINT iTInfo,
135 LCID lcid, ITypeInfo **ppTInfo)
137 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
138 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
141 static HRESULT WINAPI HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle *iface, REFIID riid,
142 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
144 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
145 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
146 lcid, rgDispId);
149 static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID dispIdMember,
150 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
151 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
153 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
154 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
155 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
158 static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p)
160 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
162 TRACE("(%p)->(%p)\n", This, p);
164 return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p, 0);
167 static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
169 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
170 FIXME("(%p)->(%p)\n", This, p);
171 return E_NOTIMPL;
174 static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
176 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
177 TRACE("(%p)->(%p)\n", This, p);
178 return get_nsstyle_attr_var(This->nsstyle, STYLEID_COLOR, p, 0);
181 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
183 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
184 TRACE("(%p)->(%p)\n", This, p);
185 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_COLOR, p, 0);
188 static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
190 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
192 TRACE("(%p)->(%p)\n", This, p);
194 return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_FAMILY, p, 0);
197 static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
199 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
200 TRACE("(%p)->(%p)\n", This, p);
201 return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, p, 0);
204 static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
206 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
207 TRACE("(%p)->(%p)\n", This, p);
208 return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, p, 0);
211 static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
213 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
214 TRACE("(%p)->(%p)\n", This, p);
215 return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_WEIGHT, p, ATTR_STR_TO_INT);
218 static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
220 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
221 TRACE("(%p)->(%p)\n", This, p);
222 return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_SIZE, p, 0);
225 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
227 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
228 TRACE("(%p)->(%p)\n", This, p);
229 return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_IMAGE, p, 0);
232 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
234 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
235 FIXME("(%p)->(%p)\n", This, p);
236 return E_NOTIMPL;
239 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle *iface, VARIANT *p)
241 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
242 FIXME("(%p)->(%p)\n", This, p);
243 return E_NOTIMPL;
246 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *iface, BSTR *p)
248 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
249 TRACE("(%p)->(%p)\n", This, p);
250 return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_REPEAT, p, 0);
253 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
255 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
256 TRACE("(%p)->(%p)\n", This, p);
257 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_COLOR, p, 0);
260 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
262 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
263 TRACE("(%p)->(%p)\n", This, p);
264 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_COLOR, p, 0);
267 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
269 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
270 TRACE("(%p)->(%p)\n", This, p);
271 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_COLOR, p, 0);
274 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
276 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
277 TRACE("(%p)->(%p)\n", This, p);
278 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_COLOR, p, 0);
281 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
283 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
284 TRACE("(%p)->(%p)\n", This, p);
285 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_TOP_STYLE, p, 0);
288 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
290 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
291 TRACE("(%p)->(%p)\n", This, p);
292 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_RIGHT_STYLE, p, 0);
295 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
297 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
298 TRACE("(%p)->(%p)\n", This, p);
299 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_BOTTOM_STYLE, p, 0);
302 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
304 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
305 TRACE("(%p)->(%p)\n", This, p);
306 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_LEFT_STYLE, p, 0);
309 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
311 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
312 TRACE("(%p)->(%p)\n", This, p);
313 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
316 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
318 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
319 TRACE("(%p)->(%p)\n", This, p);
320 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
323 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
325 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
326 TRACE("(%p)->(%p)\n", This, p);
327 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
330 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
332 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
333 TRACE("(%p)->(%p)\n", This, p);
334 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
337 static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
339 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
340 TRACE("(%p)->(%p)\n", This, p);
341 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, p, 0);
344 static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
346 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
347 TRACE("(%p)->(%p)\n", This, p);
348 return get_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, p, 0);
351 static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
353 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
354 TRACE("(%p)->(%p)\n", This, p);
355 return get_nsstyle_attr_var(This->nsstyle, STYLEID_WIDTH, p, 0);
358 static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
360 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
361 TRACE("(%p)->(%p)\n", This, p);
362 return get_nsstyle_attr_var(This->nsstyle, STYLEID_HEIGHT, p, 0);
365 static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
367 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
368 TRACE("(%p)->(%p)\n", This, p);
369 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_LEFT, p, 0);
372 static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
374 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
375 TRACE("(%p)->(%p)\n", This, p);
376 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_TOP, p, 0);
379 static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
381 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
382 TRACE("(%p)->(%p)\n", This, p);
383 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_RIGHT, p, 0);
386 static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
388 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
389 TRACE("(%p)->(%p)\n", This, p);
390 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_BOTTOM, p, 0);
393 static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
395 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
396 TRACE("(%p)->(%p)\n", This, p);
397 return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_ALIGN, p, 0);
400 static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
402 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
403 TRACE("(%p)->(%p)\n", This, p);
404 return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_DECORATION, p, 0);
407 static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
409 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
411 TRACE("(%p)->(%p)\n", This, p);
413 return get_nsstyle_attr(This->nsstyle, STYLEID_DISPLAY, p, 0);
416 static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p)
418 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
420 TRACE("(%p)->(%p)\n", This, p);
422 return get_nsstyle_attr(This->nsstyle, STYLEID_VISIBILITY, p, 0);
425 static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
427 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
428 TRACE("(%p)->(%p)\n", This, p);
429 return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
432 static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
434 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
435 TRACE("(%p)->(%p)\n", This, p);
436 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
439 static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
441 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
442 TRACE("(%p)->(%p)\n", This, p);
443 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LINE_HEIGHT, p, 0);
446 static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
448 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
449 TRACE("(%p)->(%p)\n", This, p);
450 return get_nsstyle_attr_var(This->nsstyle, STYLEID_TEXT_INDENT, p, 0);
453 static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
455 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
456 TRACE("(%p)->(%p)\n", This, p);
457 return get_nsstyle_attr_var(This->nsstyle, STYLEID_VERTICAL_ALIGN, p, 0);
460 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
462 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
463 FIXME("(%p)->(%p)\n", This, p);
464 return E_NOTIMPL;
467 static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, VARIANT *p)
469 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
470 TRACE("(%p)->(%p)\n", This, p);
471 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_TOP, p, 0);
474 static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
476 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
477 TRACE("(%p)->(%p)\n", This, p);
478 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
481 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
483 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
484 TRACE("(%p)->(%p)\n", This, p);
485 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_BOTTOM, p, 0);
488 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
490 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
491 TRACE("(%p)->(%p)\n", This, p);
492 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
495 static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
497 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
498 FIXME("(%p)->(%p)\n", This, p);
499 return E_NOTIMPL;
502 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle *iface, BSTR *p)
504 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
505 FIXME("(%p)->(%p)\n", This, p);
506 return E_NOTIMPL;
509 static HRESULT WINAPI HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle *iface, BSTR *p)
511 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
512 FIXME("(%p)->(%p)\n", This, p);
513 return E_NOTIMPL;
516 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle *iface, BSTR *p)
518 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
519 FIXME("(%p)->(%p)\n", This, p);
520 return E_NOTIMPL;
523 static HRESULT WINAPI HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle *iface, VARIANT *p)
525 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
526 FIXME("(%p)->(%p)\n", This, p);
527 return E_NOTIMPL;
530 static HRESULT WINAPI HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle *iface, VARIANT *p)
532 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
533 FIXME("(%p)->(%p)\n", This, p);
534 return E_NOTIMPL;
537 static HRESULT WINAPI HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle *iface, VARIANT *p)
539 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
540 FIXME("(%p)->(%p)\n", This, p);
541 return E_NOTIMPL;
544 static HRESULT WINAPI HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle *iface, VARIANT *p)
546 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
547 FIXME("(%p)->(%p)\n", This, p);
548 return E_NOTIMPL;
551 static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BSTR *p)
553 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
554 TRACE("(%p)->(%p)\n", This, p);
555 return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, p, 0);
558 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
560 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
561 FIXME("(%p)->(%p)\n", This, p);
562 return E_NOTIMPL;
565 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *iface, BSTR *p)
567 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
568 FIXME("(%p)->(%p)\n", This, p);
569 return E_NOTIMPL;
572 static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
574 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
575 TRACE("(%p)->(%p)\n", This, p);
576 return get_nsstyle_attr(This->nsstyle, STYLEID_CURSOR, p, 0);
579 static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
581 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
582 FIXME("(%p)->(%p)\n", This, p);
583 return E_NOTIMPL;
586 static HRESULT WINAPI HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle *iface, BSTR *p)
588 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
589 FIXME("(%p)->(%p)\n", This, p);
590 return E_NOTIMPL;
593 static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, BSTR *p)
595 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
596 FIXME("(%p)->(%p)\n", This, p);
597 return E_NOTIMPL;
600 static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
602 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
603 FIXME("(%p)->(%p)\n", This, p);
604 return E_NOTIMPL;
607 static HRESULT WINAPI HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle *iface, BSTR strAttributeName,
608 LONG lFlags, VARIANT *AttributeValue)
610 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
611 FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(strAttributeName), lFlags, AttributeValue);
612 return E_NOTIMPL;
615 static HRESULT WINAPI HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle *iface, BSTR *p)
617 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
618 FIXME("(%p)->(%p)\n", This, p);
619 return E_NOTIMPL;
622 static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIANT *p)
624 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
625 TRACE("(%p)->(%p)\n", This, p);
626 return get_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, p, 0);
629 static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
631 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
632 TRACE("(%p)->(%p)\n", This, p);
633 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BOTTOM, p, 0);
636 static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
638 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
639 FIXME("(%p)->(%p)\n", This, p);
640 return E_NOTIMPL;
643 static HRESULT WINAPI HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle *iface, BSTR *p)
645 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
646 FIXME("(%p)->(%p)\n", This, p);
647 return E_NOTIMPL;
650 static HRESULT WINAPI HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle *iface, BSTR *p)
652 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
653 FIXME("(%p)->(%p)\n", This, p);
654 return E_NOTIMPL;
657 static HRESULT WINAPI HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle *iface, BSTR *p)
659 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
660 FIXME("(%p)->(%p)\n", This, p);
661 return E_NOTIMPL;
664 static HRESULT WINAPI HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle *iface, BSTR *p)
666 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
667 FIXME("(%p)->(%p)\n", This, p);
668 return E_NOTIMPL;
671 static HRESULT WINAPI HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle *iface, BSTR *p)
673 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
674 FIXME("(%p)->(%p)\n", This, p);
675 return E_NOTIMPL;
678 static HRESULT WINAPI HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle *iface, BSTR *p)
680 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
681 FIXME("(%p)->(%p)\n", This, p);
682 return E_NOTIMPL;
685 static HRESULT WINAPI HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle *iface, BSTR *p)
687 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
688 FIXME("(%p)->(%p)\n", This, p);
689 return E_NOTIMPL;
692 static HRESULT WINAPI HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle *iface, BSTR *p)
694 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
695 FIXME("(%p)->(%p)\n", This, p);
696 return E_NOTIMPL;
699 static HRESULT WINAPI HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle *iface, VARIANT *p)
701 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
702 FIXME("(%p)->(%p)\n", This, p);
703 return E_NOTIMPL;
706 static HRESULT WINAPI HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle *iface, BSTR *p)
708 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
709 FIXME("(%p)->(%p)\n", This, p);
710 return E_NOTIMPL;
713 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle *iface, VARIANT *p)
715 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
716 FIXME("(%p)->(%p)\n", This, p);
717 return E_NOTIMPL;
720 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle *iface, VARIANT *p)
722 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
723 FIXME("(%p)->(%p)\n", This, p);
724 return E_NOTIMPL;
727 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle *iface, BSTR *p)
729 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
730 FIXME("(%p)->(%p)\n", This, p);
731 return E_NOTIMPL;
734 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle *iface, BSTR *p)
736 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
737 FIXME("(%p)->(%p)\n", This, p);
738 return E_NOTIMPL;
741 static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, BSTR *p)
743 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
744 TRACE("(%p)->(%p)\n", This, p);
745 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, p, 0);
748 static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
750 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
751 TRACE("(%p)->(%p)\n", This, p);
752 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_COLOR, p, 0);
755 static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
757 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
758 TRACE("(%p)->(%p)\n", This, p);
759 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_WIDTH, p, 0);
762 static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
764 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
765 TRACE("(%p)->(%p)\n", This, p);
766 return get_nsstyle_attr(This->nsstyle, STYLEID_PADDING, p, 0);
769 static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
771 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
772 TRACE("(%p)->(%p)\n", This, p);
773 return get_nsstyle_attr(This->nsstyle, STYLEID_MARGIN, p, 0);
776 static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
778 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
779 FIXME("(%p)->(%p)\n", This, p);
780 return E_NOTIMPL;
783 static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, BSTR *p)
785 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
786 FIXME("(%p)->(%p)\n", This, p);
787 return E_NOTIMPL;
790 static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
792 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
793 FIXME("(%p)->(%p)\n", This, p);
794 return E_NOTIMPL;
797 static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
799 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
800 FIXME("(%p)->(%p)\n", This, p);
801 return E_NOTIMPL;
804 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
805 HTMLCurrentStyle_QueryInterface,
806 HTMLCurrentStyle_AddRef,
807 HTMLCurrentStyle_Release,
808 HTMLCurrentStyle_GetTypeInfoCount,
809 HTMLCurrentStyle_GetTypeInfo,
810 HTMLCurrentStyle_GetIDsOfNames,
811 HTMLCurrentStyle_Invoke,
812 HTMLCurrentStyle_get_position,
813 HTMLCurrentStyle_get_styleFloat,
814 HTMLCurrentStyle_get_color,
815 HTMLCurrentStyle_get_backgroundColor,
816 HTMLCurrentStyle_get_fontFamily,
817 HTMLCurrentStyle_get_fontStyle,
818 HTMLCurrentStyle_get_fontVariant,
819 HTMLCurrentStyle_get_fontWeight,
820 HTMLCurrentStyle_get_fontSize,
821 HTMLCurrentStyle_get_backgroundImage,
822 HTMLCurrentStyle_get_backgroundPositionX,
823 HTMLCurrentStyle_get_backgroundPositionY,
824 HTMLCurrentStyle_get_backgroundRepeat,
825 HTMLCurrentStyle_get_borderLeftColor,
826 HTMLCurrentStyle_get_borderTopColor,
827 HTMLCurrentStyle_get_borderRightColor,
828 HTMLCurrentStyle_get_borderBottomColor,
829 HTMLCurrentStyle_get_borderTopStyle,
830 HTMLCurrentStyle_get_borderRightStyle,
831 HTMLCurrentStyle_get_borderBottomStyle,
832 HTMLCurrentStyle_get_borderLeftStyle,
833 HTMLCurrentStyle_get_borderTopWidth,
834 HTMLCurrentStyle_get_borderRightWidth,
835 HTMLCurrentStyle_get_borderBottomWidth,
836 HTMLCurrentStyle_get_borderLeftWidth,
837 HTMLCurrentStyle_get_left,
838 HTMLCurrentStyle_get_top,
839 HTMLCurrentStyle_get_width,
840 HTMLCurrentStyle_get_height,
841 HTMLCurrentStyle_get_paddingLeft,
842 HTMLCurrentStyle_get_paddingTop,
843 HTMLCurrentStyle_get_paddingRight,
844 HTMLCurrentStyle_get_paddingBottom,
845 HTMLCurrentStyle_get_textAlign,
846 HTMLCurrentStyle_get_textDecoration,
847 HTMLCurrentStyle_get_display,
848 HTMLCurrentStyle_get_visibility,
849 HTMLCurrentStyle_get_zIndex,
850 HTMLCurrentStyle_get_letterSpacing,
851 HTMLCurrentStyle_get_lineHeight,
852 HTMLCurrentStyle_get_textIndent,
853 HTMLCurrentStyle_get_verticalAlign,
854 HTMLCurrentStyle_get_backgroundAttachment,
855 HTMLCurrentStyle_get_marginTop,
856 HTMLCurrentStyle_get_marginRight,
857 HTMLCurrentStyle_get_marginBottom,
858 HTMLCurrentStyle_get_marginLeft,
859 HTMLCurrentStyle_get_clear,
860 HTMLCurrentStyle_get_listStyleType,
861 HTMLCurrentStyle_get_listStylePosition,
862 HTMLCurrentStyle_get_listStyleImage,
863 HTMLCurrentStyle_get_clipTop,
864 HTMLCurrentStyle_get_clipRight,
865 HTMLCurrentStyle_get_clipBottom,
866 HTMLCurrentStyle_get_clipLeft,
867 HTMLCurrentStyle_get_overflow,
868 HTMLCurrentStyle_get_pageBreakBefore,
869 HTMLCurrentStyle_get_pageBreakAfter,
870 HTMLCurrentStyle_get_cursor,
871 HTMLCurrentStyle_get_tableLayout,
872 HTMLCurrentStyle_get_borderCollapse,
873 HTMLCurrentStyle_get_direction,
874 HTMLCurrentStyle_get_behavior,
875 HTMLCurrentStyle_getAttribute,
876 HTMLCurrentStyle_get_unicodeBidi,
877 HTMLCurrentStyle_get_right,
878 HTMLCurrentStyle_get_bottom,
879 HTMLCurrentStyle_get_imeMode,
880 HTMLCurrentStyle_get_rubyAlign,
881 HTMLCurrentStyle_get_rubyPosition,
882 HTMLCurrentStyle_get_rubyOverhang,
883 HTMLCurrentStyle_get_textAutospace,
884 HTMLCurrentStyle_get_lineBreak,
885 HTMLCurrentStyle_get_wordBreak,
886 HTMLCurrentStyle_get_textJustify,
887 HTMLCurrentStyle_get_textJustifyTrim,
888 HTMLCurrentStyle_get_textKashida,
889 HTMLCurrentStyle_get_blockDirection,
890 HTMLCurrentStyle_get_layoutGridChar,
891 HTMLCurrentStyle_get_layoutGridLine,
892 HTMLCurrentStyle_get_layoutGridMode,
893 HTMLCurrentStyle_get_layoutGridType,
894 HTMLCurrentStyle_get_borderStyle,
895 HTMLCurrentStyle_get_borderColor,
896 HTMLCurrentStyle_get_borderWidth,
897 HTMLCurrentStyle_get_padding,
898 HTMLCurrentStyle_get_margin,
899 HTMLCurrentStyle_get_accelerator,
900 HTMLCurrentStyle_get_overflowX,
901 HTMLCurrentStyle_get_overflowY,
902 HTMLCurrentStyle_get_textTransform
905 /* IHTMLCurrentStyle2 */
906 static HRESULT WINAPI HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2 *iface, REFIID riid, void **ppv)
908 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
910 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
913 static ULONG WINAPI HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2 *iface)
915 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
917 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
920 static ULONG WINAPI HTMLCurrentStyle2_Release(IHTMLCurrentStyle2 *iface)
922 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
923 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
926 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2 *iface, UINT *pctinfo)
928 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
929 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
932 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2 *iface, UINT iTInfo,
933 LCID lcid, ITypeInfo **ppTInfo)
935 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
936 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
939 static HRESULT WINAPI HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2 *iface, REFIID riid,
940 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
942 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
943 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
944 lcid, rgDispId);
947 static HRESULT WINAPI HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2 *iface, DISPID dispIdMember,
948 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
949 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
951 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
952 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
953 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
956 static HRESULT WINAPI HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2 *iface, BSTR *p)
958 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
959 FIXME("(%p)->(%p)\n", This, p);
960 return E_NOTIMPL;
963 static HRESULT WINAPI HTMLCurrentStyle2_get_wordWrap(IHTMLCurrentStyle2 *iface, BSTR *p)
965 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
966 FIXME("(%p)->(%p)\n", This, p);
967 return E_NOTIMPL;
970 static HRESULT WINAPI HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentStyle2 *iface, BSTR *p)
972 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
973 FIXME("(%p)->(%p)\n", This, p);
974 return E_NOTIMPL;
977 static HRESULT WINAPI HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
979 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
980 FIXME("(%p)->(%p)\n", This, p);
981 return E_NOTIMPL;
984 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
986 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
987 FIXME("(%p)->(%p)\n", This, p);
988 return E_NOTIMPL;
991 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarFaceColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
993 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
994 FIXME("(%p)->(%p)\n", This, p);
995 return E_NOTIMPL;
998 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbar3dLightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1000 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1001 FIXME("(%p)->(%p)\n", This, p);
1002 return E_NOTIMPL;
1005 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1007 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1008 FIXME("(%p)->(%p)\n", This, p);
1009 return E_NOTIMPL;
1012 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarHighlightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1014 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1015 FIXME("(%p)->(%p)\n", This, p);
1016 return E_NOTIMPL;
1019 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarDarkShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1021 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1022 FIXME("(%p)->(%p)\n", This, p);
1023 return E_NOTIMPL;
1026 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarArrowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1028 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1029 FIXME("(%p)->(%p)\n", This, p);
1030 return E_NOTIMPL;
1033 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarTrackColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1035 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1036 FIXME("(%p)->(%p)\n", This, p);
1037 return E_NOTIMPL;
1040 static HRESULT WINAPI HTMLCurrentStyle2_get_writingMode(IHTMLCurrentStyle2 *iface, BSTR *p)
1042 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1043 FIXME("(%p)->(%p)\n", This, p);
1044 return E_NOTIMPL;
1047 static HRESULT WINAPI HTMLCurrentStyle2_get_zoom(IHTMLCurrentStyle2 *iface, VARIANT *p)
1049 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1050 FIXME("(%p)->(%p)\n", This, p);
1051 return E_NOTIMPL;
1054 static HRESULT WINAPI HTMLCurrentStyle2_get_filter(IHTMLCurrentStyle2 *iface, BSTR *p)
1056 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1057 FIXME("(%p)->(%p)\n", This, p);
1058 return E_NOTIMPL;
1061 static HRESULT WINAPI HTMLCurrentStyle2_get_textAlignLast(IHTMLCurrentStyle2 *iface, BSTR *p)
1063 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1064 FIXME("(%p)->(%p)\n", This, p);
1065 return E_NOTIMPL;
1068 static HRESULT WINAPI HTMLCurrentStyle2_get_textKashidaSpace(IHTMLCurrentStyle2 *iface, VARIANT *p)
1070 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1071 FIXME("(%p)->(%p)\n", This, p);
1072 return E_NOTIMPL;
1075 static HRESULT WINAPI HTMLCurrentStyle2_get_isBlock(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
1077 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1078 FIXME("(%p)->(%p)\n", This, p);
1079 return E_NOTIMPL;
1082 static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl = {
1083 HTMLCurrentStyle2_QueryInterface,
1084 HTMLCurrentStyle2_AddRef,
1085 HTMLCurrentStyle2_Release,
1086 HTMLCurrentStyle2_GetTypeInfoCount,
1087 HTMLCurrentStyle2_GetTypeInfo,
1088 HTMLCurrentStyle2_GetIDsOfNames,
1089 HTMLCurrentStyle2_Invoke,
1090 HTMLCurrentStyle2_get_layoutFlow,
1091 HTMLCurrentStyle2_get_wordWrap,
1092 HTMLCurrentStyle2_get_textUnderlinePosition,
1093 HTMLCurrentStyle2_get_hasLayout,
1094 HTMLCurrentStyle2_get_scrollbarBaseColor,
1095 HTMLCurrentStyle2_get_scrollbarFaceColor,
1096 HTMLCurrentStyle2_get_scrollbar3dLightColor,
1097 HTMLCurrentStyle2_get_scrollbarShadowColor,
1098 HTMLCurrentStyle2_get_scrollbarHighlightColor,
1099 HTMLCurrentStyle2_get_scrollbarDarkShadowColor,
1100 HTMLCurrentStyle2_get_scrollbarArrowColor,
1101 HTMLCurrentStyle2_get_scrollbarTrackColor,
1102 HTMLCurrentStyle2_get_writingMode,
1103 HTMLCurrentStyle2_get_zoom,
1104 HTMLCurrentStyle2_get_filter,
1105 HTMLCurrentStyle2_get_textAlignLast,
1106 HTMLCurrentStyle2_get_textKashidaSpace,
1107 HTMLCurrentStyle2_get_isBlock
1110 /* IHTMLCurrentStyle3 */
1111 static HRESULT WINAPI HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3 *iface, REFIID riid, void **ppv)
1113 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1115 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1118 static ULONG WINAPI HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3 *iface)
1120 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1122 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1125 static ULONG WINAPI HTMLCurrentStyle3_Release(IHTMLCurrentStyle3 *iface)
1127 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1128 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1131 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3 *iface, UINT *pctinfo)
1133 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1134 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
1137 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3 *iface, UINT iTInfo,
1138 LCID lcid, ITypeInfo **ppTInfo)
1140 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1141 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1144 static HRESULT WINAPI HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3 *iface, REFIID riid,
1145 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1147 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1148 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1149 lcid, rgDispId);
1152 static HRESULT WINAPI HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3 *iface, DISPID dispIdMember,
1153 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1154 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1156 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1157 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1158 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1161 static HRESULT WINAPI HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3 *iface, BSTR *p)
1163 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1164 FIXME("(%p)->(%p)\n", This, p);
1165 return E_NOTIMPL;
1168 static HRESULT WINAPI HTMLCurrentStyle3_get_minHeight(IHTMLCurrentStyle3 *iface, VARIANT *p)
1170 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1171 FIXME("(%p)->(%p)\n", This, p);
1172 return E_NOTIMPL;
1175 static HRESULT WINAPI HTMLCurrentStyle3_get_wordSpacing(IHTMLCurrentStyle3 *iface, VARIANT *p)
1177 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1178 FIXME("(%p)->(%p)\n", This, p);
1179 return E_NOTIMPL;
1182 static HRESULT WINAPI HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3 *iface, BSTR *p)
1184 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1185 FIXME("(%p)->(%p)\n", This, p);
1186 return E_NOTIMPL;
1189 static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl = {
1190 HTMLCurrentStyle3_QueryInterface,
1191 HTMLCurrentStyle3_AddRef,
1192 HTMLCurrentStyle3_Release,
1193 HTMLCurrentStyle3_GetTypeInfoCount,
1194 HTMLCurrentStyle3_GetTypeInfo,
1195 HTMLCurrentStyle3_GetIDsOfNames,
1196 HTMLCurrentStyle3_Invoke,
1197 HTMLCurrentStyle3_get_textOverflow,
1198 HTMLCurrentStyle3_get_minHeight,
1199 HTMLCurrentStyle3_get_wordSpacing,
1200 HTMLCurrentStyle3_get_whiteSpace
1203 /* IHTMLCurrentStyle4 */
1204 static HRESULT WINAPI HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4 *iface, REFIID riid, void **ppv)
1206 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1208 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1211 static ULONG WINAPI HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4 *iface)
1213 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1215 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1218 static ULONG WINAPI HTMLCurrentStyle4_Release(IHTMLCurrentStyle4 *iface)
1220 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1221 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1224 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4 *iface, UINT *pctinfo)
1226 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1227 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
1230 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4 *iface, UINT iTInfo,
1231 LCID lcid, ITypeInfo **ppTInfo)
1233 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1234 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1237 static HRESULT WINAPI HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4 *iface, REFIID riid,
1238 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1240 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1241 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1242 lcid, rgDispId);
1245 static HRESULT WINAPI HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4 *iface, DISPID dispIdMember,
1246 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1247 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1249 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1250 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1251 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1254 static HRESULT WINAPI HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4 *iface, BSTR *p)
1256 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1257 FIXME("(%p)->(%p)\n", This, p);
1258 return E_NOTIMPL;
1261 static HRESULT WINAPI HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4 *iface, VARIANT *p)
1263 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1264 FIXME("(%p)->(%p)\n", This, p);
1265 return E_NOTIMPL;
1268 static HRESULT WINAPI HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1270 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1271 FIXME("(%p)->(%p)\n", This, p);
1272 return E_NOTIMPL;
1275 static HRESULT WINAPI HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1277 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1278 FIXME("(%p)->(%p)\n", This, p);
1279 return E_NOTIMPL;
1282 static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl = {
1283 HTMLCurrentStyle4_QueryInterface,
1284 HTMLCurrentStyle4_AddRef,
1285 HTMLCurrentStyle4_Release,
1286 HTMLCurrentStyle4_GetTypeInfoCount,
1287 HTMLCurrentStyle4_GetTypeInfo,
1288 HTMLCurrentStyle4_GetIDsOfNames,
1289 HTMLCurrentStyle4_Invoke,
1290 HTMLCurrentStyle4_msInterpolationMode,
1291 HTMLCurrentStyle4_get_maxHeight,
1292 HTMLCurrentStyle4_get_minWidth,
1293 HTMLCurrentStyle4_get_maxWidth
1296 static const tid_t HTMLCurrentStyle_iface_tids[] = {
1297 IHTMLCurrentStyle_tid,
1298 IHTMLCurrentStyle2_tid,
1299 IHTMLCurrentStyle3_tid,
1300 IHTMLCurrentStyle4_tid,
1303 static dispex_static_data_t HTMLCurrentStyle_dispex = {
1304 NULL,
1305 DispHTMLCurrentStyle_tid,
1306 NULL,
1307 HTMLCurrentStyle_iface_tids
1310 HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
1312 nsIDOMCSSStyleDeclaration *nsstyle;
1313 nsIDOMWindow *nsview;
1314 nsAString nsempty_str;
1315 HTMLCurrentStyle *ret;
1316 nsresult nsres;
1318 if(!elem->node.doc->nsdoc) {
1319 WARN("NULL nsdoc\n");
1320 return E_UNEXPECTED;
1323 nsres = nsIDOMHTMLDocument_GetDefaultView(elem->node.doc->nsdoc, &nsview);
1324 if(NS_FAILED(nsres)) {
1325 ERR("GetDefaultView failed: %08x\n", nsres);
1326 return E_FAIL;
1329 nsAString_Init(&nsempty_str, NULL);
1330 nsres = nsIDOMWindow_GetComputedStyle(nsview, (nsIDOMElement*)elem->nselem, &nsempty_str, &nsstyle);
1331 nsAString_Finish(&nsempty_str);
1332 if(NS_FAILED(nsres)) {
1333 ERR("GetComputedStyle failed: %08x\n", nsres);
1334 return E_FAIL;
1337 ret = heap_alloc_zero(sizeof(HTMLCurrentStyle));
1338 if(!ret) {
1339 nsIDOMCSSStyleDeclaration_Release(nsstyle);
1340 return E_OUTOFMEMORY;
1343 ret->IHTMLCurrentStyle_iface.lpVtbl = &HTMLCurrentStyleVtbl;
1344 ret->IHTMLCurrentStyle2_iface.lpVtbl = &HTMLCurrentStyle2Vtbl;
1345 ret->IHTMLCurrentStyle3_iface.lpVtbl = &HTMLCurrentStyle3Vtbl;
1346 ret->IHTMLCurrentStyle4_iface.lpVtbl = &HTMLCurrentStyle4Vtbl;
1347 ret->ref = 1;
1348 ret->nsstyle = nsstyle;
1350 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLCurrentStyle_iface, &HTMLCurrentStyle_dispex);
1352 *p = &ret->IHTMLCurrentStyle_iface;
1353 return S_OK;