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

Unified Diff: third_party/WebKit/Source/core/html/forms/InputType.cpp

Issue 2918033003: Input type check comparision should be an ASCII case-insensitive match. (Closed)
Patch Set: updated patch#3 Created 3 years, 6 months 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/input-type-change3-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/forms/InputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/InputType.cpp b/third_party/WebKit/Source/core/html/forms/InputType.cpp
index 5f1912e55467fc60351dfed2438986e64a059d01..546e5f6e5fb78e0688da81a44220bbc86e47778c 100644
--- a/third_party/WebKit/Source/core/html/forms/InputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/InputType.cpp
@@ -82,8 +82,7 @@ using blink::WebLocalizedString;
using namespace HTMLNames;
using InputTypeFactoryFunction = InputType* (*)(HTMLInputElement&);
-using InputTypeFactoryMap =
- HashMap<AtomicString, InputTypeFactoryFunction, CaseFoldingHash>;
+using InputTypeFactoryMap = HashMap<AtomicString, InputTypeFactoryFunction>;
static std::unique_ptr<InputTypeFactoryMap> CreateInputTypeFactoryMap() {
std::unique_ptr<InputTypeFactoryMap> map =
@@ -136,7 +135,8 @@ const AtomicString& InputType::NormalizeTypeName(
const AtomicString& type_name) {
if (type_name.IsEmpty())
return InputTypeNames::text;
- InputTypeFactoryMap::const_iterator it = FactoryMap()->find(type_name);
+ InputTypeFactoryMap::const_iterator it =
+ FactoryMap()->find(type_name.LowerASCII());
return it == FactoryMap()->end() ? InputTypeNames::text : it->key;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/input-type-change3-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698