Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index ce985a877372b08c8a422acf7700c6d1e30563f1..adf160d92cc03de99d7e5faee6fc5f8c0d49811c 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -2523,6 +2523,28 @@ int WebViewImpl::textInputFlags() |
else if (spellcheck == SpellcheckAttributeFalse) |
flags |= WebTextInputFlagSpellcheckOff; |
+ if (isHTMLTextFormControlElement(element)) { |
+ HTMLTextFormControlElement* formElement = static_cast<HTMLTextFormControlElement*>(element); |
+ if (formElement->supportsAutocapitalize()) { |
+ DEFINE_STATIC_LOCAL(const AtomicString, none, ("none", AtomicString::ConstructFromLiteral)); |
+ DEFINE_STATIC_LOCAL(const AtomicString, characters, ("characters", AtomicString::ConstructFromLiteral)); |
+ DEFINE_STATIC_LOCAL(const AtomicString, words, ("words", AtomicString::ConstructFromLiteral)); |
+ DEFINE_STATIC_LOCAL(const AtomicString, sentences, ("sentences", AtomicString::ConstructFromLiteral)); |
+ |
+ const AtomicString& autocapitalize = formElement->autocapitalize(); |
+ if (autocapitalize == none) |
+ flags |= WebTextInputFlagAutocapitalizeNone; |
+ else if (autocapitalize == characters) |
+ flags |= WebTextInputFlagAutocapitalizeCharacters; |
+ else if (autocapitalize == words) |
+ flags |= WebTextInputFlagAutocapitalizeWords; |
+ else if (autocapitalize == sentences) |
+ flags |= WebTextInputFlagAutocapitalizeSentences; |
+ else |
+ ASSERT_NOT_REACHED(); |
+ } |
+ } |
+ |
return flags; |
} |