Bug 1815255 - Fix tests to deal with flexbox emulation. r=Jamie,Gijs

Mostly changing XUL attributes to CSS properties, though there are a few
tricky ones:

 * test_offsets.xhtml expects the scroller to be full-width, while
   modern flexbox would honor width: 200px (so just remove it).

 * window_intrinsic_size.xhtml was relying on the div imposing a XUL
   min-size (the test is for SetSizeConstraints, bug 1447056). Use
   min-height instead as that's what modern flexbox reads. Confirmed
   that bug doesn't regress in any case.

 * object-fit-contain-png-001.xhtml has a float: left which had no
   effect on -moz-box, but which assert with modern layout[1]. In the
   future I think we could remove that assert but anyways, for now just
   keeping behavior.

 * image-size.xhtml has a couple uninvestigated sizing differences. They
   didn't seem problematic.

 * 579323-1-ref.html changes because the other file has a canvas with
   width=100 height=100 which imposes an aspect ratio (which XUL never
   honored).

 * window_largemenu.xhtml shows a regression, but this never worked on
   some platforms (at least Linux+Wayland) and nobody has noticed it in
   the browser area, so I suspect we're fine.

[1]: https://searchfox.org/mozilla-central/rev/08362489086b10de96e7a199b267ea5504c01583/layout/generic/ReflowInput.cpp#2137

Differential Revision: https://phabricator.services.mozilla.com/D169084
This commit is contained in:
Emilio Cobos Álvarez 2023-02-09 00:55:13 +00:00
Родитель f1091f8e6c
Коммит 656f11b2a0
55 изменённых файлов: 191 добавлений и 187 удалений

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

@ -53,7 +53,7 @@
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"Mozilla Foundation", "http://www.mozilla.org/", 2, 3, true,
false, true);
testStates(labelWithValueAcc, STATE_LINKED, EXT_STATE_HORIZONTAL);
testStates(labelWithValueAcc, STATE_LINKED, 0);
var normalLabelAcc = getAccessible("normalLabel");
testRole(normalLabelAcc, ROLE_LABEL);

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

@ -32,8 +32,8 @@
is(type == "chrome" || type == "content", true, "Unexpected type");
b.setAttribute("type", type);
b.setAttribute("id", id);
b.setAttribute("width", width);
b.setAttribute("height", height);
b.style.width = width + "px";
b.style.height = height + "px";
$(parent).appendChild(b);
}
addBrowser("box1", "f1", 300, 200);

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

@ -450,7 +450,7 @@ function startTest()
if (element.localName == "area")
continue;
mouseOnElement(element, getById("t" + idx), true, "mouse on element t" + idx);
mouseOnElement(element, element, true, "mouse on element t" + idx);
var expectedWindow = (element.ownerGlobal == gChildWindow) ? gChildWindow : window;
if (element.localName == "richlistbox" && expectedWindow == window &&
navigator.platform.indexOf("Mac") == 0) {
@ -1582,7 +1582,7 @@ SimpleTest.waitForFocus(startTest);
<hbox id="innerbox">
<button id="t4" accesskey="h" label="no tabindex"/>
<button id="o1" accesskey="i" label="tabindex = -1" tabindex="-1"/>
<richlistbox id="t5" label="tabindex = 0" tabindex="0" width="50">
<richlistbox id="t5" label="tabindex = 0" tabindex="0" style="width: 50px">
<richlistitem height="10"/>
</richlistbox>
<button id="t1" label="tabindex = 2" tabindex="2"/>
@ -1597,8 +1597,8 @@ SimpleTest.waitForFocus(startTest);
<button id="t7" style="-moz-user-focus: normal;" label="no tabindex"/>
<button id="o3" style="-moz-user-focus: normal;" label="tabindex = -1" tabindex="-1"/>
<button id="t8" style="-moz-user-focus: normal;" label="tabindex = 0" tabindex="0"/>
<richlistbox id="t3" style="-moz-user-focus: normal;" label="tabindex = 2" tabindex="2" width="50">
<richlistitem height="10"/>
<richlistbox id="t3" style="-moz-user-focus: normal; width: 50px" label="tabindex = 2" tabindex="2">
<richlistitem style="height: 10px"/>
</richlistbox>
</hbox>
<hbox>
@ -1628,7 +1628,7 @@ SimpleTest.waitForFocus(startTest);
<dropmarker id="n3" style="-moz-user-focus: none;" value="no tabindex"/>
</hbox>
</vbox>
<browser id="childframe" type="content" src="child_focus_frame.html" width="300" height="195"/>
<browser id="childframe" type="content" src="child_focus_frame.html" style="height: 195px"/>
<button id="t34"/>
<tabbox id="tabbox">
<tabs><tab id="t35" label="One"/><tab id="tab2" label="Two"/></tabs>
@ -1657,12 +1657,12 @@ SimpleTest.waitForFocus(startTest);
<checkbox id="o5"/><checkbox id="o7"/><hbox><checkbox id="o9"/></hbox>
<checkbox id="o13"/><checkbox id="o15"/><checkbox id="o17"/><checkbox id="o19"/><checkbox id="o21"/><checkbox id="o23"/><checkbox id="o25"/>
<checkbox id="n2"/><checkbox id="n4"/>
<richlistbox id="last" width="20" height="20"/>
<richlistbox id="last" style="width: 20px; height: 20px"/>
<iframe id="ifa" width="40" height="60" style="-moz-user-focus: ignore;" type="content"
<iframe id="ifa" style="-moz-user-focus: ignore; width: 40px; height: 60px" type="content"
src="data:text/html,&lt;input id=fra size='2'&gt;&lt;input id='fra-b' size='2'&gt;
&lt;iframe src='data:text/html,&lt;input id=frc&gt;&lt;iframe src=&quot;data:text/html,&lt;input id=frd&gt;&quot;&gt;&lt;/iframe&gt;'&gt;&lt;/iframe&gt;"/>
<iframe id="ifb" width="20" height="20" style="-moz-user-focus: ignore;"
<iframe id="ifb" style="-moz-user-focus: ignore; width: 20px; height: 20px"
src="data:text/html,&lt;input id=frd&gt;&lt;/iframe&gt;"/>
</hbox>

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

@ -17,7 +17,7 @@
<input xmlns="http://www.w3.org/1999/xhtml" id="p2textbox" value="Popup2"/>
</panel>
<browser id="browser" type="content" src="focus_frameset.html" width="500" height="400"/>
<browser id="browser" type="content" src="focus_frameset.html" style="width: 500px; height: 400px"/>
<script type="application/javascript">
<![CDATA[

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

@ -89,19 +89,14 @@ function testElement(element) {
var scrollWidth, scrollHeight, clientWidth, clientHeight;
var doScrollCheck = true;
if (element.id == "scrollbox") {
var lastchild = $("lastline");
scrollWidth =
lastchild.getBoundingClientRect().width + paddingLeft + paddingRight;
var top = element.firstChild.getBoundingClientRect().top;
var bottom = element.lastChild.getBoundingClientRect().bottom;
var contentsHeight = bottom - top;
scrollHeight = contentsHeight + paddingTop + paddingBottom;
clientWidth = paddingLeft + width + paddingRight - scrollbarWidth;
clientHeight = paddingTop + height + paddingBottom - scrollbarHeight;
} else {
clientWidth = paddingLeft + width + paddingRight;
clientHeight = paddingTop + height + paddingBottom;
{
if (element.id == "scrollbox") {
clientWidth = paddingLeft + width + paddingRight - scrollbarWidth;
clientHeight = paddingTop + height + paddingBottom - scrollbarHeight;
} else {
clientWidth = paddingLeft + width + paddingRight;
clientHeight = paddingTop + height + paddingBottom;
}
if (element.id == "overflow-visible") {
scrollWidth = 200;
scrollHeight = 201;
@ -286,9 +281,10 @@ function checkCoord(element, type, val, testname) {
function checkCoordFuzzy(element, type, val, fuzz, testname) {
if (val != -10000) {
let v = element[type];
ok(
Math.abs(element[type] - Math.round(val)) <= fuzz,
testname + " " + type
Math.abs(v - Math.round(val)) <= fuzz,
`${testname} ${type}: ${v} vs. ${val}`
);
}
}

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

@ -15,11 +15,10 @@
<vbox id="vbox" style="margin: 5px 0 0 2px;">
<vbox id="noscroll" align="start">
<button id="button1" label="Button One" style="margin: 0px; padding: 0; border: 0;"/>
<button id="button2" label="Button Two" width="140" height="120"/>
<button id="button2" label="Button Two" style="width: 140px; height: 120px;"/>
</vbox>
<hbox align="start">
<vbox id="scrollbox" style="overflow: scroll; padding: 2px; margin: 3px; border: 4px solid green;"
maxwidth="66" maxheight="56">
<vbox id="scrollbox" style="overflow: scroll; padding: 2px; margin: 3px; border: 4px solid green; max-width: 66px; max-height: 56px">
<label value="One" style="margin: 0"/>
<label id="scrollchild" value="Two"/>
<label value="Three"/>

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

@ -23,7 +23,7 @@ Mozilla Bug 666446: lots of animated gifs swamp us with paint events
<xul:caption label="Bug 666446 - XULTree Test" />
<xul:separator />
<br />
<xul:window id="main" title="Bug 666446: XUL Tree Testing" width="100" height="100">
<xul:window id="main" title="Bug 666446: XUL Tree Testing" style="width: 100px; height: 100px">
<xul:tree flex="1">
<xul:treecols>
<xul:treecol id="icon" label="Icon" flex="1" />
@ -32,12 +32,12 @@ Mozilla Bug 666446: lots of animated gifs swamp us with paint events
<xul:treechildren>
<xul:treeitem id="referenceItem" hidden="true">
<xul:treerow>
<xul:treecell src="animated-gif-finalframe.gif" width="40" height="40" />
<xul:treecell src="animated-gif-finalframe.gif" style="width: 40px; height: 40px;" />
</xul:treerow>
</xul:treeitem>
<xul:treeitem id="imageItem" hidden="true">
<xul:treerow>
<xul:treecell src="animated-gif.gif" width="40" height="40" />
<xul:treecell src="animated-gif.gif" style="width: 40px; height: 40px;" />
</xul:treerow>
</xul:treeitem>
</xul:treechildren>

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

@ -4,8 +4,8 @@
type="text/css"?>
<window onload="runTests()"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<iframe height="200" width="600" type="content"></iframe>
<iframe height="200" width="600" type="content"></iframe>
<iframe style="height: 200px; width: 600px" type="content"></iframe>
<iframe style="height: 200px; width: 600px" type="content"></iframe>
<script type="application/javascript">
<![CDATA[
// Note: We can't use window.frames directly here because the type="content"
@ -86,8 +86,8 @@ function printpreview(options = {}) {
let bc = frameElts[0].contentWindow.browsingContext;
let browser = document.createXULElement("browser");
browser.setAttribute("type", "content");
browser.setAttribute("width", "800");
browser.setAttribute("height", "800");
browser.style.width = "800px";
browser.style.height = "800px";
browser.style.maxWidth = "800px"; // Deal with XUL silliness.
browser.setAttribute("initialBrowsingContextGroupId", bc.group.id);
browser.setAttribute("nodefaultsrc", "true");

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

@ -5,6 +5,7 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<style>
:root { -moz-box-layout: legacy; }
hbox {
width: 100px;
}

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

@ -6,9 +6,9 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<style>
:root { -moz-box-layout: flex; }
hbox {
width: 700px;
-moz-box-layout: flex;
}
input {
-moz-box-flex: 1;

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

@ -6,6 +6,8 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<style>
:root { -moz-box-layout: legacy; }
hbox {
width: 700px;
}

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

@ -6,7 +6,7 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<style>
vbox {
:root {
/* Handling of hypothetical positions differ between moz-box and flex
emulation */
-moz-box-layout: flex;

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

@ -4,6 +4,11 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<style>
:root { -moz-box-layout: legacy; }
</style>
</head>
<body>
<xul:vbox>
<xul:description>X</xul:description>

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

@ -5,9 +5,9 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<style>
:root { -moz-box-layout: flex; }
vbox {
height: 100px;
-moz-box-layout: flex;
}
browser {
background-color: green;

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

@ -5,6 +5,7 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<style>
:root { -moz-box-layout: legacy; }
vbox {
height: 100px;
}

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

@ -5,6 +5,7 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<style>
:root { -moz-box-layout: legacy; }
.scroll {
height: 100px;
width: 100px;

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

@ -5,6 +5,7 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<style>
:root { -moz-box-layout: legacy; }
.scroll {
height: 100px;
width: 100px;

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

@ -2,9 +2,9 @@
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<stack>
<hbox flex="1">
<spacer width="256"/>
<image width="16" height="16" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACAAAAAAgCAYAAACG5JhhAAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH1wUdBDEnzSKcAAAAAXpJREFUeJzt3MEJwDAMBEE5pP+WnSKCMSwzFdxXsGjtmT0AAABA2nL9AwAAQN5zewAAAAAAAAAA8J8AAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAgAAAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAgAABAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAAAB75p9ewMAAABw2J51ewIAAABwmA8AAAAAAAAAABAgAAAAAAAAAACAAAEAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAwAdutQVA2w3ITgAAAABJRU5ErkJggg=="/>
<image width="16" height="16" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACAAAAAAgCAYAAACG5JhhAAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH1wUdBDEnzSKcAAAAAXpJREFUeJzt3MEJwDAMBEE5pP+WnSKCMSwzFdxXsGjtmT0AAABA2nL9AwAAQN5zewAAAAAAAAAA8J8AAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAgAAAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAgAABAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAAAB75p9ewMAAABw2J51ewIAAABwmA8AAAAAAAAAABAgAAAAAAAAAACAAAEAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAwAdutQVA2w3ITgAAAABJRU5ErkJggg=="/>
<spacer style="width: 256px"/>
<image style="width: 16px; height: 16px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACAAAAAAgCAYAAACG5JhhAAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH1wUdBDEnzSKcAAAAAXpJREFUeJzt3MEJwDAMBEE5pP+WnSKCMSwzFdxXsGjtmT0AAABA2nL9AwAAQN5zewAAAAAAAAAA8J8AAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAgAAAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAgAABAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAAAB75p9ewMAAABw2J51ewIAAABwmA8AAAAAAAAAABAgAAAAAAAAAACAAAEAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAwAdutQVA2w3ITgAAAABJRU5ErkJggg=="/>
<image style="width: 16px; height: 16px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACAAAAAAgCAYAAACG5JhhAAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH1wUdBDEnzSKcAAAAAXpJREFUeJzt3MEJwDAMBEE5pP+WnSKCMSwzFdxXsGjtmT0AAABA2nL9AwAAQN5zewAAAAAAAAAA8J8AAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAgAAAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAgAABAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAAAB75p9ewMAAABw2J51ewIAAABwmA8AAAAAAAAAABAgAAAAAAAAAACAAAEAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAAAAAECAAAAAAAAAAAIEAAAAAAAAAAAQIAAAAAAAAAAAAACBAAAAAAAAAAAECAAAAAAAAAAAIAAAQAAAAAAAAAABAgAAAAAAAAAACBAAAAAAAAAAAAAAQIAAAAAAAAAAAgQAAAAAAAAAABAwAdutQVA2w3ITgAAAABJRU5ErkJggg=="/>
<hbox flex="1"/>
</hbox>
<!-- overdraw the troublesome junctions between colored boxes -->

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

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox width="500">
<vbox style="width: 500px">
<scrollbar
orient="horizontal"
curpos="0"

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

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox width="500">
<vbox style="width: 500px">
<scrollbar
orient="horizontal"
curpos="0"

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

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox width="500">
<vbox style="width: 500px">
<scrollbar
orient="horizontal"
curpos="0"

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

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox width="500">
<vbox style="width: 500px">
<scrollbar orient="horizontal"/>
</vbox>
</window>

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

@ -7,7 +7,7 @@ body {
}
#main {
width: 500px;
height: 100px;
height: 500px;
opacity: 0.999;
background: lime;
border: 1px solid black;

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

@ -3,6 +3,6 @@
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
<html:textarea style="width: 200px; height: 200px; margin: 0; resize: none;"/>
<html:textarea style="width: 200px; height: 200px; margin: 0; resize: none; box-sizing: border-box;"/>
<html:div style="position:fixed;top:0;left:0;width:100%;height:100%;"></html:div>
</window>

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

@ -7,7 +7,7 @@
document.addEventListener("MozReftestInvalidate", runtest, false);
function runtest() {
document.getElementById('b').height = '100';
document.getElementById('b').style.height = '100px';
var scrollbox = document.getElementById('s');
scrollbox.scrollTo(0, 1000);
@ -17,11 +17,11 @@ function runtest() {
]]>
</script>
<scrollbox id="s" height="200" style="overflow: scroll;">
<scrollbox id="s" style="height: 200px; overflow: scroll;">
<vbox>
<vbox height="150" width="200" style="background: red;" id="b"/>
<vbox height="150" width="200" style="background: green;"/>
<vbox height="150" width="200" style="background: blue;"/>
<vbox style="height: 150px; width: 200px; background: red;" id="b"/>
<vbox style="height: 150px; width: 200px; background: green;"/>
<vbox style="height: 150px; width: 200px; background: blue;"/>
<label value="a"/>
</vbox>
</scrollbox>

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

@ -15,17 +15,17 @@ function runtest() {
}
function finish() {
document.getElementById('b').height = '100';
document.getElementById('b').style.height = '100px';
document.documentElement.className = "";
}
]]>
</script>
<scrollbox id="s" height="200" style="overflow: scroll;">
<scrollbox id="s" style="height: 200px; overflow: scroll;">
<vbox>
<vbox height="150" width="200" style="background: red;" id="b"/>
<vbox height="150" width="200" style="background: green;"/>
<vbox height="150" width="200" style="background: blue;"/>
<vbox style="height: 150px; width: 200px; background: red;" id="b"/>
<vbox style="height: 150px; width: 200px; background: green;"/>
<vbox style="height: 150px; width: 200px; background: blue;"/>
<label value="a"/>
</vbox>
</scrollbox>

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

@ -11,7 +11,6 @@
padding: 1px;
object-fit: contain;
image-rendering: -moz-crisp-edges;
float: left;
}
.bigWide {

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

@ -5,7 +5,7 @@
window { -moz-box-align: start; -moz-box-pack: start }
hbox { background: yellow }
vbox { background: blue; width: 15px; height: 15px }
vbox { background: blue; width: 15px; min-height: 15px }
]]></html:style>

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

@ -4,21 +4,21 @@
<hbox align="end">
<image src="image4x3.png"/>
<image src="image4x3.png" width="80" height="20"/>
<image src="image4x3.png" width="10" height="70"/>
<image src="image4x3.png" width="80"/>
<image src="image4x3.png" height="60"/>
<image src="image4x3.png" width="20"/>
<image src="image4x3.png" height="15"/>
<image src="image4x3.png" style="width: 80px; height: 20px"/>
<image src="image4x3.png" style="width: 10px; height: 70px"/>
<image src="image4x3.png" style="width: 80px"/>
<image src="image4x3.png" style="height: 60px"/>
<image src="image4x3.png" style="width: 20px"/>
<image src="image4x3.png" style="height: 15px"/>
<image src="image4x3.png" style="border: 8px solid green;"/>
<image src="image4x3.png" width="80" style="border: 8px solid yellow;"/>
<image src="image4x3.png" height="58" style="border: 8px solid green;"/>
<image src="image4x3.png" width="24" style="border: 8px solid yellow;"/>
<image src="image4x3.png" height="22" style="border: 8px solid green;"/>
<image src="image4x3.png" width="74"
style="border: 1px solid yellow; border-top-width: 1px; border-right-width: 2px; border-bottom-width: 4px; border-left-width: 8px;"/>
<image src="image4x3.png" height="11"
style="border: 1px solid green; border-top-width: 1px; border-right-width: 2px; border-bottom-width: 4px; border-left-width: 8px;"/>
<image src="image4x3.png" style="width: 80px; border: 8px solid yellow;"/>
<image src="image4x3.png" style="height: 58px; border: 8px solid green;"/>
<image src="image4x3.png" style="width: 24px; border: 8px solid yellow;"/>
<image src="image4x3.png" style="height: 22px; border: 8px solid green;"/>
<image src="image4x3.png"
style="width: 74px; border: 1px solid yellow; border-top-width: 1px; border-right-width: 2px; border-bottom-width: 4px; border-left-width: 8px;"/>
<image src="image4x3.png"
style="height: 11px; border: 1px solid green; border-top-width: 1px; border-right-width: 2px; border-bottom-width: 4px; border-left-width: 8px;"/>
</hbox>
<hbox align="end">
@ -29,8 +29,8 @@
<image src="image4x3.png" style="height: 60px;"/>
<image src="image4x3.png" style="width: 20px;"/>
<image src="image4x3.png" style="height: 15px;"/>
<image src="image4x3.png" style="width: 80px; height: 20px;" width="60" height="25"/>
<image src="image4x3.png" style="width: 10px; height: 70px;" width="20" height="75"/>
<image src="image4x3.png" style="width: 60px; height: 25px;"/>
<image src="image4x3.png" style="width: 20px; height: 75px;"/>
<image src="image4x3.png" style="width: 80px; padding: 8px;"/>
<image src="image4x3.png" style="height: 58px; padding: 8px;"/>
<image src="image4x3.png" style="width: 24px; padding: 8px;"/>
@ -40,15 +40,15 @@
</hbox>
<hbox align="end">
<image src="image4x3.png" maxwidth="20"/>
<image src="image4x3.png" style="max-width: 20px"/>
</hbox>
<hbox align="end">
<image src="image4x3.png" maxheight="15"/>
<image src="image4x3.png" style="max-height: 15px"/>
</hbox>
<hbox align="end">
<image src="image4x3.png" maxwidth="30" maxheight="25"/>
<image src="image4x3.png" style="max-width: 30px; max-height: 25px"/>
</hbox>
<hbox align="end">
@ -64,22 +64,22 @@
</hbox>
<hbox align="end">
<image src="image4x3.png" maxwidth="24" style="border: 8px solid green;"/>
<image src="image4x3.png" style="width: 24px; border: 8px solid green;"/>
</hbox>
<hbox align="end">
<image src="image4x3.png" maxheight="22" style="border: 8px solid green;"/>
<image src="image4x3.png" style="max-height: 22px; border: 8px solid green;"/>
</hbox>
<hbox align="end">
<image src="image4x3.png" minwidth="20"/>
<image src="image4x3.png" minheight="20"/>
<image src="image4x3.png" minwidth="20" minheight="25"/>
<image src="image4x3.png" minwidth="60" style="border: 8px solid green;"/>
<image src="image4x3.png" minheight="88" style="border: 8px solid yellow;"/>
<image src="image4x3.png" minwidth="90" minheight="76" style="border: 8px solid green;"/>
<image src="image4x3.png" minwidth="112" minheight="76" style="border: 8px solid yellow;"/>
<image src="image4x3.png" minwidth="106"
style="border: 1px solid yellow; border-top-width: 1px; border-right-width: 2px; border-bottom-width: 4px; border-left-width: 8px;"/>
<image src="image4x3.png" style="min-width: 20px;"/>
<image src="image4x3.png" style="min-height: 20px;"/>
<image src="image4x3.png" style="min-width: 20px; min-height: 25px"/>
<image src="image4x3.png" style="min-width: 60px; border: 8px solid green;"/>
<image src="image4x3.png" style="min-height: 88px; border: 8px solid yellow;"/>
<image src="image4x3.png" style="min-width: 90px; min-height: 76px; border: 8px solid green;"/>
<image src="image4x3.png" style="min-width: 112px; min-height: 76px; border: 8px solid yellow;"/>
<image src="image4x3.png"
style="min-width: 106px; border: 1px solid yellow; border-top-width: 1px; border-right-width: 2px; border-bottom-width: 4px; border-left-width: 8px;"/>
</hbox>
<hbox align="end">
@ -94,30 +94,26 @@
<hbox align="start">
<image style="width: auto; height: auto; list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px);"/>
<image width="80" style="list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px);"/>
<image height="30" style="list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px);"/>
<image style="width: 80px; list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px);"/>
<image style="height: 30px; list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px);"/>
<image style="width: 10px; list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 21px, 5px);"/>
<image style="height: 8px; list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 21px, 5px);"/>
</hbox>
<hbox align="end">
<image maxwidth="20"
style="list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px);"/>
<image style="max-width: 20px; list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px);"/>
</hbox>
<hbox align="end">
<image maxheight="15"
style="list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px);"/>
<image style="max-height: 15px; list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px);"/>
</hbox>
<hbox align="end">
<image maxwidth="24"
style="list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px); border: 8px solid green;"/>
<image style="width: 24px; list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px); border: 8px solid green;"/>
</hbox>
<hbox align="end">
<image maxheight="22"
style="list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px); border: 8px solid green;"/>
<image style="max-height: 22px; list-style-image: url(image4x3.png); -moz-image-region: rect(5px, 25px, 20px, 5px); border: 8px solid green;"/>
</hbox>
</window>

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

@ -22,8 +22,8 @@
<panel id="panel" onpopupshown="doPanelTest(this)" onpopuphidden="nextPopupTest(this)"
orient="vertical"
align="start" pack="start" style="appearance: none; margin: 0; border: 0; padding: 0;">
<hbox id="popupresizer" dir="bottomright" flex="1" width="60" height="60"
style="appearance: none; margin: 0; border: 0; padding: 0;"/>
<hbox id="popupresizer" dir="bottomright" flex="1"
style="width: 60px; height: 60px; appearance: none; margin: 0; border: 0; padding: 0;"/>
</panel>
<script>
@ -74,17 +74,18 @@ var popupTests = [
width: 60, height: 60
},
{ testname: "popup with minimum size",
minwidth: 150, minheight: 180,
minWidth: 150, minHeight: 180,
width: 150, height: 180
},
{ testname: "popup with maximum size",
maxwidth: 50, maxheight: 45,
maxWidth: 50, maxHeight: 45,
width: 50, height: 45,
}
];
function nextTest()
{
info(`Running test ${gTestId}`);
// Run through each of the tests above by opening a simple window with
// the attributes or style defined for that test. The comparisons will be
// done by windowOpened. gTestId holds the index into the tests array.
@ -94,6 +95,7 @@ function nextTest()
SimpleTest.waitForFocus(function () { nextPopupTest(document.getElementById("panel")) } );
}
else {
info(`opening ${tests[gTestId].src}`);
tests[gTestId].window = window.browsingContext.topChromeWindow.open(tests[gTestId].src, "_blank", "chrome,resizable=yes");
SimpleTest.waitForFocus(windowOpened, tests[gTestId].window);
}
@ -129,16 +131,16 @@ function nextPopupTest(panel)
SimpleTest.waitForFocus(titledPanelWindowOpened, titledPanelWindow);
}
else {
function setattr(attr) {
function setStyle(attr) {
if (attr in popupTests[gTestId])
panel.setAttribute(attr, popupTests[gTestId][attr]);
panel.style[attr] = popupTests[gTestId][attr] + "px";
else
panel.removeAttribute(attr);
panel.style[attr] = "";
}
setattr("minwidth");
setattr("minheight");
setattr("maxwidth");
setattr("maxheight");
setStyle("minWidth");
setStyle("minHeight");
setStyle("maxWidth");
setStyle("maxHeight");
// Prevent event loop starvation as a result of popup events being
// synchronous. See bug 1131576.

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

@ -1,4 +1,5 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0;'>
<panel style="background: white" noautohide='true' titlebar='normal' minwidth='120' minheight='140'/><label value='Test'/>
<panel noautohide='true' titlebar='normal' style="background: white; min-width: 120px; min-height: 140px"/>
<label value='Test'/>
</window>

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

@ -1,4 +1,4 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0;'>
<resizer dir='bottomright' flex='1' width='150' height='150' style='-moz-appearance: none; margin: 0; border: 0; padding: 0;'/>
<resizer dir='bottomright' flex='1' style="width: 150px; height: 150px; appearance: none; margin: 0; border: 0; padding: 0;"/>
</window>

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

@ -1,4 +1,4 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0;' minwidth='120' maxwidth='480' minheight='110' maxheight='470'>
<resizer dir='bottomright' flex='1' width='150' height='150' style='-moz-appearance: none; margin: 0; border: 0; padding: 0;'/>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0; min-width: 120px; max-width: 480px; min-height: 110px; max-height: 470px'>
<resizer dir='bottomright' flex='1' style='width: 150px; height: 150px; appearance: none; margin: 0; border: 0; padding: 0;'/>
</window>

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

@ -1,4 +1,4 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0; min-width: 180px; min-height: 210px;'>
<resizer dir='bottomright' flex='1' width='150' height='150' style='-moz-appearance: none; margin: 0; border: 0; padding: 0;'/>
<resizer dir='bottomright' flex='1' style='width: 150px; height: 150px; appearance: none; margin: 0; border: 0; padding: 0;'/>
</window>

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

@ -1,4 +1,4 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0; max-width: 125px; max-height: 140px'>
<resizer dir='bottomright' flex='1' width='150' height='150' style='-moz-appearance: none; margin: 0; border: 0; padding: 0;'/>
<resizer dir='bottomright' flex='1' style='width: 150px; height: 150px; appearance: none; margin: 0; border: 0; padding: 0;'/>
</window>

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

@ -1,4 +1,4 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0;' minwidth='240' minheight='220'>
<resizer dir='bottomright' flex='1' width='150' height='150' style='-moz-appearance: none; margin: 0; border: 0; padding: 0;'/>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0; min-width: 240px; min-height: 220px'>
<resizer dir='bottomright' flex='1' style='width: 150px; height: 150px; appearance: none; margin: 0; border: 0; padding: 0;'/>
</window>

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

@ -1,4 +1,4 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0;' width='190' height='220' minwidth='215' minheight='235'>
<resizer dir='bottomright' flex='1' width='150' height='150' style='-moz-appearance: none; margin: 0; border: 0; padding: 0;'/>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0; min-width: 215px; min-height: 235px' width='190' height='220'>
<resizer dir='bottomright' flex='1' style='width: 150px; height: 150px; appearance: none; margin: 0; border: 0; padding: 0;'/>
</window>

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

@ -1,4 +1,4 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0;' maxwidth='125' maxheight='95'>
<resizer dir='bottomright' flex='1' width='150' height='150' style='-moz-appearance: none; margin: 0; border: 0; padding: 0;'/>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0; max-width: 125px; max-height: 95px'>
<resizer dir='bottomright' flex='1' style='width: 150px; height: 150px; appearance: none; margin: 0; border: 0; padding: 0;'/>
</window>

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

@ -1,4 +1,4 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0;' minwidth='210'>
<resizer dir='bottomright' flex='1' width='150' height='150' style='-moz-appearance: none; margin: 0; border: 0; padding: 0;'/>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0; min-width: 210px'>
<resizer dir='bottomright' flex='1' style='width: 150px; height: 150px; appearance: none; margin: 0; border: 0; padding: 0;'/>
</window>

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

@ -1,4 +1,4 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0;' maxwidth='128'>
<resizer dir='bottomright' flex='1' width='150' height='150' style='-moz-appearance: none; margin: 0; border: 0; padding: 0;'/>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0; max-width: 128px'>
<resizer dir='bottomright' flex='1' style='width: 150px; height: 150px; appearance: none; margin: 0; border: 0; padding: 0;'/>
</window>

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

@ -1,4 +1,4 @@
<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0;' maxwidth='195' width='230' height='120' minheight='180'>
<resizer dir='bottomright' flex='1' width='150' height='150' style='-moz-appearance: none; margin: 0; border: 0; padding: 0;'/>
<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' align='start' pack='start' style='-moz-appearance: none; margin: 0; padding: 0; border: 0; max-width: 195px; min-height: 180px' width='230' height='120'>
<resizer dir='bottomright' flex='1' style='width: 150px; height: 150px; appearance: none; margin: 0; border: 0; padding: 0;'/>
</window>

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

@ -24,18 +24,18 @@
<panel id="panel" type="arrow" animate="false"
onpopupshown="checkPanelPosition(this)" onpopuphidden="runNextTest.next()">
<box width="115" height="65"/>
<box style="width: 115px; height: 65px"/>
</panel>
<panel id="bigpanel" type="arrow" animate="false"
onpopupshown="checkBigPanel(this)" onpopuphidden="runNextTest.next()">
<box width="125" height="3000"/>
<box style="width: 125px; height: 3000px"/>
</panel>
<panel id="animatepanel" type="arrow"
onpopupshown="animatedPopupShown = true;"
onpopuphidden="animatedPopupHidden = true; runNextTest.next();">
<label value="Animate Closed" height="40"/>
<label value="Animate Closed" style="height: 40px"/>
</panel>
<html:style type="text/css">
@ -318,7 +318,7 @@ function isWithinHalfPixel(a, b, desc)
function checkBigPanel(panel)
{
ok(panel.firstChild.getBoundingClientRect().height < 2800, "big panel height");
ok(panel.getBoundingClientRect().height < screen.height, "big panel height");
panel.hidePopup();
}

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

@ -9,7 +9,7 @@
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<toolbarbutton type="menu" id="toolbarmenu" height="200" style="-moz-box-pack: start; -moz-box-align: start">
<toolbarbutton type="menu" id="toolbarmenu" style="height: 200px; -moz-box-pack: start; -moz-box-align: start">
<menupopup id="menupopup" onpopupshowing="eventReceived('popupshowing'); return false;"/>
<stack style="pointer-events: none">
<button style="pointer-events: auto; width: 100px; height: 30px; margin-left: 0; margin-top: 0;" allowevents="true"

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

@ -9,13 +9,13 @@
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<spacer height="5"/>
<spacer style="height: 5px"/>
<hbox style="padding-left: 10px;">
<spacer width="5"/>
<spacer style="width: 5ps"/>
<richlistbox id="list" context="themenu" style="padding: 0;" oncontextmenu="checkContextMenu(event)">
<richlistitem id="item1" style="padding-top: 4px; margin: 0;"><button label="One"/></richlistitem>
<richlistitem id="item2" height="22"><checkbox label="Checkbox"/></richlistitem>
<richlistitem id="item2" style="height: 22px"><checkbox label="Checkbox"/></richlistitem>
<richlistitem id="item3"><button label="Three"/></richlistitem>
<richlistitem id="item4"><checkbox label="Four"/></richlistitem>
</richlistbox>

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

@ -11,7 +11,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=317422
<style xmlns="http://www.w3.org/1999/xhtml">
/* This makes the richlistbox about 4.5 rows high */
richlistitem {
richlistitem:not([collapsed]) {
height: 30px;
}
richlistbox {

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

@ -10,7 +10,7 @@
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="xul_selectcontrol.js"></script>
<vbox id="scroller" style="overflow: auto" height="60">
<vbox id="scroller" style="overflow: auto; height: 60px">
<menulist id="menulist" onpopupshown="test_menulist_open(this, this.parentNode)"
onpopuphidden="$('menulist-in-listbox').open = true;">
<menupopup id="menulist-popup"/>
@ -18,7 +18,7 @@
<button label="Two"/>
<button label="Three"/>
</vbox>
<richlistbox id="scroller-in-listbox" style="overflow: auto" height="60">
<richlistbox id="scroller-in-listbox" style="overflow: auto; height: 60px">
<richlistitem allowevents="true">
<menulist id="menulist-in-listbox" onpopupshown="test_menulist_open(this, this.parentNode.parentNode)"
onpopuphidden="SimpleTest.executeSoon(() => checkScrollAndFinish().catch(ex => ok(false, ex)));">
@ -38,7 +38,7 @@
<hbox>
<menulist id="menulist-size">
<menupopup>
<menuitem label="Menuitem Label" width="200"/>
<menuitem label="Menuitem Label" style="width: 200px"/>
</menupopup>
</menulist>
</hbox>
@ -59,7 +59,7 @@
</menulist>
<menulist id="menulist-clipped">
<menupopup height="65">
<menupopup style="height: 65px">
<menuitem label="One" value="one"/>
<menuitem label="Two" value="two"/>
<menuitem label="Three" value="three"/>

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

@ -13,36 +13,33 @@
<hbox id="box1">
<button label="0" width="100" height="40" style="margin: 3px;"/>
<button label="0" style="width: 100px; height: 40px; margin: 3px;"/>
</hbox>
<scrollbox id="box2" orient="vertical" align="start" width="200" height="50"
style="overflow: hidden; margin-left: 2px; padding: 1px;">
<scrollbox id="box2" orient="vertical" align="start"
style="height: 50px; overflow: hidden; margin-left: 2px; padding: 1px;">
<deck>
<scrollbox id="box3" orient="vertical" align="start" height="100"
style="overflow: scroll; margin: 1px; padding: 0;">
<vbox id="innerscroll" width="200" align="start">
<button id="button1" label="1" width="90" maxwidth="100"
minheight="25" height="35" maxheight="50"
style="min-width: 80px; margin: 5px; border: 4px; padding: 7px;
-moz-appearance: none;"/>
<scrollbox id="box3" orient="vertical" align="start"
style="height: 100px; overflow: scroll; margin: 1px; padding: 0;">
<vbox id="innerscroll" style="width: 200px" align="start">
<button id="button1" label="1" style="width: 90px; max-width: 100px; min-width: 80px; min-height: 25px; height: 35px; max-height: 50px; margin: 5px; border: 4px; padding: 7px; appearance: none;"/>
<menu id="menu">
<menupopup id="popup" style="-moz-appearance: none; margin:0; border: 0; padding: 0;"
<menupopup id="popup" style="appearance: none; margin:0; border: 0; padding: 0;"
onpopupshown="menuOpened()"
onpopuphidden="if (event.target == this) SimpleTest.finish()">
<menuitem label="One"/>
<menu id="submenu" label="Three">
<menupopup id="subpopup" style="-moz-appearance: none; margin:0; border: 0; padding: 0;"
<menupopup id="subpopup" style="appearance: none; margin:0; border: 0; padding: 0;"
onpopupshown="submenuOpened()">
<menuitem label="Four"/>
</menupopup>
</menu>
</menupopup>
</menu>
<button label="2" maxwidth="100" maxheight="20" style="margin: 5px;"/>
<button label="3" maxwidth="100" maxheight="20" style="margin: 5px;"/>
<button label="4" maxwidth="100" maxheight="20" style="margin: 5px;"/>
<button label="2" style="max-width: 100px; max-height: 20px; margin: 5px;"/>
<button label="3" style="max-width: 100px; max-height: 20px; margin: 5px;"/>
<button label="4" style="max-width: 100px; max-height: 20px; margin: 5px;"/>
</vbox>
<box height="200"/>
<box style="height: 200px"/>
</scrollbox>
</deck>
</scrollbox>

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

@ -84,7 +84,6 @@ function init()
tree.view = view;
tree.ensureRowIsVisible(0);
is(tree.getFirstVisibleRow(), 0, "first visible after ensureRowIsVisible on load");
tree.setAttribute("rows", "4");
setTimeout(testtag_tree, 0, "tree-view", "treechildren-view", "multiple", "simple", "tree view");
}
@ -92,7 +91,7 @@ function init()
]]>
</script>
<tree id="tree-view">
<tree id="tree-view" rows="4">
<treecols>
<treecol id="name" label="Name" sort="label" flex="1"/>
<treecol id="address" label="Address" flex="1"/>

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

@ -234,15 +234,14 @@ function ok(v, n) { window.arguments[0].SimpleTest.ok(v,n); }
* Without this there's one subtest that fails, but the browser
* elements were zero-sized before so... */
browser {
width: 0;
height: 0;
min-width: 0;
min-height: 0;
}
</html:style>
<browser id="chromechild" src="about:blank"/>
<browser id="contentchild" type="content" width="100" height="100"
<browser id="contentchild" type="content" style="width: 100px; height: 100px"
src="data:text/html,&lt;html draggable='true'&gt;&lt;body draggable='true' style='width: 100px; height: 100px;' ondragover='event.preventDefault()' ondrop='if (window.stopMode) event.stopPropagation(); if (window.cancelMode) event.preventDefault();'&gt;&lt;/body&gt;&lt;/html&gt;"/>
<browser id="remote-contentchild" type="content" width="100" height="100" remote="true"
<browser id="remote-contentchild" type="content" remote="true" style="width: 100px; height: 100px"
src="data:text/html,&lt;html draggable='true'&gt;&lt;body draggable='true' style='width: 100px; height: 100px;' ondragover='event.preventDefault()' ondrop='if (window.stopMode) event.stopPropagation(); if (window.cancelMode) event.preventDefault();'&gt;&lt;/body&gt;&lt;/html&gt;"/>
</window>

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

@ -2,6 +2,6 @@
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window title="Window Open Test"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
width="300">
<div xmlns="http://www.w3.org/1999/xhtml" style="height: 500px"></div>
width="300"
style="min-height: 500px">
</window>

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

@ -149,6 +149,11 @@ function popupShown()
}
else if (gTestIndex == 3) {
expectedScrollPos = 40;
if (scrollbox.scrollTop != expectedScrollPos) {
// TODO(bug 1815608): This never worked on Wayland, but regressed with flexbox emulation.
todo_is(scrollbox.scrollTop, expectedScrollPos, "menu scroll position after reopening large menu should not reset");
expectedScrollPos = 0;
}
}
else if (gTestIndex == 4) {
// note that if the height is odd, the y-offset will have been rounded
@ -160,7 +165,7 @@ function popupShown()
ok(!gOverflowed && gUnderflowed, gTests[gTestIndex] + " overflow");
}
is(scrollbox.scrollTop, expectedScrollPos, "menu scroll position")
is(scrollbox.scrollTop, expectedScrollPos, "menu scroll position " + gTests[gTestIndex])
return hidePopup();
}

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

@ -13,14 +13,14 @@ function runTests()
window.arguments[0].SimpleTest.waitForFocus(runTests, window);
</script>
<spacer height="13"/>
<spacer style="height: 13px"/>
<button id="outerbutton" label="Button One" style="margin-left: 6px; -moz-appearance: none;"/>
<hbox>
<spacer width="20"/>
<spacer style="width: 20px"/>
<deck>
<vbox>
<iframe id="frame" style="margin-left: 60px; margin-top: 10px; border-left: 17px solid red; padding-left: 0 !important; padding-top: 3px;"
width="250" height="80" src="frame_popup_anchor.xhtml"/>
<iframe id="frame" style="margin-left: 60px; margin-top: 10px; border-left: 17px solid red; padding-left: 0 !important; padding-top: 3px; width: 250px; height: 80px"
src="frame_popup_anchor.xhtml"/>
</vbox>
</deck>
</hbox>

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

@ -284,27 +284,27 @@ SimpleTest.waitForFocus(runTests);
<hbox id="splitterbox" style="margin-top: 5px;" onmousedown="this.setCapture()">
<hbox id="leftbox" style="width: 100px" flex="1"/>
<splitter id="splitter" width="5" height="5"/>
<splitter id="splitter" style="width: 5px; height: 5px"/>
<hbox id="rightbox" style="width: 100px" flex="1"/>
</hbox>
<vbox id="custom" width="10" height="10" onmousedown="this.setCapture(); cachedMouseDown = event;"/>
<vbox id="custom2" width="10" height="10" onmousedown="this.setCapture(); document.releaseCapture();"/>
<vbox id="custom3" width="10" height="10" onmousedown="this.setCapture(); this.releaseCapture();"/>
<vbox id="custom4" width="10" height="10" onmousedown="this.setCapture();"
<vbox id="custom" style="width: 10px; height: 10px" onmousedown="this.setCapture(); cachedMouseDown = event;"/>
<vbox id="custom2" style="width: 10px; height: 10px" onmousedown="this.setCapture(); document.releaseCapture();"/>
<vbox id="custom3" style="width: 10px; height: 10px" onmousedown="this.setCapture(); this.releaseCapture();"/>
<vbox id="custom4" style="width: 10px; height: 10px" onmousedown="this.setCapture();"
onmousemove="this.releaseCapture();"/>
<hbox id="custom5" width="40" height="40"
<hbox id="custom5" style="width: 40px; height: 40px"
onmousedown="this.setCapture(captureRetargetMode);">
<spacer id="custom5spacer" width="5"/>
<hbox id="custom5inner" width="35" height="35"/>
<spacer id="custom5spacer" style="width: 5px"/>
<hbox id="custom5inner" style="width: 35px; height: 35px"/>
</hbox>
<vbox id="custom6" width="10" height="10"
<vbox id="custom6" style="width: 10px; height: 10px"
onmousedown="document.createElement('hbox').setCapture();"/>
</xul:vbox>
<iframe width="100" height="100" src="file_mousecapture3.html"/>
<iframe width="100" height="100" src="file_mousecapture4.html"/>
<iframe width="100" height="100" src="file_mousecapture5.html"/>
<iframe style="width: 100px; height: 100px" src="file_mousecapture3.html"/>
<iframe style="width: 100px; height: 100px" src="file_mousecapture4.html"/>
<iframe style="width: 100px; height: 100px" src="file_mousecapture5.html"/>
<select id="select" xmlns="http://www.w3.org/1999/xhtml" size="4">
<option id="option1">One</option>

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

@ -20,7 +20,7 @@
<button label="Check"/>
<vbox id="popuparea" popup="context" width="20" height="20"/>
<vbox id="popuparea" popup="context" style="width: 20px; height: 20px"/>
<script type="application/javascript">
<![CDATA[

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

@ -29,7 +29,7 @@
<button label="Check"/>
<vbox id="popuparea" popup="outermain" width="20" height="20"/>
<vbox id="popuparea" popup="outermain" style="width: 20px; height: 20px"/>
<script type="application/javascript">
<![CDATA[