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 FIXME("(%p)\n", This);
106 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle *iface, UINT iTInfo,
107 LCID lcid, ITypeInfo **ppTInfo)
109 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
110 FIXME("(%p)\n", This);
114 static HRESULT WINAPI HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle *iface, REFIID riid,
115 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
117 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
118 FIXME("(%p)\n", This);
122 static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID dispIdMember,
123 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
124 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
126 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
127 FIXME("(%p)\n", This);
131 static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p)
133 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
134 FIXME("(%p)->(%p)\n", This, p);
138 static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
140 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
141 FIXME("(%p)->(%p)\n", This, p);
145 static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
147 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
148 FIXME("(%p)->(%p)\n", This, p);
152 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
154 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
155 FIXME("(%p)->(%p)\n", This, p);
159 static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
161 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
162 FIXME("(%p)->(%p)\n", This, p);
166 static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
168 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
169 FIXME("(%p)->(%p)\n", This, p);
173 static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
175 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
176 FIXME("(%p)->(%p)\n", This, p);
180 static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
182 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
183 FIXME("(%p)->(%p)\n", This, p);
187 static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
189 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
190 FIXME("(%p)->(%p)\n", This, p);
194 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
196 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
197 FIXME("(%p)->(%p)\n", This, p);
201 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
203 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
204 FIXME("(%p)->(%p)\n", This, p);
208 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle *iface, VARIANT *p)
210 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
211 FIXME("(%p)->(%p)\n", This, p);
215 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *iface, BSTR *p)
217 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
218 FIXME("(%p)->(%p)\n", This, p);
222 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
224 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
225 FIXME("(%p)->(%p)\n", This, p);
229 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
231 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
232 FIXME("(%p)->(%p)\n", This, p);
236 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
238 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
239 FIXME("(%p)->(%p)\n", This, p);
243 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
245 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
246 FIXME("(%p)->(%p)\n", This, p);
250 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
252 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
253 FIXME("(%p)->(%p)\n", This, p);
257 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
259 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
260 FIXME("(%p)->(%p)\n", This, p);
264 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
266 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
267 FIXME("(%p)->(%p)\n", This, p);
271 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
273 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
274 FIXME("(%p)->(%p)\n", This, p);
278 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
280 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
281 FIXME("(%p)->(%p)\n", This, p);
285 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
287 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
288 FIXME("(%p)->(%p)\n", This, p);
292 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
294 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
295 FIXME("(%p)->(%p)\n", This, p);
299 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
301 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
302 FIXME("(%p)->(%p)\n", This, p);
306 static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
308 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
309 FIXME("(%p)->(%p)\n", This, p);
313 static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
315 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
316 FIXME("(%p)->(%p)\n", This, p);
320 static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
322 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
323 FIXME("(%p)->(%p)\n", This, p);
327 static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
329 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
330 FIXME("(%p)->(%p)\n", This, p);
334 static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
336 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
337 FIXME("(%p)->(%p)\n", This, p);
341 static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
343 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
344 FIXME("(%p)->(%p)\n", This, p);
348 static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
350 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
351 FIXME("(%p)->(%p)\n", This, p);
355 static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
357 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
358 FIXME("(%p)->(%p)\n", This, p);
362 static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
364 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
365 FIXME("(%p)->(%p)\n", This, p);
369 static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
371 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
372 FIXME("(%p)->(%p)\n", This, p);
376 static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
378 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
380 TRACE("(%p)->(%p)\n", This, p);
382 return get_nsstyle_attr(This->nsstyle, STYLEID_DISPLAY, p);
385 static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p)
387 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
388 FIXME("(%p)->(%p)\n", This, p);
392 static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
394 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
395 FIXME("(%p)->(%p)\n", This, p);
399 static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
401 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
402 FIXME("(%p)->(%p)\n", This, p);
406 static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
408 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
409 FIXME("(%p)->(%p)\n", This, p);
413 static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
415 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
416 FIXME("(%p)->(%p)\n", This, p);
420 static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
422 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
423 FIXME("(%p)->(%p)\n", This, p);
427 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
429 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
430 FIXME("(%p)->(%p)\n", This, p);
434 static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, VARIANT *p)
436 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
437 FIXME("(%p)->(%p)\n", This, p);
441 static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
443 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
444 FIXME("(%p)->(%p)\n", This, p);
448 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
450 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
451 FIXME("(%p)->(%p)\n", This, p);
455 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
457 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
458 FIXME("(%p)->(%p)\n", This, p);
462 static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
464 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
465 FIXME("(%p)->(%p)\n", This, p);
469 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle *iface, BSTR *p)
471 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
472 FIXME("(%p)->(%p)\n", This, p);
476 static HRESULT WINAPI HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle *iface, BSTR *p)
478 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
479 FIXME("(%p)->(%p)\n", This, p);
483 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle *iface, BSTR *p)
485 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
486 FIXME("(%p)->(%p)\n", This, p);
490 static HRESULT WINAPI HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle *iface, VARIANT *p)
492 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
493 FIXME("(%p)->(%p)\n", This, p);
497 static HRESULT WINAPI HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle *iface, VARIANT *p)
499 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
500 FIXME("(%p)->(%p)\n", This, p);
504 static HRESULT WINAPI HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle *iface, VARIANT *p)
506 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
507 FIXME("(%p)->(%p)\n", This, p);
511 static HRESULT WINAPI HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle *iface, VARIANT *p)
513 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
514 FIXME("(%p)->(%p)\n", This, p);
518 static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BSTR *p)
520 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
521 FIXME("(%p)->(%p)\n", This, p);
525 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
527 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
528 FIXME("(%p)->(%p)\n", This, p);
532 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *iface, BSTR *p)
534 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
535 FIXME("(%p)->(%p)\n", This, p);
539 static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
541 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
542 FIXME("(%p)->(%p)\n", This, p);
546 static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
548 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
549 FIXME("(%p)->(%p)\n", This, p);
553 static HRESULT WINAPI HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle *iface, BSTR *p)
555 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
556 FIXME("(%p)->(%p)\n", This, p);
560 static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, BSTR *p)
562 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
563 FIXME("(%p)->(%p)\n", This, p);
567 static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
569 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
570 FIXME("(%p)->(%p)\n", This, p);
574 static HRESULT WINAPI HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle *iface, BSTR strAttributeName,
575 LONG lFlags, VARIANT *AttributeValue)
577 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
578 FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(strAttributeName), lFlags, AttributeValue);
582 static HRESULT WINAPI HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle *iface, BSTR *p)
584 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
585 FIXME("(%p)->(%p)\n", This, p);
589 static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIANT *p)
591 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
592 FIXME("(%p)->(%p)\n", This, p);
596 static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
598 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
599 FIXME("(%p)->(%p)\n", This, p);
603 static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
605 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
606 FIXME("(%p)->(%p)\n", This, p);
610 static HRESULT WINAPI HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle *iface, BSTR *p)
612 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
613 FIXME("(%p)->(%p)\n", This, p);
617 static HRESULT WINAPI HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle *iface, BSTR *p)
619 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
620 FIXME("(%p)->(%p)\n", This, p);
624 static HRESULT WINAPI HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle *iface, BSTR *p)
626 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
627 FIXME("(%p)->(%p)\n", This, p);
631 static HRESULT WINAPI HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle *iface, BSTR *p)
633 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
634 FIXME("(%p)->(%p)\n", This, p);
638 static HRESULT WINAPI HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle *iface, BSTR *p)
640 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
641 FIXME("(%p)->(%p)\n", This, p);
645 static HRESULT WINAPI HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle *iface, BSTR *p)
647 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
648 FIXME("(%p)->(%p)\n", This, p);
652 static HRESULT WINAPI HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle *iface, BSTR *p)
654 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
655 FIXME("(%p)->(%p)\n", This, p);
659 static HRESULT WINAPI HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle *iface, BSTR *p)
661 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
662 FIXME("(%p)->(%p)\n", This, p);
666 static HRESULT WINAPI HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle *iface, VARIANT *p)
668 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
669 FIXME("(%p)->(%p)\n", This, p);
673 static HRESULT WINAPI HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle *iface, BSTR *p)
675 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
676 FIXME("(%p)->(%p)\n", This, p);
680 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle *iface, VARIANT *p)
682 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
683 FIXME("(%p)->(%p)\n", This, p);
687 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle *iface, VARIANT *p)
689 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
690 FIXME("(%p)->(%p)\n", This, p);
694 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle *iface, BSTR *p)
696 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
697 FIXME("(%p)->(%p)\n", This, p);
701 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle *iface, BSTR *p)
703 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
704 FIXME("(%p)->(%p)\n", This, p);
708 static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, BSTR *p)
710 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
711 FIXME("(%p)->(%p)\n", This, p);
715 static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
717 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
718 FIXME("(%p)->(%p)\n", This, p);
722 static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
724 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
725 FIXME("(%p)->(%p)\n", This, p);
729 static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
731 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
732 FIXME("(%p)->(%p)\n", This, p);
736 static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
738 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
739 FIXME("(%p)->(%p)\n", This, p);
743 static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
745 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
746 FIXME("(%p)->(%p)\n", This, p);
750 static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, BSTR *p)
752 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
753 FIXME("(%p)->(%p)\n", This, p);
757 static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
759 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
760 FIXME("(%p)->(%p)\n", This, p);
764 static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
766 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
767 FIXME("(%p)->(%p)\n", This, p);
771 #undef HTMLCURSTYLE_THIS
773 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
774 HTMLCurrentStyle_QueryInterface,
775 HTMLCurrentStyle_AddRef,
776 HTMLCurrentStyle_Release,
777 HTMLCurrentStyle_GetTypeInfoCount,
778 HTMLCurrentStyle_GetTypeInfo,
779 HTMLCurrentStyle_GetIDsOfNames,
780 HTMLCurrentStyle_Invoke,
781 HTMLCurrentStyle_get_position,
782 HTMLCurrentStyle_get_styleFloat,
783 HTMLCurrentStyle_get_color,
784 HTMLCurrentStyle_get_backgroundColor,
785 HTMLCurrentStyle_get_fontFamily,
786 HTMLCurrentStyle_get_fontStyle,
787 HTMLCurrentStyle_get_fontVariant,
788 HTMLCurrentStyle_get_fontWeight,
789 HTMLCurrentStyle_get_fontSize,
790 HTMLCurrentStyle_get_backgroundImage,
791 HTMLCurrentStyle_get_backgroundPositionX,
792 HTMLCurrentStyle_get_backgroundPositionY,
793 HTMLCurrentStyle_get_backgroundRepeat,
794 HTMLCurrentStyle_get_borderLeftColor,
795 HTMLCurrentStyle_get_borderTopColor,
796 HTMLCurrentStyle_get_borderRightColor,
797 HTMLCurrentStyle_get_borderBottomColor,
798 HTMLCurrentStyle_get_borderTopStyle,
799 HTMLCurrentStyle_get_borderRightStyle,
800 HTMLCurrentStyle_get_borderBottomStyle,
801 HTMLCurrentStyle_get_borderLeftStyle,
802 HTMLCurrentStyle_get_borderTopWidth,
803 HTMLCurrentStyle_get_borderRightWidth,
804 HTMLCurrentStyle_get_borderBottomWidth,
805 HTMLCurrentStyle_get_borderLeftWidth,
806 HTMLCurrentStyle_get_left,
807 HTMLCurrentStyle_get_top,
808 HTMLCurrentStyle_get_width,
809 HTMLCurrentStyle_get_height,
810 HTMLCurrentStyle_get_paddingLeft,
811 HTMLCurrentStyle_get_paddingTop,
812 HTMLCurrentStyle_get_paddingRight,
813 HTMLCurrentStyle_get_paddingBottom,
814 HTMLCurrentStyle_get_textAlign,
815 HTMLCurrentStyle_get_textDecoration,
816 HTMLCurrentStyle_get_display,
817 HTMLCurrentStyle_get_visibility,
818 HTMLCurrentStyle_get_zIndex,
819 HTMLCurrentStyle_get_letterSpacing,
820 HTMLCurrentStyle_get_lineHeight,
821 HTMLCurrentStyle_get_textIndent,
822 HTMLCurrentStyle_get_verticalAlign,
823 HTMLCurrentStyle_get_backgroundAttachment,
824 HTMLCurrentStyle_get_marginTop,
825 HTMLCurrentStyle_get_marginRight,
826 HTMLCurrentStyle_get_marginBottom,
827 HTMLCurrentStyle_get_marginLeft,
828 HTMLCurrentStyle_get_clear,
829 HTMLCurrentStyle_get_listStyleType,
830 HTMLCurrentStyle_get_listStylePosition,
831 HTMLCurrentStyle_get_listStyleImage,
832 HTMLCurrentStyle_get_clipTop,
833 HTMLCurrentStyle_get_clipRight,
834 HTMLCurrentStyle_get_clipBottom,
835 HTMLCurrentStyle_get_clipLeft,
836 HTMLCurrentStyle_get_overflow,
837 HTMLCurrentStyle_get_pageBreakBefore,
838 HTMLCurrentStyle_get_pageBreakAfter,
839 HTMLCurrentStyle_get_cursor,
840 HTMLCurrentStyle_get_tableLayout,
841 HTMLCurrentStyle_get_borderCollapse,
842 HTMLCurrentStyle_get_direction,
843 HTMLCurrentStyle_get_behavior,
844 HTMLCurrentStyle_getAttribute,
845 HTMLCurrentStyle_get_unicodeBidi,
846 HTMLCurrentStyle_get_right,
847 HTMLCurrentStyle_get_bottom,
848 HTMLCurrentStyle_get_imeMode,
849 HTMLCurrentStyle_get_rubyAlign,
850 HTMLCurrentStyle_get_rubyPosition,
851 HTMLCurrentStyle_get_rubyOverhang,
852 HTMLCurrentStyle_get_textAutospace,
853 HTMLCurrentStyle_get_lineBreak,
854 HTMLCurrentStyle_get_wordBreak,
855 HTMLCurrentStyle_get_textJustify,
856 HTMLCurrentStyle_get_textJustifyTrim,
857 HTMLCurrentStyle_get_textKashida,
858 HTMLCurrentStyle_get_blockDirection,
859 HTMLCurrentStyle_get_layoutGridChar,
860 HTMLCurrentStyle_get_layoutGridLine,
861 HTMLCurrentStyle_get_layoutGridMode,
862 HTMLCurrentStyle_get_layoutGridType,
863 HTMLCurrentStyle_get_borderStyle,
864 HTMLCurrentStyle_get_borderColor,
865 HTMLCurrentStyle_get_borderWidth,
866 HTMLCurrentStyle_get_padding,
867 HTMLCurrentStyle_get_margin,
868 HTMLCurrentStyle_get_accelerator,
869 HTMLCurrentStyle_get_overflowX,
870 HTMLCurrentStyle_get_overflowY,
871 HTMLCurrentStyle_get_textTransform
874 static const tid_t HTMLCurrentStyle_iface_tids[] = {
875 IHTMLCurrentStyle_tid,
878 static dispex_static_data_t HTMLCurrentStyle_dispex = {
880 DispHTMLCurrentStyle_tid,
882 HTMLCurrentStyle_iface_tids
885 HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
887 nsIDOMCSSStyleDeclaration *nsstyle;
888 nsIDOMDocumentView *nsdocview;
889 nsIDOMAbstractView *nsview;
890 nsIDOMViewCSS *nsviewcss;
891 nsAString nsempty_str;
892 HTMLCurrentStyle *ret;
895 if(!elem->node.doc->nsdoc) {
896 WARN("NULL nsdoc\n");
900 nsres = nsIDOMHTMLDocument_QueryInterface(elem->node.doc->nsdoc, &IID_nsIDOMDocumentView, (void**)&nsdocview);
901 if(NS_FAILED(nsres)) {
902 ERR("Could not get nsIDOMDocumentView: %08x\n", nsres);
906 nsres = nsIDOMDocumentView_GetDefaultView(nsdocview, &nsview);
907 nsIDOMDocumentView_Release(nsdocview);
908 if(NS_FAILED(nsres)) {
909 ERR("GetDefaultView failed: %08x\n", nsres);
913 nsres = nsIDOMAbstractView_QueryInterface(nsview, &IID_nsIDOMViewCSS, (void**)&nsviewcss);
914 nsIDOMAbstractView_Release(nsview);
915 if(NS_FAILED(nsres)) {
916 ERR("Could not get nsIDOMViewCSS: %08x\n", nsres);
920 nsAString_Init(&nsempty_str, NULL);
921 nsres = nsIDOMViewCSS_GetComputedStyle(nsviewcss, (nsIDOMElement*)elem->nselem, &nsempty_str, &nsstyle);
922 nsIDOMViewCSS_Release(nsviewcss);
923 nsAString_Finish(&nsempty_str);
924 if(NS_FAILED(nsres)) {
925 ERR("GetComputedStyle failed: %08x\n", nsres);
929 ret = heap_alloc_zero(sizeof(HTMLCurrentStyle));
931 nsIDOMCSSStyleDeclaration_Release(nsstyle);
932 return E_OUTOFMEMORY;
935 ret->lpIHTMLCurrentStyleVtbl = &HTMLCurrentStyleVtbl;
937 ret->nsstyle = nsstyle;
939 init_dispex(&ret->dispex, (IUnknown*)HTMLCURSTYLE(ret), &HTMLCurrentStyle_dispex);
941 *p = HTMLCURSTYLE(ret);