[PATCH 3/5] mshtml: COM cleanup for the IHTMLStyle2 iface.

Michael Stefaniuc mstefani at redhat.de
Mon Jan 3 19:02:40 CST 2011


---
 dlls/mshtml/htmlstyle.c  |    4 +-
 dlls/mshtml/htmlstyle.h  |    3 +-
 dlls/mshtml/htmlstyle2.c |  147 +++++++++++++++++++++++----------------------
 3 files changed, 78 insertions(+), 76 deletions(-)

diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 3611c31..065f807 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -573,7 +573,7 @@ static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, v
         *ppv = &This->IHTMLStyle_iface;
     }else if(IsEqualGUID(&IID_IHTMLStyle2, riid)) {
         TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This, ppv);
-        *ppv = HTMLSTYLE2(This);
+        *ppv = &This->IHTMLStyle2_iface;
     }else if(IsEqualGUID(&IID_IHTMLStyle3, riid)) {
         TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This, ppv);
         *ppv = HTMLSTYLE3(This);
@@ -2037,7 +2037,7 @@ static HRESULT WINAPI HTMLStyle_get_position(IHTMLStyle *iface, BSTR *p)
 {
     HTMLStyle *This = impl_from_IHTMLStyle(iface);
     TRACE("(%p)->(%p)\n", This, p);
-    return IHTMLStyle2_get_position(HTMLSTYLE2(This), p);
+    return IHTMLStyle2_get_position(&This->IHTMLStyle2_iface, p);
 }
 
 static HRESULT WINAPI HTMLStyle_put_zIndex(IHTMLStyle *iface, VARIANT v)
diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h
index 809d172..dd87e71 100644
--- a/dlls/mshtml/htmlstyle.h
+++ b/dlls/mshtml/htmlstyle.h
@@ -19,7 +19,7 @@
 struct HTMLStyle {
     DispatchEx dispex;
     IHTMLStyle  IHTMLStyle_iface;
-    const IHTMLStyle2Vtbl   *lpHTMLStyle2Vtbl;
+    IHTMLStyle2 IHTMLStyle2_iface;
     const IHTMLStyle3Vtbl   *lpHTMLStyle3Vtbl;
     const IHTMLStyle4Vtbl   *lpHTMLStyle4Vtbl;
 
@@ -28,7 +28,6 @@ struct HTMLStyle {
     nsIDOMCSSStyleDeclaration *nsstyle;
 };
 
-#define HTMLSTYLE2(x)    ((IHTMLStyle2*)                  &(x)->lpHTMLStyle2Vtbl)
 #define HTMLSTYLE3(x)    ((IHTMLStyle3*)                  &(x)->lpHTMLStyle3Vtbl)
 #define HTMLSTYLE4(x)    ((IHTMLStyle4*)                  &(x)->lpHTMLStyle4Vtbl)
 
diff --git a/dlls/mshtml/htmlstyle2.c b/dlls/mshtml/htmlstyle2.c
index 07910a7..bc9e5b1 100644
--- a/dlls/mshtml/htmlstyle2.c
+++ b/dlls/mshtml/htmlstyle2.c
@@ -33,39 +33,42 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
 
-#define HTMLSTYLE2_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle2, iface)
+static inline HTMLStyle *impl_from_IHTMLStyle2(IHTMLStyle2 *iface)
+{
+    return CONTAINING_RECORD(iface, HTMLStyle, IHTMLStyle2_iface);
+}
 
 static HRESULT WINAPI HTMLStyle2_QueryInterface(IHTMLStyle2 *iface, REFIID riid, void **ppv)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
 
     return IHTMLStyle_QueryInterface(&This->IHTMLStyle_iface, riid, ppv);
 }
 
 static ULONG WINAPI HTMLStyle2_AddRef(IHTMLStyle2 *iface)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
 
     return IHTMLStyle_AddRef(&This->IHTMLStyle_iface);
 }
 
 static ULONG WINAPI HTMLStyle2_Release(IHTMLStyle2 *iface)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
 
     return IHTMLStyle_Release(&This->IHTMLStyle_iface);
 }
 
 static HRESULT WINAPI HTMLStyle2_GetTypeInfoCount(IHTMLStyle2 *iface, UINT *pctinfo)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
 }
 
 static HRESULT WINAPI HTMLStyle2_GetTypeInfo(IHTMLStyle2 *iface, UINT iTInfo,
                                               LCID lcid, ITypeInfo **ppTInfo)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
 }
 
@@ -73,7 +76,7 @@ static HRESULT WINAPI HTMLStyle2_GetIDsOfNames(IHTMLStyle2 *iface, REFIID riid,
                                                 LPOLESTR *rgszNames, UINT cNames,
                                                 LCID lcid, DISPID *rgDispId)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
             lcid, rgDispId);
 }
