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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
9 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. 9 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved.
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 130
131 InputType* InputType::CreateText(HTMLInputElement& element) { 131 InputType* InputType::CreateText(HTMLInputElement& element) {
132 return TextInputType::Create(element); 132 return TextInputType::Create(element);
133 } 133 }
134 134
135 const AtomicString& InputType::NormalizeTypeName( 135 const AtomicString& InputType::NormalizeTypeName(
136 const AtomicString& type_name) { 136 const AtomicString& type_name) {
137 if (type_name.IsEmpty()) 137 if (type_name.IsEmpty())
138 return InputTypeNames::text; 138 return InputTypeNames::text;
139 InputTypeFactoryMap::const_iterator it = FactoryMap()->find(type_name); 139 InputTypeFactoryMap::const_iterator it =
140 FactoryMap()->find(AtomicString(type_name.Ascii().data()));
tkent 2017/06/05 00:27:50 As the try bots showed failures, this change is wr
140 return it == FactoryMap()->end() ? InputTypeNames::text : it->key; 141 return it == FactoryMap()->end() ? InputTypeNames::text : it->key;
141 } 142 }
142 143
143 InputType::~InputType() {} 144 InputType::~InputType() {}
144 145
145 DEFINE_TRACE(InputType) { 146 DEFINE_TRACE(InputType) {
146 visitor->Trace(element_); 147 visitor->Trace(element_);
147 } 148 }
148 149
149 bool InputType::IsTextField() const { 150 bool InputType::IsTextField() const {
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 916
916 void InputType::AddWarningToConsole(const char* message_format, 917 void InputType::AddWarningToConsole(const char* message_format,
917 const String& value) const { 918 const String& value) const {
918 GetElement().GetDocument().AddConsoleMessage(ConsoleMessage::Create( 919 GetElement().GetDocument().AddConsoleMessage(ConsoleMessage::Create(
919 kRenderingMessageSource, kWarningMessageLevel, 920 kRenderingMessageSource, kWarningMessageLevel,
920 String::Format(message_format, 921 String::Format(message_format,
921 JSONValue::QuoteString(value).Utf8().data()))); 922 JSONValue::QuoteString(value).Utf8().data())));
922 } 923 }
923 924
924 } // namespace blink 925 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698