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"
32 #include "wine/unicode.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
36 static inline HTMLStyle *impl_from_IHTMLStyle2(IHTMLStyle2 *iface)
38 return CONTAINING_RECORD(iface, HTMLStyle, IHTMLStyle2_iface);
41 static HRESULT WINAPI HTMLStyle2_QueryInterface(IHTMLStyle2 *iface, REFIID riid, void **ppv)
43 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
45 return IHTMLStyle_QueryInterface(&This->IHTMLStyle_iface, riid, ppv);
48 static ULONG WINAPI HTMLStyle2_AddRef(IHTMLStyle2 *iface)
50 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
52 return IHTMLStyle_AddRef(&This->IHTMLStyle_iface);
55 static ULONG WINAPI HTMLStyle2_Release(IHTMLStyle2 *iface)
57 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
59 return IHTMLStyle_Release(&This->IHTMLStyle_iface);
62 static HRESULT WINAPI HTMLStyle2_GetTypeInfoCount(IHTMLStyle2 *iface, UINT *pctinfo)
64 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
65 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
68 static HRESULT WINAPI HTMLStyle2_GetTypeInfo(IHTMLStyle2 *iface, UINT iTInfo,
69 LCID lcid, ITypeInfo **ppTInfo)
71 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
72 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
75 static HRESULT WINAPI HTMLStyle2_GetIDsOfNames(IHTMLStyle2 *iface, REFIID riid,
76 LPOLESTR *rgszNames, UINT cNames,
77 LCID lcid, DISPID *rgDispId)
79 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
80 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
84 static HRESULT WINAPI HTMLStyle2_Invoke(IHTMLStyle2 *iface, DISPID dispIdMember,
85 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
86 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
88 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
89 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
90 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
93 static HRESULT WINAPI HTMLStyle2_put_tableLayout(IHTMLStyle2 *iface, BSTR v)
95 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
96 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
100 static HRESULT WINAPI HTMLStyle2_get_tableLayout(IHTMLStyle2 *iface, BSTR *p)
102 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
103 FIXME("(%p)->(%p)\n", This, p);
107 static HRESULT WINAPI HTMLStyle2_put_borderCollapse(IHTMLStyle2 *iface, BSTR v)
109 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
110 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
114 static HRESULT WINAPI HTMLStyle2_get_borderCollapse(IHTMLStyle2 *iface, BSTR *p)
116 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
117 FIXME("(%p)->(%p)\n", This, p);
121 static HRESULT WINAPI HTMLStyle2_put_direction(IHTMLStyle2 *iface, BSTR v)
123 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
125 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
127 return set_nsstyle_attr(This->nsstyle, STYLEID_DIRECTION, v, 0);
130 static HRESULT WINAPI HTMLStyle2_get_direction(IHTMLStyle2 *iface, BSTR *p)
132 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
134 TRACE("(%p)->(%p)\n", This, p);
136 return get_nsstyle_attr(This->nsstyle, STYLEID_DIRECTION, p, 0);
139 static HRESULT WINAPI HTMLStyle2_put_behavior(IHTMLStyle2 *iface, BSTR v)
141 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
142 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
146 static HRESULT WINAPI HTMLStyle2_get_behavior(IHTMLStyle2 *iface, BSTR *p)
148 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
149 FIXME("(%p)->(%p)\n", This, p);
153 static HRESULT WINAPI HTMLStyle2_setExpression(IHTMLStyle2 *iface, BSTR propname, BSTR expression, BSTR language)
155 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
156 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression), debugstr_w(language));
160 static HRESULT WINAPI HTMLStyle2_getExpression(IHTMLStyle2 *iface, BSTR propname, VARIANT *expression)
162 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
163 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
167 static HRESULT WINAPI HTMLStyle2_removeExpression(IHTMLStyle2 *iface, BSTR propname, VARIANT_BOOL *pfSuccess)
169 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
170 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
174 static HRESULT WINAPI HTMLStyle2_put_position(IHTMLStyle2 *iface, BSTR v)
176 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
178 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
180 return set_nsstyle_attr(This->nsstyle, STYLEID_POSITION, v, 0);
183 static HRESULT WINAPI HTMLStyle2_get_position(IHTMLStyle2 *iface, BSTR *p)
185 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
187 TRACE("(%p)->(%p)\n", This, p);
189 return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p, 0);
192 static HRESULT WINAPI HTMLStyle2_put_unicodeBidi(IHTMLStyle2 *iface, BSTR v)
194 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
195 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
199 static HRESULT WINAPI HTMLStyle2_get_unicodeBidi(IHTMLStyle2 *iface, BSTR *p)
201 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
202 FIXME("(%p)->(%p)\n", This, p);
206 static HRESULT WINAPI HTMLStyle2_put_bottom(IHTMLStyle2 *iface, VARIANT v)
208 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
209 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
213 static HRESULT WINAPI HTMLStyle2_get_bottom(IHTMLStyle2 *iface, VARIANT *p)
215 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
216 FIXME("(%p)->(%p)\n", This, p);
220 static HRESULT WINAPI HTMLStyle2_put_right(IHTMLStyle2 *iface, VARIANT v)
222 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
224 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
226 return set_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, &v, 0);
229 static HRESULT WINAPI HTMLStyle2_get_right(IHTMLStyle2 *iface, VARIANT *p)
231 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
233 TRACE("(%p)->(%p)\n", This, p);
235 return get_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, p, 0);
238 static HRESULT WINAPI HTMLStyle2_put_pixelBottom(IHTMLStyle2 *iface, LONG v)
240 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
241 FIXME("(%p)->(%d)\n", This, v);
245 static HRESULT WINAPI HTMLStyle2_get_pixelBottom(IHTMLStyle2 *iface, LONG *p)
247 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
248 FIXME("(%p)->(%p)\n", This, p);
252 static HRESULT WINAPI HTMLStyle2_put_pixelRight(IHTMLStyle2 *iface, LONG v)
254 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
255 FIXME("(%p)->(%d)\n", This, v);
259 static HRESULT WINAPI HTMLStyle2_get_pixelRight(IHTMLStyle2 *iface, LONG *p)
261 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
262 FIXME("(%p)->(%p)\n", This, p);
266 static HRESULT WINAPI HTMLStyle2_put_posBottom(IHTMLStyle2 *iface, float v)
268 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
269 FIXME("(%p)->(%f)\n", This, v);
273 static HRESULT WINAPI HTMLStyle2_get_posBottom(IHTMLStyle2 *iface, float *p)
275 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
276 FIXME("(%p)->(%p)\n", This, p);
280 static HRESULT WINAPI HTMLStyle2_put_posRight(IHTMLStyle2 *iface, float v)
282 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
283 FIXME("(%p)->(%f)\n", This, v);
287 static HRESULT WINAPI HTMLStyle2_get_posRight(IHTMLStyle2 *iface, float *p)
289 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
290 FIXME("(%p)->(%p)\n", This, p);
294 static HRESULT WINAPI HTMLStyle2_put_imeMode(IHTMLStyle2 *iface, BSTR v)
296 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
297 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
301 static HRESULT WINAPI HTMLStyle2_get_imeMode(IHTMLStyle2 *iface, BSTR *p)
303 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
304 FIXME("(%p)->(%p)\n", This, p);
308 static HRESULT WINAPI HTMLStyle2_put_rubyAlign(IHTMLStyle2 *iface, BSTR v)
310 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
311 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
315 static HRESULT WINAPI HTMLStyle2_get_rubyAlign(IHTMLStyle2 *iface, BSTR *p)
317 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
318 FIXME("(%p)->(%p)\n", This, p);
322 static HRESULT WINAPI HTMLStyle2_put_rubyPosition(IHTMLStyle2 *iface, BSTR v)
324 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
325 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
329 static HRESULT WINAPI HTMLStyle2_get_rubyPosition(IHTMLStyle2 *iface, BSTR *p)
331 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
332 FIXME("(%p)->(%p)\n", This, p);
336 static HRESULT WINAPI HTMLStyle2_put_rubyOverhang(IHTMLStyle2 *iface, BSTR v)
338 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
339 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
343 static HRESULT WINAPI HTMLStyle2_get_rubyOverhang(IHTMLStyle2 *iface, BSTR *p)
345 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
346 FIXME("(%p)->(%p)\n", This, p);
350 static HRESULT WINAPI HTMLStyle2_put_layoutGridChar(IHTMLStyle2 *iface, VARIANT v)
352 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
353 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
357 static HRESULT WINAPI HTMLStyle2_get_layoutGridChar(IHTMLStyle2 *iface, VARIANT *p)
359 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
360 FIXME("(%p)->(%p)\n", This, p);
364 static HRESULT WINAPI HTMLStyle2_put_layoutGridLine(IHTMLStyle2 *iface, VARIANT v)
366 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
367 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
371 static HRESULT WINAPI HTMLStyle2_get_layoutGridLine(IHTMLStyle2 *iface, VARIANT *p)
373 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
374 FIXME("(%p)->(%p)\n", This, p);
378 static HRESULT WINAPI HTMLStyle2_put_layoutGridMode(IHTMLStyle2 *iface, BSTR v)
380 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
381 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
385 static HRESULT WINAPI HTMLStyle2_get_layoutGridMode(IHTMLStyle2 *iface, BSTR *p)
387 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
388 FIXME("(%p)->(%p)\n", This, p);
392 static HRESULT WINAPI HTMLStyle2_put_layoutGridType(IHTMLStyle2 *iface, BSTR v)
394 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
395 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
399 static HRESULT WINAPI HTMLStyle2_get_layoutGridType(IHTMLStyle2 *iface, BSTR *p)
401 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
402 FIXME("(%p)->(%p)\n", This, p);
406 static HRESULT WINAPI HTMLStyle2_put_layoutGrid(IHTMLStyle2 *iface, BSTR v)
408 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
409 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
413 static HRESULT WINAPI HTMLStyle2_get_layoutGrid(IHTMLStyle2 *iface, BSTR *p)
415 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
416 FIXME("(%p)->(%p)\n", This, p);
420 static HRESULT WINAPI HTMLStyle2_put_wordBreak(IHTMLStyle2 *iface, BSTR v)
422 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
423 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
427 static HRESULT WINAPI HTMLStyle2_get_wordBreak(IHTMLStyle2 *iface, BSTR *p)
429 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
430 FIXME("(%p)->(%p)\n", This, p);
434 static HRESULT WINAPI HTMLStyle2_put_lineBreak(IHTMLStyle2 *iface, BSTR v)
436 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
437 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
441 static HRESULT WINAPI HTMLStyle2_get_lineBreak(IHTMLStyle2 *iface, BSTR *p)
443 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
444 FIXME("(%p)->(%p)\n", This, p);
448 static HRESULT WINAPI HTMLStyle2_put_textJustify(IHTMLStyle2 *iface, BSTR v)
450 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
451 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
455 static HRESULT WINAPI HTMLStyle2_get_textJustify(IHTMLStyle2 *iface, BSTR *p)
457 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
458 FIXME("(%p)->(%p)\n", This, p);
462 static HRESULT WINAPI HTMLStyle2_put_textJustifyTrim(IHTMLStyle2 *iface, BSTR v)
464 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
465 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
469 static HRESULT WINAPI HTMLStyle2_get_textJustifyTrim(IHTMLStyle2 *iface, BSTR *p)
471 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
472 FIXME("(%p)->(%p)\n", This, p);
476 static HRESULT WINAPI HTMLStyle2_put_textKashida(IHTMLStyle2 *iface, VARIANT v)
478 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
479 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
483 static HRESULT WINAPI HTMLStyle2_get_textKashida(IHTMLStyle2 *iface, VARIANT *p)
485 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
486 FIXME("(%p)->(%p)\n", This, p);
490 static HRESULT WINAPI HTMLStyle2_put_textAutospace(IHTMLStyle2 *iface, BSTR v)
492 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
493 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
497 static HRESULT WINAPI HTMLStyle2_get_textAutospace(IHTMLStyle2 *iface, BSTR *p)
499 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
500 FIXME("(%p)->(%p)\n", This, p);
504 static HRESULT WINAPI HTMLStyle2_put_overflowX(IHTMLStyle2 *iface, BSTR v)
506 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
507 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
511 static HRESULT WINAPI HTMLStyle2_get_overflowX(IHTMLStyle2 *iface, BSTR *p)
513 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
514 FIXME("(%p)->(%p)\n", This, p);
518 static HRESULT WINAPI HTMLStyle2_put_overflowY(IHTMLStyle2 *iface, BSTR v)
520 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
521 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
525 static HRESULT WINAPI HTMLStyle2_get_overflowY(IHTMLStyle2 *iface, BSTR *p)
527 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
528 FIXME("(%p)->(%p)\n", This, p);
532 static HRESULT WINAPI HTMLStyle2_put_accelerator(IHTMLStyle2 *iface, BSTR v)
534 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
535 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
539 static HRESULT WINAPI HTMLStyle2_get_accelerator(IHTMLStyle2 *iface, BSTR *p)
541 HTMLStyle *This = impl_from_IHTMLStyle2(iface);
542 FIXME("(%p)->(%p)\n", This, p);
546 static const IHTMLStyle2Vtbl HTMLStyle2Vtbl = {
547 HTMLStyle2_QueryInterface,
550 HTMLStyle2_GetTypeInfoCount,
551 HTMLStyle2_GetTypeInfo,
552 HTMLStyle2_GetIDsOfNames,
554 HTMLStyle2_put_tableLayout,
555 HTMLStyle2_get_tableLayout,
556 HTMLStyle2_put_borderCollapse,
557 HTMLStyle2_get_borderCollapse,
558 HTMLStyle2_put_direction,
559 HTMLStyle2_get_direction,
560 HTMLStyle2_put_behavior,
561 HTMLStyle2_get_behavior,
562 HTMLStyle2_setExpression,
563 HTMLStyle2_getExpression,
564 HTMLStyle2_removeExpression,
565 HTMLStyle2_put_position,
566 HTMLStyle2_get_position,
567 HTMLStyle2_put_unicodeBidi,
568 HTMLStyle2_get_unicodeBidi,
569 HTMLStyle2_put_bottom,
570 HTMLStyle2_get_bottom,
571 HTMLStyle2_put_right,
572 HTMLStyle2_get_right,
573 HTMLStyle2_put_pixelBottom,
574 HTMLStyle2_get_pixelBottom,
575 HTMLStyle2_put_pixelRight,
576 HTMLStyle2_get_pixelRight,
577 HTMLStyle2_put_posBottom,
578 HTMLStyle2_get_posBottom,
579 HTMLStyle2_put_posRight,
580 HTMLStyle2_get_posRight,
581 HTMLStyle2_put_imeMode,
582 HTMLStyle2_get_imeMode,
583 HTMLStyle2_put_rubyAlign,
584 HTMLStyle2_get_rubyAlign,
585 HTMLStyle2_put_rubyPosition,
586 HTMLStyle2_get_rubyPosition,
587 HTMLStyle2_put_rubyOverhang,
588 HTMLStyle2_get_rubyOverhang,
589 HTMLStyle2_put_layoutGridChar,
590 HTMLStyle2_get_layoutGridChar,
591 HTMLStyle2_put_layoutGridLine,
592 HTMLStyle2_get_layoutGridLine,
593 HTMLStyle2_put_layoutGridMode,
594 HTMLStyle2_get_layoutGridMode,
595 HTMLStyle2_put_layoutGridType,
596 HTMLStyle2_get_layoutGridType,
597 HTMLStyle2_put_layoutGrid,
598 HTMLStyle2_get_layoutGrid,
599 HTMLStyle2_put_wordBreak,
600 HTMLStyle2_get_wordBreak,
601 HTMLStyle2_put_lineBreak,
602 HTMLStyle2_get_lineBreak,
603 HTMLStyle2_put_textJustify,
604 HTMLStyle2_get_textJustify,
605 HTMLStyle2_put_textJustifyTrim,
606 HTMLStyle2_get_textJustifyTrim,
607 HTMLStyle2_put_textKashida,
608 HTMLStyle2_get_textKashida,
609 HTMLStyle2_put_textAutospace,
610 HTMLStyle2_get_textAutospace,
611 HTMLStyle2_put_overflowX,
612 HTMLStyle2_get_overflowX,
613 HTMLStyle2_put_overflowY,
614 HTMLStyle2_get_overflowY,
615 HTMLStyle2_put_accelerator,
616 HTMLStyle2_get_accelerator
619 void HTMLStyle2_Init(HTMLStyle *This)
621 This->IHTMLStyle2_iface.lpVtbl = &HTMLStyle2Vtbl;