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

Unified Diff: Source/core/html/shadow/DateTimeNumericFieldElement.cpp

Issue 112513002: Remove keyboard input timeout for date, datetime-local, month, time, and week input types on non-An… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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/shadow/DateTimeNumericFieldElement.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/shadow/DateTimeNumericFieldElement.cpp
diff --git a/Source/core/html/shadow/DateTimeNumericFieldElement.cpp b/Source/core/html/shadow/DateTimeNumericFieldElement.cpp
index 6c3f5eff804c2aed61614bf81fcd98254aadafa1..537416f74025522ffc132b85aaca0c8cb1095204 100644
--- a/Source/core/html/shadow/DateTimeNumericFieldElement.cpp
+++ b/Source/core/html/shadow/DateTimeNumericFieldElement.cpp
@@ -37,8 +37,6 @@ using namespace WTF::Unicode;
namespace WebCore {
-static const DOMTimeStamp typeAheadTimeout = 1000;
-
int DateTimeNumericFieldElement::Range::clampValue(int value) const
{
return std::min(std::max(value, minimum), maximum);
@@ -53,7 +51,6 @@ bool DateTimeNumericFieldElement::Range::isInRange(int value) const
DateTimeNumericFieldElement::DateTimeNumericFieldElement(Document& document, FieldOwner& fieldOwner, const Range& range, const Range& hardLimits, const String& placeholder, const DateTimeNumericFieldElement::Step& step)
: DateTimeFieldElement(document, fieldOwner)
- , m_lastDigitCharTime(0)
, m_placeholder(placeholder)
, m_range(range)
, m_hardLimits(hardLimits)
@@ -125,13 +122,7 @@ void DateTimeNumericFieldElement::handleKeyboardEvent(KeyboardEvent* keyboardEve
if (digit < 0 || digit > 9)
return;
- DOMTimeStamp delta = keyboardEvent->timeStamp() - m_lastDigitCharTime;
- m_lastDigitCharTime = keyboardEvent->timeStamp();
-
- if (delta > typeAheadTimeout)
- m_typeAheadBuffer.clear();
m_typeAheadBuffer.append(number);
-
int newValue = typeAheadValue();
if (newValue >= m_hardLimits.minimum)
setValueAsInteger(newValue, DispatchEvent);
« no previous file with comments | « Source/core/html/shadow/DateTimeNumericFieldElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698