Use more heavily NS_floorModolu instead of fmod() in nsHTMLInputElement

RESOLVED FIXED in mozilla16

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

Trunk
mozilla16
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
(Assignee)

Updated

5 years ago
Summary: Use more heavily NS_flooredModolu instead of fmod() in nsHTMLInputElement → Use more heavily NS_floorModolu instead of fmod() in nsHTMLInputElement
(Assignee)

Comment 1

5 years ago
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.
Attachment #639615 - Flags: review?(bugs)
(Assignee)

Comment 2

5 years ago
(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.
(Assignee)

Comment 3

5 years ago
Created attachment 639616 [details] [diff] [review]
Patch

With tests.
Attachment #639615 - Attachment is obsolete: true
Attachment #639615 - Flags: review?(bugs)
Attachment #639616 - Flags: review?(bugs)

Updated

5 years ago
Attachment #639616 - Flags: review?(bugs) → review+
(Assignee)

Updated

5 years ago
Flags: in-testsuite+
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/85a06a22095b
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.