Module: wine Branch: master Commit: 3c421a813a03788bf4b0c6240aa86eb54e01d39d URL: http://source.winehq.org/git/wine.git/?a=commit;h=3c421a813a03788bf4b0c6240a...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Aug 18 13:39:04 2010 +0200
mshtml: Skip mutation notifications on documents that are being replaced.
---
dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/mutation.c | 3 +++ dlls/mshtml/navigate.c | 5 +++++ dlls/mshtml/nsio.c | 6 +++++- 4 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index e1193e3..e4e074a 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -586,6 +586,7 @@ struct HTMLDocumentNode { nsDocumentEventListener *nsevent_listener; BOOL *event_vector;
+ BOOL skip_mutation_notif; mutation_queue_t *mutation_queue; mutation_queue_t *mutation_queue_tail;
diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index 73a510f..8cf43fb 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -558,6 +558,9 @@ static void NSAPI nsDocumentObserver_EndLoad(nsIDocumentObserver *iface, nsIDocu
TRACE("\n");
+ if(This->skip_mutation_notif) + return; + This->content_ready = TRUE; push_mutation_queue(This, MUTATION_ENDLOAD, NULL); } diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 086154f..60e67d0 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -1105,6 +1105,11 @@ static void nsChannelBSC_destroy(BSCallback *bsc)
static HRESULT nsChannelBSC_start_binding(BSCallback *bsc) { + nsChannelBSC *This = NSCHANNELBSC_THIS(bsc); + + if(This->window) + This->window->doc->skip_mutation_notif = FALSE; + return S_OK; }
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 758bac0..308f0e4 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -159,6 +159,7 @@ HRESULT load_nsuri(HTMLWindow *window, nsWineURI *uri, nsChannelBSC *channelbsc, { nsIWebNavigation *web_navigation; nsIDocShell *doc_shell; + HTMLDocumentNode *doc; nsresult nsres;
nsres = get_nsinterface((nsISupports*)window->nswindow, &IID_nsIWebNavigation, (void**)&web_navigation); @@ -174,9 +175,12 @@ HRESULT load_nsuri(HTMLWindow *window, nsWineURI *uri, nsChannelBSC *channelbsc, return E_FAIL; }
- uri->channel_bsc = channelbsc; + doc = window->doc; + doc->skip_mutation_notif = TRUE; nsres = nsIDocShell_LoadURI(doc_shell, NSURI(uri), NULL, flags, FALSE); + if(doc == window->doc) + doc->skip_mutation_notif = FALSE; uri->channel_bsc = NULL; nsIDocShell_Release(doc_shell); if(NS_FAILED(nsres)) {