| 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 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 return 0; | 1494 return 0; |
| 1495 | 1495 |
| 1496 return toHTMLDataListElement(element); | 1496 return toHTMLDataListElement(element); |
| 1497 } | 1497 } |
| 1498 | 1498 |
| 1499 bool HTMLInputElement::hasValidDataListOptions() const | 1499 bool HTMLInputElement::hasValidDataListOptions() const |
| 1500 { | 1500 { |
| 1501 HTMLDataListElement* dataList = this->dataList(); | 1501 HTMLDataListElement* dataList = this->dataList(); |
| 1502 if (!dataList) | 1502 if (!dataList) |
| 1503 return false; | 1503 return false; |
| 1504 RefPtr<HTMLCollection> options = dataList->options(); | 1504 RefPtrWillBeRawPtr<HTMLCollection> options = dataList->options(); |
| 1505 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options
->item(i)); ++i) { | 1505 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options
->item(i)); ++i) { |
| 1506 if (isValidValue(option->value())) | 1506 if (isValidValue(option->value())) |
| 1507 return true; | 1507 return true; |
| 1508 } | 1508 } |
| 1509 return false; | 1509 return false; |
| 1510 } | 1510 } |
| 1511 | 1511 |
| 1512 void HTMLInputElement::setListAttributeTargetObserver(PassOwnPtrWillBeRawPtr<Lis
tAttributeTargetObserver> newObserver) | 1512 void HTMLInputElement::setListAttributeTargetObserver(PassOwnPtrWillBeRawPtr<Lis
tAttributeTargetObserver> newObserver) |
| 1513 { | 1513 { |
| 1514 if (m_listAttributeTargetObserver) | 1514 if (m_listAttributeTargetObserver) |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1829 } else { | 1829 } else { |
| 1830 parameters.step = 1.0; | 1830 parameters.step = 1.0; |
| 1831 parameters.stepBase = 0; | 1831 parameters.stepBase = 0; |
| 1832 } | 1832 } |
| 1833 | 1833 |
| 1834 parameters.anchorRectInRootView = document().view()->contentsToRootView(pixe
lSnappedBoundingBox()); | 1834 parameters.anchorRectInRootView = document().view()->contentsToRootView(pixe
lSnappedBoundingBox()); |
| 1835 parameters.currentValue = value(); | 1835 parameters.currentValue = value(); |
| 1836 parameters.doubleValue = m_inputType->valueAsDouble(); | 1836 parameters.doubleValue = m_inputType->valueAsDouble(); |
| 1837 parameters.isAnchorElementRTL = computedStyle()->direction() == RTL; | 1837 parameters.isAnchorElementRTL = computedStyle()->direction() == RTL; |
| 1838 if (HTMLDataListElement* dataList = this->dataList()) { | 1838 if (HTMLDataListElement* dataList = this->dataList()) { |
| 1839 RefPtr<HTMLCollection> options = dataList->options(); | 1839 RefPtrWillBeRawPtr<HTMLCollection> options = dataList->options(); |
| 1840 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(opt
ions->item(i)); ++i) { | 1840 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(opt
ions->item(i)); ++i) { |
| 1841 if (!isValidValue(option->value())) | 1841 if (!isValidValue(option->value())) |
| 1842 continue; | 1842 continue; |
| 1843 DateTimeSuggestion suggestion; | 1843 DateTimeSuggestion suggestion; |
| 1844 suggestion.value = m_inputType->parseToNumber(option->value(), Decim
al::nan()).toDouble(); | 1844 suggestion.value = m_inputType->parseToNumber(option->value(), Decim
al::nan()).toDouble(); |
| 1845 if (std::isnan(suggestion.value)) | 1845 if (std::isnan(suggestion.value)) |
| 1846 continue; | 1846 continue; |
| 1847 suggestion.localizedValue = localizeValue(option->value()); | 1847 suggestion.localizedValue = localizeValue(option->value()); |
| 1848 suggestion.label = option->value() == option->label() ? String() : o
ption->label(); | 1848 suggestion.label = option->value() == option->label() ? String() : o
ption->label(); |
| 1849 parameters.suggestions.append(suggestion); | 1849 parameters.suggestions.append(suggestion); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1881 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); | 1881 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); |
| 1882 } | 1882 } |
| 1883 #endif | 1883 #endif |
| 1884 | 1884 |
| 1885 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St
ring& newValue) | 1885 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St
ring& newValue) |
| 1886 { | 1886 { |
| 1887 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue)
; | 1887 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue)
; |
| 1888 } | 1888 } |
| 1889 | 1889 |
| 1890 } // namespace | 1890 } // namespace |
| OLD | NEW |