Commit 8d3aa679 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLWindow2::clearTimeout implementation.

parent 74f29f10
......@@ -197,8 +197,10 @@ static HRESULT WINAPI HTMLWindow2_setTimeout(IHTMLWindow2 *iface, BSTR expressio
static HRESULT WINAPI HTMLWindow2_clearTimeout(IHTMLWindow2 *iface, long timerID)
{
HTMLWindow *This = HTMLWINDOW2_THIS(iface);
FIXME("(%p)->(%ld)\n", This, timerID);
return E_NOTIMPL;
TRACE("(%p)->(%ld)\n", This, timerID);
return clear_task_timer(This->doc, FALSE, timerID);
}
static HRESULT WINAPI HTMLWindow2_alert(IHTMLWindow2 *iface, BSTR message)
......
......@@ -624,6 +624,7 @@ HWND get_thread_hwnd(void);
void push_task(task_t*);
void remove_doc_tasks(const HTMLDocument*);
DWORD set_task_timer(HTMLDocument*,DWORD,BOOL,IDispatch*);
HRESULT clear_task_timer(HTMLDocument*,BOOL,DWORD);
HRESULT get_typeinfo(tid_t,ITypeInfo**);
void release_typelib(void);
......
......@@ -169,6 +169,25 @@ DWORD set_task_timer(HTMLDocument *doc, DWORD msec, BOOL interval, IDispatch *di
return timer->id;
}
HRESULT clear_task_timer(HTMLDocument *doc, BOOL interval, DWORD id)
{
thread_data_t *thread_data = get_thread_data(FALSE);
task_timer_t *iter;
if(!thread_data)
return S_OK;
LIST_FOR_EACH_ENTRY(iter, &thread_data->timer_list, task_timer_t, entry) {
if(iter->id == id && iter->doc == doc && (iter->interval == 0) == !interval) {
release_task_timer(thread_data->thread_hwnd, iter);
return S_OK;
}
}
WARN("timet not found\n");
return S_OK;
}
static void set_downloading(HTMLDocument *doc)
{
IOleCommandTarget *olecmd;
......
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