OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 void DateTimeFieldElement::focusOnNextField() | 152 void DateTimeFieldElement::focusOnNextField() |
153 { | 153 { |
154 if (!m_fieldOwner) | 154 if (!m_fieldOwner) |
155 return; | 155 return; |
156 m_fieldOwner->focusOnNextField(*this); | 156 m_fieldOwner->focusOnNextField(*this); |
157 } | 157 } |
158 | 158 |
159 void DateTimeFieldElement::initialize(const AtomicString& pseudo, const String&
axHelpText, int axMinimum, int axMaximum) | 159 void DateTimeFieldElement::initialize(const AtomicString& pseudo, const String&
axHelpText, int axMinimum, int axMaximum) |
160 { | 160 { |
161 // On accessibility, DateTimeFieldElement acts like spin button. | 161 // On accessibility, DateTimeFieldElement acts like spin button. |
162 setAttribute(roleAttr, AtomicString("spinbutton", AtomicString::ConstructFro
mLiteral)); | 162 setAttribute(roleAttr, AtomicString("spinbutton")); |
163 setAttribute(aria_valuetextAttr, AtomicString(emptyValueAXText())); | 163 setAttribute(aria_valuetextAttr, AtomicString(emptyValueAXText())); |
164 setAttribute(aria_valueminAttr, AtomicString::number(axMinimum)); | 164 setAttribute(aria_valueminAttr, AtomicString::number(axMinimum)); |
165 setAttribute(aria_valuemaxAttr, AtomicString::number(axMaximum)); | 165 setAttribute(aria_valuemaxAttr, AtomicString::number(axMaximum)); |
166 | 166 |
167 setAttribute(aria_helpAttr, AtomicString(axHelpText)); | 167 setAttribute(aria_helpAttr, AtomicString(axHelpText)); |
168 setShadowPseudoId(pseudo); | 168 setShadowPseudoId(pseudo); |
169 appendChild(Text::create(document(), visibleValue())); | 169 appendChild(Text::create(document(), visibleValue())); |
170 } | 170 } |
171 | 171 |
172 bool DateTimeFieldElement::isDateTimeFieldElement() const | 172 bool DateTimeFieldElement::isDateTimeFieldElement() const |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 } | 240 } |
241 | 241 |
242 int DateTimeFieldElement::valueForARIAValueNow() const | 242 int DateTimeFieldElement::valueForARIAValueNow() const |
243 { | 243 { |
244 return valueAsInteger(); | 244 return valueAsInteger(); |
245 } | 245 } |
246 | 246 |
247 } // namespace blink | 247 } // namespace blink |
248 | 248 |
249 #endif | 249 #endif |
OLD | NEW |