wldap32: Fix winldap_private header compatibility with 64-bit.
[wine/wine64.git] / dlls / mshtml / htmlcurstyle.c
blobf6a3a6a197f26b30a4453808e5ecd1d2a1c1e9d6
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 typedef struct {
36 DispatchEx dispex;
37 const IHTMLCurrentStyleVtbl *lpIHTMLCurrentStyleVtbl;
39 LONG ref;
41 nsIDOMCSSStyleDeclaration *nsstyle;
42 } HTMLCurrentStyle;
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);
52 *ppv = NULL;
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;
64 if(*ppv) {
65 IUnknown_AddRef((IUnknown*)*ppv);
66 return S_OK;
69 WARN("unsupported %s\n", debugstr_guid(riid));
70 return E_NOINTERFACE;
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);
80 return 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);
90 if(!ref) {
91 if(This->nsstyle)
92 nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
93 heap_free(This);
96 return ref;
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);
132 return E_NOTIMPL;
135 static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
137 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
138 FIXME("(%p)->(%p)\n", This, p);
139 return E_NOTIMPL;
142 static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
144 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
145 FIXME("(%p)->(%p)\n", This, p);
146 return E_NOTIMPL;
149 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
151 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
152 FIXME("(%p)->(%p)\n", This, p);
153 return E_NOTIMPL;
156 static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
158 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
159 FIXME("(%p)->(%p)\n", This, p);
160 return E_NOTIMPL;
163 static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
165 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
166 FIXME("(%p)->(%p)\n", This, p);
167 return E_NOTIMPL;
170 static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
172 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
173 FIXME("(%p)->(%p)\n", This, p);
174 return E_NOTIMPL;
177 static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
179 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
180 FIXME("(%p)->(%p)\n", This, p);
181 return E_NOTIMPL;
184 static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
186 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
187 FIXME("(%p)->(%p)\n", This, p);
188 return E_NOTIMPL;
191 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
193 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
194 FIXME("(%p)->(%p)\n", This, p);
195 return E_NOTIMPL;
198 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
200 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
201 FIXME("(%p)->(%p)\n", This, p);
202 return E_NOTIMPL;
205 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle *iface, VARIANT *p)
207 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
208 FIXME("(%p)->(%p)\n", This, p);
209 return E_NOTIMPL;
212 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *iface, BSTR *p)
214 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
215 FIXME("(%p)->(%p)\n", This, p);
216 return E_NOTIMPL;
219 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
221 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
222 FIXME("(%p)->(%p)\n", This, p);
223 return E_NOTIMPL;
226 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
228 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
229 FIXME("(%p)->(%p)\n", This, p);
230 return E_NOTIMPL;
233 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
235 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
236 FIXME("(%p)->(%p)\n", This, p);
237 return E_NOTIMPL;
240 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
242 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
243 FIXME("(%p)->(%p)\n", This, p);
244 return E_NOTIMPL;
247 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
249 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
250 FIXME("(%p)->(%p)\n", This, p);
251 return E_NOTIMPL;
254 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
256 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
257 FIXME("(%p)->(%p)\n", This, p);
258 return E_NOTIMPL;
261 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
263 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
264 FIXME("(%p)->(%p)\n", This, p);
265 return E_NOTIMPL;
268 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
270 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
271 FIXME("(%p)->(%p)\n", This, p);
272 return E_NOTIMPL;
275 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
277 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
278 FIXME("(%p)->(%p)\n", This, p);
279 return E_NOTIMPL;
282 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
284 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
285 FIXME("(%p)->(%p)\n", This, p);
286 return E_NOTIMPL;
289 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
291 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
292 FIXME("(%p)->(%p)\n", This, p);
293 return E_NOTIMPL;
296 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
298 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
299 FIXME("(%p)->(%p)\n", This, p);
300 return E_NOTIMPL;
303 static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
305 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
306 FIXME("(%p)->(%p)\n", This, p);
307 return E_NOTIMPL;
310 static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
312 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
313 FIXME("(%p)->(%p)\n", This, p);
314 return E_NOTIMPL;
317 static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
319 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
320 FIXME("(%p)->(%p)\n", This, p);
321 return E_NOTIMPL;
324 static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
326 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
327 FIXME("(%p)->(%p)\n", This, p);
328 return E_NOTIMPL;
331 static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
333 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
334 FIXME("(%p)->(%p)\n", This, p);
335 return E_NOTIMPL;
338 static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
340 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
341 FIXME("(%p)->(%p)\n", This, p);
342 return E_NOTIMPL;
345 static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
347 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
348 FIXME("(%p)->(%p)\n", This, p);
349 return E_NOTIMPL;
352 static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
354 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
355 FIXME("(%p)->(%p)\n", This, p);
356 return E_NOTIMPL;
359 static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
361 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
362 FIXME("(%p)->(%p)\n", This, p);
363 return E_NOTIMPL;
366 static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
368 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
369 FIXME("(%p)->(%p)\n", This, p);
370 return E_NOTIMPL;
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);
386 return E_NOTIMPL;
389 static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
391 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
392 FIXME("(%p)->(%p)\n", This, p);
393 return E_NOTIMPL;
396 static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
398 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
399 FIXME("(%p)->(%p)\n", This, p);
400 return E_NOTIMPL;
403 static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
405 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
406 FIXME("(%p)->(%p)\n", This, p);
407 return E_NOTIMPL;
410 static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
412 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
413 FIXME("(%p)->(%p)\n", This, p);
414 return E_NOTIMPL;
417 static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
419 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
420 FIXME("(%p)->(%p)\n", This, p);
421 return E_NOTIMPL;
424 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
426 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
427 FIXME("(%p)->(%p)\n", This, p);
428 return E_NOTIMPL;
431 static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, VARIANT *p)
433 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
434 FIXME("(%p)->(%p)\n", This, p);
435 return E_NOTIMPL;
438 static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
440 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
441 FIXME("(%p)->(%p)\n", This, p);
442 return E_NOTIMPL;
445 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
447 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
448 FIXME("(%p)->(%p)\n", This, p);
449 return E_NOTIMPL;
452 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
454 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
455 FIXME("(%p)->(%p)\n", This, p);
456 return E_NOTIMPL;
459 static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
461 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
462 FIXME("(%p)->(%p)\n", This, p);
463 return E_NOTIMPL;
466 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle *iface, BSTR *p)
468 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
469 FIXME("(%p)->(%p)\n", This, p);
470 return E_NOTIMPL;
473 static HRESULT WINAPI HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle *iface, BSTR *p)
475 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
476 FIXME("(%p)->(%p)\n", This, p);
477 return E_NOTIMPL;
480 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle *iface, BSTR *p)
482 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
483 FIXME("(%p)->(%p)\n", This, p);
484 return E_NOTIMPL;
487 static HRESULT WINAPI HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle *iface, VARIANT *p)
489 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
490 FIXME("(%p)->(%p)\n", This, p);
491 return E_NOTIMPL;
494 static HRESULT WINAPI HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle *iface, VARIANT *p)
496 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
497 FIXME("(%p)->(%p)\n", This, p);
498 return E_NOTIMPL;
501 static HRESULT WINAPI HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle *iface, VARIANT *p)
503 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
504 FIXME("(%p)->(%p)\n", This, p);
505 return E_NOTIMPL;
508 static HRESULT WINAPI HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle *iface, VARIANT *p)
510 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
511 FIXME("(%p)->(%p)\n", This, p);
512 return E_NOTIMPL;
515 static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BSTR *p)
517 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
518 FIXME("(%p)->(%p)\n", This, p);
519 return E_NOTIMPL;
522 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
524 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
525 FIXME("(%p)->(%p)\n", This, p);
526 return E_NOTIMPL;
529 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *iface, BSTR *p)
531 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
532 FIXME("(%p)->(%p)\n", This, p);
533 return E_NOTIMPL;
536 static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
538 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
539 FIXME("(%p)->(%p)\n", This, p);
540 return E_NOTIMPL;
543 static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
545 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
546 FIXME("(%p)->(%p)\n", This, p);
547 return E_NOTIMPL;
550 static HRESULT WINAPI HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle *iface, BSTR *p)
552 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
553 FIXME("(%p)->(%p)\n", This, p);
554 return E_NOTIMPL;
557 static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, BSTR *p)
559 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
560 FIXME("(%p)->(%p)\n", This, p);
561 return E_NOTIMPL;
564 static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
566 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
567 FIXME("(%p)->(%p)\n", This, p);
568 return E_NOTIMPL;
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);
576 return E_NOTIMPL;
579 static HRESULT WINAPI HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle *iface, BSTR *p)
581 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
582 FIXME("(%p)->(%p)\n", This, p);
583 return E_NOTIMPL;
586 static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIANT *p)
588 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
589 FIXME("(%p)->(%p)\n", This, p);
590 return E_NOTIMPL;
593 static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
595 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
596 FIXME("(%p)->(%p)\n", This, p);
597 return E_NOTIMPL;
600 static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
602 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
603 FIXME("(%p)->(%p)\n", This, p);
604 return E_NOTIMPL;
607 static HRESULT WINAPI HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle *iface, BSTR *p)
609 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
610 FIXME("(%p)->(%p)\n", This, p);
611 return E_NOTIMPL;
614 static HRESULT WINAPI HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle *iface, BSTR *p)
616 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
617 FIXME("(%p)->(%p)\n", This, p);
618 return E_NOTIMPL;
621 static HRESULT WINAPI HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle *iface, BSTR *p)
623 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
624 FIXME("(%p)->(%p)\n", This, p);
625 return E_NOTIMPL;
628 static HRESULT WINAPI HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle *iface, BSTR *p)
630 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
631 FIXME("(%p)->(%p)\n", This, p);
632 return E_NOTIMPL;
635 static HRESULT WINAPI HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle *iface, BSTR *p)
637 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
638 FIXME("(%p)->(%p)\n", This, p);
639 return E_NOTIMPL;
642 static HRESULT WINAPI HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle *iface, BSTR *p)
644 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
645 FIXME("(%p)->(%p)\n", This, p);
646 return E_NOTIMPL;
649 static HRESULT WINAPI HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle *iface, BSTR *p)
651 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
652 FIXME("(%p)->(%p)\n", This, p);
653 return E_NOTIMPL;
656 static HRESULT WINAPI HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle *iface, BSTR *p)
658 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
659 FIXME("(%p)->(%p)\n", This, p);
660 return E_NOTIMPL;
663 static HRESULT WINAPI HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle *iface, VARIANT *p)
665 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
666 FIXME("(%p)->(%p)\n", This, p);
667 return E_NOTIMPL;
670 static HRESULT WINAPI HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle *iface, BSTR *p)
672 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
673 FIXME("(%p)->(%p)\n", This, p);
674 return E_NOTIMPL;
677 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle *iface, VARIANT *p)
679 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
680 FIXME("(%p)->(%p)\n", This, p);
681 return E_NOTIMPL;
684 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle *iface, VARIANT *p)
686 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
687 FIXME("(%p)->(%p)\n", This, p);
688 return E_NOTIMPL;
691 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle *iface, BSTR *p)
693 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
694 FIXME("(%p)->(%p)\n", This, p);
695 return E_NOTIMPL;
698 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle *iface, BSTR *p)
700 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
701 FIXME("(%p)->(%p)\n", This, p);
702 return E_NOTIMPL;
705 static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, BSTR *p)
707 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
708 FIXME("(%p)->(%p)\n", This, p);
709 return E_NOTIMPL;
712 static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
714 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
715 FIXME("(%p)->(%p)\n", This, p);
716 return E_NOTIMPL;
719 static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
721 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
722 FIXME("(%p)->(%p)\n", This, p);
723 return E_NOTIMPL;
726 static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
728 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
729 FIXME("(%p)->(%p)\n", This, p);
730 return E_NOTIMPL;
733 static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
735 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
736 FIXME("(%p)->(%p)\n", This, p);
737 return E_NOTIMPL;
740 static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
742 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
743 FIXME("(%p)->(%p)\n", This, p);
744 return E_NOTIMPL;
747 static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, BSTR *p)
749 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
750 FIXME("(%p)->(%p)\n", This, p);
751 return E_NOTIMPL;
754 static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
756 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
757 FIXME("(%p)->(%p)\n", This, p);
758 return E_NOTIMPL;
761 static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
763 HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
764 FIXME("(%p)->(%p)\n", This, p);
765 return E_NOTIMPL;
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 = {
876 NULL,
877 DispHTMLCurrentStyle_tid,
878 NULL,
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;
890 nsresult nsres;
892 if(!elem->node.doc->nsdoc) {
893 WARN("NULL nsdoc\n");
894 return E_UNEXPECTED;
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);
900 return E_FAIL;
903 nsres = nsIDOMDocumentView_GetDefaultView(nsdocview, &nsview);
904 nsIDOMDocumentView_Release(nsdocview);
905 if(NS_FAILED(nsres)) {
906 ERR("GetDefaultView failed: %08x\n", nsres);
907 return E_FAIL;
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);
914 return E_FAIL;
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);
923 return E_FAIL;
926 ret = heap_alloc_zero(sizeof(HTMLCurrentStyle));
927 if(!ret) {
928 nsIDOMCSSStyleDeclaration_Release(nsstyle);
929 return E_OUTOFMEMORY;
932 ret->lpIHTMLCurrentStyleVtbl = &HTMLCurrentStyleVtbl;
933 ret->ref = 1;
934 ret->nsstyle = nsstyle;
936 init_dispex(&ret->dispex, (IUnknown*)HTMLCURSTYLE(ret), &HTMLCurrentStyle_dispex);
938 *p = HTMLCURSTYLE(ret);
939 return S_OK;