Module: wine Branch: master Commit: 0abe9939b8357db3612cd0eac2c526ac1e2f8223 URL: https://source.winehq.org/git/wine.git/?a=commit;h=0abe9939b8357db3612cd0eac...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Mar 12 16:12:05 2019 +0100
mshtml: Move SetDesignMode call to create_document_node.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/htmldoc.c | 13 +++++++++++++ dlls/mshtml/htmlwindow.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 22af107..01598e8 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -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; } diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index cd7d59c..8329a3e 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -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;