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
3cae9a77
Commit
3cae9a77
authored
Oct 10, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDocument2::put_onmouseover implementation.
parent
4a2db7cc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
18 deletions
+37
-18
htmldoc.c
dlls/mshtml/htmldoc.c
+8
-2
htmlevent.c
dlls/mshtml/htmlevent.c
+17
-15
htmlevent.h
dlls/mshtml/htmlevent.h
+11
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
3cae9a77
...
...
@@ -31,6 +31,7 @@
#include "wine/debug.h"
#include "mshtml_private.h"
#include "htmlevent.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
...
...
@@ -197,6 +198,9 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
if
(
This
->
window
)
IHTMLWindow2_Release
(
HTMLWINDOW2
(
This
->
window
));
if
(
This
->
event_target
)
release_event_target
(
This
->
event_target
);
heap_free
(
This
->
mime
);
detach_selection
(
This
);
detach_ranges
(
This
);
...
...
@@ -1068,8 +1072,10 @@ static HRESULT WINAPI HTMLDocument_get_onmouseout(IHTMLDocument2 *iface, VARIANT
static
HRESULT
WINAPI
HTMLDocument_put_onmouseover
(
IHTMLDocument2
*
iface
,
VARIANT
v
)
{
HTMLDocument
*
This
=
HTMLDOC_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"(%p)
\n
"
,
This
);
return
set_doc_event
(
This
,
EVENTID_MOUSEOVER
,
&
v
);
}
static
HRESULT
WINAPI
HTMLDocument_get_onmouseover
(
IHTMLDocument2
*
iface
,
VARIANT
*
p
)
...
...
dlls/mshtml/htmlevent.c
View file @
3cae9a77
...
...
@@ -430,37 +430,39 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target)
}
}
static
HRESULT
set_
node_event_disp
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
IDispatch
*
disp
)
static
HRESULT
set_
event_handler_disp
(
event_target_t
**
event_target
,
HTMLDocument
*
doc
,
eventid_t
eid
,
IDispatch
*
disp
)
{
if
(
!
node
->
event_target
)
node
->
event_target
=
heap_alloc_zero
(
sizeof
(
event_target_t
));
else
if
(
node
->
event_target
->
event_table
[
eid
])
IDispatch_Release
(
node
->
event_target
->
event_table
[
eid
]);
if
(
!
*
event_target
)
*
event_target
=
heap_alloc_zero
(
sizeof
(
event_target_t
));
else
if
(
(
*
event_target
)
->
event_table
[
eid
])
IDispatch_Release
(
(
*
event_target
)
->
event_table
[
eid
]);
(
*
event_target
)
->
event_table
[
eid
]
=
disp
;
if
(
!
disp
)
return
S_OK
;
IDispatch_AddRef
(
disp
);
node
->
event_target
->
event_table
[
eid
]
=
disp
;
if
(
event_info
[
eid
].
flags
&
EVENT_DEFAULTLISTENER
)
{
if
(
!
node
->
doc
->
nscontainer
->
event_vector
)
{
node
->
doc
->
nscontainer
->
event_vector
=
heap_alloc_zero
(
EVENTID_LAST
*
sizeof
(
BOOL
));
if
(
!
node
->
doc
->
nscontainer
->
event_vector
)
if
(
!
doc
->
nscontainer
->
event_vector
)
{
doc
->
nscontainer
->
event_vector
=
heap_alloc_zero
(
EVENTID_LAST
*
sizeof
(
BOOL
));
if
(
!
doc
->
nscontainer
->
event_vector
)
return
E_OUTOFMEMORY
;
}
if
(
!
node
->
doc
->
nscontainer
->
event_vector
[
eid
])
{
node
->
doc
->
nscontainer
->
event_vector
[
eid
]
=
TRUE
;
add_nsevent_listener
(
node
->
doc
->
nscontainer
,
event_info
[
eid
].
name
);
if
(
!
doc
->
nscontainer
->
event_vector
[
eid
])
{
doc
->
nscontainer
->
event_vector
[
eid
]
=
TRUE
;
add_nsevent_listener
(
doc
->
nscontainer
,
event_info
[
eid
].
name
);
}
}
return
S_OK
;
}
HRESULT
set_
node_event
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
VARIANT
*
var
)
HRESULT
set_
event_handler
(
event_target_t
**
event_target
,
HTMLDocument
*
doc
,
eventid_t
eid
,
VARIANT
*
var
)
{
switch
(
V_VT
(
var
))
{
case
VT_DISPATCH
:
return
set_
node_event_disp
(
node
,
eid
,
V_DISPATCH
(
var
));
return
set_
event_handler_disp
(
event_target
,
doc
,
eid
,
V_DISPATCH
(
var
));
default:
FIXME
(
"not supported vt=%d
\n
"
,
V_VT
(
var
));
...
...
@@ -494,7 +496,7 @@ void check_event_attr(HTMLDocument *doc, nsIDOMElement *nselem)
disp
=
script_parse_event
(
doc
,
attr_value
);
if
(
disp
)
{
node
=
get_node
(
doc
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
set_
node_event_disp
(
node
,
i
,
disp
);
set_
event_handler_disp
(
&
node
->
event_target
,
node
->
doc
,
i
,
disp
);
IDispatch_Release
(
disp
);
}
}
...
...
dlls/mshtml/htmlevent.h
View file @
3cae9a77
...
...
@@ -29,4 +29,14 @@ eventid_t str_to_eid(LPCWSTR);
void
check_event_attr
(
HTMLDocument
*
,
nsIDOMElement
*
);
void
release_event_target
(
event_target_t
*
);
void
fire_event
(
HTMLDocument
*
,
eventid_t
,
nsIDOMNode
*
);
HRESULT
set_node_event
(
HTMLDOMNode
*
,
eventid_t
,
VARIANT
*
);
HRESULT
set_event_handler
(
event_target_t
**
,
HTMLDocument
*
,
eventid_t
,
VARIANT
*
);
static
inline
HRESULT
set_node_event
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
VARIANT
*
var
)
{
return
set_event_handler
(
&
node
->
event_target
,
node
->
doc
,
eid
,
var
);
}
static
inline
HRESULT
set_doc_event
(
HTMLDocument
*
doc
,
eventid_t
eid
,
VARIANT
*
var
)
{
return
set_event_handler
(
&
doc
->
event_target
,
doc
,
eid
,
var
);
}
dlls/mshtml/mshtml_private.h
View file @
3cae9a77
...
...
@@ -276,6 +276,7 @@ struct HTMLDocument {
DWORD
update
;
event_target_t
*
event_target
;
ConnectionPointContainer
cp_container
;
ConnectionPoint
cp_htmldocevents
;
ConnectionPoint
cp_htmldocevents2
;
...
...
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