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
6d766789
Commit
6d766789
authored
Aug 02, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added possibility for node implementations to add default event handlers.
parent
aa6ee29e
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
46 additions
and
6 deletions
+46
-6
htmlevent.c
dlls/mshtml/htmlevent.c
+36
-6
htmlform.c
dlls/mshtml/htmlform.c
+1
-0
htmlframe.c
dlls/mshtml/htmlframe.c
+1
-0
htmliframe.c
dlls/mshtml/htmliframe.c
+1
-0
htmlimg.c
dlls/mshtml/htmlimg.c
+1
-0
htmlinput.c
dlls/mshtml/htmlinput.c
+1
-0
htmlobject.c
dlls/mshtml/htmlobject.c
+1
-0
htmlscript.c
dlls/mshtml/htmlscript.c
+1
-0
htmlselect.c
dlls/mshtml/htmlselect.c
+1
-0
htmltextarea.c
dlls/mshtml/htmltextarea.c
+1
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
6d766789
...
...
@@ -980,8 +980,10 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode
HTMLEventObj
*
event_obj
=
NULL
;
IHTMLEventObj
*
prev_event
;
nsIDOMNode
*
parent
,
*
nsnode
;
BOOL
prevent_default
=
FALSE
;
HTMLDOMNode
*
node
;
PRUint16
node_type
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p) %s
\n
"
,
doc
,
debugstr_w
(
event_info
[
eid
].
name
));
...
...
@@ -1053,14 +1055,42 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode
if
(
nsnode
)
nsIDOMNode_Release
(
nsnode
);
if
(
event_obj
&&
event_obj
->
prevent_default
)
prevent_default
=
TRUE
;
doc
->
basedoc
.
window
->
event
=
prev_event
;
if
(
event_obj
)
{
if
(
event_obj
->
prevent_default
&&
nsevent
)
{
TRACE
(
"calling PreventDefault
\n
"
);
nsIDOMEvent_PreventDefault
(
nsevent
);
}
if
(
event_obj
)
IHTMLEventObj_Release
(
&
event_obj
->
IHTMLEventObj_iface
);
if
(
!
prevent_default
)
{
nsIDOMNode_AddRef
(
target
);
nsnode
=
target
;
do
{
hres
=
get_node
(
doc
,
nsnode
,
TRUE
,
&
node
);
if
(
FAILED
(
hres
))
break
;
if
(
node
&&
node
->
vtbl
->
handle_event
)
{
hres
=
node
->
vtbl
->
handle_event
(
node
,
eid
,
&
prevent_default
);
if
(
FAILED
(
hres
)
||
prevent_default
)
break
;
}
nsres
=
nsIDOMNode_GetParentNode
(
nsnode
,
&
parent
);
if
(
NS_FAILED
(
nsres
))
break
;
nsIDOMNode_Release
(
nsnode
);
nsnode
=
parent
;
}
while
(
nsnode
);
if
(
nsnode
)
nsIDOMNode_Release
(
nsnode
);
}
if
(
prevent_default
&&
nsevent
)
{
TRACE
(
"calling PreventDefault
\n
"
);
nsIDOMEvent_PreventDefault
(
nsevent
);
}
}
...
...
dlls/mshtml/htmlform.c
View file @
6d766789
...
...
@@ -639,6 +639,7 @@ static const NodeImplVtbl HTMLFormElementImplVtbl = {
NULL
,
NULL
,
NULL
,
NULL
,
HTMLFormElement_get_dispid
,
HTMLFormElement_invoke
};
...
...
dlls/mshtml/htmlframe.c
View file @
6d766789
...
...
@@ -274,6 +274,7 @@ static const NodeImplVtbl HTMLFrameElementImplVtbl = {
NULL
,
NULL
,
NULL
,
NULL
,
HTMLFrameElement_get_document
,
HTMLFrameElement_get_readystate
,
HTMLFrameElement_get_dispid
,
...
...
dlls/mshtml/htmliframe.c
View file @
6d766789
...
...
@@ -252,6 +252,7 @@ static const NodeImplVtbl HTMLIFrameImplVtbl = {
NULL
,
NULL
,
NULL
,
NULL
,
HTMLIFrame_get_document
,
HTMLIFrame_get_readystate
,
HTMLIFrame_get_dispid
,
...
...
dlls/mshtml/htmlimg.c
View file @
6d766789
...
...
@@ -663,6 +663,7 @@ static const NodeImplVtbl HTMLImgElementImplVtbl = {
NULL
,
NULL
,
NULL
,
NULL
,
HTMLImgElement_get_readystate
};
...
...
dlls/mshtml/htmlinput.c
View file @
6d766789
...
...
@@ -1187,6 +1187,7 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = {
HTMLElement_clone
,
NULL
,
HTMLInputElementImpl_fire_event
,
NULL
,
HTMLInputElementImpl_put_disabled
,
HTMLInputElementImpl_get_disabled
,
};
...
...
dlls/mshtml/htmlobject.c
View file @
6d766789
...
...
@@ -475,6 +475,7 @@ static const NodeImplVtbl HTMLObjectElementImplVtbl = {
NULL
,
NULL
,
NULL
,
NULL
,
HTMLObjectElement_get_readystate
,
HTMLObjectElement_get_dispid
,
HTMLObjectElement_invoke
...
...
dlls/mshtml/htmlscript.c
View file @
6d766789
...
...
@@ -335,6 +335,7 @@ static const NodeImplVtbl HTMLScriptElementImplVtbl = {
NULL
,
NULL
,
NULL
,
NULL
,
HTMLScriptElement_get_readystate
};
...
...
dlls/mshtml/htmlselect.c
View file @
6d766789
...
...
@@ -617,6 +617,7 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = {
HTMLElement_clone
,
NULL
,
NULL
,
NULL
,
HTMLSelectElementImpl_put_disabled
,
HTMLSelectElementImpl_get_disabled
,
NULL
,
...
...
dlls/mshtml/htmltextarea.c
View file @
6d766789
...
...
@@ -449,6 +449,7 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
HTMLElement_clone
,
NULL
,
NULL
,
NULL
,
HTMLTextAreaElementImpl_put_disabled
,
HTMLTextAreaElementImpl_get_disabled
};
...
...
dlls/mshtml/mshtml_private.h
View file @
6d766789
...
...
@@ -499,6 +499,7 @@ typedef struct {
HRESULT
(
*
clone
)(
HTMLDOMNode
*
,
nsIDOMNode
*
,
HTMLDOMNode
**
);
event_target_t
**
(
*
get_event_target
)(
HTMLDOMNode
*
);
HRESULT
(
*
fire_event
)(
HTMLDOMNode
*
,
DWORD
,
BOOL
*
);
HRESULT
(
*
handle_event
)(
HTMLDOMNode
*
,
DWORD
,
BOOL
*
);
HRESULT
(
*
put_disabled
)(
HTMLDOMNode
*
,
VARIANT_BOOL
);
HRESULT
(
*
get_disabled
)(
HTMLDOMNode
*
,
VARIANT_BOOL
*
);
HRESULT
(
*
get_document
)(
HTMLDOMNode
*
,
IDispatch
**
);
...
...
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