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
f309cdf7
Commit
f309cdf7
authored
Nov 05, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store HTMLDocument pointer in BSCallback object.
parent
951ca73f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
8 deletions
+34
-8
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+4
-1
navigate.c
dlls/mshtml/navigate.c
+24
-3
persist.c
dlls/mshtml/persist.c
+1
-1
task.c
dlls/mshtml/task.c
+4
-3
No files found.
dlls/mshtml/htmldoc.c
View file @
f309cdf7
...
...
@@ -1185,6 +1185,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
ret
->
window
=
NULL
;
ret
->
option_factory
=
NULL
;
list_init
(
&
ret
->
bindings
);
list_init
(
&
ret
->
selection_list
);
list_init
(
&
ret
->
range_list
);
...
...
dlls/mshtml/mshtml_private.h
View file @
f309cdf7
...
...
@@ -140,6 +140,7 @@ struct HTMLDocument {
BSCallback
*
bscallback
;
IMoniker
*
mon
;
LPOLESTR
url
;
struct
list
bindings
;
HWND
hwnd
;
HWND
tooltips_hwnd
;
...
...
@@ -260,6 +261,8 @@ struct BSCallback {
HTMLDocument
*
doc
;
nsProtocolStream
*
nsstream
;
struct
list
entry
;
};
typedef
struct
{
...
...
@@ -417,7 +420,7 @@ void init_nsevents(NSContainer*);
nsresult
get_nsinterface
(
nsISupports
*
,
REFIID
,
void
**
);
BSCallback
*
create_bscallback
(
IMoniker
*
);
HRESULT
start_binding
(
BSCallback
*
);
HRESULT
start_binding
(
HTMLDocument
*
,
BSCallback
*
);
HRESULT
load_stream
(
BSCallback
*
,
IStream
*
);
void
set_document_bscallback
(
HTMLDocument
*
,
BSCallback
*
);
void
set_current_mon
(
HTMLDocument
*
,
IMoniker
*
);
...
...
dlls/mshtml/navigate.c
View file @
f309cdf7
...
...
@@ -29,6 +29,7 @@
#include "winuser.h"
#include "ole2.h"
#include "hlguids.h"
#include "shlguid.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -222,7 +223,7 @@ static HRESULT read_stream_data(BSCallback *This, IStream *stream)
FIXME
(
"OnStartRequest failed: %08x
\n
"
,
nsres
);
/* events are reset when a new document URI is loaded, so re-initialise them here */
if
(
This
->
doc
&&
This
->
doc
->
nscontainer
)
if
(
This
->
doc
&&
This
->
doc
->
bscallback
==
This
&&
This
->
doc
->
nscontainer
)
init_nsevents
(
This
->
doc
->
nscontainer
);
}
...
...
@@ -328,6 +329,7 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
IMoniker_Release
(
This
->
mon
);
if
(
This
->
binding
)
IBinding_Release
(
This
->
binding
);
list_remove
(
&
This
->
entry
);
mshtml_free
(
This
->
headers
);
mshtml_free
(
This
);
}
...
...
@@ -345,6 +347,9 @@ static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *ifa
IBinding_AddRef
(
pbind
);
This
->
binding
=
pbind
;
if
(
This
->
doc
)
list_add_head
(
&
This
->
doc
->
bindings
,
&
This
->
entry
);
add_nsrequest
(
This
);
return
S_OK
;
...
...
@@ -414,7 +419,12 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
}
}
if
(
This
->
doc
&&
!
This
->
doc
->
nscontainer
)
{
list_remove
(
&
This
->
entry
);
if
(
FAILED
(
hresult
))
return
S_OK
;
if
(
This
->
doc
&&
This
->
doc
->
bscallback
==
This
&&
!
This
->
doc
->
nscontainer
)
{
task_t
*
task
=
mshtml_alloc
(
sizeof
(
task_t
));
task
->
doc
=
This
->
doc
;
...
...
@@ -670,6 +680,8 @@ BSCallback *create_bscallback(IMoniker *mon)
ret
->
binding
=
NULL
;
ret
->
doc
=
NULL
;
list_init
(
&
ret
->
entry
);
if
(
mon
)
IMoniker_AddRef
(
mon
);
ret
->
mon
=
mon
;
...
...
@@ -796,12 +808,14 @@ void hlink_frame_navigate(HTMLDocument *doc, IHlinkFrame *hlink_frame,
IBindStatusCallback_Release
(
STATUSCLB
(
callback
));
}
HRESULT
start_binding
(
BSCallback
*
bscallback
)
HRESULT
start_binding
(
HTMLDocument
*
doc
,
BSCallback
*
bscallback
)
{
IStream
*
str
=
NULL
;
IBindCtx
*
bctx
;
HRESULT
hres
;
bscallback
->
doc
=
doc
;
hres
=
CreateAsyncBindCtx
(
0
,
STATUSCLB
(
bscallback
),
NULL
,
&
bctx
);
if
(
FAILED
(
hres
))
{
WARN
(
"CreateAsyncBindCtx failed: %08x
\n
"
,
hres
);
...
...
@@ -828,6 +842,8 @@ HRESULT start_binding(BSCallback *bscallback)
void
set_document_bscallback
(
HTMLDocument
*
doc
,
BSCallback
*
callback
)
{
BSCallback
*
iter
;
if
(
doc
->
bscallback
)
{
if
(
doc
->
bscallback
->
binding
)
IBinding_Abort
(
doc
->
bscallback
->
binding
);
...
...
@@ -835,6 +851,11 @@ void set_document_bscallback(HTMLDocument *doc, BSCallback *callback)
IBindStatusCallback_Release
(
STATUSCLB
(
doc
->
bscallback
));
}
LIST_FOR_EACH_ENTRY
(
iter
,
&
doc
->
bindings
,
BSCallback
,
entry
)
{
iter
->
doc
=
NULL
;
list_remove
(
&
iter
->
entry
);
}
doc
->
bscallback
=
callback
;
if
(
callback
)
{
...
...
dlls/mshtml/persist.c
View file @
f309cdf7
...
...
@@ -429,7 +429,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
return
hres
;
if
(
!
bind_complete
)
return
start_binding
(
This
->
bscallback
);
return
start_binding
(
This
,
This
->
bscallback
);
return
S_OK
;
}
...
...
dlls/mshtml/task.c
View file @
f309cdf7
...
...
@@ -211,9 +211,10 @@ static void set_progress(HTMLDocument *doc)
}
}
static
void
task_start_binding
(
BSCallback
*
bscallback
)
static
void
task_start_binding
(
HTMLDocument
*
doc
,
BSCallback
*
bscallback
)
{
start_binding
(
bscallback
);
if
(
doc
)
start_binding
(
doc
,
bscallback
);
IBindStatusCallback_Release
(
STATUSCLB
(
bscallback
));
}
...
...
@@ -230,7 +231,7 @@ static void process_task(task_t *task)
set_progress
(
task
->
doc
);
break
;
case
TASK_START_BINDING
:
task_start_binding
(
task
->
bscallback
);
task_start_binding
(
task
->
doc
,
task
->
bscallback
);
break
;
default:
ERR
(
"Wrong task_id %d
\n
"
,
task
->
task_id
);
...
...
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