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
2610ef9c
Commit
2610ef9c
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: Always alloc event_vector for documents.
parent
be6dd66e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-2
htmlevent.c
dlls/mshtml/htmlevent.c
+10
-6
htmlevent.h
dlls/mshtml/htmlevent.h
+1
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
2610ef9c
...
...
@@ -2164,8 +2164,6 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLWindow *wi
&
doc
->
node
.
dispex
.
IDispatchEx_iface
);
HTMLDocumentNode_SecMgr_Init
(
doc
);
init_nsevents
(
doc
);
list_init
(
&
doc
->
bindings
);
list_init
(
&
doc
->
selection_list
);
list_init
(
&
doc
->
range_list
);
...
...
@@ -2188,6 +2186,7 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
nsIDOMHTMLDocument_AddRef
(
nsdoc
);
doc
->
nsdoc
=
nsdoc
;
init_document_mutation
(
doc
);
doc_init_events
(
doc
);
HTMLDOMNode_Init
(
doc
,
&
doc
->
node
,
(
nsIDOMNode
*
)
nsdoc
);
doc
->
node
.
vtbl
=
&
HTMLDocumentNodeImplVtbl
;
...
...
dlls/mshtml/htmlevent.c
View file @
2610ef9c
...
...
@@ -1182,12 +1182,6 @@ static HRESULT ensure_nsevent_handler(HTMLDocumentNode *doc, event_target_t *eve
if
(
!
(
event_info
[
eid
].
flags
&
EVENT_DEFAULTLISTENER
))
return
S_OK
;
if
(
!
doc
->
event_vector
)
{
doc
->
event_vector
=
heap_alloc_zero
(
EVENTID_LAST
*
sizeof
(
BOOL
));
if
(
!
doc
->
event_vector
)
return
E_OUTOFMEMORY
;
}
if
(
!
doc
->
event_vector
[
eid
])
{
doc
->
event_vector
[
eid
]
=
TRUE
;
add_nsevent_listener
(
doc
,
NULL
,
event_info
[
eid
].
name
);
...
...
@@ -1375,6 +1369,16 @@ void check_event_attr(HTMLDocumentNode *doc, nsIDOMElement *nselem)
nsAString_Finish
(
&
attr_name_str
);
}
HRESULT
doc_init_events
(
HTMLDocumentNode
*
doc
)
{
doc
->
event_vector
=
heap_alloc_zero
(
EVENTID_LAST
*
sizeof
(
BOOL
));
if
(
!
doc
->
event_vector
)
return
E_OUTOFMEMORY
;
init_nsevents
(
doc
);
return
S_OK
;
}
void
release_event_target
(
event_target_t
*
event_target
)
{
int
i
,
j
;
...
...
dlls/mshtml/htmlevent.h
View file @
2610ef9c
...
...
@@ -53,6 +53,7 @@ HRESULT detach_event(event_target_t*,HTMLDocument*,BSTR,IDispatch*) DECLSPEC_HID
HRESULT
dispatch_event
(
HTMLDOMNode
*
,
const
WCHAR
*
,
VARIANT
*
,
VARIANT_BOOL
*
)
DECLSPEC_HIDDEN
;
HRESULT
call_fire_event
(
HTMLDOMNode
*
,
eventid_t
)
DECLSPEC_HIDDEN
;
void
update_cp_events
(
HTMLWindow
*
,
event_target_t
**
,
cp_static_data_t
*
,
nsIDOMNode
*
)
DECLSPEC_HIDDEN
;
HRESULT
doc_init_events
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
void
init_nsevents
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
void
release_nsevents
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
...
...
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