mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 19e0922d6d0c (bug 1044597) for browser_subdialogs.js failures.
CLOSED TREE
This commit is contained in:
parent
c897c21f60
commit
1c2c66b282
@ -98,8 +98,6 @@ let gSubDialog = {
|
|||||||
// Clear the sizing attributes
|
// Clear the sizing attributes
|
||||||
this._box.removeAttribute("width");
|
this._box.removeAttribute("width");
|
||||||
this._box.removeAttribute("height");
|
this._box.removeAttribute("height");
|
||||||
this._box.style.removeProperty("min-height");
|
|
||||||
this._box.style.removeProperty("min-width");
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// Unload the dialog after the event listeners run so that the load of about:blank isn't
|
// Unload the dialog after the event listeners run so that the load of about:blank isn't
|
||||||
@ -152,22 +150,12 @@ let gSubDialog = {
|
|||||||
// Do this on load to wait for the CSS to load and apply before calculating the size.
|
// Do this on load to wait for the CSS to load and apply before calculating the size.
|
||||||
let docEl = this._frame.contentDocument.documentElement;
|
let docEl = this._frame.contentDocument.documentElement;
|
||||||
|
|
||||||
let groupBoxTitle = document.getAnonymousElementByAttribute(this._box, "class", "groupbox-title");
|
// padding-bottom doesn't seem to be included in the scrollHeight of the document element in XUL
|
||||||
let groupBoxTitleHeight = groupBoxTitle.clientHeight +
|
// so add it ourselves.
|
||||||
parseFloat(getComputedStyle(groupBoxTitle).borderBottomWidth);
|
let paddingBottom = parseFloat(this._frame.contentWindow.getComputedStyle(docEl).paddingBottom);
|
||||||
|
|
||||||
let groupBoxBody = document.getAnonymousElementByAttribute(this._box, "class", "groupbox-body");
|
this._frame.style.width = docEl.style.width || docEl.scrollWidth + "px";
|
||||||
let boxVerticalPadding = 2 * parseFloat(getComputedStyle(groupBoxBody).paddingTop);
|
this._frame.style.height = docEl.style.height || (docEl.scrollHeight + paddingBottom) + "px";
|
||||||
let boxHorizontalPadding = 2 * parseFloat(getComputedStyle(groupBoxBody).paddingLeft);
|
|
||||||
let frameWidth = docEl.scrollWidth;
|
|
||||||
let frameHeight = docEl.scrollHeight;
|
|
||||||
let boxVerticalBorder = 2 * parseFloat(getComputedStyle(this._box).borderTopWidth);
|
|
||||||
let boxHorizontalBorder = 2 * parseFloat(getComputedStyle(this._box).borderLeftWidth);
|
|
||||||
|
|
||||||
this._frame.style.width = frameWidth + "px";
|
|
||||||
this._frame.style.height = frameHeight + "px";
|
|
||||||
this._box.style.minHeight = (boxVerticalBorder + groupBoxTitleHeight + boxVerticalPadding + frameHeight) + "px";
|
|
||||||
this._box.style.minWidth = (boxHorizontalBorder + boxHorizontalPadding + frameWidth) + "px";
|
|
||||||
|
|
||||||
this._overlay.style.visibility = "visible";
|
this._overlay.style.visibility = "visible";
|
||||||
this._frame.focus();
|
this._frame.focus();
|
||||||
|
@ -157,8 +157,8 @@ let gTests = [{
|
|||||||
(aEvent) => dialogClosingCallback(deferredClose, aEvent));
|
(aEvent) => dialogClosingCallback(deferredClose, aEvent));
|
||||||
let dialog = yield dialogPromise;
|
let dialog = yield dialogPromise;
|
||||||
|
|
||||||
ise(content.gSubDialog._frame.style.width, "528px", "Width should be set on the frame from the dialog");
|
ise(content.gSubDialog._frame.style.width, "32em", "Width should be set on the frame from the dialog");
|
||||||
ise(content.gSubDialog._frame.style.height, "280px", "Height should be set on the frame from the dialog");
|
ise(content.gSubDialog._frame.style.height, "40em", "Height should be set on the frame from the dialog");
|
||||||
|
|
||||||
content.gSubDialog.close();
|
content.gSubDialog.close();
|
||||||
yield deferredClose.promise;
|
yield deferredClose.promise;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<dialog id="subDialog"
|
<dialog id="subDialog"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
title="Sample sub-dialog" style="width: 528px; height: 280px;"
|
title="Sample sub-dialog" style="width: 32em; height: 40em;"
|
||||||
onload="document.getElementById('textbox').focus();"
|
onload="document.getElementById('textbox').focus();"
|
||||||
ondialogaccept="acceptSubdialog();">
|
ondialogaccept="acceptSubdialog();">
|
||||||
<script>
|
<script>
|
||||||
|
Loading…
Reference in New Issue
Block a user