Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
00e3ac5b
Commit
00e3ac5b
authored
18 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
shdocvw: Use DocHost, not WebBrowser, in Shell DocObject View window.
parent
61560b87
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/shdocvw/dochost.c
+16
-16
16 additions, 16 deletions
dlls/shdocvw/dochost.c
dlls/shdocvw/navigate.c
+3
-3
3 additions, 3 deletions
dlls/shdocvw/navigate.c
dlls/shdocvw/shdocvw.h
+3
-3
3 additions, 3 deletions
dlls/shdocvw/shdocvw.h
dlls/shdocvw/webbrowser.c
+5
-5
5 additions, 5 deletions
dlls/shdocvw/webbrowser.c
with
27 additions
and
27 deletions
dlls/shdocvw/dochost.c
+
16
−
16
View file @
00e3ac5b
...
...
@@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
static
ATOM
doc_view_atom
=
0
;
static
void
navigate_complete
(
WebBrowser
*
This
)
static
void
navigate_complete
(
DocHost
*
This
)
{
IDispatch
*
disp
=
NULL
;
DISPPARAMS
dispparams
;
...
...
@@ -33,7 +33,7 @@ static void navigate_complete(WebBrowser *This)
VARIANT
url
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
This
->
doc_host
.
document
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
hres
=
IUnknown_QueryInterface
(
This
->
document
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
if
(
FAILED
(
hres
))
FIXME
(
"Could not get IDispatch interface
\n
"
);
...
...
@@ -51,26 +51,26 @@ static void navigate_complete(WebBrowser *This)
V_VT
(
&
url
)
=
VT_BSTR
;
V_BSTR
(
&
url
)
=
This
->
url
;
call_sink
(
This
->
doc_host
.
cp_wbe2
,
DISPID_NAVIGATECOMPLETE2
,
&
dispparams
);
call_sink
(
This
->
doc_host
.
cp_wbe2
,
DISPID_DOCUMENTCOMPLETE
,
&
dispparams
);
call_sink
(
This
->
cp_wbe2
,
DISPID_NAVIGATECOMPLETE2
,
&
dispparams
);
call_sink
(
This
->
cp_wbe2
,
DISPID_DOCUMENTCOMPLETE
,
&
dispparams
);
if
(
disp
)
IDispatch_Release
(
disp
);
}
static
LRESULT
navigate2
(
WebBrowser
*
This
)
static
LRESULT
navigate2
(
DocHost
*
This
)
{
IHlinkTarget
*
hlink
;
HRESULT
hres
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
This
->
doc_host
.
document
)
{
if
(
!
This
->
document
)
{
WARN
(
"document == NULL
\n
"
);
return
0
;
}
hres
=
IUnknown_QueryInterface
(
This
->
doc_host
.
document
,
&
IID_IHlinkTarget
,
(
void
**
)
&
hlink
);
hres
=
IUnknown_QueryInterface
(
This
->
document
,
&
IID_IHlinkTarget
,
(
void
**
)
&
hlink
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Could not get IHlinkTarget interface
\n
"
);
return
0
;
...
...
@@ -88,26 +88,26 @@ static LRESULT navigate2(WebBrowser *This)
return
0
;
}
static
LRESULT
resize_document
(
WebBrowser
*
This
,
LONG
width
,
LONG
height
)
static
LRESULT
resize_document
(
DocHost
*
This
,
LONG
width
,
LONG
height
)
{
RECT
rect
=
{
0
,
0
,
width
,
height
};
TRACE
(
"(%p)->(%ld %ld)
\n
"
,
This
,
width
,
height
);
if
(
This
->
doc_host
.
view
)
IOleDocumentView_SetRect
(
This
->
doc_host
.
view
,
&
rect
);
if
(
This
->
view
)
IOleDocumentView_SetRect
(
This
->
view
,
&
rect
);
return
0
;
}
static
LRESULT
WINAPI
doc_view_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
WebBrowser
*
This
;
DocHost
*
This
;
static
const
WCHAR
wszTHIS
[]
=
{
'T'
,
'H'
,
'I'
,
'S'
,
0
};
if
(
msg
==
WM_CREATE
)
{
This
=
*
(
WebBrowser
**
)
lParam
;
This
=
*
(
DocHost
**
)
lParam
;
SetPropW
(
hwnd
,
wszTHIS
,
This
);
}
else
{
This
=
GetPropW
(
hwnd
,
wszTHIS
);
...
...
@@ -123,7 +123,7 @@ static LRESULT WINAPI doc_view_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
return
DefWindowProcW
(
hwnd
,
msg
,
wParam
,
lParam
);
}
void
create_doc_view_hwnd
(
WebBrowser
*
This
)
void
create_doc_view_hwnd
(
DocHost
*
This
)
{
RECT
rect
;
...
...
@@ -146,11 +146,11 @@ void create_doc_view_hwnd(WebBrowser *This)
doc_view_atom
=
RegisterClassExW
(
&
wndclass
);
}
GetClientRect
(
This
->
shell_embedding
_hwnd
,
&
rect
);
This
->
doc_host
.
hwnd
=
CreateWindowExW
(
0
,
wszShell_DocObject_View
,
GetClientRect
(
This
->
frame
_hwnd
,
&
rect
);
/* FIXME */
This
->
hwnd
=
CreateWindowExW
(
0
,
wszShell_DocObject_View
,
wszShell_DocObject_View
,
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
|
WS_TABSTOP
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
,
This
->
shell_embedding
_hwnd
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
,
This
->
frame
_hwnd
,
NULL
,
shdocvw_hinstance
,
This
);
}
...
...
This diff is collapsed.
Click to expand it.
dlls/shdocvw/navigate.c
+
3
−
3
View file @
00e3ac5b
...
...
@@ -456,8 +456,8 @@ HRESULT navigate_url(WebBrowser *This, LPCWSTR url, PBYTE post_data, ULONG post_
return
hres
;
}
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
This
->
url
);
TRACE
(
"navigating to %s
\n
"
,
debugstr_w
(
This
->
url
));
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
This
->
doc_host
.
url
);
TRACE
(
"navigating to %s
\n
"
,
debugstr_w
(
This
->
doc_host
.
url
));
callback
=
create_callback
(
This
,
post_data
,
post_data_len
,
(
LPWSTR
)
headers
,
&
cancel
);
CreateAsyncBindCtx
(
0
,
callback
,
0
,
&
bindctx
);
...
...
@@ -517,7 +517,7 @@ HRESULT navigate_hlink(WebBrowser *This, IMoniker *mon, IBindCtx *bindctx,
return
S_OK
;
}
This
->
url
=
url
;
This
->
doc_host
.
url
=
url
;
return
navigate
(
This
,
mon
,
bindctx
,
callback
);
}
...
...
This diff is collapsed.
Click to expand it.
dlls/shdocvw/shdocvw.h
+
3
−
3
View file @
00e3ac5b
...
...
@@ -74,6 +74,8 @@ typedef struct {
HWND
hwnd
;
HWND
frame_hwnd
;
LPOLESTR
url
;
/* Connection points */
ConnectionPoint
*
cp_wbe2
;
...
...
@@ -103,8 +105,6 @@ typedef struct WebBrowser {
IOleContainer
*
container
;
IOleInPlaceSite
*
inplace
;
LPOLESTR
url
;
/* window context */
HWND
iphwnd
;
...
...
@@ -166,7 +166,7 @@ void DocHost_Events_Release(DocHost*);
HRESULT
WebBrowser_Create
(
IUnknown
*
,
REFIID
,
void
**
);
void
create_doc_view_hwnd
(
WebBrowser
*
This
);
void
create_doc_view_hwnd
(
DocHost
*
);
void
deactivate_document
(
DocHost
*
);
void
call_sink
(
ConnectionPoint
*
,
DISPID
,
DISPPARAMS
*
);
HRESULT
navigate_url
(
WebBrowser
*
,
LPCWSTR
,
PBYTE
,
ULONG
,
LPWSTR
);
...
...
This diff is collapsed.
Click to expand it.
dlls/shdocvw/webbrowser.c
+
5
−
5
View file @
00e3ac5b
...
...
@@ -132,7 +132,7 @@ static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface)
WebBrowser_OleObject_Destroy
(
This
);
SysFreeString
(
This
->
url
);
SysFreeString
(
This
->
doc_host
.
url
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
SHDOCVW_UnlockModule
();
}
...
...
@@ -411,13 +411,13 @@ static HRESULT WINAPI WebBrowser_get_LocationURL(IWebBrowser2 *iface, BSTR *Loca
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
LocationURL
);
if
(
!
This
->
url
)
{
if
(
!
This
->
doc_host
.
url
)
{
static
const
WCHAR
null_char
=
0
;
*
LocationURL
=
SysAllocString
(
&
null_char
);
return
S_FALSE
;
}
*
LocationURL
=
SysAllocString
(
This
->
url
);
*
LocationURL
=
SysAllocString
(
This
->
doc_host
.
url
);
return
S_OK
;
}
...
...
@@ -613,7 +613,7 @@ static HRESULT WINAPI WebBrowser_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VA
}
if
(
!
This
->
doc_host
.
hwnd
)
create_doc_view_hwnd
(
This
);
create_doc_view_hwnd
(
&
This
->
doc_host
);
hres
=
navigate_url
(
This
,
V_BSTR
(
URL
),
post_data
,
post_data_len
,
headers
);
...
...
@@ -844,7 +844,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
ret
->
lpWebBrowser2Vtbl
=
&
WebBrowser2Vtbl
;
ret
->
ref
=
0
;
ret
->
url
=
NULL
;
ret
->
doc_host
.
url
=
NULL
;
ret
->
doc_host
.
disp
=
(
IDispatch
*
)
WEBBROWSER2
(
ret
);
DocHost_Init
(
&
ret
->
doc_host
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment