Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d36ffab3
Commit
d36ffab3
authored
Sep 19, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Pass external connection to WebBrowser host, if possible.
parent
b17d1393
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
1 deletion
+87
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
navigate.c
dlls/mshtml/navigate.c
+85
-0
oleobj.c
dlls/mshtml/oleobj.c
+1
-1
No files found.
dlls/mshtml/mshtml_private.h
View file @
d36ffab3
...
...
@@ -965,6 +965,7 @@ void do_ns_command(HTMLDocument*,const char*,nsICommandParams*) DECLSPEC_HIDDEN;
void
update_doc
(
HTMLDocument
*
,
DWORD
)
DECLSPEC_HIDDEN
;
void
update_title
(
HTMLDocumentObj
*
)
DECLSPEC_HIDDEN
;
void
set_document_navigation
(
HTMLDocumentObj
*
,
BOOL
)
DECLSPEC_HIDDEN
;
HRESULT
do_query_service
(
IUnknown
*
,
REFGUID
,
REFIID
,
void
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/navigate.c
View file @
d36ffab3
...
...
@@ -1625,6 +1625,89 @@ static BOOL is_supported_doc_mime(const WCHAR *mime)
return
ret
;
}
static
IUri
*
get_moniker_uri
(
IMoniker
*
mon
)
{
IUriContainer
*
uri_container
;
IUri
*
ret
=
NULL
;
HRESULT
hres
;
hres
=
IMoniker_QueryInterface
(
mon
,
&
IID_IUriContainer
,
(
void
**
)
&
uri_container
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IUriContainer_GetIUri
(
uri_container
,
&
ret
);
IUriContainer_Release
(
uri_container
);
if
(
FAILED
(
hres
))
return
NULL
;
}
else
{
FIXME
(
"No IUriContainer
\n
"
);
}
return
ret
;
}
static
void
handle_extern_mime_navigation
(
nsChannelBSC
*
This
)
{
IWebBrowserPriv2IE8
*
webbrowser_priv
;
IOleCommandTarget
*
cmdtrg
;
HTMLDocumentObj
*
doc_obj
;
IBindCtx
*
bind_ctx
;
IUri
*
uri
;
VARIANT
flags
;
HRESULT
hres
;
if
(
!
This
->
bsc
.
window
||
!
This
->
bsc
.
window
->
base
.
outer_window
||
!
This
->
bsc
.
window
->
base
.
outer_window
->
doc_obj
)
return
;
doc_obj
=
This
->
bsc
.
window
->
base
.
outer_window
->
doc_obj
;
hres
=
IOleClientSite_QueryInterface
(
doc_obj
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
if
(
SUCCEEDED
(
hres
))
{
IOleCommandTarget_Exec
(
cmdtrg
,
&
CGID_ShellDocView
,
62
,
0
,
NULL
,
NULL
);
IOleCommandTarget_Release
(
cmdtrg
);
}
set_document_navigation
(
doc_obj
,
FALSE
);
if
(
!
doc_obj
->
webbrowser
)
{
FIXME
(
"unimplemented in non-webbrowser mode
\n
"
);
return
;
}
uri
=
get_moniker_uri
(
This
->
bsc
.
mon
);
if
(
!
uri
)
return
;
hres
=
CreateBindCtx
(
0
,
&
bind_ctx
);
if
(
FAILED
(
hres
))
{
IUri_Release
(
uri
);
return
;
}
V_VT
(
&
flags
)
=
VT_I4
;
V_I4
(
&
flags
)
=
navHyperlink
;
hres
=
IUnknown_QueryInterface
(
doc_obj
->
webbrowser
,
&
IID_IWebBrowserPriv2IE8
,
(
void
**
)
&
webbrowser_priv
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IWebBrowserPriv2IE8_NavigateWithBindCtx2
(
webbrowser_priv
,
uri
,
&
flags
,
NULL
,
NULL
,
NULL
,
bind_ctx
,
NULL
);
IWebBrowserPriv2IE8_Release
(
webbrowser_priv
);
}
else
{
IWebBrowserPriv
*
webbrowser_priv_old
;
VARIANT
uriv
;
hres
=
IUnknown_QueryInterface
(
doc_obj
->
webbrowser
,
&
IID_IWebBrowserPriv
,
(
void
**
)
&
webbrowser_priv_old
);
if
(
SUCCEEDED
(
hres
))
{
V_VT
(
&
uriv
)
=
VT_BSTR
;
IUri_GetDisplayUri
(
uri
,
&
V_BSTR
(
&
uriv
));
hres
=
IWebBrowserPriv_NavigateWithBindCtx
(
webbrowser_priv_old
,
&
uriv
,
&
flags
,
NULL
,
NULL
,
NULL
,
bind_ctx
,
NULL
);
SysFreeString
(
V_BSTR
(
&
uriv
));
IWebBrowserPriv_Release
(
webbrowser_priv_old
);
}
}
IUri_Release
(
uri
);
}
static
HRESULT
nsChannelBSC_on_progress
(
BSCallback
*
bsc
,
ULONG
status_code
,
LPCWSTR
status_text
)
{
nsChannelBSC
*
This
=
nsChannelBSC_from_BSCallback
(
bsc
);
...
...
@@ -1634,6 +1717,8 @@ static HRESULT nsChannelBSC_on_progress(BSCallback *bsc, ULONG status_code, LPCW
if
(
This
->
is_doc_channel
&&
!
is_supported_doc_mime
(
status_text
))
{
FIXME
(
"External MIME: %s
\n
"
,
debugstr_w
(
status_text
));
handle_extern_mime_navigation
(
This
);
This
->
nschannel
=
NULL
;
}
...
...
dlls/mshtml/oleobj.c
View file @
d36ffab3
...
...
@@ -210,7 +210,7 @@ void call_docview_84(HTMLDocumentObj *doc)
FIXME
(
"handle result
\n
"
);
}
static
void
set_document_navigation
(
HTMLDocumentObj
*
doc
,
BOOL
doc_can_navigate
)
void
set_document_navigation
(
HTMLDocumentObj
*
doc
,
BOOL
doc_can_navigate
)
{
VARIANT
var
;
...
...
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