Commit 380ac660 authored by Shu Chen's avatar Shu Chen Committed by Commit Bot

Makes sure the inputMethodPrivate.onFocus() event can carry the auto capitalize property.

Bug: 890561
Change-Id: Ie766224794a0b34a8f6f9d94894e9dfbe6db5f28
Reviewed-on: https://chromium-review.googlesource.com/1253262
Commit-Queue: Shu Chen <shuchen@chromium.org>
Reviewed-by: default avatarLan Wei <azurewei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595311}
parent 9d4b987f
......@@ -210,6 +210,8 @@ class ImeObserverChromeOS : public ui::ImeObserver {
ConvertInputContextType(context));
input_context.auto_correct = ConvertInputContextAutoCorrect(context);
input_context.auto_complete = ConvertInputContextAutoComplete(context);
input_context.auto_capitalize = (input_method_private::AutoCapitalizeType)
ConvertInputContextAutoCapitalize(context);
input_context.spell_check = ConvertInputContextSpellCheck(context);
input_context.should_do_learning = context.should_do_learning;
input_context.focus_reason = input_method_private::ParseFocusReason(
......
......@@ -45,6 +45,12 @@
"description": "Type of value this text field edits, (Text, Number, URL, etc)",
"enum": ["text", "search", "tel", "url", "email", "number", "password"]
},
{
"id": "AutoCapitalizeType",
"type": "string",
"description": "The auto-capitalize type of the text field.",
"enum": ["characters", "words", "sentences"]
},
{
"id": "InputContext",
"type": "object",
......@@ -54,6 +60,7 @@
"type": {"$ref": "InputContextType", "description": "Type of value this text field edits, (Text, Number, URL, etc)"},
"autoCorrect": {"type": "boolean", "description": "Whether the text field wants auto-correct."},
"autoComplete": {"type": "boolean", "description": "Whether the text field wants auto-complete."},
"autoCapitalize": {"$ref": "AutoCapitalizeType", "description": "The auto-capitalize type of the text field."},
"spellCheck": {"type": "boolean", "description": "Whether the text field wants spell-check."},
"shouldDoLearning": {"type": "boolean", "description": "Whether text entered into the text field should be used to improve typing suggestions for the user."},
"focusReason": {"$ref": "FocusReason", "description": "How the text field was focused"}
......
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