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
29 #include "mshtml_private.h"
30 #include "htmlstyle.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
36 struct HTMLCurrentStyle
{
38 IHTMLCurrentStyle IHTMLCurrentStyle_iface
;
39 IHTMLCurrentStyle2 IHTMLCurrentStyle2_iface
;
40 IHTMLCurrentStyle3 IHTMLCurrentStyle3_iface
;
41 IHTMLCurrentStyle4 IHTMLCurrentStyle4_iface
;
45 nsIDOMCSSStyleDeclaration
*nsstyle
;
49 static inline HRESULT
get_current_style_property(HTMLCurrentStyle
*current_style
, styleid_t sid
, BSTR
*p
)
51 return get_nsstyle_property(current_style
->nsstyle
, sid
, COMPAT_MODE_QUIRKS
, p
);
54 static inline HRESULT
get_current_style_property_var(HTMLCurrentStyle
*This
, styleid_t sid
, VARIANT
*v
)
56 return get_nsstyle_property_var(This
->nsstyle
, sid
, COMPAT_MODE_QUIRKS
, v
);
59 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle
*iface
)
61 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle_iface
);
64 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle2(IHTMLCurrentStyle2
*iface
)
66 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle2_iface
);
69 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle3(IHTMLCurrentStyle3
*iface
)
71 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle3_iface
);
74 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle4(IHTMLCurrentStyle4
*iface
)
76 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle4_iface
);
79 static HRESULT WINAPI
HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle
*iface
, REFIID riid
, void **ppv
)
81 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
83 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
85 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
86 *ppv
= &This
->IHTMLCurrentStyle_iface
;
87 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle
, riid
)) {
88 *ppv
= &This
->IHTMLCurrentStyle_iface
;
89 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle2
, riid
)) {
90 *ppv
= &This
->IHTMLCurrentStyle2_iface
;
91 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle3
, riid
)) {
92 *ppv
= &This
->IHTMLCurrentStyle3_iface
;
93 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle4
, riid
)) {
94 *ppv
= &This
->IHTMLCurrentStyle4_iface
;
95 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
96 return *ppv
? S_OK
: E_NOINTERFACE
;
99 WARN("unsupported %s\n", debugstr_mshtml_guid(riid
));
100 return E_NOINTERFACE
;
103 IUnknown_AddRef((IUnknown
*)*ppv
);
107 static ULONG WINAPI
HTMLCurrentStyle_AddRef(IHTMLCurrentStyle
*iface
)
109 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
110 LONG ref
= InterlockedIncrement(&This
->ref
);
112 TRACE("(%p) ref=%d\n", This
, ref
);
117 static ULONG WINAPI
HTMLCurrentStyle_Release(IHTMLCurrentStyle
*iface
)
119 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
120 LONG ref
= InterlockedDecrement(&This
->ref
);
122 TRACE("(%p) ref=%d\n", This
, ref
);
126 nsIDOMCSSStyleDeclaration_Release(This
->nsstyle
);
127 IHTMLElement_Release(&This
->elem
->IHTMLElement_iface
);
128 release_dispex(&This
->dispex
);
135 static HRESULT WINAPI
HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle
*iface
, UINT
*pctinfo
)
137 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
138 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
141 static HRESULT WINAPI
HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle
*iface
, UINT iTInfo
,
142 LCID lcid
, ITypeInfo
**ppTInfo
)
144 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
145 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
148 static HRESULT WINAPI
HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle
*iface
, REFIID riid
,
149 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
151 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
152 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
156 static HRESULT WINAPI
HTMLCurrentStyle_Invoke(IHTMLCurrentStyle
*iface
, DISPID dispIdMember
,
157 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
158 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
160 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
161 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
162 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
165 static HRESULT WINAPI
HTMLCurrentStyle_get_position(IHTMLCurrentStyle
*iface
, BSTR
*p
)
167 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
169 TRACE("(%p)->(%p)\n", This
, p
);
171 return get_current_style_property(This
, STYLEID_POSITION
, p
);
174 static HRESULT WINAPI
HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle
*iface
, BSTR
*p
)
176 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
178 TRACE("(%p)->(%p)\n", This
, p
);
180 return get_current_style_property(This
, STYLEID_FLOAT
, p
);
183 static HRESULT WINAPI
HTMLCurrentStyle_get_color(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
185 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
186 TRACE("(%p)->(%p)\n", This
, p
);
187 return get_current_style_property_var(This
, STYLEID_COLOR
, p
);
190 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
192 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
193 TRACE("(%p)->(%p)\n", This
, p
);
194 return get_current_style_property_var(This
, STYLEID_BACKGROUND_COLOR
, p
);
197 static HRESULT WINAPI
HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle
*iface
, BSTR
*p
)
199 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
201 TRACE("(%p)->(%p)\n", This
, p
);
203 return get_current_style_property(This
, STYLEID_FONT_FAMILY
, p
);
206 static HRESULT WINAPI
HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
208 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
209 TRACE("(%p)->(%p)\n", This
, p
);
210 return get_current_style_property(This
, STYLEID_FONT_STYLE
, p
);
213 static HRESULT WINAPI
HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle
*iface
, BSTR
*p
)
215 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
216 TRACE("(%p)->(%p)\n", This
, p
);
217 return get_current_style_property(This
, STYLEID_FONT_VARIANT
, p
);
220 static HRESULT WINAPI
HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
222 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
223 TRACE("(%p)->(%p)\n", This
, p
);
224 return get_current_style_property_var(This
, STYLEID_FONT_WEIGHT
, p
);
227 static HRESULT WINAPI
HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
229 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
230 TRACE("(%p)->(%p)\n", This
, p
);
231 return get_current_style_property_var(This
, STYLEID_FONT_SIZE
, p
);
234 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle
*iface
, BSTR
*p
)
236 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
237 TRACE("(%p)->(%p)\n", This
, p
);
238 return get_current_style_property(This
, STYLEID_BACKGROUND_IMAGE
, p
);
241 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
243 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
244 FIXME("(%p)->(%p)\n", This
, p
);
248 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
250 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
251 FIXME("(%p)->(%p)\n", This
, p
);
255 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle
*iface
, BSTR
*p
)
257 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
258 TRACE("(%p)->(%p)\n", This
, p
);
259 return get_current_style_property(This
, STYLEID_BACKGROUND_REPEAT
, p
);
262 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
264 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
265 TRACE("(%p)->(%p)\n", This
, p
);
266 return get_current_style_property_var(This
, STYLEID_BORDER_LEFT_COLOR
, p
);
269 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
271 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
272 TRACE("(%p)->(%p)\n", This
, p
);
273 return get_current_style_property_var(This
, STYLEID_BORDER_TOP_COLOR
, p
);
276 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
278 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
279 TRACE("(%p)->(%p)\n", This
, p
);
280 return get_current_style_property_var(This
, STYLEID_BORDER_RIGHT_COLOR
, p
);
283 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
285 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
286 TRACE("(%p)->(%p)\n", This
, p
);
287 return get_current_style_property_var(This
, STYLEID_BORDER_BOTTOM_COLOR
, p
);
290 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
292 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
293 TRACE("(%p)->(%p)\n", This
, p
);
294 return get_current_style_property(This
, STYLEID_BORDER_TOP_STYLE
, p
);
297 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
299 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
300 TRACE("(%p)->(%p)\n", This
, p
);
301 return get_current_style_property(This
, STYLEID_BORDER_RIGHT_STYLE
, p
);
304 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
306 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
307 TRACE("(%p)->(%p)\n", This
, p
);
308 return get_current_style_property(This
, STYLEID_BORDER_BOTTOM_STYLE
, p
);
311 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
313 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
314 TRACE("(%p)->(%p)\n", This
, p
);
315 return get_current_style_property(This
, STYLEID_BORDER_LEFT_STYLE
, p
);
318 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
320 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
321 TRACE("(%p)->(%p)\n", This
, p
);
322 return get_current_style_property_var(This
, STYLEID_BORDER_TOP_WIDTH
, p
);
325 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
327 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
328 TRACE("(%p)->(%p)\n", This
, p
);
329 return get_current_style_property_var(This
, STYLEID_BORDER_RIGHT_WIDTH
, p
);
332 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
334 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
335 TRACE("(%p)->(%p)\n", This
, p
);
336 return get_current_style_property_var(This
, STYLEID_BORDER_BOTTOM_WIDTH
, p
);
339 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
341 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
342 TRACE("(%p)->(%p)\n", This
, p
);
343 return get_current_style_property_var(This
, STYLEID_BORDER_LEFT_WIDTH
, p
);
346 static HRESULT WINAPI
HTMLCurrentStyle_get_left(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
348 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
349 TRACE("(%p)->(%p)\n", This
, p
);
350 return get_current_style_property_var(This
, STYLEID_LEFT
, p
);
353 static HRESULT WINAPI
HTMLCurrentStyle_get_top(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
355 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
356 TRACE("(%p)->(%p)\n", This
, p
);
357 return get_current_style_property_var(This
, STYLEID_TOP
, p
);
360 static HRESULT WINAPI
HTMLCurrentStyle_get_width(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
362 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
363 TRACE("(%p)->(%p)\n", This
, p
);
364 return get_current_style_property_var(This
, STYLEID_WIDTH
, p
);
367 static HRESULT WINAPI
HTMLCurrentStyle_get_height(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
369 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
370 TRACE("(%p)->(%p)\n", This
, p
);
371 return get_current_style_property_var(This
, STYLEID_HEIGHT
, p
);
374 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
376 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
377 TRACE("(%p)->(%p)\n", This
, p
);
378 return get_current_style_property_var(This
, STYLEID_PADDING_LEFT
, p
);
381 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
383 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
384 TRACE("(%p)->(%p)\n", This
, p
);
385 return get_current_style_property_var(This
, STYLEID_PADDING_TOP
, p
);
388 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
390 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
391 TRACE("(%p)->(%p)\n", This
, p
);
392 return get_current_style_property_var(This
, STYLEID_PADDING_RIGHT
, p
);
395 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
397 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
398 TRACE("(%p)->(%p)\n", This
, p
);
399 return get_current_style_property_var(This
, STYLEID_PADDING_BOTTOM
, p
);
402 static HRESULT WINAPI
HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle
*iface
, BSTR
*p
)
404 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
405 TRACE("(%p)->(%p)\n", This
, p
);
406 return get_current_style_property(This
, STYLEID_TEXT_ALIGN
, p
);
409 static HRESULT WINAPI
HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle
*iface
, BSTR
*p
)
411 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
412 TRACE("(%p)->(%p)\n", This
, p
);
413 return get_current_style_property(This
, STYLEID_TEXT_DECORATION
, p
);
416 static HRESULT WINAPI
HTMLCurrentStyle_get_display(IHTMLCurrentStyle
*iface
, BSTR
*p
)
418 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
420 TRACE("(%p)->(%p)\n", This
, p
);
422 return get_current_style_property(This
, STYLEID_DISPLAY
, p
);
425 static HRESULT WINAPI
HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle
*iface
, BSTR
*p
)
427 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
429 TRACE("(%p)->(%p)\n", This
, p
);
431 return get_current_style_property(This
, STYLEID_VISIBILITY
, p
);
434 static HRESULT WINAPI
HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
436 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
437 TRACE("(%p)->(%p)\n", This
, p
);
438 return get_current_style_property_var(This
, STYLEID_Z_INDEX
, p
);
441 static HRESULT WINAPI
HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
443 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
444 TRACE("(%p)->(%p)\n", This
, p
);
445 return get_current_style_property_var(This
, STYLEID_LETTER_SPACING
, p
);
448 static HRESULT WINAPI
HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
450 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
451 TRACE("(%p)->(%p)\n", This
, p
);
452 return get_current_style_property_var(This
, STYLEID_LINE_HEIGHT
, p
);
455 static HRESULT WINAPI
HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
457 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
458 TRACE("(%p)->(%p)\n", This
, p
);
459 return get_current_style_property_var(This
, STYLEID_TEXT_INDENT
, p
);
462 static HRESULT WINAPI
HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
464 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
465 TRACE("(%p)->(%p)\n", This
, p
);
466 return get_current_style_property_var(This
, STYLEID_VERTICAL_ALIGN
, p
);
469 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle
*iface
, BSTR
*p
)
471 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
472 FIXME("(%p)->(%p)\n", This
, p
);
476 static HRESULT WINAPI
HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
478 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
479 TRACE("(%p)->(%p)\n", This
, p
);
480 return get_current_style_property_var(This
, STYLEID_MARGIN_TOP
, p
);
483 static HRESULT WINAPI
HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
485 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
486 TRACE("(%p)->(%p)\n", This
, p
);
487 return get_current_style_property_var(This
, STYLEID_MARGIN_RIGHT
, p
);
490 static HRESULT WINAPI
HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
492 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
493 TRACE("(%p)->(%p)\n", This
, p
);
494 return get_current_style_property_var(This
, STYLEID_MARGIN_BOTTOM
, p
);
497 static HRESULT WINAPI
HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
499 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
500 TRACE("(%p)->(%p)\n", This
, p
);
501 return get_current_style_property_var(This
, STYLEID_MARGIN_LEFT
, p
);
504 static HRESULT WINAPI
HTMLCurrentStyle_get_clear(IHTMLCurrentStyle
*iface
, BSTR
*p
)
506 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
507 FIXME("(%p)->(%p)\n", This
, p
);
511 static HRESULT WINAPI
HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle
*iface
, BSTR
*p
)
513 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
514 FIXME("(%p)->(%p)\n", This
, p
);
518 static HRESULT WINAPI
HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle
*iface
, BSTR
*p
)
520 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
521 FIXME("(%p)->(%p)\n", This
, p
);
525 static HRESULT WINAPI
HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle
*iface
, BSTR
*p
)
527 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
528 FIXME("(%p)->(%p)\n", This
, p
);
532 static HRESULT WINAPI
HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
534 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
535 FIXME("(%p)->(%p)\n", This
, p
);
539 static HRESULT WINAPI
HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
541 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
542 FIXME("(%p)->(%p)\n", This
, p
);
546 static HRESULT WINAPI
HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
548 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
549 FIXME("(%p)->(%p)\n", This
, p
);
553 static HRESULT WINAPI
HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
555 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
556 FIXME("(%p)->(%p)\n", This
, p
);
560 static HRESULT WINAPI
HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle
*iface
, BSTR
*p
)
562 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
563 TRACE("(%p)->(%p)\n", This
, p
);
564 return get_current_style_property(This
, STYLEID_OVERFLOW
, p
);
567 static HRESULT WINAPI
HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle
*iface
, BSTR
*p
)
569 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
570 FIXME("(%p)->(%p)\n", This
, p
);
574 static HRESULT WINAPI
HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle
*iface
, BSTR
*p
)
576 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
577 FIXME("(%p)->(%p)\n", This
, p
);
581 static HRESULT WINAPI
HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle
*iface
, BSTR
*p
)
583 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
584 TRACE("(%p)->(%p)\n", This
, p
);
585 return get_current_style_property(This
, STYLEID_CURSOR
, p
);
588 static HRESULT WINAPI
HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle
*iface
, BSTR
*p
)
590 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
591 FIXME("(%p)->(%p)\n", This
, p
);
595 static HRESULT WINAPI
HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle
*iface
, BSTR
*p
)
597 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
598 FIXME("(%p)->(%p)\n", This
, p
);
602 static HRESULT WINAPI
HTMLCurrentStyle_get_direction(IHTMLCurrentStyle
*iface
, BSTR
*p
)
604 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
605 TRACE("(%p)->(%p)\n", This
, p
);
606 return get_current_style_property(This
, STYLEID_DIRECTION
, p
);
609 static HRESULT WINAPI
HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle
*iface
, BSTR
*p
)
611 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
612 FIXME("(%p)->(%p)\n", This
, p
);
616 static HRESULT WINAPI
HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle
*iface
, BSTR strAttributeName
,
617 LONG lFlags
, VARIANT
*AttributeValue
)
619 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
620 FIXME("(%p)->(%s %x %p)\n", This
, debugstr_w(strAttributeName
), lFlags
, AttributeValue
);
624 static HRESULT WINAPI
HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle
*iface
, BSTR
*p
)
626 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
627 FIXME("(%p)->(%p)\n", This
, p
);
631 static HRESULT WINAPI
HTMLCurrentStyle_get_right(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
633 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
634 TRACE("(%p)->(%p)\n", This
, p
);
635 return get_current_style_property_var(This
, STYLEID_RIGHT
, p
);
638 static HRESULT WINAPI
HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
640 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
641 TRACE("(%p)->(%p)\n", This
, p
);
642 return get_current_style_property_var(This
, STYLEID_BOTTOM
, p
);
645 static HRESULT WINAPI
HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle
*iface
, BSTR
*p
)
647 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
648 FIXME("(%p)->(%p)\n", This
, p
);
652 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle
*iface
, BSTR
*p
)
654 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
655 FIXME("(%p)->(%p)\n", This
, p
);
659 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle
*iface
, BSTR
*p
)
661 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
662 FIXME("(%p)->(%p)\n", This
, p
);
666 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle
*iface
, BSTR
*p
)
668 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
669 FIXME("(%p)->(%p)\n", This
, p
);
673 static HRESULT WINAPI
HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle
*iface
, BSTR
*p
)
675 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
676 FIXME("(%p)->(%p)\n", This
, p
);
680 static HRESULT WINAPI
HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle
*iface
, BSTR
*p
)
682 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
683 FIXME("(%p)->(%p)\n", This
, p
);
687 static HRESULT WINAPI
HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle
*iface
, BSTR
*p
)
689 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
690 FIXME("(%p)->(%p)\n", This
, p
);
694 static HRESULT WINAPI
HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle
*iface
, BSTR
*p
)
696 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
697 FIXME("(%p)->(%p)\n", This
, p
);
701 static HRESULT WINAPI
HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle
*iface
, BSTR
*p
)
703 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
704 FIXME("(%p)->(%p)\n", This
, p
);
708 static HRESULT WINAPI
HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
710 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
711 FIXME("(%p)->(%p)\n", This
, p
);
715 static HRESULT WINAPI
HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle
*iface
, BSTR
*p
)
717 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
718 FIXME("(%p)->(%p)\n", This
, p
);
722 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
724 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
725 FIXME("(%p)->(%p)\n", This
, p
);
729 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
731 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
732 FIXME("(%p)->(%p)\n", This
, p
);
736 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle
*iface
, BSTR
*p
)
738 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
739 FIXME("(%p)->(%p)\n", This
, p
);
743 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle
*iface
, BSTR
*p
)
745 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
746 FIXME("(%p)->(%p)\n", This
, p
);
750 static HRESULT WINAPI
HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
752 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
753 TRACE("(%p)->(%p)\n", This
, p
);
754 return get_current_style_property(This
, STYLEID_BORDER_STYLE
, p
);
757 static HRESULT WINAPI
HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle
*iface
, BSTR
*p
)
759 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
760 TRACE("(%p)->(%p)\n", This
, p
);
761 return get_current_style_property(This
, STYLEID_BORDER_COLOR
, p
);
764 static HRESULT WINAPI
HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle
*iface
, BSTR
*p
)
766 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
767 TRACE("(%p)->(%p)\n", This
, p
);
768 return get_current_style_property(This
, STYLEID_BORDER_WIDTH
, p
);
771 static HRESULT WINAPI
HTMLCurrentStyle_get_padding(IHTMLCurrentStyle
*iface
, BSTR
*p
)
773 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
774 TRACE("(%p)->(%p)\n", This
, p
);
775 return get_current_style_property(This
, STYLEID_PADDING
, p
);
778 static HRESULT WINAPI
HTMLCurrentStyle_get_margin(IHTMLCurrentStyle
*iface
, BSTR
*p
)
780 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
781 TRACE("(%p)->(%p)\n", This
, p
);
782 return get_current_style_property(This
, STYLEID_MARGIN
, p
);
785 static HRESULT WINAPI
HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle
*iface
, BSTR
*p
)
787 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
788 FIXME("(%p)->(%p)\n", This
, p
);
792 static HRESULT WINAPI
HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle
*iface
, BSTR
*p
)
794 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
795 TRACE("(%p)->(%p)\n", This
, p
);
796 return get_current_style_property(This
, STYLEID_OVERFLOW_X
, p
);
799 static HRESULT WINAPI
HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle
*iface
, BSTR
*p
)
801 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
802 TRACE("(%p)->(%p)\n", This
, p
);
803 return get_current_style_property(This
, STYLEID_OVERFLOW_Y
, p
);
806 static HRESULT WINAPI
HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle
*iface
, BSTR
*p
)
808 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
809 TRACE("(%p)->(%p)\n", This
, p
);
810 return get_current_style_property(This
, STYLEID_TEXT_TRANSFORM
, p
);
813 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl
= {
814 HTMLCurrentStyle_QueryInterface
,
815 HTMLCurrentStyle_AddRef
,
816 HTMLCurrentStyle_Release
,
817 HTMLCurrentStyle_GetTypeInfoCount
,
818 HTMLCurrentStyle_GetTypeInfo
,
819 HTMLCurrentStyle_GetIDsOfNames
,
820 HTMLCurrentStyle_Invoke
,
821 HTMLCurrentStyle_get_position
,
822 HTMLCurrentStyle_get_styleFloat
,
823 HTMLCurrentStyle_get_color
,
824 HTMLCurrentStyle_get_backgroundColor
,
825 HTMLCurrentStyle_get_fontFamily
,
826 HTMLCurrentStyle_get_fontStyle
,
827 HTMLCurrentStyle_get_fontVariant
,
828 HTMLCurrentStyle_get_fontWeight
,
829 HTMLCurrentStyle_get_fontSize
,
830 HTMLCurrentStyle_get_backgroundImage
,
831 HTMLCurrentStyle_get_backgroundPositionX
,
832 HTMLCurrentStyle_get_backgroundPositionY
,
833 HTMLCurrentStyle_get_backgroundRepeat
,
834 HTMLCurrentStyle_get_borderLeftColor
,
835 HTMLCurrentStyle_get_borderTopColor
,
836 HTMLCurrentStyle_get_borderRightColor
,
837 HTMLCurrentStyle_get_borderBottomColor
,
838 HTMLCurrentStyle_get_borderTopStyle
,
839 HTMLCurrentStyle_get_borderRightStyle
,
840 HTMLCurrentStyle_get_borderBottomStyle
,
841 HTMLCurrentStyle_get_borderLeftStyle
,
842 HTMLCurrentStyle_get_borderTopWidth
,
843 HTMLCurrentStyle_get_borderRightWidth
,
844 HTMLCurrentStyle_get_borderBottomWidth
,
845 HTMLCurrentStyle_get_borderLeftWidth
,
846 HTMLCurrentStyle_get_left
,
847 HTMLCurrentStyle_get_top
,
848 HTMLCurrentStyle_get_width
,
849 HTMLCurrentStyle_get_height
,
850 HTMLCurrentStyle_get_paddingLeft
,
851 HTMLCurrentStyle_get_paddingTop
,
852 HTMLCurrentStyle_get_paddingRight
,
853 HTMLCurrentStyle_get_paddingBottom
,
854 HTMLCurrentStyle_get_textAlign
,
855 HTMLCurrentStyle_get_textDecoration
,
856 HTMLCurrentStyle_get_display
,
857 HTMLCurrentStyle_get_visibility
,
858 HTMLCurrentStyle_get_zIndex
,
859 HTMLCurrentStyle_get_letterSpacing
,
860 HTMLCurrentStyle_get_lineHeight
,
861 HTMLCurrentStyle_get_textIndent
,
862 HTMLCurrentStyle_get_verticalAlign
,
863 HTMLCurrentStyle_get_backgroundAttachment
,
864 HTMLCurrentStyle_get_marginTop
,
865 HTMLCurrentStyle_get_marginRight
,
866 HTMLCurrentStyle_get_marginBottom
,
867 HTMLCurrentStyle_get_marginLeft
,
868 HTMLCurrentStyle_get_clear
,
869 HTMLCurrentStyle_get_listStyleType
,
870 HTMLCurrentStyle_get_listStylePosition
,
871 HTMLCurrentStyle_get_listStyleImage
,
872 HTMLCurrentStyle_get_clipTop
,
873 HTMLCurrentStyle_get_clipRight
,
874 HTMLCurrentStyle_get_clipBottom
,
875 HTMLCurrentStyle_get_clipLeft
,
876 HTMLCurrentStyle_get_overflow
,
877 HTMLCurrentStyle_get_pageBreakBefore
,
878 HTMLCurrentStyle_get_pageBreakAfter
,
879 HTMLCurrentStyle_get_cursor
,
880 HTMLCurrentStyle_get_tableLayout
,
881 HTMLCurrentStyle_get_borderCollapse
,
882 HTMLCurrentStyle_get_direction
,
883 HTMLCurrentStyle_get_behavior
,
884 HTMLCurrentStyle_getAttribute
,
885 HTMLCurrentStyle_get_unicodeBidi
,
886 HTMLCurrentStyle_get_right
,
887 HTMLCurrentStyle_get_bottom
,
888 HTMLCurrentStyle_get_imeMode
,
889 HTMLCurrentStyle_get_rubyAlign
,
890 HTMLCurrentStyle_get_rubyPosition
,
891 HTMLCurrentStyle_get_rubyOverhang
,
892 HTMLCurrentStyle_get_textAutospace
,
893 HTMLCurrentStyle_get_lineBreak
,
894 HTMLCurrentStyle_get_wordBreak
,
895 HTMLCurrentStyle_get_textJustify
,
896 HTMLCurrentStyle_get_textJustifyTrim
,
897 HTMLCurrentStyle_get_textKashida
,
898 HTMLCurrentStyle_get_blockDirection
,
899 HTMLCurrentStyle_get_layoutGridChar
,
900 HTMLCurrentStyle_get_layoutGridLine
,
901 HTMLCurrentStyle_get_layoutGridMode
,
902 HTMLCurrentStyle_get_layoutGridType
,
903 HTMLCurrentStyle_get_borderStyle
,
904 HTMLCurrentStyle_get_borderColor
,
905 HTMLCurrentStyle_get_borderWidth
,
906 HTMLCurrentStyle_get_padding
,
907 HTMLCurrentStyle_get_margin
,
908 HTMLCurrentStyle_get_accelerator
,
909 HTMLCurrentStyle_get_overflowX
,
910 HTMLCurrentStyle_get_overflowY
,
911 HTMLCurrentStyle_get_textTransform
914 /* IHTMLCurrentStyle2 */
915 static HRESULT WINAPI
HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2
*iface
, REFIID riid
, void **ppv
)
917 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
919 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
922 static ULONG WINAPI
HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2
*iface
)
924 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
926 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
929 static ULONG WINAPI
HTMLCurrentStyle2_Release(IHTMLCurrentStyle2
*iface
)
931 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
932 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
935 static HRESULT WINAPI
HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2
*iface
, UINT
*pctinfo
)
937 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
938 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
941 static HRESULT WINAPI
HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2
*iface
, UINT iTInfo
,
942 LCID lcid
, ITypeInfo
**ppTInfo
)
944 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
945 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
948 static HRESULT WINAPI
HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2
*iface
, REFIID riid
,
949 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
951 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
952 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
956 static HRESULT WINAPI
HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2
*iface
, DISPID dispIdMember
,
957 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
958 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
960 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
961 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
962 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
965 static HRESULT WINAPI
HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
967 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
968 FIXME("(%p)->(%p)\n", This
, p
);
972 static HRESULT WINAPI
HTMLCurrentStyle2_get_wordWrap(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
974 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
975 FIXME("(%p)->(%p)\n", This
, p
);
979 static HRESULT WINAPI
HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
981 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
982 FIXME("(%p)->(%p)\n", This
, p
);
986 static HRESULT WINAPI
HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2
*iface
, VARIANT_BOOL
*p
)
988 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
990 FIXME("(%p)->(%p) returning true\n", This
, p
);
996 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
998 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
999 FIXME("(%p)->(%p)\n", This
, p
);
1003 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarFaceColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1005 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1006 FIXME("(%p)->(%p)\n", This
, p
);
1010 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbar3dLightColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1012 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1013 FIXME("(%p)->(%p)\n", This
, p
);
1017 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarShadowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1019 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1020 FIXME("(%p)->(%p)\n", This
, p
);
1024 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarHighlightColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1026 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1027 FIXME("(%p)->(%p)\n", This
, p
);
1031 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarDarkShadowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1033 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1034 FIXME("(%p)->(%p)\n", This
, p
);
1038 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarArrowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1040 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1041 FIXME("(%p)->(%p)\n", This
, p
);
1045 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarTrackColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1047 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1048 FIXME("(%p)->(%p)\n", This
, p
);
1052 static HRESULT WINAPI
HTMLCurrentStyle2_get_writingMode(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1054 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1055 FIXME("(%p)->(%p)\n", This
, p
);
1059 static HRESULT WINAPI
HTMLCurrentStyle2_get_zoom(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1061 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1062 FIXME("(%p)->(%p)\n", This
, p
);
1066 static HRESULT WINAPI
HTMLCurrentStyle2_get_filter(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1068 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1070 TRACE("(%p)->(%p)\n", This
, p
);
1072 if(This
->elem
->filter
) {
1073 *p
= SysAllocString(This
->elem
->filter
);
1075 return E_OUTOFMEMORY
;
1083 static HRESULT WINAPI
HTMLCurrentStyle2_get_textAlignLast(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1085 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1086 FIXME("(%p)->(%p)\n", This
, p
);
1090 static HRESULT WINAPI
HTMLCurrentStyle2_get_textKashidaSpace(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1092 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1093 FIXME("(%p)->(%p)\n", This
, p
);
1097 static HRESULT WINAPI
HTMLCurrentStyle2_get_isBlock(IHTMLCurrentStyle2
*iface
, VARIANT_BOOL
*p
)
1099 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1100 FIXME("(%p)->(%p)\n", This
, p
);
1104 static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl
= {
1105 HTMLCurrentStyle2_QueryInterface
,
1106 HTMLCurrentStyle2_AddRef
,
1107 HTMLCurrentStyle2_Release
,
1108 HTMLCurrentStyle2_GetTypeInfoCount
,
1109 HTMLCurrentStyle2_GetTypeInfo
,
1110 HTMLCurrentStyle2_GetIDsOfNames
,
1111 HTMLCurrentStyle2_Invoke
,
1112 HTMLCurrentStyle2_get_layoutFlow
,
1113 HTMLCurrentStyle2_get_wordWrap
,
1114 HTMLCurrentStyle2_get_textUnderlinePosition
,
1115 HTMLCurrentStyle2_get_hasLayout
,
1116 HTMLCurrentStyle2_get_scrollbarBaseColor
,
1117 HTMLCurrentStyle2_get_scrollbarFaceColor
,
1118 HTMLCurrentStyle2_get_scrollbar3dLightColor
,
1119 HTMLCurrentStyle2_get_scrollbarShadowColor
,
1120 HTMLCurrentStyle2_get_scrollbarHighlightColor
,
1121 HTMLCurrentStyle2_get_scrollbarDarkShadowColor
,
1122 HTMLCurrentStyle2_get_scrollbarArrowColor
,
1123 HTMLCurrentStyle2_get_scrollbarTrackColor
,
1124 HTMLCurrentStyle2_get_writingMode
,
1125 HTMLCurrentStyle2_get_zoom
,
1126 HTMLCurrentStyle2_get_filter
,
1127 HTMLCurrentStyle2_get_textAlignLast
,
1128 HTMLCurrentStyle2_get_textKashidaSpace
,
1129 HTMLCurrentStyle2_get_isBlock
1132 /* IHTMLCurrentStyle3 */
1133 static HRESULT WINAPI
HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3
*iface
, REFIID riid
, void **ppv
)
1135 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1137 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
1140 static ULONG WINAPI
HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3
*iface
)
1142 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1144 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
1147 static ULONG WINAPI
HTMLCurrentStyle3_Release(IHTMLCurrentStyle3
*iface
)
1149 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1150 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
1153 static HRESULT WINAPI
HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3
*iface
, UINT
*pctinfo
)
1155 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1156 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
1159 static HRESULT WINAPI
HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3
*iface
, UINT iTInfo
,
1160 LCID lcid
, ITypeInfo
**ppTInfo
)
1162 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1163 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
1166 static HRESULT WINAPI
HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3
*iface
, REFIID riid
,
1167 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
1169 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1170 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
1174 static HRESULT WINAPI
HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3
*iface
, DISPID dispIdMember
,
1175 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1176 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1178 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1179 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
1180 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1183 static HRESULT WINAPI
HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3
*iface
, BSTR
*p
)
1185 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1186 FIXME("(%p)->(%p)\n", This
, p
);
1190 static HRESULT WINAPI
HTMLCurrentStyle3_get_minHeight(IHTMLCurrentStyle3
*iface
, VARIANT
*p
)
1192 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1193 FIXME("(%p)->(%p)\n", This
, p
);
1197 static HRESULT WINAPI
HTMLCurrentStyle3_get_wordSpacing(IHTMLCurrentStyle3
*iface
, VARIANT
*p
)
1199 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1200 FIXME("(%p)->(%p)\n", This
, p
);
1204 static HRESULT WINAPI
HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3
*iface
, BSTR
*p
)
1206 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1208 TRACE("(%p)->(%p)\n", This
, p
);
1210 return get_current_style_property(This
, STYLEID_WHITE_SPACE
, p
);
1213 static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl
= {
1214 HTMLCurrentStyle3_QueryInterface
,
1215 HTMLCurrentStyle3_AddRef
,
1216 HTMLCurrentStyle3_Release
,
1217 HTMLCurrentStyle3_GetTypeInfoCount
,
1218 HTMLCurrentStyle3_GetTypeInfo
,
1219 HTMLCurrentStyle3_GetIDsOfNames
,
1220 HTMLCurrentStyle3_Invoke
,
1221 HTMLCurrentStyle3_get_textOverflow
,
1222 HTMLCurrentStyle3_get_minHeight
,
1223 HTMLCurrentStyle3_get_wordSpacing
,
1224 HTMLCurrentStyle3_get_whiteSpace
1227 /* IHTMLCurrentStyle4 */
1228 static HRESULT WINAPI
HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4
*iface
, REFIID riid
, void **ppv
)
1230 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1232 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
1235 static ULONG WINAPI
HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4
*iface
)
1237 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1239 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
1242 static ULONG WINAPI
HTMLCurrentStyle4_Release(IHTMLCurrentStyle4
*iface
)
1244 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1245 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
1248 static HRESULT WINAPI
HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4
*iface
, UINT
*pctinfo
)
1250 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1251 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
1254 static HRESULT WINAPI
HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4
*iface
, UINT iTInfo
,
1255 LCID lcid
, ITypeInfo
**ppTInfo
)
1257 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1258 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
1261 static HRESULT WINAPI
HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4
*iface
, REFIID riid
,
1262 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
1264 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1265 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
1269 static HRESULT WINAPI
HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4
*iface
, DISPID dispIdMember
,
1270 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1271 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1273 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1274 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
1275 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1278 static HRESULT WINAPI
HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4
*iface
, BSTR
*p
)
1280 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1281 FIXME("(%p)->(%p)\n", This
, p
);
1285 static HRESULT WINAPI
HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1287 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1288 FIXME("(%p)->(%p)\n", This
, p
);
1292 static HRESULT WINAPI
HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1294 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1295 TRACE("(%p)->(%p)\n", This
, p
);
1296 return get_current_style_property_var(This
, STYLEID_MIN_WIDTH
, p
);
1299 static HRESULT WINAPI
HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1301 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1302 FIXME("(%p)->(%p)\n", This
, p
);
1306 static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl
= {
1307 HTMLCurrentStyle4_QueryInterface
,
1308 HTMLCurrentStyle4_AddRef
,
1309 HTMLCurrentStyle4_Release
,
1310 HTMLCurrentStyle4_GetTypeInfoCount
,
1311 HTMLCurrentStyle4_GetTypeInfo
,
1312 HTMLCurrentStyle4_GetIDsOfNames
,
1313 HTMLCurrentStyle4_Invoke
,
1314 HTMLCurrentStyle4_msInterpolationMode
,
1315 HTMLCurrentStyle4_get_maxHeight
,
1316 HTMLCurrentStyle4_get_minWidth
,
1317 HTMLCurrentStyle4_get_maxWidth
1320 static const tid_t HTMLCurrentStyle_iface_tids
[] = {
1321 IHTMLCurrentStyle_tid
,
1322 IHTMLCurrentStyle2_tid
,
1323 IHTMLCurrentStyle3_tid
,
1324 IHTMLCurrentStyle4_tid
,
1327 static dispex_static_data_t HTMLCurrentStyle_dispex
= {
1329 DispHTMLCurrentStyle_tid
,
1330 HTMLCurrentStyle_iface_tids
1333 HRESULT
HTMLCurrentStyle_Create(HTMLElement
*elem
, IHTMLCurrentStyle
**p
)
1335 nsIDOMCSSStyleDeclaration
*nsstyle
;
1336 mozIDOMWindowProxy
*nsview
;
1337 nsIDOMWindow
*nswindow
;
1338 nsAString nsempty_str
;
1339 HTMLCurrentStyle
*ret
;
1342 if(!elem
->node
.doc
->nsdoc
) {
1343 WARN("NULL nsdoc\n");
1344 return E_UNEXPECTED
;
1347 nsres
= nsIDOMHTMLDocument_GetDefaultView(elem
->node
.doc
->nsdoc
, &nsview
);
1348 if(NS_FAILED(nsres
)) {
1349 ERR("GetDefaultView failed: %08x\n", nsres
);
1353 nsres
= mozIDOMWindowProxy_QueryInterface(nsview
, &IID_nsIDOMWindow
, (void**)&nswindow
);
1354 mozIDOMWindowProxy_Release(nsview
);
1355 assert(nsres
== NS_OK
);
1357 nsAString_Init(&nsempty_str
, NULL
);
1358 nsres
= nsIDOMWindow_GetComputedStyle(nswindow
, elem
->dom_element
, &nsempty_str
, &nsstyle
);
1359 nsAString_Finish(&nsempty_str
);
1360 nsIDOMWindow_Release(nswindow
);
1361 if(NS_FAILED(nsres
)) {
1362 ERR("GetComputedStyle failed: %08x\n", nsres
);
1367 ERR("GetComputedStyle returned NULL nsstyle\n");
1371 ret
= heap_alloc_zero(sizeof(HTMLCurrentStyle
));
1373 nsIDOMCSSStyleDeclaration_Release(nsstyle
);
1374 return E_OUTOFMEMORY
;
1377 ret
->IHTMLCurrentStyle_iface
.lpVtbl
= &HTMLCurrentStyleVtbl
;
1378 ret
->IHTMLCurrentStyle2_iface
.lpVtbl
= &HTMLCurrentStyle2Vtbl
;
1379 ret
->IHTMLCurrentStyle3_iface
.lpVtbl
= &HTMLCurrentStyle3Vtbl
;
1380 ret
->IHTMLCurrentStyle4_iface
.lpVtbl
= &HTMLCurrentStyle4Vtbl
;
1382 ret
->nsstyle
= nsstyle
;
1384 init_dispex(&ret
->dispex
, (IUnknown
*)&ret
->IHTMLCurrentStyle_iface
, &HTMLCurrentStyle_dispex
);
1386 IHTMLElement_AddRef(&elem
->IHTMLElement_iface
);
1389 *p
= &ret
->IHTMLCurrentStyle_iface
;