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
);
35 struct HTMLCurrentStyle
{
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
);
132 TRACE("(%p)->(%p)\n", This
, p
);
134 return get_nsstyle_attr(This
->nsstyle
, STYLEID_POSITION
, p
);
137 static HRESULT WINAPI
HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle
*iface
, BSTR
*p
)
139 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
140 FIXME("(%p)->(%p)\n", This
, p
);
144 static HRESULT WINAPI
HTMLCurrentStyle_get_color(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
146 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
147 FIXME("(%p)->(%p)\n", This
, p
);
151 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
153 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
154 FIXME("(%p)->(%p)\n", This
, p
);
158 static HRESULT WINAPI
HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle
*iface
, BSTR
*p
)
160 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
161 FIXME("(%p)->(%p)\n", This
, p
);
165 static HRESULT WINAPI
HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
167 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
168 FIXME("(%p)->(%p)\n", This
, p
);
172 static HRESULT WINAPI
HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle
*iface
, BSTR
*p
)
174 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
175 FIXME("(%p)->(%p)\n", This
, p
);
179 static HRESULT WINAPI
HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
181 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
182 FIXME("(%p)->(%p)\n", This
, p
);
186 static HRESULT WINAPI
HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
188 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
189 FIXME("(%p)->(%p)\n", This
, p
);
193 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle
*iface
, BSTR
*p
)
195 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
196 FIXME("(%p)->(%p)\n", This
, p
);
200 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
202 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
203 FIXME("(%p)->(%p)\n", This
, p
);
207 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
209 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
210 FIXME("(%p)->(%p)\n", This
, p
);
214 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle
*iface
, BSTR
*p
)
216 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
217 FIXME("(%p)->(%p)\n", This
, p
);
221 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
223 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
224 FIXME("(%p)->(%p)\n", This
, p
);
228 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
230 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
231 FIXME("(%p)->(%p)\n", This
, p
);
235 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
237 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
238 FIXME("(%p)->(%p)\n", This
, p
);
242 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
244 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
245 FIXME("(%p)->(%p)\n", This
, p
);
249 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
251 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
252 FIXME("(%p)->(%p)\n", This
, p
);
256 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
258 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
259 FIXME("(%p)->(%p)\n", This
, p
);
263 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
265 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
266 FIXME("(%p)->(%p)\n", This
, p
);
270 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
272 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
273 FIXME("(%p)->(%p)\n", This
, p
);
277 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
279 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
280 FIXME("(%p)->(%p)\n", This
, p
);
284 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
286 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
287 FIXME("(%p)->(%p)\n", This
, p
);
291 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
293 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
294 FIXME("(%p)->(%p)\n", This
, p
);
298 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
300 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
301 FIXME("(%p)->(%p)\n", This
, p
);
305 static HRESULT WINAPI
HTMLCurrentStyle_get_left(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
307 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
308 FIXME("(%p)->(%p)\n", This
, p
);
312 static HRESULT WINAPI
HTMLCurrentStyle_get_top(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
314 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
315 FIXME("(%p)->(%p)\n", This
, p
);
319 static HRESULT WINAPI
HTMLCurrentStyle_get_width(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
321 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
322 FIXME("(%p)->(%p)\n", This
, p
);
326 static HRESULT WINAPI
HTMLCurrentStyle_get_height(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
328 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
329 FIXME("(%p)->(%p)\n", This
, p
);
333 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
335 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
336 FIXME("(%p)->(%p)\n", This
, p
);
340 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
342 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
343 FIXME("(%p)->(%p)\n", This
, p
);
347 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
349 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
350 FIXME("(%p)->(%p)\n", This
, p
);
354 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
356 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
357 FIXME("(%p)->(%p)\n", This
, p
);
361 static HRESULT WINAPI
HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle
*iface
, BSTR
*p
)
363 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
364 FIXME("(%p)->(%p)\n", This
, p
);
368 static HRESULT WINAPI
HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle
*iface
, BSTR
*p
)
370 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
371 FIXME("(%p)->(%p)\n", This
, p
);
375 static HRESULT WINAPI
HTMLCurrentStyle_get_display(IHTMLCurrentStyle
*iface
, BSTR
*p
)
377 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
379 TRACE("(%p)->(%p)\n", This
, p
);
381 return get_nsstyle_attr(This
->nsstyle
, STYLEID_DISPLAY
, p
);
384 static HRESULT WINAPI
HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle
*iface
, BSTR
*p
)
386 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
387 FIXME("(%p)->(%p)\n", This
, p
);
391 static HRESULT WINAPI
HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
393 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
394 FIXME("(%p)->(%p)\n", This
, p
);
398 static HRESULT WINAPI
HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
400 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
401 FIXME("(%p)->(%p)\n", This
, p
);
405 static HRESULT WINAPI
HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
407 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
408 FIXME("(%p)->(%p)\n", This
, p
);
412 static HRESULT WINAPI
HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
414 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
415 FIXME("(%p)->(%p)\n", This
, p
);
419 static HRESULT WINAPI
HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
421 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
422 FIXME("(%p)->(%p)\n", This
, p
);
426 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle
*iface
, BSTR
*p
)
428 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
429 FIXME("(%p)->(%p)\n", This
, p
);
433 static HRESULT WINAPI
HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
435 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
436 FIXME("(%p)->(%p)\n", This
, p
);
440 static HRESULT WINAPI
HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
442 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
443 FIXME("(%p)->(%p)\n", This
, p
);
447 static HRESULT WINAPI
HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
449 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
450 FIXME("(%p)->(%p)\n", This
, p
);
454 static HRESULT WINAPI
HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
456 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
457 FIXME("(%p)->(%p)\n", This
, p
);
461 static HRESULT WINAPI
HTMLCurrentStyle_get_clear(IHTMLCurrentStyle
*iface
, BSTR
*p
)
463 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
464 FIXME("(%p)->(%p)\n", This
, p
);
468 static HRESULT WINAPI
HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle
*iface
, BSTR
*p
)
470 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
471 FIXME("(%p)->(%p)\n", This
, p
);
475 static HRESULT WINAPI
HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle
*iface
, BSTR
*p
)
477 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
478 FIXME("(%p)->(%p)\n", This
, p
);
482 static HRESULT WINAPI
HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle
*iface
, BSTR
*p
)
484 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
485 FIXME("(%p)->(%p)\n", This
, p
);
489 static HRESULT WINAPI
HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
491 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
492 FIXME("(%p)->(%p)\n", This
, p
);
496 static HRESULT WINAPI
HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
498 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
499 FIXME("(%p)->(%p)\n", This
, p
);
503 static HRESULT WINAPI
HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
505 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
506 FIXME("(%p)->(%p)\n", This
, p
);
510 static HRESULT WINAPI
HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
512 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
513 FIXME("(%p)->(%p)\n", This
, p
);
517 static HRESULT WINAPI
HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle
*iface
, BSTR
*p
)
519 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
520 FIXME("(%p)->(%p)\n", This
, p
);
524 static HRESULT WINAPI
HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle
*iface
, BSTR
*p
)
526 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
527 FIXME("(%p)->(%p)\n", This
, p
);
531 static HRESULT WINAPI
HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle
*iface
, BSTR
*p
)
533 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
534 FIXME("(%p)->(%p)\n", This
, p
);
538 static HRESULT WINAPI
HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle
*iface
, BSTR
*p
)
540 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
541 FIXME("(%p)->(%p)\n", This
, p
);
545 static HRESULT WINAPI
HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle
*iface
, BSTR
*p
)
547 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
548 FIXME("(%p)->(%p)\n", This
, p
);
552 static HRESULT WINAPI
HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle
*iface
, BSTR
*p
)
554 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
555 FIXME("(%p)->(%p)\n", This
, p
);
559 static HRESULT WINAPI
HTMLCurrentStyle_get_direction(IHTMLCurrentStyle
*iface
, BSTR
*p
)
561 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
562 FIXME("(%p)->(%p)\n", This
, p
);
566 static HRESULT WINAPI
HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle
*iface
, BSTR
*p
)
568 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
569 FIXME("(%p)->(%p)\n", This
, p
);
573 static HRESULT WINAPI
HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle
*iface
, BSTR strAttributeName
,
574 LONG lFlags
, VARIANT
*AttributeValue
)
576 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
577 FIXME("(%p)->(%s %x %p)\n", This
, debugstr_w(strAttributeName
), lFlags
, AttributeValue
);
581 static HRESULT WINAPI
HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle
*iface
, BSTR
*p
)
583 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
584 FIXME("(%p)->(%p)\n", This
, p
);
588 static HRESULT WINAPI
HTMLCurrentStyle_get_right(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
590 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
591 FIXME("(%p)->(%p)\n", This
, p
);
595 static HRESULT WINAPI
HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
597 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
598 FIXME("(%p)->(%p)\n", This
, p
);
602 static HRESULT WINAPI
HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle
*iface
, BSTR
*p
)
604 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
605 FIXME("(%p)->(%p)\n", This
, p
);
609 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle
*iface
, BSTR
*p
)
611 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
612 FIXME("(%p)->(%p)\n", This
, p
);
616 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle
*iface
, BSTR
*p
)
618 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
619 FIXME("(%p)->(%p)\n", This
, p
);
623 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle
*iface
, BSTR
*p
)
625 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
626 FIXME("(%p)->(%p)\n", This
, p
);
630 static HRESULT WINAPI
HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle
*iface
, BSTR
*p
)
632 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
633 FIXME("(%p)->(%p)\n", This
, p
);
637 static HRESULT WINAPI
HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle
*iface
, BSTR
*p
)
639 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
640 FIXME("(%p)->(%p)\n", This
, p
);
644 static HRESULT WINAPI
HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle
*iface
, BSTR
*p
)
646 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
647 FIXME("(%p)->(%p)\n", This
, p
);
651 static HRESULT WINAPI
HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle
*iface
, BSTR
*p
)
653 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
654 FIXME("(%p)->(%p)\n", This
, p
);
658 static HRESULT WINAPI
HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle
*iface
, BSTR
*p
)
660 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
661 FIXME("(%p)->(%p)\n", This
, p
);
665 static HRESULT WINAPI
HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
667 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
668 FIXME("(%p)->(%p)\n", This
, p
);
672 static HRESULT WINAPI
HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle
*iface
, BSTR
*p
)
674 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
675 FIXME("(%p)->(%p)\n", This
, p
);
679 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
681 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
682 FIXME("(%p)->(%p)\n", This
, p
);
686 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
688 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
689 FIXME("(%p)->(%p)\n", This
, p
);
693 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle
*iface
, BSTR
*p
)
695 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
696 FIXME("(%p)->(%p)\n", This
, p
);
700 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle
*iface
, BSTR
*p
)
702 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
703 FIXME("(%p)->(%p)\n", This
, p
);
707 static HRESULT WINAPI
HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
709 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
710 FIXME("(%p)->(%p)\n", This
, p
);
714 static HRESULT WINAPI
HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle
*iface
, BSTR
*p
)
716 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
717 FIXME("(%p)->(%p)\n", This
, p
);
721 static HRESULT WINAPI
HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle
*iface
, BSTR
*p
)
723 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
724 FIXME("(%p)->(%p)\n", This
, p
);
728 static HRESULT WINAPI
HTMLCurrentStyle_get_padding(IHTMLCurrentStyle
*iface
, BSTR
*p
)
730 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
731 FIXME("(%p)->(%p)\n", This
, p
);
735 static HRESULT WINAPI
HTMLCurrentStyle_get_margin(IHTMLCurrentStyle
*iface
, BSTR
*p
)
737 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
738 FIXME("(%p)->(%p)\n", This
, p
);
742 static HRESULT WINAPI
HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle
*iface
, BSTR
*p
)
744 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
745 FIXME("(%p)->(%p)\n", This
, p
);
749 static HRESULT WINAPI
HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle
*iface
, BSTR
*p
)
751 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
752 FIXME("(%p)->(%p)\n", This
, p
);
756 static HRESULT WINAPI
HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle
*iface
, BSTR
*p
)
758 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
759 FIXME("(%p)->(%p)\n", This
, p
);
763 static HRESULT WINAPI
HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle
*iface
, BSTR
*p
)
765 HTMLCurrentStyle
*This
= HTMLCURSTYLE_THIS(iface
);
766 FIXME("(%p)->(%p)\n", This
, p
);
770 #undef HTMLCURSTYLE_THIS
772 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl
= {
773 HTMLCurrentStyle_QueryInterface
,
774 HTMLCurrentStyle_AddRef
,
775 HTMLCurrentStyle_Release
,
776 HTMLCurrentStyle_GetTypeInfoCount
,
777 HTMLCurrentStyle_GetTypeInfo
,
778 HTMLCurrentStyle_GetIDsOfNames
,
779 HTMLCurrentStyle_Invoke
,
780 HTMLCurrentStyle_get_position
,
781 HTMLCurrentStyle_get_styleFloat
,
782 HTMLCurrentStyle_get_color
,
783 HTMLCurrentStyle_get_backgroundColor
,
784 HTMLCurrentStyle_get_fontFamily
,
785 HTMLCurrentStyle_get_fontStyle
,
786 HTMLCurrentStyle_get_fontVariant
,
787 HTMLCurrentStyle_get_fontWeight
,
788 HTMLCurrentStyle_get_fontSize
,
789 HTMLCurrentStyle_get_backgroundImage
,
790 HTMLCurrentStyle_get_backgroundPositionX
,
791 HTMLCurrentStyle_get_backgroundPositionY
,
792 HTMLCurrentStyle_get_backgroundRepeat
,
793 HTMLCurrentStyle_get_borderLeftColor
,
794 HTMLCurrentStyle_get_borderTopColor
,
795 HTMLCurrentStyle_get_borderRightColor
,
796 HTMLCurrentStyle_get_borderBottomColor
,
797 HTMLCurrentStyle_get_borderTopStyle
,
798 HTMLCurrentStyle_get_borderRightStyle
,
799 HTMLCurrentStyle_get_borderBottomStyle
,
800 HTMLCurrentStyle_get_borderLeftStyle
,
801 HTMLCurrentStyle_get_borderTopWidth
,
802 HTMLCurrentStyle_get_borderRightWidth
,
803 HTMLCurrentStyle_get_borderBottomWidth
,
804 HTMLCurrentStyle_get_borderLeftWidth
,
805 HTMLCurrentStyle_get_left
,
806 HTMLCurrentStyle_get_top
,
807 HTMLCurrentStyle_get_width
,
808 HTMLCurrentStyle_get_height
,
809 HTMLCurrentStyle_get_paddingLeft
,
810 HTMLCurrentStyle_get_paddingTop
,
811 HTMLCurrentStyle_get_paddingRight
,
812 HTMLCurrentStyle_get_paddingBottom
,
813 HTMLCurrentStyle_get_textAlign
,
814 HTMLCurrentStyle_get_textDecoration
,
815 HTMLCurrentStyle_get_display
,
816 HTMLCurrentStyle_get_visibility
,
817 HTMLCurrentStyle_get_zIndex
,
818 HTMLCurrentStyle_get_letterSpacing
,
819 HTMLCurrentStyle_get_lineHeight
,
820 HTMLCurrentStyle_get_textIndent
,
821 HTMLCurrentStyle_get_verticalAlign
,
822 HTMLCurrentStyle_get_backgroundAttachment
,
823 HTMLCurrentStyle_get_marginTop
,
824 HTMLCurrentStyle_get_marginRight
,
825 HTMLCurrentStyle_get_marginBottom
,
826 HTMLCurrentStyle_get_marginLeft
,
827 HTMLCurrentStyle_get_clear
,
828 HTMLCurrentStyle_get_listStyleType
,
829 HTMLCurrentStyle_get_listStylePosition
,
830 HTMLCurrentStyle_get_listStyleImage
,
831 HTMLCurrentStyle_get_clipTop
,
832 HTMLCurrentStyle_get_clipRight
,
833 HTMLCurrentStyle_get_clipBottom
,
834 HTMLCurrentStyle_get_clipLeft
,
835 HTMLCurrentStyle_get_overflow
,
836 HTMLCurrentStyle_get_pageBreakBefore
,
837 HTMLCurrentStyle_get_pageBreakAfter
,
838 HTMLCurrentStyle_get_cursor
,
839 HTMLCurrentStyle_get_tableLayout
,
840 HTMLCurrentStyle_get_borderCollapse
,
841 HTMLCurrentStyle_get_direction
,
842 HTMLCurrentStyle_get_behavior
,
843 HTMLCurrentStyle_getAttribute
,
844 HTMLCurrentStyle_get_unicodeBidi
,
845 HTMLCurrentStyle_get_right
,
846 HTMLCurrentStyle_get_bottom
,
847 HTMLCurrentStyle_get_imeMode
,
848 HTMLCurrentStyle_get_rubyAlign
,
849 HTMLCurrentStyle_get_rubyPosition
,
850 HTMLCurrentStyle_get_rubyOverhang
,
851 HTMLCurrentStyle_get_textAutospace
,
852 HTMLCurrentStyle_get_lineBreak
,
853 HTMLCurrentStyle_get_wordBreak
,
854 HTMLCurrentStyle_get_textJustify
,
855 HTMLCurrentStyle_get_textJustifyTrim
,
856 HTMLCurrentStyle_get_textKashida
,
857 HTMLCurrentStyle_get_blockDirection
,
858 HTMLCurrentStyle_get_layoutGridChar
,
859 HTMLCurrentStyle_get_layoutGridLine
,
860 HTMLCurrentStyle_get_layoutGridMode
,
861 HTMLCurrentStyle_get_layoutGridType
,
862 HTMLCurrentStyle_get_borderStyle
,
863 HTMLCurrentStyle_get_borderColor
,
864 HTMLCurrentStyle_get_borderWidth
,
865 HTMLCurrentStyle_get_padding
,
866 HTMLCurrentStyle_get_margin
,
867 HTMLCurrentStyle_get_accelerator
,
868 HTMLCurrentStyle_get_overflowX
,
869 HTMLCurrentStyle_get_overflowY
,
870 HTMLCurrentStyle_get_textTransform
873 static const tid_t HTMLCurrentStyle_iface_tids
[] = {
874 IHTMLCurrentStyle_tid
,
877 static dispex_static_data_t HTMLCurrentStyle_dispex
= {
879 DispHTMLCurrentStyle_tid
,
881 HTMLCurrentStyle_iface_tids
884 HRESULT
HTMLCurrentStyle_Create(HTMLElement
*elem
, IHTMLCurrentStyle
**p
)
886 nsIDOMCSSStyleDeclaration
*nsstyle
;
887 nsIDOMDocumentView
*nsdocview
;
888 nsIDOMAbstractView
*nsview
;
889 nsIDOMViewCSS
*nsviewcss
;
890 nsAString nsempty_str
;
891 HTMLCurrentStyle
*ret
;
894 if(!elem
->node
.doc
->nsdoc
) {
895 WARN("NULL nsdoc\n");
899 nsres
= nsIDOMHTMLDocument_QueryInterface(elem
->node
.doc
->nsdoc
, &IID_nsIDOMDocumentView
, (void**)&nsdocview
);
900 if(NS_FAILED(nsres
)) {
901 ERR("Could not get nsIDOMDocumentView: %08x\n", nsres
);
905 nsres
= nsIDOMDocumentView_GetDefaultView(nsdocview
, &nsview
);
906 nsIDOMDocumentView_Release(nsdocview
);
907 if(NS_FAILED(nsres
)) {
908 ERR("GetDefaultView failed: %08x\n", nsres
);
912 nsres
= nsIDOMAbstractView_QueryInterface(nsview
, &IID_nsIDOMViewCSS
, (void**)&nsviewcss
);
913 nsIDOMAbstractView_Release(nsview
);
914 if(NS_FAILED(nsres
)) {
915 ERR("Could not get nsIDOMViewCSS: %08x\n", nsres
);
919 nsAString_Init(&nsempty_str
, NULL
);
920 nsres
= nsIDOMViewCSS_GetComputedStyle(nsviewcss
, (nsIDOMElement
*)elem
->nselem
, &nsempty_str
, &nsstyle
);
921 nsIDOMViewCSS_Release(nsviewcss
);
922 nsAString_Finish(&nsempty_str
);
923 if(NS_FAILED(nsres
)) {
924 ERR("GetComputedStyle failed: %08x\n", nsres
);
928 ret
= heap_alloc_zero(sizeof(HTMLCurrentStyle
));
930 nsIDOMCSSStyleDeclaration_Release(nsstyle
);
931 return E_OUTOFMEMORY
;
934 ret
->lpIHTMLCurrentStyleVtbl
= &HTMLCurrentStyleVtbl
;
936 ret
->nsstyle
= nsstyle
;
938 init_dispex(&ret
->dispex
, (IUnknown
*)HTMLCURSTYLE(ret
), &HTMLCurrentStyle_dispex
);
940 *p
= HTMLCURSTYLE(ret
);