2 * Copyright 2008 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "mshtml_private.h"
21 struct HTMLCurrentStyle
{
23 IHTMLCurrentStyle IHTMLCurrentStyle_iface
;
24 IHTMLCurrentStyle2 IHTMLCurrentStyle2_iface
;
25 IHTMLCurrentStyle3 IHTMLCurrentStyle3_iface
;
26 IHTMLCurrentStyle4 IHTMLCurrentStyle4_iface
;
30 nsIDOMCSSStyleDeclaration
*nsstyle
;
34 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle
*iface
)
36 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle_iface
);
39 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle2(IHTMLCurrentStyle2
*iface
)
41 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle2_iface
);
44 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle3(IHTMLCurrentStyle3
*iface
)
46 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle3_iface
);
49 static inline HTMLCurrentStyle
*impl_from_IHTMLCurrentStyle4(IHTMLCurrentStyle4
*iface
)
51 return CONTAINING_RECORD(iface
, HTMLCurrentStyle
, IHTMLCurrentStyle4_iface
);
54 static HRESULT WINAPI
HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle
*iface
, REFIID riid
, void **ppv
)
56 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
58 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
60 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
61 *ppv
= &This
->IHTMLCurrentStyle_iface
;
62 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle
, riid
)) {
63 *ppv
= &This
->IHTMLCurrentStyle_iface
;
64 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle2
, riid
)) {
65 *ppv
= &This
->IHTMLCurrentStyle2_iface
;
66 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle3
, riid
)) {
67 *ppv
= &This
->IHTMLCurrentStyle3_iface
;
68 }else if(IsEqualGUID(&IID_IHTMLCurrentStyle4
, riid
)) {
69 *ppv
= &This
->IHTMLCurrentStyle4_iface
;
70 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
71 return *ppv
? S_OK
: E_NOINTERFACE
;
74 WARN("unsupported %s\n", debugstr_mshtml_guid(riid
));
78 IUnknown_AddRef((IUnknown
*)*ppv
);
82 static ULONG WINAPI
HTMLCurrentStyle_AddRef(IHTMLCurrentStyle
*iface
)
84 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
85 LONG ref
= InterlockedIncrement(&This
->ref
);
87 TRACE("(%p) ref=%d\n", This
, ref
);
92 static ULONG WINAPI
HTMLCurrentStyle_Release(IHTMLCurrentStyle
*iface
)
94 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
95 LONG ref
= InterlockedDecrement(&This
->ref
);
97 TRACE("(%p) ref=%d\n", This
, ref
);
101 nsIDOMCSSStyleDeclaration_Release(This
->nsstyle
);
102 IHTMLElement_Release(&This
->elem
->IHTMLElement_iface
);
103 release_dispex(&This
->dispex
);
110 static HRESULT WINAPI
HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle
*iface
, UINT
*pctinfo
)
112 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
113 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
116 static HRESULT WINAPI
HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle
*iface
, UINT iTInfo
,
117 LCID lcid
, ITypeInfo
**ppTInfo
)
119 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
120 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
123 static HRESULT WINAPI
HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle
*iface
, REFIID riid
,
124 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
126 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
127 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
131 static HRESULT WINAPI
HTMLCurrentStyle_Invoke(IHTMLCurrentStyle
*iface
, DISPID dispIdMember
,
132 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
133 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
135 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
136 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
137 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
140 static HRESULT WINAPI
HTMLCurrentStyle_get_position(IHTMLCurrentStyle
*iface
, BSTR
*p
)
142 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
144 TRACE("(%p)->(%p)\n", This
, p
);
146 return get_nsstyle_attr(This
->nsstyle
, STYLEID_POSITION
, p
, 0);
149 static HRESULT WINAPI
HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle
*iface
, BSTR
*p
)
151 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
152 FIXME("(%p)->(%p)\n", This
, p
);
156 static HRESULT WINAPI
HTMLCurrentStyle_get_color(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
158 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
159 TRACE("(%p)->(%p)\n", This
, p
);
160 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_COLOR
, p
, 0);
163 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
165 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
166 TRACE("(%p)->(%p)\n", This
, p
);
167 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BACKGROUND_COLOR
, p
, 0);
170 static HRESULT WINAPI
HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle
*iface
, BSTR
*p
)
172 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
174 TRACE("(%p)->(%p)\n", This
, p
);
176 return get_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_FAMILY
, p
, 0);
179 static HRESULT WINAPI
HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
181 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
182 TRACE("(%p)->(%p)\n", This
, p
);
183 return get_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_STYLE
, p
, 0);
186 static HRESULT WINAPI
HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle
*iface
, BSTR
*p
)
188 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
189 TRACE("(%p)->(%p)\n", This
, p
);
190 return get_nsstyle_attr(This
->nsstyle
, STYLEID_FONT_VARIANT
, p
, 0);
193 static HRESULT WINAPI
HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
195 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
196 TRACE("(%p)->(%p)\n", This
, p
);
197 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_FONT_WEIGHT
, p
, ATTR_STR_TO_INT
);
200 static HRESULT WINAPI
HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
202 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
203 TRACE("(%p)->(%p)\n", This
, p
);
204 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_FONT_SIZE
, p
, 0);
207 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle
*iface
, BSTR
*p
)
209 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
210 TRACE("(%p)->(%p)\n", This
, p
);
211 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BACKGROUND_IMAGE
, p
, 0);
214 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
216 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
217 FIXME("(%p)->(%p)\n", This
, p
);
221 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
223 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
224 FIXME("(%p)->(%p)\n", This
, p
);
228 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle
*iface
, BSTR
*p
)
230 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
231 TRACE("(%p)->(%p)\n", This
, p
);
232 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BACKGROUND_REPEAT
, p
, 0);
235 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
237 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
238 TRACE("(%p)->(%p)\n", This
, p
);
239 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_LEFT_COLOR
, p
, 0);
242 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
244 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
245 TRACE("(%p)->(%p)\n", This
, p
);
246 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_COLOR
, p
, 0);
249 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
251 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
252 TRACE("(%p)->(%p)\n", This
, p
);
253 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_COLOR
, p
, 0);
256 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
258 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
259 TRACE("(%p)->(%p)\n", This
, p
);
260 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_COLOR
, p
, 0);
263 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
265 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
266 TRACE("(%p)->(%p)\n", This
, p
);
267 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_TOP_STYLE
, p
, 0);
270 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
272 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
273 TRACE("(%p)->(%p)\n", This
, p
);
274 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_RIGHT_STYLE
, p
, 0);
277 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
279 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
280 TRACE("(%p)->(%p)\n", This
, p
);
281 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_BOTTOM_STYLE
, p
, 0);
284 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
286 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
287 TRACE("(%p)->(%p)\n", This
, p
);
288 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_LEFT_STYLE
, p
, 0);
291 static HRESULT WINAPI
HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
293 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
294 TRACE("(%p)->(%p)\n", This
, p
);
295 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_TOP_WIDTH
, p
, 0);
298 static HRESULT WINAPI
HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
300 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
301 TRACE("(%p)->(%p)\n", This
, p
);
302 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_RIGHT_WIDTH
, p
, 0);
305 static HRESULT WINAPI
HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
307 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
308 TRACE("(%p)->(%p)\n", This
, p
);
309 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_BOTTOM_WIDTH
, p
, 0);
312 static HRESULT WINAPI
HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
314 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
315 TRACE("(%p)->(%p)\n", This
, p
);
316 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BORDER_LEFT_WIDTH
, p
, 0);
319 static HRESULT WINAPI
HTMLCurrentStyle_get_left(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
321 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
322 TRACE("(%p)->(%p)\n", This
, p
);
323 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LEFT
, p
, 0);
326 static HRESULT WINAPI
HTMLCurrentStyle_get_top(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
328 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
329 TRACE("(%p)->(%p)\n", This
, p
);
330 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_TOP
, p
, 0);
333 static HRESULT WINAPI
HTMLCurrentStyle_get_width(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
335 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
336 TRACE("(%p)->(%p)\n", This
, p
);
337 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_WIDTH
, p
, 0);
340 static HRESULT WINAPI
HTMLCurrentStyle_get_height(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
342 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
343 TRACE("(%p)->(%p)\n", This
, p
);
344 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_HEIGHT
, p
, 0);
347 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
349 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
350 TRACE("(%p)->(%p)\n", This
, p
);
351 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_LEFT
, p
, 0);
354 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
356 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
357 TRACE("(%p)->(%p)\n", This
, p
);
358 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_TOP
, p
, 0);
361 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
363 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
364 TRACE("(%p)->(%p)\n", This
, p
);
365 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_RIGHT
, p
, 0);
368 static HRESULT WINAPI
HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
370 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
371 TRACE("(%p)->(%p)\n", This
, p
);
372 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_PADDING_BOTTOM
, p
, 0);
375 static HRESULT WINAPI
HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle
*iface
, BSTR
*p
)
377 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
378 TRACE("(%p)->(%p)\n", This
, p
);
379 return get_nsstyle_attr(This
->nsstyle
, STYLEID_TEXT_ALIGN
, p
, 0);
382 static HRESULT WINAPI
HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle
*iface
, BSTR
*p
)
384 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
385 TRACE("(%p)->(%p)\n", This
, p
);
386 return get_nsstyle_attr(This
->nsstyle
, STYLEID_TEXT_DECORATION
, p
, 0);
389 static HRESULT WINAPI
HTMLCurrentStyle_get_display(IHTMLCurrentStyle
*iface
, BSTR
*p
)
391 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
393 TRACE("(%p)->(%p)\n", This
, p
);
395 return get_nsstyle_attr(This
->nsstyle
, STYLEID_DISPLAY
, p
, 0);
398 static HRESULT WINAPI
HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle
*iface
, BSTR
*p
)
400 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
402 TRACE("(%p)->(%p)\n", This
, p
);
404 return get_nsstyle_attr(This
->nsstyle
, STYLEID_VISIBILITY
, p
, 0);
407 static HRESULT WINAPI
HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
409 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
410 TRACE("(%p)->(%p)\n", This
, p
);
411 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_Z_INDEX
, p
, ATTR_STR_TO_INT
);
414 static HRESULT WINAPI
HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
416 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
417 TRACE("(%p)->(%p)\n", This
, p
);
418 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LETTER_SPACING
, p
, 0);
421 static HRESULT WINAPI
HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
423 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
424 TRACE("(%p)->(%p)\n", This
, p
);
425 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_LINE_HEIGHT
, p
, 0);
428 static HRESULT WINAPI
HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
430 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
431 TRACE("(%p)->(%p)\n", This
, p
);
432 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_TEXT_INDENT
, p
, 0);
435 static HRESULT WINAPI
HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
437 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
438 TRACE("(%p)->(%p)\n", This
, p
);
439 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_VERTICAL_ALIGN
, p
, 0);
442 static HRESULT WINAPI
HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle
*iface
, BSTR
*p
)
444 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
445 FIXME("(%p)->(%p)\n", This
, p
);
449 static HRESULT WINAPI
HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
451 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
452 TRACE("(%p)->(%p)\n", This
, p
);
453 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_TOP
, p
, 0);
456 static HRESULT WINAPI
HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
458 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
459 TRACE("(%p)->(%p)\n", This
, p
);
460 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_RIGHT
, p
, 0);
463 static HRESULT WINAPI
HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
465 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
466 TRACE("(%p)->(%p)\n", This
, p
);
467 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_BOTTOM
, p
, 0);
470 static HRESULT WINAPI
HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
472 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
473 TRACE("(%p)->(%p)\n", This
, p
);
474 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MARGIN_LEFT
, p
, 0);
477 static HRESULT WINAPI
HTMLCurrentStyle_get_clear(IHTMLCurrentStyle
*iface
, BSTR
*p
)
479 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
480 FIXME("(%p)->(%p)\n", This
, p
);
484 static HRESULT WINAPI
HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle
*iface
, BSTR
*p
)
486 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
487 FIXME("(%p)->(%p)\n", This
, p
);
491 static HRESULT WINAPI
HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle
*iface
, BSTR
*p
)
493 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
494 FIXME("(%p)->(%p)\n", This
, p
);
498 static HRESULT WINAPI
HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle
*iface
, BSTR
*p
)
500 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
501 FIXME("(%p)->(%p)\n", This
, p
);
505 static HRESULT WINAPI
HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
507 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
508 FIXME("(%p)->(%p)\n", This
, p
);
512 static HRESULT WINAPI
HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
514 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
515 FIXME("(%p)->(%p)\n", This
, p
);
519 static HRESULT WINAPI
HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
521 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
522 FIXME("(%p)->(%p)\n", This
, p
);
526 static HRESULT WINAPI
HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
528 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
529 FIXME("(%p)->(%p)\n", This
, p
);
533 static HRESULT WINAPI
HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle
*iface
, BSTR
*p
)
535 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
536 TRACE("(%p)->(%p)\n", This
, p
);
537 return get_nsstyle_attr(This
->nsstyle
, STYLEID_OVERFLOW
, p
, 0);
540 static HRESULT WINAPI
HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle
*iface
, BSTR
*p
)
542 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
543 FIXME("(%p)->(%p)\n", This
, p
);
547 static HRESULT WINAPI
HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle
*iface
, BSTR
*p
)
549 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
550 FIXME("(%p)->(%p)\n", This
, p
);
554 static HRESULT WINAPI
HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle
*iface
, BSTR
*p
)
556 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
557 TRACE("(%p)->(%p)\n", This
, p
);
558 return get_nsstyle_attr(This
->nsstyle
, STYLEID_CURSOR
, p
, 0);
561 static HRESULT WINAPI
HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle
*iface
, BSTR
*p
)
563 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
564 FIXME("(%p)->(%p)\n", This
, p
);
568 static HRESULT WINAPI
HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle
*iface
, BSTR
*p
)
570 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
571 FIXME("(%p)->(%p)\n", This
, p
);
575 static HRESULT WINAPI
HTMLCurrentStyle_get_direction(IHTMLCurrentStyle
*iface
, BSTR
*p
)
577 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
578 FIXME("(%p)->(%p)\n", This
, p
);
582 static HRESULT WINAPI
HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle
*iface
, BSTR
*p
)
584 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
585 FIXME("(%p)->(%p)\n", This
, p
);
589 static HRESULT WINAPI
HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle
*iface
, BSTR strAttributeName
,
590 LONG lFlags
, VARIANT
*AttributeValue
)
592 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
593 FIXME("(%p)->(%s %x %p)\n", This
, debugstr_w(strAttributeName
), lFlags
, AttributeValue
);
597 static HRESULT WINAPI
HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle
*iface
, BSTR
*p
)
599 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
600 FIXME("(%p)->(%p)\n", This
, p
);
604 static HRESULT WINAPI
HTMLCurrentStyle_get_right(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
606 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
607 TRACE("(%p)->(%p)\n", This
, p
);
608 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_RIGHT
, p
, 0);
611 static HRESULT WINAPI
HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
613 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
614 TRACE("(%p)->(%p)\n", This
, p
);
615 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_BOTTOM
, p
, 0);
618 static HRESULT WINAPI
HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle
*iface
, BSTR
*p
)
620 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
621 FIXME("(%p)->(%p)\n", This
, p
);
625 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle
*iface
, BSTR
*p
)
627 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
628 FIXME("(%p)->(%p)\n", This
, p
);
632 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle
*iface
, BSTR
*p
)
634 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
635 FIXME("(%p)->(%p)\n", This
, p
);
639 static HRESULT WINAPI
HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle
*iface
, BSTR
*p
)
641 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
642 FIXME("(%p)->(%p)\n", This
, p
);
646 static HRESULT WINAPI
HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle
*iface
, BSTR
*p
)
648 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
649 FIXME("(%p)->(%p)\n", This
, p
);
653 static HRESULT WINAPI
HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle
*iface
, BSTR
*p
)
655 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
656 FIXME("(%p)->(%p)\n", This
, p
);
660 static HRESULT WINAPI
HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle
*iface
, BSTR
*p
)
662 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
663 FIXME("(%p)->(%p)\n", This
, p
);
667 static HRESULT WINAPI
HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle
*iface
, BSTR
*p
)
669 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
670 FIXME("(%p)->(%p)\n", This
, p
);
674 static HRESULT WINAPI
HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle
*iface
, BSTR
*p
)
676 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
677 FIXME("(%p)->(%p)\n", This
, p
);
681 static HRESULT WINAPI
HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
683 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
684 FIXME("(%p)->(%p)\n", This
, p
);
688 static HRESULT WINAPI
HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle
*iface
, BSTR
*p
)
690 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
691 FIXME("(%p)->(%p)\n", This
, p
);
695 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
697 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
698 FIXME("(%p)->(%p)\n", This
, p
);
702 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle
*iface
, VARIANT
*p
)
704 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
705 FIXME("(%p)->(%p)\n", This
, p
);
709 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle
*iface
, BSTR
*p
)
711 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
712 FIXME("(%p)->(%p)\n", This
, p
);
716 static HRESULT WINAPI
HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle
*iface
, BSTR
*p
)
718 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
719 FIXME("(%p)->(%p)\n", This
, p
);
723 static HRESULT WINAPI
HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle
*iface
, BSTR
*p
)
725 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
726 TRACE("(%p)->(%p)\n", This
, p
);
727 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_STYLE
, p
, 0);
730 static HRESULT WINAPI
HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle
*iface
, BSTR
*p
)
732 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
733 TRACE("(%p)->(%p)\n", This
, p
);
734 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_COLOR
, p
, 0);
737 static HRESULT WINAPI
HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle
*iface
, BSTR
*p
)
739 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
740 TRACE("(%p)->(%p)\n", This
, p
);
741 return get_nsstyle_attr(This
->nsstyle
, STYLEID_BORDER_WIDTH
, p
, 0);
744 static HRESULT WINAPI
HTMLCurrentStyle_get_padding(IHTMLCurrentStyle
*iface
, BSTR
*p
)
746 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
747 TRACE("(%p)->(%p)\n", This
, p
);
748 return get_nsstyle_attr(This
->nsstyle
, STYLEID_PADDING
, p
, 0);
751 static HRESULT WINAPI
HTMLCurrentStyle_get_margin(IHTMLCurrentStyle
*iface
, BSTR
*p
)
753 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
754 TRACE("(%p)->(%p)\n", This
, p
);
755 return get_nsstyle_attr(This
->nsstyle
, STYLEID_MARGIN
, p
, 0);
758 static HRESULT WINAPI
HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle
*iface
, BSTR
*p
)
760 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
761 FIXME("(%p)->(%p)\n", This
, p
);
765 static HRESULT WINAPI
HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle
*iface
, BSTR
*p
)
767 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
768 FIXME("(%p)->(%p)\n", This
, p
);
772 static HRESULT WINAPI
HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle
*iface
, BSTR
*p
)
774 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
775 FIXME("(%p)->(%p)\n", This
, p
);
779 static HRESULT WINAPI
HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle
*iface
, BSTR
*p
)
781 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle(iface
);
782 TRACE("(%p)->(%p)\n", This
, p
);
783 return get_nsstyle_attr(This
->nsstyle
, STYLEID_TEXT_TRANSFORM
, p
, 0);
786 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl
= {
787 HTMLCurrentStyle_QueryInterface
,
788 HTMLCurrentStyle_AddRef
,
789 HTMLCurrentStyle_Release
,
790 HTMLCurrentStyle_GetTypeInfoCount
,
791 HTMLCurrentStyle_GetTypeInfo
,
792 HTMLCurrentStyle_GetIDsOfNames
,
793 HTMLCurrentStyle_Invoke
,
794 HTMLCurrentStyle_get_position
,
795 HTMLCurrentStyle_get_styleFloat
,
796 HTMLCurrentStyle_get_color
,
797 HTMLCurrentStyle_get_backgroundColor
,
798 HTMLCurrentStyle_get_fontFamily
,
799 HTMLCurrentStyle_get_fontStyle
,
800 HTMLCurrentStyle_get_fontVariant
,
801 HTMLCurrentStyle_get_fontWeight
,
802 HTMLCurrentStyle_get_fontSize
,
803 HTMLCurrentStyle_get_backgroundImage
,
804 HTMLCurrentStyle_get_backgroundPositionX
,
805 HTMLCurrentStyle_get_backgroundPositionY
,
806 HTMLCurrentStyle_get_backgroundRepeat
,
807 HTMLCurrentStyle_get_borderLeftColor
,
808 HTMLCurrentStyle_get_borderTopColor
,
809 HTMLCurrentStyle_get_borderRightColor
,
810 HTMLCurrentStyle_get_borderBottomColor
,
811 HTMLCurrentStyle_get_borderTopStyle
,
812 HTMLCurrentStyle_get_borderRightStyle
,
813 HTMLCurrentStyle_get_borderBottomStyle
,
814 HTMLCurrentStyle_get_borderLeftStyle
,
815 HTMLCurrentStyle_get_borderTopWidth
,
816 HTMLCurrentStyle_get_borderRightWidth
,
817 HTMLCurrentStyle_get_borderBottomWidth
,
818 HTMLCurrentStyle_get_borderLeftWidth
,
819 HTMLCurrentStyle_get_left
,
820 HTMLCurrentStyle_get_top
,
821 HTMLCurrentStyle_get_width
,
822 HTMLCurrentStyle_get_height
,
823 HTMLCurrentStyle_get_paddingLeft
,
824 HTMLCurrentStyle_get_paddingTop
,
825 HTMLCurrentStyle_get_paddingRight
,
826 HTMLCurrentStyle_get_paddingBottom
,
827 HTMLCurrentStyle_get_textAlign
,
828 HTMLCurrentStyle_get_textDecoration
,
829 HTMLCurrentStyle_get_display
,
830 HTMLCurrentStyle_get_visibility
,
831 HTMLCurrentStyle_get_zIndex
,
832 HTMLCurrentStyle_get_letterSpacing
,
833 HTMLCurrentStyle_get_lineHeight
,
834 HTMLCurrentStyle_get_textIndent
,
835 HTMLCurrentStyle_get_verticalAlign
,
836 HTMLCurrentStyle_get_backgroundAttachment
,
837 HTMLCurrentStyle_get_marginTop
,
838 HTMLCurrentStyle_get_marginRight
,
839 HTMLCurrentStyle_get_marginBottom
,
840 HTMLCurrentStyle_get_marginLeft
,
841 HTMLCurrentStyle_get_clear
,
842 HTMLCurrentStyle_get_listStyleType
,
843 HTMLCurrentStyle_get_listStylePosition
,
844 HTMLCurrentStyle_get_listStyleImage
,
845 HTMLCurrentStyle_get_clipTop
,
846 HTMLCurrentStyle_get_clipRight
,
847 HTMLCurrentStyle_get_clipBottom
,
848 HTMLCurrentStyle_get_clipLeft
,
849 HTMLCurrentStyle_get_overflow
,
850 HTMLCurrentStyle_get_pageBreakBefore
,
851 HTMLCurrentStyle_get_pageBreakAfter
,
852 HTMLCurrentStyle_get_cursor
,
853 HTMLCurrentStyle_get_tableLayout
,
854 HTMLCurrentStyle_get_borderCollapse
,
855 HTMLCurrentStyle_get_direction
,
856 HTMLCurrentStyle_get_behavior
,
857 HTMLCurrentStyle_getAttribute
,
858 HTMLCurrentStyle_get_unicodeBidi
,
859 HTMLCurrentStyle_get_right
,
860 HTMLCurrentStyle_get_bottom
,
861 HTMLCurrentStyle_get_imeMode
,
862 HTMLCurrentStyle_get_rubyAlign
,
863 HTMLCurrentStyle_get_rubyPosition
,
864 HTMLCurrentStyle_get_rubyOverhang
,
865 HTMLCurrentStyle_get_textAutospace
,
866 HTMLCurrentStyle_get_lineBreak
,
867 HTMLCurrentStyle_get_wordBreak
,
868 HTMLCurrentStyle_get_textJustify
,
869 HTMLCurrentStyle_get_textJustifyTrim
,
870 HTMLCurrentStyle_get_textKashida
,
871 HTMLCurrentStyle_get_blockDirection
,
872 HTMLCurrentStyle_get_layoutGridChar
,
873 HTMLCurrentStyle_get_layoutGridLine
,
874 HTMLCurrentStyle_get_layoutGridMode
,
875 HTMLCurrentStyle_get_layoutGridType
,
876 HTMLCurrentStyle_get_borderStyle
,
877 HTMLCurrentStyle_get_borderColor
,
878 HTMLCurrentStyle_get_borderWidth
,
879 HTMLCurrentStyle_get_padding
,
880 HTMLCurrentStyle_get_margin
,
881 HTMLCurrentStyle_get_accelerator
,
882 HTMLCurrentStyle_get_overflowX
,
883 HTMLCurrentStyle_get_overflowY
,
884 HTMLCurrentStyle_get_textTransform
887 /* IHTMLCurrentStyle2 */
888 static HRESULT WINAPI
HTMLCurrentStyle2_QueryInterface(IHTMLCurrentStyle2
*iface
, REFIID riid
, void **ppv
)
890 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
892 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
895 static ULONG WINAPI
HTMLCurrentStyle2_AddRef(IHTMLCurrentStyle2
*iface
)
897 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
899 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
902 static ULONG WINAPI
HTMLCurrentStyle2_Release(IHTMLCurrentStyle2
*iface
)
904 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
905 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
908 static HRESULT WINAPI
HTMLCurrentStyle2_GetTypeInfoCount(IHTMLCurrentStyle2
*iface
, UINT
*pctinfo
)
910 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
911 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
914 static HRESULT WINAPI
HTMLCurrentStyle2_GetTypeInfo(IHTMLCurrentStyle2
*iface
, UINT iTInfo
,
915 LCID lcid
, ITypeInfo
**ppTInfo
)
917 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
918 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
921 static HRESULT WINAPI
HTMLCurrentStyle2_GetIDsOfNames(IHTMLCurrentStyle2
*iface
, REFIID riid
,
922 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
924 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
925 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
929 static HRESULT WINAPI
HTMLCurrentStyle2_Invoke(IHTMLCurrentStyle2
*iface
, DISPID dispIdMember
,
930 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
931 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
933 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
934 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
935 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
938 static HRESULT WINAPI
HTMLCurrentStyle2_get_layoutFlow(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
940 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
941 FIXME("(%p)->(%p)\n", This
, p
);
945 static HRESULT WINAPI
HTMLCurrentStyle2_get_wordWrap(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
947 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
948 FIXME("(%p)->(%p)\n", This
, p
);
952 static HRESULT WINAPI
HTMLCurrentStyle2_get_textUnderlinePosition(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
954 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
955 FIXME("(%p)->(%p)\n", This
, p
);
959 static HRESULT WINAPI
HTMLCurrentStyle2_get_hasLayout(IHTMLCurrentStyle2
*iface
, VARIANT_BOOL
*p
)
961 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
963 FIXME("(%p)->(%p) returning true\n", This
, p
);
969 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarBaseColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
971 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
972 FIXME("(%p)->(%p)\n", This
, p
);
976 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarFaceColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
978 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
979 FIXME("(%p)->(%p)\n", This
, p
);
983 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbar3dLightColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
985 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
986 FIXME("(%p)->(%p)\n", This
, p
);
990 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarShadowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
992 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
993 FIXME("(%p)->(%p)\n", This
, p
);
997 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarHighlightColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
999 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1000 FIXME("(%p)->(%p)\n", This
, p
);
1004 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarDarkShadowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1006 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1007 FIXME("(%p)->(%p)\n", This
, p
);
1011 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarArrowColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1013 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1014 FIXME("(%p)->(%p)\n", This
, p
);
1018 static HRESULT WINAPI
HTMLCurrentStyle2_get_scrollbarTrackColor(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1020 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1021 FIXME("(%p)->(%p)\n", This
, p
);
1025 static HRESULT WINAPI
HTMLCurrentStyle2_get_writingMode(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1027 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1028 FIXME("(%p)->(%p)\n", This
, p
);
1032 static HRESULT WINAPI
HTMLCurrentStyle2_get_zoom(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1034 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1035 FIXME("(%p)->(%p)\n", This
, p
);
1039 static HRESULT WINAPI
HTMLCurrentStyle2_get_filter(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1041 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1043 TRACE("(%p)->(%p)\n", This
, p
);
1045 if(This
->elem
->filter
) {
1046 *p
= SysAllocString(This
->elem
->filter
);
1048 return E_OUTOFMEMORY
;
1056 static HRESULT WINAPI
HTMLCurrentStyle2_get_textAlignLast(IHTMLCurrentStyle2
*iface
, BSTR
*p
)
1058 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1059 FIXME("(%p)->(%p)\n", This
, p
);
1063 static HRESULT WINAPI
HTMLCurrentStyle2_get_textKashidaSpace(IHTMLCurrentStyle2
*iface
, VARIANT
*p
)
1065 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1066 FIXME("(%p)->(%p)\n", This
, p
);
1070 static HRESULT WINAPI
HTMLCurrentStyle2_get_isBlock(IHTMLCurrentStyle2
*iface
, VARIANT_BOOL
*p
)
1072 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle2(iface
);
1073 FIXME("(%p)->(%p)\n", This
, p
);
1077 static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl
= {
1078 HTMLCurrentStyle2_QueryInterface
,
1079 HTMLCurrentStyle2_AddRef
,
1080 HTMLCurrentStyle2_Release
,
1081 HTMLCurrentStyle2_GetTypeInfoCount
,
1082 HTMLCurrentStyle2_GetTypeInfo
,
1083 HTMLCurrentStyle2_GetIDsOfNames
,
1084 HTMLCurrentStyle2_Invoke
,
1085 HTMLCurrentStyle2_get_layoutFlow
,
1086 HTMLCurrentStyle2_get_wordWrap
,
1087 HTMLCurrentStyle2_get_textUnderlinePosition
,
1088 HTMLCurrentStyle2_get_hasLayout
,
1089 HTMLCurrentStyle2_get_scrollbarBaseColor
,
1090 HTMLCurrentStyle2_get_scrollbarFaceColor
,
1091 HTMLCurrentStyle2_get_scrollbar3dLightColor
,
1092 HTMLCurrentStyle2_get_scrollbarShadowColor
,
1093 HTMLCurrentStyle2_get_scrollbarHighlightColor
,
1094 HTMLCurrentStyle2_get_scrollbarDarkShadowColor
,
1095 HTMLCurrentStyle2_get_scrollbarArrowColor
,
1096 HTMLCurrentStyle2_get_scrollbarTrackColor
,
1097 HTMLCurrentStyle2_get_writingMode
,
1098 HTMLCurrentStyle2_get_zoom
,
1099 HTMLCurrentStyle2_get_filter
,
1100 HTMLCurrentStyle2_get_textAlignLast
,
1101 HTMLCurrentStyle2_get_textKashidaSpace
,
1102 HTMLCurrentStyle2_get_isBlock
1105 /* IHTMLCurrentStyle3 */
1106 static HRESULT WINAPI
HTMLCurrentStyle3_QueryInterface(IHTMLCurrentStyle3
*iface
, REFIID riid
, void **ppv
)
1108 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1110 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
1113 static ULONG WINAPI
HTMLCurrentStyle3_AddRef(IHTMLCurrentStyle3
*iface
)
1115 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1117 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
1120 static ULONG WINAPI
HTMLCurrentStyle3_Release(IHTMLCurrentStyle3
*iface
)
1122 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1123 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
1126 static HRESULT WINAPI
HTMLCurrentStyle3_GetTypeInfoCount(IHTMLCurrentStyle3
*iface
, UINT
*pctinfo
)
1128 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1129 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
1132 static HRESULT WINAPI
HTMLCurrentStyle3_GetTypeInfo(IHTMLCurrentStyle3
*iface
, UINT iTInfo
,
1133 LCID lcid
, ITypeInfo
**ppTInfo
)
1135 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1136 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
1139 static HRESULT WINAPI
HTMLCurrentStyle3_GetIDsOfNames(IHTMLCurrentStyle3
*iface
, REFIID riid
,
1140 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
1142 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1143 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
1147 static HRESULT WINAPI
HTMLCurrentStyle3_Invoke(IHTMLCurrentStyle3
*iface
, DISPID dispIdMember
,
1148 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1149 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1151 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1152 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
1153 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1156 static HRESULT WINAPI
HTMLCurrentStyle3_get_textOverflow(IHTMLCurrentStyle3
*iface
, BSTR
*p
)
1158 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1159 FIXME("(%p)->(%p)\n", This
, p
);
1163 static HRESULT WINAPI
HTMLCurrentStyle3_get_minHeight(IHTMLCurrentStyle3
*iface
, VARIANT
*p
)
1165 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1166 FIXME("(%p)->(%p)\n", This
, p
);
1170 static HRESULT WINAPI
HTMLCurrentStyle3_get_wordSpacing(IHTMLCurrentStyle3
*iface
, VARIANT
*p
)
1172 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1173 FIXME("(%p)->(%p)\n", This
, p
);
1177 static HRESULT WINAPI
HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3
*iface
, BSTR
*p
)
1179 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle3(iface
);
1180 FIXME("(%p)->(%p)\n", This
, p
);
1184 static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl
= {
1185 HTMLCurrentStyle3_QueryInterface
,
1186 HTMLCurrentStyle3_AddRef
,
1187 HTMLCurrentStyle3_Release
,
1188 HTMLCurrentStyle3_GetTypeInfoCount
,
1189 HTMLCurrentStyle3_GetTypeInfo
,
1190 HTMLCurrentStyle3_GetIDsOfNames
,
1191 HTMLCurrentStyle3_Invoke
,
1192 HTMLCurrentStyle3_get_textOverflow
,
1193 HTMLCurrentStyle3_get_minHeight
,
1194 HTMLCurrentStyle3_get_wordSpacing
,
1195 HTMLCurrentStyle3_get_whiteSpace
1198 /* IHTMLCurrentStyle4 */
1199 static HRESULT WINAPI
HTMLCurrentStyle4_QueryInterface(IHTMLCurrentStyle4
*iface
, REFIID riid
, void **ppv
)
1201 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1203 return IHTMLCurrentStyle_QueryInterface(&This
->IHTMLCurrentStyle_iface
, riid
, ppv
);
1206 static ULONG WINAPI
HTMLCurrentStyle4_AddRef(IHTMLCurrentStyle4
*iface
)
1208 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1210 return IHTMLCurrentStyle_AddRef(&This
->IHTMLCurrentStyle_iface
);
1213 static ULONG WINAPI
HTMLCurrentStyle4_Release(IHTMLCurrentStyle4
*iface
)
1215 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1216 return IHTMLCurrentStyle_Release(&This
->IHTMLCurrentStyle_iface
);
1219 static HRESULT WINAPI
HTMLCurrentStyle4_GetTypeInfoCount(IHTMLCurrentStyle4
*iface
, UINT
*pctinfo
)
1221 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1222 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
1225 static HRESULT WINAPI
HTMLCurrentStyle4_GetTypeInfo(IHTMLCurrentStyle4
*iface
, UINT iTInfo
,
1226 LCID lcid
, ITypeInfo
**ppTInfo
)
1228 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1229 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
1232 static HRESULT WINAPI
HTMLCurrentStyle4_GetIDsOfNames(IHTMLCurrentStyle4
*iface
, REFIID riid
,
1233 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
1235 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1236 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
1240 static HRESULT WINAPI
HTMLCurrentStyle4_Invoke(IHTMLCurrentStyle4
*iface
, DISPID dispIdMember
,
1241 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1242 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1244 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1245 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
1246 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1249 static HRESULT WINAPI
HTMLCurrentStyle4_msInterpolationMode(IHTMLCurrentStyle4
*iface
, BSTR
*p
)
1251 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1252 FIXME("(%p)->(%p)\n", This
, p
);
1256 static HRESULT WINAPI
HTMLCurrentStyle4_get_maxHeight(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1258 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1259 FIXME("(%p)->(%p)\n", This
, p
);
1263 static HRESULT WINAPI
HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1265 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1266 FIXME("(%p)->(%p)\n", This
, p
);
1270 static HRESULT WINAPI
HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4
*iface
, VARIANT
*p
)
1272 HTMLCurrentStyle
*This
= impl_from_IHTMLCurrentStyle4(iface
);
1273 FIXME("(%p)->(%p)\n", This
, p
);
1277 static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl
= {
1278 HTMLCurrentStyle4_QueryInterface
,
1279 HTMLCurrentStyle4_AddRef
,
1280 HTMLCurrentStyle4_Release
,
1281 HTMLCurrentStyle4_GetTypeInfoCount
,
1282 HTMLCurrentStyle4_GetTypeInfo
,
1283 HTMLCurrentStyle4_GetIDsOfNames
,
1284 HTMLCurrentStyle4_Invoke
,
1285 HTMLCurrentStyle4_msInterpolationMode
,
1286 HTMLCurrentStyle4_get_maxHeight
,
1287 HTMLCurrentStyle4_get_minWidth
,
1288 HTMLCurrentStyle4_get_maxWidth
1291 static const tid_t HTMLCurrentStyle_iface_tids
[] = {
1292 IHTMLCurrentStyle_tid
,
1293 IHTMLCurrentStyle2_tid
,
1294 IHTMLCurrentStyle3_tid
,
1295 IHTMLCurrentStyle4_tid
,
1298 static dispex_static_data_t HTMLCurrentStyle_dispex
= {
1300 DispHTMLCurrentStyle_tid
,
1302 HTMLCurrentStyle_iface_tids
1305 HRESULT
HTMLCurrentStyle_Create(HTMLElement
*elem
, IHTMLCurrentStyle
**p
)
1307 nsIDOMCSSStyleDeclaration
*nsstyle
;
1308 nsIDOMWindow
*nsview
;
1309 nsAString nsempty_str
;
1310 HTMLCurrentStyle
*ret
;
1313 if(!elem
->node
.doc
->nsdoc
) {
1314 WARN("NULL nsdoc\n");
1315 return E_UNEXPECTED
;
1318 nsres
= nsIDOMHTMLDocument_GetDefaultView(elem
->node
.doc
->nsdoc
, &nsview
);
1319 if(NS_FAILED(nsres
)) {
1320 ERR("GetDefaultView failed: %08x\n", nsres
);
1324 nsAString_Init(&nsempty_str
, NULL
);
1325 nsres
= nsIDOMWindow_GetComputedStyle(nsview
, (nsIDOMElement
*)elem
->nselem
, &nsempty_str
, &nsstyle
);
1326 nsAString_Finish(&nsempty_str
);
1327 if(NS_FAILED(nsres
)) {
1328 ERR("GetComputedStyle failed: %08x\n", nsres
);
1332 ret
= heap_alloc_zero(sizeof(HTMLCurrentStyle
));
1334 nsIDOMCSSStyleDeclaration_Release(nsstyle
);
1335 return E_OUTOFMEMORY
;
1338 ret
->IHTMLCurrentStyle_iface
.lpVtbl
= &HTMLCurrentStyleVtbl
;
1339 ret
->IHTMLCurrentStyle2_iface
.lpVtbl
= &HTMLCurrentStyle2Vtbl
;
1340 ret
->IHTMLCurrentStyle3_iface
.lpVtbl
= &HTMLCurrentStyle3Vtbl
;
1341 ret
->IHTMLCurrentStyle4_iface
.lpVtbl
= &HTMLCurrentStyle4Vtbl
;
1343 ret
->nsstyle
= nsstyle
;
1345 init_dispex(&ret
->dispex
, (IUnknown
*)&ret
->IHTMLCurrentStyle_iface
, &HTMLCurrentStyle_dispex
);
1347 IHTMLElement_AddRef(&elem
->IHTMLElement_iface
);
1350 *p
= &ret
->IHTMLCurrentStyle_iface
;