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
b271b48d
Commit
b271b48d
authored
Oct 20, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use create_event_from_nsevent in handle_htmlevent.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a52828c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
htmlevent.c
dlls/mshtml/htmlevent.c
+1
-1
htmlevent.h
dlls/mshtml/htmlevent.h
+0
-1
nsevents.c
dlls/mshtml/nsevents.c
+12
-13
No files found.
dlls/mshtml/htmlevent.c
View file @
b271b48d
...
...
@@ -195,7 +195,7 @@ static const event_info_t event_info[] = {
static
BOOL
use_event_quirks
(
EventTarget
*
);
eventid_t
str_to_eid
(
LPCWSTR
str
)
static
eventid_t
str_to_eid
(
const
WCHAR
*
str
)
{
int
i
;
...
...
dlls/mshtml/htmlevent.h
View file @
b271b48d
...
...
@@ -71,7 +71,6 @@ typedef struct {
BOOL
no_event_obj
;
}
DOMEvent
;
eventid_t
str_to_eid
(
LPCWSTR
)
DECLSPEC_HIDDEN
;
void
check_event_attr
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
)
DECLSPEC_HIDDEN
;
void
release_event_target
(
EventTarget
*
)
DECLSPEC_HIDDEN
;
void
fire_event
(
HTMLDocumentNode
*
,
eventid_t
,
BOOL
,
EventTarget
*
,
nsIDOMEvent
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/nsevents.c
View file @
b271b48d
...
...
@@ -288,16 +288,14 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
return
nsres
;
}
static
nsresult
NSAPI
handle_htmlevent
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
event
)
static
nsresult
NSAPI
handle_htmlevent
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
ns
event
)
{
nsEventListener
*
This
=
impl_from_nsIDOMEventListener
(
iface
);
HTMLDocumentNode
*
doc
=
This
->
This
->
doc
;
const
PRUnichar
*
type
;
nsIDOMEventTarget
*
event_target
;
nsIDOMNode
*
nsnode
;
nsAString
type_str
;
HTMLDOMNode
*
node
;
eventid_t
eid
;
DOMEvent
*
event
;
nsresult
nsres
;
HRESULT
hres
;
...
...
@@ -308,13 +306,7 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *
return
NS_OK
;
}
nsAString_Init
(
&
type_str
,
NULL
);
nsIDOMEvent_GetType
(
event
,
&
type_str
);
nsAString_GetData
(
&
type_str
,
&
type
);
eid
=
str_to_eid
(
type
);
nsAString_Finish
(
&
type_str
);
nsres
=
nsIDOMEvent_GetTarget
(
event
,
&
event_target
);
nsres
=
nsIDOMEvent_GetTarget
(
nsevent
,
&
event_target
);
if
(
NS_FAILED
(
nsres
)
||
!
event_target
)
{
ERR
(
"GetEventTarget failed: %08x
\n
"
,
nsres
);
return
NS_OK
;
...
...
@@ -332,8 +324,14 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *
if
(
FAILED
(
hres
))
return
NS_OK
;
hres
=
create_event_from_nsevent
(
nsevent
,
&
event
);
if
(
FAILED
(
hres
))
{
node_release
(
node
);
return
NS_OK
;
}
/* If we fine need for more special cases here, we may consider handling it in a more generic way. */
switch
(
eid
)
{
switch
(
e
vent
->
event_
id
)
{
case
EVENTID_FOCUS
:
if
(
doc
->
event_vector
[
EVENTID_FOCUSIN
])
fire_event
(
doc
,
EVENTID_FOCUSIN
,
TRUE
,
&
node
->
event_target
,
NULL
);
...
...
@@ -346,8 +344,9 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *
break
;
}
fire_event
(
doc
,
eid
,
TRUE
,
&
node
->
event_target
,
event
);
fire_event
_obj
(
&
node
->
event_target
,
event
);
IDOMEvent_Release
(
&
event
->
IDOMEvent_iface
);
node_release
(
node
);
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