Closed
Bug 813936
Opened 13 years ago
Closed 13 years ago
Update nsHTMLInputElement::GetStepBase() to return the default value if there is no min
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: mounir, Assigned: mounir)
Details
(Keywords: doc-bug-filed)
Attachments
(1 file)
13.11 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
See http://html5.org/tools/web-apps-tracker?from=7516&to=7517
It makes this valid:
<input type='number' value='1' step='2'>
otherwise, '1' wouldn't be a valid value because the step base is 0 and all pair values would have been allowed. The developer would have had to set @min to an odd number to have the expected behaviour.
Assignee | ||
Comment 1•13 years ago
|
||
More work with the tests than the patch :'(
Comment 2•13 years ago
|
||
(In reply to Mounir Lamouri (:mounir) from comment #1)
> More work with the tests than the patch :'(
Isn't that the norm.
Comment 3•13 years ago
|
||
Comment on attachment 684739 [details] [diff] [review]
Patch
> nsHTMLInputElement::GetStepBase() const
> {
> double stepBase = GetMinAsDouble();
>
>+ // If @min is not a double, we should use defaultValue.
>+ if (MOZ_DOUBLE_IS_NaN(stepBase)) {
>+ nsAutoString stringValue;
>+ nsresult ec;
>+
>+ GetAttr(kNameSpaceID_None, nsGkAtoms::value, stringValue);
>+ stepBase = stringValue.ToDouble(&ec);
nsresult ec; should be right before
stepBase = stringValue.ToDouble(&ec)
>-var input = document.createElement("input");
>-document.getElementById('content').appendChild(input);
>+function getFreshElement(data) {
>+ var elmt = document.createElement('input');
>+ elmt.type = data[0];
>+ return elmt;
>+}
This is somewhat odd. Don't pass array to this function, but just type.
Attachment #684739 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Flags: in-testsuite+
Target Milestone: --- → mozilla20
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 6•12 years ago
|
||
See bug 866457 #c1 for documentation.
Keywords: dev-doc-needed → doc-bug-filed
You need to log in
before you can comment on or make changes to this bug.
Description
•