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

Unified Diff: Source/platform/text/PlatformLocale.h

Issue 1100273002: input[type=number] UI should reject invalid characters. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/NumberInputType.cpp ('k') | Source/platform/text/PlatformLocale.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/PlatformLocale.h
diff --git a/Source/platform/text/PlatformLocale.h b/Source/platform/text/PlatformLocale.h
index ab1ebd9df7deaea68fa3001ba2a9161baba0570e..93f98f16ab752abcdab45a229f32489d47fd49ec 100644
--- a/Source/platform/text/PlatformLocale.h
+++ b/Source/platform/text/PlatformLocale.h
@@ -59,6 +59,10 @@ public:
// resultant string.
String convertFromLocalizedNumber(const String&);
+ // Remove characters from |input| if a character is not included in
+ // locale-specific number characters and |standardChars|.
+ String stripInvalidNumberCharacters(const String& input, const String& standardChars) const;
+
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
// Returns localized decimal separator, e.g. "." for English, "," for French.
String localizedDecimalSeparator();
@@ -162,6 +166,7 @@ private:
String m_positiveSuffix;
String m_negativePrefix;
String m_negativeSuffix;
+ String m_acceptableNumberCharacters;
bool m_hasLocaleData;
};
« no previous file with comments | « Source/core/html/forms/NumberInputType.cpp ('k') | Source/platform/text/PlatformLocale.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698