Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com ---
I tried to add tests but they seem unreliable, in that sometimes it doesn't fire at all.
dlls/mshtml/htmlevent.c | 2 ++ dlls/mshtml/htmlevent.h | 1 + dlls/mshtml/xmlhttprequest.c | 9 +++++---- 3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 49392bf..cf0de22 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -175,6 +175,8 @@ static const event_info_t event_info[] = { EVENT_FIXME}, {L"paste", EVENT_TYPE_CLIPBOARD, DISPID_EVMETH_ONPASTE, EVENT_FIXME | EVENT_BUBBLES | EVENT_CANCELABLE}, + {L"progress", EVENT_TYPE_PROGRESS, DISPID_EVPROP_PROGRESS, + EVENT_BIND_TO_TARGET}, {L"readystatechange", EVENT_TYPE_EVENT, DISPID_EVMETH_ONREADYSTATECHANGE, 0}, {L"resize", EVENT_TYPE_UIEVENT, DISPID_EVMETH_ONRESIZE, diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index 58dbc43..3f399da 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -50,6 +50,7 @@ typedef enum { EVENTID_MOUSEWHEEL, EVENTID_MSTHUMBNAILCLICK, EVENTID_PASTE, + EVENTID_PROGRESS, EVENTID_READYSTATECHANGE, EVENTID_RESIZE, EVENTID_SCROLL, diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c index 54e84cf..b5973c3 100644 --- a/dlls/mshtml/xmlhttprequest.c +++ b/dlls/mshtml/xmlhttprequest.c @@ -97,6 +97,7 @@ static HRESULT return_nscstr(nsresult nsres, nsACString *nscstr, BSTR *p) static const eventid_t events[] = { EVENTID_READYSTATECHANGE, EVENTID_LOAD, + EVENTID_PROGRESS, EVENTID_ABORT, EVENTID_ERROR, EVENTID_TIMEOUT, @@ -1001,18 +1002,18 @@ static HRESULT WINAPI HTMLXMLHttpRequest_private_put_onprogress(IWineXMLHttpRequ { HTMLXMLHttpRequest *This = impl_from_IWineXMLHttpRequestPrivate(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return E_NOTIMPL; + return set_event_handler(&This->event_target, EVENTID_PROGRESS, &v); }
static HRESULT WINAPI HTMLXMLHttpRequest_private_get_onprogress(IWineXMLHttpRequestPrivate *iface, VARIANT *p) { HTMLXMLHttpRequest *This = impl_from_IWineXMLHttpRequestPrivate(iface);
- FIXME("(%p)->(%p)\n", This, p); + TRACE("(%p)->(%p)\n", This, p);
- return E_NOTIMPL; + return get_event_handler(&This->event_target, EVENTID_PROGRESS, p); }
static HRESULT WINAPI HTMLXMLHttpRequest_private_put_onloadstart(IWineXMLHttpRequestPrivate *iface, VARIANT v)