2 * Copyright 2008 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #include "mshtml_private.h"
29 #include "htmlstyle.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
35 static inline HTMLStyle *impl_from_IHTMLStyle2(IHTMLStyle2 *iface)
37 return CONTAINING_RECORD(iface, HTMLStyle, IHTMLStyle2_iface);
40 static HRESULT WINAPI HTMLStyle2_QueryInterface(IHTMLStyle2 *iface, REFIID riid, void **ppv)
42 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
44 return IHTMLStyle_QueryInterface(&This->IHTMLStyle_iface, riid, ppv);
47 static ULONG WINAPI HTMLStyle2_AddRef(IHTMLStyle2 *iface)
49 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
51 return IHTMLStyle_AddRef(&This->IHTMLStyle_iface);
54 static ULONG WINAPI HTMLStyle2_Release(IHTMLStyle2 *iface)
56 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
58 return IHTMLStyle_Release(&This->IHTMLStyle_iface);
61 static HRESULT WINAPI HTMLStyle2_GetTypeInfoCount(IHTMLStyle2 *iface, UINT *pctinfo)
63 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
64 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
67 static HRESULT WINAPI HTMLStyle2_GetTypeInfo(IHTMLStyle2 *iface, UINT iTInfo,
68 LCID lcid, ITypeInfo **ppTInfo)
70 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
71 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
74 static HRESULT WINAPI HTMLStyle2_GetIDsOfNames(IHTMLStyle2 *iface, REFIID riid,
75 LPOLESTR *rgszNames, UINT cNames,
76 LCID lcid, DISPID *rgDispId)
78 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
79 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
83 static HRESULT WINAPI HTMLStyle2_Invoke(IHTMLStyle2 *iface, DISPID dispIdMember,
84 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
85 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
87 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
88 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
89 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
92 static HRESULT WINAPI HTMLStyle2_put_tableLayout(IHTMLStyle2 *iface, BSTR v)
94 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
95 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
99 static HRESULT WINAPI HTMLStyle2_get_tableLayout(IHTMLStyle2 *iface, BSTR *p)
101 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
102 FIXME("(%p)->(%p)\n", This, p);
106 static HRESULT WINAPI HTMLStyle2_put_borderCollapse(IHTMLStyle2 *iface, BSTR v)
108 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
109 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
113 static HRESULT WINAPI HTMLStyle2_get_borderCollapse(IHTMLStyle2 *iface, BSTR *p)
115 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
116 FIXME("(%p)->(%p)\n", This, p);
120 static HRESULT WINAPI HTMLStyle2_put_direction(IHTMLStyle2 *iface, BSTR v)
122 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
124 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
126 return set_nsstyle_attr(This->nsstyle, STYLEID_DIRECTION, v, 0);
129 static HRESULT WINAPI HTMLStyle2_get_direction(IHTMLStyle2 *iface, BSTR *p)
131 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
133 TRACE("(%p)->(%p)\n", This, p);
135 return get_nsstyle_attr(This->nsstyle, STYLEID_DIRECTION, p, 0);
138 static HRESULT WINAPI HTMLStyle2_put_behavior(IHTMLStyle2 *iface, BSTR v)
140 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
141 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
145 static HRESULT WINAPI HTMLStyle2_get_behavior(IHTMLStyle2 *iface, BSTR *p)
147 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
148 FIXME("(%p)->(%p)\n", This, p);
152 static HRESULT WINAPI HTMLStyle2_setExpression(IHTMLStyle2 *iface, BSTR propname, BSTR expression, BSTR language)
154 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
155 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression), debugstr_w(language));
159 static HRESULT WINAPI HTMLStyle2_getExpression(IHTMLStyle2 *iface, BSTR propname, VARIANT *expression)
161 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
162 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
166 static HRESULT WINAPI HTMLStyle2_removeExpression(IHTMLStyle2 *iface, BSTR propname, VARIANT_BOOL *pfSuccess)
168 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
169 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
173 static HRESULT WINAPI HTMLStyle2_put_position(IHTMLStyle2 *iface, BSTR v)
175 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
177 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
179 return set_nsstyle_attr(This->nsstyle, STYLEID_POSITION, v, 0);
182 static HRESULT WINAPI HTMLStyle2_get_position(IHTMLStyle2 *iface, BSTR *p)
184 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
186 TRACE("(%p)->(%p)\n", This, p);
188 return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p, 0);
191 static HRESULT WINAPI HTMLStyle2_put_unicodeBidi(IHTMLStyle2 *iface, BSTR v)
193 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
194 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
198 static HRESULT WINAPI HTMLStyle2_get_unicodeBidi(IHTMLStyle2 *iface, BSTR *p)
200 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
201 FIXME("(%p)->(%p)\n", This, p);
205 static HRESULT WINAPI HTMLStyle2_put_bottom(IHTMLStyle2 *iface, VARIANT v)
207 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
208 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
212 static HRESULT WINAPI HTMLStyle2_get_bottom(IHTMLStyle2 *iface, VARIANT *p)
214 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
215 FIXME("(%p)->(%p)\n", This, p);
219 static HRESULT WINAPI HTMLStyle2_put_right(IHTMLStyle2 *iface, VARIANT v)
221 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
223 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
225 return set_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, &v, 0);
228 static HRESULT WINAPI HTMLStyle2_get_right(IHTMLStyle2 *iface, VARIANT *p)
230 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
232 TRACE("(%p)->(%p)\n", This, p);
234 return get_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, p, 0);
237 static HRESULT WINAPI HTMLStyle2_put_pixelBottom(IHTMLStyle2 *iface, LONG v)
239 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
240 FIXME("(%p)->(%d)\n", This, v);
244 static HRESULT WINAPI HTMLStyle2_get_pixelBottom(IHTMLStyle2 *iface, LONG *p)
246 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
247 FIXME("(%p)->(%p)\n", This, p);
251 static HRESULT WINAPI HTMLStyle2_put_pixelRight(IHTMLStyle2 *iface, LONG v)
253 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
254 FIXME("(%p)->(%d)\n", This, v);
258 static HRESULT WINAPI HTMLStyle2_get_pixelRight(IHTMLStyle2 *iface, LONG *p)
260 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
261 FIXME("(%p)->(%p)\n", This, p);
265 static HRESULT WINAPI HTMLStyle2_put_posBottom(IHTMLStyle2 *iface, float v)
267 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
268 FIXME("(%p)->(%f)\n", This, v);
272 static HRESULT WINAPI HTMLStyle2_get_posBottom(IHTMLStyle2 *iface, float *p)
274 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
275 FIXME("(%p)->(%p)\n", This, p);
279 static HRESULT WINAPI HTMLStyle2_put_posRight(IHTMLStyle2 *iface, float v)
281 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
282 FIXME("(%p)->(%f)\n", This, v);
286 static HRESULT WINAPI HTMLStyle2_get_posRight(IHTMLStyle2 *iface, float *p)
288 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
289 FIXME("(%p)->(%p)\n", This, p);
293 static HRESULT WINAPI HTMLStyle2_put_imeMode(IHTMLStyle2 *iface, BSTR v)
295 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
296 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
300 static HRESULT WINAPI HTMLStyle2_get_imeMode(IHTMLStyle2 *iface, BSTR *p)
302 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
303 FIXME("(%p)->(%p)\n", This, p);
307 static HRESULT WINAPI HTMLStyle2_put_rubyAlign(IHTMLStyle2 *iface, BSTR v)
309 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
310 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
314 static HRESULT WINAPI HTMLStyle2_get_rubyAlign(IHTMLStyle2 *iface, BSTR *p)
316 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
317 FIXME("(%p)->(%p)\n", This, p);
321 static HRESULT WINAPI HTMLStyle2_put_rubyPosition(IHTMLStyle2 *iface, BSTR v)
323 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
324 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
328 static HRESULT WINAPI HTMLStyle2_get_rubyPosition(IHTMLStyle2 *iface, BSTR *p)
330 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
331 FIXME("(%p)->(%p)\n", This, p);
335 static HRESULT WINAPI HTMLStyle2_put_rubyOverhang(IHTMLStyle2 *iface, BSTR v)
337 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
338 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
342 static HRESULT WINAPI HTMLStyle2_get_rubyOverhang(IHTMLStyle2 *iface, BSTR *p)
344 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
345 FIXME("(%p)->(%p)\n", This, p);
349 static HRESULT WINAPI HTMLStyle2_put_layoutGridChar(IHTMLStyle2 *iface, VARIANT v)
351 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
352 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
356 static HRESULT WINAPI HTMLStyle2_get_layoutGridChar(IHTMLStyle2 *iface, VARIANT *p)
358 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
359 FIXME("(%p)->(%p)\n", This, p);
363 static HRESULT WINAPI HTMLStyle2_put_layoutGridLine(IHTMLStyle2 *iface, VARIANT v)
365 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
366 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
370 static HRESULT WINAPI HTMLStyle2_get_layoutGridLine(IHTMLStyle2 *iface, VARIANT *p)
372 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
373 FIXME("(%p)->(%p)\n", This, p);
377 static HRESULT WINAPI HTMLStyle2_put_layoutGridMode(IHTMLStyle2 *iface, BSTR v)
379 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
380 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
384 static HRESULT WINAPI HTMLStyle2_get_layoutGridMode(IHTMLStyle2 *iface, BSTR *p)
386 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
387 FIXME("(%p)->(%p)\n", This, p);
391 static HRESULT WINAPI HTMLStyle2_put_layoutGridType(IHTMLStyle2 *iface, BSTR v)
393 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
394 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
398 static HRESULT WINAPI HTMLStyle2_get_layoutGridType(IHTMLStyle2 *iface, BSTR *p)
400 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
401 FIXME("(%p)->(%p)\n", This, p);
405 static HRESULT WINAPI HTMLStyle2_put_layoutGrid(IHTMLStyle2 *iface, BSTR v)
407 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
408 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
412 static HRESULT WINAPI HTMLStyle2_get_layoutGrid(IHTMLStyle2 *iface, BSTR *p)
414 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
415 FIXME("(%p)->(%p)\n", This, p);
419 static HRESULT WINAPI HTMLStyle2_put_wordBreak(IHTMLStyle2 *iface, BSTR v)
421 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
422 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
426 static HRESULT WINAPI HTMLStyle2_get_wordBreak(IHTMLStyle2 *iface, BSTR *p)
428 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
429 FIXME("(%p)->(%p)\n", This, p);
433 static HRESULT WINAPI HTMLStyle2_put_lineBreak(IHTMLStyle2 *iface, BSTR v)
435 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
436 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
440 static HRESULT WINAPI HTMLStyle2_get_lineBreak(IHTMLStyle2 *iface, BSTR *p)
442 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
443 FIXME("(%p)->(%p)\n", This, p);
447 static HRESULT WINAPI HTMLStyle2_put_textJustify(IHTMLStyle2 *iface, BSTR v)
449 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
450 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
454 static HRESULT WINAPI HTMLStyle2_get_textJustify(IHTMLStyle2 *iface, BSTR *p)
456 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
457 FIXME("(%p)->(%p)\n", This, p);
461 static HRESULT WINAPI HTMLStyle2_put_textJustifyTrim(IHTMLStyle2 *iface, BSTR v)
463 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
464 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
468 static HRESULT WINAPI HTMLStyle2_get_textJustifyTrim(IHTMLStyle2 *iface, BSTR *p)
470 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
471 FIXME("(%p)->(%p)\n", This, p);
475 static HRESULT WINAPI HTMLStyle2_put_textKashida(IHTMLStyle2 *iface, VARIANT v)
477 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
478 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
482 static HRESULT WINAPI HTMLStyle2_get_textKashida(IHTMLStyle2 *iface, VARIANT *p)
484 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
485 FIXME("(%p)->(%p)\n", This, p);
489 static HRESULT WINAPI HTMLStyle2_put_textAutospace(IHTMLStyle2 *iface, BSTR v)
491 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
492 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
496 static HRESULT WINAPI HTMLStyle2_get_textAutospace(IHTMLStyle2 *iface, BSTR *p)
498 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
499 FIXME("(%p)->(%p)\n", This, p);
503 static HRESULT WINAPI HTMLStyle2_put_overflowX(IHTMLStyle2 *iface, BSTR v)
505 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
506 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
510 static HRESULT WINAPI HTMLStyle2_get_overflowX(IHTMLStyle2 *iface, BSTR *p)
512 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
513 FIXME("(%p)->(%p)\n", This, p);
517 static HRESULT WINAPI HTMLStyle2_put_overflowY(IHTMLStyle2 *iface, BSTR v)
519 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
520 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
524 static HRESULT WINAPI HTMLStyle2_get_overflowY(IHTMLStyle2 *iface, BSTR *p)
526 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
527 FIXME("(%p)->(%p)\n", This, p);
531 static HRESULT WINAPI HTMLStyle2_put_accelerator(IHTMLStyle2 *iface, BSTR v)
533 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
534 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
538 static HRESULT WINAPI HTMLStyle2_get_accelerator(IHTMLStyle2 *iface, BSTR *p)
540 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
541 FIXME("(%p)->(%p)\n", This, p);
545 static const IHTMLStyle2Vtbl HTMLStyle2Vtbl = {
546 HTMLStyle2_QueryInterface,
549 HTMLStyle2_GetTypeInfoCount,
550 HTMLStyle2_GetTypeInfo,
551 HTMLStyle2_GetIDsOfNames,
553 HTMLStyle2_put_tableLayout,
554 HTMLStyle2_get_tableLayout,
555 HTMLStyle2_put_borderCollapse,
556 HTMLStyle2_get_borderCollapse,
557 HTMLStyle2_put_direction,
558 HTMLStyle2_get_direction,
559 HTMLStyle2_put_behavior,
560 HTMLStyle2_get_behavior,
561 HTMLStyle2_setExpression,
562 HTMLStyle2_getExpression,
563 HTMLStyle2_removeExpression,
564 HTMLStyle2_put_position,
565 HTMLStyle2_get_position,
566 HTMLStyle2_put_unicodeBidi,
567 HTMLStyle2_get_unicodeBidi,
568 HTMLStyle2_put_bottom,
569 HTMLStyle2_get_bottom,
570 HTMLStyle2_put_right,
571 HTMLStyle2_get_right,
572 HTMLStyle2_put_pixelBottom,
573 HTMLStyle2_get_pixelBottom,
574 HTMLStyle2_put_pixelRight,
575 HTMLStyle2_get_pixelRight,
576 HTMLStyle2_put_posBottom,
577 HTMLStyle2_get_posBottom,
578 HTMLStyle2_put_posRight,
579 HTMLStyle2_get_posRight,
580 HTMLStyle2_put_imeMode,
581 HTMLStyle2_get_imeMode,
582 HTMLStyle2_put_rubyAlign,
583 HTMLStyle2_get_rubyAlign,
584 HTMLStyle2_put_rubyPosition,
585 HTMLStyle2_get_rubyPosition,
586 HTMLStyle2_put_rubyOverhang,
587 HTMLStyle2_get_rubyOverhang,
588 HTMLStyle2_put_layoutGridChar,
589 HTMLStyle2_get_layoutGridChar,
590 HTMLStyle2_put_layoutGridLine,
591 HTMLStyle2_get_layoutGridLine,
592 HTMLStyle2_put_layoutGridMode,
593 HTMLStyle2_get_layoutGridMode,
594 HTMLStyle2_put_layoutGridType,
595 HTMLStyle2_get_layoutGridType,
596 HTMLStyle2_put_layoutGrid,
597 HTMLStyle2_get_layoutGrid,
598 HTMLStyle2_put_wordBreak,
599 HTMLStyle2_get_wordBreak,
600 HTMLStyle2_put_lineBreak,
601 HTMLStyle2_get_lineBreak,
602 HTMLStyle2_put_textJustify,
603 HTMLStyle2_get_textJustify,
604 HTMLStyle2_put_textJustifyTrim,
605 HTMLStyle2_get_textJustifyTrim,
606 HTMLStyle2_put_textKashida,
607 HTMLStyle2_get_textKashida,
608 HTMLStyle2_put_textAutospace,
609 HTMLStyle2_get_textAutospace,
610 HTMLStyle2_put_overflowX,
611 HTMLStyle2_get_overflowX,
612 HTMLStyle2_put_overflowY,
613 HTMLStyle2_get_overflowY,
614 HTMLStyle2_put_accelerator,
615 HTMLStyle2_get_accelerator
618 void HTMLStyle2_Init(HTMLStyle *This)
620 This->IHTMLStyle2_iface.lpVtbl = &HTMLStyle2Vtbl;