Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp

Issue 12086056: Merge 140803 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698