зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1447131 - Mochitest for hit-testing over backface-visibility:hidden element. r=kats
MozReview-Commit-ID: EeQlvluPQD1 --HG-- extra : rebase_source : 074ba63d6c4d9a69393cce691988697def556818
This commit is contained in:
Родитель
1b44d973ee
Коммит
38444e7793
|
@ -0,0 +1,65 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>APZ hit-testing with backface-visibility:hidden</title>
|
||||
<script type="application/javascript" src="apz_test_utils.js"></script>
|
||||
<script type="application/javascript" src="apz_test_native_event_utils.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
|
||||
<meta name="viewport" content="width=device-width"/>
|
||||
<style>
|
||||
body,html{
|
||||
height: 100%;
|
||||
}
|
||||
body{
|
||||
margin: 0;
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
#back, #front{
|
||||
backface-visibility: hidden;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
#front{
|
||||
overflow-y:auto;
|
||||
}
|
||||
#content{
|
||||
width: 100%;
|
||||
height: 200%;
|
||||
background: linear-gradient(blue, green);
|
||||
}
|
||||
#back{
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="front">
|
||||
<div id="content"></div>
|
||||
</div>
|
||||
<div id="back"></div></body>
|
||||
<script type="application/javascript">
|
||||
|
||||
function* test(testDriver) {
|
||||
var config = getHitTestConfig();
|
||||
if (config.isWebRender) {
|
||||
ok(true, "This test is only enabled for non-WebRender");
|
||||
subtestDone();
|
||||
return;
|
||||
}
|
||||
|
||||
var subframe = document.getElementById('front');
|
||||
var subframeViewId = config.utils.getViewId(subframe);
|
||||
|
||||
var {hitInfo, scrollId} = hitTest(centerOf(subframe));
|
||||
|
||||
is(scrollId, subframeViewId,
|
||||
"hit the scroll frame behind the backface-visibility:hidden element");
|
||||
|
||||
subtestDone();
|
||||
}
|
||||
|
||||
waitUntilApzStable().then(runContinuation(test));
|
||||
|
||||
</script>
|
||||
</html>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Various tests to exercise the APZ hit-testing codepaths</title>
|
||||
<title>APZ hit-testing with floated subframe</title>
|
||||
<script type="application/javascript" src="apz_test_utils.js"></script>
|
||||
<script type="application/javascript" src="apz_test_native_event_utils.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
helper_iframe_pan.html
|
||||
helper_iframe1.html
|
||||
helper_iframe2.html
|
||||
helper_hittest_backface_hidden.html
|
||||
helper_hittest_basic.html
|
||||
helper_hittest_checkerboard.html
|
||||
helper_hittest_subframe_float.html
|
||||
|
|
|
@ -30,6 +30,7 @@ var subtests = [
|
|||
{'file': 'helper_hittest_basic.html', 'prefs': prefs},
|
||||
{'file': 'helper_hittest_subframe_float.html', 'prefs': prefs},
|
||||
{'file': 'helper_hittest_checkerboard.html', 'prefs': prefs},
|
||||
{'file': 'helper_hittest_backface_hidden.html', 'prefs': prefs}
|
||||
];
|
||||
|
||||
if (isApzEnabled()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче