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
28 #include "mshtml_private.h"
29 #include "htmlstyle.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 const IHTMLCurrentStyleVtbl *lpIHTMLCurrentStyleVtbl;
41 nsIDOMCSSStyleDeclaration *nsstyle;
44 #define HTMLCURSTYLE(x) ((IHTMLCurrentStyle*) &(x)->lpIHTMLCurrentStyleVtbl)
46 #define HTMLCURSTYLE_THIS(iface) DEFINE_THIS(HTMLCurrentStyle, IHTMLCurrentStyle, iface)
48 static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface, REFIID riid, void **ppv)
50 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
54 if(IsEqualGUID(&IID_IUnknown, riid)) {
55 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
56 *ppv = HTMLCURSTYLE(This);
57 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle, riid)) {
58 TRACE("(%p)->(IID_IHTMLCurrentStyle %p)\n", This, ppv);
59 *ppv = HTMLCURSTYLE(This);
60 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
61 return *ppv ? S_OK : E_NOINTERFACE;
65 IUnknown_AddRef((IUnknown*)*ppv);
69 WARN("unsupported %s\n", debugstr_guid(riid));
73 static ULONG WINAPI HTMLCurrentStyle_AddRef(IHTMLCurrentStyle *iface)
75 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
76 LONG ref = InterlockedIncrement(&This->ref);
78 TRACE("(%p) ref=%d\n", This, ref);
83 static ULONG WINAPI HTMLCurrentStyle_Release(IHTMLCurrentStyle *iface)
85 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
86 LONG ref = InterlockedDecrement(&This->ref);
88 TRACE("(%p) ref=%d\n", This, ref);
92 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
99 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle *iface, UINT *pctinfo)
101 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
102 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
105 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle *iface, UINT iTInfo,
106 LCID lcid, ITypeInfo **ppTInfo)
108 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
109 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
112 static HRESULT WINAPI HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle *iface, REFIID riid,
113 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
115 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
116 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
119 static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID dispIdMember,
120 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
121 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
123 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
124 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
125 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
128 static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p)
130 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
131 FIXME("(%p)->(%p)\n", This, p);
135 static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
137 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
138 FIXME("(%p)->(%p)\n", This, p);
142 static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
144 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
145 FIXME("(%p)->(%p)\n", This, p);
149 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
151 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
152 FIXME("(%p)->(%p)\n", This, p);
156 static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
158 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
159 FIXME("(%p)->(%p)\n", This, p);
163 static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
165 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
166 FIXME("(%p)->(%p)\n", This, p);
170 static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
172 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
173 FIXME("(%p)->(%p)\n", This, p);
177 static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
179 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
180 FIXME("(%p)->(%p)\n", This, p);
184 static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
186 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
187 FIXME("(%p)->(%p)\n", This, p);
191 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
193 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
194 FIXME("(%p)->(%p)\n", This, p);
198 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
200 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
201 FIXME("(%p)->(%p)\n", This, p);
205 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle *iface, VARIANT *p)
207 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
208 FIXME("(%p)->(%p)\n", This, p);
212 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *iface, BSTR *p)
214 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
215 FIXME("(%p)->(%p)\n", This, p);
219 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
221 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
222 FIXME("(%p)->(%p)\n", This, p);
226 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
228 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
229 FIXME("(%p)->(%p)\n", This, p);
233 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
235 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
236 FIXME("(%p)->(%p)\n", This, p);
240 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
242 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
243 FIXME("(%p)->(%p)\n", This, p);
247 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
249 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
250 FIXME("(%p)->(%p)\n", This, p);
254 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
256 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
257 FIXME("(%p)->(%p)\n", This, p);
261 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
263 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
264 FIXME("(%p)->(%p)\n", This, p);
268 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
270 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
271 FIXME("(%p)->(%p)\n", This, p);
275 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
277 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
278 FIXME("(%p)->(%p)\n", This, p);
282 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
284 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
285 FIXME("(%p)->(%p)\n", This, p);
289 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
291 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
292 FIXME("(%p)->(%p)\n", This, p);
296 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
298 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
299 FIXME("(%p)->(%p)\n", This, p);
303 static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
305 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
306 FIXME("(%p)->(%p)\n", This, p);
310 static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
312 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
313 FIXME("(%p)->(%p)\n", This, p);
317 static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
319 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
320 FIXME("(%p)->(%p)\n", This, p);
324 static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
326 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
327 FIXME("(%p)->(%p)\n", This, p);
331 static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
333 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
334 FIXME("(%p)->(%p)\n", This, p);
338 static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
340 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
341 FIXME("(%p)->(%p)\n", This, p);
345 static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
347 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
348 FIXME("(%p)->(%p)\n", This, p);
352 static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
354 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
355 FIXME("(%p)->(%p)\n", This, p);
359 static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
361 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
362 FIXME("(%p)->(%p)\n", This, p);
366 static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
368 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
369 FIXME("(%p)->(%p)\n", This, p);
373 static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
375 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
377 TRACE("(%p)->(%p)\n", This, p);
379 return get_nsstyle_attr(This->nsstyle, STYLEID_DISPLAY, p);
382 static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p)
384 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
385 FIXME("(%p)->(%p)\n", This, p);
389 static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
391 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
392 FIXME("(%p)->(%p)\n", This, p);
396 static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
398 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
399 FIXME("(%p)->(%p)\n", This, p);
403 static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
405 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
406 FIXME("(%p)->(%p)\n", This, p);
410 static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
412 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
413 FIXME("(%p)->(%p)\n", This, p);
417 static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
419 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
420 FIXME("(%p)->(%p)\n", This, p);
424 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
426 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
427 FIXME("(%p)->(%p)\n", This, p);
431 static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, VARIANT *p)
433 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
434 FIXME("(%p)->(%p)\n", This, p);
438 static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
440 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
441 FIXME("(%p)->(%p)\n", This, p);
445 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
447 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
448 FIXME("(%p)->(%p)\n", This, p);
452 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
454 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
455 FIXME("(%p)->(%p)\n", This, p);
459 static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
461 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
462 FIXME("(%p)->(%p)\n", This, p);
466 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle *iface, BSTR *p)
468 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
469 FIXME("(%p)->(%p)\n", This, p);
473 static HRESULT WINAPI HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle *iface, BSTR *p)
475 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
476 FIXME("(%p)->(%p)\n", This, p);
480 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle *iface, BSTR *p)
482 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
483 FIXME("(%p)->(%p)\n", This, p);
487 static HRESULT WINAPI HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle *iface, VARIANT *p)
489 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
490 FIXME("(%p)->(%p)\n", This, p);
494 static HRESULT WINAPI HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle *iface, VARIANT *p)
496 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
497 FIXME("(%p)->(%p)\n", This, p);
501 static HRESULT WINAPI HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle *iface, VARIANT *p)
503 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
504 FIXME("(%p)->(%p)\n", This, p);
508 static HRESULT WINAPI HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle *iface, VARIANT *p)
510 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
511 FIXME("(%p)->(%p)\n", This, p);
515 static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BSTR *p)
517 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
518 FIXME("(%p)->(%p)\n", This, p);
522 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
524 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
525 FIXME("(%p)->(%p)\n", This, p);
529 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *iface, BSTR *p)
531 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
532 FIXME("(%p)->(%p)\n", This, p);
536 static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
538 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
539 FIXME("(%p)->(%p)\n", This, p);
543 static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
545 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
546 FIXME("(%p)->(%p)\n", This, p);
550 static HRESULT WINAPI HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle *iface, BSTR *p)
552 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
553 FIXME("(%p)->(%p)\n", This, p);
557 static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, BSTR *p)
559 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
560 FIXME("(%p)->(%p)\n", This, p);
564 static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
566 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
567 FIXME("(%p)->(%p)\n", This, p);
571 static HRESULT WINAPI HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle *iface, BSTR strAttributeName,
572 LONG lFlags, VARIANT *AttributeValue)
574 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
575 FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(strAttributeName), lFlags, AttributeValue);
579 static HRESULT WINAPI HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle *iface, BSTR *p)
581 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
582 FIXME("(%p)->(%p)\n", This, p);
586 static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIANT *p)
588 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
589 FIXME("(%p)->(%p)\n", This, p);
593 static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
595 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
596 FIXME("(%p)->(%p)\n", This, p);
600 static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
602 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
603 FIXME("(%p)->(%p)\n", This, p);
607 static HRESULT WINAPI HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle *iface, BSTR *p)
609 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
610 FIXME("(%p)->(%p)\n", This, p);
614 static HRESULT WINAPI HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle *iface, BSTR *p)
616 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
617 FIXME("(%p)->(%p)\n", This, p);
621 static HRESULT WINAPI HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle *iface, BSTR *p)
623 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
624 FIXME("(%p)->(%p)\n", This, p);
628 static HRESULT WINAPI HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle *iface, BSTR *p)
630 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
631 FIXME("(%p)->(%p)\n", This, p);
635 static HRESULT WINAPI HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle *iface, BSTR *p)
637 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
638 FIXME("(%p)->(%p)\n", This, p);
642 static HRESULT WINAPI HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle *iface, BSTR *p)
644 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
645 FIXME("(%p)->(%p)\n", This, p);
649 static HRESULT WINAPI HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle *iface, BSTR *p)
651 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
652 FIXME("(%p)->(%p)\n", This, p);
656 static HRESULT WINAPI HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle *iface, BSTR *p)
658 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
659 FIXME("(%p)->(%p)\n", This, p);
663 static HRESULT WINAPI HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle *iface, VARIANT *p)
665 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
666 FIXME("(%p)->(%p)\n", This, p);
670 static HRESULT WINAPI HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle *iface, BSTR *p)
672 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
673 FIXME("(%p)->(%p)\n", This, p);
677 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle *iface, VARIANT *p)
679 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
680 FIXME("(%p)->(%p)\n", This, p);
684 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle *iface, VARIANT *p)
686 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
687 FIXME("(%p)->(%p)\n", This, p);
691 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle *iface, BSTR *p)
693 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
694 FIXME("(%p)->(%p)\n", This, p);
698 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle *iface, BSTR *p)
700 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
701 FIXME("(%p)->(%p)\n", This, p);
705 static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, BSTR *p)
707 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
708 FIXME("(%p)->(%p)\n", This, p);
712 static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
714 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
715 FIXME("(%p)->(%p)\n", This, p);
719 static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
721 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
722 FIXME("(%p)->(%p)\n", This, p);
726 static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
728 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
729 FIXME("(%p)->(%p)\n", This, p);
733 static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
735 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
736 FIXME("(%p)->(%p)\n", This, p);
740 static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
742 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
743 FIXME("(%p)->(%p)\n", This, p);
747 static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, BSTR *p)
749 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
750 FIXME("(%p)->(%p)\n", This, p);
754 static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
756 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
757 FIXME("(%p)->(%p)\n", This, p);
761 static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
763 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
764 FIXME("(%p)->(%p)\n", This, p);
768 #undef HTMLCURSTYLE_THIS
770 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
771 HTMLCurrentStyle_QueryInterface,
772 HTMLCurrentStyle_AddRef,
773 HTMLCurrentStyle_Release,
774 HTMLCurrentStyle_GetTypeInfoCount,
775 HTMLCurrentStyle_GetTypeInfo,
776 HTMLCurrentStyle_GetIDsOfNames,
777 HTMLCurrentStyle_Invoke,
778 HTMLCurrentStyle_get_position,
779 HTMLCurrentStyle_get_styleFloat,
780 HTMLCurrentStyle_get_color,
781 HTMLCurrentStyle_get_backgroundColor,
782 HTMLCurrentStyle_get_fontFamily,
783 HTMLCurrentStyle_get_fontStyle,
784 HTMLCurrentStyle_get_fontVariant,
785 HTMLCurrentStyle_get_fontWeight,
786 HTMLCurrentStyle_get_fontSize,
787 HTMLCurrentStyle_get_backgroundImage,
788 HTMLCurrentStyle_get_backgroundPositionX,
789 HTMLCurrentStyle_get_backgroundPositionY,
790 HTMLCurrentStyle_get_backgroundRepeat,
791 HTMLCurrentStyle_get_borderLeftColor,
792 HTMLCurrentStyle_get_borderTopColor,
793 HTMLCurrentStyle_get_borderRightColor,
794 HTMLCurrentStyle_get_borderBottomColor,
795 HTMLCurrentStyle_get_borderTopStyle,
796 HTMLCurrentStyle_get_borderRightStyle,
797 HTMLCurrentStyle_get_borderBottomStyle,
798 HTMLCurrentStyle_get_borderLeftStyle,
799 HTMLCurrentStyle_get_borderTopWidth,
800 HTMLCurrentStyle_get_borderRightWidth,
801 HTMLCurrentStyle_get_borderBottomWidth,
802 HTMLCurrentStyle_get_borderLeftWidth,
803 HTMLCurrentStyle_get_left,
804 HTMLCurrentStyle_get_top,
805 HTMLCurrentStyle_get_width,
806 HTMLCurrentStyle_get_height,
807 HTMLCurrentStyle_get_paddingLeft,
808 HTMLCurrentStyle_get_paddingTop,
809 HTMLCurrentStyle_get_paddingRight,
810 HTMLCurrentStyle_get_paddingBottom,
811 HTMLCurrentStyle_get_textAlign,
812 HTMLCurrentStyle_get_textDecoration,
813 HTMLCurrentStyle_get_display,
814 HTMLCurrentStyle_get_visibility,
815 HTMLCurrentStyle_get_zIndex,
816 HTMLCurrentStyle_get_letterSpacing,
817 HTMLCurrentStyle_get_lineHeight,
818 HTMLCurrentStyle_get_textIndent,
819 HTMLCurrentStyle_get_verticalAlign,
820 HTMLCurrentStyle_get_backgroundAttachment,
821 HTMLCurrentStyle_get_marginTop,
822 HTMLCurrentStyle_get_marginRight,
823 HTMLCurrentStyle_get_marginBottom,
824 HTMLCurrentStyle_get_marginLeft,
825 HTMLCurrentStyle_get_clear,
826 HTMLCurrentStyle_get_listStyleType,
827 HTMLCurrentStyle_get_listStylePosition,
828 HTMLCurrentStyle_get_listStyleImage,
829 HTMLCurrentStyle_get_clipTop,
830 HTMLCurrentStyle_get_clipRight,
831 HTMLCurrentStyle_get_clipBottom,
832 HTMLCurrentStyle_get_clipLeft,
833 HTMLCurrentStyle_get_overflow,
834 HTMLCurrentStyle_get_pageBreakBefore,
835 HTMLCurrentStyle_get_pageBreakAfter,
836 HTMLCurrentStyle_get_cursor,
837 HTMLCurrentStyle_get_tableLayout,
838 HTMLCurrentStyle_get_borderCollapse,
839 HTMLCurrentStyle_get_direction,
840 HTMLCurrentStyle_get_behavior,
841 HTMLCurrentStyle_getAttribute,
842 HTMLCurrentStyle_get_unicodeBidi,
843 HTMLCurrentStyle_get_right,
844 HTMLCurrentStyle_get_bottom,
845 HTMLCurrentStyle_get_imeMode,
846 HTMLCurrentStyle_get_rubyAlign,
847 HTMLCurrentStyle_get_rubyPosition,
848 HTMLCurrentStyle_get_rubyOverhang,
849 HTMLCurrentStyle_get_textAutospace,
850 HTMLCurrentStyle_get_lineBreak,
851 HTMLCurrentStyle_get_wordBreak,
852 HTMLCurrentStyle_get_textJustify,
853 HTMLCurrentStyle_get_textJustifyTrim,
854 HTMLCurrentStyle_get_textKashida,
855 HTMLCurrentStyle_get_blockDirection,
856 HTMLCurrentStyle_get_layoutGridChar,
857 HTMLCurrentStyle_get_layoutGridLine,
858 HTMLCurrentStyle_get_layoutGridMode,
859 HTMLCurrentStyle_get_layoutGridType,
860 HTMLCurrentStyle_get_borderStyle,
861 HTMLCurrentStyle_get_borderColor,
862 HTMLCurrentStyle_get_borderWidth,
863 HTMLCurrentStyle_get_padding,
864 HTMLCurrentStyle_get_margin,
865 HTMLCurrentStyle_get_accelerator,
866 HTMLCurrentStyle_get_overflowX,
867 HTMLCurrentStyle_get_overflowY,
868 HTMLCurrentStyle_get_textTransform
871 static const tid_t HTMLCurrentStyle_iface_tids[] = {
872 IHTMLCurrentStyle_tid,
875 static dispex_static_data_t HTMLCurrentStyle_dispex = {
877 DispHTMLCurrentStyle_tid,
879 HTMLCurrentStyle_iface_tids
882 HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
884 nsIDOMCSSStyleDeclaration *nsstyle;
885 nsIDOMDocumentView *nsdocview;
886 nsIDOMAbstractView *nsview;
887 nsIDOMViewCSS *nsviewcss;
888 nsAString nsempty_str;
889 HTMLCurrentStyle *ret;
892 if(!elem->node.doc->nsdoc) {
893 WARN("NULL nsdoc\n");
897 nsres = nsIDOMHTMLDocument_QueryInterface(elem->node.doc->nsdoc, &IID_nsIDOMDocumentView, (void**)&nsdocview);
898 if(NS_FAILED(nsres)) {
899 ERR("Could not get nsIDOMDocumentView: %08x\n", nsres);
903 nsres = nsIDOMDocumentView_GetDefaultView(nsdocview, &nsview);
904 nsIDOMDocumentView_Release(nsdocview);
905 if(NS_FAILED(nsres)) {
906 ERR("GetDefaultView failed: %08x\n", nsres);
910 nsres = nsIDOMAbstractView_QueryInterface(nsview, &IID_nsIDOMViewCSS, (void**)&nsviewcss);
911 nsIDOMAbstractView_Release(nsview);
912 if(NS_FAILED(nsres)) {
913 ERR("Could not get nsIDOMViewCSS: %08x\n", nsres);
917 nsAString_Init(&nsempty_str, NULL);
918 nsres = nsIDOMViewCSS_GetComputedStyle(nsviewcss, (nsIDOMElement*)elem->nselem, &nsempty_str, &nsstyle);
919 nsIDOMViewCSS_Release(nsviewcss);
920 nsAString_Finish(&nsempty_str);
921 if(NS_FAILED(nsres)) {
922 ERR("GetComputedStyle failed: %08x\n", nsres);
926 ret = heap_alloc_zero(sizeof(HTMLCurrentStyle));
928 nsIDOMCSSStyleDeclaration_Release(nsstyle);
929 return E_OUTOFMEMORY;
932 ret->lpIHTMLCurrentStyleVtbl = &HTMLCurrentStyleVtbl;
934 ret->nsstyle = nsstyle;
936 init_dispex(&ret->dispex, (IUnknown*)HTMLCURSTYLE(ret), &HTMLCurrentStyle_dispex);
938 *p = HTMLCURSTYLE(ret);