Chromium Code Reviews| 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(), - 1).toDouble(); |
|
tkent
2013/11/26 13:34:35
Why -1?
If option->value() is invalid, shouldn't w
keishi
2013/11/27 07:30:57
Done.
| |
| 1850 parameters.suggestionLabels.append(option->value() == option->la bel() ? String() : option->label()); | 1850 suggestion.localizedValue = localizeValue(option->value()); |
| 1851 suggestion.label = option->value() == option->label() ? String() : option->label(); | |
| 1852 parameters.suggestions.append(suggestion); | |
| 1851 } | 1853 } |
| 1852 } | 1854 } |
| 1853 } | 1855 } |
| 1854 return true; | 1856 return true; |
| 1855 } | 1857 } |
| 1856 | 1858 |
| 1857 bool HTMLInputElement::supportsInputModeAttribute() const | 1859 bool HTMLInputElement::supportsInputModeAttribute() const |
| 1858 { | 1860 { |
| 1859 return m_inputType->supportsInputModeAttribute(); | 1861 return m_inputType->supportsInputModeAttribute(); |
| 1860 } | 1862 } |
| 1861 | 1863 |
| 1862 bool HTMLInputElement::isInteractiveContent() const | 1864 bool HTMLInputElement::isInteractiveContent() const |
| 1863 { | 1865 { |
| 1864 return m_inputType->isInteractiveContent(); | 1866 return m_inputType->isInteractiveContent(); |
| 1865 } | 1867 } |
| 1866 | 1868 |
| 1867 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 1869 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 1868 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() | 1870 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() |
| 1869 { | 1871 { |
| 1870 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); | 1872 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); |
| 1871 } | 1873 } |
| 1872 #endif | 1874 #endif |
| 1873 | 1875 |
| 1874 } // namespace | 1876 } // namespace |
| OLD | NEW |