Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Call WebView:SetTextCheckClient in initialization #203

Merged
merged 1 commit into from
Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions atom/renderer/api/atom_api_spell_check_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ namespace atom {
namespace api {

class SpellCheckClient : public blink::WebSpellCheckClient,
blink::WebTextCheckClient {
public blink::WebTextCheckClient {
public:
SpellCheckClient(const std::string& language,
bool auto_spell_correct_turned_on,
v8::Isolate* isolate,
v8::Local<v8::Object> provider);
virtual ~SpellCheckClient();
~SpellCheckClient() override;

private:
// blink::WebSpellCheckClient:
// blink::WebTextCheckClient:
void CheckSpelling(
const blink::WebString& text,
int& offset,
Expand All @@ -41,6 +41,7 @@ class SpellCheckClient : public blink::WebSpellCheckClient,
void CancelAllPendingRequests() override {};


// blink::WebSpellCheckClient:
void ShowSpellingUI(bool show) override;
bool IsShowingSpellingUI() override;
void UpdateSpellingUIWithMisspelledWord(
Expand Down
1 change: 1 addition & 0 deletions brave/renderer/extensions/web_frame_bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ void WebFrameBindings::SetSpellCheckProvider(
new atom::api::SpellCheckClient(
lang, auto_spell_correct_turned_on, GetIsolate(), provider));
context()->web_frame()->View()->SetSpellCheckClient(spell_check_client.get());
context()->web_frame()->SetTextCheckClient(spell_check_client.get());
spell_check_client_.swap(spell_check_client);
}

Expand Down