Last Comment Bug 771385 - Use more heavily NS_floorModolu instead of fmod() in nsHTMLInputElement
: Use more heavily NS_floorModolu instead of fmod() in nsHTMLInputElement
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: Mounir Lamouri (:mounir)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-05 16:58 PDT by Mounir Lamouri (:mounir)
Modified: 2012-07-07 12:04 PDT (History)
1 user (show)
mounir: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (1.76 KB, patch)
2012-07-06 03:20 PDT, Mounir Lamouri (:mounir)
no flags Details | Diff | Splinter Review
Patch (7.78 KB, patch)
2012-07-06 03:33 PDT, Mounir Lamouri (:mounir)
bugs: review+
Details | Diff | Splinter Review

Description Mounir Lamouri (:mounir) 2012-07-05 16:58:59 PDT

    
Comment 1 Mounir Lamouri (:mounir) 2012-07-06 03:20:09 PDT
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.
Comment 2 Mounir Lamouri (:mounir) 2012-07-06 03:25:48 PDT
(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.
Comment 3 Mounir Lamouri (:mounir) 2012-07-06 03:33:31 PDT
Created attachment 639616 [details] [diff] [review]
Patch

With tests.
Comment 4 Ryan VanderMeulen [:RyanVM] 2012-07-07 12:04:04 PDT
https://hg.mozilla.org/mozilla-central/rev/85a06a22095b

Note You need to log in before you can comment on or make changes to this bug.