1 /* 2 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public License 16 * along with this library; see the file COPYING.LIB. If not, write to 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 * 20 */ 21 22 #include "config.h" 23 #include "core/html/InputTypeNames.h" 24 25 namespace WebCore { 26 27 namespace InputTypeNames { 28 29 // The type names must be lowercased because they will be the return values of 30 // input.type and input.type must be lowercase according to DOM Level 2. 31 32 const AtomicString& button() 33 { 34 DEFINE_STATIC_LOCAL(AtomicString, name, ("button", AtomicString::ConstructFromLiteral)); 35 return name; 36 } 37 38 const AtomicString& checkbox() 39 { 40 DEFINE_STATIC_LOCAL(AtomicString, name, ("checkbox", AtomicString::ConstructFromLiteral)); 41 return name; 42 } 43 44 const AtomicString& color() 45 { 46 DEFINE_STATIC_LOCAL(AtomicString, name, ("color", AtomicString::ConstructFromLiteral)); 47 return name; 48 } 49 50 const AtomicString& date() 51 { 52 DEFINE_STATIC_LOCAL(AtomicString, name, ("date", AtomicString::ConstructFromLiteral)); 53 return name; 54 } 55 56 const AtomicString& datetime() 57 { 58 DEFINE_STATIC_LOCAL(AtomicString, name, ("datetime", AtomicString::ConstructFromLiteral)); 59 return name; 60 } 61 62 const AtomicString& datetimelocal() 63 { 64 DEFINE_STATIC_LOCAL(AtomicString, name, ("datetime-local", AtomicString::ConstructFromLiteral)); 65 return name; 66 } 67 68 const AtomicString& email() 69 { 70 DEFINE_STATIC_LOCAL(AtomicString, name, ("email", AtomicString::ConstructFromLiteral)); 71 return name; 72 } 73 74 const AtomicString& file() 75 { 76 DEFINE_STATIC_LOCAL(AtomicString, name, ("file", AtomicString::ConstructFromLiteral)); 77 return name; 78 } 79 80 const AtomicString& hidden() 81 { 82 DEFINE_STATIC_LOCAL(AtomicString, name, ("hidden", AtomicString::ConstructFromLiteral)); 83 return name; 84 } 85 86 const AtomicString& image() 87 { 88 DEFINE_STATIC_LOCAL(AtomicString, name, ("image", AtomicString::ConstructFromLiteral)); 89 return name; 90 } 91 92 const AtomicString& month() 93 { 94 DEFINE_STATIC_LOCAL(AtomicString, name, ("month", AtomicString::ConstructFromLiteral)); 95 return name; 96 } 97 98 const AtomicString& number() 99 { 100 DEFINE_STATIC_LOCAL(AtomicString, name, ("number", AtomicString::ConstructFromLiteral)); 101 return name; 102 } 103 104 const AtomicString& password() 105 { 106 DEFINE_STATIC_LOCAL(AtomicString, name, ("password", AtomicString::ConstructFromLiteral)); 107 return name; 108 } 109 110 const AtomicString& radio() 111 { 112 DEFINE_STATIC_LOCAL(AtomicString, name, ("radio", AtomicString::ConstructFromLiteral)); 113 return name; 114 } 115 116 const AtomicString& range() 117 { 118 DEFINE_STATIC_LOCAL(AtomicString, name, ("range", AtomicString::ConstructFromLiteral)); 119 return name; 120 } 121 122 const AtomicString& reset() 123 { 124 DEFINE_STATIC_LOCAL(AtomicString, name, ("reset", AtomicString::ConstructFromLiteral)); 125 return name; 126 } 127 128 const AtomicString& search() 129 { 130 DEFINE_STATIC_LOCAL(AtomicString, name, ("search", AtomicString::ConstructFromLiteral)); 131 return name; 132 } 133 134 const AtomicString& submit() 135 { 136 DEFINE_STATIC_LOCAL(AtomicString, name, ("submit", AtomicString::ConstructFromLiteral)); 137 return name; 138 } 139 140 const AtomicString& telephone() 141 { 142 DEFINE_STATIC_LOCAL(AtomicString, name, ("tel", AtomicString::ConstructFromLiteral)); 143 return name; 144 } 145 146 const AtomicString& text() 147 { 148 DEFINE_STATIC_LOCAL(AtomicString, name, ("text", AtomicString::ConstructFromLiteral)); 149 return name; 150 } 151 152 const AtomicString& time() 153 { 154 DEFINE_STATIC_LOCAL(AtomicString, name, ("time", AtomicString::ConstructFromLiteral)); 155 return name; 156 } 157 158 const AtomicString& url() 159 { 160 DEFINE_STATIC_LOCAL(AtomicString, name, ("url", AtomicString::ConstructFromLiteral)); 161 return name; 162 } 163 164 const AtomicString& week() 165 { 166 DEFINE_STATIC_LOCAL(AtomicString, name, ("week", AtomicString::ConstructFromLiteral)); 167 return name; 168 } 169 170 } // namespace WebCore::InputTypeNames 171 172 } // namespace WebCore 173