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
e4a936a2
Commit
e4a936a2
authored
Jan 04, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store body event target in HTMLDocumentNode.
parent
2e6353d4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
17 deletions
+32
-17
htmlbody.c
dlls/mshtml/htmlbody.c
+2
-2
htmldoc.c
dlls/mshtml/htmldoc.c
+2
-0
htmlevent.c
dlls/mshtml/htmlevent.c
+1
-1
htmlevent.h
dlls/mshtml/htmlevent.h
+0
-10
htmlwindow.c
dlls/mshtml/htmlwindow.c
+26
-3
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
No files found.
dlls/mshtml/htmlbody.c
View file @
e4a936a2
...
...
@@ -783,8 +783,8 @@ 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
->
basedoc
.
window
?
&
This
->
textcont
.
element
.
node
.
doc
->
b
asedoc
.
window
->
event_target
return
This
->
textcont
.
element
.
node
.
doc
?
&
This
->
textcont
.
element
.
node
.
doc
->
b
ody_
event_target
:
&
This
->
textcont
.
element
.
node
.
event_target
;
}
...
...
dlls/mshtml/htmldoc.c
View file @
e4a936a2
...
...
@@ -1842,6 +1842,8 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface)
{
HTMLDocumentNode
*
This
=
HTMLDOCNODE_NODE_THIS
(
iface
);
if
(
This
->
body_event_target
)
release_event_target
(
This
->
body_event_target
);
if
(
This
->
nsevent_listener
)
release_nsevents
(
This
);
if
(
This
->
catmgr
)
...
...
dlls/mshtml/htmlevent.c
View file @
e4a936a2
...
...
@@ -934,7 +934,7 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, nsIDOMNode *target, nsIDOM
}
}
call_event_handlers
(
doc
,
event_obj
,
doc
->
basedoc
.
doc_node
->
node
.
event_target
,
&
doc
->
basedoc
.
cp_container
,
eid
,
call_event_handlers
(
doc
,
event_obj
,
doc
->
node
.
event_target
,
&
doc
->
basedoc
.
cp_container
,
eid
,
(
IDispatch
*
)
HTMLDOC
(
&
doc
->
basedoc
));
break
;
...
...
dlls/mshtml/htmlevent.h
View file @
e4a936a2
...
...
@@ -74,13 +74,3 @@ static inline HRESULT get_doc_event(HTMLDocument *doc, eventid_t eid, VARIANT *v
{
return
get_node_event
(
&
doc
->
doc_node
->
node
,
eid
,
var
);
}
static
inline
HRESULT
set_window_event
(
HTMLWindow
*
window
,
eventid_t
eid
,
VARIANT
*
var
)
{
return
set_event_handler
(
&
window
->
event_target
,
window
->
doc
,
eid
,
var
);
}
static
inline
HRESULT
get_window_event
(
HTMLWindow
*
window
,
eventid_t
eid
,
VARIANT
*
var
)
{
return
get_event_handler
(
&
window
->
event_target
,
eid
,
var
);
}
dlls/mshtml/htmlwindow.c
View file @
e4a936a2
...
...
@@ -117,6 +117,26 @@ static HRESULT get_location(HTMLWindow *This, HTMLLocation **ret)
return
S_OK
;
}
static
inline
HRESULT
set_window_event
(
HTMLWindow
*
window
,
eventid_t
eid
,
VARIANT
*
var
)
{
if
(
!
window
->
doc
)
{
FIXME
(
"No document
\n
"
);
return
E_FAIL
;
}
return
set_event_handler
(
&
window
->
doc
->
body_event_target
,
window
->
doc
,
eid
,
var
);
}
static
inline
HRESULT
get_window_event
(
HTMLWindow
*
window
,
eventid_t
eid
,
VARIANT
*
var
)
{
if
(
!
window
->
doc
)
{
FIXME
(
"No document
\n
"
);
return
E_FAIL
;
}
return
get_event_handler
(
&
window
->
doc
->
body_event_target
,
eid
,
var
);
}
#define HTMLWINDOW2_THIS(iface) DEFINE_THIS(HTMLWindow, HTMLWindow2, iface)
static
HRESULT
WINAPI
HTMLWindow2_QueryInterface
(
IHTMLWindow2
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -206,8 +226,6 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
if
(
This
->
screen
)
IHTMLScreen_Release
(
This
->
screen
);
if
(
This
->
event_target
)
release_event_target
(
This
->
event_target
);
for
(
i
=
0
;
i
<
This
->
global_prop_cnt
;
i
++
)
heap_free
(
This
->
global_props
[
i
].
name
);
...
...
@@ -1391,7 +1409,12 @@ static HRESULT WINAPI HTMLWindow3_attachEvent(IHTMLWindow3 *iface, BSTR event, I
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_w
(
event
),
pDisp
,
pfResult
);
return
attach_event
(
&
This
->
event_target
,
&
This
->
doc_obj
->
basedoc
,
event
,
pDisp
,
pfResult
);
if
(
!
This
->
doc
)
{
FIXME
(
"No document
\n
"
);
return
E_FAIL
;
}
return
attach_event
(
&
This
->
doc
->
body_event_target
,
&
This
->
doc
->
basedoc
,
event
,
pDisp
,
pfResult
);
}
static
HRESULT
WINAPI
HTMLWindow3_detachEvent
(
IHTMLWindow3
*
iface
,
BSTR
event
,
IDispatch
*
pDisp
)
...
...
dlls/mshtml/mshtml_private.h
View file @
e4a936a2
...
...
@@ -242,7 +242,6 @@ struct HTMLWindow {
IMoniker
*
mon
;
LPOLESTR
url
;
event_target_t
*
event_target
;
IHTMLEventObj
*
event
;
SCRIPTMODE
scriptmode
;
...
...
@@ -531,6 +530,7 @@ struct HTMLDocumentNode {
nsIDOMHTMLDocument
*
nsdoc
;
HTMLDOMNode
*
nodes
;
BOOL
content_ready
;
event_target_t
*
body_event_target
;
IInternetSecurityManager
*
secmgr
;
ICatInformation
*
catmgr
;
...
...
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