wined3d: Use wined3d_texture_prepare_location() in wined3d_texture_update_desc().
[wine.git] / dlls / mshtml / htmlcurstyle.c
blobdf3281d5ec57825a09e0f9a5a8d4dcd8e285fbf7
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;
45 HTMLElement *elem;
48 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle *iface)
50 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle_iface);
53 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle2(IHTMLCurrentStyle2 *iface)
55 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle2_iface);
58 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle3(IHTMLCurrentStyle3 *iface)
60 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle3_iface);
63 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle4(IHTMLCurrentStyle4 *iface)
65 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle4_iface);
68 static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface, REFIID riid, void **ppv)
70 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
72 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
74 if(IsEqualGUID(&IID_IUnknown, riid)) {
75 *ppv = &This->IHTMLCurrentStyle_iface;
76 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle, riid)) {
77 *ppv = &This->IHTMLCurrentStyle_iface;
78 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle2, riid)) {
79 *ppv = &This->IHTMLCurrentStyle2_iface;
80 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle3, riid)) {
81 *ppv = &This->IHTMLCurrentStyle3_iface;
82 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle4, riid)) {
83 *ppv = &This->IHTMLCurrentStyle4_iface;
84 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
85 return *ppv ? S_OK : E_NOINTERFACE;
86 }else {
87 *ppv = NULL;
88 WARN("unsupported %s\n", debugstr_mshtml_guid(riid));
89 return E_NOINTERFACE;
92 IUnknown_AddRef((IUnknown*)*ppv);
93 return S_OK;
96 static ULONG WINAPI HTMLCurrentStyle_AddRef(IHTMLCurrentStyle *iface)
98 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
99 LONG ref = InterlockedIncrement(&This->ref);
101 TRACE("(%p) ref=%d\n", This, ref);
103 return ref;
106 static ULONG WINAPI HTMLCurrentStyle_Release(IHTMLCurrentStyle *iface)
108 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
109 LONG ref = InterlockedDecrement(&This->ref);
111 TRACE("(%p) ref=%d\n", This, ref);
113 if(!ref) {
114 if(This->nsstyle)
115 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
116 IHTMLElement_Release(&This->elem->IHTMLElement_iface);
117 release_dispex(&This->dispex);
118 heap_free(This);
121 return ref;
124 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle *iface, UINT *pctinfo)
126 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
127 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
130 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle *iface, UINT iTInfo,
131 LCID lcid, ITypeInfo **ppTInfo)
133 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
134 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
137 static HRESULT WINAPI HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle *iface, REFIID riid,
138 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
140 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
141 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
142 lcid, rgDispId);
145 static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID dispIdMember,
146 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
147 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
149 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
150 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
151 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
154 static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p)
156 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
158 TRACE("(%p)->(%p)\n", This, p);
160 return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p, 0);
163 static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
165 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
167 TRACE("(%p)->(%p)\n", This, p);
169 return get_nsstyle_attr(This->nsstyle, STYLEID_FLOAT, p, 0);
172 static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
174 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
175 TRACE("(%p)->(%p)\n", This, p);
176 return get_nsstyle_attr_var(This->nsstyle, STYLEID_COLOR, p, 0);
179 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
181 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
182 TRACE("(%p)->(%p)\n", This, p);
183 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_COLOR, p, 0);
186 static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
188 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
190 TRACE("(%p)->(%p)\n", This, p);
192 return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_FAMILY, p, 0);
195 static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
197 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
198 TRACE("(%p)->(%p)\n", This, p);
199 return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, p, 0);
202 static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
204 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
205 TRACE("(%p)->(%p)\n", This, p);
206 return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, p, 0);
209 static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
211 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
212 TRACE("(%p)->(%p)\n", This, p);
213 return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_WEIGHT, p, ATTR_STR_TO_INT);
216 static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
218 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
219 TRACE("(%p)->(%p)\n", This, p);
220 return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_SIZE, p, 0);
223 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
225 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
226 TRACE("(%p)->(%p)\n", This, p);
227 return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_IMAGE, p, 0);
230 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
232 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
233 FIXME("(%p)->(%p)\n", This, p);
234 return E_NOTIMPL;
237 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle *iface, VARIANT *p)
239 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
240 FIXME("(%p)->(%p)\n", This, p);
241 return E_NOTIMPL;
244 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *iface, BSTR *p)
246 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
247 TRACE("(%p)->(%p)\n", This, p);
248 return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_REPEAT, p, 0);
251 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
253 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
254 TRACE("(%p)->(%p)\n", This, p);
255 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_COLOR, p, 0);
258 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
260 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
261 TRACE("(%p)->(%p)\n", This, p);
262 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_COLOR, p, 0);
265 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
267 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
268 TRACE("(%p)->(%p)\n", This, p);
269 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_COLOR, p, 0);
272 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
274 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
275 TRACE("(%p)->(%p)\n", This, p);
276 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_COLOR, p, 0);
279 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
281 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
282 TRACE("(%p)->(%p)\n", This, p);
283 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_TOP_STYLE, p, 0);
286 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
288 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
289 TRACE("(%p)->(%p)\n", This, p);
290 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_RIGHT_STYLE, p, 0);
293 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
295 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
296 TRACE("(%p)->(%p)\n", This, p);
297 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_BOTTOM_STYLE, p, 0);
300 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
302 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
303 TRACE("(%p)->(%p)\n", This, p);
304 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_LEFT_STYLE, p, 0);
307 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
309 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
310 TRACE("(%p)->(%p)\n", This, p);
311 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
314 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
316 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
317 TRACE("(%p)->(%p)\n", This, p);
318 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
321 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
323 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
324 TRACE("(%p)->(%p)\n", This, p);
325 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
328 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
330 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
331 TRACE("(%p)->(%p)\n", This, p);
332 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
335 static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
337 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
338 TRACE("(%p)->(%p)\n", This, p);
339 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, p, 0);
342 static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
344 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
345 TRACE("(%p)->(%p)\n", This, p);
346 return get_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, p, 0);
349 static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
351 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
352 TRACE("(%p)->(%p)\n", This, p);
353 return get_nsstyle_attr_var(This->nsstyle, STYLEID_WIDTH, p, 0);
356 static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
358 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
359 TRACE("(%p)->(%p)\n", This, p);
360 return get_nsstyle_attr_var(This->nsstyle, STYLEID_HEIGHT, p, 0);
363 static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
365 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
366 TRACE("(%p)->(%p)\n", This, p);
367 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_LEFT, p, 0);
370 static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
372 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
373 TRACE("(%p)->(%p)\n", This, p);
374 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_TOP, p, 0);
377 static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
379 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
380 TRACE("(%p)->(%p)\n", This, p);
381 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_RIGHT, p, 0);
384 static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
386 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
387 TRACE("(%p)->(%p)\n", This, p);
388 return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_BOTTOM, p, 0);
391 static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
393 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
394 TRACE("(%p)->(%p)\n", This, p);
395 return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_ALIGN, p, 0);
398 static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
400 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
401 TRACE("(%p)->(%p)\n", This, p);
402 return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_DECORATION, p, 0);
405 static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
407 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
409 TRACE("(%p)->(%p)\n", This, p);
411 return get_nsstyle_attr(This->nsstyle, STYLEID_DISPLAY, p, 0);
414 static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p)
416 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
418 TRACE("(%p)->(%p)\n", This, p);
420 return get_nsstyle_attr(This->nsstyle, STYLEID_VISIBILITY, p, 0);
423 static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
425 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
426 TRACE("(%p)->(%p)\n", This, p);
427 return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
430 static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
432 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
433 TRACE("(%p)->(%p)\n", This, p);
434 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
437 static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
439 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
440 TRACE("(%p)->(%p)\n", This, p);
441 return get_nsstyle_attr_var(This->nsstyle, STYLEID_LINE_HEIGHT, p, 0);
444 static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
446 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
447 TRACE("(%p)->(%p)\n", This, p);
448 return get_nsstyle_attr_var(This->nsstyle, STYLEID_TEXT_INDENT, p, 0);
451 static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
453 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
454 TRACE("(%p)->(%p)\n", This, p);
455 return get_nsstyle_attr_var(This->nsstyle, STYLEID_VERTICAL_ALIGN, p, 0);
458 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
460 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
461 FIXME("(%p)->(%p)\n", This, p);
462 return E_NOTIMPL;
465 static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, VARIANT *p)
467 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
468 TRACE("(%p)->(%p)\n", This, p);
469 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_TOP, p, 0);
472 static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
474 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
475 TRACE("(%p)->(%p)\n", This, p);
476 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
479 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
481 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
482 TRACE("(%p)->(%p)\n", This, p);
483 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_BOTTOM, p, 0);
486 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
488 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
489 TRACE("(%p)->(%p)\n", This, p);
490 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
493 static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
495 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
496 FIXME("(%p)->(%p)\n", This, p);
497 return E_NOTIMPL;
500 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle *iface, BSTR *p)
502 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
503 FIXME("(%p)->(%p)\n", This, p);
504 return E_NOTIMPL;
507 static HRESULT WINAPI HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle *iface, BSTR *p)
509 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
510 FIXME("(%p)->(%p)\n", This, p);
511 return E_NOTIMPL;
514 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle *iface, BSTR *p)
516 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
517 FIXME("(%p)->(%p)\n", This, p);
518 return E_NOTIMPL;
521 static HRESULT WINAPI HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle *iface, VARIANT *p)
523 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
524 FIXME("(%p)->(%p)\n", This, p);
525 return E_NOTIMPL;
528 static HRESULT WINAPI HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle *iface, VARIANT *p)
530 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
531 FIXME("(%p)->(%p)\n", This, p);
532 return E_NOTIMPL;
535 static HRESULT WINAPI HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle *iface, VARIANT *p)
537 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
538 FIXME("(%p)->(%p)\n", This, p);
539 return E_NOTIMPL;
542 static HRESULT WINAPI HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle *iface, VARIANT *p)
544 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
545 FIXME("(%p)->(%p)\n", This, p);
546 return E_NOTIMPL;
549 static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BSTR *p)
551 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
552 TRACE("(%p)->(%p)\n", This, p);
553 return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, p, 0);
556 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
558 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
559 FIXME("(%p)->(%p)\n", This, p);
560 return E_NOTIMPL;
563 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *iface, BSTR *p)
565 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
566 FIXME("(%p)->(%p)\n", This, p);
567 return E_NOTIMPL;
570 static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
572 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
573 TRACE("(%p)->(%p)\n", This, p);
574 return get_nsstyle_attr(This->nsstyle, STYLEID_CURSOR, p, 0);
577 static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
579 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
580 FIXME("(%p)->(%p)\n", This, p);
581 return E_NOTIMPL;
584 static HRESULT WINAPI HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle *iface, BSTR *p)
586 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
587 FIXME("(%p)->(%p)\n", This, p);
588 return E_NOTIMPL;
591 static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, BSTR *p)
593 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
594 FIXME("(%p)->(%p)\n", This, p);
595 return E_NOTIMPL;
598 static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
600 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
601 FIXME("(%p)->(%p)\n", This, p);
602 return E_NOTIMPL;
605 static HRESULT WINAPI HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle *iface, BSTR strAttributeName,
606 LONG lFlags, VARIANT *AttributeValue)
608 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
609 FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(strAttributeName), lFlags, AttributeValue);
610 return E_NOTIMPL;
613 static HRESULT WINAPI HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle *iface, BSTR *p)
615 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
616 FIXME("(%p)->(%p)\n", This, p);
617 return E_NOTIMPL;
620 static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIANT *p)
622 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
623 TRACE("(%p)->(%p)\n", This, p);
624 return get_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, p, 0);
627 static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
629 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
630 TRACE("(%p)->(%p)\n", This, p);
631 return get_nsstyle_attr_var(This->nsstyle, STYLEID_BOTTOM, p, 0);
634 static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
636 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
637 FIXME("(%p)->(%p)\n", This, p);
638 return E_NOTIMPL;
641 static HRESULT WINAPI HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle *iface, BSTR *p)
643 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
644 FIXME("(%p)->(%p)\n", This, p);
645 return E_NOTIMPL;
648 static HRESULT WINAPI HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle *iface, BSTR *p)
650 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
651 FIXME("(%p)->(%p)\n", This, p);
652 return E_NOTIMPL;
655 static HRESULT WINAPI HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle *iface, BSTR *p)
657 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
658 FIXME("(%p)->(%p)\n", This, p);
659 return E_NOTIMPL;
662 static HRESULT WINAPI HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle *iface, BSTR *p)
664 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
665 FIXME("(%p)->(%p)\n", This, p);
666 return E_NOTIMPL;
669 static HRESULT WINAPI HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle *iface, BSTR *p)
671 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
672 FIXME("(%p)->(%p)\n", This, p);
673 return E_NOTIMPL;
676 static HRESULT WINAPI HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle *iface, BSTR *p)
678 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
679 FIXME("(%p)->(%p)\n", This, p);
680 return E_NOTIMPL;
683 static HRESULT WINAPI HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle *iface, BSTR *p)
685 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
686 FIXME("(%p)->(%p)\n", This, p);
687 return E_NOTIMPL;
690 static HRESULT WINAPI HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle *iface, BSTR *p)
692 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
693 FIXME("(%p)->(%p)\n", This, p);
694 return E_NOTIMPL;
697 static HRESULT WINAPI HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle *iface, VARIANT *p)
699 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
700 FIXME("(%p)->(%p)\n", This, p);
701 return E_NOTIMPL;
704 static HRESULT WINAPI HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle *iface, BSTR *p)
706 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
707 FIXME("(%p)->(%p)\n", This, p);
708 return E_NOTIMPL;
711 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle *iface, VARIANT *p)
713 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
714 FIXME("(%p)->(%p)\n", This, p);
715 return E_NOTIMPL;
718 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle *iface, VARIANT *p)
720 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
721 FIXME("(%p)->(%p)\n", This, p);
722 return E_NOTIMPL;
725 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle *iface, BSTR *p)
727 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
728 FIXME("(%p)->(%p)\n", This, p);
729 return E_NOTIMPL;
732 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle *iface, BSTR *p)
734 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
735 FIXME("(%p)->(%p)\n", This, p);
736 return E_NOTIMPL;
739 static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, BSTR *p)
741 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
742 TRACE("(%p)->(%p)\n", This, p);
743 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, p, 0);
746 static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
748 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
749 TRACE("(%p)->(%p)\n", This, p);
750 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_COLOR, p, 0);
753 static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
755 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
756 TRACE("(%p)->(%p)\n", This, p);
757 return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_WIDTH, p, 0);
760 static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
762 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
763 TRACE("(%p)->(%p)\n", This, p);
764 return get_nsstyle_attr(This->nsstyle, STYLEID_PADDING, p, 0);
767 static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
769 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
770 TRACE("(%p)->(%p)\n", This, p);
771 return get_nsstyle_attr(This->nsstyle, STYLEID_MARGIN, p, 0);
774 static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
776 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
777 FIXME("(%p)->(%p)\n", This, p);
778 return E_NOTIMPL;
781 static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, BSTR *p)
783 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
784 TRACE("(%p)->(%p)\n", This, p);
785 return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW_X, p, 0);
788 static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
790 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
791 TRACE("(%p)->(%p)\n", This, p);
792 return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW_Y, p, 0);
795 static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
797 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
798 TRACE("(%p)->(%p)\n", This, p);
799 return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_TRANSFORM, p, 0);
802 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
803 HTMLCurrentStyle_QueryInterface,
804 HTMLCurrentStyle_AddRef,
805 HTMLCurrentStyle_Release,
806 HTMLCurrentStyle_GetTypeInfoCount,
807 HTMLCurrentStyle_GetTypeInfo,
808 HTMLCurrentStyle_GetIDsOfNames,
809 HTMLCurrentStyle_Invoke,
810 HTMLCurrentStyle_get_position,
811 HTMLCurrentStyle_get_styleFloat,
812 HTMLCurrentStyle_get_color,
813 HTMLCurrentStyle_get_backgroundColor,
814 HTMLCurrentStyle_get_fontFamily,
815 HTMLCurrentStyle_get_fontStyle,
816 HTMLCurrentStyle_get_fontVariant,
817 HTMLCurrentStyle_get_fontWeight,
818 HTMLCurrentStyle_get_fontSize,
819 HTMLCurrentStyle_get_backgroundImage,
820 HTMLCurrentStyle_get_backgroundPositionX,
821 HTMLCurrentStyle_get_backgroundPositionY,
822 HTMLCurrentStyle_get_backgroundRepeat,
823 HTMLCurrentStyle_get_borderLeftColor,
824 HTMLCurrentStyle_get_borderTopColor,
825 HTMLCurrentStyle_get_borderRightColor,
826 HTMLCurrentStyle_get_borderBottomColor,
827 HTMLCurrentStyle_get_borderTopStyle,
828 HTMLCurrentStyle_get_borderRightStyle,
829 HTMLCurrentStyle_get_borderBottomStyle,
830 HTMLCurrentStyle_get_borderLeftStyle,
831 HTMLCurrentStyle_get_borderTopWidth,
832 HTMLCurrentStyle_get_borderRightWidth,
833 HTMLCurrentStyle_get_borderBottomWidth,
834 HTMLCurrentStyle_get_borderLeftWidth,
835 HTMLCurrentStyle_get_left,
836 HTMLCurrentStyle_get_top,
837 HTMLCurrentStyle_get_width,
838 HTMLCurrentStyle_get_height,
839 HTMLCurrentStyle_get_paddingLeft,
840 HTMLCurrentStyle_get_paddingTop,
841 HTMLCurrentStyle_get_paddingRight,
842 HTMLCurrentStyle_get_paddingBottom,
843 HTMLCurrentStyle_get_textAlign,
844 HTMLCurrentStyle_get_textDecoration,
845 HTMLCurrentStyle_get_display,
846 HTMLCurrentStyle_get_visibility,
847 HTMLCurrentStyle_get_zIndex,
848 HTMLCurrentStyle_get_letterSpacing,
849 HTMLCurrentStyle_get_lineHeight,
850 HTMLCurrentStyle_get_textIndent,
851 HTMLCurrentStyle_get_verticalAlign,
852 HTMLCurrentStyle_get_backgroundAttachment,
853 HTMLCurrentStyle_get_marginTop,
854 HTMLCurrentStyle_get_marginRight,
855 HTMLCurrentStyle_get_marginBottom,
856 HTMLCurrentStyle_get_marginLeft,
857 HTMLCurrentStyle_get_clear,
858 HTMLCurrentStyle_get_listStyleType,
859 HTMLCurrentStyle_get_listStylePosition,
860 HTMLCurrentStyle_get_listStyleImage,
861 HTMLCurrentStyle_get_clipTop,
862 HTMLCurrentStyle_get_clipRight,
863 HTMLCurrentStyle_get_clipBottom,
864 HTMLCurrentStyle_get_clipLeft,
865 HTMLCurrentStyle_get_overflow,
866 HTMLCurrentStyle_get_pageBreakBefore,
867 HTMLCurrentStyle_get_pageBreakAfter,
868 HTMLCurrentStyle_get_cursor,
869 HTMLCurrentStyle_get_tableLayout,
870 HTMLCurrentStyle_get_borderCollapse,
871 HTMLCurrentStyle_get_direction,
872 HTMLCurrentStyle_get_behavior,
873 HTMLCurrentStyle_getAttribute,
874 HTMLCurrentStyle_get_unicodeBidi,
875 HTMLCurrentStyle_get_right,
876 HTMLCurrentStyle_get_bottom,
877 HTMLCurrentStyle_get_imeMode,
878 HTMLCurrentStyle_get_rubyAlign,
879 HTMLCurrentStyle_get_rubyPosition,
880 HTMLCurrentStyle_get_rubyOverhang,
881 HTMLCurrentStyle_get_textAutospace,
882 HTMLCurrentStyle_get_lineBreak,
883 HTMLCurrentStyle_get_wordBreak,
884 HTMLCurrentStyle_get_textJustify,
885 HTMLCurrentStyle_get_textJustifyTrim,
886 HTMLCurrentStyle_get_textKashida,
887 HTMLCurrentStyle_get_blockDirection,
888 HTMLCurrentStyle_get_layoutGridChar,
889 HTMLCurrentStyle_get_layoutGridLine,
890 HTMLCurrentStyle_get_layoutGridMode,
891 HTMLCurrentStyle_get_layoutGridType,
892 HTMLCurrentStyle_get_borderStyle,
893 HTMLCurrentStyle_get_borderColor,
894 HTMLCurrentStyle_get_borderWidth,
895 HTMLCurrentStyle_get_padding,
896 HTMLCurrentStyle_get_margin,
897 HTMLCurrentStyle_get_accelerator,
898 HTMLCurrentStyle_get_overflowX,
899 HTMLCurrentStyle_get_overflowY,
900 HTMLCurrentStyle_get_textTransform
903 /* IHTMLCurrentStyle2 */
904 static HRESULT WINAPI HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2 *iface, REFIID riid, void **ppv)
906 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
908 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
911 static ULONG WINAPI HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2 *iface)
913 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
915 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
918 static ULONG WINAPI HTMLCurrentStyle2_Release(IHTMLCurrentStyle2 *iface)
920 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
921 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
924 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2 *iface, UINT *pctinfo)
926 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
927 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
930 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2 *iface, UINT iTInfo,
931 LCID lcid, ITypeInfo **ppTInfo)
933 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
934 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
937 static HRESULT WINAPI HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2 *iface, REFIID riid,
938 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
940 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
941 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
942 lcid, rgDispId);
945 static HRESULT WINAPI HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2 *iface, DISPID dispIdMember,
946 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
947 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
949 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
950 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
951 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
954 static HRESULT WINAPI HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2 *iface, BSTR *p)
956 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
957 FIXME("(%p)->(%p)\n", This, p);
958 return E_NOTIMPL;
961 static HRESULT WINAPI HTMLCurrentStyle2_get_wordWrap(IHTMLCurrentStyle2 *iface, BSTR *p)
963 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
964 FIXME("(%p)->(%p)\n", This, p);
965 return E_NOTIMPL;
968 static HRESULT WINAPI HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentStyle2 *iface, BSTR *p)
970 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
971 FIXME("(%p)->(%p)\n", This, p);
972 return E_NOTIMPL;
975 static HRESULT WINAPI HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
977 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
979 FIXME("(%p)->(%p) returning true\n", This, p);
981 *p = VARIANT_TRUE;
982 return S_OK;
985 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
987 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
988 FIXME("(%p)->(%p)\n", This, p);
989 return E_NOTIMPL;
992 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarFaceColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
994 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
995 FIXME("(%p)->(%p)\n", This, p);
996 return E_NOTIMPL;
999 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbar3dLightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1001 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1002 FIXME("(%p)->(%p)\n", This, p);
1003 return E_NOTIMPL;
1006 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1008 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1009 FIXME("(%p)->(%p)\n", This, p);
1010 return E_NOTIMPL;
1013 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarHighlightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1015 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1016 FIXME("(%p)->(%p)\n", This, p);
1017 return E_NOTIMPL;
1020 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarDarkShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1022 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1023 FIXME("(%p)->(%p)\n", This, p);
1024 return E_NOTIMPL;
1027 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarArrowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1029 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1030 FIXME("(%p)->(%p)\n", This, p);
1031 return E_NOTIMPL;
1034 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarTrackColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1036 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1037 FIXME("(%p)->(%p)\n", This, p);
1038 return E_NOTIMPL;
1041 static HRESULT WINAPI HTMLCurrentStyle2_get_writingMode(IHTMLCurrentStyle2 *iface, BSTR *p)
1043 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1044 FIXME("(%p)->(%p)\n", This, p);
1045 return E_NOTIMPL;
1048 static HRESULT WINAPI HTMLCurrentStyle2_get_zoom(IHTMLCurrentStyle2 *iface, VARIANT *p)
1050 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1051 FIXME("(%p)->(%p)\n", This, p);
1052 return E_NOTIMPL;
1055 static HRESULT WINAPI HTMLCurrentStyle2_get_filter(IHTMLCurrentStyle2 *iface, BSTR *p)
1057 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1059 TRACE("(%p)->(%p)\n", This, p);
1061 if(This->elem->filter) {
1062 *p = SysAllocString(This->elem->filter);
1063 if(!*p)
1064 return E_OUTOFMEMORY;
1065 }else {
1066 *p = NULL;
1069 return S_OK;
1072 static HRESULT WINAPI HTMLCurrentStyle2_get_textAlignLast(IHTMLCurrentStyle2 *iface, BSTR *p)
1074 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1075 FIXME("(%p)->(%p)\n", This, p);
1076 return E_NOTIMPL;
1079 static HRESULT WINAPI HTMLCurrentStyle2_get_textKashidaSpace(IHTMLCurrentStyle2 *iface, VARIANT *p)
1081 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1082 FIXME("(%p)->(%p)\n", This, p);
1083 return E_NOTIMPL;
1086 static HRESULT WINAPI HTMLCurrentStyle2_get_isBlock(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
1088 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1089 FIXME("(%p)->(%p)\n", This, p);
1090 return E_NOTIMPL;
1093 static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl = {
1094 HTMLCurrentStyle2_QueryInterface,
1095 HTMLCurrentStyle2_AddRef,
1096 HTMLCurrentStyle2_Release,
1097 HTMLCurrentStyle2_GetTypeInfoCount,
1098 HTMLCurrentStyle2_GetTypeInfo,
1099 HTMLCurrentStyle2_GetIDsOfNames,
1100 HTMLCurrentStyle2_Invoke,
1101 HTMLCurrentStyle2_get_layoutFlow,
1102 HTMLCurrentStyle2_get_wordWrap,
1103 HTMLCurrentStyle2_get_textUnderlinePosition,
1104 HTMLCurrentStyle2_get_hasLayout,
1105 HTMLCurrentStyle2_get_scrollbarBaseColor,
1106 HTMLCurrentStyle2_get_scrollbarFaceColor,
1107 HTMLCurrentStyle2_get_scrollbar3dLightColor,
1108 HTMLCurrentStyle2_get_scrollbarShadowColor,
1109 HTMLCurrentStyle2_get_scrollbarHighlightColor,
1110 HTMLCurrentStyle2_get_scrollbarDarkShadowColor,
1111 HTMLCurrentStyle2_get_scrollbarArrowColor,
1112 HTMLCurrentStyle2_get_scrollbarTrackColor,
1113 HTMLCurrentStyle2_get_writingMode,
1114 HTMLCurrentStyle2_get_zoom,
1115 HTMLCurrentStyle2_get_filter,
1116 HTMLCurrentStyle2_get_textAlignLast,
1117 HTMLCurrentStyle2_get_textKashidaSpace,
1118 HTMLCurrentStyle2_get_isBlock
1121 /* IHTMLCurrentStyle3 */
1122 static HRESULT WINAPI HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3 *iface, REFIID riid, void **ppv)
1124 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1126 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1129 static ULONG WINAPI HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3 *iface)
1131 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1133 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1136 static ULONG WINAPI HTMLCurrentStyle3_Release(IHTMLCurrentStyle3 *iface)
1138 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1139 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1142 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3 *iface, UINT *pctinfo)
1144 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1145 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
1148 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3 *iface, UINT iTInfo,
1149 LCID lcid, ITypeInfo **ppTInfo)
1151 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1152 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1155 static HRESULT WINAPI HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3 *iface, REFIID riid,
1156 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1158 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1159 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1160 lcid, rgDispId);
1163 static HRESULT WINAPI HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3 *iface, DISPID dispIdMember,
1164 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1165 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1167 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1168 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1169 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1172 static HRESULT WINAPI HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3 *iface, BSTR *p)
1174 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1175 FIXME("(%p)->(%p)\n", This, p);
1176 return E_NOTIMPL;
1179 static HRESULT WINAPI HTMLCurrentStyle3_get_minHeight(IHTMLCurrentStyle3 *iface, VARIANT *p)
1181 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1182 FIXME("(%p)->(%p)\n", This, p);
1183 return E_NOTIMPL;
1186 static HRESULT WINAPI HTMLCurrentStyle3_get_wordSpacing(IHTMLCurrentStyle3 *iface, VARIANT *p)
1188 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1189 FIXME("(%p)->(%p)\n", This, p);
1190 return E_NOTIMPL;
1193 static HRESULT WINAPI HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3 *iface, BSTR *p)
1195 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1197 TRACE("(%p)->(%p)\n", This, p);
1199 return get_nsstyle_attr(This->nsstyle, STYLEID_WHITE_SPACE, p, 0);
1202 static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl = {
1203 HTMLCurrentStyle3_QueryInterface,
1204 HTMLCurrentStyle3_AddRef,
1205 HTMLCurrentStyle3_Release,
1206 HTMLCurrentStyle3_GetTypeInfoCount,
1207 HTMLCurrentStyle3_GetTypeInfo,
1208 HTMLCurrentStyle3_GetIDsOfNames,
1209 HTMLCurrentStyle3_Invoke,
1210 HTMLCurrentStyle3_get_textOverflow,
1211 HTMLCurrentStyle3_get_minHeight,
1212 HTMLCurrentStyle3_get_wordSpacing,
1213 HTMLCurrentStyle3_get_whiteSpace
1216 /* IHTMLCurrentStyle4 */
1217 static HRESULT WINAPI HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4 *iface, REFIID riid, void **ppv)
1219 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1221 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1224 static ULONG WINAPI HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4 *iface)
1226 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1228 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1231 static ULONG WINAPI HTMLCurrentStyle4_Release(IHTMLCurrentStyle4 *iface)
1233 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1234 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1237 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4 *iface, UINT *pctinfo)
1239 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1240 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
1243 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4 *iface, UINT iTInfo,
1244 LCID lcid, ITypeInfo **ppTInfo)
1246 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1247 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1250 static HRESULT WINAPI HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4 *iface, REFIID riid,
1251 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1253 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1254 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1255 lcid, rgDispId);
1258 static HRESULT WINAPI HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4 *iface, DISPID dispIdMember,
1259 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1260 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1262 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1263 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1264 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1267 static HRESULT WINAPI HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4 *iface, BSTR *p)
1269 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1270 FIXME("(%p)->(%p)\n", This, p);
1271 return E_NOTIMPL;
1274 static HRESULT WINAPI HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4 *iface, VARIANT *p)
1276 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1277 FIXME("(%p)->(%p)\n", This, p);
1278 return E_NOTIMPL;
1281 static HRESULT WINAPI HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1283 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1284 TRACE("(%p)->(%p)\n", This, p);
1285 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_WIDTH, p, 0);
1288 static HRESULT WINAPI HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1290 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1291 FIXME("(%p)->(%p)\n", This, p);
1292 return E_NOTIMPL;
1295 static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl = {
1296 HTMLCurrentStyle4_QueryInterface,
1297 HTMLCurrentStyle4_AddRef,
1298 HTMLCurrentStyle4_Release,
1299 HTMLCurrentStyle4_GetTypeInfoCount,
1300 HTMLCurrentStyle4_GetTypeInfo,
1301 HTMLCurrentStyle4_GetIDsOfNames,
1302 HTMLCurrentStyle4_Invoke,
1303 HTMLCurrentStyle4_msInterpolationMode,
1304 HTMLCurrentStyle4_get_maxHeight,
1305 HTMLCurrentStyle4_get_minWidth,
1306 HTMLCurrentStyle4_get_maxWidth
1309 static const tid_t HTMLCurrentStyle_iface_tids[] = {
1310 IHTMLCurrentStyle_tid,
1311 IHTMLCurrentStyle2_tid,
1312 IHTMLCurrentStyle3_tid,
1313 IHTMLCurrentStyle4_tid,
1316 static dispex_static_data_t HTMLCurrentStyle_dispex = {
1317 NULL,
1318 DispHTMLCurrentStyle_tid,
1319 NULL,
1320 HTMLCurrentStyle_iface_tids
1323 HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
1325 nsIDOMCSSStyleDeclaration *nsstyle;
1326 nsIDOMWindow *nsview;
1327 nsAString nsempty_str;
1328 HTMLCurrentStyle *ret;
1329 nsresult nsres;
1331 if(!elem->node.doc->nsdoc) {
1332 WARN("NULL nsdoc\n");
1333 return E_UNEXPECTED;
1336 nsres = nsIDOMHTMLDocument_GetDefaultView(elem->node.doc->nsdoc, &nsview);
1337 if(NS_FAILED(nsres)) {
1338 ERR("GetDefaultView failed: %08x\n", nsres);
1339 return E_FAIL;
1342 nsAString_Init(&nsempty_str, NULL);
1343 nsres = nsIDOMWindow_GetComputedStyle(nsview, (nsIDOMElement*)elem->nselem, &nsempty_str, &nsstyle);
1344 nsAString_Finish(&nsempty_str);
1345 nsIDOMWindow_Release(nsview);
1346 if(NS_FAILED(nsres)) {
1347 ERR("GetComputedStyle failed: %08x\n", nsres);
1348 return E_FAIL;
1351 if(!nsstyle) {
1352 ERR("GetComputedStyle returned NULL nsstyle\n");
1353 return E_FAIL;
1356 ret = heap_alloc_zero(sizeof(HTMLCurrentStyle));
1357 if(!ret) {
1358 nsIDOMCSSStyleDeclaration_Release(nsstyle);
1359 return E_OUTOFMEMORY;
1362 ret->IHTMLCurrentStyle_iface.lpVtbl = &HTMLCurrentStyleVtbl;
1363 ret->IHTMLCurrentStyle2_iface.lpVtbl = &HTMLCurrentStyle2Vtbl;
1364 ret->IHTMLCurrentStyle3_iface.lpVtbl = &HTMLCurrentStyle3Vtbl;
1365 ret->IHTMLCurrentStyle4_iface.lpVtbl = &HTMLCurrentStyle4Vtbl;
1366 ret->ref = 1;
1367 ret->nsstyle = nsstyle;
1369 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLCurrentStyle_iface, &HTMLCurrentStyle_dispex);
1371 IHTMLElement_AddRef(&elem->IHTMLElement_iface);
1372 ret->elem = elem;
1374 *p = &ret->IHTMLCurrentStyle_iface;
1375 return S_OK;