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)
Firefox
General
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)
4.89 KB,
patch
|
Gijs
:
review+
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•12 years ago
|
||
I want to work on this one. Please assign it to me.
Comment 2•12 years ago
|
||
(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
Assignee | ||
Comment 3•12 years ago
|
||
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 4•12 years ago
|
||
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-
Assignee | ||
Comment 5•12 years ago
|
||
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 6•12 years ago
|
||
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+
Assignee | ||
Comment 7•12 years ago
|
||
Thanks :)
Comment 8•12 years ago
|
||
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]
Comment 9•12 years ago
|
||
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
Updated•12 years ago
|
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.
Description
•