mshtml: Move SetDesignMode call to create_document_node.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-03-12 16:12:05 +01:00 committed by Alexandre Julliard
parent 3f79f129ff
commit 0abe9939b8
2 changed files with 13 additions and 13 deletions

View File

@ -5202,6 +5202,19 @@ HRESULT create_document_node(nsIDOMHTMLDocument *nsdoc, GeckoBrowser *browser, H
list_add_head(&browser->document_nodes, &doc->browser_entry);
doc->browser = browser;
if(browser->usermode == EDITMODE) {
nsAString mode_str;
nsresult nsres;
static const PRUnichar onW[] = {'o','n',0};
nsAString_InitDepend(&mode_str, onW);
nsres = nsIDOMHTMLDocument_SetDesignMode(doc->nsdoc, &mode_str);
nsAString_Finish(&mode_str);
if(NS_FAILED(nsres))
ERR("SetDesignMode failed: %08x\n", nsres);
}
*ret = doc;
return S_OK;
}

View File

@ -3641,19 +3641,6 @@ HRESULT update_window_doc(HTMLInnerWindow *window)
if(FAILED(hres))
return hres;
if(outer_window->browser->usermode == EDITMODE) {
nsAString mode_str;
nsresult nsres;
static const PRUnichar onW[] = {'o','n',0};
nsAString_InitDepend(&mode_str, onW);
nsres = nsIDOMHTMLDocument_SetDesignMode(window->doc->nsdoc, &mode_str);
nsAString_Finish(&mode_str);
if(NS_FAILED(nsres))
ERR("SetDesignMode failed: %08x\n", nsres);
}
if(window != outer_window->pending_window) {
ERR("not current pending window\n");
return S_OK;