Open Bug 672118 Opened 14 years ago Updated 2 years ago

panel width/height chrome measurement

Categories

(Core :: Layout, defect)

5 Branch
x86_64
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: bugzilla, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0 Build ID: 20110615151330 Steps to reproduce: Created a <panel> with style="width: 500px; height: 300px;" Actual results: Panel was created with boxObject.width = 500, boxObject.height = 306, clientWidth = 494, clientHeight = 300 Expected results: Panel created with boxObject.width = 506, boxObject.height = 306, clientWidth = 500, clientHeight = 300 Inconsistent offset between width/height. Unsure if boxObject.width/height should be 500/300 or if clientWidth/Height should be 500/300 but they should be consistent between them. The width is not taking into account (the chrome? or margin?) while the height is.
Do you have a testcase that shows this? When I try this, I get 500,300 for the boxObject size and 494,294 for the clientWidth/clientHeight. (The former includes the border, while the latter does not)
I don't have a test case built but I'll check over my own code and make sure I'm not flubbing it up somewhere then.
I've confirmed I'm not doing anything funky. I am setting the width/height via a style attribute and it's coming out wonky: <panel class="pkXulWindow" noautohide="true" noautofocus="true" style="width: 500px; height: 300px;"> </panel> boxObject.width = 306 boxObject.height = 500 .clientWidth: 494 .clientHeight: 300 I've confirmed that this also occurs if: - I set width/height by properties (elem.width = 500); - I set via .setAttribute() - I set via .sizeTo(500, 300) I'll try and get a simplified test case together. What is the typical test case that you'd need for this, a fully packaged extension?
Had these wrong: boxObject.width = 500 boxObject.height = 306 .clientWidth: 494 .clientHeight: 300
OS: Other → Windows 7
Hardware: All → x86_64
Just a xul file is best. Can you describe if you have any special os appearance/theme settings?
I'm not sure how I'd build just a xul file, just a lowly FF plugin developer. :( I'm running Windows 7 64 bit in an otherwise empty FF profile. Only plugins installed are Firebug, Chromebug and my plugin.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.