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
513c77d9
Commit
513c77d9
authored
May 14, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
May 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Pass EventTarget to attach_event.
parent
f2fa7e66
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
+14
-14
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+1
-1
htmlevent.c
dlls/mshtml/htmlevent.c
+10
-10
htmlevent.h
dlls/mshtml/htmlevent.h
+1
-1
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-1
No files found.
dlls/mshtml/htmldoc.c
View file @
513c77d9
...
@@ -2032,7 +2032,7 @@ static HRESULT WINAPI HTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR even
...
@@ -2032,7 +2032,7 @@ static HRESULT WINAPI HTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR even
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_w
(
event
),
pDisp
,
pfResult
);
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_w
(
event
),
pDisp
,
pfResult
);
return
attach_event
(
&
This
->
doc_node
->
node
.
event_target
.
ptr
,
This
,
event
,
pDisp
,
pfResult
);
return
attach_event
(
&
This
->
doc_node
->
node
.
event_target
,
This
,
event
,
pDisp
,
pfResult
);
}
}
static
HRESULT
WINAPI
HTMLDocument3_detachEvent
(
IHTMLDocument3
*
iface
,
BSTR
event
,
static
HRESULT
WINAPI
HTMLDocument3_detachEvent
(
IHTMLDocument3
*
iface
,
BSTR
event
,
...
...
dlls/mshtml/htmlelem.c
View file @
513c77d9
...
@@ -2566,7 +2566,7 @@ static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
...
@@ -2566,7 +2566,7 @@ static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_w
(
event
),
pDisp
,
pfResult
);
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_w
(
event
),
pDisp
,
pfResult
);
return
attach_event
(
get_node_event_target
(
&
This
->
node
)
,
&
This
->
node
.
doc
->
basedoc
,
event
,
pDisp
,
pfResult
);
return
attach_event
(
&
This
->
node
.
event_target
,
&
This
->
node
.
doc
->
basedoc
,
event
,
pDisp
,
pfResult
);
}
}
static
HRESULT
WINAPI
HTMLElement2_detachEvent
(
IHTMLElement2
*
iface
,
BSTR
event
,
IDispatch
*
pDisp
)
static
HRESULT
WINAPI
HTMLElement2_detachEvent
(
IHTMLElement2
*
iface
,
BSTR
event
,
IDispatch
*
pDisp
)
...
...
dlls/mshtml/htmlevent.c
View file @
513c77d9
...
@@ -1484,10 +1484,10 @@ HRESULT get_event_handler(EventTarget *event_target, eventid_t eid, VARIANT *var
...
@@ -1484,10 +1484,10 @@ HRESULT get_event_handler(EventTarget *event_target, eventid_t eid, VARIANT *var
return
S_OK
;
return
S_OK
;
}
}
HRESULT
attach_event
(
event_target_t
**
event_target_ptr
,
HTMLDocument
*
doc
,
BSTR
name
,
HRESULT
attach_event
(
EventTarget
*
event_target
,
HTMLDocument
*
doc
,
BSTR
name
,
IDispatch
*
disp
,
VARIANT_BOOL
*
res
)
IDispatch
*
disp
,
VARIANT_BOOL
*
res
)
{
{
event_target_t
*
event_target
;
event_target_t
*
data
;
eventid_t
eid
;
eventid_t
eid
;
DWORD
i
=
0
;
DWORD
i
=
0
;
...
@@ -1498,24 +1498,24 @@ HRESULT attach_event(event_target_t **event_target_ptr, HTMLDocument *doc, BSTR
...
@@ -1498,24 +1498,24 @@ HRESULT attach_event(event_target_t **event_target_ptr, HTMLDocument *doc, BSTR
return
S_OK
;
return
S_OK
;
}
}
event_target
=
get_event_target
(
event_target_ptr
);
data
=
get_event_target_data
(
event_target
,
TRUE
);
if
(
!
event_target
)
if
(
!
data
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
if
(
event_target
->
event_table
[
eid
])
{
if
(
data
->
event_table
[
eid
])
{
while
(
i
<
event_target
->
event_table
[
eid
]
->
handler_cnt
&&
event_target
->
event_table
[
eid
]
->
handlers
[
i
])
while
(
i
<
data
->
event_table
[
eid
]
->
handler_cnt
&&
data
->
event_table
[
eid
]
->
handlers
[
i
])
i
++
;
i
++
;
if
(
i
==
event_target
->
event_table
[
eid
]
->
handler_cnt
&&
!
alloc_handler_vector
(
event_target
,
eid
,
i
+
1
))
if
(
i
==
data
->
event_table
[
eid
]
->
handler_cnt
&&
!
alloc_handler_vector
(
data
,
eid
,
i
+
1
))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
else
if
(
!
alloc_handler_vector
(
event_target
,
eid
,
i
+
1
))
{
}
else
if
(
!
alloc_handler_vector
(
data
,
eid
,
i
+
1
))
{
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
IDispatch_AddRef
(
disp
);
IDispatch_AddRef
(
disp
);
event_target
->
event_table
[
eid
]
->
handlers
[
i
]
=
disp
;
data
->
event_table
[
eid
]
->
handlers
[
i
]
=
disp
;
*
res
=
VARIANT_TRUE
;
*
res
=
VARIANT_TRUE
;
return
ensure_nsevent_handler
(
doc
->
doc_node
,
event_target
,
eid
);
return
ensure_nsevent_handler
(
doc
->
doc_node
,
data
,
eid
);
}
}
HRESULT
detach_event
(
event_target_t
*
event_target
,
HTMLDocument
*
doc
,
BSTR
name
,
IDispatch
*
disp
)
HRESULT
detach_event
(
event_target_t
*
event_target
,
HTMLDocument
*
doc
,
BSTR
name
,
IDispatch
*
disp
)
...
...
dlls/mshtml/htmlevent.h
View file @
513c77d9
...
@@ -56,7 +56,7 @@ void release_event_target(event_target_t*) DECLSPEC_HIDDEN;
...
@@ -56,7 +56,7 @@ void release_event_target(event_target_t*) DECLSPEC_HIDDEN;
void
fire_event
(
HTMLDocumentNode
*
,
eventid_t
,
BOOL
,
nsIDOMNode
*
,
nsIDOMEvent
*
,
IDispatch
*
)
DECLSPEC_HIDDEN
;
void
fire_event
(
HTMLDocumentNode
*
,
eventid_t
,
BOOL
,
nsIDOMNode
*
,
nsIDOMEvent
*
,
IDispatch
*
)
DECLSPEC_HIDDEN
;
HRESULT
set_event_handler
(
EventTarget
*
,
HTMLDocumentNode
*
,
eventid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
set_event_handler
(
EventTarget
*
,
HTMLDocumentNode
*
,
eventid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_event_handler
(
EventTarget
*
,
eventid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_event_handler
(
EventTarget
*
,
eventid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
attach_event
(
event_target_t
*
*
,
HTMLDocument
*
,
BSTR
,
IDispatch
*
,
VARIANT_BOOL
*
)
DECLSPEC_HIDDEN
;
HRESULT
attach_event
(
EventTarget
*
,
HTMLDocument
*
,
BSTR
,
IDispatch
*
,
VARIANT_BOOL
*
)
DECLSPEC_HIDDEN
;
HRESULT
detach_event
(
event_target_t
*
,
HTMLDocument
*
,
BSTR
,
IDispatch
*
)
DECLSPEC_HIDDEN
;
HRESULT
detach_event
(
event_target_t
*
,
HTMLDocument
*
,
BSTR
,
IDispatch
*
)
DECLSPEC_HIDDEN
;
HRESULT
dispatch_event
(
HTMLDOMNode
*
,
const
WCHAR
*
,
VARIANT
*
,
VARIANT_BOOL
*
)
DECLSPEC_HIDDEN
;
HRESULT
dispatch_event
(
HTMLDOMNode
*
,
const
WCHAR
*
,
VARIANT
*
,
VARIANT_BOOL
*
)
DECLSPEC_HIDDEN
;
HRESULT
call_fire_event
(
HTMLDOMNode
*
,
eventid_t
)
DECLSPEC_HIDDEN
;
HRESULT
call_fire_event
(
HTMLDOMNode
*
,
eventid_t
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/htmlwindow.c
View file @
513c77d9
...
@@ -1654,7 +1654,7 @@ static HRESULT WINAPI HTMLWindow3_attachEvent(IHTMLWindow3 *iface, BSTR event, I
...
@@ -1654,7 +1654,7 @@ static HRESULT WINAPI HTMLWindow3_attachEvent(IHTMLWindow3 *iface, BSTR event, I
return
E_FAIL
;
return
E_FAIL
;
}
}
return
attach_event
(
&
window
->
doc
->
body_
event_target
,
&
window
->
doc
->
basedoc
,
event
,
pDisp
,
pfResult
);
return
attach_event
(
&
window
->
event_target
,
&
window
->
doc
->
basedoc
,
event
,
pDisp
,
pfResult
);
}
}
static
HRESULT
WINAPI
HTMLWindow3_detachEvent
(
IHTMLWindow3
*
iface
,
BSTR
event
,
IDispatch
*
pDisp
)
static
HRESULT
WINAPI
HTMLWindow3_detachEvent
(
IHTMLWindow3
*
iface
,
BSTR
event
,
IDispatch
*
pDisp
)
...
...
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