Panel isn't being resized correctly on OS X (off by 2 pixels)

RESOLVED INCOMPLETE

Status

Add-on SDK
General
RESOLVED INCOMPLETE
2 years ago
10 months ago

People

(Reporter: Wladimir Palant, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
In order to reproduce this issue, call panel.resize(200, 200) for a Panel object created via sdk/panel module. Then measure window.innerWidth/window.innerHeight from the document inside the panel. On Windows you will actually get 200 pixels, on OS X it will be 198.

The problem is caused by this line: http://hg.mozilla.org/mozilla-central/file/311c7ea8803d/addon-sdk/source/lib/sdk/panel/utils.js#l246. When resizing, the Add-on SDK sets width and height CSS properties on the <iframe> element (see http://hg.mozilla.org/mozilla-central/file/311c7ea8803d/addon-sdk/source/lib/sdk/panel/utils.js#l105). If that element has a padding (currently only the case on OS X) then the space available to the content will be less than the width/height of the element.
https://bugzilla.mozilla.org/show_bug.cgi?id=1399562
Status: NEW → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.