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

Side by Side Diff: third_party/WebKit/Source/core/html/forms/EmailInputType.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * This file is part of the WebKit project. 2 * This file is part of the WebKit project.
3 * 3 *
4 * Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com> 4 * Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com>
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
11 * 11 *
12 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details. 15 * Library General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU Library General Public License 17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to 18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA. 20 * Boston, MA 02110-1301, USA.
21 * 21 *
22 */ 22 */
23 23
24 #include "core/html/forms/EmailInputType.h" 24 #include "core/html/forms/EmailInputType.h"
25 25
26 #include <unicode/idna.h>
27 #include <unicode/unistr.h>
26 #include "bindings/core/v8/ScriptRegexp.h" 28 #include "bindings/core/v8/ScriptRegexp.h"
27 #include "core/InputTypeNames.h" 29 #include "core/InputTypeNames.h"
28 #include "core/html/HTMLInputElement.h" 30 #include "core/html/HTMLInputElement.h"
29 #include "core/html/parser/HTMLParserIdioms.h" 31 #include "core/html/parser/HTMLParserIdioms.h"
30 #include "core/page/ChromeClient.h" 32 #include "core/page/ChromeClient.h"
31 #include "platform/text/PlatformLocale.h" 33 #include "platform/text/PlatformLocale.h"
32 #include "public/platform/Platform.h" 34 #include "public/platform/Platform.h"
33 #include "wtf/text/StringBuilder.h" 35 #include "wtf/text/StringBuilder.h"
34 #include <unicode/idna.h>
35 #include <unicode/unistr.h>
36 36
37 namespace blink { 37 namespace blink {
38 38
39 using blink::WebLocalizedString; 39 using blink::WebLocalizedString;
40 40
41 // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-typ e-attribute.html#valid-e-mail-address 41 // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-typ e-attribute.html#valid-e-mail-address
42 static const char localPartCharacters[] = 42 static const char localPartCharacters[] =
43 "abcdefghijklmnopqrstuvwxyz0123456789!#$%&'*+/=?^_`{|}~.-"; 43 "abcdefghijklmnopqrstuvwxyz0123456789!#$%&'*+/=?^_`{|}~.-";
44 static const char emailPattern[] = 44 static const char emailPattern[] =
45 "[a-z0-9!#$%&'*+/=?^_`{|}~.-]+" // local part 45 "[a-z0-9!#$%&'*+/=?^_`{|}~.-]+" // local part
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 builder.reserveCapacity(value.length()); 303 builder.reserveCapacity(value.length());
304 for (size_t i = 0; i < addresses.size(); ++i) { 304 for (size_t i = 0; i < addresses.size(); ++i) {
305 if (i > 0) 305 if (i > 0)
306 builder.append(','); 306 builder.append(',');
307 builder.append(convertEmailAddressToUnicode(addresses[i])); 307 builder.append(convertEmailAddressToUnicode(addresses[i]));
308 } 308 }
309 return builder.toString(); 309 return builder.toString();
310 } 310 }
311 311
312 } // namespace blink 312 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698