Commit c29d776d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Rename fire_event_obj and dispatch_event.

parent a252059a
......@@ -2679,7 +2679,7 @@ static HRESULT WINAPI HTMLDocument4_fireEvent(IHTMLDocument4 *iface, BSTR bstrEv
TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(bstrEventName), pvarEventObject, pfCanceled);
return dispatch_event(&This->doc_node->node, bstrEventName, pvarEventObject, pfCanceled);
return fire_event(&This->doc_node->node, bstrEventName, pvarEventObject, pfCanceled);
}
static HRESULT WINAPI HTMLDocument4_createRenderStyle(IHTMLDocument4 *iface, BSTR v,
......
......@@ -3526,7 +3526,7 @@ static HRESULT WINAPI HTMLElement3_fireEvent(IHTMLElement3 *iface, BSTR bstrEven
TRACE("(%p)->(%s %s %p)\n", This, debugstr_w(bstrEventName), debugstr_variant(pvarEventObject),
pfCancelled);
return dispatch_event(&This->node, bstrEventName, pvarEventObject, pfCancelled);
return fire_event(&This->node, bstrEventName, pvarEventObject, pfCancelled);
}
static HRESULT WINAPI HTMLElement3_put_onresizestart(IHTMLElement3 *iface, VARIANT v)
......@@ -5196,7 +5196,7 @@ HRESULT HTMLElement_handle_event(HTMLDOMNode *iface, DWORD eid, nsIDOMEvent *eve
hres = create_document_event(This->node.doc, EVENTID_HELP, &help_event);
if(SUCCEEDED(hres)) {
fire_event_obj(&This->node.event_target, help_event);
dispatch_event(&This->node.event_target, help_event);
IDOMEvent_Release(&help_event->IDOMEvent_iface);
}
*prevent_default = TRUE;
......
......@@ -1370,7 +1370,7 @@ static void call_event_handlers(EventTarget *event_target, DOMEvent *event)
}
}
void fire_event_obj(EventTarget *event_target, DOMEvent *event)
void dispatch_event(EventTarget *event_target, DOMEvent *event)
{
EventTarget *target_chain_buf[8], **target_chain = target_chain_buf;
unsigned chain_cnt, chain_buf_size, i;
......@@ -1472,7 +1472,7 @@ void fire_event_obj(EventTarget *event_target, DOMEvent *event)
heap_free(target_chain);
}
HRESULT dispatch_event(HTMLDOMNode *node, const WCHAR *event_name, VARIANT *event_var, VARIANT_BOOL *cancelled)
HRESULT fire_event(HTMLDOMNode *node, const WCHAR *event_name, VARIANT *event_var, VARIANT_BOOL *cancelled)
{
HTMLEventObj *event_obj = NULL;
eventid_t eid;
......@@ -1520,7 +1520,7 @@ HRESULT dispatch_event(HTMLDOMNode *node, const WCHAR *event_name, VARIANT *even
if(SUCCEEDED(hres)) {
event_obj->event->event_obj = &event_obj->IHTMLEventObj_iface;
fire_event_obj(&node->event_target, event_obj->event);
dispatch_event(&node->event_target, event_obj->event);
event_obj->event->event_obj = NULL;
}
......
......@@ -77,7 +77,7 @@ HRESULT set_event_handler(EventTarget*,eventid_t,VARIANT*) DECLSPEC_HIDDEN;
HRESULT get_event_handler(EventTarget*,eventid_t,VARIANT*) DECLSPEC_HIDDEN;
HRESULT attach_event(EventTarget*,BSTR,IDispatch*,VARIANT_BOOL*) DECLSPEC_HIDDEN;
HRESULT detach_event(EventTarget*,BSTR,IDispatch*) DECLSPEC_HIDDEN;
HRESULT dispatch_event(HTMLDOMNode*,const WCHAR*,VARIANT*,VARIANT_BOOL*) DECLSPEC_HIDDEN;
HRESULT fire_event(HTMLDOMNode*,const WCHAR*,VARIANT*,VARIANT_BOOL*) DECLSPEC_HIDDEN;
void update_doc_cp_events(HTMLDocumentNode*,cp_static_data_t*) DECLSPEC_HIDDEN;
HRESULT doc_init_events(HTMLDocumentNode*) DECLSPEC_HIDDEN;
void detach_events(HTMLDocumentNode *doc) DECLSPEC_HIDDEN;
......@@ -85,7 +85,7 @@ HRESULT create_event_obj(IHTMLEventObj**) DECLSPEC_HIDDEN;
void bind_target_event(HTMLDocumentNode*,EventTarget*,const WCHAR*,IDispatch*) DECLSPEC_HIDDEN;
HRESULT ensure_doc_nsevent_handler(HTMLDocumentNode*,eventid_t) DECLSPEC_HIDDEN;
void fire_event_obj(EventTarget*,DOMEvent*) DECLSPEC_HIDDEN;
void dispatch_event(EventTarget*,DOMEvent*) DECLSPEC_HIDDEN;
HRESULT create_document_event(HTMLDocumentNode*,eventid_t,DOMEvent**) DECLSPEC_HIDDEN;
HRESULT create_document_event_str(HTMLDocumentNode*,const WCHAR*,IDOMEvent**) DECLSPEC_HIDDEN;
......
......@@ -2175,7 +2175,7 @@ static HRESULT WINAPI HTMLWindow6_postMessage(IHTMLWindow6 *iface, BSTR msg, VAR
if(FAILED(hres))
return hres;
fire_event_obj(&This->inner_window->event_target, event);
dispatch_event(&This->inner_window->event_target, event);
IDOMEvent_Release(&event->IDOMEvent_iface);
return S_OK;
}
......
......@@ -1502,7 +1502,7 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
hres = create_event_from_nsevent(aEvent, &event);
if(SUCCEEDED(hres)) {
fire_event_obj(&node->event_target, event);
dispatch_event(&node->event_target, event);
IDOMEvent_Release(&event->IDOMEvent_iface);
}
......
......@@ -274,13 +274,13 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
hres = create_document_event(doc, EVENTID_LOAD, &load_event);
if(SUCCEEDED(hres)) {
fire_event_obj(&doc->node.event_target, load_event);
dispatch_event(&doc->node.event_target, load_event);
IDOMEvent_Release(&load_event->IDOMEvent_iface);
}
hres = create_event_from_nsevent(event, &load_event);
if(SUCCEEDED(hres)) {
fire_event_obj(&doc->window->event_target, load_event);
dispatch_event(&doc->window->event_target, load_event);
IDOMEvent_Release(&load_event->IDOMEvent_iface);
}
}else {
......@@ -340,12 +340,12 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *
hres = create_document_event(doc, event->event_id == EVENTID_FOCUS ? EVENTID_FOCUSIN : EVENTID_FOCUSOUT, &focus_event);
if(SUCCEEDED(hres)) {
fire_event_obj(&node->event_target, focus_event);
dispatch_event(&node->event_target, focus_event);
IDOMEvent_Release(&focus_event->IDOMEvent_iface);
}
}
fire_event_obj(&node->event_target, event);
dispatch_event(&node->event_target, event);
IDOMEvent_Release(&event->IDOMEvent_iface);
node_release(node);
......
......@@ -454,14 +454,14 @@ static void notif_readystate(HTMLOuterWindow *window)
hres = create_document_event(window->base.inner_window->doc, EVENTID_READYSTATECHANGE, &event);
if(SUCCEEDED(hres)) {
event->no_event_obj = TRUE;
fire_event_obj(&window->base.inner_window->doc->node.event_target, event);
dispatch_event(&window->base.inner_window->doc->node.event_target, event);
IDOMEvent_Release(&event->IDOMEvent_iface);
}
if(window->frame_element) {
hres = create_document_event(window->frame_element->element.node.doc, EVENTID_READYSTATECHANGE, &event);
if(SUCCEEDED(hres)) {
fire_event_obj(&window->frame_element->element.node.event_target, event);
dispatch_event(&window->frame_element->element.node.event_target, event);
IDOMEvent_Release(&event->IDOMEvent_iface);
}
}
......
......@@ -733,7 +733,7 @@ static void dispatch_script_readystatechange_event(HTMLScriptElement *script)
if(FAILED(hres))
return;
fire_event_obj(&script->element.node.event_target, event);
dispatch_event(&script->element.node.event_target, event);
IDOMEvent_Release(&event->IDOMEvent_iface);
}
......
......@@ -195,7 +195,7 @@ static nsresult NSAPI XMLHttpReqEventListener_HandleEvent(nsIDOMEventListener *i
hres = create_event_from_nsevent(nsevent, &event);
if(SUCCEEDED(hres) ){
event->no_event_obj = TRUE;
fire_event_obj(&This->xhr->event_target, event);
dispatch_event(&This->xhr->event_target, event);
IDOMEvent_Release(&event->IDOMEvent_iface);
}
return NS_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment