Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: Source/core/html/HTMLInputElement.cpp

Issue 62083004: Transfer date/time value to the chooser as a double (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@datetime3
Patch Set: Added test Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 if (stepRange.hasStep()) { 1824 if (stepRange.hasStep()) {
1825 parameters.step = stepRange.step().toDouble(); 1825 parameters.step = stepRange.step().toDouble();
1826 parameters.stepBase = stepRange.stepBase().toDouble(); 1826 parameters.stepBase = stepRange.stepBase().toDouble();
1827 } else { 1827 } else {
1828 parameters.step = 1.0; 1828 parameters.step = 1.0;
1829 parameters.stepBase = 0; 1829 parameters.stepBase = 0;
1830 } 1830 }
1831 1831
1832 parameters.anchorRectInRootView = document().view()->contentsToRootView(pixe lSnappedBoundingBox()); 1832 parameters.anchorRectInRootView = document().view()->contentsToRootView(pixe lSnappedBoundingBox());
1833 parameters.currentValue = value(); 1833 parameters.currentValue = value();
1834 parameters.doubleValue = m_inputType->valueAsDouble();
1834 parameters.isAnchorElementRTL = computedStyle()->direction() == RTL; 1835 parameters.isAnchorElementRTL = computedStyle()->direction() == RTL;
1835 if (RuntimeEnabledFeatures::dataListElementEnabled()) { 1836 if (RuntimeEnabledFeatures::dataListElementEnabled()) {
1836 if (HTMLDataListElement* dataList = this->dataList()) { 1837 if (HTMLDataListElement* dataList = this->dataList()) {
1837 RefPtr<HTMLCollection> options = dataList->options(); 1838 RefPtr<HTMLCollection> options = dataList->options();
1838 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement (options->item(i)); ++i) { 1839 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement (options->item(i)); ++i) {
1839 if (!isValidValue(option->value())) 1840 if (!isValidValue(option->value()))
1840 continue; 1841 continue;
1841 parameters.suggestionValues.append(sanitizeValue(option->value() )); 1842 parameters.suggestionValues.append(sanitizeValue(option->value() ));
1842 parameters.localizedSuggestionValues.append(localizeValue(option ->value())); 1843 parameters.localizedSuggestionValues.append(localizeValue(option ->value()));
1843 parameters.suggestionLabels.append(option->value() == option->la bel() ? String() : option->label()); 1844 parameters.suggestionLabels.append(option->value() == option->la bel() ? String() : option->label());
(...skipping 14 matching lines...) Expand all
1858 } 1859 }
1859 1860
1860 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 1861 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1861 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1862 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1862 { 1863 {
1863 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); 1864 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer());
1864 } 1865 }
1865 #endif 1866 #endif
1866 1867
1867 } // namespace 1868 } // namespace
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h » ('j') | Source/web/tests/WebViewTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698