Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(542)

Unified Diff: webkit/glue/editor_client_impl.h

Issue 13731: [chromium-reviews] Add "Enable spell check for this field" menu option in sub context menu for c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/glue/editor_client_impl.h
===================================================================
--- webkit/glue/editor_client_impl.h (revision 6726)
+++ webkit/glue/editor_client_impl.h (working copy)
@@ -135,9 +135,27 @@
EditCommandStack redo_stack_;
private:
+ // Returns whether or not the focused control needs spell-checking.
+ // Currently, this function just retrieves the focused node and determines
+ // whether or not it is a <textarea> element or an element whose
+ // contenteditable attribute is true.
+ // TODO(hbono): Bug 740540: This code just implements the default behavior
+ // proposed in this issue. We should also retrieve "spellcheck" attributes
+ // for text fields and create a flag to over-write the default behavior.
+ bool ShouldSpellcheckByDefault();
+
// Whether the last entered key was a backspace.
bool backspace_pressed_;
+ // This flag is set to false if spell check for this editor is manually
+ // turned off. The default setting is SPELLCHECK_AUTOMATIC.
+ enum {
+ SPELLCHECK_AUTOMATIC,
+ SPELLCHECK_FORCED_ON,
+ SPELLCHECK_FORCED_OFF
+ };
+ int spell_check_this_field_status_;
+
// The method factory used to post autofill related tasks.
ScopedRunnableMethodFactory<EditorClientImpl> autofill_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698