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
e52e57cf
Commit
e52e57cf
authored
Sep 16, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved binding variables to HTMLDocumentObj.
parent
d460c673
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
46 deletions
+40
-46
htmldoc.c
dlls/mshtml/htmldoc.c
+5
-7
htmllocation.c
dlls/mshtml/htmllocation.c
+2
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+6
-5
navigate.c
dlls/mshtml/navigate.c
+9
-9
olecmd.c
dlls/mshtml/olecmd.c
+4
-4
persist.c
dlls/mshtml/persist.c
+14
-19
No files found.
dlls/mshtml/htmldoc.c
View file @
e52e57cf
...
...
@@ -588,8 +588,8 @@ static HRESULT WINAPI HTMLDocument_get_URL(IHTMLDocument2 *iface, BSTR *p)
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
p
);
*
p
=
SysAllocString
(
This
->
url
?
This
->
url
:
about_blank_url
);
return
S_OK
;
*
p
=
SysAllocString
(
This
->
doc_obj
->
url
?
This
->
doc_obj
->
url
:
about_blank_url
);
return
*
p
?
S_OK
:
E_OUTOFMEMORY
;
}
static
HRESULT
WINAPI
HTMLDocument_put_domain
(
IHTMLDocument2
*
iface
,
BSTR
v
)
...
...
@@ -1739,8 +1739,6 @@ static void init_doc(HTMLDocument *doc, const htmldoc_vtbl_t *vtbl)
doc
->
lpSupportErrorInfoVtbl
=
&
SupportErrorInfoVtbl
;
doc
->
readystate
=
READYSTATE_UNINITIALIZED
;
list_init
(
&
doc
->
bindings
);
HTMLDocument_HTMLDocument3_Init
(
doc
);
HTMLDocument_HTMLDocument5_Init
(
doc
);
HTMLDocument_Persist_Init
(
doc
);
...
...
@@ -1763,9 +1761,6 @@ static void destroy_htmldoc(HTMLDocument *This)
{
remove_doc_tasks
(
This
);
set_document_bscallback
(
This
,
NULL
);
set_current_mon
(
This
,
NULL
);
if
(
This
->
event_target
)
release_event_target
(
This
->
event_target
);
...
...
@@ -1876,6 +1871,8 @@ static ULONG HTMLDocumentObj_Release(HTMLDocument *base)
TRACE
(
"(%p) ref = %u
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
set_document_bscallback
(
&
This
->
basedoc
,
NULL
);
set_current_mon
(
&
This
->
basedoc
,
NULL
);
if
(
This
->
basedoc
.
doc_node
)
{
This
->
basedoc
.
doc_node
->
basedoc
.
doc_obj
=
NULL
;
IHTMLDocument2_Release
(
HTMLDOC
(
&
This
->
basedoc
.
doc_node
->
basedoc
));
...
...
@@ -1942,6 +1939,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
return
hres
;
doc
->
nscontainer
=
NSContainer_Create
(
doc
,
NULL
);
list_init
(
&
doc
->
bindings
);
if
(
doc
->
nscontainer
)
{
nsresult
nsres
;
...
...
dlls/mshtml/htmllocation.c
View file @
e52e57cf
...
...
@@ -37,12 +37,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
static
HRESULT
get_url
(
HTMLLocation
*
This
,
const
WCHAR
**
ret
)
{
if
(
!
This
->
window
||
!
This
->
window
->
doc_obj
||
!
This
->
window
->
doc_obj
->
basedoc
.
url
)
{
if
(
!
This
->
window
||
!
This
->
window
->
doc_obj
||
!
This
->
window
->
doc_obj
->
url
)
{
FIXME
(
"No current URL
\n
"
);
return
E_NOTIMPL
;
}
*
ret
=
This
->
window
->
doc_obj
->
basedoc
.
url
;
*
ret
=
This
->
window
->
doc_obj
->
url
;
return
S_OK
;
}
...
...
dlls/mshtml/mshtml_private.h
View file @
e52e57cf
...
...
@@ -284,11 +284,6 @@ struct HTMLDocument {
HTMLWindow
*
window
;
nsIDOMHTMLDocument
*
nsdoc
;
nsChannelBSC
*
bscallback
;
IMoniker
*
mon
;
LPOLESTR
url
;
struct
list
bindings
;
USERMODE
usermode
;
READYSTATE
readystate
;
LPWSTR
mime
;
...
...
@@ -354,6 +349,12 @@ struct HTMLDocumentObj {
BOOL
has_key_path
;
BOOL
container_locked
;
BOOL
focus
;
/* FIXME: probably should be in document node object */
nsChannelBSC
*
bscallback
;
IMoniker
*
mon
;
LPOLESTR
url
;
struct
list
bindings
;
};
typedef
struct
{
...
...
dlls/mshtml/navigate.c
View file @
e52e57cf
...
...
@@ -313,7 +313,7 @@ static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *ifa
This
->
binding
=
pbind
;
if
(
This
->
doc
)
list_add_head
(
&
This
->
doc
->
bindings
,
&
This
->
entry
);
list_add_head
(
&
This
->
doc
->
doc_obj
->
bindings
,
&
This
->
entry
);
return
This
->
vtbl
->
start_binding
(
This
);
}
...
...
@@ -949,7 +949,7 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
on_start_nsrequest
(
This
);
/* events are reset when a new document URI is loaded, so re-initialise them here */
if
(
This
->
bsc
.
doc
&&
This
->
bsc
.
doc
->
bscallback
==
This
&&
This
->
bsc
.
doc
->
doc_obj
->
nscontainer
)
{
if
(
This
->
bsc
.
doc
&&
This
->
bsc
.
doc
->
doc_obj
->
bscallback
==
This
&&
This
->
bsc
.
doc
->
doc_obj
->
nscontainer
)
{
update_nsdocument
(
This
->
bsc
.
doc
->
doc_obj
);
init_nsevents
(
This
->
bsc
.
doc
->
doc_obj
->
nscontainer
);
}
...
...
@@ -1109,19 +1109,19 @@ void set_document_bscallback(HTMLDocument *doc, nsChannelBSC *callback)
{
BSCallback
*
iter
;
if
(
doc
->
bscallback
)
{
if
(
doc
->
bscallback
->
bsc
.
binding
)
IBinding_Abort
(
doc
->
bscallback
->
bsc
.
binding
);
doc
->
bscallback
->
bsc
.
doc
=
NULL
;
IBindStatusCallback_Release
(
STATUSCLB
(
&
doc
->
bscallback
->
bsc
));
if
(
doc
->
doc_obj
->
bscallback
)
{
if
(
doc
->
doc_obj
->
bscallback
->
bsc
.
binding
)
IBinding_Abort
(
doc
->
doc_obj
->
bscallback
->
bsc
.
binding
);
doc
->
doc_obj
->
bscallback
->
bsc
.
doc
=
NULL
;
IBindStatusCallback_Release
(
STATUSCLB
(
&
doc
->
doc_obj
->
bscallback
->
bsc
));
}
LIST_FOR_EACH_ENTRY
(
iter
,
&
doc
->
bindings
,
BSCallback
,
entry
)
{
LIST_FOR_EACH_ENTRY
(
iter
,
&
doc
->
doc_obj
->
bindings
,
BSCallback
,
entry
)
{
iter
->
doc
=
NULL
;
list_remove
(
&
iter
->
entry
);
}
doc
->
bscallback
=
callback
;
doc
->
doc_obj
->
bscallback
=
callback
;
if
(
callback
)
{
IBindStatusCallback_AddRef
(
STATUSCLB
(
&
callback
->
bsc
));
...
...
dlls/mshtml/olecmd.c
View file @
e52e57cf
...
...
@@ -543,9 +543,9 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
This
->
usermode
=
EDITMODE
;
if
(
This
->
mon
)
{
if
(
This
->
doc_obj
->
mon
)
{
CLSID
clsid
=
IID_NULL
;
hres
=
IMoniker_GetClassID
(
This
->
mon
,
&
clsid
);
hres
=
IMoniker_GetClassID
(
This
->
doc_obj
->
mon
,
&
clsid
);
if
(
SUCCEEDED
(
hres
))
{
/* We should use IMoniker::Save here */
FIXME
(
"Use CLSID %s
\n
"
,
debugstr_guid
(
&
clsid
));
...
...
@@ -588,11 +588,11 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
update_doc
(
This
,
UPDATE_UI
);
if
(
This
->
mon
)
{
if
(
This
->
doc_obj
->
mon
)
{
/* FIXME: We should find nicer way to do this */
remove_doc_tasks
(
This
);
mon
=
This
->
mon
;
mon
=
This
->
doc_obj
->
mon
;
IMoniker_AddRef
(
mon
);
}
else
{
static
const
WCHAR
about_blankW
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
0
};
...
...
dlls/mshtml/persist.c
View file @
e52e57cf
...
...
@@ -52,27 +52,27 @@ void set_current_mon(HTMLDocument *This, IMoniker *mon)
{
HRESULT
hres
;
if
(
This
->
mon
)
{
IMoniker_Release
(
This
->
mon
);
This
->
mon
=
NULL
;
if
(
This
->
doc_obj
->
mon
)
{
IMoniker_Release
(
This
->
doc_obj
->
mon
);
This
->
doc_obj
->
mon
=
NULL
;
}
if
(
This
->
url
)
{
CoTaskMemFree
(
This
->
url
);
This
->
url
=
NULL
;
if
(
This
->
doc_obj
->
url
)
{
CoTaskMemFree
(
This
->
doc_obj
->
url
);
This
->
doc_obj
->
url
=
NULL
;
}
if
(
!
mon
)
return
;
IMoniker_AddRef
(
mon
);
This
->
mon
=
mon
;
This
->
doc_obj
->
mon
=
mon
;
hres
=
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
This
->
url
);
hres
=
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
This
->
doc_obj
->
url
);
if
(
FAILED
(
hres
))
WARN
(
"GetDisplayName failed: %08x
\n
"
,
hres
);
set_script_mode
(
This
->
window
,
use_gecko_script
(
This
->
url
)
?
SCRIPTMODE_GECKO
:
SCRIPTMODE_ACTIVESCRIPT
);
set_script_mode
(
This
->
window
,
use_gecko_script
(
This
->
doc_obj
->
url
)
?
SCRIPTMODE_GECKO
:
SCRIPTMODE_ACTIVESCRIPT
);
}
static
HRESULT
set_moniker
(
HTMLDocument
*
This
,
IMoniker
*
mon
,
IBindCtx
*
pibc
,
BOOL
*
bind_complete
)
...
...
@@ -292,7 +292,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
return
hres
;
if
(
!
bind_complete
)
return
start_binding
(
This
,
(
BSCallback
*
)
This
->
bscallback
,
pibc
);
return
start_binding
(
This
,
(
BSCallback
*
)
This
->
doc_obj
->
bscallback
,
pibc
);
return
S_OK
;
}
...
...
@@ -318,11 +318,11 @@ static HRESULT WINAPI PersistMoniker_GetCurMoniker(IPersistMoniker *iface, IMoni
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppimkName
);
if
(
!
This
->
mon
)
if
(
!
This
->
doc_obj
->
mon
)
return
E_UNEXPECTED
;
IMoniker_AddRef
(
This
->
mon
);
*
ppimkName
=
This
->
mon
;
IMoniker_AddRef
(
This
->
doc_obj
->
mon
);
*
ppimkName
=
This
->
doc_obj
->
mon
;
return
S_OK
;
}
...
...
@@ -556,7 +556,7 @@ static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM
if
(
FAILED
(
hres
))
return
hres
;
return
channelbsc_load_stream
(
This
->
bscallback
,
pStm
);
return
channelbsc_load_stream
(
This
->
doc_obj
->
bscallback
,
pStm
);
}
static
HRESULT
WINAPI
PersistStreamInit_Save
(
IPersistStreamInit
*
iface
,
LPSTREAM
pStm
,
...
...
@@ -692,9 +692,4 @@ void HTMLDocument_Persist_Init(HTMLDocument *This)
This
->
lpMonikerPropVtbl
=
&
MonikerPropVtbl
;
This
->
lpPersistStreamInitVtbl
=
&
PersistStreamInitVtbl
;
This
->
lpPersistHistoryVtbl
=
&
PersistHistoryVtbl
;
This
->
bscallback
=
NULL
;
This
->
mon
=
NULL
;
This
->
url
=
NULL
;
This
->
mime
=
NULL
;
}
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