[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH 1/6] mshtml: Merge htmltextcont.c into htmlbody.c.
From: Jacek Caban <jacek () codeweavers ! com>
Date: 2018-02-28 15:31:22
Message-ID: d0ba3f82-e11b-68bd-a15e-8ece4f0145a0 () codeweavers ! com
[Download RAW message or body]
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
---
dlls/mshtml/Makefile.in | 1 -
dlls/mshtml/htmlbody.c | 165 ++++++++++++++++++++++++++++++++++++
dlls/mshtml/htmltextcont.c | 194
-------------------------------------------
dlls/mshtml/mshtml_private.h | 7 --
4 files changed, 165 insertions(+), 202 deletions(-)
delete mode 100644 dlls/mshtml/htmltextcont.c
["0001-mshtml-Merge-htmltextcont.c-into-htmlbody.c.diff" (text/x-patch)]
diff --git a/dlls/mshtml/Makefile.in b/dlls/mshtml/Makefile.in
index 81b3fce51b..0a7d9c8f70 100644
--- a/dlls/mshtml/Makefile.in
+++ b/dlls/mshtml/Makefile.in
@@ -36,7 +36,6 @@ C_SRCS = \
htmlstylesheet.c \
htmltable.c \
htmltextarea.c \
- htmltextcont.c \
htmltextnode.c \
htmlwindow.c \
ifacewrap.c \
diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c
index fcace12748..1d3ff9cab5 100644
--- a/dlls/mshtml/htmlbody.c
+++ b/dlls/mshtml/htmlbody.c
@@ -36,6 +36,12 @@
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
typedef struct {
+ HTMLElement element;
+
+ IHTMLTextContainer IHTMLTextContainer_iface;
+} HTMLTextContainer;
+
+typedef struct {
HTMLTextContainer textcont;
IHTMLBodyElement IHTMLBodyElement_iface;
@@ -773,6 +779,165 @@ static const IHTMLBodyElementVtbl HTMLBodyElementVtbl = {
HTMLBodyElement_createTextRange
};
+static inline HTMLTextContainer *impl_from_IHTMLTextContainer(IHTMLTextContainer \
*iface) +{
+ return CONTAINING_RECORD(iface, HTMLTextContainer, IHTMLTextContainer_iface);
+}
+
+static HRESULT WINAPI HTMLTextContainer_QueryInterface(IHTMLTextContainer *iface,
+ REFIID riid, void **ppv)
+{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+ return IHTMLElement_QueryInterface(&This->element.IHTMLElement_iface, riid, \
ppv); +}
+
+static ULONG WINAPI HTMLTextContainer_AddRef(IHTMLTextContainer *iface)
+{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+ return IHTMLElement_AddRef(&This->element.IHTMLElement_iface);
+}
+
+static ULONG WINAPI HTMLTextContainer_Release(IHTMLTextContainer *iface)
+{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+ return IHTMLElement_Release(&This->element.IHTMLElement_iface);
+}
+
+static HRESULT WINAPI HTMLTextContainer_GetTypeInfoCount(IHTMLTextContainer *iface, \
UINT *pctinfo) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+ return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, \
pctinfo); +}
+
+static HRESULT WINAPI HTMLTextContainer_GetTypeInfo(IHTMLTextContainer *iface, UINT \
iTInfo, + LCID lcid, ITypeInfo \
**ppTInfo) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+ return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, \
iTInfo, lcid, + ppTInfo);
+}
+
+static HRESULT WINAPI HTMLTextContainer_GetIDsOfNames(IHTMLTextContainer *iface, \
REFIID riid, + LPOLESTR *rgszNames, \
UINT cNames, + LCID lcid, DISPID \
*rgDispId) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+ return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, \
riid, rgszNames, + cNames, lcid, rgDispId);
+}
+
+static HRESULT WINAPI HTMLTextContainer_Invoke(IHTMLTextContainer *iface, DISPID \
dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, \
DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO \
*pExcepInfo, UINT *puArgErr) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+ return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, \
dispIdMember, riid, + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, \
puArgErr); +}
+
+static HRESULT WINAPI HTMLTextContainer_createControlRange(IHTMLTextContainer \
*iface, + IDispatch \
**range) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+ FIXME("(%p)->(%p)\n", This, range);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_get_scrollHeight(IHTMLTextContainer *iface, \
LONG *p) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return IHTMLElement2_get_scrollHeight(&This->element.IHTMLElement2_iface, p);
+}
+
+static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *iface, \
LONG *p) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return IHTMLElement2_get_scrollWidth(&This->element.IHTMLElement2_iface, p);
+}
+
+static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, \
LONG v) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+
+ TRACE("(%p)->(%d)\n", This, v);
+
+ return IHTMLElement2_put_scrollTop(&This->element.IHTMLElement2_iface, v);
+}
+
+static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, \
LONG *p) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return IHTMLElement2_get_scrollTop(&This->element.IHTMLElement2_iface, p);
+}
+
+static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, \
LONG v) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+
+ TRACE("(%p)->(%d)\n", This, v);
+
+ return IHTMLElement2_put_scrollLeft(&This->element.IHTMLElement2_iface, v);
+}
+
+static HRESULT WINAPI HTMLTextContainer_get_scrollLeft(IHTMLTextContainer *iface, \
LONG *p) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return IHTMLElement2_get_scrollLeft(&This->element.IHTMLElement2_iface, p);
+}
+
+static HRESULT WINAPI HTMLTextContainer_put_onscroll(IHTMLTextContainer *iface, \
VARIANT v) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_get_onscroll(IHTMLTextContainer *iface, \
VARIANT *p) +{
+ HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
+ FIXME("(%p)->(%p)\n", This, p);
+ return E_NOTIMPL;
+}
+
+static const IHTMLTextContainerVtbl HTMLTextContainerVtbl = {
+ HTMLTextContainer_QueryInterface,
+ HTMLTextContainer_AddRef,
+ HTMLTextContainer_Release,
+ HTMLTextContainer_GetTypeInfoCount,
+ HTMLTextContainer_GetTypeInfo,
+ HTMLTextContainer_GetIDsOfNames,
+ HTMLTextContainer_Invoke,
+ HTMLTextContainer_createControlRange,
+ HTMLTextContainer_get_scrollHeight,
+ HTMLTextContainer_get_scrollWidth,
+ HTMLTextContainer_put_scrollTop,
+ HTMLTextContainer_get_scrollTop,
+ HTMLTextContainer_put_scrollLeft,
+ HTMLTextContainer_get_scrollLeft,
+ HTMLTextContainer_put_onscroll,
+ HTMLTextContainer_get_onscroll
+};
+
+static void HTMLTextContainer_Init(HTMLTextContainer *This, HTMLDocumentNode *doc, \
nsIDOMElement *nselem, + dispex_static_data_t *dispex_data)
+{
+ This->IHTMLTextContainer_iface.lpVtbl = &HTMLTextContainerVtbl;
+
+ HTMLElement_Init(&This->element, doc, nselem, dispex_data);
+}
+
static inline HTMLBodyElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
{
return CONTAINING_RECORD(iface, HTMLBodyElement, textcont.element.node);
diff --git a/dlls/mshtml/htmltextcont.c b/dlls/mshtml/htmltextcont.c
deleted file mode 100644
index 8ffca8b2c7..0000000000
--- a/dlls/mshtml/htmltextcont.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright 2006 Jacek Caban for CodeWeavers
- *
- * 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 "config.h"
-
-#include <stdarg.h>
-#include <stdio.h>
-
-#define COBJMACROS
-
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "ole2.h"
-
-#include "wine/debug.h"
-
-#include "mshtml_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
-
-static inline HTMLTextContainer *impl_from_IHTMLTextContainer(IHTMLTextContainer \
*iface)
-{
- return CONTAINING_RECORD(iface, HTMLTextContainer, IHTMLTextContainer_iface);
-}
-
-static HRESULT WINAPI HTMLTextContainer_QueryInterface(IHTMLTextContainer *iface,
- REFIID riid, void **ppv)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
- return IHTMLElement_QueryInterface(&This->element.IHTMLElement_iface, riid, \
ppv);
-}
-
-static ULONG WINAPI HTMLTextContainer_AddRef(IHTMLTextContainer *iface)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
- return IHTMLElement_AddRef(&This->element.IHTMLElement_iface);
-}
-
-static ULONG WINAPI HTMLTextContainer_Release(IHTMLTextContainer *iface)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
- return IHTMLElement_Release(&This->element.IHTMLElement_iface);
-}
-
-static HRESULT WINAPI HTMLTextContainer_GetTypeInfoCount(IHTMLTextContainer *iface, \
UINT *pctinfo)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
- return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, \
pctinfo);
-}
-
-static HRESULT WINAPI HTMLTextContainer_GetTypeInfo(IHTMLTextContainer *iface, UINT \
iTInfo,
- LCID lcid, ITypeInfo **ppTInfo)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
- return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, \
iTInfo, lcid,
- ppTInfo);
-}
-
-static HRESULT WINAPI HTMLTextContainer_GetIDsOfNames(IHTMLTextContainer *iface, \
REFIID riid,
- LPOLESTR *rgszNames, UINT cNames,
- LCID lcid, DISPID *rgDispId)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
- return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, \
riid, rgszNames,
- cNames, lcid, rgDispId);
-}
-
-static HRESULT WINAPI HTMLTextContainer_Invoke(IHTMLTextContainer *iface, DISPID \
dispIdMember,
- REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS \
*pDispParams,
- VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT \
*puArgErr)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
- return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, \
dispIdMember, riid,
- lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
-}
-
-static HRESULT WINAPI HTMLTextContainer_createControlRange(IHTMLTextContainer \
*iface,
- IDispatch **range)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
- FIXME("(%p)->(%p)\n", This, range);
- return E_NOTIMPL;
-}
-
-static HRESULT WINAPI HTMLTextContainer_get_scrollHeight(IHTMLTextContainer *iface, \
LONG *p)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
-
- TRACE("(%p)->(%p)\n", This, p);
-
- return IHTMLElement2_get_scrollHeight(&This->element.IHTMLElement2_iface, p);
-}
-
-static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *iface, \
LONG *p)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
-
- TRACE("(%p)->(%p)\n", This, p);
-
- return IHTMLElement2_get_scrollWidth(&This->element.IHTMLElement2_iface, p);
-}
-
-static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, \
LONG v)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
-
- TRACE("(%p)->(%d)\n", This, v);
-
- return IHTMLElement2_put_scrollTop(&This->element.IHTMLElement2_iface, v);
-}
-
-static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, \
LONG *p)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
-
- TRACE("(%p)->(%p)\n", This, p);
-
- return IHTMLElement2_get_scrollTop(&This->element.IHTMLElement2_iface, p);
-}
-
-static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, \
LONG v)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
-
- TRACE("(%p)->(%d)\n", This, v);
-
- return IHTMLElement2_put_scrollLeft(&This->element.IHTMLElement2_iface, v);
-}
-
-static HRESULT WINAPI HTMLTextContainer_get_scrollLeft(IHTMLTextContainer *iface, \
LONG *p)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
-
- TRACE("(%p)->(%p)\n", This, p);
-
- return IHTMLElement2_get_scrollLeft(&This->element.IHTMLElement2_iface, p);
-}
-
-static HRESULT WINAPI HTMLTextContainer_put_onscroll(IHTMLTextContainer *iface, \
VARIANT v)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
- FIXME("(%p)->()\n", This);
- return E_NOTIMPL;
-}
-
-static HRESULT WINAPI HTMLTextContainer_get_onscroll(IHTMLTextContainer *iface, \
VARIANT *p)
-{
- HTMLTextContainer *This = impl_from_IHTMLTextContainer(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
-}
-
-static const IHTMLTextContainerVtbl HTMLTextContainerVtbl = {
- HTMLTextContainer_QueryInterface,
- HTMLTextContainer_AddRef,
- HTMLTextContainer_Release,
- HTMLTextContainer_GetTypeInfoCount,
- HTMLTextContainer_GetTypeInfo,
- HTMLTextContainer_GetIDsOfNames,
- HTMLTextContainer_Invoke,
- HTMLTextContainer_createControlRange,
- HTMLTextContainer_get_scrollHeight,
- HTMLTextContainer_get_scrollWidth,
- HTMLTextContainer_put_scrollTop,
- HTMLTextContainer_get_scrollTop,
- HTMLTextContainer_put_scrollLeft,
- HTMLTextContainer_get_scrollLeft,
- HTMLTextContainer_put_onscroll,
- HTMLTextContainer_get_onscroll
-};
-
-void HTMLTextContainer_Init(HTMLTextContainer *This, HTMLDocumentNode *doc, \
nsIDOMElement *nselem,
- dispex_static_data_t *dispex_data)
-{
- This->IHTMLTextContainer_iface.lpVtbl = &HTMLTextContainerVtbl;
-
- HTMLElement_Init(&This->element, doc, nselem, dispex_data);
-}
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 93f2dd9701..eece46ec69 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -800,12 +800,6 @@ extern cp_static_data_t HTMLElementEvents2_data DECLSPEC_HIDDEN;
#define HTMLELEMENT_CPC {&DIID_HTMLElementEvents2, &HTMLElementEvents2_data}
extern const cpc_entry_t HTMLElement_cpc[] DECLSPEC_HIDDEN;
-typedef struct {
- HTMLElement element;
-
- IHTMLTextContainer IHTMLTextContainer_iface;
-} HTMLTextContainer;
-
struct HTMLFrameBase {
HTMLElement element;
@@ -1054,7 +1048,6 @@ HRESULT \
HTMLGenericElement_Create(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**
void HTMLDOMNode_Init(HTMLDocumentNode*,HTMLDOMNode*,nsIDOMNode*,dispex_static_data_t*) \
DECLSPEC_HIDDEN; void \
HTMLElement_Init(HTMLElement*,HTMLDocumentNode*,nsIDOMElement*,dispex_static_data_t*) \
DECLSPEC_HIDDEN;
-void HTMLTextContainer_Init(HTMLTextContainer*,HTMLDocumentNode*,nsIDOMElement*,dispex_static_data_t*) \
DECLSPEC_HIDDEN;
void EventTarget_Init(EventTarget*,IUnknown*,dispex_static_data_t*,compat_mode_t) \
DECLSPEC_HIDDEN; HRESULT EventTarget_QI(EventTarget*,REFIID,void**) DECLSPEC_HIDDEN;
[Attachment #4 (text/plain)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic