mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
mshtml: Use inner window's outer_window when checking if it's interactive for edit mode.
We can't rely on dom_interactive_time either because setup_edit_mode can reload the page (and sets it uninitialized). Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
db12c470c8
commit
ff617c838f
1 changed files with 3 additions and 3 deletions
|
@ -146,7 +146,7 @@ static DWORD query_ns_edit_status(HTMLDocumentNode *doc, const char *nscmd)
|
|||
nsICommandParams *nsparam;
|
||||
cpp_bool b = FALSE;
|
||||
|
||||
if(doc->browser->usermode != EDITMODE || doc->outer_window->readystate < READYSTATE_INTERACTIVE)
|
||||
if(doc->browser->usermode != EDITMODE || !doc->window->base.outer_window || doc->window->base.outer_window->readystate < READYSTATE_INTERACTIVE)
|
||||
return OLECMDF_SUPPORTED;
|
||||
|
||||
if(nscmd) {
|
||||
|
@ -180,7 +180,7 @@ static DWORD query_align_status(HTMLDocumentNode *doc, const WCHAR *align)
|
|||
cpp_bool b;
|
||||
nsresult nsres;
|
||||
|
||||
if(doc->browser->usermode != EDITMODE || doc->outer_window->readystate < READYSTATE_INTERACTIVE)
|
||||
if(doc->browser->usermode != EDITMODE || !doc->window->base.outer_window || doc->window->base.outer_window->readystate < READYSTATE_INTERACTIVE)
|
||||
return OLECMDF_SUPPORTED;
|
||||
|
||||
if(!doc->html_document) {
|
||||
|
@ -669,7 +669,7 @@ static HRESULT query_justify(HTMLDocumentNode *doc, OLECMD *cmd)
|
|||
case IDM_JUSTIFYLEFT:
|
||||
TRACE("(%p) IDM_JUSTIFYLEFT\n", doc);
|
||||
/* FIXME: We should set OLECMDF_LATCHED only if it's set explicitly. */
|
||||
if(doc->browser->usermode != EDITMODE || doc->outer_window->readystate < READYSTATE_INTERACTIVE)
|
||||
if(doc->browser->usermode != EDITMODE || !doc->window->base.outer_window || doc->window->base.outer_window->readystate < READYSTATE_INTERACTIVE)
|
||||
cmd->cmdf = OLECMDF_SUPPORTED;
|
||||
else
|
||||
cmd->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
|
||||
|
|
Loading…
Reference in a new issue