Commit 0abe9939 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Move SetDesignMode call to create_document_node.

parent 3f79f129
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment