Files
tubestation/widget/tests/window_bug593307_offscreen.xhtml
Emilio Cobos Álvarez 6cde87d52b Bug 1872997 - Remove "fit to screen" code in cocoa widget. r=mac-reviewers,bradwerth
No other platform does this. This comes from bug 413277, but positioning
windows (in particular popups) partially offscreen is desirable in some
cases (e.g., when drawing non-native shadows).

We have protections in place to prevent content from doing things like
what caused this code to be added.

Remove a cocoa-specific test for this, and tweak another test which has
a dependent window opened from an offscreen window, and the offscreen
window positioning happens right after the load event.

The window ends up on screen even without that tweak.

Differential Revision: https://phabricator.services.mozilla.com/D197903
2024-01-08 19:46:13 +00:00

36 lines
809 B
HTML

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window title="Mozilla Bug 593307"
width="100" height="100"
onload="onLoad();"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js" />
<body xmlns="http://www.w3.org/1999/xhtml" id="body">
</body>
<script class="testbody" type="application/javascript">
<![CDATA[
var centerscreen = null;
var SimpleTest = window.arguments[0];
var finish = window.arguments[1];
function onLoad()
{
setTimeout(() => {
centerscreen = window.openDialog('window_bug593307_centerscreen.xhtml','', 'chrome,centerscreen,dependent,dialog=no');
}, 0);
}
function finished() {
centerscreen.close();
finish();
}
]]>
</script>
</window>