[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:59:12 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit d03502824ec6a629e03e863feddf7f87c27fd866
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 23 03:59:24 2009 +0000
2009-12-22 James Su <suzhe at chromium.org>
Reviewed by Darin Fisher.
[Chromium] Keyboard shortcut in dropdown not working.
https://bugs.webkit.org/show_bug.cgi?id=32008
Consider PlatformKeyboardEvent::Char type event as character type
event on all platforms. It fixes the "type ahead find" feature
of the popup listbox on Linux and Mac platforms.
Merge the case-sensitive type ahead find fix from
WebCore/dom/SelectElement.cpp. See
https://bugs.webkit.org/show_bug.cgi?id=29103
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::isCharacterTypeEvent):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c6e2c58..ea94c18 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2009-12-22 James Su <suzhe at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Keyboard shortcut in dropdown not working.
+ https://bugs.webkit.org/show_bug.cgi?id=32008
+
+ Consider PlatformKeyboardEvent::Char type event as character type
+ event on all platforms. It fixes the "type ahead find" feature
+ of the popup listbox on Linux and Mac platforms.
+
+ Merge the case-sensitive type ahead find fix from
+ WebCore/dom/SelectElement.cpp. See
+ https://bugs.webkit.org/show_bug.cgi?id=29103
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::isCharacterTypeEvent):
+
2009-12-22 Carol Szabo <carol.szabo at nokia.com>
Reviewed by Eric Seidel.
diff --git a/WebCore/platform/chromium/PopupMenuChromium.cpp b/WebCore/platform/chromium/PopupMenuChromium.cpp
index 1e3b9f9..668a697 100644
--- a/WebCore/platform/chromium/PopupMenuChromium.cpp
+++ b/WebCore/platform/chromium/PopupMenuChromium.cpp
@@ -611,17 +611,10 @@ bool PopupListBox::isInterestedInEventForKey(int keyCode)
static bool isCharacterTypeEvent(const PlatformKeyboardEvent& event)
{
// Check whether the event is a character-typed event or not.
- // In Windows, PlatformKeyboardEvent::Char (not RawKeyDown) type event
- // is considered as character type event. In Mac OS, KeyDown (not
- // KeyUp) is considered as character type event.
-#if PLATFORM(WIN_OS)
- if (event.type() == PlatformKeyboardEvent::Char)
- return true;
-#else
- if (event.type() == PlatformKeyboardEvent::KeyDown)
- return true;
-#endif
- return false;
+ // We use RawKeyDown/Char/KeyUp event scheme on all platforms,
+ // so PlatformKeyboardEvent::Char (not RawKeyDown) type event
+ // is considered as character type event.
+ return event.type() == PlatformKeyboardEvent::Char;
}
bool PopupListBox::handleKeyEvent(const PlatformKeyboardEvent& event)
@@ -745,13 +738,18 @@ void PopupListBox::typeAheadFind(const PlatformKeyboardEvent& event)
}
}
+ // Compute a case-folded copy of the prefix string before beginning the search for
+ // a matching element. This code uses foldCase to work around the fact that
+ // String::startWith does not fold non-ASCII characters. This code can be changed
+ // to use startWith once that is fixed.
+ String prefixWithCaseFolded(prefix.foldCase());
int itemCount = numItems();
int index = (max(0, m_selectedIndex) + searchStartOffset) % itemCount;
for (int i = 0; i < itemCount; i++, index = (index + 1) % itemCount) {
if (!isSelectableItem(index))
continue;
- if (stripLeadingWhiteSpace(m_items[index]->label).startsWith(prefix, false)) {
+ if (stripLeadingWhiteSpace(m_items[index]->label).foldCase().startsWith(prefixWithCaseFolded)) {
selectIndex(index);
return;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list