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
94f0f884
Commit
94f0f884
authored
Jul 11, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved binding list to HTMLInnerWindow.
parent
59f7c244
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
39 deletions
+37
-39
binding.h
dlls/mshtml/binding.h
+1
-1
htmldoc.c
dlls/mshtml/htmldoc.c
+0
-1
htmlwindow.c
dlls/mshtml/htmlwindow.c
+2
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+5
-4
navigate.c
dlls/mshtml/navigate.c
+24
-27
nsio.c
dlls/mshtml/nsio.c
+3
-3
persist.c
dlls/mshtml/persist.c
+1
-1
script.c
dlls/mshtml/script.c
+1
-1
No files found.
dlls/mshtml/binding.h
View file @
94f0f884
...
...
@@ -72,7 +72,7 @@ struct BSCallback {
IMoniker
*
mon
;
IBinding
*
binding
;
HTML
DocumentNode
*
doc
;
HTML
InnerWindow
*
window
;
struct
list
entry
;
};
...
...
dlls/mshtml/htmldoc.c
View file @
94f0f884
...
...
@@ -2216,7 +2216,6 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLOuterWindo
&
doc
->
node
.
dispex
.
IDispatchEx_iface
);
HTMLDocumentNode_SecMgr_Init
(
doc
);
list_init
(
&
doc
->
bindings
);
list_init
(
&
doc
->
selection_list
);
list_init
(
&
doc
->
range_list
);
list_init
(
&
doc
->
plugin_hosts
);
...
...
dlls/mshtml/htmlwindow.c
View file @
94f0f884
...
...
@@ -2588,6 +2588,7 @@ static HRESULT create_inner_window(HTMLOuterWindow *outer_window, HTMLDocumentNo
return
E_OUTOFMEMORY
;
list_init
(
&
window
->
script_hosts
);
list_init
(
&
window
->
bindings
);
window
->
base
.
outer_window
=
outer_window
;
window
->
base
.
inner_window
=
window
;
...
...
@@ -2670,7 +2671,7 @@ static HRESULT window_set_docnode(HTMLOuterWindow *window, HTMLDocumentNode *doc
if
(
window
->
doc_obj
&&
window
==
window
->
doc_obj
->
basedoc
.
window
)
window
->
base
.
inner_window
->
doc
->
basedoc
.
cp_container
.
forward_container
=
NULL
;
detach_events
(
window
->
base
.
inner_window
->
doc
);
abort_
document_bindings
(
window
->
base
.
inner_window
->
doc
);
abort_
window_bindings
(
window
->
base
.
inner_window
);
release_script_hosts
(
window
->
base
.
inner_window
);
}
...
...
dlls/mshtml/mshtml_private.h
View file @
94f0f884
...
...
@@ -360,6 +360,8 @@ struct HTMLInnerWindow {
global_prop_t
*
global_props
;
DWORD
global_prop_cnt
;
DWORD
global_prop_size
;
struct
list
bindings
;
};
typedef
enum
{
...
...
@@ -652,7 +654,6 @@ struct HTMLDocumentNode {
BOOL
skip_mutation_notif
;
struct
list
bindings
;
struct
list
selection_list
;
struct
list
range_list
;
struct
list
plugin_hosts
;
...
...
@@ -752,13 +753,13 @@ nsIWritableVariant *create_nsvariant(void) DECLSPEC_HIDDEN;
void
set_window_bscallback
(
HTMLOuterWindow
*
,
nsChannelBSC
*
)
DECLSPEC_HIDDEN
;
void
set_current_mon
(
HTMLOuterWindow
*
,
IMoniker
*
)
DECLSPEC_HIDDEN
;
void
set_current_uri
(
HTMLOuterWindow
*
,
IUri
*
)
DECLSPEC_HIDDEN
;
HRESULT
start_binding
(
HTMLOuterWindow
*
,
HTML
DocumentNode
*
,
BSCallback
*
,
IBindCtx
*
)
DECLSPEC_HIDDEN
;
HRESULT
start_binding
(
HTMLOuterWindow
*
,
HTML
InnerWindow
*
,
BSCallback
*
,
IBindCtx
*
)
DECLSPEC_HIDDEN
;
HRESULT
async_start_doc_binding
(
HTMLOuterWindow
*
,
nsChannelBSC
*
)
DECLSPEC_HIDDEN
;
void
abort_
document_bindings
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
void
abort_
window_bindings
(
HTMLInnerWindow
*
)
DECLSPEC_HIDDEN
;
void
set_download_state
(
HTMLDocumentObj
*
,
int
)
DECLSPEC_HIDDEN
;
void
call_docview_84
(
HTMLDocumentObj
*
)
DECLSPEC_HIDDEN
;
HRESULT
bind_mon_to_buffer
(
HTML
DocumentNode
*
,
IMoniker
*
,
void
**
,
DWORD
*
)
DECLSPEC_HIDDEN
;
HRESULT
bind_mon_to_buffer
(
HTML
InnerWindow
*
,
IMoniker
*
,
void
**
,
DWORD
*
)
DECLSPEC_HIDDEN
;
void
set_ready_state
(
HTMLOuterWindow
*
,
READYSTATE
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/navigate.c
View file @
94f0f884
...
...
@@ -299,8 +299,8 @@ static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *ifa
IBinding_AddRef
(
pbind
);
This
->
binding
=
pbind
;
if
(
This
->
doc
)
list_add_head
(
&
This
->
doc
->
bindings
,
&
This
->
entry
);
if
(
This
->
window
)
list_add_head
(
&
This
->
window
->
bindings
,
&
This
->
entry
);
return
This
->
vtbl
->
start_binding
(
This
);
}
...
...
@@ -349,7 +349,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
list_remove
(
&
This
->
entry
);
list_init
(
&
This
->
entry
);
This
->
doc
=
NULL
;
This
->
window
=
NULL
;
return
hres
;
}
...
...
@@ -585,8 +585,8 @@ static HRESULT WINAPI BSCServiceProvider_QueryService(IServiceProvider *iface,
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_guid
(
guidService
),
debugstr_guid
(
riid
),
ppv
);
if
(
This
->
doc
&&
IsEqualGUID
(
guidService
,
&
IID_IWindowForBindingUI
))
return
IServiceProvider_QueryService
(
&
This
->
doc
->
basedoc
.
IServiceProvider_iface
,
guidService
,
riid
,
ppv
);
if
(
This
->
window
&&
IsEqualGUID
(
guidService
,
&
IID_IWindowForBindingUI
))
return
IServiceProvider_QueryService
(
&
This
->
window
->
base
.
IServiceProvider_iface
,
guidService
,
riid
,
ppv
);
return
E_NOINTERFACE
;
}
...
...
@@ -717,16 +717,16 @@ static HRESULT process_response_headers(nsChannelBSC *This, const WCHAR *headers
return
S_OK
;
}
HRESULT
start_binding
(
HTMLOuterWindow
*
window
,
HTML
DocumentNode
*
doc
,
BSCallback
*
bscallback
,
IBindCtx
*
bctx
)
HRESULT
start_binding
(
HTMLOuterWindow
*
window
,
HTML
InnerWindow
*
inner_window
,
BSCallback
*
bscallback
,
IBindCtx
*
bctx
)
{
IStream
*
str
=
NULL
;
HRESULT
hres
;
TRACE
(
"(%p %p %p %p)
\n
"
,
window
,
doc
,
bscallback
,
bctx
);
TRACE
(
"(%p %p %p %p)
\n
"
,
window
,
inner_window
,
bscallback
,
bctx
);
bscallback
->
doc
=
doc
;
if
(
!
doc
&&
window
)
bscallback
->
doc
=
window
->
base
.
inner_window
->
doc
;
bscallback
->
window
=
inner_window
;
if
(
!
inner_window
&&
window
)
bscallback
->
window
=
window
->
base
.
inner_window
;
/* NOTE: IE7 calls IsSystemMoniker here*/
...
...
@@ -871,14 +871,14 @@ static BufferBSC *create_bufferbsc(IMoniker *mon)
return
ret
;
}
HRESULT
bind_mon_to_buffer
(
HTML
DocumentNode
*
doc
,
IMoniker
*
mon
,
void
**
buf
,
DWORD
*
size
)
HRESULT
bind_mon_to_buffer
(
HTML
InnerWindow
*
window
,
IMoniker
*
mon
,
void
**
buf
,
DWORD
*
size
)
{
BufferBSC
*
bsc
=
create_bufferbsc
(
mon
);
HRESULT
hres
;
*
buf
=
NULL
;
hres
=
start_binding
(
NULL
,
doc
,
&
bsc
->
bsc
,
NULL
);
hres
=
start_binding
(
NULL
,
window
,
&
bsc
->
bsc
,
NULL
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
bsc
->
hres
;
if
(
SUCCEEDED
(
hres
))
{
...
...
@@ -998,12 +998,9 @@ static HRESULT on_start_nsrequest(nsChannelBSC *This)
list_remove
(
&
This
->
bsc
.
entry
);
list_init
(
&
This
->
bsc
.
entry
);
update_window_doc
(
This
->
window
);
if
(
This
->
window
->
base
.
inner_window
->
doc
!=
This
->
bsc
.
doc
)
{
if
(
This
->
bsc
.
doc
)
list_remove
(
&
This
->
bsc
.
entry
);
This
->
bsc
.
doc
=
This
->
window
->
base
.
inner_window
->
doc
;
}
list_add_head
(
&
This
->
bsc
.
doc
->
bindings
,
&
This
->
bsc
.
entry
);
if
(
This
->
window
->
base
.
inner_window
!=
This
->
bsc
.
window
)
This
->
bsc
.
window
=
This
->
window
->
base
.
inner_window
;
list_add_head
(
&
This
->
bsc
.
window
->
bindings
,
&
This
->
bsc
.
entry
);
if
(
This
->
window
->
readystate
!=
READYSTATE_LOADING
)
set_ready_state
(
This
->
window
,
READYSTATE_LOADING
);
}
...
...
@@ -1334,7 +1331,7 @@ static HRESULT async_stop_request(nsChannelBSC *This)
IBindStatusCallback_AddRef
(
&
This
->
bsc
.
IBindStatusCallback_iface
);
task
->
bsc
=
This
;
push_task
(
&
task
->
header
,
stop_request_proc
,
stop_request_task_destr
,
This
->
bsc
.
doc
->
basedoc
.
doc_obj
->
basedoc
.
task_magic
);
push_task
(
&
task
->
header
,
stop_request_proc
,
stop_request_task_destr
,
This
->
window
->
doc_obj
->
basedoc
.
task_magic
);
return
S_OK
;
}
...
...
@@ -1658,7 +1655,7 @@ void set_window_bscallback(HTMLOuterWindow *window, nsChannelBSC *callback)
if
(
window
->
bscallback
)
{
if
(
window
->
bscallback
->
bsc
.
binding
)
IBinding_Abort
(
window
->
bscallback
->
bsc
.
binding
);
window
->
bscallback
->
bsc
.
doc
=
NULL
;
window
->
bscallback
->
bsc
.
window
=
NULL
;
window
->
bscallback
->
window
=
NULL
;
IBindStatusCallback_Release
(
&
window
->
bscallback
->
bsc
.
IBindStatusCallback_iface
);
}
...
...
@@ -1668,7 +1665,7 @@ void set_window_bscallback(HTMLOuterWindow *window, nsChannelBSC *callback)
if
(
callback
)
{
callback
->
window
=
window
;
IBindStatusCallback_AddRef
(
&
callback
->
bsc
.
IBindStatusCallback_iface
);
callback
->
bsc
.
doc
=
window
->
base
.
inner_window
->
doc
;
callback
->
bsc
.
window
=
window
->
base
.
inner_window
;
}
}
...
...
@@ -1711,15 +1708,15 @@ HRESULT async_start_doc_binding(HTMLOuterWindow *window, nsChannelBSC *bscallbac
return
S_OK
;
}
void
abort_
document_bindings
(
HTMLDocumentNode
*
doc
)
void
abort_
window_bindings
(
HTMLInnerWindow
*
window
)
{
BSCallback
*
iter
,
*
next
;
LIST_FOR_EACH_ENTRY_SAFE
(
iter
,
next
,
&
doc
->
bindings
,
BSCallback
,
entry
)
{
LIST_FOR_EACH_ENTRY_SAFE
(
iter
,
next
,
&
window
->
bindings
,
BSCallback
,
entry
)
{
TRACE
(
"Aborting %p
\n
"
,
iter
);
if
(
iter
->
doc
)
remove_target_tasks
(
iter
->
doc
->
basedoc
.
task_magic
);
if
(
iter
->
window
&&
iter
->
window
->
doc
)
remove_target_tasks
(
iter
->
window
->
doc
->
basedoc
.
task_magic
);
if
(
iter
->
binding
)
IBinding_Abort
(
iter
->
binding
);
...
...
@@ -1729,7 +1726,7 @@ void abort_document_bindings(HTMLDocumentNode *doc)
iter
->
vtbl
->
stop_binding
(
iter
,
E_ABORT
);
}
iter
->
doc
=
NULL
;
iter
->
window
=
NULL
;
}
}
...
...
@@ -1746,7 +1743,7 @@ HRESULT channelbsc_load_stream(nsChannelBSC *bscallback, IStream *stream)
if
(
!
bscallback
->
nschannel
->
content_type
)
return
E_OUTOFMEMORY
;
list_add_head
(
&
bscallback
->
bsc
.
doc
->
bindings
,
&
bscallback
->
bsc
.
entry
);
list_add_head
(
&
bscallback
->
bsc
.
window
->
bindings
,
&
bscallback
->
bsc
.
entry
);
if
(
stream
)
hres
=
read_stream_data
(
bscallback
,
stream
);
if
(
SUCCEEDED
(
hres
))
...
...
dlls/mshtml/nsio.c
View file @
94f0f884
...
...
@@ -973,7 +973,7 @@ static HTMLOuterWindow *get_channel_window(nsChannel *This)
typedef
struct
{
task_t
header
;
HTML
DocumentNode
*
doc
;
HTML
InnerWindow
*
window
;
nsChannelBSC
*
bscallback
;
}
start_binding_task_t
;
...
...
@@ -981,7 +981,7 @@ static void start_binding_proc(task_t *_task)
{
start_binding_task_t
*
task
=
(
start_binding_task_t
*
)
_task
;
start_binding
(
NULL
,
task
->
doc
,
(
BSCallback
*
)
task
->
bscallback
,
NULL
);
start_binding
(
NULL
,
task
->
window
,
(
BSCallback
*
)
task
->
bscallback
,
NULL
);
}
static
void
start_binding_task_destr
(
task_t
*
_task
)
...
...
@@ -1022,7 +1022,7 @@ static nsresult async_open(nsChannel *This, HTMLOuterWindow *window, BOOL is_doc
}
else
{
start_binding_task_t
*
task
=
heap_alloc
(
sizeof
(
start_binding_task_t
));
task
->
doc
=
window
->
base
.
inner_window
->
doc
;
task
->
window
=
window
->
base
.
inner_window
;
task
->
bscallback
=
bscallback
;
push_task
(
&
task
->
header
,
start_binding_proc
,
start_binding_task_destr
,
window
->
base
.
inner_window
->
doc
->
basedoc
.
task_magic
);
}
...
...
dlls/mshtml/persist.c
View file @
94f0f884
...
...
@@ -365,7 +365,7 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel
if
(
SUCCEEDED
(
hres
))
{
remove_target_tasks
(
This
->
task_magic
);
abort_
document_bindings
(
This
->
doc_node
);
abort_
window_bindings
(
This
->
window
->
base
.
inner_window
);
hres
=
load_nsuri
(
This
->
window
,
nsuri
,
bscallback
,
0
/*LOAD_INITIAL_DOCUMENT_URI*/
);
nsISupports_Release
((
nsISupports
*
)
nsuri
);
/* FIXME */
...
...
dlls/mshtml/script.c
View file @
94f0f884
...
...
@@ -659,7 +659,7 @@ static void parse_extern_script(ScriptHost *script_host, LPCWSTR src)
if
(
FAILED
(
hres
))
return
;
hres
=
bind_mon_to_buffer
(
script_host
->
window
->
base
.
inner_window
->
doc
,
mon
,
(
void
**
)
&
buf
,
&
size
);
hres
=
bind_mon_to_buffer
(
script_host
->
window
,
mon
,
(
void
**
)
&
buf
,
&
size
);
IMoniker_Release
(
mon
);
if
(
FAILED
(
hres
))
return
;
...
...
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