Changeset 52519 in webkit
- Timestamp:
- Dec 22, 2009 7:59:24 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r52518 r52519 1 2009-12-22 James Su <suzhe@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 [Chromium] Keyboard shortcut in dropdown not working. 6 https://bugs.webkit.org/show_bug.cgi?id=32008 7 8 Consider PlatformKeyboardEvent::Char type event as character type 9 event on all platforms. It fixes the "type ahead find" feature 10 of the popup listbox on Linux and Mac platforms. 11 12 Merge the case-sensitive type ahead find fix from 13 WebCore/dom/SelectElement.cpp. See 14 https://bugs.webkit.org/show_bug.cgi?id=29103 15 16 * platform/chromium/PopupMenuChromium.cpp: 17 (WebCore::isCharacterTypeEvent): 18 1 19 2009-12-22 Carol Szabo <carol.szabo@nokia.com> 2 20 -
trunk/WebCore/platform/chromium/PopupMenuChromium.cpp
r52321 r52519 612 612 { 613 613 // Check whether the event is a character-typed event or not. 614 // In Windows, PlatformKeyboardEvent::Char (not RawKeyDown) type event 615 // is considered as character type event. In Mac OS, KeyDown (not 616 // KeyUp) is considered as character type event. 617 #if PLATFORM(WIN_OS) 618 if (event.type() == PlatformKeyboardEvent::Char) 619 return true; 620 #else 621 if (event.type() == PlatformKeyboardEvent::KeyDown) 622 return true; 623 #endif 624 return false; 614 // We use RawKeyDown/Char/KeyUp event scheme on all platforms, 615 // so PlatformKeyboardEvent::Char (not RawKeyDown) type event 616 // is considered as character type event. 617 return event.type() == PlatformKeyboardEvent::Char; 625 618 } 626 619 … … 746 739 } 747 740 741 // Compute a case-folded copy of the prefix string before beginning the search for 742 // a matching element. This code uses foldCase to work around the fact that 743 // String::startWith does not fold non-ASCII characters. This code can be changed 744 // to use startWith once that is fixed. 745 String prefixWithCaseFolded(prefix.foldCase()); 748 746 int itemCount = numItems(); 749 747 int index = (max(0, m_selectedIndex) + searchStartOffset) % itemCount; … … 752 750 continue; 753 751 754 if (stripLeadingWhiteSpace(m_items[index]->label). startsWith(prefix, false)) {752 if (stripLeadingWhiteSpace(m_items[index]->label).foldCase().startsWith(prefixWithCaseFolded)) { 755 753 selectIndex(index); 756 754 return;
Note: See TracChangeset
for help on using the changeset viewer.