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
bcfa7c57
Commit
bcfa7c57
authored
Nov 08, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Split parse_complete to handle_load and mutation observer.
parent
cf680ed0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
73 deletions
+82
-73
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-1
mutation.c
dlls/mshtml/mutation.c
+37
-3
nsevents.c
dlls/mshtml/nsevents.c
+45
-2
task.c
dlls/mshtml/task.c
+0
-67
No files found.
dlls/mshtml/mshtml_private.h
View file @
bcfa7c57
...
...
@@ -683,7 +683,6 @@ HRESULT channelbsc_load_stream(nsChannelBSC*,IStream*);
void
channelbsc_set_channel
(
nsChannelBSC
*
,
nsChannel
*
,
nsIStreamListener
*
,
nsISupports
*
);
IMoniker
*
get_channelbsc_mon
(
nsChannelBSC
*
);
void
parse_complete
(
HTMLDocumentObj
*
);
void
set_ready_state
(
HTMLWindow
*
,
READYSTATE
);
HRESULT
HTMLSelectionObject_Create
(
HTMLDocumentNode
*
,
nsISelection
*
,
IHTMLSelectionObject
**
);
...
...
dlls/mshtml/mutation.c
View file @
bcfa7c57
...
...
@@ -27,6 +27,7 @@
#include "winuser.h"
#include "winreg.h"
#include "ole2.h"
#include "shlguid.h"
#include "mshtml_private.h"
#include "htmlevent.h"
...
...
@@ -353,10 +354,43 @@ static nsresult init_frame_window(HTMLDocumentNode *doc, nsISupports *nsunk)
return
nsres
;
}
static
void
parse_complete_proc
(
task_t
*
_task
)
/* Calls undocumented 69 cmd of CGID_Explorer */
static
void
call_explorer_69
(
HTMLDocumentObj
*
doc
)
{
docobj_task_t
*
task
=
(
docobj_task_t
*
)
_task
;
parse_complete
(
task
->
doc
);
IOleCommandTarget
*
olecmd
;
VARIANT
var
;
HRESULT
hres
;
if
(
!
doc
->
client
)
return
;
hres
=
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
FAILED
(
hres
))
return
;
VariantInit
(
&
var
);
hres
=
IOleCommandTarget_Exec
(
olecmd
,
&
CGID_Explorer
,
69
,
0
,
NULL
,
&
var
);
IOleCommandTarget_Release
(
olecmd
);
if
(
SUCCEEDED
(
hres
)
&&
V_VT
(
&
var
)
!=
VT_NULL
)
FIXME
(
"handle result
\n
"
);
}
static
void
parse_complete_proc
(
task_t
*
task
)
{
HTMLDocumentObj
*
doc
=
((
docobj_task_t
*
)
task
)
->
doc
;
TRACE
(
"(%p)
\n
"
,
doc
);
if
(
doc
->
usermode
==
EDITMODE
)
init_editor
(
&
doc
->
basedoc
);
call_explorer_69
(
doc
);
call_property_onchanged
(
&
doc
->
basedoc
.
cp_propnotif
,
1005
);
call_explorer_69
(
doc
);
/* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */
set_ready_state
(
doc
->
basedoc
.
window
,
READYSTATE_INTERACTIVE
);
}
static
void
handle_end_load
(
HTMLDocumentNode
*
This
)
...
...
dlls/mshtml/nsevents.c
View file @
bcfa7c57
...
...
@@ -26,6 +26,8 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mshtmcid.h"
#include "shlguid.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -173,6 +175,36 @@ static nsresult NSAPI handle_keypress(nsIDOMEventListener *iface,
return
NS_OK
;
}
static
void
handle_docobj_load
(
HTMLDocumentObj
*
doc
)
{
IOleCommandTarget
*
olecmd
=
NULL
;
HRESULT
hres
;
if
(
!
doc
->
client
)
return
;
hres
=
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
SUCCEEDED
(
hres
))
{
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
);
}
}
static
nsresult
NSAPI
handle_load
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
event
)
{
HTMLDocumentNode
*
doc
=
NSEVENTLIST_THIS
(
iface
)
->
This
->
doc
;
...
...
@@ -195,8 +227,19 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
if
(
doc_obj
->
usermode
==
EDITMODE
)
handle_edit_load
(
&
doc_obj
->
basedoc
);
if
(
doc
->
basedoc
.
window
->
readystate
!=
READYSTATE_COMPLETE
)
set_ready_state
(
doc
->
basedoc
.
window
,
READYSTATE_COMPLETE
);
if
(
doc
==
doc_obj
->
basedoc
.
doc_node
)
handle_docobj_load
(
doc_obj
);
set_ready_state
(
doc
->
basedoc
.
window
,
READYSTATE_COMPLETE
);
if
(
doc
==
doc_obj
->
basedoc
.
doc_node
)
{
if
(
doc_obj
->
frame
)
{
static
const
WCHAR
wszDone
[]
=
{
'D'
,
'o'
,
'n'
,
'e'
,
0
};
IOleInPlaceFrame_SetStatusText
(
doc_obj
->
frame
,
wszDone
);
}
update_title
(
doc_obj
);
}
if
(
!
doc
->
nsdoc
)
{
ERR
(
"NULL nsdoc
\n
"
);
...
...
dlls/mshtml/task.c
View file @
bcfa7c57
...
...
@@ -27,8 +27,6 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mshtmcid.h"
#include "shlguid.h"
#include "wine/debug.h"
...
...
@@ -201,75 +199,10 @@ HRESULT clear_task_timer(HTMLDocument *doc, BOOL interval, DWORD id)
return
S_OK
;
}
/* Calls undocumented 69 cmd of CGID_Explorer */
static
void
call_explorer_69
(
HTMLDocumentObj
*
doc
)
{
IOleCommandTarget
*
olecmd
;
VARIANT
var
;
HRESULT
hres
;
if
(
!
doc
->
client
)
return
;
hres
=
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
FAILED
(
hres
))
return
;
VariantInit
(
&
var
);
hres
=
IOleCommandTarget_Exec
(
olecmd
,
&
CGID_Explorer
,
69
,
0
,
NULL
,
&
var
);
IOleCommandTarget_Release
(
olecmd
);
if
(
SUCCEEDED
(
hres
)
&&
V_VT
(
&
var
)
!=
VT_NULL
)
FIXME
(
"handle result
\n
"
);
}
void
parse_complete
(
HTMLDocumentObj
*
doc
)
{
IOleCommandTarget
*
olecmd
=
NULL
;
TRACE
(
"(%p)
\n
"
,
doc
);
if
(
doc
->
usermode
==
EDITMODE
)
init_editor
(
&
doc
->
basedoc
);
call_explorer_69
(
doc
);
call_property_onchanged
(
&
doc
->
basedoc
.
cp_propnotif
,
1005
);
call_explorer_69
(
doc
);
/* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */
set_ready_state
(
doc
->
basedoc
.
window
,
READYSTATE_INTERACTIVE
);
if
(
doc
->
client
)
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
olecmd
)
{
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
);
}
set_ready_state
(
doc
->
basedoc
.
window
,
READYSTATE_COMPLETE
);
if
(
doc
->
frame
)
{
static
const
WCHAR
wszDone
[]
=
{
'D'
,
'o'
,
'n'
,
'e'
,
0
};
IOleInPlaceFrame_SetStatusText
(
doc
->
frame
,
wszDone
);
}
update_title
(
doc
);
}
static
void
call_timer_disp
(
IDispatch
*
disp
)
...
...
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