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

Unified Diff: Source/core/html/forms/InputType.h

Issue 83413002: Derive the step base for an input element as (now) specified. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
Index: Source/core/html/forms/InputType.h
diff --git a/Source/core/html/forms/InputType.h b/Source/core/html/forms/InputType.h
index 94ddda88791670b97f5b69af1b66fd538a07cb24..77320e0a06d87666c6449a1d7862b1e573d34f43 100644
--- a/Source/core/html/forms/InputType.h
+++ b/Source/core/html/forms/InputType.h
@@ -196,11 +196,13 @@ public:
virtual Decimal findClosestTickMarkValue(const Decimal&);
virtual void handleDOMActivateEvent(Event*);
- // Parses the specified string for the type, and return
+ // Parses the first string argument for the input type, and return
// the Decimal value for the parsing result if the parsing
- // succeeds; Returns defaultValue otherwise. This function can
- // return NaN or Infinity only if defaultValue is NaN or Infinity.
- virtual Decimal parseToNumber(const String&, const Decimal& defaultValue) const;
+ // succeeds. If not, that parsing is attempted for the second
+ // argument. If that also fails, it returns defaultValue. This
+ // function can return NaN or Infinity only if defaultValue is NaN
+ // or Infinity.
+ virtual Decimal parseToNumber(const String&, const String&, const Decimal& defaultValue) const;
sof 2013/11/22 12:50:49 FYI - I went back & forth a bit on whether or not
tkent 2013/11/24 22:34:23 I don't think adding another argument to parseToNu
yosin_UTC9 2013/11/25 01:26:41 Agree with tkent@. It is confusing having alternat
sof 2013/11/26 17:59:05 Thanks, added a helper InputType::findStepBase(con
// Parses the specified string for this InputType, and returns true if it
// is successfully parsed. An instance pointed by the DateComponents*

Powered by Google App Engine
This is Rietveld 408576698