Author: dchapyshev
Date: Thu Sep 3 16:59:32 2009
New Revision: 42987
URL:
http://svn.reactos.org/svn/reactos?rev=42987&view=rev
Log:
- Sync shdocvw with Wine 1.1.29
Modified:
trunk/reactos/dll/win32/shdocvw/client.c
trunk/reactos/dll/win32/shdocvw/dochost.c
trunk/reactos/dll/win32/shdocvw/frame.c
trunk/reactos/dll/win32/shdocvw/navigate.c
trunk/reactos/dll/win32/shdocvw/oleobject.c
trunk/reactos/dll/win32/shdocvw/shdocvw.h
trunk/reactos/dll/win32/shdocvw/shdocvw.inf
trunk/reactos/dll/win32/shdocvw/webbrowser.c
Modified: trunk/reactos/dll/win32/shdocvw/client.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/client.c…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/client.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/client.c [iso-8859-1] Thu Sep 3 16:59:32 2009
@@ -60,6 +60,9 @@
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = CLDISP(This);
+ }else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) {
+ TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppv);
+ *ppv = PROPNOTIF(This);
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
*ppv = SERVPROV(This);
Modified: trunk/reactos/dll/win32/shdocvw/dochost.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/dochost.…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/dochost.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/dochost.c [iso-8859-1] Thu Sep 3 16:59:32 2009
@@ -20,6 +20,7 @@
#include "shdocvw.h"
#include "hlink.h"
#include "exdispid.h"
+#include "mshtml.h"
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
@@ -46,7 +47,7 @@
return 0;
}
-static void navigate_complete(DocHost *This)
+static void notif_complete(DocHost *This, DISPID dispid)
{
DISPPARAMS dispparams;
VARIANTARG params[2];
@@ -66,14 +67,15 @@
V_VT(&url) = VT_BSTR;
V_BSTR(&url) = SysAllocString(This->url);
- call_sink(This->cps.wbe2, DISPID_NAVIGATECOMPLETE2, &dispparams);
- call_sink(This->cps.wbe2, DISPID_DOCUMENTCOMPLETE, &dispparams);
+ TRACE("%d >>>\n", dispid);
+ call_sink(This->cps.wbe2, dispid, &dispparams);
+ TRACE("%d <<<\n", dispid);
SysFreeString(V_BSTR(&url));
This->busy = VARIANT_FALSE;
}
-void object_available(DocHost *This)
+static void object_available(DocHost *This)
{
IHlinkTarget *hlink;
HRESULT hres;
@@ -93,14 +95,152 @@
hres = IHlinkTarget_Navigate(hlink, 0, NULL);
IHlinkTarget_Release(hlink);
+ if(FAILED(hres))
+ FIXME("Navigate failed\n");
+}
+
+static HRESULT get_doc_ready_state(DocHost *This, READYSTATE *ret)
+{
+ DISPPARAMS dp = {NULL,NULL,0,0};
+ IDispatch *disp;
+ EXCEPINFO ei;
+ VARIANT var;
+ HRESULT hres;
+
+ hres = IUnknown_QueryInterface(This->document, &IID_IDispatch,
(void**)&disp);
+ if(FAILED(hres))
+ return hres;
+
+ hres = IDispatch_Invoke(disp, DISPID_READYSTATE, &IID_NULL,
LOCALE_SYSTEM_DEFAULT, DISPATCH_PROPERTYGET,
+ &dp, &var, &ei, NULL);
+ IDispatch_Release(disp);
if(FAILED(hres)) {
- FIXME("Navigate failed\n");
+ WARN("Invoke(DISPID_READYSTATE failed: %08x\n", hres);
+ return hres;
+ }
+
+ if(V_VT(&var) != VT_I4) {
+ WARN("V_VT(var) = %d\n", V_VT(&var));
+ VariantClear(&var);
+ return E_FAIL;
+ }
+
+ *ret = V_I4(&var);
+ return S_OK;
+}
+
+static void advise_prop_notif(DocHost *This, BOOL set)
+{
+ IConnectionPointContainer *cp_container;
+ IConnectionPoint *cp;
+ HRESULT hres;
+
+ hres = IUnknown_QueryInterface(This->document, &IID_IConnectionPointContainer,
(void**)&cp_container);
+ if(FAILED(hres))
return;
- }
-
- navigate_complete(This);
-
- return;
+
+ hres = IConnectionPointContainer_FindConnectionPoint(cp_container,
&IID_IPropertyNotifySink, &cp);
+ IConnectionPointContainer_Release(cp_container);
+ if(FAILED(hres))
+ return;
+
+ if(set)
+ hres = IConnectionPoint_Advise(cp, (IUnknown*)PROPNOTIF(This),
&This->prop_notif_cookie);
+ else
+ hres = IConnectionPoint_Unadvise(cp, This->prop_notif_cookie);
+ IConnectionPoint_Release(cp);
+
+ if(SUCCEEDED(hres))
+ This->is_prop_notif = set;
+}
+
+static void update_ready_state(DocHost *This, READYSTATE ready_state)
+{
+ if(ready_state > READYSTATE_LOADING && This->ready_state <=
READYSTATE_LOADING) {
+ notif_complete(This, DISPID_NAVIGATECOMPLETE2);
+ This->ready_state = ready_state;
+ }
+
+ if(ready_state == READYSTATE_COMPLETE && This->ready_state <
READYSTATE_COMPLETE) {
+ This->ready_state = READYSTATE_COMPLETE;
+ notif_complete(This, DISPID_DOCUMENTCOMPLETE);
+ }
+}
+
+typedef struct {
+ task_header_t header;
+ IUnknown *doc;
+ READYSTATE ready_state;
+} ready_state_task_t;
+
+static void ready_state_proc(DocHost *This, task_header_t *_task)
+{
+ ready_state_task_t *task = (ready_state_task_t*)_task;
+
+ if(task->doc == This->document)
+ update_ready_state(This, task->ready_state);
+
+ IUnknown_Release(task->doc);
+}
+
+static void push_ready_state_task(DocHost *This, READYSTATE ready_state)
+{
+ ready_state_task_t *task = heap_alloc(sizeof(ready_state_task_t));
+
+ IUnknown_AddRef(This->document);
+ task->doc = This->document;
+ task->ready_state = ready_state;
+
+ push_dochost_task(This, &task->header, ready_state_proc, FALSE);
+}
+
+static void object_available_proc(DocHost *This, task_header_t *task)
+{
+ object_available(This);
+}
+
+HRESULT dochost_object_available(DocHost *This, IUnknown *doc)
+{
+ READYSTATE ready_state;
+ task_header_t *task;
+ IOleObject *oleobj;
+ HRESULT hres;
+
+ IUnknown_AddRef(doc);
+ This->document = doc;
+
+ hres = IUnknown_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj);
+ if(SUCCEEDED(hres)) {
+ CLSID clsid;
+
+ hres = IOleObject_GetUserClassID(oleobj, &clsid);
+ if(SUCCEEDED(hres))
+ TRACE("Got clsid %s\n",
+ IsEqualGUID(&clsid, &CLSID_HTMLDocument) ?
"CLSID_HTMLDocument" : debugstr_guid(&clsid));
+
+ hres = IOleObject_SetClientSite(oleobj, CLIENTSITE(This));
+ if(FAILED(hres))
+ FIXME("SetClientSite failed: %08x\n", hres);
+
+ IOleObject_Release(oleobj);
+ }else {
+ FIXME("Could not get IOleObject iface: %08x\n", hres);
+ }
+
+ /* FIXME: Call SetAdvise */
+
+ task = heap_alloc(sizeof(*task));
+ push_dochost_task(This, task, object_available_proc, FALSE);
+
+ hres = get_doc_ready_state(This, &ready_state);
+ if(SUCCEEDED(hres)) {
+ if(ready_state == READYSTATE_COMPLETE)
+ push_ready_state_task(This, READYSTATE_COMPLETE);
+ else
+ advise_prop_notif(This, TRUE);
+ }
+
+ return S_OK;
}
static LRESULT resize_document(DocHost *This, LONG width, LONG height)
@@ -173,6 +313,9 @@
IOleObject *oleobj = NULL;
IHlinkTarget *hlink = NULL;
HRESULT hres;
+
+ if(This->is_prop_notif)
+ advise_prop_notif(This, FALSE);
if(This->view)
IOleDocumentView_UIActivate(This->view, FALSE);
@@ -502,10 +645,78 @@
DocHostUIHandler_GetOverrideKeyPath
};
+#define PROPNOTIF_THIS(iface) DEFINE_THIS(DocHost, IPropertyNotifySink, iface)
+
+static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface,
+ REFIID riid, void **ppv)
+{
+ DocHost *This = PROPNOTIF_THIS(iface);
+ return IOleClientSite_QueryInterface(CLIENTSITE(This), riid, ppv);
+}
+
+static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface)
+{
+ DocHost *This = PROPNOTIF_THIS(iface);
+ return IOleClientSite_AddRef(CLIENTSITE(This));
+}
+
+static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface)
+{
+ DocHost *This = PROPNOTIF_THIS(iface);
+ return IOleClientSite_Release(CLIENTSITE(This));
+}
+
+static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID
dispID)
+{
+ DocHost *This = PROPNOTIF_THIS(iface);
+
+ TRACE("(%p)->(%d)\n", This, dispID);
+
+ switch(dispID) {
+ case DISPID_READYSTATE: {
+ READYSTATE ready_state;
+ HRESULT hres;
+
+ hres = get_doc_ready_state(This, &ready_state);
+ if(FAILED(hres))
+ return hres;
+
+ if(ready_state == READYSTATE_COMPLETE)
+ advise_prop_notif(This, FALSE);
+
+ push_ready_state_task(This, ready_state);
+ break;
+ }
+ default:
+ FIXME("unimplemented dispid %d\n", dispID);
+ return E_NOTIMPL;
+ }
+
+ return S_OK;
+}
+
+static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID
dispID)
+{
+ DocHost *This = PROPNOTIF_THIS(iface);
+ FIXME("(%p)->(%d)\n", This, dispID);
+ return E_NOTIMPL;
+}
+
+#undef PROPNOTIF_THIS
+
+static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = {
+ PropertyNotifySink_QueryInterface,
+ PropertyNotifySink_AddRef,
+ PropertyNotifySink_Release,
+ PropertyNotifySink_OnChanged,
+ PropertyNotifySink_OnRequestEdit
+};
+
void DocHost_Init(DocHost *This, IDispatch *disp)
{
This->lpDocHostUIHandlerVtbl = &DocHostUIHandler2Vtbl;
This->lpOleCommandTargetVtbl = &OleCommandTargetVtbl;
+ This->lpIPropertyNotifySinkVtbl = &PropertyNotifySinkVtbl;
This->disp = disp;
@@ -521,6 +732,9 @@
This->silent = VARIANT_FALSE;
This->offline = VARIANT_FALSE;
+
+ This->ready_state = READYSTATE_UNINITIALIZED;
+ This->is_prop_notif = FALSE;
DocHost_ClientSite_Init(This);
DocHost_Frame_Init(This);
Modified: trunk/reactos/dll/win32/shdocvw/frame.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/frame.c?…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/frame.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/frame.c [iso-8859-1] Thu Sep 3 16:59:32 2009
@@ -135,7 +135,7 @@
LPCOLESTR pszStatusText)
{
DocHost *This = INPLACEFRAME_THIS(iface);
- FIXME("(%p)->(%p)\n", This, debugstr_w(pszStatusText));
+ FIXME("(%p)->(%s)\n", This, debugstr_w(pszStatusText));
return E_NOTIMPL;
}
Modified: trunk/reactos/dll/win32/shdocvw/navigate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/navigate…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/navigate.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/navigate.c [iso-8859-1] Thu Sep 3 16:59:32 2009
@@ -22,7 +22,6 @@
#include "wine/debug.h"
#include "shdocvw.h"
-#include "mshtml.h"
#include "exdispid.h"
#include "shellapi.h"
#include "winreg.h"
@@ -220,7 +219,7 @@
FIXME("status code %u\n", ulStatusCode);
}
- return E_NOTIMPL;
+ return S_OK;
}
static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface,
@@ -270,49 +269,14 @@
return E_NOTIMPL;
}
-static void object_available_proc(DocHost *This, task_header_t *task)
-{
- object_available(This);
-}
-
static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface,
REFIID riid, IUnknown *punk)
{
BindStatusCallback *This = BINDSC_THIS(iface);
- task_header_t *task;
- IOleObject *oleobj;
- HRESULT hres;
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), punk);
- IUnknown_AddRef(punk);
- This->doc_host->document = punk;
-
- hres = IUnknown_QueryInterface(punk, &IID_IOleObject, (void**)&oleobj);
- if(SUCCEEDED(hres)) {
- CLSID clsid;
-
- hres = IOleObject_GetUserClassID(oleobj, &clsid);
- if(SUCCEEDED(hres))
- TRACE("Got clsid %s\n",
- IsEqualGUID(&clsid, &CLSID_HTMLDocument) ?
"CLSID_HTMLDocument" : debugstr_guid(&clsid));
-
- hres = IOleObject_SetClientSite(oleobj, CLIENTSITE(This->doc_host));
- if(FAILED(hres))
- FIXME("SetClientSite failed: %08x\n", hres);
-
- IOleObject_Release(oleobj);
- }else {
- FIXME("Could not get IOleObject iface: %08x\n", hres);
- }
-
- /* FIXME: Call SetAdvise */
- /* FIXME: Call Invoke(DISPID_READYSTATE) */
-
- task = heap_alloc(sizeof(*task));
- push_dochost_task(This->doc_host, task, object_available_proc, FALSE);
-
- return S_OK;
+ return dochost_object_available(This->doc_host, punk);
}
#undef BSC_THIS
@@ -357,7 +321,7 @@
{
BindStatusCallback *This = HTTPNEG_THIS(iface);
- FIXME("(%p)->(%s %s %d %p)\n", This, debugstr_w(szURL),
debugstr_w(szHeaders),
+ TRACE("(%p)->(%s %s %d %p)\n", This, debugstr_w(szURL),
debugstr_w(szHeaders),
dwReserved, pszAdditionalHeaders);
if(This->headers) {
@@ -374,9 +338,9 @@
LPWSTR *pszAdditionalRequestHeaders)
{
BindStatusCallback *This = HTTPNEG_THIS(iface);
- FIXME("(%p)->(%d %s %s %p)\n", This, dwResponseCode,
debugstr_w(szResponseHeaders),
+ TRACE("(%p)->(%d %s %s %p)\n", This, dwResponseCode,
debugstr_w(szResponseHeaders),
debugstr_w(szRequestHeaders), pszAdditionalRequestHeaders);
- return E_NOTIMPL;
+ return S_OK;
}
#undef HTTPNEG_THIS
@@ -511,46 +475,6 @@
exec_info.nShow = SW_SHOW;
return ShellExecuteExW(&exec_info);
-}
-
-static HRESULT http_load_hack(DocHost *This, IMoniker *mon, IBindStatusCallback
*callback, IBindCtx *bindctx)
-{
- IPersistMoniker *persist;
- IUnknown *doc;
- HRESULT hres;
-
- /*
- * FIXME:
- * We should use URLMoniker's BindToObject instead creating HTMLDocument here.
- * This should be fixed when mshtml.dll and urlmon.dll will be good enough.
- */
-
- hres = CoCreateInstance(&CLSID_HTMLDocument, NULL,
- CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
- &IID_IUnknown, (void**)&doc);
-
- if(FAILED(hres)) {
- ERR("Could not create HTMLDocument: %08x\n", hres);
- return hres;
- }
-
- hres = IUnknown_QueryInterface(doc, &IID_IPersistMoniker, (void**)&persist);
- if(FAILED(hres)) {
- IUnknown_Release(doc);
- return hres;
- }
-
- hres = IPersistMoniker_Load(persist, FALSE, mon, bindctx, 0);
- IPersistMoniker_Release(persist);
-
- if(SUCCEEDED(hres))
- hres = IBindStatusCallback_OnObjectAvailable(callback, &IID_IUnknown, doc);
- else
- WARN("Load failed: %08x\n", hres);
-
- IUnknown_Release(doc);
-
- return IBindStatusCallback_OnStopBinding(callback, hres, NULL);
}
static HRESULT create_moniker(LPCWSTR url, IMoniker **mon)
@@ -585,13 +509,8 @@
static HRESULT bind_to_object(DocHost *This, IMoniker *mon, LPCWSTR url, IBindCtx
*bindctx,
IBindStatusCallback *callback)
{
- WCHAR schema[30];
- DWORD schema_len;
+ IUnknown *unk = NULL;
HRESULT hres;
-
- static const WCHAR httpW[] = {'h','t','t','p',0};
- static const WCHAR httpsW[] =
{'h','t','t','p','s',0};
- static const WCHAR ftpW[]= {'f','t','p',0};
if(mon) {
IMoniker_AddRef(mon);
@@ -609,24 +528,15 @@
IBindCtx_RegisterObjectParam(bindctx, (LPOLESTR)SZ_HTML_CLIENTSITE_OBJECTPARAM,
(IUnknown*)CLIENTSITE(This));
- hres = CoInternetParseUrl(This->url, PARSE_SCHEMA, 0, schema,
sizeof(schema)/sizeof(schema[0]),
- &schema_len, 0);
- if(SUCCEEDED(hres) &&
- (!strcmpW(schema, httpW) || !strcmpW(schema, httpsW) || !strcmpW(schema, ftpW)))
{
- hres = http_load_hack(This, mon, callback, bindctx);
+ hres = IMoniker_BindToObject(mon, bindctx, NULL, &IID_IUnknown,
(void**)&unk);
+ if(SUCCEEDED(hres)) {
+ hres = S_OK;
+ if(unk)
+ IUnknown_Release(unk);
+ }else if(try_application_url(url)) {
+ hres = S_OK;
}else {
- IUnknown *unk = NULL;
-
- hres = IMoniker_BindToObject(mon, bindctx, NULL, &IID_IUnknown,
(void**)&unk);
- if(SUCCEEDED(hres)) {
- hres = S_OK;
- if(unk)
- IUnknown_Release(unk);
- }else if(try_application_url(url)) {
- hres = S_OK;
- }else {
- FIXME("BindToObject failed: %08x\n", hres);
- }
+ FIXME("BindToObject failed: %08x\n", hres);
}
IMoniker_Release(mon);
@@ -638,6 +548,8 @@
IBindCtx *bindctx;
VARIANT_BOOL cancel = VARIANT_FALSE;
HRESULT hres;
+
+ This->ready_state = READYSTATE_LOADING;
on_before_navigate2(This, bsc->url, bsc->post_data, bsc->post_data_len,
bsc->headers, &cancel);
if(cancel) {
Modified: trunk/reactos/dll/win32/shdocvw/oleobject.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/oleobjec…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/oleobject.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/oleobject.c [iso-8859-1] Thu Sep 3 16:59:32 2009
@@ -152,8 +152,16 @@
SWP_NOZORDER | SWP_SHOWWINDOW);
if(This->client) {
+ IOleContainer *container;
+
IOleClientSite_ShowObject(This->client);
- IOleClientSite_GetContainer(This->client, &This->container);
+
+ hres = IOleClientSite_GetContainer(This->client, &container);
+ if(SUCCEEDED(hres)) {
+ if(This->container)
+ IOleContainer_Release(This->container);
+ This->container = container;
+ }
}
if(This->doc_host.frame)
@@ -615,7 +623,13 @@
{
WebBrowser *This = INPLACEOBJ_THIS(iface);
FIXME("(%p)\n", This);
- return E_NOTIMPL;
+
+ if(This->inplace) {
+ IOleInPlaceSite_Release(This->inplace);
+ This->inplace = NULL;
+ }
+
+ return S_OK;
}
static HRESULT WINAPI OleInPlaceObject_UIDeactivate(IOleInPlaceObject *iface)
Modified: trunk/reactos/dll/win32/shdocvw/shdocvw.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/shdocvw.…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/shdocvw.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/shdocvw.h [iso-8859-1] Thu Sep 3 16:59:32 2009
@@ -78,6 +78,7 @@
const IOleDocumentSiteVtbl *lpOleDocumentSiteVtbl;
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
const IDispatchVtbl *lpDispatchVtbl;
+ const IPropertyNotifySinkVtbl *lpIPropertyNotifySinkVtbl;
const IServiceProviderVtbl *lpServiceProviderVtbl;
/* Interfaces of InPlaceFrame object */
@@ -100,6 +101,10 @@
VARIANT_BOOL silent;
VARIANT_BOOL offline;
VARIANT_BOOL busy;
+
+ READYSTATE ready_state;
+ DWORD prop_notif_cookie;
+ BOOL is_prop_notif;
ConnectionPointContainer cps;
};
@@ -184,6 +189,7 @@
#define DOCHOSTUI2(x) ((IDocHostUIHandler2*)
&(x)->lpDocHostUIHandlerVtbl)
#define DOCSITE(x) ((IOleDocumentSite*)
&(x)->lpOleDocumentSiteVtbl)
#define CLDISP(x) ((IDispatch*) &(x)->lpDispatchVtbl)
+#define PROPNOTIF(x) ((IPropertyNotifySink*)
&(x)->lpIPropertyNotifySinkVtbl)
#define SERVPROV(x) ((IServiceProvider*)
&(x)->lpServiceProviderVtbl)
#define INPLACEFRAME(x) ((IOleInPlaceFrame*)
&(x)->lpOleInPlaceFrameVtbl)
@@ -211,7 +217,7 @@
void create_doc_view_hwnd(DocHost*);
void deactivate_document(DocHost*);
-void object_available(DocHost*);
+HRESULT dochost_object_available(DocHost*,IUnknown*);
void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*);
HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*);
HRESULT go_home(DocHost*);
Modified: trunk/reactos/dll/win32/shdocvw/shdocvw.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/shdocvw.…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/shdocvw.inf [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/shdocvw.inf [iso-8859-1] Thu Sep 3 16:59:32 2009
@@ -142,6 +142,7 @@
[Settings.Reg]
HKCU,"Software\Microsoft\Internet Explorer\Main","Start
Page",2,"http://www.winehq.org"
HKCU,"Software\Microsoft\Internet Explorer\Main","Search
Page",2,"http://www.google.com"
+HKCU,"Software\Microsoft\Internet Explorer\Settings","Text
Color",2,"0,0,0"
HKLM,"Software\Microsoft\Internet
Explorer\Main","Default_Page_URL",2,"http://www.winehq.org"
HKLM,"Software\Microsoft\Windows\CurrentVersion\App
Paths\iexplore.exe",,,"%16422%\Internet Explorer\iexplore.exe"
HKLM,"Software\Microsoft\Windows\CurrentVersion\App
Paths\iexplore.exe","Path",,"%16422%\Internet Explorer;"
Modified: trunk/reactos/dll/win32/shdocvw/webbrowser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/webbrows…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/webbrowser.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/webbrowser.c [iso-8859-1] Thu Sep 3 16:59:32 2009
@@ -724,6 +724,7 @@
VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
+ LPCWSTR url;
TRACE("(%p)->(%p %p %p %p %p)\n", This, URL, Flags, TargetFrameName,
PostData, Headers);
@@ -733,12 +734,20 @@
if(!URL)
return S_OK;
- if(V_VT(URL) != VT_BSTR) {
+ switch (V_VT(URL))
+ {
+ case VT_BSTR:
+ url = V_BSTR(URL);
+ break;
+ case VT_BSTR|VT_BYREF:
+ url = *V_BSTRREF(URL);
+ break;
+ default:
FIXME("Unsupported V_VT(URL) %d\n", V_VT(URL));
return E_INVALIDARG;
}
- return navigate_url(&This->doc_host, V_BSTR(URL), Flags, TargetFrameName,
PostData, Headers);
+ return navigate_url(&This->doc_host, url, Flags, TargetFrameName, PostData,
Headers);
}
static HRESULT WINAPI WebBrowser_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID,
OLECMDF *pcmdf)
@@ -767,9 +776,10 @@
static HRESULT WINAPI WebBrowser_get_ReadyState(IWebBrowser2 *iface, READYSTATE
*lpReadyState)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
- FIXME("(%p)->(%p)\n", This, lpReadyState);
-
- *lpReadyState = READYSTATE_COMPLETE;
+
+ TRACE("(%p)->(%p)\n", This, lpReadyState);
+
+ *lpReadyState = This->doc_host.ready_state;
return S_OK;
}