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
);
74 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
75 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
76 *ppv
= &This
->IHTMLCurrentStyle_iface
;
77 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle
, riid
)) {
78 TRACE("(%p)->(IID_IHTMLCurrentStyle %p)\n", This
, ppv
);
79 *ppv
= &This
->IHTMLCurrentStyle_iface
;
80 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle2
, riid
)) {
81 TRACE("(%p)->(IID_IHTMLCurrentStyle2 %p)\n", This
, ppv
);
82 *ppv
= &This
->IHTMLCurrentStyle2_iface
;
83 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle3
, riid
)) {
84 TRACE("(%p)->(IID_IHTMLCurrentStyle3 %p)\n", This
, ppv
);
85 *ppv
= &This
->IHTMLCurrentStyle3_iface
;
86 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle4
, riid
)) {
87 TRACE("(%p)->(IID_IHTMLCurrentStyle4 %p)\n", This
, ppv
);
88 *ppv
= &This
->IHTMLCurrentStyle4_iface
;
89 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
90 return *ppv
? S_OK
: E_NOINTERFACE
;
94 IUnknown_AddRef((IUnknown
*)*ppv
);
98 WARN("unsupported %s\n", debugstr_guid(riid
));
102 static ULONG WINAPI
HTMLCurrentStyle_AddRef(IHTMLCurrentStyle
*iface
)
104 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
105 LONG ref
= InterlockedIncrement(&This
->ref
);
107 TRACE("(%p) ref=%d\n", This
, ref
);
112 static ULONG WINAPI
HTMLCurrentStyle_Release(IHTMLCurrentStyle
*iface
)
114 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
115 LONG ref
= InterlockedDecrement(&This
->ref
);
117 TRACE("(%p) ref=%d\n", This
, ref
);
121 nsIDOMCSSStyleDeclaration_Release(This
->nsstyle
);
122 IHTMLElement_Release(&This
->elem
->IHTMLElement_iface
);
123 release_dispex(&This
->dispex
);
130 static HRESULT WINAPI
HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle
*iface
, UINT
*pctinfo
)
132 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
133 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
136 static HRESULT WINAPI
HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle
*iface
, UINT iTInfo
,
137 LCID lcid
, ITypeInfo
**ppTInfo
)
139 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
140 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
143 static HRESULT WINAPI
HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle
*iface
, REFIID riid
,
144 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
146 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
147 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
151 static HRESULT WINAPI
HTMLCurrentStyle_Invoke(IHTMLCurrentStyle
*iface
, DISPID dispIdMember
,
152 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
153 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
155 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
156 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
157 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
160 static HRESULT WINAPI
HTMLCurrentStyle_get_position(IHTMLCurrentStyle
*iface
, BSTR
*p
)
162 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
164 TRACE("(%p)->(%p)\n", This
, p
);
166 return get_nsstyle_attr(This
->nsstyle
, STYLEID_POSITION
, p
, 0);
169 static HRESULT WINAPI
HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle
*iface
, BSTR
*p
)
171 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
172 FIXME("(%p)->(%p)\n", This
, p
);
176 static HRESULT WINAPI
HTMLCurrentStyle_get_color(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
178 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
179 TRACE("(%p)->(%p)\n", This
, p
);
180 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_COLOR
, p
, 0);
183 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
185 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
186 TRACE("(%p)->(%p)\n", This
, p
);
187 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BACKGROUND_COLOR
, p
, 0);
190 static HRESULT WINAPI
HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle
*iface
, BSTR
*p
)
192 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
194 TRACE("(%p)->(%p)\n", This
, p
);
196 return get_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_FAMILY
, p
, 0);
199 static HRESULT WINAPI
HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
201 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
202 TRACE("(%p)->(%p)\n", This
, p
);
203 return get_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_STYLE
, p
, 0);
206 static HRESULT WINAPI
HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle
*iface
, BSTR
*p
)
208 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
209 TRACE("(%p)->(%p)\n", This
, p
);
210 return get_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_VARIANT
, p
, 0);
213 static HRESULT WINAPI
HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
215 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
216 TRACE("(%p)->(%p)\n", This
, p
);
217 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_FONT_WEIGHT
, p
, ATTR_STR_TO_INT
);
220 static HRESULT WINAPI
HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
222 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
223 TRACE("(%p)->(%p)\n", This
, p
);
224 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_FONT_SIZE
, p
, 0);
227 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle
*iface
, BSTR
*p
)
229 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
230 TRACE("(%p)->(%p)\n", This
, p
);
231 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BACKGROUND_IMAGE
, p
, 0);
234 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
236 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
237 FIXME("(%p)->(%p)\n", This
, p
);
241 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
243 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
244 FIXME("(%p)->(%p)\n", This
, p
);
248 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle
*iface
, BSTR
*p
)
250 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
251 TRACE("(%p)->(%p)\n", This
, p
);
252 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BACKGROUND_REPEAT
, p
, 0);
255 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
257 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
258 TRACE("(%p)->(%p)\n", This
, p
);
259 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_LEFT_COLOR
, p
, 0);
262 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
264 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
265 TRACE("(%p)->(%p)\n", This
, p
);
266 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_COLOR
, p
, 0);
269 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
271 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
272 TRACE("(%p)->(%p)\n", This
, p
);
273 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_COLOR
, p
, 0);
276 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
278 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
279 TRACE("(%p)->(%p)\n", This
, p
);
280 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_COLOR
, p
, 0);
283 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
285 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
286 TRACE("(%p)->(%p)\n", This
, p
);
287 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_TOP_STYLE
, p
, 0);
290 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
292 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
293 TRACE("(%p)->(%p)\n", This
, p
);
294 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_RIGHT_STYLE
, p
, 0);
297 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
299 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
300 TRACE("(%p)->(%p)\n", This
, p
);
301 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_BOTTOM_STYLE
, p
, 0);
304 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
306 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
307 TRACE("(%p)->(%p)\n", This
, p
);
308 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_LEFT_STYLE
, p
, 0);
311 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
313 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
314 TRACE("(%p)->(%p)\n", This
, p
);
315 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_WIDTH
, p
, 0);
318 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
320 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
321 TRACE("(%p)->(%p)\n", This
, p
);
322 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_WIDTH
, p
, 0);
325 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
327 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
328 TRACE("(%p)->(%p)\n", This
, p
);
329 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_WIDTH
, p
, 0);
332 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
334 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
335 TRACE("(%p)->(%p)\n", This
, p
);
336 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_LEFT_WIDTH
, p
, 0);
339 static HRESULT WINAPI
HTMLCurrentStyle_get_left(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
341 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
342 TRACE("(%p)->(%p)\n", This
, p
);
343 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LEFT
, p
, 0);
346 static HRESULT WINAPI
HTMLCurrentStyle_get_top(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
348 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
349 TRACE("(%p)->(%p)\n", This
, p
);
350 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_TOP
, p
, 0);
353 static HRESULT WINAPI
HTMLCurrentStyle_get_width(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
355 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
356 TRACE("(%p)->(%p)\n", This
, p
);
357 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_WIDTH
, p
, 0);
360 static HRESULT WINAPI
HTMLCurrentStyle_get_height(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
362 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
363 TRACE("(%p)->(%p)\n", This
, p
);
364 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_HEIGHT
, p
, 0);
367 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
369 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
370 TRACE("(%p)->(%p)\n", This
, p
);
371 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_LEFT
, p
, 0);
374 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
376 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
377 TRACE("(%p)->(%p)\n", This
, p
);
378 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_TOP
, p
, 0);
381 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
383 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
384 TRACE("(%p)->(%p)\n", This
, p
);
385 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_RIGHT
, p
, 0);
388 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
390 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
391 TRACE("(%p)->(%p)\n", This
, p
);
392 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_BOTTOM
, p
, 0);
395 static HRESULT WINAPI
HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle
*iface
, BSTR
*p
)
397 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
398 TRACE("(%p)->(%p)\n", This
, p
);
399 return get_nsstyle_attr(This
->nsstyle
, STYLEID_TEXT_ALIGN
, p
, 0);
402 static HRESULT WINAPI
HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle
*iface
, BSTR
*p
)
404 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
405 TRACE("(%p)->(%p)\n", This
, p
);
406 return get_nsstyle_attr(This
->nsstyle
, STYLEID_TEXT_DECORATION
, p
, 0);
409 static HRESULT WINAPI
HTMLCurrentStyle_get_display(IHTMLCurrentStyle
*iface
, BSTR
*p
)
411 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
413 TRACE("(%p)->(%p)\n", This
, p
);
415 return get_nsstyle_attr(This
->nsstyle
, STYLEID_DISPLAY
, p
, 0);
418 static HRESULT WINAPI
HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle
*iface
, BSTR
*p
)
420 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
422 TRACE("(%p)->(%p)\n", This
, p
);
424 return get_nsstyle_attr(This
->nsstyle
, STYLEID_VISIBILITY
, p
, 0);
427 static HRESULT WINAPI
HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
429 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
430 TRACE("(%p)->(%p)\n", This
, p
);
431 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_Z_INDEX
, p
, ATTR_STR_TO_INT
);
434 static HRESULT WINAPI
HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
436 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
437 TRACE("(%p)->(%p)\n", This
, p
);
438 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LETTER_SPACING
, p
, 0);
441 static HRESULT WINAPI
HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
443 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
444 TRACE("(%p)->(%p)\n", This
, p
);
445 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LINE_HEIGHT
, p
, 0);
448 static HRESULT WINAPI
HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
450 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
451 TRACE("(%p)->(%p)\n", This
, p
);
452 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_TEXT_INDENT
, p
, 0);
455 static HRESULT WINAPI
HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
457 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
458 TRACE("(%p)->(%p)\n", This
, p
);
459 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_VERTICAL_ALIGN
, p
, 0);
462 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle
*iface
, BSTR
*p
)
464 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
465 FIXME("(%p)->(%p)\n", This
, p
);
469 static HRESULT WINAPI
HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
471 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
472 TRACE("(%p)->(%p)\n", This
, p
);
473 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_TOP
, p
, 0);
476 static HRESULT WINAPI
HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
478 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
479 TRACE("(%p)->(%p)\n", This
, p
);
480 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_RIGHT
, p
, 0);
483 static HRESULT WINAPI
HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
485 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
486 TRACE("(%p)->(%p)\n", This
, p
);
487 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_BOTTOM
, p
, 0);
490 static HRESULT WINAPI
HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
492 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
493 TRACE("(%p)->(%p)\n", This
, p
);
494 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_LEFT
, p
, 0);
497 static HRESULT WINAPI
HTMLCurrentStyle_get_clear(IHTMLCurrentStyle
*iface
, BSTR
*p
)
499 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
500 FIXME("(%p)->(%p)\n", This
, p
);
504 static HRESULT WINAPI
HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle
*iface
, BSTR
*p
)
506 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
507 FIXME("(%p)->(%p)\n", This
, p
);
511 static HRESULT WINAPI
HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle
*iface
, BSTR
*p
)
513 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
514 FIXME("(%p)->(%p)\n", This
, p
);
518 static HRESULT WINAPI
HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle
*iface
, BSTR
*p
)
520 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
521 FIXME("(%p)->(%p)\n", This
, p
);
525 static HRESULT WINAPI
HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
527 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
528 FIXME("(%p)->(%p)\n", This
, p
);
532 static HRESULT WINAPI
HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
534 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
535 FIXME("(%p)->(%p)\n", This
, p
);
539 static HRESULT WINAPI
HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
541 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
542 FIXME("(%p)->(%p)\n", This
, p
);
546 static HRESULT WINAPI
HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
548 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
549 FIXME("(%p)->(%p)\n", This
, p
);
553 static HRESULT WINAPI
HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle
*iface
, BSTR
*p
)
555 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
556 TRACE("(%p)->(%p)\n", This
, p
);
557 return get_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW
, p
, 0);
560 static HRESULT WINAPI
HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle
*iface
, BSTR
*p
)
562 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
563 FIXME("(%p)->(%p)\n", This
, p
);
567 static HRESULT WINAPI
HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle
*iface
, BSTR
*p
)
569 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
570 FIXME("(%p)->(%p)\n", This
, p
);
574 static HRESULT WINAPI
HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle
*iface
, BSTR
*p
)
576 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
577 TRACE("(%p)->(%p)\n", This
, p
);
578 return get_nsstyle_attr(This
->nsstyle
, STYLEID_CURSOR
, p
, 0);
581 static HRESULT WINAPI
HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle
*iface
, BSTR
*p
)
583 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
584 FIXME("(%p)->(%p)\n", This
, p
);
588 static HRESULT WINAPI
HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle
*iface
, BSTR
*p
)
590 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
591 FIXME("(%p)->(%p)\n", This
, p
);
595 static HRESULT WINAPI
HTMLCurrentStyle_get_direction(IHTMLCurrentStyle
*iface
, BSTR
*p
)
597 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
598 FIXME("(%p)->(%p)\n", This
, p
);
602 static HRESULT WINAPI
HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle
*iface
, BSTR
*p
)
604 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
605 FIXME("(%p)->(%p)\n", This
, p
);
609 static HRESULT WINAPI
HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle
*iface
, BSTR strAttributeName
,
610 LONG lFlags
, VARIANT
*AttributeValue
)
612 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
613 FIXME("(%p)->(%s %x %p)\n", This
, debugstr_w(strAttributeName
), lFlags
, AttributeValue
);
617 static HRESULT WINAPI
HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle
*iface
, BSTR
*p
)
619 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
620 FIXME("(%p)->(%p)\n", This
, p
);
624 static HRESULT WINAPI
HTMLCurrentStyle_get_right(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
626 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
627 TRACE("(%p)->(%p)\n", This
, p
);
628 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_RIGHT
, p
, 0);
631 static HRESULT WINAPI
HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
633 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
634 TRACE("(%p)->(%p)\n", This
, p
);
635 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BOTTOM
, p
, 0);
638 static HRESULT WINAPI
HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle
*iface
, BSTR
*p
)
640 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
641 FIXME("(%p)->(%p)\n", This
, p
);
645 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle
*iface
, BSTR
*p
)
647 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
648 FIXME("(%p)->(%p)\n", This
, p
);
652 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle
*iface
, BSTR
*p
)
654 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
655 FIXME("(%p)->(%p)\n", This
, p
);
659 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle
*iface
, BSTR
*p
)
661 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
662 FIXME("(%p)->(%p)\n", This
, p
);
666 static HRESULT WINAPI
HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle
*iface
, BSTR
*p
)
668 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
669 FIXME("(%p)->(%p)\n", This
, p
);
673 static HRESULT WINAPI
HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle
*iface
, BSTR
*p
)
675 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
676 FIXME("(%p)->(%p)\n", This
, p
);
680 static HRESULT WINAPI
HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle
*iface
, BSTR
*p
)
682 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
683 FIXME("(%p)->(%p)\n", This
, p
);
687 static HRESULT WINAPI
HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle
*iface
, BSTR
*p
)
689 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
690 FIXME("(%p)->(%p)\n", This
, p
);
694 static HRESULT WINAPI
HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle
*iface
, BSTR
*p
)
696 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
697 FIXME("(%p)->(%p)\n", This
, p
);
701 static HRESULT WINAPI
HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
703 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
704 FIXME("(%p)->(%p)\n", This
, p
);
708 static HRESULT WINAPI
HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle
*iface
, BSTR
*p
)
710 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
711 FIXME("(%p)->(%p)\n", This
, p
);
715 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
717 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
718 FIXME("(%p)->(%p)\n", This
, p
);
722 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
724 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
725 FIXME("(%p)->(%p)\n", This
, p
);
729 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle
*iface
, BSTR
*p
)
731 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
732 FIXME("(%p)->(%p)\n", This
, p
);
736 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle
*iface
, BSTR
*p
)
738 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
739 FIXME("(%p)->(%p)\n", This
, p
);
743 static HRESULT WINAPI
HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
745 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
746 TRACE("(%p)->(%p)\n", This
, p
);
747 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_STYLE
, p
, 0);
750 static HRESULT WINAPI
HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle
*iface
, BSTR
*p
)
752 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
753 TRACE("(%p)->(%p)\n", This
, p
);
754 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_COLOR
, p
, 0);
757 static HRESULT WINAPI
HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle
*iface
, BSTR
*p
)
759 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
760 TRACE("(%p)->(%p)\n", This
, p
);
761 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_WIDTH
, p
, 0);
764 static HRESULT WINAPI
HTMLCurrentStyle_get_padding(IHTMLCurrentStyle
*iface
, BSTR
*p
)
766 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
767 TRACE("(%p)->(%p)\n", This
, p
);
768 return get_nsstyle_attr(This
->nsstyle
, STYLEID_PADDING
, p
, 0);
771 static HRESULT WINAPI
HTMLCurrentStyle_get_margin(IHTMLCurrentStyle
*iface
, BSTR
*p
)
773 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
774 TRACE("(%p)->(%p)\n", This
, p
);
775 return get_nsstyle_attr(This
->nsstyle
, STYLEID_MARGIN
, p
, 0);
778 static HRESULT WINAPI
HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle
*iface
, BSTR
*p
)
780 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
781 FIXME("(%p)->(%p)\n", This
, p
);
785 static HRESULT WINAPI
HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle
*iface
, BSTR
*p
)
787 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
788 FIXME("(%p)->(%p)\n", This
, p
);
792 static HRESULT WINAPI
HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle
*iface
, BSTR
*p
)
794 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
795 FIXME("(%p)->(%p)\n", This
, p
);
799 static HRESULT WINAPI
HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle
*iface
, BSTR
*p
)
801 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
802 FIXME("(%p)->(%p)\n", This
, p
);
806 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl
= {
807 HTMLCurrentStyle_QueryInterface
,
808 HTMLCurrentStyle_AddRef
,
809 HTMLCurrentStyle_Release
,
810 HTMLCurrentStyle_GetTypeInfoCount
,
811 HTMLCurrentStyle_GetTypeInfo
,
812 HTMLCurrentStyle_GetIDsOfNames
,
813 HTMLCurrentStyle_Invoke
,
814 HTMLCurrentStyle_get_position
,
815 HTMLCurrentStyle_get_styleFloat
,
816 HTMLCurrentStyle_get_color
,
817 HTMLCurrentStyle_get_backgroundColor
,
818 HTMLCurrentStyle_get_fontFamily
,
819 HTMLCurrentStyle_get_fontStyle
,
820 HTMLCurrentStyle_get_fontVariant
,
821 HTMLCurrentStyle_get_fontWeight
,
822 HTMLCurrentStyle_get_fontSize
,
823 HTMLCurrentStyle_get_backgroundImage
,
824 HTMLCurrentStyle_get_backgroundPositionX
,
825 HTMLCurrentStyle_get_backgroundPositionY
,
826 HTMLCurrentStyle_get_backgroundRepeat
,
827 HTMLCurrentStyle_get_borderLeftColor
,
828 HTMLCurrentStyle_get_borderTopColor
,
829 HTMLCurrentStyle_get_borderRightColor
,
830 HTMLCurrentStyle_get_borderBottomColor
,
831 HTMLCurrentStyle_get_borderTopStyle
,
832 HTMLCurrentStyle_get_borderRightStyle
,
833 HTMLCurrentStyle_get_borderBottomStyle
,
834 HTMLCurrentStyle_get_borderLeftStyle
,
835 HTMLCurrentStyle_get_borderTopWidth
,
836 HTMLCurrentStyle_get_borderRightWidth
,
837 HTMLCurrentStyle_get_borderBottomWidth
,
838 HTMLCurrentStyle_get_borderLeftWidth
,
839 HTMLCurrentStyle_get_left
,
840 HTMLCurrentStyle_get_top
,
841 HTMLCurrentStyle_get_width
,
842 HTMLCurrentStyle_get_height
,
843 HTMLCurrentStyle_get_paddingLeft
,
844 HTMLCurrentStyle_get_paddingTop
,
845 HTMLCurrentStyle_get_paddingRight
,
846 HTMLCurrentStyle_get_paddingBottom
,
847 HTMLCurrentStyle_get_textAlign
,
848 HTMLCurrentStyle_get_textDecoration
,
849 HTMLCurrentStyle_get_display
,
850 HTMLCurrentStyle_get_visibility
,
851 HTMLCurrentStyle_get_zIndex
,
852 HTMLCurrentStyle_get_letterSpacing
,
853 HTMLCurrentStyle_get_lineHeight
,
854 HTMLCurrentStyle_get_textIndent
,
855 HTMLCurrentStyle_get_verticalAlign
,
856 HTMLCurrentStyle_get_backgroundAttachment
,
857 HTMLCurrentStyle_get_marginTop
,
858 HTMLCurrentStyle_get_marginRight
,
859 HTMLCurrentStyle_get_marginBottom
,
860 HTMLCurrentStyle_get_marginLeft
,
861 HTMLCurrentStyle_get_clear
,
862 HTMLCurrentStyle_get_listStyleType
,
863 HTMLCurrentStyle_get_listStylePosition
,
864 HTMLCurrentStyle_get_listStyleImage
,
865 HTMLCurrentStyle_get_clipTop
,
866 HTMLCurrentStyle_get_clipRight
,
867 HTMLCurrentStyle_get_clipBottom
,
868 HTMLCurrentStyle_get_clipLeft
,
869 HTMLCurrentStyle_get_overflow
,
870 HTMLCurrentStyle_get_pageBreakBefore
,
871 HTMLCurrentStyle_get_pageBreakAfter
,
872 HTMLCurrentStyle_get_cursor
,
873 HTMLCurrentStyle_get_tableLayout
,
874 HTMLCurrentStyle_get_borderCollapse
,
875 HTMLCurrentStyle_get_direction
,
876 HTMLCurrentStyle_get_behavior
,
877 HTMLCurrentStyle_getAttribute
,
878 HTMLCurrentStyle_get_unicodeBidi
,
879 HTMLCurrentStyle_get_right
,
880 HTMLCurrentStyle_get_bottom
,
881 HTMLCurrentStyle_get_imeMode
,
882 HTMLCurrentStyle_get_rubyAlign
,
883 HTMLCurrentStyle_get_rubyPosition
,
884 HTMLCurrentStyle_get_rubyOverhang
,
885 HTMLCurrentStyle_get_textAutospace
,
886 HTMLCurrentStyle_get_lineBreak
,
887 HTMLCurrentStyle_get_wordBreak
,
888 HTMLCurrentStyle_get_textJustify
,
889 HTMLCurrentStyle_get_textJustifyTrim
,
890 HTMLCurrentStyle_get_textKashida
,
891 HTMLCurrentStyle_get_blockDirection
,
892 HTMLCurrentStyle_get_layoutGridChar
,
893 HTMLCurrentStyle_get_layoutGridLine
,
894 HTMLCurrentStyle_get_layoutGridMode
,
895 HTMLCurrentStyle_get_layoutGridType
,
896 HTMLCurrentStyle_get_borderStyle
,
897 HTMLCurrentStyle_get_borderColor
,
898 HTMLCurrentStyle_get_borderWidth
,
899 HTMLCurrentStyle_get_padding
,
900 HTMLCurrentStyle_get_margin
,
901 HTMLCurrentStyle_get_accelerator
,
902 HTMLCurrentStyle_get_overflowX
,
903 HTMLCurrentStyle_get_overflowY
,
904 HTMLCurrentStyle_get_textTransform
907 /* IHTMLCurrentStyle2 */
908 static HRESULT WINAPI
HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2
*iface
, REFIID riid
, void **ppv
)
910 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
912 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
915 static ULONG WINAPI
HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2
*iface
)
917 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
919 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
922 static ULONG WINAPI
HTMLCurrentStyle2_Release(IHTMLCurrentStyle2
*iface
)
924 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
925 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
928 static HRESULT WINAPI
HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2
*iface
, UINT
*pctinfo
)
930 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
931 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
934 static HRESULT WINAPI
HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2
*iface
, UINT iTInfo
,
935 LCID lcid
, ITypeInfo
**ppTInfo
)
937 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
938 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
941 static HRESULT WINAPI
HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2
*iface
, REFIID riid
,
942 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
944 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
945 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
949 static HRESULT WINAPI
HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2
*iface
, DISPID dispIdMember
,
950 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
951 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
953 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
954 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
955 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
958 static HRESULT WINAPI
HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
960 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
961 FIXME("(%p)->(%p)\n", This
, p
);
965 static HRESULT WINAPI
HTMLCurrentStyle2_get_wordWrap(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
967 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
968 FIXME("(%p)->(%p)\n", This
, p
);
972 static HRESULT WINAPI
HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
974 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
975 FIXME("(%p)->(%p)\n", This
, p
);
979 static HRESULT WINAPI
HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2
*iface
, VARIANT_BOOL
*p
)
981 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
983 FIXME("(%p)->(%p) returning true\n", This
, p
);
989 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
991 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
992 FIXME("(%p)->(%p)\n", This
, p
);
996 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarFaceColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
998 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
999 FIXME("(%p)->(%p)\n", This
, p
);
1003 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbar3dLightColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1005 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1006 FIXME("(%p)->(%p)\n", This
, p
);
1010 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarShadowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1012 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1013 FIXME("(%p)->(%p)\n", This
, p
);
1017 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarHighlightColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1019 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1020 FIXME("(%p)->(%p)\n", This
, p
);
1024 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarDarkShadowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1026 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1027 FIXME("(%p)->(%p)\n", This
, p
);
1031 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarArrowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1033 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1034 FIXME("(%p)->(%p)\n", This
, p
);
1038 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarTrackColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1040 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1041 FIXME("(%p)->(%p)\n", This
, p
);
1045 static HRESULT WINAPI
HTMLCurrentStyle2_get_writingMode(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1047 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1048 FIXME("(%p)->(%p)\n", This
, p
);
1052 static HRESULT WINAPI
HTMLCurrentStyle2_get_zoom(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1054 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1055 FIXME("(%p)->(%p)\n", This
, p
);
1059 static HRESULT WINAPI
HTMLCurrentStyle2_get_filter(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1061 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1063 TRACE("(%p)->(%p)\n", This
, p
);
1065 if(This
->elem
->filter
) {
1066 *p
= SysAllocString(This
->elem
->filter
);
1068 return E_OUTOFMEMORY
;
1076 static HRESULT WINAPI
HTMLCurrentStyle2_get_textAlignLast(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1078 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1079 FIXME("(%p)->(%p)\n", This
, p
);
1083 static HRESULT WINAPI
HTMLCurrentStyle2_get_textKashidaSpace(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1085 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1086 FIXME("(%p)->(%p)\n", This
, p
);
1090 static HRESULT WINAPI
HTMLCurrentStyle2_get_isBlock(IHTMLCurrentStyle2
*iface
, VARIANT_BOOL
*p
)
1092 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1093 FIXME("(%p)->(%p)\n", This
, p
);
1097 static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl
= {
1098 HTMLCurrentStyle2_QueryInterface
,
1099 HTMLCurrentStyle2_AddRef
,
1100 HTMLCurrentStyle2_Release
,
1101 HTMLCurrentStyle2_GetTypeInfoCount
,
1102 HTMLCurrentStyle2_GetTypeInfo
,
1103 HTMLCurrentStyle2_GetIDsOfNames
,
1104 HTMLCurrentStyle2_Invoke
,
1105 HTMLCurrentStyle2_get_layoutFlow
,
1106 HTMLCurrentStyle2_get_wordWrap
,
1107 HTMLCurrentStyle2_get_textUnderlinePosition
,
1108 HTMLCurrentStyle2_get_hasLayout
,
1109 HTMLCurrentStyle2_get_scrollbarBaseColor
,
1110 HTMLCurrentStyle2_get_scrollbarFaceColor
,
1111 HTMLCurrentStyle2_get_scrollbar3dLightColor
,
1112 HTMLCurrentStyle2_get_scrollbarShadowColor
,
1113 HTMLCurrentStyle2_get_scrollbarHighlightColor
,
1114 HTMLCurrentStyle2_get_scrollbarDarkShadowColor
,
1115 HTMLCurrentStyle2_get_scrollbarArrowColor
,
1116 HTMLCurrentStyle2_get_scrollbarTrackColor
,
1117 HTMLCurrentStyle2_get_writingMode
,
1118 HTMLCurrentStyle2_get_zoom
,
1119 HTMLCurrentStyle2_get_filter
,
1120 HTMLCurrentStyle2_get_textAlignLast
,
1121 HTMLCurrentStyle2_get_textKashidaSpace
,
1122 HTMLCurrentStyle2_get_isBlock
1125 /* IHTMLCurrentStyle3 */
1126 static HRESULT WINAPI
HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3
*iface
, REFIID riid
, void **ppv
)
1128 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1130 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
1133 static ULONG WINAPI
HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3
*iface
)
1135 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1137 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
1140 static ULONG WINAPI
HTMLCurrentStyle3_Release(IHTMLCurrentStyle3
*iface
)
1142 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1143 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
1146 static HRESULT WINAPI
HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3
*iface
, UINT
*pctinfo
)
1148 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1149 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
1152 static HRESULT WINAPI
HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3
*iface
, UINT iTInfo
,
1153 LCID lcid
, ITypeInfo
**ppTInfo
)
1155 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1156 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
1159 static HRESULT WINAPI
HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3
*iface
, REFIID riid
,
1160 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
1162 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1163 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
1167 static HRESULT WINAPI
HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3
*iface
, DISPID dispIdMember
,
1168 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1169 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1171 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1172 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
1173 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1176 static HRESULT WINAPI
HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3
*iface
, BSTR
*p
)
1178 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1179 FIXME("(%p)->(%p)\n", This
, p
);
1183 static HRESULT WINAPI
HTMLCurrentStyle3_get_minHeight(IHTMLCurrentStyle3
*iface
, VARIANT
*p
)
1185 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1186 FIXME("(%p)->(%p)\n", This
, p
);
1190 static HRESULT WINAPI
HTMLCurrentStyle3_get_wordSpacing(IHTMLCurrentStyle3
*iface
, VARIANT
*p
)
1192 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1193 FIXME("(%p)->(%p)\n", This
, p
);
1197 static HRESULT WINAPI
HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3
*iface
, BSTR
*p
)
1199 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1200 FIXME("(%p)->(%p)\n", This
, p
);
1204 static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl
= {
1205 HTMLCurrentStyle3_QueryInterface
,
1206 HTMLCurrentStyle3_AddRef
,
1207 HTMLCurrentStyle3_Release
,
1208 HTMLCurrentStyle3_GetTypeInfoCount
,
1209 HTMLCurrentStyle3_GetTypeInfo
,
1210 HTMLCurrentStyle3_GetIDsOfNames
,
1211 HTMLCurrentStyle3_Invoke
,
1212 HTMLCurrentStyle3_get_textOverflow
,
1213 HTMLCurrentStyle3_get_minHeight
,
1214 HTMLCurrentStyle3_get_wordSpacing
,
1215 HTMLCurrentStyle3_get_whiteSpace
1218 /* IHTMLCurrentStyle4 */
1219 static HRESULT WINAPI
HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4
*iface
, REFIID riid
, void **ppv
)
1221 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1223 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
1226 static ULONG WINAPI
HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4
*iface
)
1228 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1230 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
1233 static ULONG WINAPI
HTMLCurrentStyle4_Release(IHTMLCurrentStyle4
*iface
)
1235 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1236 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
1239 static HRESULT WINAPI
HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4
*iface
, UINT
*pctinfo
)
1241 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1242 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
1245 static HRESULT WINAPI
HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4
*iface
, UINT iTInfo
,
1246 LCID lcid
, ITypeInfo
**ppTInfo
)
1248 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1249 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
1252 static HRESULT WINAPI
HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4
*iface
, REFIID riid
,
1253 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
1255 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1256 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
1260 static HRESULT WINAPI
HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4
*iface
, DISPID dispIdMember
,
1261 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1262 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1264 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1265 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
1266 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1269 static HRESULT WINAPI
HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4
*iface
, BSTR
*p
)
1271 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1272 FIXME("(%p)->(%p)\n", This
, p
);
1276 static HRESULT WINAPI
HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1278 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1279 FIXME("(%p)->(%p)\n", This
, p
);
1283 static HRESULT WINAPI
HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1285 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1286 FIXME("(%p)->(%p)\n", This
, p
);
1290 static HRESULT WINAPI
HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1292 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1293 FIXME("(%p)->(%p)\n", This
, p
);
1297 static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl
= {
1298 HTMLCurrentStyle4_QueryInterface
,
1299 HTMLCurrentStyle4_AddRef
,
1300 HTMLCurrentStyle4_Release
,
1301 HTMLCurrentStyle4_GetTypeInfoCount
,
1302 HTMLCurrentStyle4_GetTypeInfo
,
1303 HTMLCurrentStyle4_GetIDsOfNames
,
1304 HTMLCurrentStyle4_Invoke
,
1305 HTMLCurrentStyle4_msInterpolationMode
,
1306 HTMLCurrentStyle4_get_maxHeight
,
1307 HTMLCurrentStyle4_get_minWidth
,
1308 HTMLCurrentStyle4_get_maxWidth
1311 static const tid_t HTMLCurrentStyle_iface_tids
[] = {
1312 IHTMLCurrentStyle_tid
,
1313 IHTMLCurrentStyle2_tid
,
1314 IHTMLCurrentStyle3_tid
,
1315 IHTMLCurrentStyle4_tid
,
1318 static dispex_static_data_t HTMLCurrentStyle_dispex
= {
1320 DispHTMLCurrentStyle_tid
,
1322 HTMLCurrentStyle_iface_tids
1325 HRESULT
HTMLCurrentStyle_Create(HTMLElement
*elem
, IHTMLCurrentStyle
**p
)
1327 nsIDOMCSSStyleDeclaration
*nsstyle
;
1328 nsIDOMWindow
*nsview
;
1329 nsAString nsempty_str
;
1330 HTMLCurrentStyle
*ret
;
1333 if(!elem
->node
.doc
->nsdoc
) {
1334 WARN("NULL nsdoc\n");
1335 return E_UNEXPECTED
;
1338 nsres
= nsIDOMHTMLDocument_GetDefaultView(elem
->node
.doc
->nsdoc
, &nsview
);
1339 if(NS_FAILED(nsres
)) {
1340 ERR("GetDefaultView failed: %08x\n", nsres
);
1344 nsAString_Init(&nsempty_str
, NULL
);
1345 nsres
= nsIDOMWindow_GetComputedStyle(nsview
, (nsIDOMElement
*)elem
->nselem
, &nsempty_str
, &nsstyle
);
1346 nsAString_Finish(&nsempty_str
);
1347 if(NS_FAILED(nsres
)) {
1348 ERR("GetComputedStyle failed: %08x\n", nsres
);
1352 ret
= heap_alloc_zero(sizeof(HTMLCurrentStyle
));
1354 nsIDOMCSSStyleDeclaration_Release(nsstyle
);
1355 return E_OUTOFMEMORY
;
1358 ret
->IHTMLCurrentStyle_iface
.lpVtbl
= &HTMLCurrentStyleVtbl
;
1359 ret
->IHTMLCurrentStyle2_iface
.lpVtbl
= &HTMLCurrentStyle2Vtbl
;
1360 ret
->IHTMLCurrentStyle3_iface
.lpVtbl
= &HTMLCurrentStyle3Vtbl
;
1361 ret
->IHTMLCurrentStyle4_iface
.lpVtbl
= &HTMLCurrentStyle4Vtbl
;
1363 ret
->nsstyle
= nsstyle
;
1365 init_dispex(&ret
->dispex
, (IUnknown
*)&ret
->IHTMLCurrentStyle_iface
, &HTMLCurrentStyle_dispex
);
1367 IHTMLElement_AddRef(&elem
->IHTMLElement_iface
);
1370 *p
= &ret
->IHTMLCurrentStyle_iface
;