| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 if (hasValue()) { | 134 if (hasValue()) { |
| 135 if (!indexIsInRange(++m_selectedIndex)) | 135 if (!indexIsInRange(++m_selectedIndex)) |
| 136 m_selectedIndex = m_minimumIndex; | 136 m_selectedIndex = m_minimumIndex; |
| 137 } else { | 137 } else { |
| 138 m_selectedIndex = m_minimumIndex; | 138 m_selectedIndex = m_minimumIndex; |
| 139 } | 139 } |
| 140 updateVisibleValue(DispatchEvent); | 140 updateVisibleValue(DispatchEvent); |
| 141 } | 141 } |
| 142 | 142 |
| 143 String DateTimeSymbolicFieldElement::value() const { | 143 String DateTimeSymbolicFieldElement::value() const { |
| 144 return hasValue() ? m_symbols[m_selectedIndex] : emptyString(); | 144 return hasValue() ? m_symbols[m_selectedIndex] : emptyString; |
| 145 } | 145 } |
| 146 | 146 |
| 147 int DateTimeSymbolicFieldElement::valueAsInteger() const { | 147 int DateTimeSymbolicFieldElement::valueAsInteger() const { |
| 148 return m_selectedIndex; | 148 return m_selectedIndex; |
| 149 } | 149 } |
| 150 | 150 |
| 151 int DateTimeSymbolicFieldElement::valueForARIAValueNow() const { | 151 int DateTimeSymbolicFieldElement::valueForARIAValueNow() const { |
| 152 // Synchronize with minimum/maximum adjustment in initialize(). | 152 // Synchronize with minimum/maximum adjustment in initialize(). |
| 153 return m_selectedIndex + 1; | 153 return m_selectedIndex + 1; |
| 154 } | 154 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 167 | 167 |
| 168 int DateTimeSymbolicFieldElement::optionCount() const { | 168 int DateTimeSymbolicFieldElement::optionCount() const { |
| 169 return m_symbols.size(); | 169 return m_symbols.size(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 String DateTimeSymbolicFieldElement::optionAtIndex(int index) const { | 172 String DateTimeSymbolicFieldElement::optionAtIndex(int index) const { |
| 173 return m_symbols[index]; | 173 return m_symbols[index]; |
| 174 } | 174 } |
| 175 | 175 |
| 176 } // namespace blink | 176 } // namespace blink |
| OLD | NEW |