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
51c141ab
Commit
51c141ab
authored
Jan 20, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ieframe: Added very beginning IWebBrowser2::GoBack implementation.
parent
5e847895
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
4 deletions
+85
-4
dochost.c
dlls/ieframe/dochost.c
+50
-2
ieframe.h
dlls/ieframe/ieframe.h
+10
-0
navigate.c
dlls/ieframe/navigate.c
+23
-0
webbrowser.c
dlls/ieframe/webbrowser.c
+2
-2
No files found.
dlls/ieframe/dochost.c
View file @
51c141ab
...
...
@@ -30,6 +30,9 @@ DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0);
#define DOCHOST_DOCCANNAVIGATE 0
/* Undocumented notification, see mshtml tests */
#define CMDID_EXPLORER_UPDATEHISTORY 38
static
ATOM
doc_view_atom
=
0
;
void
push_dochost_task
(
DocHost
*
This
,
task_header_t
*
task
,
task_proc_t
proc
,
task_destr_t
destr
,
BOOL
send
)
...
...
@@ -324,6 +327,39 @@ static LRESULT WINAPI doc_view_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
return
DefWindowProcW
(
hwnd
,
msg
,
wParam
,
lParam
);
}
static
void
update_travellog
(
DocHost
*
This
)
{
travellog_entry_t
*
new_entry
;
if
(
!
This
->
travellog
)
{
This
->
travellog
=
heap_alloc
(
4
*
sizeof
(
*
This
->
travellog
));
if
(
!
This
->
travellog
)
return
;
This
->
travellog_size
=
4
;
}
else
if
(
This
->
travellog_size
<
This
->
travellog_position
+
1
)
{
travellog_entry_t
*
new_travellog
;
new_travellog
=
heap_realloc
(
This
->
travellog
,
This
->
travellog_size
*
2
);
if
(
!
new_travellog
)
return
;
This
->
travellog
=
new_travellog
;
This
->
travellog_size
*=
2
;
}
while
(
This
->
travellog_length
>
This
->
travellog_position
)
heap_free
(
This
->
travellog
[
--
This
->
travellog_length
].
url
);
new_entry
=
This
->
travellog
+
This
->
travellog_position
;
new_entry
->
url
=
heap_strdupW
(
This
->
url
);
if
(
!
new_entry
->
url
)
return
;
This
->
travellog_position
++
;
}
void
create_doc_view_hwnd
(
DocHost
*
This
)
{
RECT
rect
;
...
...
@@ -550,12 +586,20 @@ static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface,
}
}
if
(
IsEqualGUID
(
pguidCmdGroup
,
&
CGID_Explorer
))
{
switch
(
nCmdID
)
{
case
CMDID_EXPLORER_UPDATEHISTORY
:
update_travellog
(
This
);
break
;
default:
FIXME
(
"Unimplemented cmd %d of CGID_Explorer
\n
"
,
nCmdID
);
}
}
FIXME
(
"Unimplemented group %s
\n
"
,
debugstr_guid
(
pguidCmdGroup
));
return
E_NOTIMPL
;
}
#undef impl_from_IOleCommandTarget
static
const
IOleCommandTargetVtbl
OleCommandTargetVtbl
=
{
ClOleCommandTarget_QueryInterface
,
ClOleCommandTarget_AddRef
,
...
...
@@ -899,5 +943,9 @@ void DocHost_Release(DocHost *This)
ConnectionPointContainer_Destroy
(
&
This
->
cps
);
while
(
This
->
travellog_length
)
heap_free
(
This
->
travellog
[
--
This
->
travellog_length
].
url
);
heap_free
(
This
->
travellog
);
heap_free
(
This
->
url
);
}
dlls/ieframe/ieframe.h
View file @
51c141ab
...
...
@@ -94,6 +94,10 @@ typedef struct {
DocHost
*
doc_host
;
}
NewWindowManager
;
typedef
struct
{
WCHAR
*
url
;
}
travellog_entry_t
;
typedef
struct
_IDocHostContainerVtbl
{
ULONG
(
*
addref
)(
DocHost
*
);
...
...
@@ -148,6 +152,11 @@ struct DocHost {
ShellBrowser
*
browser_service
;
travellog_entry_t
*
travellog
;
unsigned
travellog_size
;
unsigned
travellog_length
;
unsigned
travellog_position
;
ConnectionPointContainer
cps
;
IEHTMLWindow
html_window
;
NewWindowManager
nwm
;
...
...
@@ -253,6 +262,7 @@ void ConnectionPointContainer_Destroy(ConnectionPointContainer*) DECLSPEC_HIDDEN
void
call_sink
(
ConnectionPoint
*
,
DISPID
,
DISPPARAMS
*
)
DECLSPEC_HIDDEN
;
HRESULT
navigate_url
(
DocHost
*
,
LPCWSTR
,
const
VARIANT
*
,
const
VARIANT
*
,
VARIANT
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
go_home
(
DocHost
*
)
DECLSPEC_HIDDEN
;
HRESULT
go_back
(
DocHost
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_location_url
(
DocHost
*
,
BSTR
*
)
DECLSPEC_HIDDEN
;
HRESULT
set_dochost_url
(
DocHost
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
void
handle_navigation_error
(
DocHost
*
,
HRESULT
,
BSTR
,
IHTMLWindow2
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/ieframe/navigate.c
View file @
51c141ab
...
...
@@ -994,6 +994,29 @@ HRESULT go_home(DocHost *This)
return
navigate_url
(
This
,
wszPageName
,
NULL
,
NULL
,
NULL
,
NULL
);
}
HRESULT
go_back
(
DocHost
*
This
)
{
WCHAR
*
url
;
HRESULT
hres
;
if
(
!
This
->
travellog_position
)
{
WARN
(
"No history available
\n
"
);
return
E_FAIL
;
}
url
=
This
->
travellog
[
--
This
->
travellog_position
].
url
;
if
(
This
->
doc_navigate
)
{
hres
=
async_doc_navigate
(
This
,
url
,
NULL
,
NULL
,
0
,
FALSE
);
}
else
{
FIXME
(
"unsupported doc_navigate FALSE
\n
"
);
hres
=
E_NOTIMPL
;
}
heap_free
(
url
);
return
hres
;
}
HRESULT
get_location_url
(
DocHost
*
This
,
BSTR
*
ret
)
{
FIXME
(
"semi-stub
\n
"
);
...
...
dlls/ieframe/webbrowser.c
View file @
51c141ab
...
...
@@ -251,8 +251,8 @@ static HRESULT WINAPI WebBrowser_Invoke(IWebBrowser2 *iface, DISPID dispIdMember
static
HRESULT
WINAPI
WebBrowser_GoBack
(
IWebBrowser2
*
iface
)
{
WebBrowser
*
This
=
impl_from_IWebBrowser2
(
iface
);
FIXM
E
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
TRAC
E
(
"(%p)
\n
"
,
This
);
return
go_back
(
&
This
->
doc_host
)
;
}
static
HRESULT
WINAPI
WebBrowser_GoForward
(
IWebBrowser2
*
iface
)
...
...
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