maintainers: Update the Direct3D section.
[wine.git] / dlls / mshtml / htmlcurstyle.c
blob852b9059917b457a0e209b5db93327aadeae1386
1 /*
2 * Copyright 2008 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include <stdarg.h>
21 #define COBJMACROS
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
28 #include "mshtml_private.h"
29 #include "htmlstyle.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
35 struct HTMLCurrentStyle {
36 CSSStyle css_style;
37 IHTMLCurrentStyle IHTMLCurrentStyle_iface;
38 IHTMLCurrentStyle2 IHTMLCurrentStyle2_iface;
39 IHTMLCurrentStyle3 IHTMLCurrentStyle3_iface;
40 IHTMLCurrentStyle4 IHTMLCurrentStyle4_iface;
42 HTMLElement *elem;
45 static inline HRESULT get_current_style_property(HTMLCurrentStyle *current_style, styleid_t sid, BSTR *p)
47 return get_style_property(&current_style->css_style, sid, p);
50 static inline HRESULT get_current_style_property_var(HTMLCurrentStyle *This, styleid_t sid, VARIANT *v)
52 return get_style_property_var(&This->css_style, sid, v);
55 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle *iface)
57 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle_iface);
60 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle2(IHTMLCurrentStyle2 *iface)
62 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle2_iface);
65 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle3(IHTMLCurrentStyle3 *iface)
67 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle3_iface);
70 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle4(IHTMLCurrentStyle4 *iface)
72 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle4_iface);
75 static void *HTMLCurrentStyle_QI(CSSStyle *css_style, REFIID riid)
77 HTMLCurrentStyle *This = CONTAINING_RECORD(css_style, HTMLCurrentStyle, css_style);
78 if(IsEqualGUID(&IID_IHTMLCurrentStyle, riid))
79 return &This->IHTMLCurrentStyle_iface;
80 if(IsEqualGUID(&IID_IHTMLCurrentStyle2, riid))
81 return &This->IHTMLCurrentStyle2_iface;
82 if(IsEqualGUID(&IID_IHTMLCurrentStyle3, riid))
83 return &This->IHTMLCurrentStyle3_iface;
84 if(IsEqualGUID(&IID_IHTMLCurrentStyle4, riid))
85 return &This->IHTMLCurrentStyle4_iface;
86 return NULL;
89 static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface, REFIID riid, void **ppv)
91 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
92 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
93 return IHTMLCSSStyleDeclaration_QueryInterface(&This->css_style.IHTMLCSSStyleDeclaration_iface, riid, ppv);
96 static ULONG WINAPI HTMLCurrentStyle_AddRef(IHTMLCurrentStyle *iface)
98 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
99 TRACE("(%p)\n", This);
100 return IHTMLCSSStyleDeclaration_AddRef(&This->css_style.IHTMLCSSStyleDeclaration_iface);
103 static ULONG WINAPI HTMLCurrentStyle_Release(IHTMLCurrentStyle *iface)
105 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
106 TRACE("(%p)\n", This);
107 return IHTMLCSSStyleDeclaration_Release(&This->css_style.IHTMLCSSStyleDeclaration_iface);
110 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle *iface, UINT *pctinfo)
112 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
113 return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo);
116 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle *iface, UINT iTInfo,
117 LCID lcid, ITypeInfo **ppTInfo)
119 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
120 return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
123 static HRESULT WINAPI HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle *iface, REFIID riid,
124 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
126 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
127 return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
128 lcid, rgDispId);
131 static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID dispIdMember,
132 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
133 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
135 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
136 return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
137 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
140 static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p)
142 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
144 TRACE("(%p)->(%p)\n", This, p);
146 return get_current_style_property(This, STYLEID_POSITION, p);
149 static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
151 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
153 TRACE("(%p)->(%p)\n", This, p);
155 return get_current_style_property(This, STYLEID_FLOAT, p);
158 static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
160 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
161 TRACE("(%p)->(%p)\n", This, p);
162 return get_current_style_property_var(This, STYLEID_COLOR, p);
165 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
167 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
168 TRACE("(%p)->(%p)\n", This, p);
169 return get_current_style_property_var(This, STYLEID_BACKGROUND_COLOR, p);
172 static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
174 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
176 TRACE("(%p)->(%p)\n", This, p);
178 return get_current_style_property(This, STYLEID_FONT_FAMILY, p);
181 static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
183 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
184 TRACE("(%p)->(%p)\n", This, p);
185 return get_current_style_property(This, STYLEID_FONT_STYLE, p);
188 static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
190 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
191 TRACE("(%p)->(%p)\n", This, p);
192 return get_current_style_property(This, STYLEID_FONT_VARIANT, p);
195 static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
197 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
198 TRACE("(%p)->(%p)\n", This, p);
199 return get_current_style_property_var(This, STYLEID_FONT_WEIGHT, p);
202 static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
204 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
205 TRACE("(%p)->(%p)\n", This, p);
206 return get_current_style_property_var(This, STYLEID_FONT_SIZE, p);
209 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
211 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
212 TRACE("(%p)->(%p)\n", This, p);
213 return get_current_style_property(This, STYLEID_BACKGROUND_IMAGE, p);
216 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
218 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
219 FIXME("(%p)->(%p)\n", This, p);
220 return E_NOTIMPL;
223 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle *iface, VARIANT *p)
225 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
226 FIXME("(%p)->(%p)\n", This, p);
227 return E_NOTIMPL;
230 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *iface, BSTR *p)
232 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
233 TRACE("(%p)->(%p)\n", This, p);
234 return get_current_style_property(This, STYLEID_BACKGROUND_REPEAT, p);
237 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
239 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
240 TRACE("(%p)->(%p)\n", This, p);
241 return get_current_style_property_var(This, STYLEID_BORDER_LEFT_COLOR, p);
244 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
246 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
247 TRACE("(%p)->(%p)\n", This, p);
248 return get_current_style_property_var(This, STYLEID_BORDER_TOP_COLOR, p);
251 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
253 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
254 TRACE("(%p)->(%p)\n", This, p);
255 return get_current_style_property_var(This, STYLEID_BORDER_RIGHT_COLOR, p);
258 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
260 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
261 TRACE("(%p)->(%p)\n", This, p);
262 return get_current_style_property_var(This, STYLEID_BORDER_BOTTOM_COLOR, p);
265 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
267 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
268 TRACE("(%p)->(%p)\n", This, p);
269 return get_current_style_property(This, STYLEID_BORDER_TOP_STYLE, p);
272 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
274 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
275 TRACE("(%p)->(%p)\n", This, p);
276 return get_current_style_property(This, STYLEID_BORDER_RIGHT_STYLE, p);
279 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
281 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
282 TRACE("(%p)->(%p)\n", This, p);
283 return get_current_style_property(This, STYLEID_BORDER_BOTTOM_STYLE, p);
286 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
288 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
289 TRACE("(%p)->(%p)\n", This, p);
290 return get_current_style_property(This, STYLEID_BORDER_LEFT_STYLE, p);
293 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
295 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
296 TRACE("(%p)->(%p)\n", This, p);
297 return get_current_style_property_var(This, STYLEID_BORDER_TOP_WIDTH, p);
300 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
302 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
303 TRACE("(%p)->(%p)\n", This, p);
304 return get_current_style_property_var(This, STYLEID_BORDER_RIGHT_WIDTH, p);
307 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
309 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
310 TRACE("(%p)->(%p)\n", This, p);
311 return get_current_style_property_var(This, STYLEID_BORDER_BOTTOM_WIDTH, p);
314 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
316 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
317 TRACE("(%p)->(%p)\n", This, p);
318 return get_current_style_property_var(This, STYLEID_BORDER_LEFT_WIDTH, p);
321 static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
323 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
324 TRACE("(%p)->(%p)\n", This, p);
325 return get_current_style_property_var(This, STYLEID_LEFT, p);
328 static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
330 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
331 TRACE("(%p)->(%p)\n", This, p);
332 return get_current_style_property_var(This, STYLEID_TOP, p);
335 static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
337 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
338 TRACE("(%p)->(%p)\n", This, p);
339 return get_current_style_property_var(This, STYLEID_WIDTH, p);
342 static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
344 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
345 TRACE("(%p)->(%p)\n", This, p);
346 return get_current_style_property_var(This, STYLEID_HEIGHT, p);
349 static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
351 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
352 TRACE("(%p)->(%p)\n", This, p);
353 return get_current_style_property_var(This, STYLEID_PADDING_LEFT, p);
356 static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
358 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
359 TRACE("(%p)->(%p)\n", This, p);
360 return get_current_style_property_var(This, STYLEID_PADDING_TOP, p);
363 static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
365 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
366 TRACE("(%p)->(%p)\n", This, p);
367 return get_current_style_property_var(This, STYLEID_PADDING_RIGHT, p);
370 static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
372 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
373 TRACE("(%p)->(%p)\n", This, p);
374 return get_current_style_property_var(This, STYLEID_PADDING_BOTTOM, p);
377 static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
379 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
380 TRACE("(%p)->(%p)\n", This, p);
381 return get_current_style_property(This, STYLEID_TEXT_ALIGN, p);
384 static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
386 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
387 TRACE("(%p)->(%p)\n", This, p);
388 return get_current_style_property(This, STYLEID_TEXT_DECORATION, p);
391 static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
393 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
395 TRACE("(%p)->(%p)\n", This, p);
397 return get_current_style_property(This, STYLEID_DISPLAY, p);
400 static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p)
402 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
404 TRACE("(%p)->(%p)\n", This, p);
406 return get_current_style_property(This, STYLEID_VISIBILITY, p);
409 static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
411 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
412 TRACE("(%p)->(%p)\n", This, p);
413 return get_current_style_property_var(This, STYLEID_Z_INDEX, p);
416 static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
418 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
419 TRACE("(%p)->(%p)\n", This, p);
420 return get_current_style_property_var(This, STYLEID_LETTER_SPACING, p);
423 static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
425 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
426 TRACE("(%p)->(%p)\n", This, p);
427 return get_current_style_property_var(This, STYLEID_LINE_HEIGHT, p);
430 static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
432 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
433 TRACE("(%p)->(%p)\n", This, p);
434 return get_current_style_property_var(This, STYLEID_TEXT_INDENT, p);
437 static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
439 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
440 TRACE("(%p)->(%p)\n", This, p);
441 return get_current_style_property_var(This, STYLEID_VERTICAL_ALIGN, p);
444 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
446 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
447 FIXME("(%p)->(%p)\n", This, p);
448 return E_NOTIMPL;
451 static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, VARIANT *p)
453 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
454 TRACE("(%p)->(%p)\n", This, p);
455 return get_current_style_property_var(This, STYLEID_MARGIN_TOP, p);
458 static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
460 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
461 TRACE("(%p)->(%p)\n", This, p);
462 return get_current_style_property_var(This, STYLEID_MARGIN_RIGHT, p);
465 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
467 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
468 TRACE("(%p)->(%p)\n", This, p);
469 return get_current_style_property_var(This, STYLEID_MARGIN_BOTTOM, p);
472 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
474 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
475 TRACE("(%p)->(%p)\n", This, p);
476 return get_current_style_property_var(This, STYLEID_MARGIN_LEFT, p);
479 static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
481 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
482 FIXME("(%p)->(%p)\n", This, p);
483 return E_NOTIMPL;
486 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle *iface, BSTR *p)
488 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
489 FIXME("(%p)->(%p)\n", This, p);
490 return E_NOTIMPL;
493 static HRESULT WINAPI HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle *iface, BSTR *p)
495 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
496 FIXME("(%p)->(%p)\n", This, p);
497 return E_NOTIMPL;
500 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle *iface, BSTR *p)
502 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
503 FIXME("(%p)->(%p)\n", This, p);
504 return E_NOTIMPL;
507 static HRESULT WINAPI HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle *iface, VARIANT *p)
509 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
510 FIXME("(%p)->(%p)\n", This, p);
511 return E_NOTIMPL;
514 static HRESULT WINAPI HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle *iface, VARIANT *p)
516 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
517 FIXME("(%p)->(%p)\n", This, p);
518 return E_NOTIMPL;
521 static HRESULT WINAPI HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle *iface, VARIANT *p)
523 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
524 FIXME("(%p)->(%p)\n", This, p);
525 return E_NOTIMPL;
528 static HRESULT WINAPI HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle *iface, VARIANT *p)
530 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
531 FIXME("(%p)->(%p)\n", This, p);
532 return E_NOTIMPL;
535 static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BSTR *p)
537 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
538 TRACE("(%p)->(%p)\n", This, p);
539 return get_current_style_property(This, STYLEID_OVERFLOW, p);
542 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
544 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
545 FIXME("(%p)->(%p)\n", This, p);
546 return E_NOTIMPL;
549 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *iface, BSTR *p)
551 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
552 FIXME("(%p)->(%p)\n", This, p);
553 return E_NOTIMPL;
556 static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
558 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
559 TRACE("(%p)->(%p)\n", This, p);
560 return get_current_style_property(This, STYLEID_CURSOR, p);
563 static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
565 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
566 FIXME("(%p)->(%p)\n", This, p);
567 return E_NOTIMPL;
570 static HRESULT WINAPI HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle *iface, BSTR *p)
572 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
573 FIXME("(%p)->(%p)\n", This, p);
574 return E_NOTIMPL;
577 static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, BSTR *p)
579 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
580 TRACE("(%p)->(%p)\n", This, p);
581 return get_current_style_property(This, STYLEID_DIRECTION, p);
584 static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
586 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
587 FIXME("(%p)->(%p)\n", This, p);
588 return E_NOTIMPL;
591 static HRESULT WINAPI HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle *iface, BSTR strAttributeName,
592 LONG lFlags, VARIANT *AttributeValue)
594 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
595 FIXME("(%p)->(%s %lx %p)\n", This, debugstr_w(strAttributeName), lFlags, AttributeValue);
596 return E_NOTIMPL;
599 static HRESULT WINAPI HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle *iface, BSTR *p)
601 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
602 FIXME("(%p)->(%p)\n", This, p);
603 return E_NOTIMPL;
606 static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIANT *p)
608 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
609 TRACE("(%p)->(%p)\n", This, p);
610 return get_current_style_property_var(This, STYLEID_RIGHT, p);
613 static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
615 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
616 TRACE("(%p)->(%p)\n", This, p);
617 return get_current_style_property_var(This, STYLEID_BOTTOM, p);
620 static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
622 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
623 FIXME("(%p)->(%p)\n", This, p);
624 return E_NOTIMPL;
627 static HRESULT WINAPI HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle *iface, BSTR *p)
629 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
630 FIXME("(%p)->(%p)\n", This, p);
631 return E_NOTIMPL;
634 static HRESULT WINAPI HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle *iface, BSTR *p)
636 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
637 FIXME("(%p)->(%p)\n", This, p);
638 return E_NOTIMPL;
641 static HRESULT WINAPI HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle *iface, BSTR *p)
643 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
644 FIXME("(%p)->(%p)\n", This, p);
645 return E_NOTIMPL;
648 static HRESULT WINAPI HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle *iface, BSTR *p)
650 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
651 FIXME("(%p)->(%p)\n", This, p);
652 return E_NOTIMPL;
655 static HRESULT WINAPI HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle *iface, BSTR *p)
657 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
658 FIXME("(%p)->(%p)\n", This, p);
659 return E_NOTIMPL;
662 static HRESULT WINAPI HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle *iface, BSTR *p)
664 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
665 FIXME("(%p)->(%p)\n", This, p);
666 return E_NOTIMPL;
669 static HRESULT WINAPI HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle *iface, BSTR *p)
671 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
672 FIXME("(%p)->(%p)\n", This, p);
673 return E_NOTIMPL;
676 static HRESULT WINAPI HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle *iface, BSTR *p)
678 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
679 FIXME("(%p)->(%p)\n", This, p);
680 return E_NOTIMPL;
683 static HRESULT WINAPI HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle *iface, VARIANT *p)
685 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
686 FIXME("(%p)->(%p)\n", This, p);
687 return E_NOTIMPL;
690 static HRESULT WINAPI HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle *iface, BSTR *p)
692 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
693 FIXME("(%p)->(%p)\n", This, p);
694 return E_NOTIMPL;
697 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle *iface, VARIANT *p)
699 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
700 FIXME("(%p)->(%p)\n", This, p);
701 return E_NOTIMPL;
704 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle *iface, VARIANT *p)
706 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
707 FIXME("(%p)->(%p)\n", This, p);
708 return E_NOTIMPL;
711 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle *iface, BSTR *p)
713 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
714 FIXME("(%p)->(%p)\n", This, p);
715 return E_NOTIMPL;
718 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle *iface, BSTR *p)
720 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
721 FIXME("(%p)->(%p)\n", This, p);
722 return E_NOTIMPL;
725 static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, BSTR *p)
727 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
728 TRACE("(%p)->(%p)\n", This, p);
729 return get_current_style_property(This, STYLEID_BORDER_STYLE, p);
732 static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
734 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
735 TRACE("(%p)->(%p)\n", This, p);
736 return get_current_style_property(This, STYLEID_BORDER_COLOR, p);
739 static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
741 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
742 TRACE("(%p)->(%p)\n", This, p);
743 return get_current_style_property(This, STYLEID_BORDER_WIDTH, p);
746 static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
748 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
749 TRACE("(%p)->(%p)\n", This, p);
750 return get_current_style_property(This, STYLEID_PADDING, p);
753 static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
755 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
756 TRACE("(%p)->(%p)\n", This, p);
757 return get_current_style_property(This, STYLEID_MARGIN, p);
760 static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
762 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
763 FIXME("(%p)->(%p)\n", This, p);
764 return E_NOTIMPL;
767 static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, BSTR *p)
769 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
770 TRACE("(%p)->(%p)\n", This, p);
771 return get_current_style_property(This, STYLEID_OVERFLOW_X, p);
774 static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
776 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
777 TRACE("(%p)->(%p)\n", This, p);
778 return get_current_style_property(This, STYLEID_OVERFLOW_Y, p);
781 static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
783 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
784 TRACE("(%p)->(%p)\n", This, p);
785 return get_current_style_property(This, STYLEID_TEXT_TRANSFORM, p);
788 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
789 HTMLCurrentStyle_QueryInterface,
790 HTMLCurrentStyle_AddRef,
791 HTMLCurrentStyle_Release,
792 HTMLCurrentStyle_GetTypeInfoCount,
793 HTMLCurrentStyle_GetTypeInfo,
794 HTMLCurrentStyle_GetIDsOfNames,
795 HTMLCurrentStyle_Invoke,
796 HTMLCurrentStyle_get_position,
797 HTMLCurrentStyle_get_styleFloat,
798 HTMLCurrentStyle_get_color,
799 HTMLCurrentStyle_get_backgroundColor,
800 HTMLCurrentStyle_get_fontFamily,
801 HTMLCurrentStyle_get_fontStyle,
802 HTMLCurrentStyle_get_fontVariant,
803 HTMLCurrentStyle_get_fontWeight,
804 HTMLCurrentStyle_get_fontSize,
805 HTMLCurrentStyle_get_backgroundImage,
806 HTMLCurrentStyle_get_backgroundPositionX,
807 HTMLCurrentStyle_get_backgroundPositionY,
808 HTMLCurrentStyle_get_backgroundRepeat,
809 HTMLCurrentStyle_get_borderLeftColor,
810 HTMLCurrentStyle_get_borderTopColor,
811 HTMLCurrentStyle_get_borderRightColor,
812 HTMLCurrentStyle_get_borderBottomColor,
813 HTMLCurrentStyle_get_borderTopStyle,
814 HTMLCurrentStyle_get_borderRightStyle,
815 HTMLCurrentStyle_get_borderBottomStyle,
816 HTMLCurrentStyle_get_borderLeftStyle,
817 HTMLCurrentStyle_get_borderTopWidth,
818 HTMLCurrentStyle_get_borderRightWidth,
819 HTMLCurrentStyle_get_borderBottomWidth,
820 HTMLCurrentStyle_get_borderLeftWidth,
821 HTMLCurrentStyle_get_left,
822 HTMLCurrentStyle_get_top,
823 HTMLCurrentStyle_get_width,
824 HTMLCurrentStyle_get_height,
825 HTMLCurrentStyle_get_paddingLeft,
826 HTMLCurrentStyle_get_paddingTop,
827 HTMLCurrentStyle_get_paddingRight,
828 HTMLCurrentStyle_get_paddingBottom,
829 HTMLCurrentStyle_get_textAlign,
830 HTMLCurrentStyle_get_textDecoration,
831 HTMLCurrentStyle_get_display,
832 HTMLCurrentStyle_get_visibility,
833 HTMLCurrentStyle_get_zIndex,
834 HTMLCurrentStyle_get_letterSpacing,
835 HTMLCurrentStyle_get_lineHeight,
836 HTMLCurrentStyle_get_textIndent,
837 HTMLCurrentStyle_get_verticalAlign,
838 HTMLCurrentStyle_get_backgroundAttachment,
839 HTMLCurrentStyle_get_marginTop,
840 HTMLCurrentStyle_get_marginRight,
841 HTMLCurrentStyle_get_marginBottom,
842 HTMLCurrentStyle_get_marginLeft,
843 HTMLCurrentStyle_get_clear,
844 HTMLCurrentStyle_get_listStyleType,
845 HTMLCurrentStyle_get_listStylePosition,
846 HTMLCurrentStyle_get_listStyleImage,
847 HTMLCurrentStyle_get_clipTop,
848 HTMLCurrentStyle_get_clipRight,
849 HTMLCurrentStyle_get_clipBottom,
850 HTMLCurrentStyle_get_clipLeft,
851 HTMLCurrentStyle_get_overflow,
852 HTMLCurrentStyle_get_pageBreakBefore,
853 HTMLCurrentStyle_get_pageBreakAfter,
854 HTMLCurrentStyle_get_cursor,
855 HTMLCurrentStyle_get_tableLayout,
856 HTMLCurrentStyle_get_borderCollapse,
857 HTMLCurrentStyle_get_direction,
858 HTMLCurrentStyle_get_behavior,
859 HTMLCurrentStyle_getAttribute,
860 HTMLCurrentStyle_get_unicodeBidi,
861 HTMLCurrentStyle_get_right,
862 HTMLCurrentStyle_get_bottom,
863 HTMLCurrentStyle_get_imeMode,
864 HTMLCurrentStyle_get_rubyAlign,
865 HTMLCurrentStyle_get_rubyPosition,
866 HTMLCurrentStyle_get_rubyOverhang,
867 HTMLCurrentStyle_get_textAutospace,
868 HTMLCurrentStyle_get_lineBreak,
869 HTMLCurrentStyle_get_wordBreak,
870 HTMLCurrentStyle_get_textJustify,
871 HTMLCurrentStyle_get_textJustifyTrim,
872 HTMLCurrentStyle_get_textKashida,
873 HTMLCurrentStyle_get_blockDirection,
874 HTMLCurrentStyle_get_layoutGridChar,
875 HTMLCurrentStyle_get_layoutGridLine,
876 HTMLCurrentStyle_get_layoutGridMode,
877 HTMLCurrentStyle_get_layoutGridType,
878 HTMLCurrentStyle_get_borderStyle,
879 HTMLCurrentStyle_get_borderColor,
880 HTMLCurrentStyle_get_borderWidth,
881 HTMLCurrentStyle_get_padding,
882 HTMLCurrentStyle_get_margin,
883 HTMLCurrentStyle_get_accelerator,
884 HTMLCurrentStyle_get_overflowX,
885 HTMLCurrentStyle_get_overflowY,
886 HTMLCurrentStyle_get_textTransform
889 /* IHTMLCurrentStyle2 */
890 static HRESULT WINAPI HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2 *iface, REFIID riid, void **ppv)
892 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
894 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
897 static ULONG WINAPI HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2 *iface)
899 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
901 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
904 static ULONG WINAPI HTMLCurrentStyle2_Release(IHTMLCurrentStyle2 *iface)
906 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
907 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
910 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2 *iface, UINT *pctinfo)
912 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
913 return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo);
916 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2 *iface, UINT iTInfo,
917 LCID lcid, ITypeInfo **ppTInfo)
919 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
920 return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
923 static HRESULT WINAPI HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2 *iface, REFIID riid,
924 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
926 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
927 return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
928 lcid, rgDispId);
931 static HRESULT WINAPI HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2 *iface, DISPID dispIdMember,
932 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
933 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
935 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
936 return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
937 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
940 static HRESULT WINAPI HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2 *iface, BSTR *p)
942 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
943 FIXME("(%p)->(%p)\n", This, p);
944 return E_NOTIMPL;
947 static HRESULT WINAPI HTMLCurrentStyle2_get_wordWrap(IHTMLCurrentStyle2 *iface, BSTR *p)
949 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
950 FIXME("(%p)->(%p)\n", This, p);
951 return E_NOTIMPL;
954 static HRESULT WINAPI HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentStyle2 *iface, BSTR *p)
956 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
957 FIXME("(%p)->(%p)\n", This, p);
958 return E_NOTIMPL;
961 static HRESULT WINAPI HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
963 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
965 FIXME("(%p)->(%p) returning true\n", This, p);
967 *p = VARIANT_TRUE;
968 return S_OK;
971 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
973 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
974 FIXME("(%p)->(%p)\n", This, p);
975 return E_NOTIMPL;
978 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarFaceColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
980 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
981 FIXME("(%p)->(%p)\n", This, p);
982 return E_NOTIMPL;
985 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbar3dLightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
987 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
988 FIXME("(%p)->(%p)\n", This, p);
989 return E_NOTIMPL;
992 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
994 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
995 FIXME("(%p)->(%p)\n", This, p);
996 return E_NOTIMPL;
999 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarHighlightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1001 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1002 FIXME("(%p)->(%p)\n", This, p);
1003 return E_NOTIMPL;
1006 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarDarkShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1008 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1009 FIXME("(%p)->(%p)\n", This, p);
1010 return E_NOTIMPL;
1013 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarArrowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1015 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1016 FIXME("(%p)->(%p)\n", This, p);
1017 return E_NOTIMPL;
1020 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarTrackColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1022 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1023 FIXME("(%p)->(%p)\n", This, p);
1024 return E_NOTIMPL;
1027 static HRESULT WINAPI HTMLCurrentStyle2_get_writingMode(IHTMLCurrentStyle2 *iface, BSTR *p)
1029 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1030 FIXME("(%p)->(%p)\n", This, p);
1031 return E_NOTIMPL;
1034 static HRESULT WINAPI HTMLCurrentStyle2_get_zoom(IHTMLCurrentStyle2 *iface, VARIANT *p)
1036 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1037 FIXME("(%p)->(%p)\n", This, p);
1038 return E_NOTIMPL;
1041 static HRESULT WINAPI HTMLCurrentStyle2_get_filter(IHTMLCurrentStyle2 *iface, BSTR *p)
1043 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1045 TRACE("(%p)->(%p)\n", This, p);
1047 if(This->elem->filter) {
1048 *p = SysAllocString(This->elem->filter);
1049 if(!*p)
1050 return E_OUTOFMEMORY;
1051 }else {
1052 *p = NULL;
1055 return S_OK;
1058 static HRESULT WINAPI HTMLCurrentStyle2_get_textAlignLast(IHTMLCurrentStyle2 *iface, BSTR *p)
1060 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1061 FIXME("(%p)->(%p)\n", This, p);
1062 return E_NOTIMPL;
1065 static HRESULT WINAPI HTMLCurrentStyle2_get_textKashidaSpace(IHTMLCurrentStyle2 *iface, VARIANT *p)
1067 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1068 FIXME("(%p)->(%p)\n", This, p);
1069 return E_NOTIMPL;
1072 static HRESULT WINAPI HTMLCurrentStyle2_get_isBlock(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
1074 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1075 FIXME("(%p)->(%p)\n", This, p);
1076 return E_NOTIMPL;
1079 static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl = {
1080 HTMLCurrentStyle2_QueryInterface,
1081 HTMLCurrentStyle2_AddRef,
1082 HTMLCurrentStyle2_Release,
1083 HTMLCurrentStyle2_GetTypeInfoCount,
1084 HTMLCurrentStyle2_GetTypeInfo,
1085 HTMLCurrentStyle2_GetIDsOfNames,
1086 HTMLCurrentStyle2_Invoke,
1087 HTMLCurrentStyle2_get_layoutFlow,
1088 HTMLCurrentStyle2_get_wordWrap,
1089 HTMLCurrentStyle2_get_textUnderlinePosition,
1090 HTMLCurrentStyle2_get_hasLayout,
1091 HTMLCurrentStyle2_get_scrollbarBaseColor,
1092 HTMLCurrentStyle2_get_scrollbarFaceColor,
1093 HTMLCurrentStyle2_get_scrollbar3dLightColor,
1094 HTMLCurrentStyle2_get_scrollbarShadowColor,
1095 HTMLCurrentStyle2_get_scrollbarHighlightColor,
1096 HTMLCurrentStyle2_get_scrollbarDarkShadowColor,
1097 HTMLCurrentStyle2_get_scrollbarArrowColor,
1098 HTMLCurrentStyle2_get_scrollbarTrackColor,
1099 HTMLCurrentStyle2_get_writingMode,
1100 HTMLCurrentStyle2_get_zoom,
1101 HTMLCurrentStyle2_get_filter,
1102 HTMLCurrentStyle2_get_textAlignLast,
1103 HTMLCurrentStyle2_get_textKashidaSpace,
1104 HTMLCurrentStyle2_get_isBlock
1107 /* IHTMLCurrentStyle3 */
1108 static HRESULT WINAPI HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3 *iface, REFIID riid, void **ppv)
1110 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1112 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1115 static ULONG WINAPI HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3 *iface)
1117 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1119 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1122 static ULONG WINAPI HTMLCurrentStyle3_Release(IHTMLCurrentStyle3 *iface)
1124 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1125 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1128 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3 *iface, UINT *pctinfo)
1130 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1131 return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo);
1134 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3 *iface, UINT iTInfo,
1135 LCID lcid, ITypeInfo **ppTInfo)
1137 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1138 return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1141 static HRESULT WINAPI HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3 *iface, REFIID riid,
1142 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1144 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1145 return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1146 lcid, rgDispId);
1149 static HRESULT WINAPI HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3 *iface, DISPID dispIdMember,
1150 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1151 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1153 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1154 return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1155 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1158 static HRESULT WINAPI HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3 *iface, BSTR *p)
1160 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1161 FIXME("(%p)->(%p)\n", This, p);
1162 return E_NOTIMPL;
1165 static HRESULT WINAPI HTMLCurrentStyle3_get_minHeight(IHTMLCurrentStyle3 *iface, VARIANT *p)
1167 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1168 FIXME("(%p)->(%p)\n", This, p);
1169 return E_NOTIMPL;
1172 static HRESULT WINAPI HTMLCurrentStyle3_get_wordSpacing(IHTMLCurrentStyle3 *iface, VARIANT *p)
1174 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1175 FIXME("(%p)->(%p)\n", This, p);
1176 return E_NOTIMPL;
1179 static HRESULT WINAPI HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3 *iface, BSTR *p)
1181 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1183 TRACE("(%p)->(%p)\n", This, p);
1185 return get_current_style_property(This, STYLEID_WHITE_SPACE, p);
1188 static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl = {
1189 HTMLCurrentStyle3_QueryInterface,
1190 HTMLCurrentStyle3_AddRef,
1191 HTMLCurrentStyle3_Release,
1192 HTMLCurrentStyle3_GetTypeInfoCount,
1193 HTMLCurrentStyle3_GetTypeInfo,
1194 HTMLCurrentStyle3_GetIDsOfNames,
1195 HTMLCurrentStyle3_Invoke,
1196 HTMLCurrentStyle3_get_textOverflow,
1197 HTMLCurrentStyle3_get_minHeight,
1198 HTMLCurrentStyle3_get_wordSpacing,
1199 HTMLCurrentStyle3_get_whiteSpace
1202 /* IHTMLCurrentStyle4 */
1203 static HRESULT WINAPI HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4 *iface, REFIID riid, void **ppv)
1205 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1207 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1210 static ULONG WINAPI HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4 *iface)
1212 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1214 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1217 static ULONG WINAPI HTMLCurrentStyle4_Release(IHTMLCurrentStyle4 *iface)
1219 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1220 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1223 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4 *iface, UINT *pctinfo)
1225 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1226 return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo);
1229 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4 *iface, UINT iTInfo,
1230 LCID lcid, ITypeInfo **ppTInfo)
1232 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1233 return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1236 static HRESULT WINAPI HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4 *iface, REFIID riid,
1237 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1239 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1240 return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1241 lcid, rgDispId);
1244 static HRESULT WINAPI HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4 *iface, DISPID dispIdMember,
1245 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1246 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1248 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1249 return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1250 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1253 static HRESULT WINAPI HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4 *iface, BSTR *p)
1255 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1256 FIXME("(%p)->(%p)\n", This, p);
1257 return E_NOTIMPL;
1260 static HRESULT WINAPI HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4 *iface, VARIANT *p)
1262 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1263 FIXME("(%p)->(%p)\n", This, p);
1264 return E_NOTIMPL;
1267 static HRESULT WINAPI HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1269 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1270 TRACE("(%p)->(%p)\n", This, p);
1271 return get_current_style_property_var(This, STYLEID_MIN_WIDTH, p);
1274 static HRESULT WINAPI HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1276 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1277 FIXME("(%p)->(%p)\n", This, p);
1278 return E_NOTIMPL;
1281 static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl = {
1282 HTMLCurrentStyle4_QueryInterface,
1283 HTMLCurrentStyle4_AddRef,
1284 HTMLCurrentStyle4_Release,
1285 HTMLCurrentStyle4_GetTypeInfoCount,
1286 HTMLCurrentStyle4_GetTypeInfo,
1287 HTMLCurrentStyle4_GetIDsOfNames,
1288 HTMLCurrentStyle4_Invoke,
1289 HTMLCurrentStyle4_msInterpolationMode,
1290 HTMLCurrentStyle4_get_maxHeight,
1291 HTMLCurrentStyle4_get_minWidth,
1292 HTMLCurrentStyle4_get_maxWidth
1295 static const tid_t HTMLCurrentStyle_iface_tids[] = {
1296 IHTMLCurrentStyle_tid,
1297 IHTMLCurrentStyle2_tid,
1298 IHTMLCurrentStyle3_tid,
1299 IHTMLCurrentStyle4_tid,
1302 static dispex_static_data_t HTMLCurrentStyle_dispex = {
1303 L"MSCurrentStyleCSSProperties",
1304 &CSSStyle_dispex_vtbl,
1305 DispHTMLCurrentStyle_tid,
1306 HTMLCurrentStyle_iface_tids,
1307 CSSStyle_init_dispex_info
1310 HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
1312 nsIDOMCSSStyleDeclaration *nsstyle;
1313 mozIDOMWindowProxy *nsview;
1314 nsIDOMWindow *nswindow;
1315 nsAString nsempty_str;
1316 HTMLCurrentStyle *ret;
1317 nsresult nsres;
1319 if(!elem->node.doc->nsdoc) {
1320 WARN("NULL nsdoc\n");
1321 return E_UNEXPECTED;
1324 nsres = nsIDOMHTMLDocument_GetDefaultView(elem->node.doc->nsdoc, &nsview);
1325 if(NS_FAILED(nsres)) {
1326 ERR("GetDefaultView failed: %08lx\n", nsres);
1327 return E_FAIL;
1330 nsres = mozIDOMWindowProxy_QueryInterface(nsview, &IID_nsIDOMWindow, (void**)&nswindow);
1331 mozIDOMWindowProxy_Release(nsview);
1332 assert(nsres == NS_OK);
1334 nsAString_Init(&nsempty_str, NULL);
1335 nsres = nsIDOMWindow_GetComputedStyle(nswindow, elem->dom_element, &nsempty_str, &nsstyle);
1336 nsAString_Finish(&nsempty_str);
1337 nsIDOMWindow_Release(nswindow);
1338 if(NS_FAILED(nsres)) {
1339 ERR("GetComputedStyle failed: %08lx\n", nsres);
1340 return E_FAIL;
1343 if(!nsstyle) {
1344 ERR("GetComputedStyle returned NULL nsstyle\n");
1345 return E_FAIL;
1348 ret = heap_alloc_zero(sizeof(HTMLCurrentStyle));
1349 if(!ret) {
1350 nsIDOMCSSStyleDeclaration_Release(nsstyle);
1351 return E_OUTOFMEMORY;
1354 ret->IHTMLCurrentStyle_iface.lpVtbl = &HTMLCurrentStyleVtbl;
1355 ret->IHTMLCurrentStyle2_iface.lpVtbl = &HTMLCurrentStyle2Vtbl;
1356 ret->IHTMLCurrentStyle3_iface.lpVtbl = &HTMLCurrentStyle3Vtbl;
1357 ret->IHTMLCurrentStyle4_iface.lpVtbl = &HTMLCurrentStyle4Vtbl;
1359 init_css_style(&ret->css_style, nsstyle, HTMLCurrentStyle_QI, &HTMLCurrentStyle_dispex,
1360 dispex_compat_mode(&elem->node.event_target.dispex));
1361 nsIDOMCSSStyleDeclaration_Release(nsstyle);
1363 IHTMLElement_AddRef(&elem->IHTMLElement_iface);
1364 ret->elem = elem;
1366 *p = &ret->IHTMLCurrentStyle_iface;
1367 return S_OK;