Author: cwittich
Date: Wed Sep 10 02:44:02 2008
New Revision: 36108
URL:
http://svn.reactos.org/svn/reactos?rev=36108&view=rev
Log:
sync mshtml to wine 1.1.4
Added:
trunk/reactos/dll/win32/mshtml.tlb/ (with props)
trunk/reactos/dll/win32/mshtml.tlb/mshtml.tlb.rbuild (with props)
trunk/reactos/dll/win32/mshtml.tlb/mshtml.tlb.spec (with props)
trunk/reactos/dll/win32/mshtml.tlb/mshtml_tlb.idl (with props)
trunk/reactos/dll/win32/mshtml.tlb/rsrc.rc (with props)
trunk/reactos/dll/win32/mshtml/Zh.rc (with props)
Modified:
trunk/reactos/dll/win32/mshtml/dispex.c
trunk/reactos/dll/win32/mshtml/htmlanchor.c
trunk/reactos/dll/win32/mshtml/htmlbody.c
trunk/reactos/dll/win32/mshtml/htmldoc.c
trunk/reactos/dll/win32/mshtml/htmlelem.c
trunk/reactos/dll/win32/mshtml/htmlelem2.c
trunk/reactos/dll/win32/mshtml/htmlstyle.c
trunk/reactos/dll/win32/mshtml/htmltextcont.c
trunk/reactos/dll/win32/mshtml/htmlwindow.c
trunk/reactos/dll/win32/mshtml/mshtml_private.h
trunk/reactos/dll/win32/mshtml/omnavigator.c
trunk/reactos/dll/win32/mshtml/rsrc.rc
trunk/reactos/dll/win32/mshtml/task.c
trunk/reactos/dll/win32/win32.rbuild
Propchange: trunk/reactos/dll/win32/mshtml.tlb/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Wed Sep 10 02:44:02 2008
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/reactos/dll/win32/mshtml.tlb/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/reactos/dll/win32/mshtml.tlb/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/dll/win32/mshtml.tlb/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: trunk/reactos/dll/win32/mshtml.tlb/mshtml.tlb.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml.tlb/mshtm…
==============================================================================
--- trunk/reactos/dll/win32/mshtml.tlb/mshtml.tlb.rbuild (added)
+++ trunk/reactos/dll/win32/mshtml.tlb/mshtml.tlb.rbuild [iso-8859-1] Wed Sep 10 02:44:02
2008
@@ -1,0 +1,17 @@
+<group>
+<module name="mshtml_tlb" type="embeddedtypelib">
+ <file>mshtml_tlb.idl</file>
+</module>
+<module name="mshtml.tlb" type="win32dll"
extension=".tlb" installbase="system32"
installname="mshtml.tlb" entrypoint="0">
+ <importlibrary definition="mshtml.tlb.spec.def" />
+ <include base="mshtml.tlb"
root="intermediate">.</include>
+ <dependency>mshtml_tlb</dependency>
+ <define name="__WINESRC__" />
+ <define name="_WIN32_IE">0x600</define>
+ <define name="_WIN32_WINNT">0x501</define>
+ <define name="WINVER">0x501</define>
+ <library>kernel32</library>
+ <file>mshtml.tlb.spec</file>
+ <file>rsrc.rc</file>
+</module>
+</group>
Propchange: trunk/reactos/dll/win32/mshtml.tlb/mshtml.tlb.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/mshtml.tlb/mshtml.tlb.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml.tlb/mshtm…
==============================================================================
--- trunk/reactos/dll/win32/mshtml.tlb/mshtml.tlb.spec (added)
+++ trunk/reactos/dll/win32/mshtml.tlb/mshtml.tlb.spec [iso-8859-1] Wed Sep 10 02:44:02
2008
@@ -1,0 +1,1 @@
+# no exported entry points
Propchange: trunk/reactos/dll/win32/mshtml.tlb/mshtml.tlb.spec
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/mshtml.tlb/mshtml_tlb.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml.tlb/mshtm…
==============================================================================
--- trunk/reactos/dll/win32/mshtml.tlb/mshtml_tlb.idl (added)
+++ trunk/reactos/dll/win32/mshtml.tlb/mshtml_tlb.idl [iso-8859-1] Wed Sep 10 02:44:02
2008
@@ -1,0 +1,19 @@
+/*
+ * Copyright 2007 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 "mshtml.idl"
Propchange: trunk/reactos/dll/win32/mshtml.tlb/mshtml_tlb.idl
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/mshtml.tlb/rsrc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml.tlb/rsrc.…
==============================================================================
--- trunk/reactos/dll/win32/mshtml.tlb/rsrc.rc (added)
+++ trunk/reactos/dll/win32/mshtml.tlb/rsrc.rc [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -1,0 +1,24 @@
+/*
+ * Copyright 2007 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 "windef.h"
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+
+/* @makedep: mshtml_tlb.tlb */
+1 TYPELIB LOADONCALL DISCARDABLE mshtml_tlb.tlb
Propchange: trunk/reactos/dll/win32/mshtml.tlb/rsrc.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/mshtml/Zh.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/Zh.rc?rev…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/Zh.rc (added)
+++ trunk/reactos/dll/win32/mshtml/Zh.rc [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -1,0 +1,98 @@
+/*
+ * mshtml (Simplified and Traditional Chinese Resources)
+ *
+ * Copyright 2008 Hongbo Ni <hongbo.at.njstar.com>
+ *
+ * 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
+ */
+
+/* Chinese text is encoded in UTF-8 */
+#pragma code_page(65001)
+
+LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_HTMLDISABLED "HTML åè½ç®å已被åç¨."
+ IDS_HTMLDOCUMENT "HTML æ件"
+ IDS_DOWNLOADING "æ£å¨ä¸è½½..."
+ IDS_INSTALLING "æ£å¨å®è£
..."
+}
+
+ID_DWL_DIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 260, 85
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Wine Gecko å®è£
"
+FONT 9, "MS Song"
+{
+ LTEXT "è¿ä¸ªè¿ç¨ç¨åºè¦æ¾ç¤ºä¸ä¸ªHTML ç½é¡µ. Wine éè¦è£
ä¸ Gecko (Mozilla HTML " \
+ "engine)æè½æ¾ç¤ºHTMLç½é¡µ. å¦æä½ æ³èªå¨ä¸è½½åå®è£
Geckoï¼" \
+ "请æ'å®è£
'.", ID_DWL_STATUS, 10, 10, 240, 30, SS_LEFT
+ CONTROL "Progress", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER|PBS_SMOOTH,
10, 40, 240, 12
+ DEFPUSHBUTTON "å®è£
(&I)", ID_DWL_INSTALL, 200, 60, 50, 15, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "åæ¶(&C)", IDCANCEL, 140, 60, 50, 15, WS_GROUP |
WS_TABSTOP
+}
+
+IDD_HYPERLINK DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 250, 65
+STYLE DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "è¶
é¾æ¥"
+FONT 9, "MS Song"
+{
+ GROUPBOX "è¶
é¾æ¥ä¿¡æ¯", IDC_STATIC, 5, 5, 190, 55
+ LTEXT "ç±»å(&T):", IDC_STATIC, 10, 22, 20, 10
+ COMBOBOX IDC_TYPE, 35, 20, 45, 100, WS_TABSTOP | WS_GROUP | WS_VSCROLL |
CBS_DROPDOWNLIST | CBS_HASSTRINGS
+ LTEXT "ç½å(&U):", IDC_STATIC, 10, 42, 20, 10
+ EDITTEXT IDC_URL, 35, 40, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP |
WS_TABSTOP
+ PUSHBUTTON "ç¡®å®", IDOK, 200, 10, 45, 14, BS_DEFPUSHBUTTON | WS_GROUP |
WS_TABSTOP
+ PUSHBUTTON "åæ¶", IDCANCEL, 200, 28, 45, 14, WS_GROUP | WS_TABSTOP
+}
+
+LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_HTMLDISABLED "HTML åè½ç®å已被åç¨."
+ IDS_HTMLDOCUMENT "HTML æªæ¡"
+ IDS_DOWNLOADING "æ£å¨ä¸è¼..."
+ IDS_INSTALLING "æ£å¨å®è£..."
+}
+
+ID_DWL_DIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 260, 85
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Wine Gecko å®è£"
+FONT 8, "PMingLiu"
+{
+ LTEXT "éåéç¨ç¨å¼è¦é¡¯ç¤ºä¸åHTML 網é . Wine éè¦è£ä¸ Gecko
(Mozilla HTML " \
+ "engine)æè½é¡¯ç¤ºHTML網é .
å¦æä½ æ³èªåä¸è¼åå®è£Geckoï¼" \
+ "è«æ'å®è£'.", ID_DWL_STATUS, 10, 10, 240, 30, SS_LEFT
+ CONTROL "Progress", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER|PBS_SMOOTH,
10, 40, 240, 12
+ DEFPUSHBUTTON "å®è£(&I)", ID_DWL_INSTALL, 200, 60, 50, 15, WS_GROUP |
WS_TABSTOP
+ PUSHBUTTON "åæ¶(&C)", IDCANCEL, 140, 60, 50, 15, WS_GROUP |
WS_TABSTOP
+}
+
+IDD_HYPERLINK DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 250, 65
+STYLE DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "è¶
éæ¥"
+FONT 8, "PMingLiu"
+{
+ GROUPBOX "è¶
éæ¥è³è¨", IDC_STATIC, 5, 5, 190, 55
+ LTEXT "é¡å(&T):", IDC_STATIC, 10, 22, 20, 10
+ COMBOBOX IDC_TYPE, 35, 20, 45, 100, WS_TABSTOP | WS_GROUP | WS_VSCROLL |
CBS_DROPDOWNLIST | CBS_HASSTRINGS
+ LTEXT "網å(&U):", IDC_STATIC, 10, 42, 20, 10
+ EDITTEXT IDC_URL, 35, 40, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP |
WS_TABSTOP
+ PUSHBUTTON "確å®", IDOK, 200, 10, 45, 14, BS_DEFPUSHBUTTON | WS_GROUP |
WS_TABSTOP
+ PUSHBUTTON "åæ¶", IDCANCEL, 200, 28, 45, 14, WS_GROUP | WS_TABSTOP
+}
+
+#pragma code_page(default)
Propchange: trunk/reactos/dll/win32/mshtml/Zh.rc
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/mshtml/dispex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/dispex.c?…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/dispex.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/dispex.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -66,6 +66,7 @@
static REFIID tid_ids[] = {
&IID_NULL,
&DIID_DispDOMChildrenCollection,
+ &DIID_DispHTMLBody,
&DIID_DispHTMLCommentElement,
&DIID_DispHTMLDocument,
&DIID_DispHTMLDOMTextNode,
@@ -78,7 +79,10 @@
&DIID_DispHTMLStyle,
&DIID_DispHTMLUnknownElement,
&DIID_DispHTMLWindow2,
+ &IID_IHTMLBodyElement,
+ &IID_IHTMLBodyElement2,
&IID_IHTMLCommentElement,
+ &IID_IHTMLControlElement,
&IID_IHTMLDocument2,
&IID_IHTMLDocument3,
&IID_IHTMLDocument4,
@@ -89,6 +93,8 @@
&IID_IHTMLDOMTextNode,
&IID_IHTMLElement,
&IID_IHTMLElement2,
+ &IID_IHTMLElement3,
+ &IID_IHTMLElement4,
&IID_IHTMLElementCollection,
&IID_IHTMLGenericElement,
&IID_IHTMLImgElement,
@@ -96,6 +102,8 @@
&IID_IHTMLOptionElement,
&IID_IHTMLSelectElement,
&IID_IHTMLStyle,
+ &IID_IHTMLTextContainer,
+ &IID_IHTMLUniqueName,
&IID_IHTMLWindow2,
&IID_IHTMLWindow3,
&IID_IOmNavigator
Modified: trunk/reactos/dll/win32/mshtml/htmlanchor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlancho…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/htmlanchor.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/htmlanchor.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -67,16 +67,14 @@
static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT
*pctinfo)
{
HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
- FIXME("(%p)->(%p)\n", This, pctinfo);
- return E_NOTIMPL;
+ return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex),
pctinfo);
}
static HRESULT WINAPI HTMLAnchorElement_GetTypeInfo(IHTMLAnchorElement *iface, UINT
iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
- FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
+ return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo,
lcid, ppTInfo);
}
static HRESULT WINAPI HTMLAnchorElement_GetIDsOfNames(IHTMLAnchorElement *iface, REFIID
riid,
@@ -84,9 +82,7 @@
LCID lcid, DISPID *rgDispId)
{
HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
- FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames,
cNames,
- lcid, rgDispId);
- return E_NOTIMPL;
+ return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid,
rgszNames, cNames, lcid, rgDispId);
}
static HRESULT WINAPI HTMLAnchorElement_Invoke(IHTMLAnchorElement *iface, DISPID
dispIdMember,
@@ -94,9 +90,8 @@
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
- FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember,
debugstr_guid(riid),
- lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
+ return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex),
dispIdMember, riid, lcid,
+ wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLAnchorElement_put_href(IHTMLAnchorElement *iface, BSTR v)
Modified: trunk/reactos/dll/win32/mshtml/htmlbody.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlbody.…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/htmlbody.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/htmlbody.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -110,16 +110,14 @@
static HRESULT WINAPI HTMLBodyElement_GetTypeInfoCount(IHTMLBodyElement *iface, UINT
*pctinfo)
{
HTMLBodyElement *This = HTMLBODY_THIS(iface);
- FIXME("(%p)->(%p)\n", This, pctinfo);
- return E_NOTIMPL;
+ return
IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->textcont.element.node.dispex),
pctinfo);
}
static HRESULT WINAPI HTMLBodyElement_GetTypeInfo(IHTMLBodyElement *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLBodyElement *This = HTMLBODY_THIS(iface);
- FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
+ return
IDispatchEx_GetTypeInfo(DISPATCHEX(&This->textcont.element.node.dispex), iTInfo,
lcid, ppTInfo);
}
static HRESULT WINAPI HTMLBodyElement_GetIDsOfNames(IHTMLBodyElement *iface, REFIID
riid,
@@ -127,9 +125,7 @@
LCID lcid, DISPID *rgDispId)
{
HTMLBodyElement *This = HTMLBODY_THIS(iface);
- FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames,
cNames,
- lcid, rgDispId);
- return E_NOTIMPL;
+ return
IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->textcont.element.node.dispex), riid,
rgszNames, cNames, lcid, rgDispId);
}
static HRESULT WINAPI HTMLBodyElement_Invoke(IHTMLBodyElement *iface, DISPID
dispIdMember,
@@ -137,9 +133,8 @@
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLBodyElement *This = HTMLBODY_THIS(iface);
- FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember,
debugstr_guid(riid),
- lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
+ return IDispatchEx_Invoke(DISPATCHEX(&This->textcont.element.node.dispex),
dispIdMember, riid, lcid,
+ wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLBodyElement_put_background(IHTMLBodyElement *iface, BSTR v)
@@ -596,6 +591,28 @@
HTMLBodyElement_destructor
};
+static const tid_t HTMLBodyElement_iface_tids[] = {
+ IHTMLBodyElement_tid,
+ IHTMLBodyElement2_tid,
+ IHTMLControlElement_tid,
+ IHTMLDOMNode_tid,
+ IHTMLDOMNode2_tid,
+ IHTMLElement_tid,
+ IHTMLElement2_tid,
+ IHTMLElement3_tid,
+ IHTMLElement4_tid,
+ IHTMLTextContainer_tid,
+ IHTMLUniqueName_tid,
+ 0
+};
+
+static dispex_static_data_t HTMLBodyElement_dispex = {
+ NULL,
+ DispHTMLBody_tid,
+ NULL,
+ HTMLBodyElement_iface_tids
+};
+
HTMLElement *HTMLBodyElement_Create(nsIDOMHTMLElement *nselem)
{
HTMLBodyElement *ret = heap_alloc_zero(sizeof(HTMLBodyElement));
@@ -606,6 +623,8 @@
HTMLTextContainer_Init(&ret->textcont);
ret->lpHTMLBodyElementVtbl = &HTMLBodyElementVtbl;
+
+ init_dispex(&ret->textcont.element.node.dispex, (IUnknown*)HTMLBODY(ret),
&HTMLBodyElement_dispex);
ret->textcont.element.node.vtbl = &HTMLBodyElementImplVtbl;
ConnectionPoint_Init(&ret->cp_propnotif,
&ret->textcont.element.cp_container, &IID_IPropertyNotifySink);
Modified: trunk/reactos/dll/win32/mshtml/htmldoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmldoc.c…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/htmldoc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/htmldoc.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -252,8 +252,12 @@
static HRESULT WINAPI HTMLDocument_get_Script(IHTMLDocument2 *iface, IDispatch **p)
{
HTMLDocument *This = HTMLDOC_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ *p = (IDispatch*)HTMLWINDOW2(This->window);
+ IDispatch_AddRef(*p);
+ return S_OK;
}
static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCollection
**p)
@@ -381,15 +385,70 @@
static HRESULT WINAPI HTMLDocument_put_title(IHTMLDocument2 *iface, BSTR v)
{
HTMLDocument *This = HTMLDOC_THIS(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(v));
- return E_NOTIMPL;
+ nsIDOMHTMLDocument *nshtmldoc;
+ nsIDOMDocument *nsdoc;
+ nsAString nsstr;
+ nsresult nsres;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_w(v));
+
+ if(!This->nscontainer)
+ return E_FAIL;
+
+ nsres = nsIWebNavigation_GetDocument(This->nscontainer->navigation,
&nsdoc);
+ if(NS_FAILED(nsres) || !nsdoc) {
+ ERR("GetDocument failed: %08x\n", nsres);
+ return E_FAIL;
+ }
+
+ nsIDOMDocument_QueryInterface(nsdoc, &IID_nsIDOMHTMLDocument,
(void**)&nshtmldoc);
+ nsIDOMDocument_Release(nsdoc);
+
+ nsAString_Init(&nsstr, v);
+ nsres = nsIDOMHTMLDocument_SetTitle(nshtmldoc, &nsstr);
+ nsIDOMHTMLDocument_Release(nshtmldoc);
+ nsAString_Finish(&nsstr);
+ if(NS_FAILED(nsres))
+ ERR("SetTitle failed: %08x\n", nsres);
+
+ return S_OK;
}
static HRESULT WINAPI HTMLDocument_get_title(IHTMLDocument2 *iface, BSTR *p)
{
HTMLDocument *This = HTMLDOC_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsIDOMHTMLDocument *nshtmldoc;
+ nsIDOMDocument *nsdoc;
+ const PRUnichar *ret;
+ nsAString nsstr;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ if(!This->nscontainer)
+ return E_FAIL;
+
+ nsres = nsIWebNavigation_GetDocument(This->nscontainer->navigation,
&nsdoc);
+ if(NS_FAILED(nsres) || !nsdoc) {
+ ERR("GetDocument failed: %08x\n", nsres);
+ return E_FAIL;
+ }
+
+ nsIDOMDocument_QueryInterface(nsdoc, &IID_nsIDOMHTMLDocument,
(void**)&nshtmldoc);
+ nsIDOMDocument_Release(nsdoc);
+
+ nsAString_Init(&nsstr, NULL);
+
+ nsres = nsIDOMHTMLDocument_GetTitle(nshtmldoc, &nsstr);
+ nsIDOMHTMLDocument_Release(nshtmldoc);
+ if (NS_FAILED(nsres))
+ ERR("GetTitle failed: %08x\n", nsres);
+
+ nsAString_GetData(&nsstr, &ret);
+ *p = SysAllocString(ret);
+ nsAString_Finish(&nsstr);
+
+ return S_OK;
}
static HRESULT WINAPI HTMLDocument_get_scripts(IHTMLDocument2 *iface,
IHTMLElementCollection **p)
Modified: trunk/reactos/dll/win32/mshtml/htmlelem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlelem.…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/htmlelem.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/htmlelem.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -103,16 +103,14 @@
static HRESULT WINAPI HTMLElement_GetTypeInfoCount(IHTMLElement *iface, UINT *pctinfo)
{
HTMLElement *This = HTMLELEM_THIS(iface);
- FIXME("(%p)->(%p)\n", This, pctinfo);
- return E_NOTIMPL;
+ return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->node.dispex), pctinfo);
}
static HRESULT WINAPI HTMLElement_GetTypeInfo(IHTMLElement *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLElement *This = HTMLELEM_THIS(iface);
- FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
+ return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->node.dispex), iTInfo, lcid,
ppTInfo);
}
static HRESULT WINAPI HTMLElement_GetIDsOfNames(IHTMLElement *iface, REFIID riid,
@@ -120,9 +118,7 @@
LCID lcid, DISPID *rgDispId)
{
HTMLElement *This = HTMLELEM_THIS(iface);
- FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames,
cNames,
- lcid, rgDispId);
- return E_NOTIMPL;
+ return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->node.dispex), riid,
rgszNames, cNames, lcid, rgDispId);
}
static HRESULT WINAPI HTMLElement_Invoke(IHTMLElement *iface, DISPID dispIdMember,
@@ -130,9 +126,8 @@
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLElement *This = HTMLELEM_THIS(iface);
- FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember,
debugstr_guid(riid),
- lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
+ return IDispatchEx_Invoke(DISPATCHEX(&This->node.dispex), dispIdMember, riid,
lcid,
+ wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLElement_setAttribute(IHTMLElement *iface, BSTR
strAttributeName,
@@ -387,8 +382,21 @@
static HRESULT WINAPI HTMLElement_get_parentElement(IHTMLElement *iface, IHTMLElement
**p)
{
HTMLElement *This = HTMLELEM_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ IHTMLDOMNode *node;
+ HRESULT hres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ hres = IHTMLDOMNode_get_parentNode(HTMLDOMNODE(&This->node), &node);
+ if(FAILED(hres))
+ return hres;
+
+ hres = IHTMLDOMNode_QueryInterface(node, &IID_IHTMLElement, (void**)p);
+ IHTMLDOMNode_Release(node);
+ if(FAILED(hres))
+ *p = NULL;
+
+ return S_OK;
}
static HRESULT WINAPI HTMLElement_get_style(IHTMLElement *iface, IHTMLStyle **p)
@@ -745,8 +753,27 @@
static HRESULT WINAPI HTMLElement_get_offsetHeight(IHTMLElement *iface, long *p)
{
HTMLElement *This = HTMLELEM_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsIDOMNSHTMLElement *nselem;
+ PRInt32 offset = 0;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMHTMLElement_QueryInterface(This->nselem,
&IID_nsIDOMNSHTMLElement, (void**)&nselem);
+ if(NS_FAILED(nsres)) {
+ ERR("Could not get nsIDOMNSHTMLElement: %08x\n", nsres);
+ return E_FAIL;
+ }
+
+ nsres = nsIDOMNSHTMLElement_GetOffsetHeight(nselem, &offset);
+ nsIDOMNSHTMLElement_Release(nselem);
+ if(NS_FAILED(nsres)) {
+ ERR("GetOffsetHeight failed: %08x\n", nsres);
+ return E_FAIL;
+ }
+
+ *p = offset;
+ return S_OK;
}
static HRESULT WINAPI HTMLElement_get_offsetParent(IHTMLElement *iface, IHTMLElement
**p)
@@ -1896,6 +1923,31 @@
return HTMLElementCollection_Create((IUnknown*)HTMLDOMNODE(node), buf.buf, buf.len);
}
+IHTMLElementCollection *create_collection_from_nodelist(HTMLDocument *doc, IUnknown *unk,
nsIDOMNodeList *nslist)
+{
+ PRUint32 length = 0, i;
+ elem_vector buf;
+
+ nsIDOMNodeList_GetLength(nslist, &length);
+
+ buf.len = buf.size = length;
+ if(buf.len) {
+ nsIDOMNode *nsnode;
+
+ buf.buf = heap_alloc(buf.size*sizeof(HTMLElement*));
+
+ for(i=0; i<length; i++) {
+ nsIDOMNodeList_Item(nslist, i, &nsnode);
+ buf.buf[i] = HTMLELEM_NODE_THIS(get_node(doc, nsnode, TRUE));
+ nsIDOMNode_Release(nsnode);
+ }
+ }else {
+ buf.buf = NULL;
+ }
+
+ return HTMLElementCollection_Create(unk, buf.buf, buf.len);
+}
+
static IHTMLElementCollection *HTMLElementCollection_Create(IUnknown *ref_unk,
HTMLElement **elems, DWORD len)
{
Modified: trunk/reactos/dll/win32/mshtml/htmlelem2.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlelem2…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/htmlelem2.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/htmlelem2.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -56,16 +56,14 @@
static HRESULT WINAPI HTMLElement2_GetTypeInfoCount(IHTMLElement2 *iface, UINT *pctinfo)
{
HTMLElement *This = HTMLELEM2_THIS(iface);
- FIXME("(%p)->(%p)\n", This, pctinfo);
- return E_NOTIMPL;
+ return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->node.dispex), pctinfo);
}
static HRESULT WINAPI HTMLElement2_GetTypeInfo(IHTMLElement2 *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLElement *This = HTMLELEM2_THIS(iface);
- FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
+ return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->node.dispex), iTInfo, lcid,
ppTInfo);
}
static HRESULT WINAPI HTMLElement2_GetIDsOfNames(IHTMLElement2 *iface, REFIID riid,
@@ -73,9 +71,7 @@
LCID lcid, DISPID *rgDispId)
{
HTMLElement *This = HTMLELEM2_THIS(iface);
- FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames,
cNames,
- lcid, rgDispId);
- return E_NOTIMPL;
+ return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->node.dispex), riid,
rgszNames, cNames, lcid, rgDispId);
}
static HRESULT WINAPI HTMLElement2_Invoke(IHTMLElement2 *iface, DISPID dispIdMember,
@@ -83,9 +79,8 @@
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLElement *This = HTMLELEM2_THIS(iface);
- FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember,
debugstr_guid(riid),
- lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
+ return IDispatchEx_Invoke(DISPATCHEX(&This->node.dispex), dispIdMember, riid,
lcid,
+ wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLElement2_get_scopeName(IHTMLElement2 *iface, BSTR *p)
@@ -713,15 +708,51 @@
static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, long *p)
{
HTMLElement *This = HTMLELEM2_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsIDOMNSHTMLElement *nselem;
+ PRInt32 height = 0;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement,
(void**)&nselem);
+ if(NS_SUCCEEDED(nsres)) {
+ nsres = nsIDOMNSHTMLElement_GetScrollHeight(nselem, &height);
+ nsIDOMNSHTMLElement_Release(nselem);
+ if(NS_FAILED(nsres))
+ ERR("GetScrollHeight failed: %08x\n", nsres);
+ }else {
+ ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
+ }
+
+ *p = height;
+ TRACE("*p = %ld\n", *p);
+
+ return S_OK;
}
static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p)
{
HTMLElement *This = HTMLELEM2_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsIDOMNSHTMLElement *nselem;
+ PRInt32 width = 0;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement,
(void**)&nselem);
+ if(NS_SUCCEEDED(nsres)) {
+ nsres = nsIDOMNSHTMLElement_GetScrollWidth(nselem, &width);
+ nsIDOMNSHTMLElement_Release(nselem);
+ if(NS_FAILED(nsres))
+ ERR("GetScrollWidth failed: %08x\n", nsres);
+ }else {
+ ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
+ }
+
+ *p = width;
+ TRACE("*p = %ld\n", *p);
+
+ return S_OK;
}
static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v)
@@ -751,8 +782,26 @@
static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p)
{
HTMLElement *This = HTMLELEM2_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsIDOMNSHTMLElement *nselem;
+ PRInt32 top = 0;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement,
(void**)&nselem);
+ if(NS_SUCCEEDED(nsres)) {
+ nsres = nsIDOMNSHTMLElement_GetScrollTop(nselem, &top);
+ nsIDOMNSHTMLElement_Release(nselem);
+ if(NS_FAILED(nsres))
+ ERR("GetScrollTop failed: %08x\n", nsres);
+ }else {
+ ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
+ }
+
+ *p = top;
+ TRACE("*p = %ld\n", *p);
+
+ return S_OK;
}
static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v)
@@ -917,12 +966,27 @@
return E_NOTIMPL;
}
-static HRESULT WINAPI HTMLElement2_getElementByTagName(IHTMLElement2 *iface, BSTR v,
+static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BSTR v,
IHTMLElementCollection **pelColl)
{
HTMLElement *This = HTMLELEM2_THIS(iface);
- FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
- return E_NOTIMPL;
+ nsIDOMNodeList *nslist;
+ nsAString tag_str;
+ nsresult nsres;
+
+ TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
+
+ nsAString_Init(&tag_str, v);
+ nsres = nsIDOMHTMLElement_GetElementsByTagName(This->nselem, &tag_str,
&nslist);
+ nsAString_Finish(&tag_str);
+ if(NS_FAILED(nsres)) {
+ ERR("GetElementByTagName failed: %08x\n", nsres);
+ return E_FAIL;
+ }
+
+ *pelColl = create_collection_from_nodelist(This->node.doc,
(IUnknown*)HTMLELEM(This), nslist);
+ nsIDOMNodeList_Release(nslist);
+ return S_OK;
}
#undef HTMLELEM2_THIS
@@ -1032,7 +1096,7 @@
HTMLElement2_put_onbeforeeditfocus,
HTMLElement2_get_onbeforeeditfocus,
HTMLElement2_get_readyStateValue,
- HTMLElement2_getElementByTagName,
+ HTMLElement2_getElementsByTagName,
};
void HTMLElement2_Init(HTMLElement *This)
Modified: trunk/reactos/dll/win32/mshtml/htmlstyle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlstyle…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/htmlstyle.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/htmlstyle.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -279,16 +279,14 @@
static HRESULT WINAPI HTMLStyle_GetTypeInfoCount(IHTMLStyle *iface, UINT *pctinfo)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
- FIXME("(%p)->(%p)\n", This, pctinfo);
- return E_NOTIMPL;
+ return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
}
static HRESULT WINAPI HTMLStyle_GetTypeInfo(IHTMLStyle *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
- FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
+ return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid,
ppTInfo);
}
static HRESULT WINAPI HTMLStyle_GetIDsOfNames(IHTMLStyle *iface, REFIID riid,
@@ -296,9 +294,7 @@
LCID lcid, DISPID *rgDispId)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
- FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames,
cNames,
- lcid, rgDispId);
- return E_NOTIMPL;
+ return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames,
cNames, lcid, rgDispId);
}
static HRESULT WINAPI HTMLStyle_Invoke(IHTMLStyle *iface, DISPID dispIdMember,
@@ -306,9 +302,8 @@
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
- FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember,
debugstr_guid(riid),
- lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
+ return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid,
lcid,
+ wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLStyle_put_fontFamily(IHTMLStyle *iface, BSTR v)
@@ -455,8 +450,10 @@
static HRESULT WINAPI HTMLStyle_get_background(IHTMLStyle *iface, BSTR *p)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return get_style_attr(This, attrBackground, p);
}
static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v)
Modified: trunk/reactos/dll/win32/mshtml/htmltextcont.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmltextc…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/htmltextcont.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/htmltextcont.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -101,47 +101,19 @@
static HRESULT WINAPI HTMLTextContainer_get_scrollHeight(IHTMLTextContainer *iface, long
*p)
{
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
- nsIDOMNSHTMLElement *nselem;
- PRInt32 height = 0;
- nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
- nsres = nsIDOMElement_QueryInterface(This->element.nselem,
&IID_nsIDOMNSHTMLElement, (void**)&nselem);
- if(NS_SUCCEEDED(nsres)) {
- nsIDOMNSHTMLElement_GetScrollHeight(nselem, &height);
- nsIDOMNSHTMLElement_Release(nselem);
- }else {
- ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
- }
-
- *p = height;
- TRACE("*p = %ld\n", *p);
-
- return S_OK;
+ return IHTMLElement2_get_scrollHeight(HTMLELEM2(&This->element), p);
}
static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *iface, long
*p)
{
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
- nsIDOMNSHTMLElement *nselem;
- PRInt32 width = 0;
- nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
- nsres = nsIDOMElement_QueryInterface(This->element.nselem,
&IID_nsIDOMNSHTMLElement, (void**)&nselem);
- if(NS_SUCCEEDED(nsres)) {
- nsIDOMNSHTMLElement_GetScrollWidth(nselem, &width);
- nsIDOMNSHTMLElement_Release(nselem);
- }else {
- ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
- }
-
- *p = width;
- TRACE("*p = %ld\n", *p);
-
- return S_OK;
+ return IHTMLElement2_get_scrollWidth(HTMLELEM2(&This->element), p);
}
static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, long v)
@@ -156,8 +128,10 @@
static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, long
*p)
{
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return IHTMLElement2_get_scrollTop(HTMLELEM2(&This->element), p);
}
static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, long
v)
Modified: trunk/reactos/dll/win32/mshtml/htmlwindow.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlwindo…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/htmlwindow.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/htmlwindow.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -1281,7 +1281,7 @@
HTMLWindow *HTMLWindow_Create(HTMLDocument *doc)
{
- HTMLWindow *ret = heap_alloc(sizeof(HTMLWindow));
+ HTMLWindow *ret = heap_alloc_zero(sizeof(HTMLWindow));
ret->lpHTMLWindow2Vtbl = &HTMLWindow2Vtbl;
ret->lpHTMLWindow3Vtbl = &HTMLWindow3Vtbl;
Modified: trunk/reactos/dll/win32/mshtml/mshtml_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/mshtml_pr…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/mshtml_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/mshtml_private.h [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -62,6 +62,7 @@
typedef enum {
NULL_tid,
DispDOMChildrenCollection_tid,
+ DispHTMLBody_tid,
DispHTMLCommentElement_tid,
DispHTMLDocument_tid,
DispHTMLDOMTextNode_tid,
@@ -74,7 +75,10 @@
DispHTMLStyle_tid,
DispHTMLUnknownElement_tid,
DispHTMLWindow2_tid,
+ IHTMLBodyElement_tid,
+ IHTMLBodyElement2_tid,
IHTMLCommentElement_tid,
+ IHTMLControlElement_tid,
IHTMLDocument2_tid,
IHTMLDocument3_tid,
IHTMLDocument4_tid,
@@ -85,6 +89,8 @@
IHTMLDOMTextNode_tid,
IHTMLElement_tid,
IHTMLElement2_tid,
+ IHTMLElement3_tid,
+ IHTMLElement4_tid,
IHTMLElementCollection_tid,
IHTMLGenericElement_tid,
IHTMLImgElement_tid,
@@ -92,6 +98,8 @@
IHTMLOptionElement_tid,
IHTMLSelectElement_tid,
IHTMLStyle_tid,
+ IHTMLTextContainer_tid,
+ IHTMLUniqueName_tid,
IHTMLWindow2_tid,
IHTMLWindow3_tid,
IOmNavigator_tid,
@@ -482,7 +490,7 @@
void call_property_onchanged(ConnectionPoint*,DISPID);
HRESULT call_set_active_object(IOleInPlaceUIWindow*,IOleInPlaceActiveObject*);
-void *nsalloc(size_t);
+void *nsalloc(size_t) __WINE_ALLOC_SIZE(1);
void nsfree(void*);
void nsACString_Init(nsACString*,const char*);
@@ -566,6 +574,7 @@
IDispatch *script_parse_event(HTMLDocument*,LPCWSTR);
IHTMLElementCollection *create_all_collection(HTMLDOMNode*);
+IHTMLElementCollection
*create_collection_from_nodelist(HTMLDocument*,IUnknown*,nsIDOMNodeList*);
/* commands */
typedef struct {
@@ -645,17 +654,17 @@
/* memory allocation functions */
-static inline void *heap_alloc(size_t len)
+static inline void __WINE_ALLOC_SIZE(1) *heap_alloc(size_t len)
{
return HeapAlloc(GetProcessHeap(), 0, len);
}
-static inline void *heap_alloc_zero(size_t len)
+static inline void __WINE_ALLOC_SIZE(1) *heap_alloc_zero(size_t len)
{
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
}
-static inline void *heap_realloc(void *mem, size_t len)
+static inline void __WINE_ALLOC_SIZE(2) *heap_realloc(void *mem, size_t len)
{
return HeapReAlloc(GetProcessHeap(), 0, mem, len);
}
Modified: trunk/reactos/dll/win32/mshtml/omnavigator.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/omnavigat…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/omnavigator.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/omnavigator.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -127,8 +127,13 @@
static HRESULT WINAPI OmNavigator_get_appCodeName(IOmNavigator *iface, BSTR *p)
{
OmNavigator *This = OMNAVIGATOR_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ static const WCHAR mozillaW[] =
{'M','o','z','i','l','l','a',0};
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ *p = SysAllocString(mozillaW);
+ return S_OK;
}
static HRESULT WINAPI OmNavigator_get_appName(IOmNavigator *iface, BSTR *p)
@@ -232,8 +237,13 @@
static HRESULT WINAPI OmNavigator_get_platform(IOmNavigator *iface, BSTR *p)
{
OmNavigator *This = OMNAVIGATOR_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ static const WCHAR win32W[] =
{'W','i','n','3','2',0};
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ *p = SysAllocString(win32W);
+ return S_OK;
}
static HRESULT WINAPI OmNavigator_get_appMinorVersion(IOmNavigator *iface, BSTR *p)
Modified: trunk/reactos/dll/win32/mshtml/rsrc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/rsrc.rc?r…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/rsrc.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/rsrc.rc [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -49,6 +49,7 @@
#include "Si.rc"
#include "Sv.rc"
#include "Tr.rc"
+#include "Zh.rc"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
Modified: trunk/reactos/dll/win32/mshtml/task.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/task.c?re…
==============================================================================
--- trunk/reactos/dll/win32/mshtml/task.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mshtml/task.c [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -128,6 +128,8 @@
{
task_timer_t *iter;
+ list_remove(&timer->entry);
+
if(list_empty(&thread_data->timer_list)
|| LIST_ENTRY(list_head(&thread_data->timer_list), task_timer_t,
entry)->time > timer->time) {
@@ -159,6 +161,7 @@
timer->doc = doc;
timer->time = tc + msec;
timer->interval = interval ? msec : 0;
+ list_init(&timer->entry);
IDispatch_AddRef(disp);
timer->disp = disp;
@@ -363,6 +366,8 @@
static LRESULT process_timer(void)
{
thread_data_t *thread_data = get_thread_data(TRUE);
+ HTMLDocument *doc;
+ IDispatch *disp;
DWORD tc;
task_timer_t *timer;
@@ -377,10 +382,9 @@
return 0;
}
- list_remove(&timer->entry);
- list_init(&timer->entry);
-
- call_disp_func(timer->doc, timer->disp);
+ doc = timer->doc;
+ disp = timer->disp;
+ IDispatch_AddRef(disp);
if(timer->interval) {
timer->time += timer->interval;
@@ -388,6 +392,10 @@
}else {
release_task_timer(thread_data->thread_hwnd, timer);
}
+
+ call_disp_func(doc, disp);
+
+ IDispatch_Release(disp);
}
KillTimer(thread_data->thread_hwnd, TIMER_ID);
Modified: trunk/reactos/dll/win32/win32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/win32.rbuild?rev…
==============================================================================
--- trunk/reactos/dll/win32/win32.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/win32.rbuild [iso-8859-1] Wed Sep 10 02:44:02 2008
@@ -163,6 +163,9 @@
<directory name="mshtml">
<xi:include href="mshtml/mshtml.rbuild" />
</directory>
+<directory name="mshtml.tlb">
+ <xi:include href="mshtml.tlb/mshtml.tlb.rbuild" />
+</directory>
<directory name="msi">
<xi:include href="msi/msi.rbuild" />
</directory>