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
b481b092
Commit
b481b092
authored
Sep 08, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store body event target in window object.
parent
284796e4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
29 additions
and
6 deletions
+29
-6
htmlbody.c
dlls/mshtml/htmlbody.c
+11
-1
htmlelem2.c
dlls/mshtml/htmlelem2.c
+1
-1
htmlevent.c
dlls/mshtml/htmlevent.c
+2
-2
htmlevent.h
dlls/mshtml/htmlevent.h
+7
-2
htmlinput.c
dlls/mshtml/htmlinput.c
+1
-0
htmlselect.c
dlls/mshtml/htmlselect.c
+1
-0
htmltextarea.c
dlls/mshtml/htmltextarea.c
+1
-0
htmlwindow.c
dlls/mshtml/htmlwindow.c
+3
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
No files found.
dlls/mshtml/htmlbody.c
View file @
b481b092
...
...
@@ -718,11 +718,21 @@ static void HTMLBodyElement_destructor(HTMLDOMNode *iface)
HTMLElement_destructor
(
&
This
->
textcont
.
element
.
node
);
}
static
event_target_t
**
HTMLBodyElement_get_event_target
(
HTMLDOMNode
*
iface
)
{
HTMLBodyElement
*
This
=
HTMLBODY_NODE_THIS
(
iface
);
return
This
->
textcont
.
element
.
node
.
doc
&&
This
->
textcont
.
element
.
node
.
doc
->
window
?
&
This
->
textcont
.
element
.
node
.
doc
->
window
->
event_target
:
&
This
->
textcont
.
element
.
node
.
event_target
;
}
#undef HTMLBODY_NODE_THIS
static
const
NodeImplVtbl
HTMLBodyElementImplVtbl
=
{
HTMLBodyElement_QI
,
HTMLBodyElement_destructor
HTMLBodyElement_destructor
,
HTMLBodyElement_get_event_target
};
static
const
tid_t
HTMLBodyElement_iface_tids
[]
=
{
...
...
dlls/mshtml/htmlelem2.c
View file @
b481b092
...
...
@@ -608,7 +608,7 @@ static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_w
(
event
),
pDisp
,
pfResult
);
return
attach_event
(
&
This
->
node
.
event_target
,
This
->
node
.
doc
,
event
,
pDisp
,
pfResult
);
return
attach_event
(
get_node_event_target
(
&
This
->
node
)
,
This
->
node
.
doc
,
event
,
pDisp
,
pfResult
);
}
static
HRESULT
WINAPI
HTMLElement2_detachEvent
(
IHTMLElement2
*
iface
,
BSTR
event
,
IDispatch
*
pDisp
)
...
...
dlls/mshtml/htmlevent.c
View file @
b481b092
...
...
@@ -750,7 +750,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target, nsIDOMEven
node
=
get_node
(
doc
,
nsnode
,
FALSE
);
if
(
node
)
call_event_handlers
(
doc
,
event_obj
,
node
->
event_target
,
eid
,
(
IDispatch
*
)
HTMLDOMNODE
(
node
));
call_event_handlers
(
doc
,
event_obj
,
*
get_node_event_target
(
node
)
,
eid
,
(
IDispatch
*
)
HTMLDOMNODE
(
node
));
if
(
!
(
event_info
[
eid
].
flags
&
EVENT_BUBBLE
))
break
;
...
...
@@ -931,7 +931,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_event_handler_disp
(
&
node
->
event_target
,
node
->
doc
,
i
,
disp
);
set_event_handler_disp
(
get_node_event_target
(
node
)
,
node
->
doc
,
i
,
disp
);
IDispatch_Release
(
disp
);
}
}
...
...
dlls/mshtml/htmlevent.h
View file @
b481b092
...
...
@@ -43,14 +43,19 @@ HRESULT set_event_handler(event_target_t**,HTMLDocument*,eventid_t,VARIANT*);
HRESULT
get_event_handler
(
event_target_t
**
,
eventid_t
,
VARIANT
*
);
HRESULT
attach_event
(
event_target_t
**
,
HTMLDocument
*
,
BSTR
,
IDispatch
*
,
VARIANT_BOOL
*
);
static
inline
event_target_t
**
get_node_event_target
(
HTMLDOMNode
*
node
)
{
return
node
->
vtbl
->
get_event_target
?
node
->
vtbl
->
get_event_target
(
node
)
:
&
node
->
event_target
;
}
static
inline
HRESULT
set_node_event
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
VARIANT
*
var
)
{
return
set_event_handler
(
&
node
->
event_target
,
node
->
doc
,
eid
,
var
);
return
set_event_handler
(
get_node_event_target
(
node
)
,
node
->
doc
,
eid
,
var
);
}
static
inline
HRESULT
get_node_event
(
HTMLDOMNode
*
node
,
eventid_t
eid
,
VARIANT
*
var
)
{
return
get_event_handler
(
&
node
->
event_target
,
eid
,
var
);
return
get_event_handler
(
get_node_event_target
(
node
)
,
eid
,
var
);
}
static
inline
HRESULT
set_doc_event
(
HTMLDocument
*
doc
,
eventid_t
eid
,
VARIANT
*
var
)
...
...
dlls/mshtml/htmlinput.c
View file @
b481b092
...
...
@@ -1119,6 +1119,7 @@ static HRESULT HTMLInputElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOO
static
const
NodeImplVtbl
HTMLInputElementImplVtbl
=
{
HTMLInputElement_QI
,
HTMLInputElement_destructor
,
NULL
,
HTMLInputElementImpl_put_disabled
,
HTMLInputElementImpl_get_disabled
,
};
...
...
dlls/mshtml/htmlselect.c
View file @
b481b092
...
...
@@ -480,6 +480,7 @@ static HRESULT HTMLSelectElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BO
static
const
NodeImplVtbl
HTMLSelectElementImplVtbl
=
{
HTMLSelectElement_QI
,
HTMLSelectElement_destructor
,
NULL
,
HTMLSelectElementImpl_put_disabled
,
HTMLSelectElementImpl_get_disabled
};
...
...
dlls/mshtml/htmltextarea.c
View file @
b481b092
...
...
@@ -405,6 +405,7 @@ static HRESULT HTMLTextAreaElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_
static
const
NodeImplVtbl
HTMLTextAreaElementImplVtbl
=
{
HTMLTextAreaElement_QI
,
HTMLTextAreaElement_destructor
,
NULL
,
HTMLTextAreaElementImpl_put_disabled
,
HTMLTextAreaElementImpl_get_disabled
};
...
...
dlls/mshtml/htmlwindow.c
View file @
b481b092
...
...
@@ -29,6 +29,7 @@
#include "wine/unicode.h"
#include "mshtml_private.h"
#include "htmlevent.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
...
...
@@ -92,6 +93,8 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
event_target
)
release_event_target
(
This
->
event_target
);
list_remove
(
&
This
->
entry
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
...
...
dlls/mshtml/mshtml_private.h
View file @
b481b092
...
...
@@ -164,6 +164,7 @@ typedef struct {
HTMLDocument
*
doc
;
nsIDOMWindow
*
nswindow
;
event_target_t
*
event_target
;
IHTMLEventObj
*
event
;
struct
list
entry
;
...
...
@@ -382,6 +383,7 @@ typedef struct {
typedef
struct
{
HRESULT
(
*
qi
)(
HTMLDOMNode
*
,
REFIID
,
void
**
);
void
(
*
destructor
)(
HTMLDOMNode
*
);
event_target_t
**
(
*
get_event_target
)(
HTMLDOMNode
*
);
HRESULT
(
*
put_disabled
)(
HTMLDOMNode
*
,
VARIANT_BOOL
);
HRESULT
(
*
get_disabled
)(
HTMLDOMNode
*
,
VARIANT_BOOL
*
);
}
NodeImplVtbl
;
...
...
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