gdi32: Try to parse font names without FreeType.
[wine/zf.git] / dlls / mshtml / htmlcurstyle.c
blob85ac99aef92ca6b3eefb79a4b62f463e8326ab47
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>
20 #include <assert.h>
22 #define COBJMACROS
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winuser.h"
27 #include "ole2.h"
29 #include "mshtml_private.h"
30 #include "htmlstyle.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
36 struct HTMLCurrentStyle {
37 CSSStyle css_style;
38 IHTMLCurrentStyle IHTMLCurrentStyle_iface;
39 IHTMLCurrentStyle2 IHTMLCurrentStyle2_iface;
40 IHTMLCurrentStyle3 IHTMLCurrentStyle3_iface;
41 IHTMLCurrentStyle4 IHTMLCurrentStyle4_iface;
43 HTMLElement *elem;
46 static inline HRESULT get_current_style_property(HTMLCurrentStyle *current_style, styleid_t sid, BSTR *p)
48 return get_style_property(&current_style->css_style, sid, p);
51 static inline HRESULT get_current_style_property_var(HTMLCurrentStyle *This, styleid_t sid, VARIANT *v)
53 return get_style_property_var(&This->css_style, sid, v);
56 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle *iface)
58 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle_iface);
61 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle2(IHTMLCurrentStyle2 *iface)
63 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle2_iface);
66 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle3(IHTMLCurrentStyle3 *iface)
68 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle3_iface);
71 static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle4(IHTMLCurrentStyle4 *iface)
73 return CONTAINING_RECORD(iface, HTMLCurrentStyle, IHTMLCurrentStyle4_iface);
76 static void *HTMLCurrentStyle_QI(CSSStyle *css_style, REFIID riid)
78 HTMLCurrentStyle *This = CONTAINING_RECORD(css_style, HTMLCurrentStyle, css_style);
79 if(IsEqualGUID(&IID_IHTMLCurrentStyle, riid))
80 return &This->IHTMLCurrentStyle_iface;
81 if(IsEqualGUID(&IID_IHTMLCurrentStyle2, riid))
82 return &This->IHTMLCurrentStyle2_iface;
83 if(IsEqualGUID(&IID_IHTMLCurrentStyle3, riid))
84 return &This->IHTMLCurrentStyle3_iface;
85 if(IsEqualGUID(&IID_IHTMLCurrentStyle4, riid))
86 return &This->IHTMLCurrentStyle4_iface;
87 return NULL;
90 static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface, REFIID riid, void **ppv)
92 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
93 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
94 return IHTMLCSSStyleDeclaration_QueryInterface(&This->css_style.IHTMLCSSStyleDeclaration_iface, riid, ppv);
97 static ULONG WINAPI HTMLCurrentStyle_AddRef(IHTMLCurrentStyle *iface)
99 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
100 TRACE("(%p)\n", This);
101 return IHTMLCSSStyleDeclaration_AddRef(&This->css_style.IHTMLCSSStyleDeclaration_iface);
104 static ULONG WINAPI HTMLCurrentStyle_Release(IHTMLCurrentStyle *iface)
106 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
107 TRACE("(%p)\n", This);
108 return IHTMLCSSStyleDeclaration_Release(&This->css_style.IHTMLCSSStyleDeclaration_iface);
111 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle *iface, UINT *pctinfo)
113 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
114 return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo);
117 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle *iface, UINT iTInfo,
118 LCID lcid, ITypeInfo **ppTInfo)
120 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
121 return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
124 static HRESULT WINAPI HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle *iface, REFIID riid,
125 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
127 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
128 return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
129 lcid, rgDispId);
132 static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID dispIdMember,
133 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
134 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
136 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
137 return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
138 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
141 static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p)
143 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
145 TRACE("(%p)->(%p)\n", This, p);
147 return get_current_style_property(This, STYLEID_POSITION, p);
150 static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
152 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
154 TRACE("(%p)->(%p)\n", This, p);
156 return get_current_style_property(This, STYLEID_FLOAT, p);
159 static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
161 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
162 TRACE("(%p)->(%p)\n", This, p);
163 return get_current_style_property_var(This, STYLEID_COLOR, p);
166 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
168 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
169 TRACE("(%p)->(%p)\n", This, p);
170 return get_current_style_property_var(This, STYLEID_BACKGROUND_COLOR, p);
173 static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
175 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
177 TRACE("(%p)->(%p)\n", This, p);
179 return get_current_style_property(This, STYLEID_FONT_FAMILY, p);
182 static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
184 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
185 TRACE("(%p)->(%p)\n", This, p);
186 return get_current_style_property(This, STYLEID_FONT_STYLE, p);
189 static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
191 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
192 TRACE("(%p)->(%p)\n", This, p);
193 return get_current_style_property(This, STYLEID_FONT_VARIANT, p);
196 static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
198 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
199 TRACE("(%p)->(%p)\n", This, p);
200 return get_current_style_property_var(This, STYLEID_FONT_WEIGHT, p);
203 static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
205 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
206 TRACE("(%p)->(%p)\n", This, p);
207 return get_current_style_property_var(This, STYLEID_FONT_SIZE, p);
210 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
212 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
213 TRACE("(%p)->(%p)\n", This, p);
214 return get_current_style_property(This, STYLEID_BACKGROUND_IMAGE, p);
217 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
219 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
220 FIXME("(%p)->(%p)\n", This, p);
221 return E_NOTIMPL;
224 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle *iface, VARIANT *p)
226 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
227 FIXME("(%p)->(%p)\n", This, p);
228 return E_NOTIMPL;
231 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *iface, BSTR *p)
233 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
234 TRACE("(%p)->(%p)\n", This, p);
235 return get_current_style_property(This, STYLEID_BACKGROUND_REPEAT, p);
238 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
240 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
241 TRACE("(%p)->(%p)\n", This, p);
242 return get_current_style_property_var(This, STYLEID_BORDER_LEFT_COLOR, p);
245 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
247 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
248 TRACE("(%p)->(%p)\n", This, p);
249 return get_current_style_property_var(This, STYLEID_BORDER_TOP_COLOR, p);
252 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
254 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
255 TRACE("(%p)->(%p)\n", This, p);
256 return get_current_style_property_var(This, STYLEID_BORDER_RIGHT_COLOR, p);
259 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
261 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
262 TRACE("(%p)->(%p)\n", This, p);
263 return get_current_style_property_var(This, STYLEID_BORDER_BOTTOM_COLOR, p);
266 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
268 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
269 TRACE("(%p)->(%p)\n", This, p);
270 return get_current_style_property(This, STYLEID_BORDER_TOP_STYLE, p);
273 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
275 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
276 TRACE("(%p)->(%p)\n", This, p);
277 return get_current_style_property(This, STYLEID_BORDER_RIGHT_STYLE, p);
280 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
282 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
283 TRACE("(%p)->(%p)\n", This, p);
284 return get_current_style_property(This, STYLEID_BORDER_BOTTOM_STYLE, p);
287 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
289 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
290 TRACE("(%p)->(%p)\n", This, p);
291 return get_current_style_property(This, STYLEID_BORDER_LEFT_STYLE, p);
294 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
296 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
297 TRACE("(%p)->(%p)\n", This, p);
298 return get_current_style_property_var(This, STYLEID_BORDER_TOP_WIDTH, p);
301 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
303 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
304 TRACE("(%p)->(%p)\n", This, p);
305 return get_current_style_property_var(This, STYLEID_BORDER_RIGHT_WIDTH, p);
308 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
310 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
311 TRACE("(%p)->(%p)\n", This, p);
312 return get_current_style_property_var(This, STYLEID_BORDER_BOTTOM_WIDTH, p);
315 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
317 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
318 TRACE("(%p)->(%p)\n", This, p);
319 return get_current_style_property_var(This, STYLEID_BORDER_LEFT_WIDTH, p);
322 static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
324 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
325 TRACE("(%p)->(%p)\n", This, p);
326 return get_current_style_property_var(This, STYLEID_LEFT, p);
329 static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
331 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
332 TRACE("(%p)->(%p)\n", This, p);
333 return get_current_style_property_var(This, STYLEID_TOP, p);
336 static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
338 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
339 TRACE("(%p)->(%p)\n", This, p);
340 return get_current_style_property_var(This, STYLEID_WIDTH, p);
343 static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
345 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
346 TRACE("(%p)->(%p)\n", This, p);
347 return get_current_style_property_var(This, STYLEID_HEIGHT, p);
350 static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
352 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
353 TRACE("(%p)->(%p)\n", This, p);
354 return get_current_style_property_var(This, STYLEID_PADDING_LEFT, p);
357 static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
359 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
360 TRACE("(%p)->(%p)\n", This, p);
361 return get_current_style_property_var(This, STYLEID_PADDING_TOP, p);
364 static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
366 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
367 TRACE("(%p)->(%p)\n", This, p);
368 return get_current_style_property_var(This, STYLEID_PADDING_RIGHT, p);
371 static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
373 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
374 TRACE("(%p)->(%p)\n", This, p);
375 return get_current_style_property_var(This, STYLEID_PADDING_BOTTOM, p);
378 static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
380 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
381 TRACE("(%p)->(%p)\n", This, p);
382 return get_current_style_property(This, STYLEID_TEXT_ALIGN, p);
385 static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
387 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
388 TRACE("(%p)->(%p)\n", This, p);
389 return get_current_style_property(This, STYLEID_TEXT_DECORATION, p);
392 static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
394 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
396 TRACE("(%p)->(%p)\n", This, p);
398 return get_current_style_property(This, STYLEID_DISPLAY, p);
401 static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p)
403 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
405 TRACE("(%p)->(%p)\n", This, p);
407 return get_current_style_property(This, STYLEID_VISIBILITY, p);
410 static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
412 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
413 TRACE("(%p)->(%p)\n", This, p);
414 return get_current_style_property_var(This, STYLEID_Z_INDEX, p);
417 static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
419 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
420 TRACE("(%p)->(%p)\n", This, p);
421 return get_current_style_property_var(This, STYLEID_LETTER_SPACING, p);
424 static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
426 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
427 TRACE("(%p)->(%p)\n", This, p);
428 return get_current_style_property_var(This, STYLEID_LINE_HEIGHT, p);
431 static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
433 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
434 TRACE("(%p)->(%p)\n", This, p);
435 return get_current_style_property_var(This, STYLEID_TEXT_INDENT, p);
438 static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
440 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
441 TRACE("(%p)->(%p)\n", This, p);
442 return get_current_style_property_var(This, STYLEID_VERTICAL_ALIGN, p);
445 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
447 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
448 FIXME("(%p)->(%p)\n", This, p);
449 return E_NOTIMPL;
452 static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, VARIANT *p)
454 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
455 TRACE("(%p)->(%p)\n", This, p);
456 return get_current_style_property_var(This, STYLEID_MARGIN_TOP, p);
459 static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
461 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
462 TRACE("(%p)->(%p)\n", This, p);
463 return get_current_style_property_var(This, STYLEID_MARGIN_RIGHT, p);
466 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
468 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
469 TRACE("(%p)->(%p)\n", This, p);
470 return get_current_style_property_var(This, STYLEID_MARGIN_BOTTOM, p);
473 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
475 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
476 TRACE("(%p)->(%p)\n", This, p);
477 return get_current_style_property_var(This, STYLEID_MARGIN_LEFT, p);
480 static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
482 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
483 FIXME("(%p)->(%p)\n", This, p);
484 return E_NOTIMPL;
487 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle *iface, BSTR *p)
489 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
490 FIXME("(%p)->(%p)\n", This, p);
491 return E_NOTIMPL;
494 static HRESULT WINAPI HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle *iface, BSTR *p)
496 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
497 FIXME("(%p)->(%p)\n", This, p);
498 return E_NOTIMPL;
501 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle *iface, BSTR *p)
503 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
504 FIXME("(%p)->(%p)\n", This, p);
505 return E_NOTIMPL;
508 static HRESULT WINAPI HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle *iface, VARIANT *p)
510 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
511 FIXME("(%p)->(%p)\n", This, p);
512 return E_NOTIMPL;
515 static HRESULT WINAPI HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle *iface, VARIANT *p)
517 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
518 FIXME("(%p)->(%p)\n", This, p);
519 return E_NOTIMPL;
522 static HRESULT WINAPI HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle *iface, VARIANT *p)
524 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
525 FIXME("(%p)->(%p)\n", This, p);
526 return E_NOTIMPL;
529 static HRESULT WINAPI HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle *iface, VARIANT *p)
531 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
532 FIXME("(%p)->(%p)\n", This, p);
533 return E_NOTIMPL;
536 static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BSTR *p)
538 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
539 TRACE("(%p)->(%p)\n", This, p);
540 return get_current_style_property(This, STYLEID_OVERFLOW, p);
543 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
545 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
546 FIXME("(%p)->(%p)\n", This, p);
547 return E_NOTIMPL;
550 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *iface, BSTR *p)
552 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
553 FIXME("(%p)->(%p)\n", This, p);
554 return E_NOTIMPL;
557 static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
559 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
560 TRACE("(%p)->(%p)\n", This, p);
561 return get_current_style_property(This, STYLEID_CURSOR, p);
564 static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
566 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
567 FIXME("(%p)->(%p)\n", This, p);
568 return E_NOTIMPL;
571 static HRESULT WINAPI HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle *iface, BSTR *p)
573 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
574 FIXME("(%p)->(%p)\n", This, p);
575 return E_NOTIMPL;
578 static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, BSTR *p)
580 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
581 TRACE("(%p)->(%p)\n", This, p);
582 return get_current_style_property(This, STYLEID_DIRECTION, p);
585 static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
587 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
588 FIXME("(%p)->(%p)\n", This, p);
589 return E_NOTIMPL;
592 static HRESULT WINAPI HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle *iface, BSTR strAttributeName,
593 LONG lFlags, VARIANT *AttributeValue)
595 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
596 FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(strAttributeName), lFlags, AttributeValue);
597 return E_NOTIMPL;
600 static HRESULT WINAPI HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle *iface, BSTR *p)
602 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
603 FIXME("(%p)->(%p)\n", This, p);
604 return E_NOTIMPL;
607 static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIANT *p)
609 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
610 TRACE("(%p)->(%p)\n", This, p);
611 return get_current_style_property_var(This, STYLEID_RIGHT, p);
614 static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
616 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
617 TRACE("(%p)->(%p)\n", This, p);
618 return get_current_style_property_var(This, STYLEID_BOTTOM, p);
621 static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
623 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
624 FIXME("(%p)->(%p)\n", This, p);
625 return E_NOTIMPL;
628 static HRESULT WINAPI HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle *iface, BSTR *p)
630 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
631 FIXME("(%p)->(%p)\n", This, p);
632 return E_NOTIMPL;
635 static HRESULT WINAPI HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle *iface, BSTR *p)
637 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
638 FIXME("(%p)->(%p)\n", This, p);
639 return E_NOTIMPL;
642 static HRESULT WINAPI HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle *iface, BSTR *p)
644 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
645 FIXME("(%p)->(%p)\n", This, p);
646 return E_NOTIMPL;
649 static HRESULT WINAPI HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle *iface, BSTR *p)
651 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
652 FIXME("(%p)->(%p)\n", This, p);
653 return E_NOTIMPL;
656 static HRESULT WINAPI HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle *iface, BSTR *p)
658 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
659 FIXME("(%p)->(%p)\n", This, p);
660 return E_NOTIMPL;
663 static HRESULT WINAPI HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle *iface, BSTR *p)
665 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
666 FIXME("(%p)->(%p)\n", This, p);
667 return E_NOTIMPL;
670 static HRESULT WINAPI HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle *iface, BSTR *p)
672 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
673 FIXME("(%p)->(%p)\n", This, p);
674 return E_NOTIMPL;
677 static HRESULT WINAPI HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle *iface, BSTR *p)
679 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
680 FIXME("(%p)->(%p)\n", This, p);
681 return E_NOTIMPL;
684 static HRESULT WINAPI HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle *iface, VARIANT *p)
686 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
687 FIXME("(%p)->(%p)\n", This, p);
688 return E_NOTIMPL;
691 static HRESULT WINAPI HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle *iface, BSTR *p)
693 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
694 FIXME("(%p)->(%p)\n", This, p);
695 return E_NOTIMPL;
698 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle *iface, VARIANT *p)
700 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
701 FIXME("(%p)->(%p)\n", This, p);
702 return E_NOTIMPL;
705 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle *iface, VARIANT *p)
707 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
708 FIXME("(%p)->(%p)\n", This, p);
709 return E_NOTIMPL;
712 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle *iface, BSTR *p)
714 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
715 FIXME("(%p)->(%p)\n", This, p);
716 return E_NOTIMPL;
719 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle *iface, BSTR *p)
721 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
722 FIXME("(%p)->(%p)\n", This, p);
723 return E_NOTIMPL;
726 static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, BSTR *p)
728 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
729 TRACE("(%p)->(%p)\n", This, p);
730 return get_current_style_property(This, STYLEID_BORDER_STYLE, p);
733 static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
735 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
736 TRACE("(%p)->(%p)\n", This, p);
737 return get_current_style_property(This, STYLEID_BORDER_COLOR, p);
740 static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
742 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
743 TRACE("(%p)->(%p)\n", This, p);
744 return get_current_style_property(This, STYLEID_BORDER_WIDTH, p);
747 static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
749 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
750 TRACE("(%p)->(%p)\n", This, p);
751 return get_current_style_property(This, STYLEID_PADDING, p);
754 static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
756 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
757 TRACE("(%p)->(%p)\n", This, p);
758 return get_current_style_property(This, STYLEID_MARGIN, p);
761 static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
763 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
764 FIXME("(%p)->(%p)\n", This, p);
765 return E_NOTIMPL;
768 static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, BSTR *p)
770 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
771 TRACE("(%p)->(%p)\n", This, p);
772 return get_current_style_property(This, STYLEID_OVERFLOW_X, p);
775 static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
777 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
778 TRACE("(%p)->(%p)\n", This, p);
779 return get_current_style_property(This, STYLEID_OVERFLOW_Y, p);
782 static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
784 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
785 TRACE("(%p)->(%p)\n", This, p);
786 return get_current_style_property(This, STYLEID_TEXT_TRANSFORM, p);
789 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
790 HTMLCurrentStyle_QueryInterface,
791 HTMLCurrentStyle_AddRef,
792 HTMLCurrentStyle_Release,
793 HTMLCurrentStyle_GetTypeInfoCount,
794 HTMLCurrentStyle_GetTypeInfo,
795 HTMLCurrentStyle_GetIDsOfNames,
796 HTMLCurrentStyle_Invoke,
797 HTMLCurrentStyle_get_position,
798 HTMLCurrentStyle_get_styleFloat,
799 HTMLCurrentStyle_get_color,
800 HTMLCurrentStyle_get_backgroundColor,
801 HTMLCurrentStyle_get_fontFamily,
802 HTMLCurrentStyle_get_fontStyle,
803 HTMLCurrentStyle_get_fontVariant,
804 HTMLCurrentStyle_get_fontWeight,
805 HTMLCurrentStyle_get_fontSize,
806 HTMLCurrentStyle_get_backgroundImage,
807 HTMLCurrentStyle_get_backgroundPositionX,
808 HTMLCurrentStyle_get_backgroundPositionY,
809 HTMLCurrentStyle_get_backgroundRepeat,
810 HTMLCurrentStyle_get_borderLeftColor,
811 HTMLCurrentStyle_get_borderTopColor,
812 HTMLCurrentStyle_get_borderRightColor,
813 HTMLCurrentStyle_get_borderBottomColor,
814 HTMLCurrentStyle_get_borderTopStyle,
815 HTMLCurrentStyle_get_borderRightStyle,
816 HTMLCurrentStyle_get_borderBottomStyle,
817 HTMLCurrentStyle_get_borderLeftStyle,
818 HTMLCurrentStyle_get_borderTopWidth,
819 HTMLCurrentStyle_get_borderRightWidth,
820 HTMLCurrentStyle_get_borderBottomWidth,
821 HTMLCurrentStyle_get_borderLeftWidth,
822 HTMLCurrentStyle_get_left,
823 HTMLCurrentStyle_get_top,
824 HTMLCurrentStyle_get_width,
825 HTMLCurrentStyle_get_height,
826 HTMLCurrentStyle_get_paddingLeft,
827 HTMLCurrentStyle_get_paddingTop,
828 HTMLCurrentStyle_get_paddingRight,
829 HTMLCurrentStyle_get_paddingBottom,
830 HTMLCurrentStyle_get_textAlign,
831 HTMLCurrentStyle_get_textDecoration,
832 HTMLCurrentStyle_get_display,
833 HTMLCurrentStyle_get_visibility,
834 HTMLCurrentStyle_get_zIndex,
835 HTMLCurrentStyle_get_letterSpacing,
836 HTMLCurrentStyle_get_lineHeight,
837 HTMLCurrentStyle_get_textIndent,
838 HTMLCurrentStyle_get_verticalAlign,
839 HTMLCurrentStyle_get_backgroundAttachment,
840 HTMLCurrentStyle_get_marginTop,
841 HTMLCurrentStyle_get_marginRight,
842 HTMLCurrentStyle_get_marginBottom,
843 HTMLCurrentStyle_get_marginLeft,
844 HTMLCurrentStyle_get_clear,
845 HTMLCurrentStyle_get_listStyleType,
846 HTMLCurrentStyle_get_listStylePosition,
847 HTMLCurrentStyle_get_listStyleImage,
848 HTMLCurrentStyle_get_clipTop,
849 HTMLCurrentStyle_get_clipRight,
850 HTMLCurrentStyle_get_clipBottom,
851 HTMLCurrentStyle_get_clipLeft,
852 HTMLCurrentStyle_get_overflow,
853 HTMLCurrentStyle_get_pageBreakBefore,
854 HTMLCurrentStyle_get_pageBreakAfter,
855 HTMLCurrentStyle_get_cursor,
856 HTMLCurrentStyle_get_tableLayout,
857 HTMLCurrentStyle_get_borderCollapse,
858 HTMLCurrentStyle_get_direction,
859 HTMLCurrentStyle_get_behavior,
860 HTMLCurrentStyle_getAttribute,
861 HTMLCurrentStyle_get_unicodeBidi,
862 HTMLCurrentStyle_get_right,
863 HTMLCurrentStyle_get_bottom,
864 HTMLCurrentStyle_get_imeMode,
865 HTMLCurrentStyle_get_rubyAlign,
866 HTMLCurrentStyle_get_rubyPosition,
867 HTMLCurrentStyle_get_rubyOverhang,
868 HTMLCurrentStyle_get_textAutospace,
869 HTMLCurrentStyle_get_lineBreak,
870 HTMLCurrentStyle_get_wordBreak,
871 HTMLCurrentStyle_get_textJustify,
872 HTMLCurrentStyle_get_textJustifyTrim,
873 HTMLCurrentStyle_get_textKashida,
874 HTMLCurrentStyle_get_blockDirection,
875 HTMLCurrentStyle_get_layoutGridChar,
876 HTMLCurrentStyle_get_layoutGridLine,
877 HTMLCurrentStyle_get_layoutGridMode,
878 HTMLCurrentStyle_get_layoutGridType,
879 HTMLCurrentStyle_get_borderStyle,
880 HTMLCurrentStyle_get_borderColor,
881 HTMLCurrentStyle_get_borderWidth,
882 HTMLCurrentStyle_get_padding,
883 HTMLCurrentStyle_get_margin,
884 HTMLCurrentStyle_get_accelerator,
885 HTMLCurrentStyle_get_overflowX,
886 HTMLCurrentStyle_get_overflowY,
887 HTMLCurrentStyle_get_textTransform
890 /* IHTMLCurrentStyle2 */
891 static HRESULT WINAPI HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2 *iface, REFIID riid, void **ppv)
893 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
895 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
898 static ULONG WINAPI HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2 *iface)
900 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
902 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
905 static ULONG WINAPI HTMLCurrentStyle2_Release(IHTMLCurrentStyle2 *iface)
907 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
908 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
911 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2 *iface, UINT *pctinfo)
913 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
914 return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo);
917 static HRESULT WINAPI HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2 *iface, UINT iTInfo,
918 LCID lcid, ITypeInfo **ppTInfo)
920 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
921 return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
924 static HRESULT WINAPI HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2 *iface, REFIID riid,
925 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
927 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
928 return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
929 lcid, rgDispId);
932 static HRESULT WINAPI HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2 *iface, DISPID dispIdMember,
933 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
934 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
936 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
937 return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
938 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
941 static HRESULT WINAPI HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2 *iface, BSTR *p)
943 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
944 FIXME("(%p)->(%p)\n", This, p);
945 return E_NOTIMPL;
948 static HRESULT WINAPI HTMLCurrentStyle2_get_wordWrap(IHTMLCurrentStyle2 *iface, BSTR *p)
950 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
951 FIXME("(%p)->(%p)\n", This, p);
952 return E_NOTIMPL;
955 static HRESULT WINAPI HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentStyle2 *iface, BSTR *p)
957 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
958 FIXME("(%p)->(%p)\n", This, p);
959 return E_NOTIMPL;
962 static HRESULT WINAPI HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
964 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
966 FIXME("(%p)->(%p) returning true\n", This, p);
968 *p = VARIANT_TRUE;
969 return S_OK;
972 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
974 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
975 FIXME("(%p)->(%p)\n", This, p);
976 return E_NOTIMPL;
979 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarFaceColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
981 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
982 FIXME("(%p)->(%p)\n", This, p);
983 return E_NOTIMPL;
986 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbar3dLightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
988 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
989 FIXME("(%p)->(%p)\n", This, p);
990 return E_NOTIMPL;
993 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
995 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
996 FIXME("(%p)->(%p)\n", This, p);
997 return E_NOTIMPL;
1000 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarHighlightColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1002 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1003 FIXME("(%p)->(%p)\n", This, p);
1004 return E_NOTIMPL;
1007 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarDarkShadowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1009 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1010 FIXME("(%p)->(%p)\n", This, p);
1011 return E_NOTIMPL;
1014 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarArrowColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1016 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1017 FIXME("(%p)->(%p)\n", This, p);
1018 return E_NOTIMPL;
1021 static HRESULT WINAPI HTMLCurrentStyle2_get_scrollbarTrackColor(IHTMLCurrentStyle2 *iface, VARIANT *p)
1023 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1024 FIXME("(%p)->(%p)\n", This, p);
1025 return E_NOTIMPL;
1028 static HRESULT WINAPI HTMLCurrentStyle2_get_writingMode(IHTMLCurrentStyle2 *iface, BSTR *p)
1030 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1031 FIXME("(%p)->(%p)\n", This, p);
1032 return E_NOTIMPL;
1035 static HRESULT WINAPI HTMLCurrentStyle2_get_zoom(IHTMLCurrentStyle2 *iface, VARIANT *p)
1037 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1038 FIXME("(%p)->(%p)\n", This, p);
1039 return E_NOTIMPL;
1042 static HRESULT WINAPI HTMLCurrentStyle2_get_filter(IHTMLCurrentStyle2 *iface, BSTR *p)
1044 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1046 TRACE("(%p)->(%p)\n", This, p);
1048 if(This->elem->filter) {
1049 *p = SysAllocString(This->elem->filter);
1050 if(!*p)
1051 return E_OUTOFMEMORY;
1052 }else {
1053 *p = NULL;
1056 return S_OK;
1059 static HRESULT WINAPI HTMLCurrentStyle2_get_textAlignLast(IHTMLCurrentStyle2 *iface, BSTR *p)
1061 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1062 FIXME("(%p)->(%p)\n", This, p);
1063 return E_NOTIMPL;
1066 static HRESULT WINAPI HTMLCurrentStyle2_get_textKashidaSpace(IHTMLCurrentStyle2 *iface, VARIANT *p)
1068 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1069 FIXME("(%p)->(%p)\n", This, p);
1070 return E_NOTIMPL;
1073 static HRESULT WINAPI HTMLCurrentStyle2_get_isBlock(IHTMLCurrentStyle2 *iface, VARIANT_BOOL *p)
1075 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle2(iface);
1076 FIXME("(%p)->(%p)\n", This, p);
1077 return E_NOTIMPL;
1080 static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl = {
1081 HTMLCurrentStyle2_QueryInterface,
1082 HTMLCurrentStyle2_AddRef,
1083 HTMLCurrentStyle2_Release,
1084 HTMLCurrentStyle2_GetTypeInfoCount,
1085 HTMLCurrentStyle2_GetTypeInfo,
1086 HTMLCurrentStyle2_GetIDsOfNames,
1087 HTMLCurrentStyle2_Invoke,
1088 HTMLCurrentStyle2_get_layoutFlow,
1089 HTMLCurrentStyle2_get_wordWrap,
1090 HTMLCurrentStyle2_get_textUnderlinePosition,
1091 HTMLCurrentStyle2_get_hasLayout,
1092 HTMLCurrentStyle2_get_scrollbarBaseColor,
1093 HTMLCurrentStyle2_get_scrollbarFaceColor,
1094 HTMLCurrentStyle2_get_scrollbar3dLightColor,
1095 HTMLCurrentStyle2_get_scrollbarShadowColor,
1096 HTMLCurrentStyle2_get_scrollbarHighlightColor,
1097 HTMLCurrentStyle2_get_scrollbarDarkShadowColor,
1098 HTMLCurrentStyle2_get_scrollbarArrowColor,
1099 HTMLCurrentStyle2_get_scrollbarTrackColor,
1100 HTMLCurrentStyle2_get_writingMode,
1101 HTMLCurrentStyle2_get_zoom,
1102 HTMLCurrentStyle2_get_filter,
1103 HTMLCurrentStyle2_get_textAlignLast,
1104 HTMLCurrentStyle2_get_textKashidaSpace,
1105 HTMLCurrentStyle2_get_isBlock
1108 /* IHTMLCurrentStyle3 */
1109 static HRESULT WINAPI HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3 *iface, REFIID riid, void **ppv)
1111 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1113 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1116 static ULONG WINAPI HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3 *iface)
1118 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1120 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1123 static ULONG WINAPI HTMLCurrentStyle3_Release(IHTMLCurrentStyle3 *iface)
1125 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1126 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1129 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3 *iface, UINT *pctinfo)
1131 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1132 return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo);
1135 static HRESULT WINAPI HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3 *iface, UINT iTInfo,
1136 LCID lcid, ITypeInfo **ppTInfo)
1138 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1139 return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1142 static HRESULT WINAPI HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3 *iface, REFIID riid,
1143 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1145 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1146 return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1147 lcid, rgDispId);
1150 static HRESULT WINAPI HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3 *iface, DISPID dispIdMember,
1151 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1152 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1154 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1155 return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1156 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1159 static HRESULT WINAPI HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3 *iface, BSTR *p)
1161 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1162 FIXME("(%p)->(%p)\n", This, p);
1163 return E_NOTIMPL;
1166 static HRESULT WINAPI HTMLCurrentStyle3_get_minHeight(IHTMLCurrentStyle3 *iface, VARIANT *p)
1168 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1169 FIXME("(%p)->(%p)\n", This, p);
1170 return E_NOTIMPL;
1173 static HRESULT WINAPI HTMLCurrentStyle3_get_wordSpacing(IHTMLCurrentStyle3 *iface, VARIANT *p)
1175 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1176 FIXME("(%p)->(%p)\n", This, p);
1177 return E_NOTIMPL;
1180 static HRESULT WINAPI HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3 *iface, BSTR *p)
1182 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle3(iface);
1184 TRACE("(%p)->(%p)\n", This, p);
1186 return get_current_style_property(This, STYLEID_WHITE_SPACE, p);
1189 static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl = {
1190 HTMLCurrentStyle3_QueryInterface,
1191 HTMLCurrentStyle3_AddRef,
1192 HTMLCurrentStyle3_Release,
1193 HTMLCurrentStyle3_GetTypeInfoCount,
1194 HTMLCurrentStyle3_GetTypeInfo,
1195 HTMLCurrentStyle3_GetIDsOfNames,
1196 HTMLCurrentStyle3_Invoke,
1197 HTMLCurrentStyle3_get_textOverflow,
1198 HTMLCurrentStyle3_get_minHeight,
1199 HTMLCurrentStyle3_get_wordSpacing,
1200 HTMLCurrentStyle3_get_whiteSpace
1203 /* IHTMLCurrentStyle4 */
1204 static HRESULT WINAPI HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4 *iface, REFIID riid, void **ppv)
1206 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1208 return IHTMLCurrentStyle_QueryInterface(&This->IHTMLCurrentStyle_iface, riid, ppv);
1211 static ULONG WINAPI HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4 *iface)
1213 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1215 return IHTMLCurrentStyle_AddRef(&This->IHTMLCurrentStyle_iface);
1218 static ULONG WINAPI HTMLCurrentStyle4_Release(IHTMLCurrentStyle4 *iface)
1220 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1221 return IHTMLCurrentStyle_Release(&This->IHTMLCurrentStyle_iface);
1224 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4 *iface, UINT *pctinfo)
1226 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1227 return IDispatchEx_GetTypeInfoCount(&This->css_style.dispex.IDispatchEx_iface, pctinfo);
1230 static HRESULT WINAPI HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4 *iface, UINT iTInfo,
1231 LCID lcid, ITypeInfo **ppTInfo)
1233 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1234 return IDispatchEx_GetTypeInfo(&This->css_style.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1237 static HRESULT WINAPI HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4 *iface, REFIID riid,
1238 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1240 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1241 return IDispatchEx_GetIDsOfNames(&This->css_style.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
1242 lcid, rgDispId);
1245 static HRESULT WINAPI HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4 *iface, DISPID dispIdMember,
1246 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1247 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1249 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1250 return IDispatchEx_Invoke(&This->css_style.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
1251 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1254 static HRESULT WINAPI HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4 *iface, BSTR *p)
1256 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1257 FIXME("(%p)->(%p)\n", This, p);
1258 return E_NOTIMPL;
1261 static HRESULT WINAPI HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4 *iface, VARIANT *p)
1263 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1264 FIXME("(%p)->(%p)\n", This, p);
1265 return E_NOTIMPL;
1268 static HRESULT WINAPI HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1270 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1271 TRACE("(%p)->(%p)\n", This, p);
1272 return get_current_style_property_var(This, STYLEID_MIN_WIDTH, p);
1275 static HRESULT WINAPI HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)
1277 HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
1278 FIXME("(%p)->(%p)\n", This, p);
1279 return E_NOTIMPL;
1282 static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl = {
1283 HTMLCurrentStyle4_QueryInterface,
1284 HTMLCurrentStyle4_AddRef,
1285 HTMLCurrentStyle4_Release,
1286 HTMLCurrentStyle4_GetTypeInfoCount,
1287 HTMLCurrentStyle4_GetTypeInfo,
1288 HTMLCurrentStyle4_GetIDsOfNames,
1289 HTMLCurrentStyle4_Invoke,
1290 HTMLCurrentStyle4_msInterpolationMode,
1291 HTMLCurrentStyle4_get_maxHeight,
1292 HTMLCurrentStyle4_get_minWidth,
1293 HTMLCurrentStyle4_get_maxWidth
1296 static const tid_t HTMLCurrentStyle_iface_tids[] = {
1297 IHTMLCurrentStyle_tid,
1298 IHTMLCurrentStyle2_tid,
1299 IHTMLCurrentStyle3_tid,
1300 IHTMLCurrentStyle4_tid,
1303 static dispex_static_data_t HTMLCurrentStyle_dispex = {
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: %08x\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: %08x\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;