Last Comment Bug 699742 - battery.level should be a double
: battery.level should be a double
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla11
Assigned To: Mounir Lamouri (:mounir)
:
Mentors:
Depends on:
Blocks: 678694
  Show dependency treegraph
 
Reported: 2011-11-04 03:13 PDT by Mounir Lamouri (:mounir)
Modified: 2011-11-15 14:46 PST (History)
5 users (show)
mounir: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Part A - Change in DOM code (3.25 KB, patch)
2011-11-07 03:54 PST, Mounir Lamouri (:mounir)
jonas: review+
asa: approval‑mozilla‑aurora-
Details | Diff | Review
Part B - Change in hal code (585 bytes, patch)
2011-11-07 03:54 PST, Mounir Lamouri (:mounir)
cjones.bugs: review+
asa: approval‑mozilla‑aurora-
Details | Diff | Review
Part C - Change in upower backend (1.90 KB, patch)
2011-11-07 03:56 PST, Mounir Lamouri (:mounir)
cjones.bugs: review+
asa: approval‑mozilla‑aurora-
Details | Diff | Review
Part D - Change in android backend (11.63 KB, patch)
2011-11-07 04:03 PST, Mounir Lamouri (:mounir)
cjones.bugs: review+
asa: approval‑mozilla‑aurora-
Details | Diff | Review

Description Mounir Lamouri (:mounir) 2011-11-04 03:13:28 PDT
The specs required a float but a double seems better.
Comment 1 Mounir Lamouri (:mounir) 2011-11-07 03:54:16 PST
Created attachment 572421 [details] [diff] [review]
Part A - Change in DOM code
Comment 2 Mounir Lamouri (:mounir) 2011-11-07 03:54:51 PST
Created attachment 572422 [details] [diff] [review]
Part B - Change in hal code
Comment 3 Mounir Lamouri (:mounir) 2011-11-07 03:56:15 PST
Created attachment 572423 [details] [diff] [review]
Part C - Change in upower backend
Comment 4 Mounir Lamouri (:mounir) 2011-11-07 04:03:34 PST
Created attachment 572425 [details] [diff] [review]
Part D - Change in android backend

It happens that Android backend level always has 2 digits after the comma (with my phone) but it's better to use a double given that it doesn't cost a lot and some Android versions/implementations might have a more precise value.
Comment 5 Jonas Sicking (:sicking) PTO Until July 5th 2011-11-07 12:25:33 PST
Comment on attachment 572421 [details] [diff] [review]
Part A - Change in DOM code

Review of attachment 572421 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Comment 6 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2011-11-07 20:23:32 PST
(In reply to Mounir Lamouri (:volkmar) (:mounir) from comment #0)
> The specs required a float but a double seems better.

Why is that?  So that it fits the natural JS value representation?
Comment 7 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2011-11-07 20:24:36 PST
The code all looks fine.
Comment 8 Mounir Lamouri (:mounir) 2011-11-08 00:52:46 PST
(In reply to Chris Jones [:cjones] [:warhammer] from comment #6)
> (In reply to Mounir Lamouri (:volkmar) (:mounir) from comment #0)
> > The specs required a float but a double seems better.
> 
> Why is that?  So that it fits the natural JS value representation?

Yes.
Comment 9 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2011-11-08 01:46:22 PST
OK.
Comment 10 Mounir Lamouri (:mounir) 2011-11-09 06:23:34 PST
Comment on attachment 572421 [details] [diff] [review]
Part A - Change in DOM code

This has just landed in mozilla-inbound. Requesting aurora approval for API completeness in Firefox 10. It would be better to ship Firefox 10 with the entire API if we say it is present. The risk is very low given that there is no use of the API for the moment.
Comment 12 Asa Dotzler [:asa] 2011-11-15 14:46:05 PST
Comment on attachment 572421 [details] [diff] [review]
Part A - Change in DOM code

It looks like this feature wasn't ready for 10. Please re-nominate if you have a good justification for trying to get this into 10 rather than just waiting for 11.

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