Changeset 161558 in webkit
- Timestamp:
- Jan 9, 2014 9:23:48 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r161556 r161558 1 2014-01-09 Pascal Jacquemart <p.jacquemart@samsung.com> 2 3 Cannot select multiple non-adjacent items in a multiple select control with the keyboard only 4 https://bugs.webkit.org/show_bug.cgi?id=15816 5 6 Reviewed by Chris Fleizach. 7 8 * fast/forms/listbox-non-contiguous-keyboard-selection-expected.txt: Added. 9 * fast/forms/listbox-non-contiguous-keyboard-selection.html: Added. 10 * platform/mac/TestExpectations: 11 Multiple non contiguous selection with keyboard not enabled on Mac 12 1 13 2014-01-09 Seokju Kwon <seokju@webkit.org> 2 14 -
trunk/LayoutTests/platform/mac/TestExpectations
r161516 r161558 566 566 platform/mac/fast/forms/listbox-scrollbar-hit-test.html 567 567 568 # Multiple non contiguous selection with keyboard not enabled on mac 569 webkit.org/b/15816 fast/forms/listbox-non-contiguous-keyboard-selection.html [ Skip ] 570 568 571 # <rdar://problem/11224894> Several Japanese vertical text tests failing on Mountain Lion 569 572 fast/dynamic/text-combine.html -
trunk/Source/WebCore/ChangeLog
r161556 r161558 1 2014-01-09 Pascal Jacquemart <p.jacquemart@samsung.com> 2 3 Cannot select multiple non-adjacent items in a multiple select control with the keyboard only 4 https://bugs.webkit.org/show_bug.cgi?id=15816 5 6 Reviewed by Chris Fleizach. 7 8 Test: fast/forms/listbox-non-contiguous-keyboard-selection.html 9 10 * html/HTMLSelectElement.cpp: 11 (WebCore::HTMLSelectElement::HTMLSelectElement): 12 New member m_allowsNonContiguousSelection defaults to false 13 (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): 14 Tracking CTRL modifier to start multiple non contiguous selection 15 * html/HTMLSelectElement.h: New member m_allowsNonContiguousSelection 16 (WebCore::HTMLSelectElement::allowsNonContiguousSelection): New getter 17 * rendering/RenderListBox.cpp: 18 (WebCore::RenderListBox::addFocusRingRects): 19 Following implementation made for spatial navigation 20 1 21 2014-01-09 Seokju Kwon <seokju@webkit.org> 2 22 -
trunk/Source/WebCore/html/HTMLSelectElement.cpp
r161199 r161558 75 75 , m_multiple(false) 76 76 , m_activeSelectionState(false) 77 , m_allowsNonContiguousSelection(false) 77 78 , m_shouldRecalcListItems(false) 78 79 { … … 1458 1459 setActiveSelectionEndIndex(endIndex); 1459 1460 1460 bool selectNewItem = !m_multiple || static_cast<KeyboardEvent*>(event)->shiftKey() || !isSpatialNavigationEnabled(document().frame()); 1461 #if PLATFORM(MAC) 1462 m_allowsNonContiguousSelection = m_multiple && isSpatialNavigationEnabled(document().frame()); 1463 #else 1464 m_allowsNonContiguousSelection = m_multiple && (isSpatialNavigationEnabled(document().frame()) || static_cast<KeyboardEvent*>(event)->ctrlKey()); 1465 #endif 1466 bool selectNewItem = static_cast<KeyboardEvent*>(event)->shiftKey() || !m_allowsNonContiguousSelection; 1467 1461 1468 if (selectNewItem) 1462 1469 m_activeSelectionState = true; … … 1488 1495 form()->submitImplicitly(event, false); 1489 1496 event->setDefaultHandled(); 1490 } else if (m_multiple && keyCode == ' ' && isSpatialNavigationEnabled(document().frame())) {1497 } else if (m_multiple && keyCode == ' ' && m_allowsNonContiguousSelection) { 1491 1498 // Use space to toggle selection change. 1492 1499 m_activeSelectionState = !m_activeSelectionState; -
trunk/Source/WebCore/html/HTMLSelectElement.h
r161181 r161558 112 112 // For use in the implementation of HTMLOptionElement. 113 113 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); 114 bool allowsNonContiguousSelection() const { return m_allowsNonContiguousSelection; }; 114 115 115 116 protected: … … 209 210 bool m_multiple; 210 211 bool m_activeSelectionState; 212 bool m_allowsNonContiguousSelection; 211 213 mutable bool m_shouldRecalcListItems; 212 214 }; -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r160599 r161558 320 320 void RenderListBox::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer) 321 321 { 322 if (! isSpatialNavigationEnabled(&frame()))322 if (!selectElement().allowsNonContiguousSelection()) 323 323 return RenderBlockFlow::addFocusRingRects(rects, additionalOffset, paintContainer); 324 324
Note: See TracChangeset
for help on using the changeset viewer.