Closed
Bug 987443
Opened 10 years ago
Closed 10 years ago
Rounding error of Zoom Widget %label
Categories
(Firefox :: Toolbars and Customization, defect)
Tracking
()
RESOLVED
FIXED
Firefox 31
People
(Reporter: alice0775, Assigned: mikedeboer)
References
(Blocks 1 open bug)
Details
(Whiteboard: [qa-])
Attachments
(1 file)
1.52 KB,
patch
|
Gijs
:
review+
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Steps To Reproduce. 1. Preparation set devtools.chrome.enabled = true in about:config Open Scratchpad (Shift+F4) Check Environment > Browser 2. Open any web page 3. Paste following code to Scratchpad and run ZoomManager.setZoomForBrowser(gBrowser.selectedBrowser , 0.95); FullZoom._applyZoomToPref(gBrowser.selectedBrowser); 4. Observe %lebel of Zoom Widget Actual Results 94% Expected Results: 95%
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → mdeboer
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•10 years ago
|
||
Using the zoom +/- buttons I get the following values for `window.ZoomManager.zoom`: zoom value: 1 zoom value: 0.949999988079071 zoom value: 1 zoom value: 0.8999999761581421 zoom value: 0.800000011920929 zoom value: 0.6700000166893005 zoom value: 0.5 zoom value: 0.30000001192092896 zoom value: 1 zoom value: 1.100000023841858 zoom value: 1.2000000476837158 zoom value: 1.3300000429153442 zoom value: 1.5 zoom value: 1.7000000476837158 zoom value: 2 zoom value: 1 zoom value: 1 This is on OSX, retina. The `0.949999988079071` value is what I get when using Alice's STR. This lead to the following patch.
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8396286 -
Flags: review?(gijskruitbosch+bugs)
Comment 3•10 years ago
|
||
Comment on attachment 8396286 [details] [diff] [review] Patch v1: fix zoom button label rounding Review of attachment 8396286 [details] [diff] [review]: ----------------------------------------------------------------- Math in JS is hard. :-(
Attachment #8396286 -
Flags: review?(gijskruitbosch+bugs) → review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/aa558a14a770
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 5•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/aa558a14a770
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 31
Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8396286 [details] [diff] [review] Patch v1: fix zoom button label rounding [Approval Request Comment] Bug caused by (feature/regressing bug #): Australis User impact if declined: User might see an invalid zoom percentage for non-default zoom levels. It's rare, but theoretically possible. Testing completed (on m-c, etc.): landed on m-c. Risk to taking this patch (and alternatives if risky): minor. String or IDL/UUID changes made by this patch: n/a
Attachment #8396286 -
Flags: approval-mozilla-beta?
Attachment #8396286 -
Flags: approval-mozilla-aurora?
Updated•10 years ago
|
Attachment #8396286 -
Flags: approval-mozilla-beta?
Attachment #8396286 -
Flags: approval-mozilla-beta+
Attachment #8396286 -
Flags: approval-mozilla-aurora?
Attachment #8396286 -
Flags: approval-mozilla-aurora+
Comment 9•10 years ago
|
||
I don't think this is worth writing and running a testcase for.
Flags: in-testsuite? → in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•