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 |