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
02b54914
Commit
02b54914
authored
Oct 19, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Move common Navigate2 code to navigate_url.
parent
30dd37ed
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
69 deletions
+49
-69
ie.c
dlls/shdocvw/ie.c
+3
-33
navigate.c
dlls/shdocvw/navigate.c
+42
-1
shdocvw.h
dlls/shdocvw/shdocvw.h
+1
-1
webbrowser.c
dlls/shdocvw/webbrowser.c
+3
-34
No files found.
dlls/shdocvw/ie.c
View file @
02b54914
...
...
@@ -442,48 +442,18 @@ static HRESULT WINAPI InternetExplorer_Navigate2(IWebBrowser2 *iface, VARIANT *U
VARIANT
*
TargetFrameName
,
VARIANT
*
PostData
,
VARIANT
*
Headers
)
{
InternetExplorer
*
This
=
WEBBROWSER_THIS
(
iface
);
PBYTE
post_data
=
NULL
;
ULONG
post_data_len
=
0
;
LPWSTR
headers
=
NULL
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p %p %p %p %p)
\n
"
,
This
,
URL
,
Flags
,
TargetFrameName
,
PostData
,
Headers
);
if
((
Flags
&&
V_VT
(
Flags
)
!=
VT_EMPTY
)
||
(
TargetFrameName
&&
V_VT
(
TargetFrameName
)
!=
VT_EMPTY
))
FIXME
(
"Unsupported arguments
\n
"
);
if
(
!
URL
)
return
S_OK
;
if
(
V_VT
(
URL
)
!=
VT_BSTR
)
if
(
V_VT
(
URL
)
!=
VT_BSTR
)
{
FIXME
(
"Unsupported V_VT(URL) %d
\n
"
,
V_VT
(
URL
));
return
E_INVALIDARG
;
if
(
PostData
&&
V_VT
(
PostData
)
!=
VT_EMPTY
)
{
if
(
V_VT
(
PostData
)
!=
(
VT_ARRAY
|
VT_UI1
)
||
V_ARRAY
(
PostData
)
->
cDims
!=
1
)
{
WARN
(
"Invalid PostData
\n
"
);
return
E_INVALIDARG
;
}
SafeArrayAccessData
(
V_ARRAY
(
PostData
),
(
void
**
)
&
post_data
);
post_data_len
=
V_ARRAY
(
PostData
)
->
rgsabound
[
0
].
cElements
;
}
if
(
Headers
&&
V_VT
(
Headers
)
!=
VT_EMPTY
)
{
if
(
V_VT
(
Headers
)
!=
VT_BSTR
)
return
E_INVALIDARG
;
headers
=
V_BSTR
(
Headers
);
TRACE
(
"Headers: %s
\n
"
,
debugstr_w
(
headers
));
}
hres
=
navigate_url
(
&
This
->
doc_host
,
V_BSTR
(
URL
),
post_data
,
post_data_len
,
headers
);
if
(
post_data
)
SafeArrayUnaccessData
(
V_ARRAY
(
PostData
));
return
hres
;
return
navigate_url
(
&
This
->
doc_host
,
V_BSTR
(
URL
),
Flags
,
TargetFrameName
,
PostData
,
Headers
);
}
static
HRESULT
WINAPI
InternetExplorer_QueryStatusWB
(
IWebBrowser2
*
iface
,
OLECMDID
cmdID
,
OLECMDF
*
pcmdf
)
...
...
dlls/shdocvw/navigate.c
View file @
02b54914
...
...
@@ -476,7 +476,7 @@ static HRESULT navigate(DocHost *This, IMoniker *mon, IBindCtx *bindctx,
}
HRESULT
navigate_url
(
DocHost
*
This
,
LPCWSTR
url
,
PBYTE
post_data
,
ULONG
post_data_len
,
static
HRESULT
bind_url_to_object
(
DocHost
*
This
,
LPCWSTR
url
,
PBYTE
post_data
,
ULONG
post_data_len
,
LPWSTR
headers
)
{
IBindStatusCallback
*
callback
;
...
...
@@ -507,6 +507,47 @@ HRESULT navigate_url(DocHost *This, LPCWSTR url, PBYTE post_data, ULONG post_dat
return
hres
;
}
HRESULT
navigate_url
(
DocHost
*
This
,
BSTR
url
,
VARIANT
*
Flags
,
VARIANT
*
TargetFrameName
,
VARIANT
*
PostData
,
VARIANT
*
Headers
)
{
PBYTE
post_data
=
NULL
;
ULONG
post_data_len
=
0
;
LPWSTR
headers
=
NULL
;
HRESULT
hres
;
TRACE
(
"navigating to %s
\n
"
,
debugstr_w
(
url
));
if
((
Flags
&&
V_VT
(
Flags
)
!=
VT_EMPTY
)
||
(
TargetFrameName
&&
V_VT
(
TargetFrameName
)
!=
VT_EMPTY
))
FIXME
(
"Unsupported arguments
\n
"
);
if
(
PostData
&&
V_VT
(
PostData
)
!=
VT_EMPTY
&&
V_VT
(
PostData
)
!=
VT_ERROR
)
{
if
(
V_VT
(
PostData
)
!=
(
VT_ARRAY
|
VT_UI1
)
||
V_ARRAY
(
PostData
)
->
cDims
!=
1
)
{
WARN
(
"Invalid PostData
\n
"
);
return
E_INVALIDARG
;
}
SafeArrayAccessData
(
V_ARRAY
(
PostData
),
(
void
**
)
&
post_data
);
post_data_len
=
V_ARRAY
(
PostData
)
->
rgsabound
[
0
].
cElements
;
}
if
(
Headers
&&
V_VT
(
Headers
)
!=
VT_EMPTY
&&
V_VT
(
Headers
)
!=
VT_ERROR
)
{
if
(
V_VT
(
Headers
)
!=
VT_BSTR
)
return
E_INVALIDARG
;
headers
=
V_BSTR
(
Headers
);
TRACE
(
"Headers: %s
\n
"
,
debugstr_w
(
headers
));
}
hres
=
bind_url_to_object
(
This
,
url
,
post_data
,
post_data_len
,
headers
);
if
(
post_data
)
SafeArrayUnaccessData
(
V_ARRAY
(
PostData
));
return
hres
;
}
HRESULT
navigate_hlink
(
DocHost
*
This
,
IMoniker
*
mon
,
IBindCtx
*
bindctx
,
IBindStatusCallback
*
callback
)
{
...
...
dlls/shdocvw/shdocvw.h
View file @
02b54914
...
...
@@ -192,7 +192,7 @@ HRESULT WebBrowserV2_Create(IUnknown*,REFIID,void**);
void
create_doc_view_hwnd
(
DocHost
*
);
void
deactivate_document
(
DocHost
*
);
void
call_sink
(
ConnectionPoint
*
,
DISPID
,
DISPPARAMS
*
);
HRESULT
navigate_url
(
DocHost
*
,
LPCWSTR
,
PBYTE
,
ULONG
,
LPWSTR
);
HRESULT
navigate_url
(
DocHost
*
,
BSTR
,
VARIANT
*
,
VARIANT
*
,
VARIANT
*
,
VARIANT
*
);
HRESULT
InternetExplorer_Create
(
IUnknown
*
,
REFIID
,
void
**
);
void
InternetExplorer_WebBrowser_Init
(
InternetExplorer
*
);
...
...
dlls/shdocvw/webbrowser.c
View file @
02b54914
...
...
@@ -660,52 +660,21 @@ static HRESULT WINAPI WebBrowser_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VA
VARIANT
*
TargetFrameName
,
VARIANT
*
PostData
,
VARIANT
*
Headers
)
{
WebBrowser
*
This
=
WEBBROWSER_THIS
(
iface
);
PBYTE
post_data
=
NULL
;
ULONG
post_data_len
=
0
;
LPWSTR
headers
=
NULL
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p %p %p %p %p)
\n
"
,
This
,
URL
,
Flags
,
TargetFrameName
,
PostData
,
Headers
);
if
(
!
This
->
client
)
return
E_FAIL
;
if
((
Flags
&&
V_VT
(
Flags
)
!=
VT_EMPTY
)
||
(
TargetFrameName
&&
V_VT
(
TargetFrameName
)
!=
VT_EMPTY
))
FIXME
(
"Unsupported arguments
\n
"
);
if
(
!
URL
)
return
S_OK
;
if
(
V_VT
(
URL
)
!=
VT_BSTR
)
if
(
V_VT
(
URL
)
!=
VT_BSTR
)
{
FIXME
(
"Unsupported V_VT(URL) %d
\n
"
,
V_VT
(
URL
));
return
E_INVALIDARG
;
if
(
PostData
&&
V_VT
(
PostData
)
!=
VT_EMPTY
&&
V_VT
(
PostData
)
!=
VT_ERROR
)
{
if
(
V_VT
(
PostData
)
!=
(
VT_ARRAY
|
VT_UI1
)
||
V_ARRAY
(
PostData
)
->
cDims
!=
1
)
{
WARN
(
"Invalid PostData
\n
"
);
return
E_INVALIDARG
;
}
SafeArrayAccessData
(
V_ARRAY
(
PostData
),
(
void
**
)
&
post_data
);
post_data_len
=
V_ARRAY
(
PostData
)
->
rgsabound
[
0
].
cElements
;
}
if
(
Headers
&&
V_VT
(
Headers
)
!=
VT_EMPTY
&&
V_VT
(
Headers
)
!=
VT_ERROR
)
{
if
(
V_VT
(
Headers
)
!=
VT_BSTR
)
return
E_INVALIDARG
;
headers
=
V_BSTR
(
Headers
);
TRACE
(
"Headers: %s
\n
"
,
debugstr_w
(
headers
));
}
hres
=
navigate_url
(
&
This
->
doc_host
,
V_BSTR
(
URL
),
post_data
,
post_data_len
,
headers
);
if
(
post_data
)
SafeArrayUnaccessData
(
V_ARRAY
(
PostData
));
return
hres
;
return
navigate_url
(
&
This
->
doc_host
,
V_BSTR
(
URL
),
Flags
,
TargetFrameName
,
PostData
,
Headers
);
}
static
HRESULT
WINAPI
WebBrowser_QueryStatusWB
(
IWebBrowser2
*
iface
,
OLECMDID
cmdID
,
OLECMDF
*
pcmdf
)
...
...
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