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
402c8756
Commit
402c8756
authored
Jul 23, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved OLECMDID_SETDOWNLOADSTATE call to separated function.
parent
e325be79
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
40 deletions
+48
-40
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
nsevents.c
dlls/mshtml/nsevents.c
+22
-23
persist.c
dlls/mshtml/persist.c
+25
-17
No files found.
dlls/mshtml/mshtml_private.h
View file @
402c8756
...
...
@@ -692,6 +692,7 @@ void set_current_mon(HTMLWindow*,IMoniker*) DECLSPEC_HIDDEN;
HRESULT
start_binding
(
HTMLWindow
*
,
HTMLDocumentNode
*
,
BSCallback
*
,
IBindCtx
*
)
DECLSPEC_HIDDEN
;
HRESULT
async_start_doc_binding
(
HTMLWindow
*
,
nsChannelBSC
*
)
DECLSPEC_HIDDEN
;
void
abort_document_bindings
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
void
set_download_state
(
HTMLDocumentObj
*
,
int
)
DECLSPEC_HIDDEN
;
HRESULT
bind_mon_to_buffer
(
HTMLDocumentNode
*
,
IMoniker
*
,
void
**
,
DWORD
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/nsevents.c
View file @
402c8756
...
...
@@ -184,6 +184,7 @@ static nsresult NSAPI handle_keypress(nsIDOMEventListener *iface,
static
void
handle_docobj_load
(
HTMLDocumentObj
*
doc
)
{
IOleCommandTarget
*
olecmd
=
NULL
;
HRESULT
hres
;
if
(
doc
->
nscontainer
->
editor_controller
)
{
...
...
@@ -195,33 +196,31 @@ static void handle_docobj_load(HTMLDocumentObj *doc)
handle_edit_load
(
&
doc
->
basedoc
);
if
(
doc
->
client
)
{
IOleCommandTarget
*
olecmd
=
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
);
V_VT
(
&
state
)
=
VT_I4
;
V_I4
(
&
state
)
=
0
;
IOleCommandTarget_Exec
(
olecmd
,
NULL
,
OLECMDID_SETDOWNLOADSTATE
,
OLECMDEXECOPT_DONTPROMPTUSER
,
&
state
,
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
);
IOleCommandTarget_Release
(
olecmd
);
if
(
FAILED
(
hres
))
olecmd
=
NULL
;
}
if
(
doc
->
download_state
)
{
if
(
olecmd
)
{
VARIANT
progress
;
V_VT
(
&
progress
)
=
VT_I4
;
V_I4
(
&
progress
)
=
0
;
IOleCommandTarget_Exec
(
olecmd
,
NULL
,
OLECMDID_SETPROGRESSPOS
,
OLECMDEXECOPT_DONTPROMPTUSER
,
&
progress
,
NULL
);
}
set_download_state
(
doc
,
0
);
}
doc
->
download_state
=
0
;
if
(
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
);
}
}
static
nsresult
NSAPI
handle_load
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
event
)
...
...
dlls/mshtml/persist.c
View file @
402c8756
...
...
@@ -94,6 +94,28 @@ void set_current_mon(HTMLWindow *This, IMoniker *mon)
set_script_mode
(
This
,
use_gecko_script
(
This
)
?
SCRIPTMODE_GECKO
:
SCRIPTMODE_ACTIVESCRIPT
);
}
void
set_download_state
(
HTMLDocumentObj
*
doc
,
int
state
)
{
if
(
doc
->
client
)
{
IOleCommandTarget
*
olecmd
;
HRESULT
hres
;
hres
=
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
SUCCEEDED
(
hres
))
{
VARIANT
var
;
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
state
;
IOleCommandTarget_Exec
(
olecmd
,
NULL
,
OLECMDID_SETDOWNLOADSTATE
,
OLECMDEXECOPT_DONTPROMPTUSER
,
&
var
,
NULL
);
IOleCommandTarget_Release
(
olecmd
);
}
}
doc
->
download_state
=
state
;
}
static
void
set_progress_proc
(
task_t
*
_task
)
{
docobj_task_t
*
task
=
(
docobj_task_t
*
)
_task
;
...
...
@@ -139,7 +161,6 @@ static void set_downloading_proc(task_t *_task)
{
download_proc_task_t
*
task
=
(
download_proc_task_t
*
)
_task
;
HTMLDocumentObj
*
doc
=
task
->
doc
;
IOleCommandTarget
*
olecmd
;
HRESULT
hres
;
TRACE
(
"(%p)
\n
"
,
doc
);
...
...
@@ -147,25 +168,12 @@ static void set_downloading_proc(task_t *_task)
set_statustext
(
doc
,
IDS_STATUS_DOWNLOADINGFROM
,
task
->
url
);
CoTaskMemFree
(
task
->
url
);
if
(
task
->
set_download
)
set_download_state
(
doc
,
1
);
if
(
!
doc
->
client
)
return
;
if
(
task
->
set_download
)
{
hres
=
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
SUCCEEDED
(
hres
))
{
VARIANT
var
;
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
1
;
IOleCommandTarget_Exec
(
olecmd
,
NULL
,
OLECMDID_SETDOWNLOADSTATE
,
OLECMDEXECOPT_DONTPROMPTUSER
,
&
var
,
NULL
);
IOleCommandTarget_Release
(
olecmd
);
}
doc
->
download_state
=
1
;
}
if
(
doc
->
view_sink
)
IAdviseSink_OnViewChange
(
doc
->
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