Closed Bug 933539 Opened 12 years ago Closed 12 years ago

Use parseFloat instead of parseInt for the titlebar calculations in browser.js

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 28

People

(Reporter: jaws, Assigned: sunu)

References

Details

(Whiteboard: [Australis:M9][Australis:P-][good-first-bug][mentor=gijs][lang=js][qa-])

Attachments

(1 file, 1 obsolete file)

The styles that are being read for the titlebar calculations in browser.js have the potential to be defined as real numbers, so we should use parseFloat instead of parseInt to read back the computed styles. To fix this bug, you'll need to clone the UX branch which is located at https://hg.mozilla.org/projects/ux. The file in question is located at browser/base/content/browser.js and you'll want to look at the lines around http://mxr.mozilla.org/projects-central/source/ux/browser/base/content/browser.js#4307
Blocks: 851652
No longer blocks: australis
I want to work on this one. Please assign it to me.
(In reply to Tarashish Mishra from comment #1) > I want to work on this one. Please assign it to me. All yours!
Assignee: nobody → sunu0000
Status: NEW → ASSIGNED
Attached patch name.patch (obsolete) — Splinter Review
Hi! I have attached a patch. Don't know if that's all I have to do for this bug. Please have a look and let me know if I need to fix anything else.
Attachment #825893 - Flags: review?(jaws)
Comment on attachment 825893 [details] [diff] [review] name.patch Review of attachment 825893 [details] [diff] [review]: ----------------------------------------------------------------- Sorry, but this is not enough. You'll need to adjust all the lines in this function that use parseInt to read style values to use parseFloat.
Attachment #825893 - Flags: review?(jaws) → review-
Attached patch second.patchSplinter Review
Thanks for the feedback. I have updated the patch. Please have a look.
Attachment #825893 - Attachment is obsolete: true
Attachment #825895 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 825895 [details] [diff] [review] second.patch Review of attachment 825895 [details] [diff] [review]: ----------------------------------------------------------------- r=me without the bits in the gFormSubmitObserver, which shouldn't be changed. I did say "in this function"... Anyway, I'll land this with the nits fixed. ::: browser/base/content/browser.js @@ +721,5 @@ > let utils = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor) > .getInterface(Components.interfaces.nsIDOMWindowUtils); > > if (style.direction == 'rtl') { > + offset = parseFloat(style.paddingRight) + parseFloat(style.borderRightWidth); These two lines are in a different function, so we should probably leave them alone.
Attachment #825895 - Flags: review?(gijskruitbosch+bugs) → review+
Thanks :)
Whiteboard: [Australis:M?][Australis:P-][good-first-bug][mentor=jaws][lang=js] → [Australis:M9][Australis:P-][good-first-bug][mentor=gijs][lang=js][fixed-in-ux]
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M9][Australis:P-][good-first-bug][mentor=gijs][lang=js][fixed-in-ux] → [Australis:M9][Australis:P-][good-first-bug][mentor=gijs][lang=js]
Target Milestone: --- → Firefox 28
Whiteboard: [Australis:M9][Australis:P-][good-first-bug][mentor=gijs][lang=js] → [Australis:M9][Australis:P-][good-first-bug][mentor=gijs][lang=js][qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: