OLD | NEW |
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 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 Decimal::FromDouble(std::numeric_limits<double>::max()); | 150 Decimal::FromDouble(std::numeric_limits<double>::max()); |
151 return InputType::CreateStepRange(any_step_handling, kNumberDefaultStepBase, | 151 return InputType::CreateStepRange(any_step_handling, kNumberDefaultStepBase, |
152 -double_max, double_max, step_description); | 152 -double_max, double_max, step_description); |
153 } | 153 } |
154 | 154 |
155 bool NumberInputType::SizeShouldIncludeDecoration(int default_size, | 155 bool NumberInputType::SizeShouldIncludeDecoration(int default_size, |
156 int& preferred_size) const { | 156 int& preferred_size) const { |
157 preferred_size = default_size; | 157 preferred_size = default_size; |
158 | 158 |
159 const String step_string = GetElement().FastGetAttribute(stepAttr); | 159 const String step_string = GetElement().FastGetAttribute(stepAttr); |
160 if (EqualIgnoringCase(step_string, "any")) | 160 if (DeprecatedEqualIgnoringCase(step_string, "any")) |
161 return false; | 161 return false; |
162 | 162 |
163 const Decimal minimum = | 163 const Decimal minimum = |
164 ParseToDecimalForNumberType(GetElement().FastGetAttribute(minAttr)); | 164 ParseToDecimalForNumberType(GetElement().FastGetAttribute(minAttr)); |
165 if (!minimum.IsFinite()) | 165 if (!minimum.IsFinite()) |
166 return false; | 166 return false; |
167 | 167 |
168 const Decimal maximum = | 168 const Decimal maximum = |
169 ParseToDecimalForNumberType(GetElement().FastGetAttribute(maxAttr)); | 169 ParseToDecimalForNumberType(GetElement().FastGetAttribute(maxAttr)); |
170 if (!maximum.IsFinite()) | 170 if (!maximum.IsFinite()) |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 .GetLayoutObject() | 300 .GetLayoutObject() |
301 ->SetNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( | 301 ->SetNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( |
302 LayoutInvalidationReason::kAttributeChanged); | 302 LayoutInvalidationReason::kAttributeChanged); |
303 } | 303 } |
304 | 304 |
305 bool NumberInputType::SupportsSelectionAPI() const { | 305 bool NumberInputType::SupportsSelectionAPI() const { |
306 return false; | 306 return false; |
307 } | 307 } |
308 | 308 |
309 } // namespace blink | 309 } // namespace blink |
OLD | NEW |