Jacek Caban : mshtml: Added IHTMLImgElement::onerror implementation.

Alexandre Julliard julliard at winehq.org
Thu Apr 5 12:31:47 CDT 2012


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Apr  5 13:58:03 2012 +0200

mshtml: Added IHTMLImgElement::onerror implementation.

---

 dlls/mshtml/htmlevent.c |    4 ++--
 dlls/mshtml/htmlimg.c   |   12 ++++++++----
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 0950c5e..7454549 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -164,7 +164,7 @@ static const event_info_t event_info[] = {
     {dragstartW,         ondragstartW,         EVENTT_MOUSE,  DISPID_EVMETH_ONDRAGSTART,
         EVENT_CANCELABLE},
     {errorW,             onerrorW,             EVENTT_NONE,   DISPID_EVMETH_ONERROR,
-        0},
+        EVENT_NODEHANDLER},
     {focusW,             onfocusW,             EVENTT_HTML,   DISPID_EVMETH_ONFOCUS,
         EVENT_DEFAULTLISTENER},
     {keydownW,           onkeydownW,           EVENTT_KEY,    DISPID_EVMETH_ONKEYDOWN,
@@ -195,7 +195,7 @@ static const event_info_t event_info[] = {
         EVENT_DEFAULTLISTENER|EVENT_BUBBLE|EVENT_CANCELABLE}
 };
 
-static const eventid_t node_handled_list[] = { EVENTID_LOAD };
+static const eventid_t node_handled_list[] = { EVENTID_ERROR, EVENTID_LOAD };
 
 eventid_t str_to_eid(LPCWSTR str)
 {
diff --git a/dlls/mshtml/htmlimg.c b/dlls/mshtml/htmlimg.c
index a83f73d..79a3044 100644
--- a/dlls/mshtml/htmlimg.c
+++ b/dlls/mshtml/htmlimg.c
@@ -420,15 +420,19 @@ static HRESULT WINAPI HTMLImgElement_get_onload(IHTMLImgElement *iface, VARIANT
 static HRESULT WINAPI HTMLImgElement_put_onerror(IHTMLImgElement *iface, VARIANT v)
 {
     HTMLImgElement *This = impl_from_IHTMLImgElement(iface);
-    FIXME("(%p)->()\n", This);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->()\n", This);
+
+    return set_node_event(&This->element.node, EVENTID_ERROR, &v);
 }
 
 static HRESULT WINAPI HTMLImgElement_get_onerror(IHTMLImgElement *iface, VARIANT *p)
 {
     HTMLImgElement *This = impl_from_IHTMLImgElement(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    return get_node_event(&This->element.node, EVENTID_ERROR, p);
 }
 
 static HRESULT WINAPI HTMLImgElement_put_onabort(IHTMLImgElement *iface, VARIANT v)




More information about the wine-cvs mailing list