@@ -82,91 +85,91 @@ static HRESULT WINAPI HTMLStyle2_Invoke(IHTMLStyle2 *iface, DISPID dispIdMember,
                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
             wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
 }
 
 static HRESULT WINAPI HTMLStyle2_put_tableLayout(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_tableLayout(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_borderCollapse(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_borderCollapse(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_direction(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_direction(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_behavior(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_behavior(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_setExpression(IHTMLStyle2 *iface, BSTR propname, BSTR expression, BSTR language)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression), debugstr_w(language));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_getExpression(IHTMLStyle2 *iface, BSTR propname, VARIANT *expression)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_removeExpression(IHTMLStyle2 *iface, BSTR propname, VARIANT_BOOL *pfSuccess)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_position(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
 
     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
 
@@ -175,7 +178,7 @@ static HRESULT WINAPI HTMLStyle2_put_position(IHTMLStyle2 *iface, BSTR v)
 
 static HRESULT WINAPI HTMLStyle2_get_position(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
 
     TRACE("(%p)->(%p)\n", This, p);
 
@@ -184,35 +187,35 @@ static HRESULT WINAPI HTMLStyle2_get_position(IHTMLStyle2 *iface, BSTR *p)
 
 static HRESULT WINAPI HTMLStyle2_put_unicodeBidi(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_unicodeBidi(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_bottom(IHTMLStyle2 *iface, VARIANT v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_bottom(IHTMLStyle2 *iface, VARIANT *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_right(IHTMLStyle2 *iface, VARIANT v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
 
     TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
 
@@ -221,7 +224,7 @@ static HRESULT WINAPI HTMLStyle2_put_right(IHTMLStyle2 *iface, VARIANT v)
 
 static HRESULT WINAPI HTMLStyle2_get_right(IHTMLStyle2 *iface, VARIANT *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
 
     TRACE("(%p)->(%p)\n", This, p);
 
@@ -230,308 +233,308 @@ static HRESULT WINAPI HTMLStyle2_get_right(IHTMLStyle2 *iface, VARIANT *p)
 
 static HRESULT WINAPI HTMLStyle2_put_pixelBottom(IHTMLStyle2 *iface, LONG v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%d)\n", This, v);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_pixelBottom(IHTMLStyle2 *iface, LONG *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_pixelRight(IHTMLStyle2 *iface, LONG v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%d)\n", This, v);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_pixelRight(IHTMLStyle2 *iface, LONG *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_posBottom(IHTMLStyle2 *iface, float v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%f)\n", This, v);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_posBottom(IHTMLStyle2 *iface, float *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_posRight(IHTMLStyle2 *iface, float v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%f)\n", This, v);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_posRight(IHTMLStyle2 *iface, float *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_imeMode(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_imeMode(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_rubyAlign(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_rubyAlign(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_rubyPosition(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_rubyPosition(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_rubyOverhang(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_rubyOverhang(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_layoutGridChar(IHTMLStyle2 *iface, VARIANT v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_layoutGridChar(IHTMLStyle2 *iface, VARIANT *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_layoutGridLine(IHTMLStyle2 *iface, VARIANT v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_layoutGridLine(IHTMLStyle2 *iface, VARIANT *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_layoutGridMode(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_layoutGridMode(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_layoutGridType(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_layoutGridType(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_layoutGrid(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_layoutGrid(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_wordBreak(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_wordBreak(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_lineBreak(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_lineBreak(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_textJustify(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_textJustify(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_textJustifyTrim(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_textJustifyTrim(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_textKashida(IHTMLStyle2 *iface, VARIANT v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_textKashida(IHTMLStyle2 *iface, VARIANT *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_textAutospace(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_textAutospace(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_overflowX(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_overflowX(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_overflowY(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_overflowY(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_put_accelerator(IHTMLStyle2 *iface, BSTR v)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI HTMLStyle2_get_accelerator(IHTMLStyle2 *iface, BSTR *p)
 {
-    HTMLStyle *This = HTMLSTYLE2_THIS(iface);
+    HTMLStyle *This = impl_from_IHTMLStyle2(iface);
     FIXME("(%p)->(%p)\n", This, p);
     return E_NOTIMPL;
 }
@@ -611,5 +614,5 @@ static const IHTMLStyle2Vtbl HTMLStyle2Vtbl = {
 
 void HTMLStyle2_Init(HTMLStyle *This)
 {
-    This->lpHTMLStyle2Vtbl = &HTMLStyle2Vtbl;
+    This->IHTMLStyle2_iface.lpVtbl = &HTMLStyle2Vtbl;
 }
-- 
1.7.3.4



More information about the wine-patches mailing list