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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 String DateTimeSymbolicFieldElement::value() const | 125 String DateTimeSymbolicFieldElement::value() const |
126 { | 126 { |
127 return hasValue() ? m_symbols[m_selectedIndex] : emptyString(); | 127 return hasValue() ? m_symbols[m_selectedIndex] : emptyString(); |
128 } | 128 } |
129 | 129 |
130 int DateTimeSymbolicFieldElement::valueAsInteger() const | 130 int DateTimeSymbolicFieldElement::valueAsInteger() const |
131 { | 131 { |
132 return m_selectedIndex; | 132 return m_selectedIndex; |
133 } | 133 } |
134 | 134 |
| 135 int DateTimeSymbolicFieldElement::valueForARIAValueNow() const |
| 136 { |
| 137 // Synchronize with minimum/maximum adjustment in initialize(). |
| 138 return m_selectedIndex + 1; |
| 139 } |
| 140 |
135 String DateTimeSymbolicFieldElement::visibleEmptyValue() const | 141 String DateTimeSymbolicFieldElement::visibleEmptyValue() const |
136 { | 142 { |
137 return m_visibleEmptyValue; | 143 return m_visibleEmptyValue; |
138 } | 144 } |
139 | 145 |
140 String DateTimeSymbolicFieldElement::visibleValue() const | 146 String DateTimeSymbolicFieldElement::visibleValue() const |
141 { | 147 { |
142 return hasValue() ? m_symbols[m_selectedIndex] : visibleEmptyValue(); | 148 return hasValue() ? m_symbols[m_selectedIndex] : visibleEmptyValue(); |
143 } | 149 } |
144 | 150 |
145 int DateTimeSymbolicFieldElement::indexOfSelectedOption() const | 151 int DateTimeSymbolicFieldElement::indexOfSelectedOption() const |
146 { | 152 { |
147 return m_selectedIndex; | 153 return m_selectedIndex; |
148 } | 154 } |
149 | 155 |
150 int DateTimeSymbolicFieldElement::optionCount() const | 156 int DateTimeSymbolicFieldElement::optionCount() const |
151 { | 157 { |
152 return m_symbols.size(); | 158 return m_symbols.size(); |
153 } | 159 } |
154 | 160 |
155 String DateTimeSymbolicFieldElement::optionAtIndex(int index) const | 161 String DateTimeSymbolicFieldElement::optionAtIndex(int index) const |
156 { | 162 { |
157 return m_symbols[index]; | 163 return m_symbols[index]; |
158 } | 164 } |
159 | 165 |
160 } // namespace WebCore | 166 } // namespace WebCore |
161 | 167 |
162 #endif | 168 #endif |
OLD | NEW |