2 * Copyright 2008 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #include "mshtml_private.h"
29 #include "htmlstyle.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
35 struct HTMLCurrentStyle
{
37 IHTMLCurrentStyle IHTMLCurrentStyle_iface
;
38 IHTMLCurrentStyle2 IHTMLCurrentStyle2_iface
;
39 IHTMLCurrentStyle3 IHTMLCurrentStyle3_iface
;
40 IHTMLCurrentStyle4 IHTMLCurrentStyle4_iface
;
44 nsIDOMCSSStyleDeclaration
*nsstyle
;
48 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle
*iface
)
50 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle_iface
);
53 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle2(IHTMLCurrentStyle2
*iface
)
55 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle2_iface
);
58 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle3(IHTMLCurrentStyle3
*iface
)
60 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle3_iface
);
63 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle4(IHTMLCurrentStyle4
*iface
)
65 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle4_iface
);
68 static HRESULT WINAPI
HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle
*iface
, REFIID riid
, void **ppv
)
70 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
72 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
74 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
75 *ppv
= &This
->IHTMLCurrentStyle_iface
;
76 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle
, riid
)) {
77 *ppv
= &This
->IHTMLCurrentStyle_iface
;
78 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle2
, riid
)) {
79 *ppv
= &This
->IHTMLCurrentStyle2_iface
;
80 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle3
, riid
)) {
81 *ppv
= &This
->IHTMLCurrentStyle3_iface
;
82 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle4
, riid
)) {
83 *ppv
= &This
->IHTMLCurrentStyle4_iface
;
84 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
85 return *ppv
? S_OK
: E_NOINTERFACE
;
88 WARN("unsupported %s\n", debugstr_mshtml_guid(riid
));
92 IUnknown_AddRef((IUnknown
*)*ppv
);
96 static ULONG WINAPI
HTMLCurrentStyle_AddRef(IHTMLCurrentStyle
*iface
)
98 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
99 LONG ref
= InterlockedIncrement(&This
->ref
);
101 TRACE("(%p) ref=%d\n", This
, ref
);
106 static ULONG WINAPI
HTMLCurrentStyle_Release(IHTMLCurrentStyle
*iface
)
108 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
109 LONG ref
= InterlockedDecrement(&This
->ref
);
111 TRACE("(%p) ref=%d\n", This
, ref
);
115 nsIDOMCSSStyleDeclaration_Release(This
->nsstyle
);
116 IHTMLElement_Release(&This
->elem
->IHTMLElement_iface
);
117 release_dispex(&This
->dispex
);
124 static HRESULT WINAPI
HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle
*iface
, UINT
*pctinfo
)
126 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
127 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
130 static HRESULT WINAPI
HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle
*iface
, UINT iTInfo
,
131 LCID lcid
, ITypeInfo
**ppTInfo
)
133 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
134 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
137 static HRESULT WINAPI
HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle
*iface
, REFIID riid
,
138 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
140 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
141 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
145 static HRESULT WINAPI
HTMLCurrentStyle_Invoke(IHTMLCurrentStyle
*iface
, DISPID dispIdMember
,
146 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
147 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
149 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
150 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
151 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
154 static HRESULT WINAPI
HTMLCurrentStyle_get_position(IHTMLCurrentStyle
*iface
, BSTR
*p
)
156 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
158 TRACE("(%p)->(%p)\n", This
, p
);
160 return get_nsstyle_attr(This
->nsstyle
, STYLEID_POSITION
, p
, 0);
163 static HRESULT WINAPI
HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle
*iface
, BSTR
*p
)
165 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
166 FIXME("(%p)->(%p)\n", This
, p
);
170 static HRESULT WINAPI
HTMLCurrentStyle_get_color(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
172 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
173 TRACE("(%p)->(%p)\n", This
, p
);
174 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_COLOR
, p
, 0);
177 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
179 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
180 TRACE("(%p)->(%p)\n", This
, p
);
181 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BACKGROUND_COLOR
, p
, 0);
184 static HRESULT WINAPI
HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle
*iface
, BSTR
*p
)
186 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
188 TRACE("(%p)->(%p)\n", This
, p
);
190 return get_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_FAMILY
, p
, 0);
193 static HRESULT WINAPI
HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
195 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
196 TRACE("(%p)->(%p)\n", This
, p
);
197 return get_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_STYLE
, p
, 0);
200 static HRESULT WINAPI
HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle
*iface
, BSTR
*p
)
202 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
203 TRACE("(%p)->(%p)\n", This
, p
);
204 return get_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_VARIANT
, p
, 0);
207 static HRESULT WINAPI
HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
209 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
210 TRACE("(%p)->(%p)\n", This
, p
);
211 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_FONT_WEIGHT
, p
, ATTR_STR_TO_INT
);
214 static HRESULT WINAPI
HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
216 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
217 TRACE("(%p)->(%p)\n", This
, p
);
218 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_FONT_SIZE
, p
, 0);
221 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle
*iface
, BSTR
*p
)
223 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
224 TRACE("(%p)->(%p)\n", This
, p
);
225 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BACKGROUND_IMAGE
, p
, 0);
228 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
230 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
231 FIXME("(%p)->(%p)\n", This
, p
);
235 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
237 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
238 FIXME("(%p)->(%p)\n", This
, p
);
242 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle
*iface
, BSTR
*p
)
244 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
245 TRACE("(%p)->(%p)\n", This
, p
);
246 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BACKGROUND_REPEAT
, p
, 0);
249 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
251 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
252 TRACE("(%p)->(%p)\n", This
, p
);
253 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_LEFT_COLOR
, p
, 0);
256 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
258 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
259 TRACE("(%p)->(%p)\n", This
, p
);
260 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_COLOR
, p
, 0);
263 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
265 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
266 TRACE("(%p)->(%p)\n", This
, p
);
267 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_COLOR
, p
, 0);
270 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
272 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
273 TRACE("(%p)->(%p)\n", This
, p
);
274 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_COLOR
, p
, 0);
277 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
279 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
280 TRACE("(%p)->(%p)\n", This
, p
);
281 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_TOP_STYLE
, p
, 0);
284 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
286 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
287 TRACE("(%p)->(%p)\n", This
, p
);
288 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_RIGHT_STYLE
, p
, 0);
291 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
293 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
294 TRACE("(%p)->(%p)\n", This
, p
);
295 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_BOTTOM_STYLE
, p
, 0);
298 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
300 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
301 TRACE("(%p)->(%p)\n", This
, p
);
302 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_LEFT_STYLE
, p
, 0);
305 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
307 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
308 TRACE("(%p)->(%p)\n", This
, p
);
309 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_WIDTH
, p
, 0);
312 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
314 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
315 TRACE("(%p)->(%p)\n", This
, p
);
316 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_WIDTH
, p
, 0);
319 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
321 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
322 TRACE("(%p)->(%p)\n", This
, p
);
323 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_WIDTH
, p
, 0);
326 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
328 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
329 TRACE("(%p)->(%p)\n", This
, p
);
330 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_LEFT_WIDTH
, p
, 0);
333 static HRESULT WINAPI
HTMLCurrentStyle_get_left(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
335 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
336 TRACE("(%p)->(%p)\n", This
, p
);
337 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LEFT
, p
, 0);
340 static HRESULT WINAPI
HTMLCurrentStyle_get_top(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
342 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
343 TRACE("(%p)->(%p)\n", This
, p
);
344 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_TOP
, p
, 0);
347 static HRESULT WINAPI
HTMLCurrentStyle_get_width(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
349 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
350 TRACE("(%p)->(%p)\n", This
, p
);
351 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_WIDTH
, p
, 0);
354 static HRESULT WINAPI
HTMLCurrentStyle_get_height(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
356 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
357 TRACE("(%p)->(%p)\n", This
, p
);
358 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_HEIGHT
, p
, 0);
361 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
363 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
364 TRACE("(%p)->(%p)\n", This
, p
);
365 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_LEFT
, p
, 0);
368 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
370 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
371 TRACE("(%p)->(%p)\n", This
, p
);
372 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_TOP
, p
, 0);
375 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
377 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
378 TRACE("(%p)->(%p)\n", This
, p
);
379 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_RIGHT
, p
, 0);
382 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
384 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
385 TRACE("(%p)->(%p)\n", This
, p
);
386 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_BOTTOM
, p
, 0);
389 static HRESULT WINAPI
HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle
*iface
, BSTR
*p
)
391 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
392 TRACE("(%p)->(%p)\n", This
, p
);
393 return get_nsstyle_attr(This
->nsstyle
, STYLEID_TEXT_ALIGN
, p
, 0);
396 static HRESULT WINAPI
HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle
*iface
, BSTR
*p
)
398 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
399 TRACE("(%p)->(%p)\n", This
, p
);
400 return get_nsstyle_attr(This
->nsstyle
, STYLEID_TEXT_DECORATION
, p
, 0);
403 static HRESULT WINAPI
HTMLCurrentStyle_get_display(IHTMLCurrentStyle
*iface
, BSTR
*p
)
405 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
407 TRACE("(%p)->(%p)\n", This
, p
);
409 return get_nsstyle_attr(This
->nsstyle
, STYLEID_DISPLAY
, p
, 0);
412 static HRESULT WINAPI
HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle
*iface
, BSTR
*p
)
414 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
416 TRACE("(%p)->(%p)\n", This
, p
);
418 return get_nsstyle_attr(This
->nsstyle
, STYLEID_VISIBILITY
, p
, 0);
421 static HRESULT WINAPI
HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
423 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
424 TRACE("(%p)->(%p)\n", This
, p
);
425 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_Z_INDEX
, p
, ATTR_STR_TO_INT
);
428 static HRESULT WINAPI
HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
430 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
431 TRACE("(%p)->(%p)\n", This
, p
);
432 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LETTER_SPACING
, p
, 0);
435 static HRESULT WINAPI
HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
437 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
438 TRACE("(%p)->(%p)\n", This
, p
);
439 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LINE_HEIGHT
, p
, 0);
442 static HRESULT WINAPI
HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
444 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
445 TRACE("(%p)->(%p)\n", This
, p
);
446 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_TEXT_INDENT
, p
, 0);
449 static HRESULT WINAPI
HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
451 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
452 TRACE("(%p)->(%p)\n", This
, p
);
453 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_VERTICAL_ALIGN
, p
, 0);
456 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle
*iface
, BSTR
*p
)
458 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
459 FIXME("(%p)->(%p)\n", This
, p
);
463 static HRESULT WINAPI
HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
465 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
466 TRACE("(%p)->(%p)\n", This
, p
);
467 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_TOP
, p
, 0);
470 static HRESULT WINAPI
HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
472 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
473 TRACE("(%p)->(%p)\n", This
, p
);
474 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_RIGHT
, p
, 0);
477 static HRESULT WINAPI
HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
479 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
480 TRACE("(%p)->(%p)\n", This
, p
);
481 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_BOTTOM
, p
, 0);
484 static HRESULT WINAPI
HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
486 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
487 TRACE("(%p)->(%p)\n", This
, p
);
488 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_LEFT
, p
, 0);
491 static HRESULT WINAPI
HTMLCurrentStyle_get_clear(IHTMLCurrentStyle
*iface
, BSTR
*p
)
493 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
494 FIXME("(%p)->(%p)\n", This
, p
);
498 static HRESULT WINAPI
HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle
*iface
, BSTR
*p
)
500 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
501 FIXME("(%p)->(%p)\n", This
, p
);
505 static HRESULT WINAPI
HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle
*iface
, BSTR
*p
)
507 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
508 FIXME("(%p)->(%p)\n", This
, p
);
512 static HRESULT WINAPI
HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle
*iface
, BSTR
*p
)
514 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
515 FIXME("(%p)->(%p)\n", This
, p
);
519 static HRESULT WINAPI
HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
521 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
522 FIXME("(%p)->(%p)\n", This
, p
);
526 static HRESULT WINAPI
HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
528 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
529 FIXME("(%p)->(%p)\n", This
, p
);
533 static HRESULT WINAPI
HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
535 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
536 FIXME("(%p)->(%p)\n", This
, p
);
540 static HRESULT WINAPI
HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
542 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
543 FIXME("(%p)->(%p)\n", This
, p
);
547 static HRESULT WINAPI
HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle
*iface
, BSTR
*p
)
549 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
550 TRACE("(%p)->(%p)\n", This
, p
);
551 return get_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW
, p
, 0);
554 static HRESULT WINAPI
HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle
*iface
, BSTR
*p
)
556 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
557 FIXME("(%p)->(%p)\n", This
, p
);
561 static HRESULT WINAPI
HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle
*iface
, BSTR
*p
)
563 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
564 FIXME("(%p)->(%p)\n", This
, p
);
568 static HRESULT WINAPI
HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle
*iface
, BSTR
*p
)
570 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
571 TRACE("(%p)->(%p)\n", This
, p
);
572 return get_nsstyle_attr(This
->nsstyle
, STYLEID_CURSOR
, p
, 0);
575 static HRESULT WINAPI
HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle
*iface
, BSTR
*p
)
577 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
578 FIXME("(%p)->(%p)\n", This
, p
);
582 static HRESULT WINAPI
HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle
*iface
, BSTR
*p
)
584 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
585 FIXME("(%p)->(%p)\n", This
, p
);
589 static HRESULT WINAPI
HTMLCurrentStyle_get_direction(IHTMLCurrentStyle
*iface
, BSTR
*p
)
591 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
592 FIXME("(%p)->(%p)\n", This
, p
);
596 static HRESULT WINAPI
HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle
*iface
, BSTR
*p
)
598 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
599 FIXME("(%p)->(%p)\n", This
, p
);
603 static HRESULT WINAPI
HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle
*iface
, BSTR strAttributeName
,
604 LONG lFlags
, VARIANT
*AttributeValue
)
606 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
607 FIXME("(%p)->(%s %x %p)\n", This
, debugstr_w(strAttributeName
), lFlags
, AttributeValue
);
611 static HRESULT WINAPI
HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle
*iface
, BSTR
*p
)
613 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
614 FIXME("(%p)->(%p)\n", This
, p
);
618 static HRESULT WINAPI
HTMLCurrentStyle_get_right(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
620 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
621 TRACE("(%p)->(%p)\n", This
, p
);
622 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_RIGHT
, p
, 0);
625 static HRESULT WINAPI
HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
627 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
628 TRACE("(%p)->(%p)\n", This
, p
);
629 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BOTTOM
, p
, 0);
632 static HRESULT WINAPI
HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle
*iface
, BSTR
*p
)
634 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
635 FIXME("(%p)->(%p)\n", This
, p
);
639 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle
*iface
, BSTR
*p
)
641 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
642 FIXME("(%p)->(%p)\n", This
, p
);
646 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle
*iface
, BSTR
*p
)
648 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
649 FIXME("(%p)->(%p)\n", This
, p
);
653 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle
*iface
, BSTR
*p
)
655 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
656 FIXME("(%p)->(%p)\n", This
, p
);
660 static HRESULT WINAPI
HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle
*iface
, BSTR
*p
)
662 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
663 FIXME("(%p)->(%p)\n", This
, p
);
667 static HRESULT WINAPI
HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle
*iface
, BSTR
*p
)
669 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
670 FIXME("(%p)->(%p)\n", This
, p
);
674 static HRESULT WINAPI
HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle
*iface
, BSTR
*p
)
676 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
677 FIXME("(%p)->(%p)\n", This
, p
);
681 static HRESULT WINAPI
HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle
*iface
, BSTR
*p
)
683 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
684 FIXME("(%p)->(%p)\n", This
, p
);
688 static HRESULT WINAPI
HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle
*iface
, BSTR
*p
)
690 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
691 FIXME("(%p)->(%p)\n", This
, p
);
695 static HRESULT WINAPI
HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
697 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
698 FIXME("(%p)->(%p)\n", This
, p
);
702 static HRESULT WINAPI
HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle
*iface
, BSTR
*p
)
704 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
705 FIXME("(%p)->(%p)\n", This
, p
);
709 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
711 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
712 FIXME("(%p)->(%p)\n", This
, p
);
716 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
718 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
719 FIXME("(%p)->(%p)\n", This
, p
);
723 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle
*iface
, BSTR
*p
)
725 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
726 FIXME("(%p)->(%p)\n", This
, p
);
730 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle
*iface
, BSTR
*p
)
732 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
733 FIXME("(%p)->(%p)\n", This
, p
);
737 static HRESULT WINAPI
HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
739 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
740 TRACE("(%p)->(%p)\n", This
, p
);
741 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_STYLE
, p
, 0);
744 static HRESULT WINAPI
HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle
*iface
, BSTR
*p
)
746 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
747 TRACE("(%p)->(%p)\n", This
, p
);
748 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_COLOR
, p
, 0);
751 static HRESULT WINAPI
HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle
*iface
, BSTR
*p
)
753 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
754 TRACE("(%p)->(%p)\n", This
, p
);
755 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_WIDTH
, p
, 0);
758 static HRESULT WINAPI
HTMLCurrentStyle_get_padding(IHTMLCurrentStyle
*iface
, BSTR
*p
)
760 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
761 TRACE("(%p)->(%p)\n", This
, p
);
762 return get_nsstyle_attr(This
->nsstyle
, STYLEID_PADDING
, p
, 0);
765 static HRESULT WINAPI
HTMLCurrentStyle_get_margin(IHTMLCurrentStyle
*iface
, BSTR
*p
)
767 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
768 TRACE("(%p)->(%p)\n", This
, p
);
769 return get_nsstyle_attr(This
->nsstyle
, STYLEID_MARGIN
, p
, 0);
772 static HRESULT WINAPI
HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle
*iface
, BSTR
*p
)
774 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
775 FIXME("(%p)->(%p)\n", This
, p
);
779 static HRESULT WINAPI
HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle
*iface
, BSTR
*p
)
781 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
782 FIXME("(%p)->(%p)\n", This
, p
);
786 static HRESULT WINAPI
HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle
*iface
, BSTR
*p
)
788 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
789 FIXME("(%p)->(%p)\n", This
, p
);
793 static HRESULT WINAPI
HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle
*iface
, BSTR
*p
)
795 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
796 FIXME("(%p)->(%p)\n", This
, p
);
800 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl
= {
801 HTMLCurrentStyle_QueryInterface
,
802 HTMLCurrentStyle_AddRef
,
803 HTMLCurrentStyle_Release
,
804 HTMLCurrentStyle_GetTypeInfoCount
,
805 HTMLCurrentStyle_GetTypeInfo
,
806 HTMLCurrentStyle_GetIDsOfNames
,
807 HTMLCurrentStyle_Invoke
,
808 HTMLCurrentStyle_get_position
,
809 HTMLCurrentStyle_get_styleFloat
,
810 HTMLCurrentStyle_get_color
,
811 HTMLCurrentStyle_get_backgroundColor
,
812 HTMLCurrentStyle_get_fontFamily
,
813 HTMLCurrentStyle_get_fontStyle
,
814 HTMLCurrentStyle_get_fontVariant
,
815 HTMLCurrentStyle_get_fontWeight
,
816 HTMLCurrentStyle_get_fontSize
,
817 HTMLCurrentStyle_get_backgroundImage
,
818 HTMLCurrentStyle_get_backgroundPositionX
,
819 HTMLCurrentStyle_get_backgroundPositionY
,
820 HTMLCurrentStyle_get_backgroundRepeat
,
821 HTMLCurrentStyle_get_borderLeftColor
,
822 HTMLCurrentStyle_get_borderTopColor
,
823 HTMLCurrentStyle_get_borderRightColor
,
824 HTMLCurrentStyle_get_borderBottomColor
,
825 HTMLCurrentStyle_get_borderTopStyle
,
826 HTMLCurrentStyle_get_borderRightStyle
,
827 HTMLCurrentStyle_get_borderBottomStyle
,
828 HTMLCurrentStyle_get_borderLeftStyle
,
829 HTMLCurrentStyle_get_borderTopWidth
,
830 HTMLCurrentStyle_get_borderRightWidth
,
831 HTMLCurrentStyle_get_borderBottomWidth
,
832 HTMLCurrentStyle_get_borderLeftWidth
,
833 HTMLCurrentStyle_get_left
,
834 HTMLCurrentStyle_get_top
,
835 HTMLCurrentStyle_get_width
,
836 HTMLCurrentStyle_get_height
,
837 HTMLCurrentStyle_get_paddingLeft
,
838 HTMLCurrentStyle_get_paddingTop
,
839 HTMLCurrentStyle_get_paddingRight
,
840 HTMLCurrentStyle_get_paddingBottom
,
841 HTMLCurrentStyle_get_textAlign
,
842 HTMLCurrentStyle_get_textDecoration
,
843 HTMLCurrentStyle_get_display
,
844 HTMLCurrentStyle_get_visibility
,
845 HTMLCurrentStyle_get_zIndex
,
846 HTMLCurrentStyle_get_letterSpacing
,
847 HTMLCurrentStyle_get_lineHeight
,
848 HTMLCurrentStyle_get_textIndent
,
849 HTMLCurrentStyle_get_verticalAlign
,
850 HTMLCurrentStyle_get_backgroundAttachment
,
851 HTMLCurrentStyle_get_marginTop
,
852 HTMLCurrentStyle_get_marginRight
,
853 HTMLCurrentStyle_get_marginBottom
,
854 HTMLCurrentStyle_get_marginLeft
,
855 HTMLCurrentStyle_get_clear
,
856 HTMLCurrentStyle_get_listStyleType
,
857 HTMLCurrentStyle_get_listStylePosition
,
858 HTMLCurrentStyle_get_listStyleImage
,
859 HTMLCurrentStyle_get_clipTop
,
860 HTMLCurrentStyle_get_clipRight
,
861 HTMLCurrentStyle_get_clipBottom
,
862 HTMLCurrentStyle_get_clipLeft
,
863 HTMLCurrentStyle_get_overflow
,
864 HTMLCurrentStyle_get_pageBreakBefore
,
865 HTMLCurrentStyle_get_pageBreakAfter
,
866 HTMLCurrentStyle_get_cursor
,
867 HTMLCurrentStyle_get_tableLayout
,
868 HTMLCurrentStyle_get_borderCollapse
,
869 HTMLCurrentStyle_get_direction
,
870 HTMLCurrentStyle_get_behavior
,
871 HTMLCurrentStyle_getAttribute
,
872 HTMLCurrentStyle_get_unicodeBidi
,
873 HTMLCurrentStyle_get_right
,
874 HTMLCurrentStyle_get_bottom
,
875 HTMLCurrentStyle_get_imeMode
,
876 HTMLCurrentStyle_get_rubyAlign
,
877 HTMLCurrentStyle_get_rubyPosition
,
878 HTMLCurrentStyle_get_rubyOverhang
,
879 HTMLCurrentStyle_get_textAutospace
,
880 HTMLCurrentStyle_get_lineBreak
,
881 HTMLCurrentStyle_get_wordBreak
,
882 HTMLCurrentStyle_get_textJustify
,
883 HTMLCurrentStyle_get_textJustifyTrim
,
884 HTMLCurrentStyle_get_textKashida
,
885 HTMLCurrentStyle_get_blockDirection
,
886 HTMLCurrentStyle_get_layoutGridChar
,
887 HTMLCurrentStyle_get_layoutGridLine
,
888 HTMLCurrentStyle_get_layoutGridMode
,
889 HTMLCurrentStyle_get_layoutGridType
,
890 HTMLCurrentStyle_get_borderStyle
,
891 HTMLCurrentStyle_get_borderColor
,
892 HTMLCurrentStyle_get_borderWidth
,
893 HTMLCurrentStyle_get_padding
,
894 HTMLCurrentStyle_get_margin
,
895 HTMLCurrentStyle_get_accelerator
,
896 HTMLCurrentStyle_get_overflowX
,
897 HTMLCurrentStyle_get_overflowY
,
898 HTMLCurrentStyle_get_textTransform
901 /* IHTMLCurrentStyle2 */
902 static HRESULT WINAPI
HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2
*iface
, REFIID riid
, void **ppv
)
904 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
906 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
909 static ULONG WINAPI
HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2
*iface
)
911 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
913 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
916 static ULONG WINAPI
HTMLCurrentStyle2_Release(IHTMLCurrentStyle2
*iface
)
918 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
919 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
922 static HRESULT WINAPI
HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2
*iface
, UINT
*pctinfo
)
924 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
925 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
928 static HRESULT WINAPI
HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2
*iface
, UINT iTInfo
,
929 LCID lcid
, ITypeInfo
**ppTInfo
)
931 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
932 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
935 static HRESULT WINAPI
HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2
*iface
, REFIID riid
,
936 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
938 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
939 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
943 static HRESULT WINAPI
HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2
*iface
, DISPID dispIdMember
,
944 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
945 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
947 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
948 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
949 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
952 static HRESULT WINAPI
HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
954 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
955 FIXME("(%p)->(%p)\n", This
, p
);
959 static HRESULT WINAPI
HTMLCurrentStyle2_get_wordWrap(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
961 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
962 FIXME("(%p)->(%p)\n", This
, p
);
966 static HRESULT WINAPI
HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
968 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
969 FIXME("(%p)->(%p)\n", This
, p
);
973 static HRESULT WINAPI
HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2
*iface
, VARIANT_BOOL
*p
)
975 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
977 FIXME("(%p)->(%p) returning true\n", This
, p
);
983 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
985 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
986 FIXME("(%p)->(%p)\n", This
, p
);
990 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarFaceColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
992 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
993 FIXME("(%p)->(%p)\n", This
, p
);
997 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbar3dLightColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
999 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1000 FIXME("(%p)->(%p)\n", This
, p
);
1004 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarShadowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1006 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1007 FIXME("(%p)->(%p)\n", This
, p
);
1011 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarHighlightColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1013 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1014 FIXME("(%p)->(%p)\n", This
, p
);
1018 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarDarkShadowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1020 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1021 FIXME("(%p)->(%p)\n", This
, p
);
1025 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarArrowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1027 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1028 FIXME("(%p)->(%p)\n", This
, p
);
1032 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarTrackColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1034 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1035 FIXME("(%p)->(%p)\n", This
, p
);
1039 static HRESULT WINAPI
HTMLCurrentStyle2_get_writingMode(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1041 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1042 FIXME("(%p)->(%p)\n", This
, p
);
1046 static HRESULT WINAPI
HTMLCurrentStyle2_get_zoom(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1048 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1049 FIXME("(%p)->(%p)\n", This
, p
);
1053 static HRESULT WINAPI
HTMLCurrentStyle2_get_filter(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1055 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1057 TRACE("(%p)->(%p)\n", This
, p
);
1059 if(This
->elem
->filter
) {
1060 *p
= SysAllocString(This
->elem
->filter
);
1062 return E_OUTOFMEMORY
;
1070 static HRESULT WINAPI
HTMLCurrentStyle2_get_textAlignLast(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1072 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1073 FIXME("(%p)->(%p)\n", This
, p
);
1077 static HRESULT WINAPI
HTMLCurrentStyle2_get_textKashidaSpace(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1079 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1080 FIXME("(%p)->(%p)\n", This
, p
);
1084 static HRESULT WINAPI
HTMLCurrentStyle2_get_isBlock(IHTMLCurrentStyle2
*iface
, VARIANT_BOOL
*p
)
1086 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1087 FIXME("(%p)->(%p)\n", This
, p
);
1091 static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl
= {
1092 HTMLCurrentStyle2_QueryInterface
,
1093 HTMLCurrentStyle2_AddRef
,
1094 HTMLCurrentStyle2_Release
,
1095 HTMLCurrentStyle2_GetTypeInfoCount
,
1096 HTMLCurrentStyle2_GetTypeInfo
,
1097 HTMLCurrentStyle2_GetIDsOfNames
,
1098 HTMLCurrentStyle2_Invoke
,
1099 HTMLCurrentStyle2_get_layoutFlow
,
1100 HTMLCurrentStyle2_get_wordWrap
,
1101 HTMLCurrentStyle2_get_textUnderlinePosition
,
1102 HTMLCurrentStyle2_get_hasLayout
,
1103 HTMLCurrentStyle2_get_scrollbarBaseColor
,
1104 HTMLCurrentStyle2_get_scrollbarFaceColor
,
1105 HTMLCurrentStyle2_get_scrollbar3dLightColor
,
1106 HTMLCurrentStyle2_get_scrollbarShadowColor
,
1107 HTMLCurrentStyle2_get_scrollbarHighlightColor
,
1108 HTMLCurrentStyle2_get_scrollbarDarkShadowColor
,
1109 HTMLCurrentStyle2_get_scrollbarArrowColor
,
1110 HTMLCurrentStyle2_get_scrollbarTrackColor
,
1111 HTMLCurrentStyle2_get_writingMode
,
1112 HTMLCurrentStyle2_get_zoom
,
1113 HTMLCurrentStyle2_get_filter
,
1114 HTMLCurrentStyle2_get_textAlignLast
,
1115 HTMLCurrentStyle2_get_textKashidaSpace
,
1116 HTMLCurrentStyle2_get_isBlock
1119 /* IHTMLCurrentStyle3 */
1120 static HRESULT WINAPI
HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3
*iface
, REFIID riid
, void **ppv
)
1122 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1124 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
1127 static ULONG WINAPI
HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3
*iface
)
1129 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1131 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
1134 static ULONG WINAPI
HTMLCurrentStyle3_Release(IHTMLCurrentStyle3
*iface
)
1136 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1137 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
1140 static HRESULT WINAPI
HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3
*iface
, UINT
*pctinfo
)
1142 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1143 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
1146 static HRESULT WINAPI
HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3
*iface
, UINT iTInfo
,
1147 LCID lcid
, ITypeInfo
**ppTInfo
)
1149 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1150 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
1153 static HRESULT WINAPI
HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3
*iface
, REFIID riid
,
1154 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
1156 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1157 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
1161 static HRESULT WINAPI
HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3
*iface
, DISPID dispIdMember
,
1162 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1163 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1165 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1166 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
1167 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1170 static HRESULT WINAPI
HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3
*iface
, BSTR
*p
)
1172 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1173 FIXME("(%p)->(%p)\n", This
, p
);
1177 static HRESULT WINAPI
HTMLCurrentStyle3_get_minHeight(IHTMLCurrentStyle3
*iface
, VARIANT
*p
)
1179 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1180 FIXME("(%p)->(%p)\n", This
, p
);
1184 static HRESULT WINAPI
HTMLCurrentStyle3_get_wordSpacing(IHTMLCurrentStyle3
*iface
, VARIANT
*p
)
1186 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1187 FIXME("(%p)->(%p)\n", This
, p
);
1191 static HRESULT WINAPI
HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3
*iface
, BSTR
*p
)
1193 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1194 FIXME("(%p)->(%p)\n", This
, p
);
1198 static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl
= {
1199 HTMLCurrentStyle3_QueryInterface
,
1200 HTMLCurrentStyle3_AddRef
,
1201 HTMLCurrentStyle3_Release
,
1202 HTMLCurrentStyle3_GetTypeInfoCount
,
1203 HTMLCurrentStyle3_GetTypeInfo
,
1204 HTMLCurrentStyle3_GetIDsOfNames
,
1205 HTMLCurrentStyle3_Invoke
,
1206 HTMLCurrentStyle3_get_textOverflow
,
1207 HTMLCurrentStyle3_get_minHeight
,
1208 HTMLCurrentStyle3_get_wordSpacing
,
1209 HTMLCurrentStyle3_get_whiteSpace
1212 /* IHTMLCurrentStyle4 */
1213 static HRESULT WINAPI
HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4
*iface
, REFIID riid
, void **ppv
)
1215 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1217 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
1220 static ULONG WINAPI
HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4
*iface
)
1222 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1224 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
1227 static ULONG WINAPI
HTMLCurrentStyle4_Release(IHTMLCurrentStyle4
*iface
)
1229 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1230 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
1233 static HRESULT WINAPI
HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4
*iface
, UINT
*pctinfo
)
1235 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1236 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
1239 static HRESULT WINAPI
HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4
*iface
, UINT iTInfo
,
1240 LCID lcid
, ITypeInfo
**ppTInfo
)
1242 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1243 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
1246 static HRESULT WINAPI
HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4
*iface
, REFIID riid
,
1247 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
1249 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1250 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
1254 static HRESULT WINAPI
HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4
*iface
, DISPID dispIdMember
,
1255 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1256 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1258 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1259 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
1260 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1263 static HRESULT WINAPI
HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4
*iface
, BSTR
*p
)
1265 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1266 FIXME("(%p)->(%p)\n", This
, p
);
1270 static HRESULT WINAPI
HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1272 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1273 FIXME("(%p)->(%p)\n", This
, p
);
1277 static HRESULT WINAPI
HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1279 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1280 FIXME("(%p)->(%p)\n", This
, p
);
1284 static HRESULT WINAPI
HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1286 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1287 FIXME("(%p)->(%p)\n", This
, p
);
1291 static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl
= {
1292 HTMLCurrentStyle4_QueryInterface
,
1293 HTMLCurrentStyle4_AddRef
,
1294 HTMLCurrentStyle4_Release
,
1295 HTMLCurrentStyle4_GetTypeInfoCount
,
1296 HTMLCurrentStyle4_GetTypeInfo
,
1297 HTMLCurrentStyle4_GetIDsOfNames
,
1298 HTMLCurrentStyle4_Invoke
,
1299 HTMLCurrentStyle4_msInterpolationMode
,
1300 HTMLCurrentStyle4_get_maxHeight
,
1301 HTMLCurrentStyle4_get_minWidth
,
1302 HTMLCurrentStyle4_get_maxWidth
1305 static const tid_t HTMLCurrentStyle_iface_tids
[] = {
1306 IHTMLCurrentStyle_tid
,
1307 IHTMLCurrentStyle2_tid
,
1308 IHTMLCurrentStyle3_tid
,
1309 IHTMLCurrentStyle4_tid
,
1312 static dispex_static_data_t HTMLCurrentStyle_dispex
= {
1314 DispHTMLCurrentStyle_tid
,
1316 HTMLCurrentStyle_iface_tids
1319 HRESULT
HTMLCurrentStyle_Create(HTMLElement
*elem
, IHTMLCurrentStyle
**p
)
1321 nsIDOMCSSStyleDeclaration
*nsstyle
;
1322 nsIDOMWindow
*nsview
;
1323 nsAString nsempty_str
;
1324 HTMLCurrentStyle
*ret
;
1327 if(!elem
->node
.doc
->nsdoc
) {
1328 WARN("NULL nsdoc\n");
1329 return E_UNEXPECTED
;
1332 nsres
= nsIDOMHTMLDocument_GetDefaultView(elem
->node
.doc
->nsdoc
, &nsview
);
1333 if(NS_FAILED(nsres
)) {
1334 ERR("GetDefaultView failed: %08x\n", nsres
);
1338 nsAString_Init(&nsempty_str
, NULL
);
1339 nsres
= nsIDOMWindow_GetComputedStyle(nsview
, (nsIDOMElement
*)elem
->nselem
, &nsempty_str
, &nsstyle
);
1340 nsAString_Finish(&nsempty_str
);
1341 if(NS_FAILED(nsres
)) {
1342 ERR("GetComputedStyle failed: %08x\n", nsres
);
1346 ret
= heap_alloc_zero(sizeof(HTMLCurrentStyle
));
1348 nsIDOMCSSStyleDeclaration_Release(nsstyle
);
1349 return E_OUTOFMEMORY
;
1352 ret
->IHTMLCurrentStyle_iface
.lpVtbl
= &HTMLCurrentStyleVtbl
;
1353 ret
->IHTMLCurrentStyle2_iface
.lpVtbl
= &HTMLCurrentStyle2Vtbl
;
1354 ret
->IHTMLCurrentStyle3_iface
.lpVtbl
= &HTMLCurrentStyle3Vtbl
;
1355 ret
->IHTMLCurrentStyle4_iface
.lpVtbl
= &HTMLCurrentStyle4Vtbl
;
1357 ret
->nsstyle
= nsstyle
;
1359 init_dispex(&ret
->dispex
, (IUnknown
*)&ret
->IHTMLCurrentStyle_iface
, &HTMLCurrentStyle_dispex
);
1361 IHTMLElement_AddRef(&elem
->IHTMLElement_iface
);
1364 *p
= &ret
->IHTMLCurrentStyle_iface
;