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
f7910c93
Commit
f7910c93
authored
Oct 06, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved more code to handle_docobj_load.
parent
6fff7e7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
32 deletions
+34
-32
nsevents.c
dlls/mshtml/nsevents.c
+34
-32
No files found.
dlls/mshtml/nsevents.c
View file @
f7910c93
...
...
@@ -178,65 +178,67 @@ static nsresult NSAPI handle_keypress(nsIDOMEventListener *iface,
static
void
handle_docobj_load
(
HTMLDocumentObj
*
doc
)
{
IOleCommandTarget
*
olecmd
=
NULL
;
HRESULT
hres
;
if
(
!
doc
->
client
)
return
;
if
(
doc
->
nscontainer
->
editor_controller
)
{
nsIController_Release
(
doc
->
nscontainer
->
editor_controller
);
doc
->
nscontainer
->
editor_controller
=
NULL
;
}
hres
=
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
SUCCEEDED
(
hres
))
{
if
(
doc
->
download_state
)
{
VARIANT
state
,
progress
;
if
(
doc
->
usermode
==
EDITMODE
)
handle_edit_load
(
&
doc
->
basedoc
);
V_VT
(
&
progress
)
=
VT_I4
;
V_I4
(
&
progress
)
=
0
;
IOleCommandTarget_Exec
(
olecmd
,
NULL
,
OLECMDID_SETPROGRESSPOS
,
OLECMDEXECOPT_DONTPROMPTUSER
,
&
progress
,
NULL
);
if
(
doc
->
client
)
{
IOleCommandTarget
*
olecmd
=
NULL
;
V_VT
(
&
state
)
=
VT_I4
;
V_I4
(
&
state
)
=
0
;
IOleCommandTarget_Exec
(
olecmd
,
NULL
,
OLECMDID_SETDOWNLOADSTATE
,
OLECMDEXECOPT_DONTPROMPTUSER
,
&
state
,
NULL
);
}
hres
=
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
SUCCEEDED
(
hres
))
{
if
(
doc
->
download_state
)
{
VARIANT
state
,
progress
;
V_VT
(
&
progress
)
=
VT_I4
;
V_I4
(
&
progress
)
=
0
;
IOleCommandTarget_Exec
(
olecmd
,
NULL
,
OLECMDID_SETPROGRESSPOS
,
OLECMDEXECOPT_DONTPROMPTUSER
,
&
progress
,
NULL
);
IOleCommandTarget_Exec
(
olecmd
,
&
CGID_ShellDocView
,
103
,
0
,
NULL
,
NULL
);
IOleCommandTarget_Exec
(
olecmd
,
&
CGID_MSHTML
,
IDM_PARSECOMPLETE
,
0
,
NULL
,
NULL
);
IOleCommandTarget_Exec
(
olecmd
,
NULL
,
OLECMDID_HTTPEQUIV_DONE
,
0
,
NULL
,
NULL
);
V_VT
(
&
state
)
=
VT_I4
;
V_I4
(
&
state
)
=
0
;
IOleCommandTarget_Exec
(
olecmd
,
NULL
,
OLECMDID_SETDOWNLOADSTATE
,
OLECMDEXECOPT_DONTPROMPTUSER
,
&
state
,
NULL
);
}
IOleCommandTarget_Release
(
olecmd
);
IOleCommandTarget_Exec
(
olecmd
,
&
CGID_ShellDocView
,
103
,
0
,
NULL
,
NULL
);
IOleCommandTarget_Exec
(
olecmd
,
&
CGID_MSHTML
,
IDM_PARSECOMPLETE
,
0
,
NULL
,
NULL
);
IOleCommandTarget_Exec
(
olecmd
,
NULL
,
OLECMDID_HTTPEQUIV_DONE
,
0
,
NULL
,
NULL
);
IOleCommandTarget_Release
(
olecmd
);
}
}
doc
->
download_state
=
0
;
}
static
nsresult
NSAPI
handle_load
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
event
)
{
HTMLDocumentNode
*
doc
=
NSEVENTLIST_THIS
(
iface
)
->
This
->
doc
;
HTMLDocumentObj
*
doc_obj
;
nsIDOMHTMLElement
*
nsbody
=
NULL
;
HTMLDocumentObj
*
doc_obj
=
NULL
;
TRACE
(
"(%p)
\n
"
,
doc
);
if
(
!
doc
||
!
doc
->
basedoc
.
window
)
return
NS_ERROR_FAILURE
;
doc_obj
=
doc
->
basedoc
.
doc_obj
;
if
(
doc
->
basedoc
.
doc_obj
&&
doc
->
basedoc
.
doc_obj
->
basedoc
.
doc_node
==
doc
)
doc_obj
=
doc
->
basedoc
.
doc_obj
;
connect_scripts
(
doc
->
basedoc
.
window
);
if
(
doc_obj
->
nscontainer
->
editor_controller
)
{
nsIController_Release
(
doc_obj
->
nscontainer
->
editor_controller
);
doc_obj
->
nscontainer
->
editor_controller
=
NULL
;
}
if
(
doc_obj
->
usermode
==
EDITMODE
)
handle_edit_load
(
&
doc_obj
->
basedoc
);
if
(
doc
==
doc_obj
->
basedoc
.
doc_node
)
if
(
doc_obj
)
handle_docobj_load
(
doc_obj
);
set_ready_state
(
doc
->
basedoc
.
window
,
READYSTATE_COMPLETE
);
if
(
doc
==
doc_obj
->
basedoc
.
doc_node
)
{
if
(
doc
_obj
)
{
if
(
doc_obj
->
view_sink
)
IAdviseSink_OnViewChange
(
doc_obj
->
view_sink
,
DVASPECT_CONTENT
,
-
1
);
...
...
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