Bug 1035629 - Convert most Privacy pane dialogs to be in-content. r=MattN

This commit is contained in:
Richard Marti 2014-08-04 18:58:13 -07:00
Родитель 5b730a4079
Коммит b7b994aa3b
2 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -469,9 +469,8 @@ var gPrivacyPane = {
permissionType : "cookie",
windowTitle : bundlePreferences.getString("cookiepermissionstitle"),
introText : bundlePreferences.getString("cookiepermissionstext") };
openDialog("chrome://browser/content/preferences/permissions.xul",
"Browser:Permissions",
"modal=yes", params);
gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
null, params);
},
/**
@ -479,9 +478,7 @@ var gPrivacyPane = {
*/
showCookies: function (aCategory)
{
openDialog("chrome://browser/content/preferences/cookies.xul",
"Browser:Cookies",
"modal=yes", null);
gSubDialog.open("chrome://browser/content/preferences/cookies.xul");
},
// CLEAR PRIVATE DATA
@ -499,8 +496,7 @@ var gPrivacyPane = {
*/
showClearPrivateDataSettings: function ()
{
openDialog("chrome://browser/content/preferences/sanitize.xul",
"modal=yes", null);
gSubDialog.open("chrome://browser/content/preferences/sanitize.xul");
},

Просмотреть файл

@ -134,8 +134,13 @@ let gSubDialog = {
// Do this on load to wait for the CSS to load and apply before calculating the size.
let docEl = this._frame.contentDocument.documentElement;
// padding-bottom doesn't seem to be included in the scrollHeight of the document element in XUL
// so add it ourselves.
let paddingBottom = parseFloat(this._frame.contentWindow.getComputedStyle(docEl).paddingBottom);
this._frame.style.width = docEl.style.width || docEl.scrollWidth + "px";
this._frame.style.height = docEl.style.height || docEl.scrollHeight + "px";
this._frame.style.height = docEl.style.height || (docEl.scrollHeight + paddingBottom) + "px";
this._overlay.style.visibility = "visible";
this._frame.focus();