mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 310900: Avoid 1-pixel gap caused by sizeToContent() in alerts service code, patch by Jens Bannmann <jens.b@web.de>, r=mscott for toolkit part, r+sr=neil for xpfe
This commit is contained in:
parent
28977a8df1
commit
6670dd2a7d
@ -83,8 +83,14 @@ function onAlertLoad()
|
||||
|
||||
sizeToContent();
|
||||
|
||||
// work around a bug where sizeToContent() leaves a border outside of the content
|
||||
var contentDim = document.getElementById("alertBox").boxObject;
|
||||
if (window.innerWidth == contentDim.width + 1)
|
||||
--window.innerWidth;
|
||||
|
||||
gFinalHeight = window.outerHeight;
|
||||
|
||||
// start with a 1px height, because 0 causes trouble with gtk1/2
|
||||
window.outerHeight = 1;
|
||||
|
||||
// be sure to offset the alert by 10 pixels from the far right edge of the screen
|
||||
|
@ -85,7 +85,8 @@ function onAlertLoad()
|
||||
|
||||
// work around a bug where sizeToContent() leaves a border outside of the content
|
||||
var contentDim = document.getElementById("alertBox").boxObject;
|
||||
window.resizeTo(contentDim.width, contentDim.height);
|
||||
if (window.innerWidth == contentDim.width + 1)
|
||||
--window.innerWidth;
|
||||
|
||||
gFinalHeight = window.outerHeight;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user