| 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) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 m_inputType->setValueAsDate(value, exceptionState); | 1047 m_inputType->setValueAsDate(value, exceptionState); |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 double HTMLInputElement::valueAsNumber() const | 1050 double HTMLInputElement::valueAsNumber() const |
| 1051 { | 1051 { |
| 1052 return m_inputType->valueAsDouble(); | 1052 return m_inputType->valueAsDouble(); |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 void HTMLInputElement::setValueAsNumber(double newValue, ExceptionState& excepti
onState, TextFieldEventBehavior eventBehavior) | 1055 void HTMLInputElement::setValueAsNumber(double newValue, ExceptionState& excepti
onState, TextFieldEventBehavior eventBehavior) |
| 1056 { | 1056 { |
| 1057 // http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-
element-attributes.html#dom-input-valueasnumber |
| 1058 // On setting, if the new value is infinite, then throw a TypeError exceptio
n. |
| 1057 if (std::isinf(newValue)) { | 1059 if (std::isinf(newValue)) { |
| 1058 exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(newVal
ue)); | 1060 exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(newVal
ue)); |
| 1059 return; | 1061 return; |
| 1060 } | 1062 } |
| 1061 m_inputType->setValueAsDouble(newValue, eventBehavior, exceptionState); | 1063 m_inputType->setValueAsDouble(newValue, eventBehavior, exceptionState); |
| 1062 } | 1064 } |
| 1063 | 1065 |
| 1064 void HTMLInputElement::setValueFromRenderer(const String& value) | 1066 void HTMLInputElement::setValueFromRenderer(const String& value) |
| 1065 { | 1067 { |
| 1066 // File upload controls will never use this. | 1068 // File upload controls will never use this. |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1878 } | 1880 } |
| 1879 | 1881 |
| 1880 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 1882 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 1881 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() | 1883 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() |
| 1882 { | 1884 { |
| 1883 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); | 1885 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); |
| 1884 } | 1886 } |
| 1885 #endif | 1887 #endif |
| 1886 | 1888 |
| 1887 } // namespace | 1889 } // namespace |
| OLD | NEW |