| 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 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1838 parameters.anchorRectInRootView = document().view()->contentsToRootView(pixe
lSnappedBoundingBox()); | 1838 parameters.anchorRectInRootView = document().view()->contentsToRootView(pixe
lSnappedBoundingBox()); |
| 1839 parameters.currentValue = value(); | 1839 parameters.currentValue = value(); |
| 1840 parameters.doubleValue = m_inputType->valueAsDouble(); | 1840 parameters.doubleValue = m_inputType->valueAsDouble(); |
| 1841 parameters.isAnchorElementRTL = computedStyle()->direction() == RTL; | 1841 parameters.isAnchorElementRTL = computedStyle()->direction() == RTL; |
| 1842 if (RuntimeEnabledFeatures::dataListElementEnabled()) { | 1842 if (RuntimeEnabledFeatures::dataListElementEnabled()) { |
| 1843 if (HTMLDataListElement* dataList = this->dataList()) { | 1843 if (HTMLDataListElement* dataList = this->dataList()) { |
| 1844 RefPtr<HTMLCollection> options = dataList->options(); | 1844 RefPtr<HTMLCollection> options = dataList->options(); |
| 1845 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement
(options->item(i)); ++i) { | 1845 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement
(options->item(i)); ++i) { |
| 1846 if (!isValidValue(option->value())) | 1846 if (!isValidValue(option->value())) |
| 1847 continue; | 1847 continue; |
| 1848 parameters.suggestionValues.append(sanitizeValue(option->value()
)); | 1848 DateTimeSuggestion suggestion; |
| 1849 parameters.localizedSuggestionValues.append(localizeValue(option
->value())); | 1849 suggestion.value = m_inputType->parseToNumber(option->value(), D
ecimal::nan()).toDouble(); |
| 1850 parameters.suggestionLabels.append(option->value() == option->la
bel() ? String() : option->label()); | 1850 if (std::isnan(suggestion.value)) |
| 1851 continue; |
| 1852 suggestion.localizedValue = localizeValue(option->value()); |
| 1853 suggestion.label = option->value() == option->label() ? String()
: option->label(); |
| 1854 parameters.suggestions.append(suggestion); |
| 1851 } | 1855 } |
| 1852 } | 1856 } |
| 1853 } | 1857 } |
| 1854 return true; | 1858 return true; |
| 1855 } | 1859 } |
| 1856 | 1860 |
| 1857 bool HTMLInputElement::supportsInputModeAttribute() const | 1861 bool HTMLInputElement::supportsInputModeAttribute() const |
| 1858 { | 1862 { |
| 1859 return m_inputType->supportsInputModeAttribute(); | 1863 return m_inputType->supportsInputModeAttribute(); |
| 1860 } | 1864 } |
| 1861 | 1865 |
| 1862 bool HTMLInputElement::isInteractiveContent() const | 1866 bool HTMLInputElement::isInteractiveContent() const |
| 1863 { | 1867 { |
| 1864 return m_inputType->isInteractiveContent(); | 1868 return m_inputType->isInteractiveContent(); |
| 1865 } | 1869 } |
| 1866 | 1870 |
| 1867 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 1871 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 1868 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() | 1872 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() |
| 1869 { | 1873 { |
| 1870 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); | 1874 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); |
| 1871 } | 1875 } |
| 1872 #endif | 1876 #endif |
| 1873 | 1877 |
| 1874 } // namespace | 1878 } // namespace |
| OLD | NEW |