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

Side by Side 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: Perform step base derivation via InputType::findStepBase() instead 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 virtual bool shouldSubmitImplicitly(Event*) OVERRIDE; 230 virtual bool shouldSubmitImplicitly(Event*) OVERRIDE;
231 virtual bool hasCustomFocusLogic() const OVERRIDE; 231 virtual bool hasCustomFocusLogic() const OVERRIDE;
232 232
233 protected: 233 protected:
234 InputType(HTMLInputElement& element) : InputTypeView(element) { } 234 InputType(HTMLInputElement& element) : InputTypeView(element) { }
235 Chrome* chrome() const; 235 Chrome* chrome() const;
236 Locale& locale() const; 236 Locale& locale() const;
237 Decimal parseToNumberOrNaN(const String&) const; 237 Decimal parseToNumberOrNaN(const String&) const;
238 void countUsageIfVisible(UseCounter::Feature) const; 238 void countUsageIfVisible(UseCounter::Feature) const;
239 239
240 // Derive the step base, following the HTML algorithm steps.
241 Decimal findStepBase(const Decimal&) const;
242
240 private: 243 private:
241 // Helper for stepUp()/stepDown(). Adds step value * count to the current va lue. 244 // Helper for stepUp()/stepDown(). Adds step value * count to the current va lue.
242 void applyStep(int count, AnyStepHandling, TextFieldEventBehavior, Exception State&); 245 void applyStep(int count, AnyStepHandling, TextFieldEventBehavior, Exception State&);
243 }; 246 };
244 247
245 } // namespace WebCore 248 } // namespace WebCore
246 #endif 249 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698