Commit 140d1e69 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Require a WebContents for checkSpelling

Bug: 763885
Change-Id: Id02e0e5223d305f4d61f9054e28e309281154809
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079717Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745639}
parent dc1eb4f9
......@@ -196,13 +196,13 @@ using content::RenderViewHost;
- (void)checkSpelling:(id)sender {
content::WebContents* webContents = content::WebContents::FromRenderViewHost(
RenderViewHost::From(_renderWidgetHost));
DCHECK(webContents && webContents->GetFocusedFrame());
mojo::Remote<spellcheck::mojom::SpellCheckPanel>
focused_spell_check_panel_client;
webContents->GetFocusedFrame()->GetRemoteInterfaces()->GetInterface(
focused_spell_check_panel_client.BindNewPipeAndPassReceiver());
focused_spell_check_panel_client->AdvanceToNextMisspelling();
if (webContents && webContents->GetFocusedFrame()) {
mojo::Remote<spellcheck::mojom::SpellCheckPanel>
focused_spell_check_panel_client;
webContents->GetFocusedFrame()->GetRemoteInterfaces()->GetInterface(
focused_spell_check_panel_client.BindNewPipeAndPassReceiver());
focused_spell_check_panel_client->AdvanceToNextMisspelling();
}
}
// This message is sent by the spelling panel whenever a word is ignored.
......
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