Closed Bug 1099061 Opened 10 years ago Closed 10 years ago

NodeInfobar shows different dimensions than "Box Model"

Categories

(DevTools :: Inspector, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 37

People

(Reporter: elbart, Assigned: kstrecker, Mentored)

References

Details

(Whiteboard: [good first bug][lang=js])

Attachments

(2 files)

Attached image dimensions.png
Testcase: https://bug1064775.bugzilla.mozilla.org/attachment.cgi?id=8487618

"Box Model" says 404x31, hover says 404x32.
The box model sidebar gets the content width/height from: http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js#569
The infobar gets it from: http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/highlighter.js#1162

So one rounds the values, the other ceils them.
Whiteboard: [good first bug][lang=js]
Blocks: 718250
Because pixels can be fractional we should always use Math.Ceil() e.g. 0.3px will be rendered as 1px.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hi,

can i work on this bug please?
(In reply to Kai Strecker [:kstrecker] from comment #3)
> Hi,
> 
> can i work on this bug please?

Sure, I will assign it to you.

If you have any questions then you can ask in this bug or ping me in #devtools on irc.mozilla.org
Assignee: nobody → do6kai
Attached patch 1099061.patchSplinter Review
So, here is the patch. I hope that it is okay.
Thanks Kai! You'll want to follow the instructions at https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch#Getting_the_patch_reviewed to make sure your changes get reviewed :)
Flags: needinfo?(do6kai)
Flags: needinfo?(do6kai)
Attachment #8526884 - Flags: review?(mratcliffe)
Comment on attachment 8526884 [details] [diff] [review]
1099061.patch

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

Assuming that this fixes the problem then an easy r+.

Would you like me to land this?
Attachment #8526884 - Flags: review?(mratcliffe) → review+
(In reply to Michael Ratcliffe [:miker] [:mratcliffe] from comment #7)

> Assuming that this fixes the problem then an easy r+.
Thank you for the review.

> Would you like me to land this?
Yes, this would be great. Thanks. :)
https://hg.mozilla.org/integration/fx-team/rev/28be6b157ca4

Thanks for the patch, Kai! One request - for the future, we typically ask that the commit message be summarizing what the patch is doing rather than restating the problem it's fixing. Thanks!
https://developer.mozilla.org/en-US/docs/Developer_Guide/Committing_Rules_and_Responsibilities#Checkin_comment
Keywords: checkin-needed
Whiteboard: [good first bug][lang=js] → [good first bug][lang=js][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/28be6b157ca4
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [good first bug][lang=js][fixed-in-fx-team] → [good first bug][lang=js]
Target Milestone: --- → Firefox 37
QA Whiteboard: [good first verify]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: