mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=540910 flush Xlib requests from the parent to the server before testing from the OOP plugin, and increase the timeout so that GTK's idle timer gets run for XEmbed plug sizing
This commit is contained in:
parent
34998937f9
commit
4388dea01e
@ -2,8 +2,6 @@
|
||||
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" title="Test Plugin Clipping: Dynamic Tests">
|
||||
<head>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<style>
|
||||
embed { width:300px; height:200px; display:block; }
|
||||
</style>
|
||||
@ -34,9 +32,9 @@
|
||||
<script src="plugin_clipping_lib.js"></script>
|
||||
<script class="testbody" type="application/javascript">
|
||||
<![CDATA[
|
||||
var scroll = document.getElementById("scroll");
|
||||
|
||||
function runTests() {
|
||||
var scroll = document.getElementById("scroll");
|
||||
var zbox = document.getElementById("zbox");
|
||||
var sbox = document.getElementById("sbox");
|
||||
var p1 = document.getElementById("p1");
|
||||
@ -49,12 +47,15 @@ function runTests() {
|
||||
checkClipRegion("p2", [[0, 0, 200, 50], [0, 50, 50, 200], [150, 50, 200, 200]]);
|
||||
|
||||
zbox.style.zIndex = -1;
|
||||
flush();
|
||||
checkClipRegion("p2", [[0, 0, 200, 100], [0, 100, 50, 200], [150, 100, 200, 200]]);
|
||||
|
||||
sbox.style.background = "";
|
||||
flush();
|
||||
checkClipRegion("p2", [[0, 0, 200, 200]]);
|
||||
|
||||
p1.style.zIndex = 1;
|
||||
flush();
|
||||
checkClipRegion("p1", [[0, 0, 200, 200]]);
|
||||
checkClipRegion("p2", [[0, 100, 200, 200]]);
|
||||
|
||||
@ -63,9 +64,18 @@ function runTests() {
|
||||
zbox.style.zIndex = 1;
|
||||
zbox.style.top = "50.3px;"
|
||||
d2.style.top = "100.3px";
|
||||
flush();
|
||||
checkClipRegionNoBounds("p2", [[0, 0, 200, 50], [0, 50, 50, 150], [150, 50, 200, 150], [0, 150, 200, 200]]);
|
||||
}
|
||||
|
||||
function flush() {
|
||||
// This function is for X11 to flush the Xlib request queue. It takes
|
||||
// advantage of the current scrolling implementation, which will do this for
|
||||
// us. Beware though, it does not wait for the X server to process the
|
||||
// events.
|
||||
++scroll.scrollTop;
|
||||
--scroll.scrollTop;
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -159,6 +159,8 @@ function loaded() {
|
||||
}
|
||||
|
||||
// Need to run 'loaded' after painting is unsuppressed, or we'll set clip
|
||||
// regions to empty.
|
||||
window.addEventListener("load", function () { setTimeout(loaded, 0); }, false);
|
||||
// regions to empty. The timeout must be non-zero on X11 so that
|
||||
// gtk_container_idle_sizer runs after the GtkSocket gets the plug_window.
|
||||
window.addEventListener("load",
|
||||
function () { setTimeout(loaded, 1000); }, false);
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user