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

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: 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
« no previous file with comments | « no previous file | Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 if (stepRange.hasStep()) { 1830 if (stepRange.hasStep()) {
1831 parameters.step = stepRange.step().toDouble(); 1831 parameters.step = stepRange.step().toDouble();
1832 parameters.stepBase = stepRange.stepBase().toDouble(); 1832 parameters.stepBase = stepRange.stepBase().toDouble();
1833 } else { 1833 } else {
1834 parameters.step = 1.0; 1834 parameters.step = 1.0;
1835 parameters.stepBase = 0; 1835 parameters.stepBase = 0;
1836 } 1836 }
1837 1837
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.isAnchorElementRTL = computedStyle()->direction() == RTL; 1841 parameters.isAnchorElementRTL = computedStyle()->direction() == RTL;
1841 if (RuntimeEnabledFeatures::dataListElementEnabled()) { 1842 if (RuntimeEnabledFeatures::dataListElementEnabled()) {
1842 if (HTMLDataListElement* dataList = this->dataList()) { 1843 if (HTMLDataListElement* dataList = this->dataList()) {
1843 RefPtr<HTMLCollection> options = dataList->options(); 1844 RefPtr<HTMLCollection> options = dataList->options();
1844 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement (options->item(i)); ++i) { 1845 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement (options->item(i)); ++i) {
1845 if (!isValidValue(option->value())) 1846 if (!isValidValue(option->value()))
1846 continue; 1847 continue;
1847 parameters.suggestionValues.append(sanitizeValue(option->value() )); 1848 parameters.suggestionValues.append(sanitizeValue(option->value() ));
1848 parameters.localizedSuggestionValues.append(localizeValue(option ->value())); 1849 parameters.localizedSuggestionValues.append(localizeValue(option ->value()));
1849 parameters.suggestionLabels.append(option->value() == option->la bel() ? String() : option->label()); 1850 parameters.suggestionLabels.append(option->value() == option->la bel() ? String() : option->label());
(...skipping 14 matching lines...) Expand all
1864 } 1865 }
1865 1866
1866 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 1867 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1867 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1868 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1868 { 1869 {
1869 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); 1870 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer());
1870 } 1871 }
1871 #endif 1872 #endif
1872 1873
1873 } // namespace 1874 } // namespace
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698