mshtml: Add support for IHTMLStyle3 interface.

oldstable
Alistair Leslie-Hughes 2009-02-03 19:21:32 +11:00 committed by Alexandre Julliard
parent 8716c62c6e
commit 337c066314
5 changed files with 351 additions and 0 deletions

View File

@ -35,6 +35,7 @@ C_SRCS = \
htmlselect.c \
htmlstyle.c \
htmlstyle2.c \
htmlstyle3.c \
htmlstylesheet.c \
htmltable.c \
htmltablerow.c \

View File

@ -468,6 +468,9 @@ static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, v
}else if(IsEqualGUID(&IID_IHTMLStyle2, riid)) {
TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This, ppv);
*ppv = HTMLSTYLE2(This);
}else if(IsEqualGUID(&IID_IHTMLStyle3, riid)) {
TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This, ppv);
*ppv = HTMLSTYLE3(This);
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
return *ppv ? S_OK : E_NOINTERFACE;
}
@ -2425,6 +2428,7 @@ IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle)
ret->ref = 1;
ret->nsstyle = nsstyle;
HTMLStyle2_Init(ret);
HTMLStyle3_Init(ret);
nsIDOMCSSStyleDeclaration_AddRef(nsstyle);

View File

@ -20,6 +20,7 @@ struct HTMLStyle {
DispatchEx dispex;
const IHTMLStyleVtbl *lpHTMLStyleVtbl;
const IHTMLStyle2Vtbl *lpHTMLStyle2Vtbl;
const IHTMLStyle3Vtbl *lpHTMLStyle3Vtbl;
LONG ref;
@ -28,6 +29,7 @@ struct HTMLStyle {
#define HTMLSTYLE(x) ((IHTMLStyle*) &(x)->lpHTMLStyleVtbl)
#define HTMLSTYLE2(x) ((IHTMLStyle2*) &(x)->lpHTMLStyle2Vtbl)
#define HTMLSTYLE3(x) ((IHTMLStyle3*) &(x)->lpHTMLStyle3Vtbl)
/* NOTE: Make sure to keep in sync with style_tbl in htmlstyle.c */
typedef enum {
@ -68,6 +70,7 @@ typedef enum {
} styleid_t;
void HTMLStyle2_Init(HTMLStyle*);
void HTMLStyle3_Init(HTMLStyle*);
HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,BSTR*);
HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,LPCWSTR,DWORD);

View File

@ -0,0 +1,342 @@
/*
* Copyright 2009 Alistair Leslie-Hughes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mshtml_private.h"
#include "htmlstyle.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define HTMLSTYLE3_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle3, iface)
static HRESULT WINAPI HTMLStyle3_QueryInterface(IHTMLStyle3 *iface, REFIID riid, void **ppv)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
return IHTMLStyle_QueryInterface(HTMLSTYLE(This), riid, ppv);
}
static ULONG WINAPI HTMLStyle3_AddRef(IHTMLStyle3 *iface)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
return IHTMLStyle_AddRef(HTMLSTYLE(This));
}
static ULONG WINAPI HTMLStyle3_Release(IHTMLStyle3 *iface)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
return IHTMLStyle_Release(HTMLSTYLE(This));
}
static HRESULT WINAPI HTMLStyle3_GetTypeInfoCount(IHTMLStyle3 *iface, UINT *pctinfo)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
}
static HRESULT WINAPI HTMLStyle3_GetTypeInfo(IHTMLStyle3 *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
}
static HRESULT WINAPI HTMLStyle3_GetIDsOfNames(IHTMLStyle3 *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
}
static HRESULT WINAPI HTMLStyle3_Invoke(IHTMLStyle3 *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLStyle3_put_layoutFlow(IHTMLStyle3 *iface, BSTR v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_layoutFlow(IHTMLStyle3 *iface, BSTR *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_zoom(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_zoom(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_wordWrap(IHTMLStyle3 *iface, BSTR v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_wordWrap(IHTMLStyle3 *iface, BSTR *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_textUnderlinePosition(IHTMLStyle3 *iface, BSTR v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_textUnderlinePosition(IHTMLStyle3 *iface, BSTR *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_scrollbarBaseColor(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_scrollbarBaseColor(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_scrollbarFaceColor(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_scrollbarFaceColor(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_scrollbar3dLightColor(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_scrollbar3dLightColor(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_scrollbarShadowColor(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_scrollbarShadowColor(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_scrollbarHighlightColor(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_scrollbarHighlightColor(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_scrollbarDarkShadowColor(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_scrollbarDarkShadowColor(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_scrollbarArrowColor(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_scrollbarArrowColor(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_scrollbarTrackColor(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_scrollbarTrackColor(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_writingMode(IHTMLStyle3 *iface, BSTR v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_writingMode(IHTMLStyle3 *iface, BSTR *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_textAlignLast(IHTMLStyle3 *iface, BSTR v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_textAlignLast(IHTMLStyle3 *iface, BSTR *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_put_textKashidaSpace(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLStyle3_get_textKashidaSpace(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static const IHTMLStyle3Vtbl HTMLStyle3Vtbl = {
HTMLStyle3_QueryInterface,
HTMLStyle3_AddRef,
HTMLStyle3_Release,
HTMLStyle3_GetTypeInfoCount,
HTMLStyle3_GetTypeInfo,
HTMLStyle3_GetIDsOfNames,
HTMLStyle3_Invoke,
HTMLStyle3_put_layoutFlow,
HTMLStyle3_get_layoutFlow,
HTMLStyle3_put_zoom,
HTMLStyle3_get_zoom,
HTMLStyle3_put_wordWrap,
HTMLStyle3_get_wordWrap,
HTMLStyle3_put_textUnderlinePosition,
HTMLStyle3_get_textUnderlinePosition,
HTMLStyle3_put_scrollbarBaseColor,
HTMLStyle3_get_scrollbarBaseColor,
HTMLStyle3_put_scrollbarFaceColor,
HTMLStyle3_get_scrollbarFaceColor,
HTMLStyle3_put_scrollbar3dLightColor,
HTMLStyle3_get_scrollbar3dLightColor,
HTMLStyle3_put_scrollbarShadowColor,
HTMLStyle3_get_scrollbarShadowColor,
HTMLStyle3_put_scrollbarHighlightColor,
HTMLStyle3_get_scrollbarHighlightColor,
HTMLStyle3_put_scrollbarDarkShadowColor,
HTMLStyle3_get_scrollbarDarkShadowColor,
HTMLStyle3_put_scrollbarArrowColor,
HTMLStyle3_get_scrollbarArrowColor,
HTMLStyle3_put_scrollbarTrackColor,
HTMLStyle3_get_scrollbarTrackColor,
HTMLStyle3_put_writingMode,
HTMLStyle3_get_writingMode,
HTMLStyle3_put_textAlignLast,
HTMLStyle3_get_textAlignLast,
HTMLStyle3_put_textKashidaSpace,
HTMLStyle3_get_textKashidaSpace
};
void HTMLStyle3_Init(HTMLStyle *This)
{
This->lpHTMLStyle3Vtbl = &HTMLStyle3Vtbl;
}

View File

@ -307,6 +307,7 @@ static const IID * const style_iids[] = {
&IID_IDispatchEx,
&IID_IHTMLStyle,
&IID_IHTMLStyle2,
&IID_IHTMLStyle3,
NULL
};