Module: wine Branch: master Commit: f91e71d7cedae53174ae218accf4b1a3f5b69ab2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f91e71d7cedae53174ae218acc...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Nov 30 18:02:44 2009 +0100
mshtml: Added onreadystatechange event support.
---
dlls/mshtml/htmlelem2.c | 2 +- dlls/mshtml/persist.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlelem2.c b/dlls/mshtml/htmlelem2.c index a42b73a..254ebf8 100644 --- a/dlls/mshtml/htmlelem2.c +++ b/dlls/mshtml/htmlelem2.c @@ -689,7 +689,7 @@ static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface, { HTMLElement *This = HTMLELEM2_THIS(iface);
- FIXME("(%p)->(%s): semi-stub\n", This, debugstr_variant(&v)); + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_node_event(&This->node, EVENTID_READYSTATECHANGE, &v); } diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index f3d23bd..2ea0e5d 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -36,6 +36,7 @@ #include "wine/unicode.h"
#include "mshtml_private.h" +#include "htmlevent.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
@@ -274,8 +275,11 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc) void set_ready_state(HTMLWindow *window, READYSTATE readystate) { window->readystate = readystate; - if(window->doc_obj->basedoc.window == window) + if(window->doc_obj && window->doc_obj->basedoc.window == window) call_property_onchanged(&window->doc_obj->basedoc.cp_propnotif, DISPID_READYSTATE); + if(window->frame_element) + fire_event(window->frame_element->element.node.doc, EVENTID_READYSTATECHANGE, + window->frame_element->element.node.nsnode, NULL); }
static HRESULT get_doc_string(HTMLDocumentNode *This, char **str)