Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index ed67d3c13a51a80ff78c4f222a4cc9401e4a4ea7..dc3ae60df01c985e64107355f3fe1a13ef333228 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -2298,21 +2298,24 @@ int WebViewImpl::textInputFlags() |
if (!element) |
return WebTextInputFlagNone; |
+ DEFINE_STATIC_LOCAL(AtomicString, autocompleteString, ("autocomplete", AtomicString::ConstructFromLiteral)); |
+ DEFINE_STATIC_LOCAL(AtomicString, autocorrectString, ("autocorrect", AtomicString::ConstructFromLiteral)); |
+ DEFINE_STATIC_LOCAL(AtomicString, spellcheckString, ("spellcheck", AtomicString::ConstructFromLiteral)); |
int flags = 0; |
- const AtomicString& autocomplete = element->getAttribute("autocomplete"); |
+ const AtomicString& autocomplete = element->getAttribute(autocompleteString); |
if (autocomplete == "on") |
flags |= WebTextInputFlagAutocompleteOn; |
else if (autocomplete == "off") |
flags |= WebTextInputFlagAutocompleteOff; |
- const AtomicString& autocorrect = element->getAttribute("autocorrect"); |
+ const AtomicString& autocorrect = element->getAttribute(autocorrectString); |
if (autocorrect == "on") |
flags |= WebTextInputFlagAutocorrectOn; |
else if (autocorrect == "off") |
flags |= WebTextInputFlagAutocorrectOff; |
- const AtomicString& spellcheck = element->getAttribute("spellcheck"); |
+ const AtomicString& spellcheck = element->getAttribute(spellcheckString); |
if (spellcheck == "on") |
flags |= WebTextInputFlagSpellcheckOn; |
else if (spellcheck == "off") |