Closed Bug 771385 Opened 9 years ago Closed 9 years ago

Use more heavily NS_floorModolu instead of fmod() in nsHTMLInputElement

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: mounir, Assigned: mounir)

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Summary: Use more heavily NS_flooredModolu instead of fmod() in nsHTMLInputElement → Use more heavily NS_floorModolu instead of fmod() in nsHTMLInputElement
Attached patch Patch (obsolete) — Splinter Review
Simple patch. Given that |value - stepBase| is < 0 only when value > stepBase, which means value > min, or value > 0 (if no min), these changes shouldn't affect in any case the behaviour of the code. However, better to use the mathematically correct method.
Attachment #639615 - Flags: review?(bugs)
(In reply to Mounir Lamouri (:mounir) from comment #1)
> Created attachment 639615 [details] [diff] [review]
> Patch
> 
> Simple patch. Given that |value - stepBase| is < 0 only when value >
> stepBase, which means value > min, or value > 0 (if no min), these changes
> shouldn't affect in any case the behaviour of the code. However, better to
> use the mathematically correct method.

Oups, I meant value < min or value < 0. Which means there is one case where that had an impact. Will update the patch is a test.
Attached patch PatchSplinter Review
With tests.
Attachment #639615 - Attachment is obsolete: true
Attachment #639615 - Flags: review?(bugs)
Attachment #639616 - Flags: review?(bugs)
Attachment #639616 - Flags: review?(bugs) → review+
Flags: in-testsuite+
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/85a06a22095b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.