OLD | NEW |
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 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 } | 986 } |
987 | 987 |
988 Decimal InputType::findStepBase(const Decimal& defaultValue) const | 988 Decimal InputType::findStepBase(const Decimal& defaultValue) const |
989 { | 989 { |
990 Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), Decima
l::nan()); | 990 Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), Decima
l::nan()); |
991 if (!stepBase.isFinite()) | 991 if (!stepBase.isFinite()) |
992 stepBase = parseToNumber(element().fastGetAttribute(valueAttr), defaultV
alue); | 992 stepBase = parseToNumber(element().fastGetAttribute(valueAttr), defaultV
alue); |
993 return stepBase; | 993 return stepBase; |
994 } | 994 } |
995 | 995 |
| 996 StepRange InputType::createStepRange(AnyStepHandling anyStepHandling, const Deci
mal& stepBaseDefault, const Decimal& minimumDefault, const Decimal& maximumDefau
lt, const StepRange::StepDescription& stepDescription) const |
| 997 { |
| 998 const Decimal stepBase = findStepBase(stepBaseDefault); |
| 999 const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), m
inimumDefault); |
| 1000 const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), m
aximumDefault); |
| 1001 const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription,
element().fastGetAttribute(stepAttr)); |
| 1002 return StepRange(stepBase, minimum, maximum, step, stepDescription); |
| 1003 } |
| 1004 |
996 } // namespace WebCore | 1005 } // namespace WebCore |
OLD | NEW |