Changeset 174148 in webkit
- Timestamp:
- Oct 1, 2014 1:15:40 AM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r174128 r174148 1 2014-10-01 Joseph Pecoraro <pecoraro@apple.com> 2 3 [iOS] <select> with <optgroup> may change initial selected option when assisted 4 https://bugs.webkit.org/show_bug.cgi?id=137261 5 6 Reviewed by Enrica Casucci. 7 8 The initial assignemnt of _singleSelectionIndex was calculating the 9 item index (ignoring groups) instead of the row index (affected by 10 groups!). Thus if there was N groups we would select the row N 11 before the real selection. 12 13 Also avoid this entirely if this is a multiple selection picker. 14 This logic is only needed for single selection with groups. 15 16 * UIProcess/ios/forms/WKFormSelectPicker.mm: 17 (-[WKMultipleSelectPicker initWithView:]): 18 1 19 2014-09-30 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 20 -
trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectPicker.mm
r170554 r174148 167 167 [self reloadAllComponents]; 168 168 169 const Vector<OptionItem>& selectOptions = [_view assistedNodeSelectOptions]; 170 int currentIndex = 0; 171 for (size_t i = 0; i < selectOptions.size(); ++i) { 172 const OptionItem& item = selectOptions[i]; 173 if (item.isGroup) 174 continue; 175 176 if (!_allowsMultipleSelection && item.isSelected) 177 _singleSelectionIndex = currentIndex; 178 179 currentIndex++; 180 } 181 182 if (_singleSelectionIndex != NSNotFound) 183 [self selectRow:_singleSelectionIndex inComponent:0 animated:NO]; 169 if (!_allowsMultipleSelection) { 170 const Vector<OptionItem>& selectOptions = [_view assistedNodeSelectOptions]; 171 for (size_t i = 0; i < selectOptions.size(); ++i) { 172 const OptionItem& item = selectOptions[i]; 173 if (item.isGroup) 174 continue; 175 176 if (item.isSelected) { 177 _singleSelectionIndex = i; 178 [self selectRow:_singleSelectionIndex inComponent:0 animated:NO]; 179 break; 180 } 181 } 182 } 184 183 185 184 return self;
Note: See TracChangeset
for help on using the changeset viewer.