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

Unified Diff: Source/core/html/forms/TypeAhead.cpp

Issue 1058243002: Implement support to consider <space> key as part of typeAhead searching. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch with new implementation Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/forms/TypeAhead.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/TypeAhead.cpp
diff --git a/Source/core/html/forms/TypeAhead.cpp b/Source/core/html/forms/TypeAhead.cpp
index 4c2b1f8313be146d89cc758aaffbdae7d2a745c2..5f2d2767fbb6b507f3ef857bf75650283ffb195e 100644
--- a/Source/core/html/forms/TypeAhead.cpp
+++ b/Source/core/html/forms/TypeAhead.cpp
@@ -70,6 +70,7 @@ int TypeAhead::handleEvent(KeyboardEvent* event, MatchModeFlags matchMode)
if (delta > typeAheadTimeout)
m_buffer.clear();
+
m_buffer.append(c);
if (optionCount < 1)
@@ -119,4 +120,10 @@ int TypeAhead::handleEvent(KeyboardEvent* event, MatchModeFlags matchMode)
return -1;
}
+bool TypeAhead::hasActiveSession(KeyboardEvent* event)
+{
+ DOMTimeStamp delta = event->timeStamp() - m_lastTypeTime;
+ return delta <= typeAheadTimeout;
+}
+
} // namespace blink
« no previous file with comments | « Source/core/html/forms/TypeAhead.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698