mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add a test case for bug 1193557, r=kats.
This commit is contained in:
parent
1f30b6d973
commit
deaa78a29f
@ -25,3 +25,5 @@ skip-if = (os == 'android') || (os == 'b2g') # wheel events not supported on mob
|
||||
skip-if = (os == 'android') || (os == 'b2g') # uses wheel events which are not supported on mobile
|
||||
[test_basic_pan.html]
|
||||
skip-if = toolkit != 'gonk'
|
||||
[test_scroll_inactive_flattened_frame.html]
|
||||
skip-if = (os == 'android') || (os == 'b2g') || (buildapp == 'mulet') # wheel events not supported on mobile; see bug 1164274 for mulet
|
||||
|
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test scrolling flattened inactive frames</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" style="height: 300px; width: 600px; overflow: auto; background: yellow">
|
||||
<div id="outer" style="height: 400px; width: 500px; overflow: auto; background: black">
|
||||
<div id="inner" style="mix-blend-mode: screen; height: 800px; overflow: auto; background: purple">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script class="testbody" type="text/javascript;version=1.7">
|
||||
function test() {
|
||||
var container = document.getElementById('container');
|
||||
var outer = document.getElementById('outer');
|
||||
var inner = document.getElementById('inner');
|
||||
var outerScrollTop = outer.scrollTop;
|
||||
var containerScrollTop = container.scrollTop;
|
||||
var event = {
|
||||
deltaMode: WheelEvent.DOM_DELTA_LINE,
|
||||
deltaX: 0,
|
||||
deltaY: 10,
|
||||
lineOrPageDeltaX: 0,
|
||||
lineOrPageDeltaY: 10,
|
||||
};
|
||||
sendWheelAndPaint(inner, 20, 30, event, function () {
|
||||
ok(container.scrollTop == containerScrollTop, "container scrollframe should not have scrolled");
|
||||
ok(outer.scrollTop > outerScrollTop, "nested scrollframe should have scrolled");
|
||||
SimpleTest.finish();
|
||||
});
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
SpecialPowers.pushPrefEnv({
|
||||
'set': [['general.smoothScroll', false],
|
||||
['mousewheel.transaction.timeout', 1000000]],
|
||||
}, function () {
|
||||
SimpleTest.waitForFocus(test);
|
||||
});
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -523,10 +523,18 @@ function sendWheelAndPaint(aTarget, aOffsetX, aOffsetY, aEvent, aCallback, aWind
|
||||
if (!aCallback)
|
||||
return;
|
||||
|
||||
var waitForPaints = function () {
|
||||
SpecialPowers.Services.obs.removeObserver(waitForPaints, "apz-repaints-flushed", false);
|
||||
aWindow.waitForAllPaintsFlushed(function() {
|
||||
utils.restoreNormalRefresh();
|
||||
aCallback();
|
||||
});
|
||||
}
|
||||
|
||||
SpecialPowers.Services.obs.addObserver(waitForPaints, "apz-repaints-flushed", false);
|
||||
if (!utils.flushApzRepaints(aWindow)) {
|
||||
waitForPaints();
|
||||
}
|
||||
}, 0);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user