| 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 "InputTypeNames.h" |
| 24 | |
| 25 | #include <wtf/NeverDestroyed.h> |
| 26 | |
| 27 | namespace WebCore { |
| 28 | |
| 29 | namespace InputTypeNames { |
| 30 | |
| 31 | // The type names must be lowercased because they will be the return values of |
| 32 | // input.type and input.type must be lowercase according to DOM Level 2. |
| 33 | |
| 34 | const AtomicString& button() |
| 35 | { |
| 36 | static NeverDestroyed<AtomicString> name("button" , AtomicString::ConstructFromLiteral); |
| 37 | return name; |
| 38 | } |
| 39 | |
| 40 | const AtomicString& checkbox() |
| 41 | { |
| 42 | static NeverDestroyed<AtomicString> name("checkbox" , AtomicString::ConstructFromLiteral); |
| 43 | return name; |
| 44 | } |
| 45 | |
| 46 | const AtomicString& color() |
| 47 | { |
| 48 | static NeverDestroyed<AtomicString> name("color" , AtomicString::ConstructFromLiteral); |
| 49 | return name; |
| 50 | } |
| 51 | |
| 52 | const AtomicString& date() |
| 53 | { |
| 54 | static NeverDestroyed<AtomicString> name("date" , AtomicString::ConstructFromLiteral); |
| 55 | return name; |
| 56 | } |
| 57 | |
| 58 | const AtomicString& datetime() |
| 59 | { |
| 60 | static NeverDestroyed<AtomicString> name("datetime" , AtomicString::ConstructFromLiteral); |
| 61 | return name; |
| 62 | } |
| 63 | |
| 64 | const AtomicString& datetimelocal() |
| 65 | { |
| 66 | static NeverDestroyed<AtomicString> name("datetime-local" , AtomicString::ConstructFromLiteral); |
| 67 | return name; |
| 68 | } |
| 69 | |
| 70 | const AtomicString& email() |
| 71 | { |
| 72 | static NeverDestroyed<AtomicString> name("email" , AtomicString::ConstructFromLiteral); |
| 73 | return name; |
| 74 | } |
| 75 | |
| 76 | const AtomicString& file() |
| 77 | { |
| 78 | static NeverDestroyed<AtomicString> name("file" , AtomicString::ConstructFromLiteral); |
| 79 | return name; |
| 80 | } |
| 81 | |
| 82 | const AtomicString& hidden() |
| 83 | { |
| 84 | static NeverDestroyed<AtomicString> name("hidden" , AtomicString::ConstructFromLiteral); |
| 85 | return name; |
| 86 | } |
| 87 | |
| 88 | const AtomicString& image() |
| 89 | { |
| 90 | static NeverDestroyed<AtomicString> name("image" , AtomicString::ConstructFromLiteral); |
| 91 | return name; |
| 92 | } |
| 93 | |
| 94 | const AtomicString& month() |
| 95 | { |
| 96 | static NeverDestroyed<AtomicString> name("month" , AtomicString::ConstructFromLiteral); |
| 97 | return name; |
| 98 | } |
| 99 | |
| 100 | const AtomicString& number() |
| 101 | { |
| 102 | static NeverDestroyed<AtomicString> name("number" , AtomicString::ConstructFromLiteral); |
| 103 | return name; |
| 104 | } |
| 105 | |
| 106 | const AtomicString& password() |
| 107 | { |
| 108 | static NeverDestroyed<AtomicString> name("password" , AtomicString::ConstructFromLiteral); |
| 109 | return name; |
| 110 | } |
| 111 | |
| 112 | const AtomicString& radio() |
| 113 | { |
| 114 | static NeverDestroyed<AtomicString> name("radio" , AtomicString::ConstructFromLiteral); |
| 115 | return name; |
| 116 | } |
| 117 | |
| 118 | const AtomicString& range() |
| 119 | { |
| 120 | static NeverDestroyed<AtomicString> name("range" , AtomicString::ConstructFromLiteral); |
| 121 | return name; |
| 122 | } |
| 123 | |
| 124 | const AtomicString& reset() |
| 125 | { |
| 126 | static NeverDestroyed<AtomicString> name("reset" , AtomicString::ConstructFromLiteral); |
| 127 | return name; |
| 128 | } |
| 129 | |
| 130 | const AtomicString& search() |
| 131 | { |
| 132 | static NeverDestroyed<AtomicString> name("search" , AtomicString::ConstructFromLiteral); |
| 133 | return name; |
| 134 | } |
| 135 | |
| 136 | const AtomicString& submit() |
| 137 | { |
| 138 | static NeverDestroyed<AtomicString> name("submit" , AtomicString::ConstructFromLiteral); |
| 139 | return name; |
| 140 | } |
| 141 | |
| 142 | const AtomicString& telephone() |
| 143 | { |
| 144 | static NeverDestroyed<AtomicString> name("tel" , AtomicString::ConstructFromLiteral); |
| 145 | return name; |
| 146 | } |
| 147 | |
| 148 | const AtomicString& text() |
| 149 | { |
| 150 | static NeverDestroyed<AtomicString> name("text" , AtomicString::ConstructFromLiteral); |
| 151 | return name; |
| 152 | } |
| 153 | |
| 154 | const AtomicString& time() |
| 155 | { |
| 156 | static NeverDestroyed<AtomicString> name("time" , AtomicString::ConstructFromLiteral); |
| 157 | return name; |
| 158 | } |
| 159 | |
| 160 | const AtomicString& url() |
| 161 | { |
| 162 | static NeverDestroyed<AtomicString> name("url" , AtomicString::ConstructFromLiteral); |
| 163 | return name; |
| 164 | } |
| 165 | |
| 166 | const AtomicString& week() |
| 167 | { |
| 168 | static NeverDestroyed<AtomicString> name("week" , AtomicString::ConstructFromLiteral); |
| 169 | return name; |
| 170 | } |
| 171 | |
| 172 | } // namespace WebCore::InputTypeNames |
| 173 | |
| 174 | } // namespace WebCore |
| 175 | |