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

Commit

Permalink
Merge pull request #203 from brave/cr59_spellchecker
Browse files Browse the repository at this point in the history
Call WebView:SetTextCheckClient in initialization
  • Loading branch information
bridiver authored Jun 2, 2017
2 parents 022c00f + 83a66e5 commit df5730b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit df5730b

Please sign in to comment.