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

Side by Side Diff: Source/core/html/forms/InputType.cpp

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
« no previous file with comments | « Source/core/html/forms/InputType.h ('k') | Source/core/html/forms/MonthInputType.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 9 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
10 * 10 *
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 } 978 }
979 979
980 void InputType::countUsageIfVisible(UseCounter::Feature feature) const 980 void InputType::countUsageIfVisible(UseCounter::Feature feature) const
981 { 981 {
982 if (RenderStyle* style = element().renderStyle()) { 982 if (RenderStyle* style = element().renderStyle()) {
983 if (style->visibility() != HIDDEN) 983 if (style->visibility() != HIDDEN)
984 UseCounter::count(element().document(), feature); 984 UseCounter::count(element().document(), feature);
985 } 985 }
986 } 986 }
987 987
988 Decimal InputType::findStepBase(const Decimal& defaultValue) const
yosin_UTC9 2013/11/27 01:28:05 The word "find" leads me the function has loop. Ho
989 {
990 Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), Decima l::nan());
yosin_UTC9 2013/11/27 01:28:05 nit: const Decimal stepBase = ...;
991 if (!stepBase.isFinite())
992 stepBase = parseToNumber(element().fastGetAttribute(valueAttr), defaultV alue);
yosin_UTC9 2013/11/27 01:28:05 nit: rather than copying, just |return parseToNumb
993 return stepBase;
994 }
995
988 } // namespace WebCore 996 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/forms/InputType.h ('k') | Source/core/html/forms/MonthInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698