Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f86abedb
Commit
f86abedb
authored
Nov 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Properly handle navigation in containers supporting IWebBrowserApp.
parent
8ba65149
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
6 deletions
+79
-6
dochost.c
dlls/ieframe/dochost.c
+4
-3
shellbrowser.c
dlls/ieframe/shellbrowser.c
+36
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
mutation.c
dlls/mshtml/mutation.c
+3
-0
navigate.c
dlls/mshtml/navigate.c
+20
-0
oleobj.c
dlls/mshtml/oleobj.c
+15
-1
No files found.
dlls/ieframe/dochost.c
View file @
f86abedb
...
@@ -192,12 +192,13 @@ void set_doc_state(DocHost *This, READYSTATE doc_state)
...
@@ -192,12 +192,13 @@ void set_doc_state(DocHost *This, READYSTATE doc_state)
static
void
update_ready_state
(
DocHost
*
This
,
READYSTATE
ready_state
)
static
void
update_ready_state
(
DocHost
*
This
,
READYSTATE
ready_state
)
{
{
if
(
ready_state
>
READYSTATE_LOADING
&&
This
->
doc_state
<=
READYSTATE_LOADING
)
if
(
ready_state
>
READYSTATE_LOADING
&&
This
->
doc_state
<=
READYSTATE_LOADING
&&
!
This
->
browser_service
/* FIXME */
)
notif_complete
(
This
,
DISPID_NAVIGATECOMPLETE2
);
notif_complete
(
This
,
DISPID_NAVIGATECOMPLETE2
);
if
(
ready_state
==
READYSTATE_COMPLETE
&&
This
->
doc_state
<
READYSTATE_COMPLETE
)
{
if
(
ready_state
==
READYSTATE_COMPLETE
&&
This
->
doc_state
<
READYSTATE_COMPLETE
)
{
set_doc_state
(
This
,
READYSTATE_COMPLETE
);
set_doc_state
(
This
,
READYSTATE_COMPLETE
);
notif_complete
(
This
,
DISPID_DOCUMENTCOMPLETE
);
if
(
!
This
->
browser_service
)
/* FIXME: Not fully correct */
notif_complete
(
This
,
DISPID_DOCUMENTCOMPLETE
);
}
else
{
}
else
{
set_doc_state
(
This
,
ready_state
);
set_doc_state
(
This
,
ready_state
);
}
}
...
@@ -844,7 +845,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D
...
@@ -844,7 +845,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D
if
(
ready_state
==
READYSTATE_COMPLETE
&&
!
This
->
doc_navigate
)
if
(
ready_state
==
READYSTATE_COMPLETE
&&
!
This
->
doc_navigate
)
advise_prop_notif
(
This
,
FALSE
);
advise_prop_notif
(
This
,
FALSE
);
push_ready_state_task
(
This
,
ready_state
);
update_ready_state
(
This
,
ready_state
);
break
;
break
;
}
}
default:
default:
...
...
dlls/ieframe/shellbrowser.c
View file @
f86abedb
...
@@ -787,8 +787,42 @@ static HRESULT WINAPI DocObjectService_FireDocumentComplete(
...
@@ -787,8 +787,42 @@ static HRESULT WINAPI DocObjectService_FireDocumentComplete(
DWORD
dwFlags
)
DWORD
dwFlags
)
{
{
ShellBrowser
*
This
=
impl_from_IDocObjectService
(
iface
);
ShellBrowser
*
This
=
impl_from_IDocObjectService
(
iface
);
FIXME
(
"%p %p %x
\n
"
,
This
,
pHTMLWindow
,
dwFlags
);
IHTMLPrivateWindow
*
priv_window
;
return
E_NOTIMPL
;
VARIANTARG
params
[
2
];
DISPPARAMS
dp
=
{
params
,
NULL
,
2
,
0
};
VARIANT
url_var
;
BSTR
url
;
HRESULT
hres
;
TRACE
(
"%p %p %x
\n
"
,
This
,
pHTMLWindow
,
dwFlags
);
hres
=
IHTMLWindow2_QueryInterface
(
pHTMLWindow
,
&
IID_IHTMLPrivateWindow
,
(
void
**
)
&
priv_window
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IHTMLPrivateWindow_GetAddressBarUrl
(
priv_window
,
&
url
);
IHTMLPrivateWindow_Release
(
priv_window
);
if
(
FAILED
(
hres
))
return
hres
;
TRACE
(
"got URL %s
\n
"
,
debugstr_w
(
url
));
V_VT
(
params
)
=
(
VT_BYREF
|
VT_VARIANT
);
V_BYREF
(
params
)
=
&
url
;
V_VT
(
params
+
1
)
=
VT_DISPATCH
;
V_DISPATCH
(
params
+
1
)
=
This
->
doc_host
->
disp
;
V_VT
(
&
url_var
)
=
VT_BSTR
;
V_BSTR
(
&
url_var
)
=
url
;
TRACE
(
">>>
\n
"
);
call_sink
(
This
->
doc_host
->
cps
.
wbe2
,
DISPID_DOCUMENTCOMPLETE
,
&
dp
);
TRACE
(
"<<<
\n
"
);
SysFreeString
(
url
);
This
->
doc_host
->
busy
=
VARIANT_FALSE
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
DocObjectService_UpdateDesktopComponent
(
static
HRESULT
WINAPI
DocObjectService_UpdateDesktopComponent
(
...
...
dlls/mshtml/mshtml_private.h
View file @
f86abedb
...
@@ -463,6 +463,7 @@ struct HTMLDocumentObj {
...
@@ -463,6 +463,7 @@ struct HTMLDocumentObj {
BOOL
ui_active
;
BOOL
ui_active
;
BOOL
window_active
;
BOOL
window_active
;
BOOL
hostui_setup
;
BOOL
hostui_setup
;
BOOL
is_webbrowser
;
BOOL
container_locked
;
BOOL
container_locked
;
BOOL
focus
;
BOOL
focus
;
INT
download_state
;
INT
download_state
;
...
...
dlls/mshtml/mutation.c
View file @
f86abedb
...
@@ -265,6 +265,9 @@ static void parse_complete(HTMLDocumentObj *doc)
...
@@ -265,6 +265,9 @@ static void parse_complete(HTMLDocumentObj *doc)
call_property_onchanged
(
&
doc
->
basedoc
.
cp_propnotif
,
1005
);
call_property_onchanged
(
&
doc
->
basedoc
.
cp_propnotif
,
1005
);
call_explorer_69
(
doc
);
call_explorer_69
(
doc
);
if
(
doc
->
is_webbrowser
&&
doc
->
usermode
!=
EDITMODE
)
IDocObjectService_FireNavigateComplete2
(
doc
->
doc_object_service
,
&
doc
->
basedoc
.
window
->
IHTMLWindow2_iface
,
0
);
/* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */
/* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */
}
}
...
...
dlls/mshtml/navigate.c
View file @
f86abedb
...
@@ -1944,6 +1944,26 @@ HRESULT navigate_url(HTMLWindow *window, const WCHAR *new_url, const WCHAR *base
...
@@ -1944,6 +1944,26 @@ HRESULT navigate_url(HTMLWindow *window, const WCHAR *new_url, const WCHAR *base
}
}
}
}
if
(
window
->
doc_obj
->
is_webbrowser
&&
window
->
doc_obj
&&
window
==
window
->
doc_obj
->
basedoc
.
window
)
{
BOOL
cancel
=
FALSE
;
IUri
*
uri
;
hres
=
IDocObjectService_FireBeforeNavigate2
(
window
->
doc_obj
->
doc_object_service
,
NULL
,
url
,
0x40
,
NULL
,
NULL
,
0
,
NULL
,
TRUE
,
&
cancel
);
if
(
SUCCEEDED
(
hres
)
&&
cancel
)
{
TRACE
(
"Navigation canceled
\n
"
);
return
S_OK
;
}
hres
=
CreateUri
(
url
,
0
,
0
,
&
uri
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
super_navigate
(
window
,
uri
,
NULL
,
NULL
,
0
);
IUri_Release
(
uri
);
return
hres
;
}
if
(
window
->
doc_obj
&&
window
==
window
->
doc_obj
->
basedoc
.
window
)
{
if
(
window
->
doc_obj
&&
window
==
window
->
doc_obj
->
basedoc
.
window
)
{
BOOL
cancel
;
BOOL
cancel
;
...
...
dlls/mshtml/oleobj.c
View file @
f86abedb
...
@@ -125,6 +125,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
...
@@ -125,6 +125,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
}
}
memset
(
&
This
->
doc_obj
->
hostinfo
,
0
,
sizeof
(
DOCHOSTUIINFO
));
memset
(
&
This
->
doc_obj
->
hostinfo
,
0
,
sizeof
(
DOCHOSTUIINFO
));
This
->
doc_obj
->
is_webbrowser
=
FALSE
;
if
(
!
pClientSite
)
if
(
!
pClientSite
)
return
S_OK
;
return
S_OK
;
...
@@ -212,14 +213,27 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
...
@@ -212,14 +213,27 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
IDocObjectService
*
doc_object_service
;
IDocObjectService
*
doc_object_service
;
IBrowserService
*
browser_service
;
IBrowserService
*
browser_service
;
IWebBrowser2
*
wb
;
hres
=
IServiceProvider_QueryService
(
sp
,
&
IID_IShellBrowser
,
hres
=
IServiceProvider_QueryService
(
sp
,
&
IID_IShellBrowser
,
&
IID_IBrowserService
,
(
void
**
)
&
browser_service
);
&
IID_IBrowserService
,
(
void
**
)
&
browser_service
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
hres
=
IBrowserService_QueryInterface
(
browser_service
,
hres
=
IBrowserService_QueryInterface
(
browser_service
,
&
IID_IDocObjectService
,
(
void
**
)
&
doc_object_service
);
&
IID_IDocObjectService
,
(
void
**
)
&
doc_object_service
);
if
(
SUCCEEDED
(
hres
))
if
(
SUCCEEDED
(
hres
))
{
This
->
doc_obj
->
doc_object_service
=
doc_object_service
;
This
->
doc_obj
->
doc_object_service
=
doc_object_service
;
/*
* Some embedding routines, esp. in regards to use of IDocObjectService, differ if
* embedder supports IWebBrowserApp.
*/
hres
=
IServiceProvider_QueryService
(
sp
,
&
IID_IWebBrowserApp
,
&
IID_IWebBrowser2
,
(
void
**
)
&
wb
);
if
(
SUCCEEDED
(
hres
))
{
This
->
doc_obj
->
is_webbrowser
=
TRUE
;
IWebBrowser2_Release
(
wb
);
}
}
IBrowserService_Release
(
browser_service
);
IBrowserService_Release
(
browser_service
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment