2 * Copyright 2009 Alistair Leslie-Hughes
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 #define HTMLSTYLE3_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle3, iface)
38 static HRESULT WINAPI
HTMLStyle3_QueryInterface(IHTMLStyle3
*iface
, REFIID riid
, void **ppv
)
40 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
42 return IHTMLStyle_QueryInterface(HTMLSTYLE(This
), riid
, ppv
);
45 static ULONG WINAPI
HTMLStyle3_AddRef(IHTMLStyle3
*iface
)
47 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
49 return IHTMLStyle_AddRef(HTMLSTYLE(This
));
52 static ULONG WINAPI
HTMLStyle3_Release(IHTMLStyle3
*iface
)
54 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
56 return IHTMLStyle_Release(HTMLSTYLE(This
));
59 static HRESULT WINAPI
HTMLStyle3_GetTypeInfoCount(IHTMLStyle3
*iface
, UINT
*pctinfo
)
61 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
62 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This
->dispex
), pctinfo
);
65 static HRESULT WINAPI
HTMLStyle3_GetTypeInfo(IHTMLStyle3
*iface
, UINT iTInfo
,
66 LCID lcid
, ITypeInfo
**ppTInfo
)
68 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
69 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->dispex
), iTInfo
, lcid
, ppTInfo
);
72 static HRESULT WINAPI
HTMLStyle3_GetIDsOfNames(IHTMLStyle3
*iface
, REFIID riid
,
73 LPOLESTR
*rgszNames
, UINT cNames
,
74 LCID lcid
, DISPID
*rgDispId
)
76 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
77 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
80 static HRESULT WINAPI
HTMLStyle3_Invoke(IHTMLStyle3
*iface
, DISPID dispIdMember
,
81 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
82 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
84 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
85 return IDispatchEx_Invoke(DISPATCHEX(&This
->dispex
), dispIdMember
, riid
, lcid
,
86 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
89 static HRESULT WINAPI
HTMLStyle3_put_layoutFlow(IHTMLStyle3
*iface
, BSTR v
)
91 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
92 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
96 static HRESULT WINAPI
HTMLStyle3_get_layoutFlow(IHTMLStyle3
*iface
, BSTR
*p
)
98 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
99 FIXME("(%p)->(%p)\n", This
, p
);
103 static HRESULT WINAPI
HTMLStyle3_put_zoom(IHTMLStyle3
*iface
, VARIANT v
)
105 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
107 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
109 /* zoom property is IE CSS extension that is mostly used as a hack to workaround IE bugs.
110 * The value is set to 1 then. We can safely ignore setting zoom to 1. */
111 if(V_VT(&v
) == VT_I4
&& V_I4(&v
) == 1)
114 FIXME("stub for %s\n", debugstr_variant(&v
));
118 static HRESULT WINAPI
HTMLStyle3_get_zoom(IHTMLStyle3
*iface
, VARIANT
*p
)
120 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
121 FIXME("(%p)->(%p)\n", This
, p
);
125 static HRESULT WINAPI
HTMLStyle3_put_wordWrap(IHTMLStyle3
*iface
, BSTR v
)
127 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
129 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
131 return set_nsstyle_attr(This
->nsstyle
, STYLEID_WORD_WRAP
, v
, 0);
134 static HRESULT WINAPI
HTMLStyle3_get_wordWrap(IHTMLStyle3
*iface
, BSTR
*p
)
136 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
138 TRACE("(%p)->(%p)\n", This
, p
);
140 return get_nsstyle_attr(This
->nsstyle
, STYLEID_WORD_WRAP
, p
);
143 static HRESULT WINAPI
HTMLStyle3_put_textUnderlinePosition(IHTMLStyle3
*iface
, BSTR v
)
145 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
146 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
150 static HRESULT WINAPI
HTMLStyle3_get_textUnderlinePosition(IHTMLStyle3
*iface
, BSTR
*p
)
152 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
153 FIXME("(%p)->(%p)\n", This
, p
);
157 static HRESULT WINAPI
HTMLStyle3_put_scrollbarBaseColor(IHTMLStyle3
*iface
, VARIANT v
)
159 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
160 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
164 static HRESULT WINAPI
HTMLStyle3_get_scrollbarBaseColor(IHTMLStyle3
*iface
, VARIANT
*p
)
166 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
167 FIXME("(%p)->(%p)\n", This
, p
);
171 static HRESULT WINAPI
HTMLStyle3_put_scrollbarFaceColor(IHTMLStyle3
*iface
, VARIANT v
)
173 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
174 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
178 static HRESULT WINAPI
HTMLStyle3_get_scrollbarFaceColor(IHTMLStyle3
*iface
, VARIANT
*p
)
180 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
181 FIXME("(%p)->(%p)\n", This
, p
);
185 static HRESULT WINAPI
HTMLStyle3_put_scrollbar3dLightColor(IHTMLStyle3
*iface
, VARIANT v
)
187 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
188 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
192 static HRESULT WINAPI
HTMLStyle3_get_scrollbar3dLightColor(IHTMLStyle3
*iface
, VARIANT
*p
)
194 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
195 FIXME("(%p)->(%p)\n", This
, p
);
199 static HRESULT WINAPI
HTMLStyle3_put_scrollbarShadowColor(IHTMLStyle3
*iface
, VARIANT v
)
201 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
202 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
206 static HRESULT WINAPI
HTMLStyle3_get_scrollbarShadowColor(IHTMLStyle3
*iface
, VARIANT
*p
)
208 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
209 FIXME("(%p)->(%p)\n", This
, p
);
213 static HRESULT WINAPI
HTMLStyle3_put_scrollbarHighlightColor(IHTMLStyle3
*iface
, VARIANT v
)
215 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
216 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
220 static HRESULT WINAPI
HTMLStyle3_get_scrollbarHighlightColor(IHTMLStyle3
*iface
, VARIANT
*p
)
222 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
223 FIXME("(%p)->(%p)\n", This
, p
);
227 static HRESULT WINAPI
HTMLStyle3_put_scrollbarDarkShadowColor(IHTMLStyle3
*iface
, VARIANT v
)
229 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
230 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
234 static HRESULT WINAPI
HTMLStyle3_get_scrollbarDarkShadowColor(IHTMLStyle3
*iface
, VARIANT
*p
)
236 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
237 FIXME("(%p)->(%p)\n", This
, p
);
241 static HRESULT WINAPI
HTMLStyle3_put_scrollbarArrowColor(IHTMLStyle3
*iface
, VARIANT v
)
243 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
244 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
248 static HRESULT WINAPI
HTMLStyle3_get_scrollbarArrowColor(IHTMLStyle3
*iface
, VARIANT
*p
)
250 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
251 FIXME("(%p)->(%p)\n", This
, p
);
255 static HRESULT WINAPI
HTMLStyle3_put_scrollbarTrackColor(IHTMLStyle3
*iface
, VARIANT v
)
257 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
258 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
262 static HRESULT WINAPI
HTMLStyle3_get_scrollbarTrackColor(IHTMLStyle3
*iface
, VARIANT
*p
)
264 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
265 FIXME("(%p)->(%p)\n", This
, p
);
269 static HRESULT WINAPI
HTMLStyle3_put_writingMode(IHTMLStyle3
*iface
, BSTR v
)
271 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
272 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
276 static HRESULT WINAPI
HTMLStyle3_get_writingMode(IHTMLStyle3
*iface
, BSTR
*p
)
278 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
279 FIXME("(%p)->(%p)\n", This
, p
);
283 static HRESULT WINAPI
HTMLStyle3_put_textAlignLast(IHTMLStyle3
*iface
, BSTR v
)
285 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
286 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
290 static HRESULT WINAPI
HTMLStyle3_get_textAlignLast(IHTMLStyle3
*iface
, BSTR
*p
)
292 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
293 FIXME("(%p)->(%p)\n", This
, p
);
297 static HRESULT WINAPI
HTMLStyle3_put_textKashidaSpace(IHTMLStyle3
*iface
, VARIANT v
)
299 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
300 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
304 static HRESULT WINAPI
HTMLStyle3_get_textKashidaSpace(IHTMLStyle3
*iface
, VARIANT
*p
)
306 HTMLStyle
*This
= HTMLSTYLE3_THIS(iface
);
307 FIXME("(%p)->(%p)\n", This
, p
);
311 static const IHTMLStyle3Vtbl HTMLStyle3Vtbl
= {
312 HTMLStyle3_QueryInterface
,
315 HTMLStyle3_GetTypeInfoCount
,
316 HTMLStyle3_GetTypeInfo
,
317 HTMLStyle3_GetIDsOfNames
,
319 HTMLStyle3_put_layoutFlow
,
320 HTMLStyle3_get_layoutFlow
,
323 HTMLStyle3_put_wordWrap
,
324 HTMLStyle3_get_wordWrap
,
325 HTMLStyle3_put_textUnderlinePosition
,
326 HTMLStyle3_get_textUnderlinePosition
,
327 HTMLStyle3_put_scrollbarBaseColor
,
328 HTMLStyle3_get_scrollbarBaseColor
,
329 HTMLStyle3_put_scrollbarFaceColor
,
330 HTMLStyle3_get_scrollbarFaceColor
,
331 HTMLStyle3_put_scrollbar3dLightColor
,
332 HTMLStyle3_get_scrollbar3dLightColor
,
333 HTMLStyle3_put_scrollbarShadowColor
,
334 HTMLStyle3_get_scrollbarShadowColor
,
335 HTMLStyle3_put_scrollbarHighlightColor
,
336 HTMLStyle3_get_scrollbarHighlightColor
,
337 HTMLStyle3_put_scrollbarDarkShadowColor
,
338 HTMLStyle3_get_scrollbarDarkShadowColor
,
339 HTMLStyle3_put_scrollbarArrowColor
,
340 HTMLStyle3_get_scrollbarArrowColor
,
341 HTMLStyle3_put_scrollbarTrackColor
,
342 HTMLStyle3_get_scrollbarTrackColor
,
343 HTMLStyle3_put_writingMode
,
344 HTMLStyle3_get_writingMode
,
345 HTMLStyle3_put_textAlignLast
,
346 HTMLStyle3_get_textAlignLast
,
347 HTMLStyle3_put_textKashidaSpace
,
348 HTMLStyle3_get_textKashidaSpace
352 * IHTMLStyle4 Interface
354 #define HTMLSTYLE4_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle4, iface)
356 static HRESULT WINAPI
HTMLStyle4_QueryInterface(IHTMLStyle4
*iface
, REFIID riid
, void **ppv
)
358 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
360 return IHTMLStyle_QueryInterface(HTMLSTYLE(This
), riid
, ppv
);
363 static ULONG WINAPI
HTMLStyle4_AddRef(IHTMLStyle4
*iface
)
365 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
367 return IHTMLStyle_AddRef(HTMLSTYLE(This
));
370 static ULONG WINAPI
HTMLStyle4_Release(IHTMLStyle4
*iface
)
372 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
374 return IHTMLStyle_Release(HTMLSTYLE(This
));
377 static HRESULT WINAPI
HTMLStyle4_GetTypeInfoCount(IHTMLStyle4
*iface
, UINT
*pctinfo
)
379 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
380 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This
->dispex
), pctinfo
);
383 static HRESULT WINAPI
HTMLStyle4_GetTypeInfo(IHTMLStyle4
*iface
, UINT iTInfo
,
384 LCID lcid
, ITypeInfo
**ppTInfo
)
386 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
387 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->dispex
), iTInfo
, lcid
, ppTInfo
);
390 static HRESULT WINAPI
HTMLStyle4_GetIDsOfNames(IHTMLStyle4
*iface
, REFIID riid
,
391 LPOLESTR
*rgszNames
, UINT cNames
,
392 LCID lcid
, DISPID
*rgDispId
)
394 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
395 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
398 static HRESULT WINAPI
HTMLStyle4_Invoke(IHTMLStyle4
*iface
, DISPID dispIdMember
,
399 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
400 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
402 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
403 return IDispatchEx_Invoke(DISPATCHEX(&This
->dispex
), dispIdMember
, riid
, lcid
,
404 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
407 static HRESULT WINAPI
HTMLStyle4_put_textOverflow(IHTMLStyle4
*iface
, BSTR v
)
409 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
410 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
414 static HRESULT WINAPI
HTMLStyle4_get_textOverflow(IHTMLStyle4
*iface
, BSTR
*p
)
416 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
417 FIXME("(%p)->(%p)\n", This
, p
);
421 static HRESULT WINAPI
HTMLStyle4_put_minHeight(IHTMLStyle4
*iface
, VARIANT v
)
423 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
425 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
427 return set_nsstyle_attr_var(This
->nsstyle
, STYLEID_MIN_HEIGHT
, &v
, 0);
430 static HRESULT WINAPI
HTMLStyle4_get_minHeight(IHTMLStyle4
*iface
, VARIANT
*p
)
432 HTMLStyle
*This
= HTMLSTYLE4_THIS(iface
);
434 TRACE("(%p)->(%p)\n", This
, p
);
436 return get_nsstyle_attr_var(This
->nsstyle
, STYLEID_MIN_HEIGHT
, p
, 0);
439 static const IHTMLStyle4Vtbl HTMLStyle4Vtbl
= {
440 HTMLStyle4_QueryInterface
,
443 HTMLStyle4_GetTypeInfoCount
,
444 HTMLStyle4_GetTypeInfo
,
445 HTMLStyle4_GetIDsOfNames
,
447 HTMLStyle4_put_textOverflow
,
448 HTMLStyle4_get_textOverflow
,
449 HTMLStyle4_put_minHeight
,
450 HTMLStyle4_get_minHeight
453 void HTMLStyle3_Init(HTMLStyle
*This
)
455 This
->lpHTMLStyle3Vtbl
= &HTMLStyle3Vtbl
;
456 This
->lpHTMLStyle4Vtbl
= &HTMLStyle4Vtbl
;