mshtml: Skip mutation notifications on documents that are being replaced.
This commit is contained in:
parent
43302910e4
commit
3c421a813a
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue