Jacek Caban : mshtml: Added IHTMLWindow2::clearTimeout implementation.

Alexandre Julliard julliard at winehq.org
Mon Jun 30 08:26:41 CDT 2008


Module: wine
Branch: master
Commit: 8d3aa6799c16d568b7b660bd1b95fc358bec56b5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8d3aa6799c16d568b7b660bd1b95fc358bec56b5

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Jun 27 14:14:40 2008 -0500

mshtml: Added IHTMLWindow2::clearTimeout implementation.

---

 dlls/mshtml/htmlwindow.c     |    6 ++++--
 dlls/mshtml/mshtml_private.h |    1 +
 dlls/mshtml/task.c           |   19 +++++++++++++++++++
 3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 839858b..766dafa 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -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)
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index e6fd13d..f815b26 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -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);
diff --git a/dlls/mshtml/task.c b/dlls/mshtml/task.c
index 329c6ac..d863fba 100644
--- a/dlls/mshtml/task.c
+++ b/dlls/mshtml/task.c
@@ -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;




More information about the wine-cvs mailing list