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
12f312da
Commit
12f312da
authored
Apr 21, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added load event support.
parent
4c21a5d3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
389 additions
and
7 deletions
+389
-7
dispex.c
dlls/mshtml/dispex.c
+29
-0
htmlevent.c
dlls/mshtml/htmlevent.c
+334
-5
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+9
-0
nsevents.c
dlls/mshtml/nsevents.c
+16
-0
No files found.
dlls/mshtml/dispex.c
View file @
12f312da
...
...
@@ -86,6 +86,35 @@ void release_typelib(void)
ITypeLib_Release
(
typelib
);
}
void
call_disp_func
(
HTMLDocument
*
doc
,
IDispatch
*
disp
)
{
DISPID
named_arg
=
DISPID_THIS
;
VARIANTARG
arg
;
DISPPARAMS
params
=
{
&
arg
,
&
named_arg
,
1
,
1
};
EXCEPINFO
ei
;
IDispatchEx
*
dispex
;
VARIANT
res
;
HRESULT
hres
;
hres
=
IDispatch_QueryInterface
(
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Could not get IDispatchEx interface: %08x
\n
"
,
hres
);
return
;
}
V_VT
(
&
arg
)
=
VT_DISPATCH
;
V_DISPATCH
(
&
arg
)
=
(
IDispatch
*
)
HTMLWINDOW2
(
doc
->
window
);
VariantInit
(
&
res
);
memset
(
&
ei
,
0
,
sizeof
(
ei
));
hres
=
IDispatchEx_InvokeEx
(
dispex
,
0
,
GetUserDefaultLCID
(),
DISPATCH_METHOD
,
&
params
,
&
res
,
&
ei
,
NULL
);
IDispatchEx_Release
(
dispex
);
TRACE
(
"%p returned %08x
\n
"
,
disp
,
hres
);
VariantClear
(
&
res
);
}
#define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface)
static
HRESULT
WINAPI
DispatchEx_QueryInterface
(
IDispatchEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
dlls/mshtml/htmlevent.c
View file @
12f312da
This diff is collapsed.
Click to expand it.
dlls/mshtml/htmlwindow.c
View file @
12f312da
...
...
@@ -1046,12 +1046,11 @@ void setup_nswindow(HTMLWindow *This)
HTMLWindow
*
HTMLWindow_Create
(
HTMLDocument
*
doc
)
{
HTMLWindow
*
ret
=
heap_alloc
(
sizeof
(
HTMLWindow
));
HTMLWindow
*
ret
=
heap_alloc
_zero
(
sizeof
(
HTMLWindow
));
ret
->
lpHTMLWindow2Vtbl
=
&
HTMLWindow2Vtbl
;
ret
->
lpHTMLWindow3Vtbl
=
&
HTMLWindow3Vtbl
;
ret
->
ref
=
1
;
ret
->
nswindow
=
NULL
;
ret
->
doc
=
doc
;
if
(
doc
->
nscontainer
)
{
...
...
dlls/mshtml/mshtml_private.h
View file @
12f312da
...
...
@@ -81,6 +81,8 @@ typedef struct {
HTMLDocument
*
doc
;
nsIDOMWindow
*
nswindow
;
IHTMLEventObj
*
event
;
struct
list
entry
;
}
HTMLWindow
;
...
...
@@ -428,8 +430,14 @@ void get_editor_controller(NSContainer*);
void
init_nsevents
(
NSContainer
*
);
nsresult
get_nsinterface
(
nsISupports
*
,
REFIID
,
void
**
);
typedef
enum
{
EVENTID_LOAD
,
EVENTID_LAST
}
eventid_t
;
void
check_event_attr
(
HTMLDocument
*
,
nsIDOMElement
*
);
void
release_event_target
(
event_target_t
*
);
void
fire_event
(
HTMLDocument
*
,
eventid_t
,
nsIDOMNode
*
);
void
set_document_bscallback
(
HTMLDocument
*
,
nsChannelBSC
*
);
void
set_current_mon
(
HTMLDocument
*
,
IMoniker
*
);
...
...
@@ -540,6 +548,7 @@ void remove_doc_tasks(const HTMLDocument*);
HRESULT
get_typeinfo
(
tid_t
,
ITypeInfo
**
);
void
release_typelib
(
void
);
void
call_disp_func
(
HTMLDocument
*
,
IDispatch
*
);
DEFINE_GUID
(
CLSID_AboutProtocol
,
0x3050F406
,
0x98B5
,
0x11CF
,
0xBB
,
0x82
,
0x00
,
0xAA
,
0x00
,
0xBD
,
0xCE
,
0x0B
);
DEFINE_GUID
(
CLSID_JSProtocol
,
0x3050F3B2
,
0x98B5
,
0x11CF
,
0xBB
,
0x82
,
0x00
,
0xAA
,
0x00
,
0xBD
,
0xCE
,
0x0B
);
...
...
dlls/mshtml/nsevents.c
View file @
12f312da
...
...
@@ -129,6 +129,9 @@ static nsresult NSAPI handle_keypress(nsIDOMEventListener *iface,
static
nsresult
NSAPI
handle_load
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
event
)
{
NSContainer
*
This
=
NSEVENTLIST_THIS
(
iface
)
->
This
;
nsIDOMHTMLDocument
*
nshtmldoc
;
nsIDOMHTMLElement
*
nsbody
=
NULL
;
nsIDOMDocument
*
nsdoc
;
task_t
*
task
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -159,6 +162,19 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
*/
push_task
(
task
);
nsIWebNavigation_GetDocument
(
This
->
navigation
,
&
nsdoc
);
nsIDOMDocument_QueryInterface
(
nsdoc
,
&
IID_nsIDOMHTMLDocument
,
(
void
**
)
&
nshtmldoc
);
nsIDOMDocument_Release
(
nsdoc
);
nsIDOMHTMLDocument_GetBody
(
nshtmldoc
,
&
nsbody
);
nsIDOMHTMLDocument_Release
(
nshtmldoc
);
if
(
nsbody
)
{
fire_event
(
This
->
doc
,
EVENTID_LOAD
,
(
nsIDOMNode
*
)
nsbody
);
nsIDOMHTMLElement_Release
(
nsbody
);
}
return
NS_OK
;
}
...
...
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