Commit 3d3048db authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Get rid of no longer used nsIDOMEventListener interface in NSContainer.

parent 7dd4f5e2
......@@ -140,7 +140,6 @@ struct NSContainer {
const nsIInterfaceRequestorVtbl *lpInterfaceRequestorVtbl;
const nsIWeakReferenceVtbl *lpWeakReferenceVtbl;
const nsISupportsWeakReferenceVtbl *lpSupportsWeakReferenceVtbl;
const nsIDOMEventListenerVtbl *lpDOMEventListenerVtbl;
nsEventListener keypress_listener;
nsEventListener load_listener;
......
......@@ -689,36 +689,6 @@ void set_ns_editmode(NSContainer *This)
nsIWebBrowser_SetParentURIContentListener(This->webbrowser, NSURICL(This));
}
static void handle_load_event(NSContainer *This, nsIDOMEvent *event)
{
task_t *task;
TRACE("(%p)\n", This);
if(!This->doc)
return;
if(This->editor_controller) {
nsIController_Release(This->editor_controller);
This->editor_controller = NULL;
}
if(This->doc->usermode == EDITMODE)
This->editor_controller = get_editor_controller(This);
task = mshtml_alloc(sizeof(task_t));
task->doc = This->doc;
task->task_id = TASK_PARSECOMPLETE;
task->next = NULL;
/*
* This should be done in the worker thread that parses HTML,
* but we don't have such thread (Gecko parses HTML for us).
*/
push_task(task);
}
void close_gecko(void)
{
TRACE("()\n");
......@@ -766,9 +736,6 @@ static nsresult NSAPI nsWebBrowserChrome_QueryInterface(nsIWebBrowserChrome *ifa
}else if(IsEqualGUID(&IID_nsITooltipListener, riid)) {
TRACE("(%p)->(IID_nsITooltipListener %p)\n", This, result);
*result = NSTOOLTIP(This);
}else if(IsEqualGUID(&IID_nsIDOMEventListener, riid)) {
TRACE("(%p)->(IID_nsIDOMEventListener %p)\n", This, result);
*result = NSEVENTLIST(This);
}else if(IsEqualGUID(&IID_nsIInterfaceRequestor, riid)) {
TRACE("(%p)->(IID_nsIInterfaceRequestor %p)\n", This, result);
*result = NSIFACEREQ(This);
......@@ -1350,63 +1317,6 @@ static const nsITooltipListenerVtbl nsTooltipListenerVtbl = {
nsTooltipListener_OnHideTooltip
};
#define NSEVENTLIST_THIS(iface) DEFINE_THIS(NSContainer, DOMEventListener, iface)
static nsresult NSAPI nsDOMEventListener_QueryInterface(nsIDOMEventListener *iface,
nsIIDRef riid, nsQIResult result)
{
NSContainer *This = NSEVENTLIST_THIS(iface);
return nsIWebBrowserChrome_QueryInterface(NSWBCHROME(This), riid, result);
}
static nsrefcnt NSAPI nsDOMEventListener_AddRef(nsIDOMEventListener *iface)
{
NSContainer *This = NSEVENTLIST_THIS(iface);
return nsIWebBrowserChrome_AddRef(NSWBCHROME(This));
}
static nsrefcnt NSAPI nsDOMEventListener_Release(nsIDOMEventListener *iface)
{
NSContainer *This = NSEVENTLIST_THIS(iface);
return nsIWebBrowserChrome_Release(NSWBCHROME(This));
}
static nsresult NSAPI nsDOMEventListener_HandleEvent(nsIDOMEventListener *iface, nsIDOMEvent *event)
{
NSContainer *This = NSEVENTLIST_THIS(iface);
nsAString type_str;
const PRUnichar *type;
static const PRUnichar loadW[] = {'l','o','a','d',0};
nsAString_Init(&type_str, NULL);
nsIDOMEvent_GetType(event, &type_str);
nsAString_GetData(&type_str, &type, NULL);
TRACE("(%p)->(%p) %s\n", This, event, debugstr_w(type));
if(!strcmpW(loadW, type)) {
handle_load_event(This, event);
}else if(This->doc) {
update_doc(This->doc, UPDATE_UI);
if(This->doc->usermode == EDITMODE)
handle_edit_event(This->doc, event);
}
nsAString_Finish(&type_str);
return NS_OK;
}
#undef NSEVENTLIST_THIS
static const nsIDOMEventListenerVtbl nsDOMEventListenerVtbl = {
nsDOMEventListener_QueryInterface,
nsDOMEventListener_AddRef,
nsDOMEventListener_Release,
nsDOMEventListener_HandleEvent
};
#define NSIFACEREQ_THIS(iface) DEFINE_THIS(NSContainer, InterfaceRequestor, iface)
static nsresult NSAPI nsInterfaceRequestor_QueryInterface(nsIInterfaceRequestor *iface,
......@@ -1550,7 +1460,6 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
ret->lpInterfaceRequestorVtbl = &nsInterfaceRequestorVtbl;
ret->lpWeakReferenceVtbl = &nsWeakReferenceVtbl;
ret->lpSupportsWeakReferenceVtbl = &nsSupportsWeakReferenceVtbl;
ret->lpDOMEventListenerVtbl = &nsDOMEventListenerVtbl;
ret->doc = doc;
ret->ref = 1;
......
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